Submission #974253

#TimeUsernameProblemLanguageResultExecution timeMemory
974253vjudge1Ljeto (COCI21_ljeto)C++17
0 / 50
0 ms348 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int ev[n][3]; for(int i = 1; i <= n; i++){ cin >> ev[i][0] >> ev[i][1] >> ev[i][2]; } int skA, skB, idx; for(int i = 1; i <= n; i++){ if(ev[i][1] >= 1 && ev[i][1] <= 4){ skA += 100; idx = 0; } else{ skB += 100; idx = 1; } if(i > 1 && ev[i][0] <= ev[i-1][0]+10 && ev[i][1] == ev[i-1][1]){ if(idx) skB += 50; else skA += 50; } } cout << skA << " " << skB << endl; return 0; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:27:20: warning: 'skA' may be used uninitialized in this function [-Wmaybe-uninitialized]
   27 |     cout << skA << " " << skB << endl;
      |                    ^~~
Main.cpp:27:27: warning: 'skB' may be used uninitialized in this function [-Wmaybe-uninitialized]
   27 |     cout << skA << " " << skB << endl;
      |                           ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...