# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
704179 |
2023-03-01T21:25:31 Z |
Uniq0rn |
Ljeto (COCI21_ljeto) |
C++14 |
|
1 ms |
324 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define vi(x) vector<x>
#define pb push_back
#define all(x) begin(x), end(x)
#define sz(x) (int) (x).size()
using pi = pair<int,int>;
#define f first
#define s second
#define mp make_pair
int main()
{
cin.tie(nullptr)->ios_base::sync_with_stdio(false);
int n;cin >> n;
int lastt = -1,lastp = -1;
int score1 = 0,score2 = 0;
while(n--){
int t,a,b;cin >> t >> a >> b;
int add = 100;
if(lastt != -1 && t-lastt <= 10 && lastp == a){
add += 50;
}
lastt = t;
lastp = a;
score1 += add*(a < 5);
score2 += add*(a > 4);
}
cout << score1 << ' ' << score2;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
324 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
324 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |