fork download
  1. // iostream is too mainstream
  2. #include <cstdio>
  3. // bitch please
  4. #include <iostream>
  5. #include <vector>
  6. #include <set>
  7. #include <map>
  8. #include <string>
  9. #include <queue>
  10. #include <stack>
  11. #include <algorithm>
  12. #include <cmath>
  13. #include <iomanip>
  14. #define dibs reserve
  15. #define OVER9000 1234567890
  16. #define patkan 9
  17. #define tisic 47
  18. #define soclose 1e-9
  19. #define pi 3.1415926535898
  20. #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
  21. #define chocolate win
  22. #define ff first
  23. #define ss second
  24. #define abs(x) ((x < 0)?-(x):(x))
  25. #define uint unsigned int
  26. // mylittlepony
  27. using namespace std;
  28.  
  29. int main() {
  30. cin.sync_with_stdio(0);
  31. int N;
  32. cin >> N;
  33. set< pair<int,int> > S;
  34. set<int> X,Y;
  35. vector<int> maxY(50000+tisic,0);
  36. for(int i =0; i < N; i++) {
  37. int x,y;
  38. cin >> x >> y;
  39. maxY[x] =max(maxY[x],y);
  40. S.insert(make_pair(x,y));
  41. X.insert(x);
  42. Y.insert(y);}
  43.  
  44. ALL_THE(X,it) ALL_THE(Y,jt)
  45. if(S.find(make_pair(*it,*jt)) == S.end() && maxY[*it] > *jt)
  46. cout << *it << " " << *jt << "\n";
  47. return 0;}
  48.  
  49. // look at my code
  50. // my code is amazing
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:20:31: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                               ^
prog.cpp:44:5: note: in expansion of macro ‘ALL_THE’
     ALL_THE(X,it) ALL_THE(Y,jt)
     ^
prog.cpp:44:15: error: ‘it’ does not name a type
     ALL_THE(X,it) ALL_THE(Y,jt)
               ^
prog.cpp:20:36: note: in definition of macro ‘ALL_THE’
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                                    ^
prog.cpp:44:15: error: expected ‘;’ before ‘it’
     ALL_THE(X,it) ALL_THE(Y,jt)
               ^
prog.cpp:20:55: note: in definition of macro ‘ALL_THE’
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                                                       ^
prog.cpp:44:15: error: ‘it’ was not declared in this scope
     ALL_THE(X,it) ALL_THE(Y,jt)
               ^
prog.cpp:20:55: note: in definition of macro ‘ALL_THE’
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                                                       ^
prog.cpp:20:31: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                               ^
prog.cpp:44:19: note: in expansion of macro ‘ALL_THE’
     ALL_THE(X,it) ALL_THE(Y,jt)
                   ^
prog.cpp:44:29: error: ‘jt’ does not name a type
     ALL_THE(X,it) ALL_THE(Y,jt)
                             ^
prog.cpp:20:36: note: in definition of macro ‘ALL_THE’
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                                    ^
prog.cpp:44:29: error: expected ‘;’ before ‘jt’
     ALL_THE(X,it) ALL_THE(Y,jt)
                             ^
prog.cpp:20:55: note: in definition of macro ‘ALL_THE’
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                                                       ^
prog.cpp:44:29: error: ‘jt’ was not declared in this scope
     ALL_THE(X,it) ALL_THE(Y,jt)
                             ^
prog.cpp:20:55: note: in definition of macro ‘ALL_THE’
 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
                                                       ^
stdout
Standard output is empty