# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
703471 | 2023-02-27T13:10:38 Z | Pacybwoah | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 340 KB |
#include<iostream> #include<vector> #define ll long long using namespace std; int main(){ int n; cin>>n; int t,a,b; vector<vector<int>> vec(9); for(int i=0;i<n;i++){ cin>>t>>a>>b; vec[a].push_back(t); } int ans=0,bns=0; for(int i=1;i<=4;i++){ if(vec[i].size()>0) ans+=100; for(int j=1;j<vec[i].size();j++){ if(vec[i][j]-vec[i][j-1]<=10) ans+=150; else ans+=100; } } for(int i=5;i<=8;i++){ if(vec[i].size()>0) bns+=100; for(int j=1;j<vec[i].size();j++){ if(vec[i][j]-vec[i][j-1]<=10) bns+=150; else bns+=100; } } cout<<ans<<" "<<bns; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 296 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 300 KB | Output is correct |
3 | Correct | 1 ms | 296 KB | Output is correct |
4 | Correct | 0 ms | 300 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 296 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 296 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 300 KB | Output is correct |
5 | Correct | 1 ms | 296 KB | Output is correct |
6 | Correct | 0 ms | 300 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 296 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 340 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |