結果
| 問題 |
No.2792 Security Cameras on Young Diagram
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-25 17:26:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 702 bytes |
| コンパイル時間 | 277 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 17,024 KB |
| 最終ジャッジ日時 | 2024-06-25 17:26:04 |
| 合計ジャッジ時間 | 4,336 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)