Submission #63495018


Source Code Expand

def read():
    return int(input())

def reads():
    return [int(s) for s in input().split()]

def yn(x):
    print('Yes' if x else 'No')


def solve():
    n = read()
    a = reads()

    yn(any(a[i] == a[i + 1] and a[i + 1] == a[i + 2] for i in range(n - 2)))


if __name__ == '__main__':
    solve()

Submission Info

Submission Time
Task A - Triple Four
User prabowo
Language Python (PyPy 3.10-v7.3.12)
Score 100
Code Size 323 Byte
Status AC
Exec Time 59 ms
Memory 76736 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 5
AC × 20
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 56 ms 76440 KiB
00_sample_01.txt AC 57 ms 76500 KiB
00_sample_02.txt AC 57 ms 76424 KiB
00_sample_03.txt AC 57 ms 76280 KiB
00_sample_04.txt AC 58 ms 76272 KiB
01_handmade_00.txt AC 58 ms 76320 KiB
01_handmade_01.txt AC 57 ms 76276 KiB
01_handmade_02.txt AC 59 ms 76468 KiB
01_handmade_03.txt AC 58 ms 76736 KiB
01_handmade_04.txt AC 58 ms 76324 KiB
02_random_00.txt AC 57 ms 76684 KiB
02_random_01.txt AC 58 ms 76584 KiB
02_random_02.txt AC 57 ms 76444 KiB
02_random_03.txt AC 57 ms 76576 KiB
02_random_04.txt AC 57 ms 76224 KiB
02_random_05.txt AC 57 ms 76424 KiB
02_random_06.txt AC 57 ms 76212 KiB
02_random_07.txt AC 57 ms 76440 KiB
02_random_08.txt AC 57 ms 76276 KiB
02_random_09.txt AC 57 ms 76484 KiB