結果

問題 No.99 ジャンピング駒
ユーザー a_tena_ten
提出日時 2016-03-28 13:31:00
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 218 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 15,176 KB
最終ジャッジ日時 2024-04-10 04:36:40
合計ジャッジ時間 1,937 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
15,048 KB
testcase_01 AC 120 ms
15,052 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding:utf-8

N=input()
X=map(int,raw_input().split())

X.sort()

s=[X[0]]
for i in range(1,N):
	if X[i]-s[i-1]==2:
		s.append(X[i])
	else:
		s.append(0)

if N%2==0:
	if X==s:
		print N
	else:
		print 0
else:
	print 1
0