Submission #33262353


Source Code Expand

#include <bits/stdc++.h>

int n, k;

int main() {
    scanf("%d%d", &n, &k);
    if (k > n / 2) {
        printf("-1\n");
        return 0;
    }
    for (int i = 1; i <= n - k; i++) {
        printf("%d ", i + k);
    }
    for (int i = 1; i <= k; i++) {
        printf("%d ", i);
    }
    return 0;
}

Submission Info

Submission Time
Task C - K Derangement
User siyuan
Language C++ (GCC 9.2.1)
Score 0
Code Size 320 Byte
Status WA
Exec Time 34 ms
Memory 3812 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
    6 |     scanf("%d%d", &n, &k);
      |     ~~~~~^~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 600
Status
AC × 3
AC × 42
WA × 55
Set Name Test Cases
Sample 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt
All 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt, 02_small_01.txt, 02_small_02.txt, 02_small_03.txt, 02_small_04.txt, 02_small_05.txt, 02_small_06.txt, 02_small_07.txt, 02_small_08.txt, 02_small_09.txt, 02_small_10.txt, 02_small_11.txt, 02_small_12.txt, 02_small_13.txt, 02_small_14.txt, 02_small_15.txt, 02_small_16.txt, 02_small_17.txt, 02_small_18.txt, 02_small_19.txt, 02_small_20.txt, 02_small_21.txt, 02_small_22.txt, 02_small_23.txt, 02_small_24.txt, 02_small_25.txt, 02_small_26.txt, 02_small_27.txt, 02_small_28.txt, 02_small_29.txt, 02_small_30.txt, 02_small_31.txt, 02_small_32.txt, 02_small_33.txt, 02_small_34.txt, 02_small_35.txt, 02_small_36.txt, 02_small_37.txt, 02_small_38.txt, 02_small_39.txt, 02_small_40.txt, 02_small_41.txt, 02_small_42.txt, 02_small_43.txt, 02_small_44.txt, 02_small_45.txt, 02_small_46.txt, 02_small_47.txt, 02_small_48.txt, 02_small_49.txt, 02_small_50.txt, 02_small_51.txt, 02_small_52.txt, 02_small_53.txt, 02_small_54.txt, 03_rand_01.txt, 03_rand_02.txt, 03_rand_03.txt, 03_rand_04.txt, 03_rand_05.txt, 03_rand_06.txt, 03_rand_07.txt, 03_rand_08.txt, 03_rand_09.txt, 03_rand_10.txt, 03_rand_11.txt, 03_rand_12.txt, 03_rand_13.txt, 03_rand_14.txt, 03_rand_15.txt, 03_rand_16.txt, 03_rand_17.txt, 03_rand_18.txt, 03_rand_19.txt, 03_rand_20.txt, 03_rand_21.txt, 03_rand_22.txt, 03_rand_23.txt, 03_rand_24.txt, 03_rand_25.txt, 03_rand_26.txt, 03_rand_27.txt, 03_rand_28.txt, 03_rand_29.txt, 03_rand_30.txt, 03_rand_31.txt, 03_rand_32.txt, 03_rand_33.txt, 03_rand_34.txt, 03_rand_35.txt, 03_rand_36.txt, 03_rand_37.txt, 03_rand_38.txt, 03_rand_39.txt, 03_rand_40.txt
Case Name Status Exec Time Memory
01_sample_01.txt AC 15 ms 3580 KiB
01_sample_02.txt AC 7 ms 3612 KiB
01_sample_03.txt AC 2 ms 3480 KiB
02_small_01.txt AC 2 ms 3552 KiB
02_small_02.txt AC 2 ms 3708 KiB
02_small_03.txt WA 2 ms 3564 KiB
02_small_04.txt WA 2 ms 3688 KiB
02_small_05.txt WA 2 ms 3704 KiB
02_small_06.txt WA 2 ms 3616 KiB
02_small_07.txt AC 2 ms 3616 KiB
02_small_08.txt AC 2 ms 3708 KiB
02_small_09.txt AC 2 ms 3700 KiB
02_small_10.txt WA 6 ms 3744 KiB
02_small_11.txt WA 2 ms 3692 KiB
02_small_12.txt WA 2 ms 3652 KiB
02_small_13.txt WA 2 ms 3700 KiB
02_small_14.txt WA 2 ms 3796 KiB
02_small_15.txt WA 2 ms 3688 KiB
02_small_16.txt WA 2 ms 3708 KiB
02_small_17.txt WA 3 ms 3744 KiB
02_small_18.txt AC 2 ms 3656 KiB
02_small_19.txt AC 2 ms 3740 KiB
02_small_20.txt AC 2 ms 3688 KiB
02_small_21.txt AC 2 ms 3696 KiB
02_small_22.txt WA 2 ms 3796 KiB
02_small_23.txt WA 3 ms 3692 KiB
02_small_24.txt WA 2 ms 3652 KiB
02_small_25.txt WA 1 ms 3704 KiB
02_small_26.txt WA 2 ms 3800 KiB
02_small_27.txt WA 2 ms 3812 KiB
02_small_28.txt WA 2 ms 3580 KiB
02_small_29.txt WA 2 ms 3812 KiB
02_small_30.txt WA 2 ms 3692 KiB
02_small_31.txt WA 2 ms 3700 KiB
02_small_32.txt WA 2 ms 3692 KiB
02_small_33.txt WA 2 ms 3804 KiB
02_small_34.txt AC 2 ms 3796 KiB
02_small_35.txt AC 2 ms 3688 KiB
02_small_36.txt AC 3 ms 3608 KiB
02_small_37.txt AC 2 ms 3656 KiB
02_small_38.txt AC 2 ms 3812 KiB
02_small_39.txt WA 2 ms 3608 KiB
02_small_40.txt WA 3 ms 3808 KiB
02_small_41.txt WA 2 ms 3744 KiB
02_small_42.txt WA 2 ms 3740 KiB
02_small_43.txt WA 1 ms 3700 KiB
02_small_44.txt WA 2 ms 3708 KiB
02_small_45.txt WA 2 ms 3700 KiB
02_small_46.txt WA 2 ms 3740 KiB
02_small_47.txt WA 2 ms 3700 KiB
02_small_48.txt WA 2 ms 3700 KiB
02_small_49.txt WA 1 ms 3704 KiB
02_small_50.txt WA 1 ms 3744 KiB
02_small_51.txt WA 2 ms 3584 KiB
02_small_52.txt WA 2 ms 3700 KiB
02_small_53.txt WA 2 ms 3704 KiB
02_small_54.txt WA 2 ms 3552 KiB
03_rand_01.txt WA 20 ms 3812 KiB
03_rand_02.txt AC 5 ms 3616 KiB
03_rand_03.txt WA 9 ms 3584 KiB
03_rand_04.txt WA 26 ms 3688 KiB
03_rand_05.txt AC 4 ms 3744 KiB
03_rand_06.txt AC 2 ms 3636 KiB
03_rand_07.txt AC 2 ms 3520 KiB
03_rand_08.txt WA 30 ms 3704 KiB
03_rand_09.txt WA 8 ms 3580 KiB
03_rand_10.txt AC 25 ms 3692 KiB
03_rand_11.txt WA 19 ms 3704 KiB
03_rand_12.txt AC 15 ms 3800 KiB
03_rand_13.txt AC 5 ms 3628 KiB
03_rand_14.txt WA 23 ms 3688 KiB
03_rand_15.txt AC 6 ms 3492 KiB
03_rand_16.txt AC 11 ms 3584 KiB
03_rand_17.txt WA 15 ms 3560 KiB
03_rand_18.txt AC 4 ms 3516 KiB
03_rand_19.txt AC 10 ms 3800 KiB
03_rand_20.txt AC 4 ms 3488 KiB
03_rand_21.txt AC 3 ms 3588 KiB
03_rand_22.txt AC 2 ms 3516 KiB
03_rand_23.txt AC 2 ms 3644 KiB
03_rand_24.txt AC 34 ms 3800 KiB
03_rand_25.txt WA 12 ms 3800 KiB
03_rand_26.txt AC 3 ms 3644 KiB
03_rand_27.txt WA 19 ms 3608 KiB
03_rand_28.txt AC 7 ms 3624 KiB
03_rand_29.txt AC 2 ms 3612 KiB
03_rand_30.txt WA 18 ms 3608 KiB
03_rand_31.txt AC 4 ms 3484 KiB
03_rand_32.txt WA 18 ms 3580 KiB
03_rand_33.txt AC 6 ms 3488 KiB
03_rand_34.txt WA 25 ms 3708 KiB
03_rand_35.txt AC 3 ms 3488 KiB
03_rand_36.txt AC 31 ms 3608 KiB
03_rand_37.txt WA 30 ms 3704 KiB
03_rand_38.txt WA 26 ms 3708 KiB
03_rand_39.txt AC 4 ms 3516 KiB
03_rand_40.txt AC 1 ms 3748 KiB