Submission #17148488


Source Code Expand

#include <bits/stdc++.h>

const int N = 1e2;

int n, a[N + 5][2];

int main() {
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		scanf("%d%d", &a[i][0], &a[i][1]);
	}
	for (int i = 1; i + 2 <= n; i++) {
		if (a[i][0] == a[i][1] && a[i + 1][0] == a[i + 1][1] && a[i + 2][0] == a[i + 2][1]) {
			printf("Yes\n");
			return 0;
		}
	}
	printf("No\n");
	return 0;
}

Submission Info

Submission Time
Task B - Go to Jail
User siyuan
Language C++ (GCC 9.2.1)
Score 200
Code Size 382 Byte
Status AC
Exec Time 6 ms
Memory 3748 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
    8 |  scanf("%d", &n);
      |  ~~~~~^~~~~~~~~~
./Main.cpp:10:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   10 |   scanf("%d%d", &a[i][0], &a[i][1]);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 18
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hamd_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hamd_01.txt AC 6 ms 3496 KiB
hand_02.txt AC 2 ms 3620 KiB
hand_03.txt AC 2 ms 3632 KiB
hand_04.txt AC 3 ms 3636 KiB
hand_05.txt AC 2 ms 3584 KiB
random_01.txt AC 2 ms 3492 KiB
random_02.txt AC 2 ms 3624 KiB
random_03.txt AC 2 ms 3632 KiB
random_04.txt AC 1 ms 3588 KiB
random_05.txt AC 2 ms 3620 KiB
random_06.txt AC 2 ms 3504 KiB
random_07.txt AC 3 ms 3492 KiB
random_08.txt AC 2 ms 3636 KiB
random_09.txt AC 2 ms 3748 KiB
random_10.txt AC 2 ms 3628 KiB
sample_01.txt AC 2 ms 3496 KiB
sample_02.txt AC 3 ms 3632 KiB
sample_03.txt AC 3 ms 3632 KiB