Submission #1800774


Source Code Expand

#include <stdio.h>

int card[7] = {0, 1, 2, 3, 4, 5, 6};

void swap(int *a, int *b)
{
    int tmp = *a;
    *a = *b;
    *b = tmp;
}

int main(int argc, char const *argv[])
{
    int n;
    scanf("%d", &n);

    for (int i = 0; i < n; ++i) {
        int mod = i % 5;
        swap(&card[mod+1], &card[mod+2]);
    }
    for (int i = 1; i <= 6; ++i) {
        printf("%d", card[i]);
    }
    puts("\n");
    return 0;
}

Submission Info

Submission Time
Task C - 入れ替え
User kusocodesensei
Language C (GCC 5.4.1)
Score 30
Code Size 443 Byte
Status TLE
Exec Time 2103 ms
Memory 256 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:15:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
     ^

Judge Result

Set Name Subtask1 Subtask2
Score / Max Score 30 / 30 0 / 70
Status
AC × 13
AC × 23
TLE × 4
Set Name Test Cases
Subtask1 SubTask1/00_sample_00.txt, SubTask1/00_sample_01.txt, SubTask1/00_sample_02.txt, SubTask1/rand_19.txt, SubTask1/rand_2.txt, SubTask1/rand_25.txt, SubTask1/rand_27.txt, SubTask1/rand_33.txt, SubTask1/rand_35.txt, SubTask1/rand_4.txt, SubTask1/rand_44.txt, SubTask1/rand_48.txt, SubTask1/rand_8.txt
Subtask2 SubTask2/00_sample_03.txt, SubTask2/max_case.txt, SubTask2/rand_120009641.txt, SubTask2/rand_134230520.txt, SubTask2/rand_136939465.txt, SubTask2/rand_200732473.txt, SubTask2/rand_211796835.txt, SubTask2/rand_312330341.txt, SubTask2/rand_377341731.txt, SubTask2/rand_384611280.txt, SubTask2/rand_386098102.txt, SubTask2/rand_399010727.txt, SubTask2/rand_409627453.txt, SubTask2/rand_416537730.txt, SubTask2/rand_425486442.txt, SubTask2/rand_493135174.txt, SubTask2/rand_573105326.txt, SubTask2/rand_62794810.txt, SubTask2/rand_649471654.txt, SubTask2/rand_693017484.txt, SubTask2/rand_729197057.txt, SubTask2/rand_759630883.txt, SubTask2/rand_823752210.txt, SubTask2/rand_830399384.txt, SubTask2/rand_893242387.txt, SubTask2/rand_935005824.txt, SubTask2/rand_989703310.txt
Case Name Status Exec Time Memory
SubTask1/00_sample_00.txt AC 1 ms 128 KB
SubTask1/00_sample_01.txt AC 1 ms 128 KB
SubTask1/00_sample_02.txt AC 1 ms 128 KB
SubTask1/rand_19.txt AC 1 ms 128 KB
SubTask1/rand_2.txt AC 1 ms 128 KB
SubTask1/rand_25.txt AC 1 ms 128 KB
SubTask1/rand_27.txt AC 1 ms 128 KB
SubTask1/rand_33.txt AC 1 ms 128 KB
SubTask1/rand_35.txt AC 1 ms 128 KB
SubTask1/rand_4.txt AC 1 ms 128 KB
SubTask1/rand_44.txt AC 1 ms 128 KB
SubTask1/rand_48.txt AC 1 ms 128 KB
SubTask1/rand_8.txt AC 1 ms 128 KB
SubTask2/00_sample_03.txt AC 227 ms 128 KB
SubTask2/max_case.txt TLE 2103 ms 128 KB
SubTask2/rand_120009641.txt AC 272 ms 128 KB
SubTask2/rand_134230520.txt AC 305 ms 128 KB
SubTask2/rand_136939465.txt AC 311 ms 128 KB
SubTask2/rand_200732473.txt AC 455 ms 256 KB
SubTask2/rand_211796835.txt AC 480 ms 128 KB
SubTask2/rand_312330341.txt AC 708 ms 128 KB
SubTask2/rand_377341731.txt AC 855 ms 128 KB
SubTask2/rand_384611280.txt AC 871 ms 128 KB
SubTask2/rand_386098102.txt AC 875 ms 128 KB
SubTask2/rand_399010727.txt AC 904 ms 128 KB
SubTask2/rand_409627453.txt AC 928 ms 128 KB
SubTask2/rand_416537730.txt AC 943 ms 128 KB
SubTask2/rand_425486442.txt AC 963 ms 128 KB
SubTask2/rand_493135174.txt AC 1117 ms 256 KB
SubTask2/rand_573105326.txt AC 1298 ms 128 KB
SubTask2/rand_62794810.txt AC 143 ms 128 KB
SubTask2/rand_649471654.txt AC 1470 ms 128 KB
SubTask2/rand_693017484.txt AC 1569 ms 128 KB
SubTask2/rand_729197057.txt AC 1651 ms 128 KB
SubTask2/rand_759630883.txt AC 1720 ms 128 KB
SubTask2/rand_823752210.txt AC 1865 ms 256 KB
SubTask2/rand_830399384.txt AC 1880 ms 128 KB
SubTask2/rand_893242387.txt TLE 2022 ms 128 KB
SubTask2/rand_935005824.txt TLE 2103 ms 128 KB
SubTask2/rand_989703310.txt TLE 2103 ms 128 KB