結果
問題 |
No.1765 While Shining
|
ユーザー |
|
提出日時 | 2021-11-26 23:09:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 415 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 20,112 KB |
最終ジャッジ日時 | 2024-06-29 18:30:47 |
合計ジャッジ時間 | 8,634 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 for j in range(n-1): 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)