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