답안 #920592

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
920592 2024-02-02T18:28:12 Z SuPythony Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 600 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int n; cin>>n;
    vector<int> score(2, 0);
    vector<int> prev_t(8, -1);
    while (n--) {
        int t,a,b; cin>>t>>a>>b;
        if (a<=4) {
            score[0]+=100;
        } else {
            score[1]+=100;
        }
        if (prev_t[a]==-1) prev_t[a]=t;
        else {
            if (t-prev_t[a]<=10) {
                if (a<=4) score[0]+=50;
                else score[1]+=50;
            }
            prev_t[a]=t;
        }
    }
    cout<<score[0]<<" "<<score[1];
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 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 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 600 KB Output is correct