# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
494214 |
2021-12-14T19:27:16 Z |
asandikci |
Ljeto (COCI21_ljeto) |
C++17 |
|
1 ms |
332 KB |
#include"iostream"
// #include"vector"
// #include"queue"
// #include"deque"
// #include"set"
// #include"map"
// #include"algorithm"
// #include"cstring"
// #define int long long
using namespace std;
int ch(int a){
if(a>=5){return 1;}
return 0;
}
int ans[5];
void solve(){
int n;
cin >> n;
int t[n+5],b[n+5],a[n+5];
for(int i=0;i<n;i++){
cin >> t[i] >> a[i] >> b[i];
}
ans[ch(a[0])]+=100;
for(int i=1;i<n;i++){
ans[ch(a[i])]+=100;
if(a[i-1]==a[i] && (t[i]-t[i-1])<=10){
ans[ch(a[i])]+=50;
}
}
cout << ans[0] << " " << ans[1];
}
signed main(){
ios::sync_with_stdio(false); cin.tie(0);
// freopen("","r",stdin);freopen("","w",stdout);
int t=1;
// cin >>t;
for(int i=1;i<=t;i++){
// cout << "Case " << i << ":\n";
solve();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
332 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
204 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |