結果
問題 |
No.1765 While Shining
|
ユーザー |
|
提出日時 | 2021-11-26 23:15:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 24,904 KB |
最終ジャッジ日時 | 2024-06-29 18:32:35 |
合計ジャッジ時間 | 7,581 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)