fork download
  1. #pragma GCC optimize ("Ofast")
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4. #define main dummy_main
  5. int main(){
  6. return 0;
  7. }
  8. #undef main
  9. class Solution{
  10. public:
  11. vector<int> luckyNumbers (vector<vector<int>>& A){
  12. int i;
  13. int X = A.size();
  14. int Y = A[0].size();
  15. vector<int> res;
  16. for(i=(0);i<(X);i++){
  17. int j;
  18. for(j=(0);j<(Y);j++){
  19. int k;
  20. for(k=(0);k<(Y);k++){
  21. if(A[i][j] > A[i][k]){
  22. goto Q5VJL1cS;
  23. }
  24. }
  25. for(k=(0);k<(X);k++){
  26. if(A[i][j] < A[k][j]){
  27. goto Q5VJL1cS;
  28. }
  29. }
  30. res.push_back(A[i][j]);
  31. Q5VJL1cS:;
  32. }
  33. }
  34. return res;
  35. }
  36. }
  37. ;
  38. // cLay varsion 20200325-1
  39.  
  40. // --- original code ---
  41. // #define main dummy_main
  42. // {}
  43. // #undef main
  44. //
  45. // class Solution {
  46. // public:
  47. // vector<int> luckyNumbers (vector<vector<int>>& A) {
  48. // int X = A.size(), Y = A[0].size();
  49. // vector<int> res;
  50. // rep(i,X) rep(j,Y){
  51. // rep(k,Y) if(A[i][j] > A[i][k]) break_continue;
  52. // rep(k,X) if(A[i][j] < A[k][j]) break_continue;
  53. // res.push_back(A[i][j]);
  54. // }
  55. // return res;
  56. // }
  57. // };
  58.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty