Submission #496466

# Submission time Handle Problem Language Result Execution time Memory
496466 2021-12-21T09:37:29 Z kappa Ljeto (COCI21_ljeto) C++14
0 / 50
1 ms 296 KB
#include <bits/stdc++.h>

using namespace std;

int n, ltime = -15, p1, p2;

struct event{
    int time, from, to, team;
};

event d[105];

int main(){
    cin >> n;

    for (int i = 0; i < n; i++)
    {
        cin >> d[i].time >> d[i].from >> d[i].to;

        if(d[i].from <= 4){
            d[i].team = 1;
        }else{
            d[i].team = 2;
        }
    }

    for (int i = 0; i < n; i++)
    {
        if(d[i].team == 1){
            p1 += 100;

            if(d[i - 1].team == 1 && ltime + 10 <= d[i].time && d[i - 1].from == d[i].from){
                p1 += 50;
            }
        }
        else{
            p2 += 100;

            if(d[i - 1].team == 2 && ltime + 10 <= d[i].time && d[i - 1].from == d[i].from){
                p2 += 50;
            }
        }
    }

    cout << p1 << " " << p2;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 0 ms 296 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 292 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 0 ms 296 KB Output isn't correct