Submission #520372

# Submission time Handle Problem Language Result Execution time Memory
520372 2022-01-29T18:04:43 Z Alex_tz307 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 312 KB
#include <bits/stdc++.h>
#define INF 0x3f3f3f3f

using namespace std;

void test_case() {
  int n;
  cin >> n;
  int s1 = 0, s2 = 0;
  vector<int> last(9, -INF);
  for (int i = 1; i <= n; ++i) {
    int t, a, b;
    cin >> t >> a >> b;
    if (a <= 4) {
      s1 += 100;
      if (t - last[a] <= 10) {
        s1 += 50;
      }
    } else {
      s2 += 100;
      if (t - last[a] <= 10) {
        s2 += 50;
      }
    }
    last[a] = t;
  }
  cout << s1 << ' ' << s2 << '\n';
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  for (int tc = 1; tc <= t; ++tc) {
    test_case();
  }
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 308 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 204 KB Output is correct
3 Correct 0 ms 304 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 308 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 204 KB Output is correct
5 Correct 0 ms 304 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 312 KB Output is correct
12 Correct 0 ms 204 KB Output is correct
13 Correct 0 ms 204 KB Output is correct