제출 #674277

#제출 시각아이디문제언어결과실행 시간메모리
674277Farhan_HYLjeto (COCI21_ljeto)C++14
50 / 50
1 ms300 KiB
#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;
}

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main() {
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...