Submission #975263

# Submission time Handle Problem Language Result Execution time Memory
975263 2024-05-04T16:09:52 Z vjudge1 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 600 KB
#include <bits/stdc++.h> 
#include <cctype>
using namespace std; 

#define fi first
#define se second
#define int long long
#define all(v) v.begin(), v.end()
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; i++)

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> ii;
typedef pair<string, ii> sii;
typedef pair<int, ii> iii;

const int INF = 3e18;
const long double EPS = 10e-9;
const ll MOD = 1e9+7;

signed main() {
	ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
	int n; cin >> n;
	vector<int> last(8 + 2, - INF);
	int scorea = 0, scoreb = 0;
	for (int i=1; i<=n; i++) {
		int t, a, b; cin >> t >> a >> b;
		if (a > 4) {
			scoreb += 100;
			if (t - last[a] <= 10) scoreb += 50;
			last[a] = t;
		} else {
			scorea += 100;
			if (t - last[a] <= 10) scorea += 50;
			last[a] = t;
		}
	} cout << scorea << " " << scoreb << '\n';
	return 0;
} 
# Verdict Execution time Memory Grader output
1 Correct 1 ms 464 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 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 464 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 1 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 456 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 0 ms 460 KB Output is correct
13 Correct 0 ms 600 KB Output is correct