# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
633646 | 2022-08-23T00:05:34 Z | rc_catunta | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 296 KB |
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int,int> ii; typedef vector<ii> vii; int main(){ //ios_base::sync_with_stdio(false); //cin.tie(NULL); vector<vi> v; v.assign(8,vi()); int n; cin>>n; for(int i=0;i<n;i++){ int t,a,b; cin>>t>>a>>b; v[a-1].push_back(t); } // TEAM PINEAPPLE int pin=0; for(int i=0;i<=3;i++){ pin+=(v[i].size()*100); //cout<<v[i].size()<<"\n"; if(v[i].size()<2) continue; for(int j=0;j<v[i].size()-1;j++){ if(v[i][j+1]-v[i][j]<=10) pin+=50; } } // TEAM BLUEBERRY int blue=0; for(int i=4;i<=7;i++){ blue+=(v[i].size()*100); if(v[i].size()<2) continue; for(int j=0;j<v[i].size()-1;j++){ if(v[i][j+1]-v[i][j]<=10) blue+=50; } } cout<<pin<<" "<<blue<<"\n"; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 296 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 296 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |