結果
問題 |
No.647 明太子
|
ユーザー |
|
提出日時 | 2018-08-01 16:51:21 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 726 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 12,928 KB |
実行使用メモリ | 29,212 KB |
最終ジャッジ日時 | 2024-09-19 16:49:11 |
合計ジャッジ時間 | 8,331 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 10 TLE * 1 -- * 9 |
ソースコード
N = int(input()) ABs = [[int(j) for j in input().split()] for i in range(N)] M = int(input()) XYs = [[int(j) for j in input().split()] for i in range(M)] def be_wanted(A, B, X, Y): if X <= A and B <= Y: return True else: return False def argmax_s(X): tmp = -99999 ind = -1 for i, x in enumerate(X): if tmp < x: tmp = x ind = i res = [i] elif tmp == x: res.append(i) return res gen = [i for i, xy in enumerate(XYs) for ab in ABs if be_wanted(ab[0], ab[1], xy[0], xy[1])] point = [gen.count(i) for i in range(M)] if sum(point) == 0: print(0) else: for i in (argmax_s(point)): print(i+1)