Submission #836016

# Submission time Handle Problem Language Result Execution time Memory
836016 2023-08-24T05:01:48 Z exodus_ Ljeto (COCI21_ljeto) C++14
25 / 50
1 ms 260 KB
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e3+3;
int t[maxn];
int a[maxn], b[maxn];
int main() {
    int n;
    cin >> n;
    int tima=0, timb=0;
    for(int i=1; i<=n; i++) {
        cin >> t[i] >> a[i] >> b[i];
        if(a[i]>=1 && a[i]<=4) {
            tima+=100;
        }
        if(a[i]>=5 && a[i]<=8) {
            timb+=100;
        }
    }
    for(int i=2; i<=n; i++) {
        if(t[i]-t[i-1] <= 10 && a[i]==a[i-1]) {
            if(a[i]>=1 && a[i]<=4) tima+=50;
            if(a[i]>=5 && a[i]<=8) timb+=50;
        }
    }
    cout << tima << " " << timb << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 220 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 260 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 220 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 260 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Incorrect 1 ms 260 KB Output isn't correct
12 Halted 0 ms 0 KB -