Submission #488520

# Submission time Handle Problem Language Result Execution time Memory
488520 2021-11-19T12:44:04 Z rainboy Ljeto (COCI21_ljeto) C
50 / 50
0 ms 276 KB
#include <stdio.h>

#define N	8
#define T	10

int main() {
	static int tt[N], ss[2];
	int m, i;

	scanf("%d", &m);
	for (i = 0; i < N; i++)
		tt[i] = -T - 1;
	while (m--) {
		int t;

		scanf("%d%d%*d", &t, &i), i--;
		ss[i / 4] += 100 + (t - tt[i] <= 10 ? 50 : 0);
		tt[i] = t;
	}
	printf("%d %d\n", ss[0], ss[1]);
	return 0;
}

Compilation message

Main.c: In function 'main':
Main.c:10:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%d", &m);
      |  ^~~~~~~~~~~~~~~
Main.c:16:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |   scanf("%d%d%*d", &t, &i), i--;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 276 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 204 KB Output is correct
12 Correct 0 ms 204 KB Output is correct
13 Correct 0 ms 204 KB Output is correct