답안 #516776

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
516776 2022-01-22T06:10:13 Z Marslai24 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 312 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long // a.k.a. TLE creator
#define all(x) x.begin(), x.end()
template<class A, class B> istream& operator >>(istream &o, pair<A, B> &x){return o >> x.first >> x.second;}
template<class A, class B> ostream& operator <<(ostream &o, pair<A, B> &x){return o << x.first << ' ' << x.second << ' ';}
void setIO(){ios::sync_with_stdio(false); cin.tie(0);}
const int INF = INT_MAX, MOD = 998244353, N = 1e6 + 2, K = __lg(N) + 1;

signed main(){
    setIO();
    int n;
    cin >> n;
    vector<int> lst(9, -INF);
    int ans[2]{};
    for(int i = 0; i < n; i++){
        int a, b, t;
        cin >> t >> a >> b;
        ans[a > 4] += 100;
        if(t - lst[a] <= 10)ans[a > 4] += 50;
        lst[a] = t;
    }
    cout << ans[0] << ' ' << ans[1];
}


# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 312 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 312 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 312 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 312 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 308 KB Output is correct