結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,972 KB
testcase_01 AC 15 ms
7,876 KB
testcase_02 AC 16 ms
7,964 KB
testcase_03 AC 16 ms
7,788 KB
testcase_04 AC 15 ms
7,916 KB
testcase_05 AC 14 ms
7,832 KB
testcase_06 AC 15 ms
7,996 KB
testcase_07 AC 16 ms
7,972 KB
testcase_08 WA -
testcase_09 AC 15 ms
7,820 KB
testcase_10 AC 16 ms
7,968 KB
testcase_11 AC 16 ms
7,964 KB
testcase_12 WA -
testcase_13 AC 16 ms
7,816 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 135 ms
29,932 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 143 ms
30,000 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 138 ms
29,972 KB
testcase_24 AC 140 ms
29,960 KB
testcase_25 AC 143 ms
30,024 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 142 ms
29,852 KB
testcase_29 AC 144 ms
29,864 KB
testcase_30 AC 16 ms
7,956 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:4: SyntaxWarning: invalid decimal literal
  else:print("NO"if b%2or b<0else"YES")
Main.py:4: 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 c[i]!=i+1:b-=1;c[c[i]-1],c[i]=c[i],c[c[i]-1]
else:print("NO"if b%2or b<0else"YES")
0