# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
974869 | vjudge1 | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |