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. int countNegatives(vector<vector<int>>& A){
  12. int i;
  13. int res = 0;
  14. for(i=(0);i<(A.size());i++){
  15. int j;
  16. for(j=(0);j<(A[0].size());j++){
  17. if(A[i][j] < 0){
  18. res++;
  19. }
  20. }
  21. }
  22. return res;
  23. }
  24. }
  25. ;
  26. // cLay varsion 20200214-1
  27.  
  28. // --- original code ---
  29. // #define main dummy_main
  30. // {}
  31. // #undef main
  32. //
  33. // class Solution {
  34. // public:
  35. // int countNegatives(vector<vector<int>>& A) {
  36. // int res = 0;
  37. // rep(i,A.size()) rep(j,A[0].size()) if(A[i][j] < 0) res++;
  38. // return res;
  39. // }
  40. // };
  41.  
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