結果
問題 |
No.2792 Security Cameras on Young Diagram
|
ユーザー |
|
提出日時 | 2024-06-25 17:26:35 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 702 bytes |
コンパイル時間 | 327 ms |
コンパイル使用メモリ | 82,180 KB |
実行使用メモリ | 235,032 KB |
最終ジャッジ日時 | 2024-06-25 17:26:39 |
合計ジャッジ時間 | 3,892 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 20 |
ソースコード
import copy C = 0 fla = 0 def migi(M): M.pop(0) return(M) def sita(M): L = [] for i in M: if i - 1 > 0: L.append(i-1) return(L) def migisita(M): org = copy.deepcopy(M) global C global fla if len(M): fla = 1 M = migi(M) if len(M): migisita(M) if len(M) ==0: if fla == 1: C += 1 fla = 0 M = copy.deepcopy(org) if len(M): fla = 1 M = sita(M) if len(M): migisita(M) if len(M) ==0: if fla == 1: C += 1 fla = 0 N = int(input()) M = list(map(int, input().split())) migisita(M) print(C)