Submission #1198198

#TimeUsernameProblemLanguageResultExecution timeMemory
1198198ramzialoulouLjeto (COCI21_ljeto)C++20
25 / 50
0 ms328 KiB
#include <bits/stdc++.h>

using namespace std;

#ifdef Ramzi
#include "debug.h"
#else
#define debug(...)
#endif

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> t(n), a(n), b(n);
  for (int i = 0; i < n; i++) {
    cin >> t[i] >> a[i] >> b[i];
  }
  int64_t ta = 0, tb = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] <= 4) {
      ta += 100;
    } else {
      tb += 100;
    }
    if (i > 0 && t[i] - t[i - 1] <= 10 && a[i] == a[i - 1]) {
      if (a[i] <= 4) {
        ta += 50;
      } else {
        tb += 50;
      }
    }
  }
  cout << ta << " " << tb << "\n";
  return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...