結果
| 問題 | No.178 美しいWhitespace (1) |
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-06-10 04:56:48 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 98 ms / 2,000 ms |
| + 562µs | |
| コード長 | 397 bytes |
| 記録 | |
| コンパイル時間 | 2,165 ms |
| コンパイル使用メモリ | 21,340 KB |
| 実行使用メモリ | 15,788 KB |
| 最終ジャッジ日時 | 2026-09-02 20:15:33 |
| 合計ジャッジ時間 | 4,363 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 |
ソースコード
N=int (input())
A=[[int (i) for i in input ().split()]for i in range (N)]
nd=0
A[0][1]=A[0][1]*4
A[0][0]+=A[0][1]
M=A[0][0]
i=1
while nd==0 and i<N:
A[i][1]=A[i][1]*4
A[i][0]+=A[i][1]
d=A[i][0]-A[i-1][0]
if d%2!=0:
nd=1
print (-1)
if M<A[i][0]:
M=A[i][0]
i+=1
if nd==0:
di=0
for i in range(N):
di+=M-A[i][0]
di//=2
print (di)
rocoder