# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
991590 |
2024-06-02T14:41:35 Z |
qrn |
Ljeto (COCI21_ljeto) |
C++14 |
|
1 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ep emplace_back
#define ins insert
#define fi first
#define er erase
#define se second
template<class IStr, class T>
IStr& operator>>(IStr& is, vector<T>& v) { for (auto& x : v) is >> x; }
#define give(v) \
cout << v << endl; \
return;
#define print(a) \
for (auto v : a) \
{ \
cout << v << " "; \
} \
cout << endl;
#define vs vector<string>
#define vi vector<int>
#define vb vector<bool>
#define pii pair<int, int>
#define vvi vector<vector<int>>
#define sz(x) x.size()
#define vpii vector<pair<int, int>>
#define SPEED \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); \
cout.tie(NULL);
#define ALL(x) x.begin(), x.end()
#define endl "\n"
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define out cout << endl
#define impos cout << -1 << endl
#define int long long
const long double pi = 2 * acosl(0);
const int inf = 1e9 + 7;
const int mod = inf;
const int szz = 1e6 + 5;
int n, tme[szz];
void solve () {
cin >> n;
int res1 = 0, res2 = 0;
for (int i = 1; i <= n; i++) {
int t, a, b;
cin >> t >> a >> b;
if (a < 5) res1 += 100;
else res2 += 100;
if (tme[a] && t - tme[a] <= 10) {
if (a < 5) res1 += 50;
else res2 += 50;
}
tme[a] = t;
}
cout << res1 << " " << res2 << endl;
}
signed main(){
SPEED;
int tst = 1;
// cin >> tst;
for(int cs = 1; cs <= tst; cs++){
solve();
}
// cerr << "\nTime Elapsed: " << (long double)clock() << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 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 |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 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 |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |