結果

問題 No.482 あなたの名は
ユーザー hanorverhanorver
提出日時 2017-03-03 22:14:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 200 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 34,344 KB
最終ジャッジ日時 2023-09-04 06:14:46
合計ジャッジ時間 5,041 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,772 KB
testcase_01 AC 17 ms
7,840 KB
testcase_02 AC 17 ms
7,900 KB
testcase_03 AC 17 ms
7,968 KB
testcase_04 AC 18 ms
7,968 KB
testcase_05 AC 17 ms
7,852 KB
testcase_06 AC 17 ms
7,828 KB
testcase_07 AC 31 ms
7,864 KB
testcase_08 AC 24 ms
7,792 KB
testcase_09 AC 16 ms
7,868 KB
testcase_10 AC 23 ms
7,912 KB
testcase_11 AC 26 ms
7,768 KB
testcase_12 AC 30 ms
7,828 KB
testcase_13 AC 22 ms
7,808 KB
testcase_14 AC 21 ms
7,820 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:6: SyntaxWarning: invalid decimal literal
  else:print("NO"if b%2or b<0else"YES")
Main.py:6: SyntaxWarning: invalid decimal literal
  else:print("NO"if b%2or b<0else"YES")

ソースコード

diff #

d=lambda:map(int,input().split());a,b=d();c=list(d())
for i in range(len(c)):
 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
else:print("NO"if b%2or b<0else"YES")
0