結果

問題 No.1687 What the Heck?
ユーザー Mik10
提出日時 2021-10-06 14:18:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 82,284 KB
実行使用メモリ 102,780 KB
最終ジャッジ日時 2024-07-23 02:53:00
合計ジャッジ時間 2,388 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 15 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
suzu = list(map(int, input().split()))
draw = 0
pt = sum(range(n)) + n
for i in range(n, 1, -1):
    smax = suzu.index(i) + 1
    smax2 = suzu.index(i-1) + 1
    if smax2 <= smax/2:
        draw += smax
        continue
    else:
        pt -= (smax*2 + draw)
        break
print (pt)
0