답안 #784129

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
784129 2023-07-15T18:15:41 Z serifefedartar Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 324 KB
#include <bits/stdc++.h>
using namespace std;

#define fast ios::sync_with_stdio(0);cin.tie(0);
typedef long long ll;
#define f first
#define s second
#define MAXN 100005

int last[9];
int main() {
    memset(last, -1, sizeof(last));
    fast
    int n;
    cin >> n;
    int pnt1 = 0, pnt2 = 0;
    for (int i = 0; i < n; i++) {
        int t, a, b;
        cin >> t >> a >> b;
        if (last[a] != -1 && last[a] + 10 >= t) {
            if (a <= 4) {
                pnt1 += 150;
                last[a] = t;
            } else {
                pnt2 += 150;
                last[a] = t;
            }
        } else {
            if (a <= 4) {
                pnt1 += 100;
                last[a] = t;
            } else {
                pnt2 += 100;
                last[a] = t;
            }
        }
    }
    cout << pnt1 << " " << pnt2 << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 324 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 324 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct