답안 #522228

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
522228 2022-02-04T08:44:07 Z blue Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 292 KB
#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n;
    cin >> n;

    vector<int> t(1+n), a(1+n), b(1+n);
    for(int i = 1; i <= n; i++) cin >> t[i] >> a[i] >> b[i];

    vector<int> score(2, 0);

    for(int i = 1; i <= n; i++)
    {
        score[ (a[i] > 4) ] += 100;
        for(int j = 1; j < i; j++)
        {
            if(a[i] != a[j]) continue;
            if(t[i] - t[j] <= 10)
            {
                score[ (a[i] > 4) ] += 50;
                break;
            }
        }
    }

    cout << score[0] << ' ' << score[1] << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 288 KB Output is correct
2 Correct 0 ms 288 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 292 KB Output is correct
6 Correct 1 ms 288 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 288 KB Output is correct
2 Correct 0 ms 288 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 292 KB Output is correct
8 Correct 1 ms 288 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct