| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1176905 | husu1331 | Ljeto (COCI21_ljeto) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
int main()
{
ll n;
cin>>n;
vector<ll>pa,bb,pa1,bb1;
ll p=0;
ll s=0;
for(ll i=0;i<n;i++){
ll a,b,c;
cin>>a>>b>>c;
if(b<5){
p+=100;
pa.pb(a);
pa1.pb(b);
}
else{
s+=100;
bb.pb(a);
bb1.pb(b);
}
}
for(ll i=1;i<pa.size();i++){
if(pa[i]-pa[i-1]<=10 and pa1[i]==pa1[i-1]){
p+=50;
}
}
for(ll i=1;i<bb.size();i++){
if(bb[i]-bb[i-1]<=10 and bb1[i]==bb1[i-1]){
s+=50;
}
}
cout<<p<<" "<<s;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
