Advertisement
OMEGAHEAD_MonkoX

Keyboard is broken

Nov 16th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4. #include <cstring>
  5. #include <sstream>
  6. #include <algorithm>
  7.  
  8. using namespace std;
  9.  
  10. istream & operator >> (istream & in, vector<int> & v)
  11. {
  12.     string str;
  13.     getline(in,str);
  14.     stringstream stream(str);
  15.     int tmp;
  16.     while(stream >> tmp)
  17.         v.push_back(tmp);
  18.     return in;
  19. }
  20. ostream & operator << (ostream & out, vector<int> const & v)
  21. {
  22.     for(int el: v)
  23.         out << el << ' ';
  24.     return out;
  25. }
  26. int main()
  27. {
  28.     int n,bi,j,ud,d,i,OMEGAHEAD,FOURHEAD,counter,t,e,l,y,b;
  29.     vector<int> a,N,a1,B;
  30.     cin>> N;
  31.     cin >>a;
  32.     cin >> B;
  33.     cin >> a1;
  34.     b=B[0];
  35.     n=N[0];
  36.     for (i=0;i<n;++i)
  37.     {
  38.         if (a[i]<count(a1.begin(),a1.end(),i+1)) cout << "YES" <<endl;
  39.         else cout<<"NO"<<endl;
  40.     }
  41.  
  42.     return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement