# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
974869 | 2024-05-04T03:58:33 Z | vjudge1 | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 604 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long signed main(){ ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector < vector < int >> a ( 9 ); for ( int i = 1; i <= n; i++){ int time, t1, t2; cin >> time >> t1 >> t2; a[t1].push_back(time); } ll ta = 0, tb = 0; for ( int i = 1; i <= 8; i++){ ll now = -1e9; for ( int j = 0; j < a[i].size(); j++){ if ( i <= 4 ){ if ( a[i][j] - now <= 10){ ta += 150; now = a[i][j]; } else{ ta += 100; now = a[i][j]; } } else{ if ( a[i][j] - now <= 10 ){ tb += 150; now = a[i][j]; } else{ tb += 100; now = a[i][j]; } } } } cout << ta << " " << tb << endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 352 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 604 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 | 1 ms | 344 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 352 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 604 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 | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 1 ms | 344 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |