Submission #1081483

# Submission time Handle Problem Language Result Execution time Memory
1081483 2024-08-30T05:41:57 Z Wasif_Shahzad Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 440 KB
#include <bits/stdc++.h>

using namespace std;
#define int int64_t

int32_t main(){
    #ifndef ONLINE_JUDGE
    // freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
    #endif
    int n;
    cin >> n;
    vector<int> last(9, -1ll);
    int sc1 = 0, sc2 = 0;
    for(int i = 0; i < n; i++){
        int t, a, b;
        cin >> t >> a >> b;
        if(t - last[a] <= 10 && last[a] != -1){
            (a <= 4 ? sc1 += 150 : sc2 += 150);
        }
        else{
            (a <= 4 ? sc1 += 100 : sc2 += 100);
        }
        last[a] = t;
    }
    cout << sc1 << " " << sc2 << "\n";
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 436 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 428 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 436 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 440 KB Output is correct
11 Correct 1 ms 344 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct