Submission #1185385

#TimeUsernameProblemLanguageResultExecution timeMemory
1185385MoonnMed (COCI22_med)C++20
Compilation error
0 ms0 KiB
) { if(vc[j].first==v[i].first) { cout<<j+1<<' '; vc[j].second-=500; continue; } vc[j].second+=500; } sort(vc.begin(),vc.end(),comp); for(j=0;j<n;j++) { if(vc[j].first==v[i].first) { cout<<j+1<<endl; break; } vc[j].second-=500; } } } int main() { AI //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); ll t=1; // cin>>t; while(t--) solve(); }

Compilation message (stderr)

Main.cpp:1:1: error: expected unqualified-id before ')' token
    1 | )
      | ^
Main.cpp:11:13: error: expected constructor, destructor, or type conversion before '(' token
   11 |         sort(vc.begin(),vc.end(),comp);
      |             ^
Main.cpp:12:9: error: expected unqualified-id before 'for'
   12 |         for(j=0;j<n;j++)
      |         ^~~
Main.cpp:12:19: error: 'n' was not declared in this scope
   12 |         for(j=0;j<n;j++)
      |                   ^
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:19: error: 'n' was not declared in this scope
Main.cpp:12:17: error: 'j' does not name a type
   12 |         for(j=0;j<n;j++)
      |                 ^
Main.cpp:12:21: error: 'j' does not name a type
   12 |         for(j=0;j<n;j++)
      |                     ^
Main.cpp:21:5: error: expected declaration before '}' token
   21 |     }
      |     ^
Main.cpp:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Main.cpp: In function 'int main()':
Main.cpp:25:5: error: 'AI' was not declared in this scope
   25 |     AI
      |     ^~
Main.cpp:30:11: error: 't' was not declared in this scope
   30 |     while(t--)
      |           ^
Main.cpp:31:5: error: 'solve' was not declared in this scope
   31 |     solve();
      |     ^~~~~