답안 #655468

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
655468 2022-11-04T14:19:44 Z google Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 336 KB
#include<bits/stdc++.h>
using namespace std;
int main(){
    cin.tie(0)->sync_with_stdio(0);
    int n,t[9],p[9],a,b,c; cin >> n;
    memset(t,-20,sizeof(t));
    memset(p,0,sizeof(p));
    for (int i = 0;i<n;i++){
        cin >> a >> b >> c;
        p[b] += 100;
        if (a-t[b] <= 10) p[b]+=50;
        t[b] = a;
    }
    cout << p[1]+p[2]+p[3]+p[4] << ' ';
    cout << p[5]+p[6]+p[7]+p[8];
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 336 KB Output is correct
2 Correct 0 ms 212 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 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 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 336 KB Output is correct
2 Correct 0 ms 212 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 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 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 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct