답안 #861974

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
861974 2023-10-17T10:00:17 Z Youssif_Elkadi Ljeto (COCI21_ljeto) C++17
50 / 50
0 ms 436 KB
#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5, mod = 1e9 + 7, base = 31;
int main()
{
    int n;
    cin >> n;
    vector<int> lst(10, -1000);
    int a = 0, b = 0;
    for (int i = 0; i < n; i++)
    {
        int t, p1, p2;
        cin >> t >> p1 >> p2;
        if (p1 <= 4)
            a += (100 + (t - lst[p1] <= 10 ? 50 : 0)), lst[p1] = t;
        else
            b += (100 + (t - lst[p1] <= 10 ? 50 : 0)), lst[p1] = t;
    }
    cout << a << " " << b << "\n";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 436 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 0 ms 348 KB Output is correct
7 Correct 0 ms 436 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct