結果
| 問題 | No.1765 While Shining |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-26 23:15:58 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 466 bytes |
| 記録 | |
| コンパイル時間 | 407 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 27,848 KB |
| 最終ジャッジ日時 | 2026-03-19 08:36:01 |
| 合計ジャッジ時間 | 8,696 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 TLE * 1 |
ソースコード
n=int(input())
l=list(map(int,input().split()))
c=0
nl=[]
for i in l:
if i==1:
nl.append(0)
else:
nl.append(1)
ml=l
d=0
K=[]
for i in range(n):
if l[i]==1:
K.append(i)
for j in K:
for i in range(n-1):
if l[j+i]==1 and j+i<n-1:
c+=1
if c%2==1:
l=nl
else:
l=ml
else:
d+=c
c=0
l=ml
break
print(d)