結果

問題 No.482 あなたの名は
ユーザー hanorverhanorver
提出日時 2017-03-03 22:09:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 7,980 KB
最終ジャッジ日時 2023-09-04 05:55:41
合計ジャッジ時間 4,425 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,820 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 16 ms
7,780 KB
testcase_03 AC 16 ms
7,776 KB
testcase_04 AC 16 ms
7,796 KB
testcase_05 WA -
testcase_06 AC 16 ms
7,780 KB
testcase_07 AC 25 ms
7,784 KB
testcase_08 AC 17 ms
7,964 KB
testcase_09 AC 16 ms
7,908 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 26 ms
7,792 KB
testcase_13 WA -
testcase_14 AC 19 ms
7,788 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:7: SyntaxWarning: invalid decimal literal
  else:print("NO"if b%2else"YES")

ソースコード

diff #

d=lambda:map(int,input().split());a,b=d();c=list(d())
for i in range(b):
 if i+1 not in c:print("NO");break
 e=c.index(i+1);c[i],c[e]=c[e],c[i]
 if e!=i:b-=1
 if b==0:print("YES");break
else:print("NO"if b%2else"YES")
0