Submission #974253

# Submission time Handle Problem Language Result Execution time Memory
974253 2024-05-03T06:52:01 Z vjudge1 Ljeto (COCI21_ljeto) C++17
0 / 50
0 ms 348 KB
#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

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 time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -