답안 #674277

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
674277 2022-12-23T16:12:52 Z Farhan_HY Ljeto (COCI21_ljeto) C++14
50 / 50
1 ms 300 KB
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define T int t;cin >> t;while(t--)
#define int long long
#define F first
#define S second
using namespace std;
const int mod = 1e9 + 7;
const int N = 5e4 + 6;
int n, lst[9];

main() {
    cin >> n;
    int ans1 = 0, ans2 = 0;
    while(n--) {
        int t, a, b;
        cin >> t >> a >> b;
        if (lst[a] != 0 && t - lst[a] <= 10) {
            if (a <= 4) ans1 += 50;
            else ans2 += 50;
        }
        if (a <= 4) ans1 += 100;
        else ans2 += 100;
        lst[a] = t;
    }
    cout << ans1 << ' ' << ans2;
}

Compilation message

Main.cpp:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main() {
      | ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 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 1 ms 212 KB Output is correct
3 Correct 0 ms 276 KB Output is correct
4 Correct 0 ms 300 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 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 0 ms 276 KB Output is correct
6 Correct 0 ms 300 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 296 KB Output is correct
10 Correct 1 ms 300 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 300 KB Output is correct