結果
| 問題 | No.3527 Minimum Abs Sum |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-05-06 05:59:45 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 441 bytes |
| 記録 | |
| コンパイル時間 | 757 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 61,892 KB |
| 最終ジャッジ日時 | 2026-05-06 06:00:02 |
| 合計ジャッジ時間 | 16,072 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 30 |
ソースコード
import sys
input = sys.stdin.readline
from collections import Counter
mod=10**9+7
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=Counter()
for i in range(N):
a,b=A[i],B[i]
if a==0:
continue
C[a,b]+=a
MAX=max(C.values())
LIST=[]
for c in C:
if C[c]==MAX:
LIST.append(c)
ANS=min(LIST,key=lambda x:x[1]/x[0])
LANS=ANS[1]*pow(ANS[0],mod-2,mod)%mod
print(LANS)
titia