結果

問題 No.1121 Social Distancing in Cinema
ユーザー 双六
提出日時 2020-07-22 22:46:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 804 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 79,744 KB
最終ジャッジ日時 2024-06-22 23:39:48
合計ジャッジ時間 6,520 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 47
権限があれば一括ダウンロードができます

ソースコード

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