Submission #490079

# Submission time Handle Problem Language Result Execution time Memory
490079 2021-11-25T12:56:32 Z rainboy Pick (COI18_pick) C
0 / 100
0 ms 208 KB
#include <stdio.h>

int main() {
	int a, b, c, d, i;

	scanf("%d%d%d%d", &a, &b, &c, &d);
	if (c == 0 && d == 0) {
		for (i = 0; i <= a / 2; i++)
			printf("0 %d\n", i);
		for (i = a / 2; i >= 1; i--)
			printf("1 %d\n", i);
		for (i = 2; i <= b / 2; i++)
			printf("1 %d\n", i);
		for (i = b / 2; i >= 1; i--)
			printf("%d 0\n", i);
		return 0;
	}
	return 0;
}

Compilation message

pick.c: In function 'main':
pick.c:6:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |  scanf("%d%d%d%d", &a, &b, &c, &d);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB not a valid stick
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB not a valid stick
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB not a valid stick
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB not a valid stick
3 Halted 0 ms 0 KB -