# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1032725 |
2024-07-24T06:58:56 Z |
vjudge1 |
Ljeto (COCI21_ljeto) |
C++17 |
|
1 ms |
432 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int const N=2e5+5;
int const inf=1e9+7;
void solve(){
int n;
cin>>n;
int prev[9];
for (int i = 0; i < 9; ++i)
prev[i]=-inf;
int c1=0,c2=0;
for (int i = 0; i < n; ++i)
{
int t,a,b;
cin>>t>>a>>b;
if(a<=4){
c1+=100;
if(prev[a]+10>=t)
c1+=50;
prev[a]=t;
}
else{
c2+=100;
if(prev[a]+10>=t)
c2+=50;
prev[a]=t;
}
}
cout<<c1<<' '<<c2<<endl;
}
int main(){
int t=1;
// cin>>t;
while(t--)
solve();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 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 |
432 KB |
Output is correct |
5 |
Correct |
0 ms |
356 KB |
Output is correct |
6 |
Correct |
0 ms |
352 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 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 |
0 ms |
432 KB |
Output is correct |
7 |
Correct |
0 ms |
356 KB |
Output is correct |
8 |
Correct |
0 ms |
352 KB |
Output is correct |
9 |
Correct |
1 ms |
344 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
352 KB |
Output is correct |