Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #include<iterator>
- #include<vector>
- #include<iterator>
- using namespace std;
- int main(){
- int test,camp,night,x;
- int avg;
- vector<int> a;
- vector<int> sum;
- vector<int>::iterator it;
- int res[300];
- cin>>test;
- for(int i=0;i<test;i++){
- sum[0]=0;
- cin>>camp;
- cin>>night;
- for(int j=1;j<=camp;j++){
- cin>>x;
- a.push_back(x);
- sum[j]=sum[j-1]+x;
- }
- avg=sum[camp]/camp;
- x=avg;
- for(int z=0;z<camp;z++){
- //need help
- it=lower_bound(sum.begin(),sum.end(),x);
- cout<<"iterator"<<&it<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement