結果
| 問題 |
No.647 明太子
|
| ユーザー |
takakin
|
| 提出日時 | 2020-04-24 01:08:04 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 555 bytes |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 13,648 KB |
| 最終ジャッジ日時 | 2024-10-14 09:35:51 |
| 合計ジャッジ時間 | 21,436 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 TLE * 1 -- * 1 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
AB=[]
XY=[]
append=AB.append
for _ in range(n):
a,b=map(int,input().split())
append(a*10**9+b)
append=XY.append
m=int(input())
for _ in range(m):
a,b=map(int,input().split())
append(a*10**9+b)
def f(a,b):
if a//10**9>=b//10**9 and a%10**9<=b%10**9:
return True
else:
return False
Ans=[0]*m
for i in range(n):
for j in range(m):
if f(AB[i],XY[j]):
Ans[j]+=1
ma=max(Ans)
if ma!=0:
for i in range(m):
if Ans[i]==ma:
print(i+1)
else:
print(0)
takakin