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. string rankTeams(vector<string>& votes){
  12. int i;
  13. int j;
  14. pair<vector<int>,char> tmp[26];
  15. string res;
  16. for(i=(0);i<(26);i++){
  17. int Q5VJL1cS;
  18. for(Q5VJL1cS=(0);Q5VJL1cS<(26);Q5VJL1cS++){
  19. tmp[i].first.push_back(0);
  20. }
  21. }
  22. for(i=(0);i<(26);i++){
  23. tmp[i].second = 'A' + i;
  24. }
  25. for(i=(0);i<(votes.size());i++){
  26. for(j=(0);j<(votes[i].size());j++){
  27. tmp[votes[i][j]-'A'].first[j]--;
  28. }
  29. }
  30. sort(tmp, tmp+26);
  31. for(i=(0);i<(26);i++){
  32. for(j=(0);j<(26);j++){
  33. if(tmp[i].first[j]){
  34. break;
  35. }
  36. }
  37. if(j==26){
  38. continue;
  39. }
  40. res += tmp[i].second;
  41. }
  42. return res;
  43. }
  44. }
  45. ;
  46. // cLay varsion 20200308-1
  47.  
  48. // --- original code ---
  49. // #define main dummy_main
  50. // {}
  51. // #undef main
  52. //
  53. // class Solution {
  54. // public:
  55. // string rankTeams(vector<string>& votes) {
  56. // int i, j;
  57. // pair<vector<int>,char> tmp[26];
  58. // string res;
  59. //
  60. // rep(i,26) rep(26) tmp[i].first.push_back(0);
  61. // rep(i,26) tmp[i].second = 'A' + i;
  62. // rep(i,votes.size()) rep(j,votes[i].size()) tmp[votes[i][j]-'A'].first[j]--;
  63. // sort(tmp, tmp+26);
  64. //
  65. // rep(i,26){
  66. // rep(j,26) if(tmp[i].first[j]) break;
  67. // if(j==26) continue;
  68. // res += tmp[i].second;
  69. // }
  70. //
  71. // return res;
  72. // }
  73. // };
  74.  
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