Submission #872552

# Submission time Handle Problem Language Result Execution time Memory
872552 2023-11-13T11:08:05 Z Yahia_Emara Ljeto (COCI21_ljeto) C++17
50 / 50
0 ms 468 KB
#include <bits/stdc++.h>
#define pb push_back
#define ctoi(x) int(x-'0')
#define cdv(x,y) (((x)+(y)-1)/(y))
#define LOOP(n) for(int rp=0;rp<(n);rp++)
#define sz(x) int(x.size())
#define dbg(x) cout << (#x) << " : " << x << endl;
#define sq(x) ((x)*(x))
using namespace std;
typedef long long ll;
typedef long double dl;
const int SZ=2e5+7;
int t[SZ],s[SZ],n;
int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);
    int tt=1;
    //cin >> tt;
    LOOP(tt){
        fill(t,t+9,-100),fill(s,s+9,0);
        cin >> n;
        LOOP(n){
            int T,a,b;cin >> T >> a >> b;
            if(t[a]+10>=T)s[a]+=50;
            t[a]=T,s[a]+=100;
        }
        cout << s[1]+s[2]+s[3]+s[4] << ' ' << s[5]+s[6]+s[7]+s[8];
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 344 KB Output is correct
3 Correct 0 ms 344 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 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 344 KB Output is correct
5 Correct 0 ms 344 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 468 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 464 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct