Submission #1032684

# Submission time Handle Problem Language Result Execution time Memory
1032684 2024-07-24T06:10:22 Z vjudge1 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 348 KB
#include<iostream>

using namespace std;

int main()
{
  int n;
  cin >> n;
  int last[8] = {};
  for(int i = 0; i < 8; i++) last[i] = -20;

  int s1 = 0, s2 = 0;
  while(n--)
    {
      int t , a, b;
      cin >> t >> a >> b;
      a--, b--;
      if(a <= 3)
	{
	  s1 += 100;
	  if(t - last[a] <= 10) s1 += 50;
	  last[a] = t;
	}
      else
	{
	  s2 += 100;
	  if(t - last[a] <= 10) s2 += 50;
	  last[a] = t;
	}
    }

  cout << s1 << ' ' << s2 << endl;
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 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 344 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 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 344 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 1 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct