結果

問題 No.1121 Social Distancing in Cinema
ユーザー 双六双六
提出日時 2020-07-22 22:46:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 804 bytes
コンパイル時間 1,595 ms
コンパイル使用メモリ 86,572 KB
実行使用メモリ 81,148 KB
最終ジャッジ日時 2023-09-05 02:52:43
合計ジャッジ時間 11,070 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
77,276 KB
testcase_01 AC 110 ms
77,212 KB
testcase_02 AC 110 ms
76,916 KB
testcase_03 AC 111 ms
76,924 KB
testcase_04 AC 109 ms
77,060 KB
testcase_05 AC 110 ms
76,920 KB
testcase_06 AC 109 ms
77,192 KB
testcase_07 AC 108 ms
76,900 KB
testcase_08 AC 108 ms
76,984 KB
testcase_09 AC 110 ms
77,232 KB
testcase_10 AC 111 ms
77,052 KB
testcase_11 AC 108 ms
77,116 KB
testcase_12 AC 110 ms
77,072 KB
testcase_13 AC 112 ms
77,724 KB
testcase_14 AC 117 ms
78,172 KB
testcase_15 AC 117 ms
78,116 KB
testcase_16 AC 127 ms
79,900 KB
testcase_17 AC 152 ms
80,384 KB
testcase_18 AC 174 ms
80,908 KB
testcase_19 AC 178 ms
80,560 KB
testcase_20 AC 120 ms
78,316 KB
testcase_21 AC 121 ms
78,060 KB
testcase_22 AC 118 ms
78,364 KB
testcase_23 AC 119 ms
78,240 KB
testcase_24 AC 115 ms
77,692 KB
testcase_25 AC 140 ms
80,304 KB
testcase_26 AC 143 ms
80,444 KB
testcase_27 AC 120 ms
78,364 KB
testcase_28 AC 173 ms
80,600 KB
testcase_29 AC 140 ms
80,040 KB
testcase_30 AC 135 ms
79,736 KB
testcase_31 AC 178 ms
80,588 KB
testcase_32 AC 168 ms
80,996 KB
testcase_33 AC 142 ms
80,092 KB
testcase_34 AC 139 ms
80,340 KB
testcase_35 AC 172 ms
80,568 KB
testcase_36 AC 178 ms
81,056 KB
testcase_37 AC 136 ms
80,180 KB
testcase_38 AC 141 ms
80,144 KB
testcase_39 AC 172 ms
80,692 KB
testcase_40 AC 129 ms
79,944 KB
testcase_41 AC 123 ms
78,036 KB
testcase_42 AC 179 ms
80,884 KB
testcase_43 AC 176 ms
81,148 KB
testcase_44 AC 178 ms
80,620 KB
testcase_45 AC 181 ms
80,852 KB
testcase_46 AC 180 ms
80,680 KB
testcase_47 AC 109 ms
77,260 KB
testcase_48 AC 108 ms
77,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	table = [[0] * 600 for i in range(600)]
	for i in range(N):
		X, Y = getlist()
		table[X][Y] = i + 1

	for i in range(1, 10):
		for j in range(1, 9):
			val = 0
			B = []
			for p in range(55):
				for q in range(31):
					x1 = i + 10 * p
					y1 = j + 18 * q
					x2 = i + 5 + 10 * p
					y2 = j + 9 + 18 * q
					if table[x1][y1] != 0:
						val += 1
						B.append(table[x1][y1])
					if table[x2][y2] != 0:
						val += 1
						B.append(table[x2][y2])

			if N <= 90 * val:
				print(val)
				print(*B)
				return

if __name__ == '__main__':
	main()
0