Submission #488520

#TimeUsernameProblemLanguageResultExecution timeMemory
488520rainboyLjeto (COCI21_ljeto)C11
50 / 50
0 ms276 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...