Submission #71689509


Source Code Expand

n, m = map(int,input().split())
masume = [[0] * (n+1) for i in range(n+1)]
count = 0

for i in range(m):
    r, c = map(int,input().split())
    if masume[r][c] == 0 and masume[r+1][c] == 0 and masume[r][c+1] == 0 and masume[r+1][c+1] == 0:
        masume[r][c] += 1
        masume[r+1][c] += 1
        masume[r][c+1] += 1
        masume[r+1][c+1] += 1
        count += 1
    else:
        continue
print(count)

Submission Info

Submission Time
Task C - 2x2 Placing
User hayahaya11
Language Python (PyPy 3.11-v7.3.20)
Score 0
Code Size 427 Byte
Status RE
Exec Time 755 ms
Memory > 1048576 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
RE × 1
AC × 12
MLE × 3
RE × 21
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 02_random2_04.txt, 02_random2_05.txt, 02_random2_06.txt, 02_random2_07.txt, 02_random2_08.txt, 02_random2_09.txt, 02_random2_10.txt, 02_random2_11.txt, 02_random2_12.txt, 02_random2_13.txt, 02_random2_14.txt, 02_random2_15.txt, 03_handmade_00.txt, 03_handmade_01.txt, 03_handmade_02.txt, 03_handmade_03.txt, 03_handmade_04.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 57 ms 79936 KiB
00_sample_01.txt RE 144 ms 110780 KiB
00_sample_02.txt AC 57 ms 79808 KiB
01_random_00.txt AC 148 ms 108804 KiB
01_random_01.txt AC 250 ms 108884 KiB
01_random_02.txt AC 231 ms 109004 KiB
01_random_03.txt AC 267 ms 108860 KiB
01_random_04.txt AC 148 ms 114312 KiB
01_random_05.txt AC 288 ms 109112 KiB
01_random_06.txt AC 280 ms 190892 KiB
01_random_07.txt AC 439 ms 254812 KiB
01_random_08.txt AC 257 ms 123172 KiB
01_random_09.txt MLE 755 ms > 1048576 KiB
01_random_10.txt MLE 616 ms > 1048576 KiB
01_random_11.txt MLE 615 ms > 1048576 KiB
02_random2_00.txt RE 310 ms 110792 KiB
02_random2_01.txt RE 145 ms 110880 KiB
02_random2_02.txt RE 148 ms 110792 KiB
02_random2_03.txt RE 144 ms 110808 KiB
02_random2_04.txt RE 146 ms 110624 KiB
02_random2_05.txt RE 145 ms 110792 KiB
02_random2_06.txt RE 144 ms 110896 KiB
02_random2_07.txt RE 145 ms 111216 KiB
02_random2_08.txt RE 144 ms 110800 KiB
02_random2_09.txt RE 147 ms 110812 KiB
02_random2_10.txt RE 145 ms 110888 KiB
02_random2_11.txt RE 144 ms 110816 KiB
02_random2_12.txt RE 147 ms 110768 KiB
02_random2_13.txt RE 145 ms 110784 KiB
02_random2_14.txt RE 147 ms 110784 KiB
02_random2_15.txt RE 146 ms 110792 KiB
03_handmade_00.txt AC 252 ms 108796 KiB
03_handmade_01.txt RE 144 ms 110964 KiB
03_handmade_02.txt RE 145 ms 110836 KiB
03_handmade_03.txt RE 145 ms 110752 KiB
03_handmade_04.txt RE 145 ms 110744 KiB