結果
問題 | No.1121 Social Distancing in Cinema |
ユーザー |
![]() |
提出日時 | 2020-07-22 22:57:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 595 ms / 2,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 72,832 KB |
最終ジャッジ日時 | 2024-06-23 00:05:12 |
合計ジャッジ時間 | 28,097 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 47 |
ソースコード
import sys import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(readline()) XY = np.array(read().split(), np.int64) X, Y = XY[::2], XY[1::2] key1 = X % 9 key2 = Y % 5 key3 = ((X // 9) + (Y // 5)) & 1 key = key1 * 10 + key2 * 2 + key3 most_freq = np.bincount(key).argmax() ans = np.where(key == most_freq)[0] + 1 print(len(ans)) print('\n'.join(map(str, ans.tolist())))