답안 #656191

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
656191 2022-11-06T13:19:30 Z Hydroxic_Acid Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 340 KB
#include <iostream>
using namespace std;

int N;
int pointsA, pointsB;
int last[10];

int main(){
    cin >> N;
    pointsA = 0; pointsB = 0;
    
    for(int i = 1; i <= 8; i++){
        last[i] = -11;
    }

    for(int i = 0; i < N; i++){
        int t, a, b;
        cin >> t >> a >> b;
        if(a <= 4){
            if(t - last[a] <= 10) pointsA += 50;
            pointsA += 100;
        }
        else{
            if(t - last[a] <= 10) pointsB += 50;
            pointsB += 100;
        }
        last[a] = t;
    }

    cout << pointsA << " " << pointsB;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 296 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 296 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 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 1 ms 212 KB Output is correct
11 Correct 1 ms 300 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 212 KB Output is correct