結果
| 問題 |
No.2655 Increasing Strides
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2024-03-01 22:04:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 2,000 ms |
| コード長 | 346 bytes |
| コンパイル時間 | 615 ms |
| コンパイル使用メモリ | 82,984 KB |
| 実行使用メモリ | 62,052 KB |
| 最終ジャッジ日時 | 2024-09-29 13:55:31 |
| 合計ジャッジ時間 | 2,995 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
import sys
input = sys.stdin.readline
YES="Yes";NO="No";pans = lambda x:print(YES if x else NO)
N=int(input())
def solve(lst:list):
# lst.sort()
x=0
while lst:
dx = lst.pop()
if x<=0:
x+=dx
else:
x-=dx
return x==0
pans(solve(list(range(1,N+1,2))) and solve(list(range(2,N+1,2))))
ikoma