Submission #1032693

# Submission time Handle Problem Language Result Execution time Memory
1032693 2024-07-24T06:17:17 Z vjudge1 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;

    int last[9];
    memset(last, -1, sizeof last);

    int ans[2] = {};
    for (int i = 0; i < n; i ++){
        int t, a, b;
        cin >> t >> a >> b;

        if (last[a] >= 0 and last[a] >= t - 10)
            ans[(a < 5)] += 50;
        ans[(a < 5)] += 100;
        last[a] = t;
    }

    cout << ans[1] << " " << ans[0] << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct