結果

問題 No.482 あなたの名は
ユーザー はむ吉🐹はむ吉🐹
提出日時 2017-02-10 22:56:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 336 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 23,436 KB
最終ジャッジ日時 2023-08-27 23:15:23
合計ジャッジ時間 3,337 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,852 KB
testcase_01 AC 16 ms
7,880 KB
testcase_02 AC 16 ms
7,852 KB
testcase_03 WA -
testcase_04 AC 17 ms
7,768 KB
testcase_05 WA -
testcase_06 AC 15 ms
7,824 KB
testcase_07 WA -
testcase_08 AC 20 ms
7,856 KB
testcase_09 AC 15 ms
7,956 KB
testcase_10 AC 15 ms
7,908 KB
testcase_11 AC 16 ms
7,756 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 16 ms
7,836 KB
testcase_15 AC 94 ms
23,204 KB
testcase_16 AC 93 ms
23,236 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 94 ms
23,236 KB
testcase_20 WA -
testcase_21 AC 94 ms
23,300 KB
testcase_22 AC 94 ms
23,252 KB
testcase_23 AC 94 ms
23,368 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 93 ms
23,252 KB
testcase_28 AC 94 ms
23,200 KB
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3


def judge(n, k, ds):
    num_diffs = sum(i != j for i, j in zip(range(1, n + 1), ds))
    return (num_diffs // 2) % k == 0


def main():
    n, k = (int(x) for x in input().split())
    ds = (int(x) for x in input().split())
    print("YES" if judge(n, k, ds) else "NO")


if __name__ == '__main__':
    main()
0