Submission #57430

# Submission time Handle Problem Language Result Execution time Memory
57430 2018-07-15T03:13:07 Z duma3803 None (KOI17_line) C++14
0 / 100
2 ms 376 KB
#include <bits/stdc++.h>

using namespace std;

int n;
int arr[10];

int main() {
    int i;

    scanf("%d",&n);
    for (i=0;i<n;i++) arr[i] = i+1; // arr는 1, 2, 3, 4, ... , n
    do {

        for (i=0;i<n;i++) printf("%d ",arr[i]);
        printf("\n");

    } while(next_permutation(arr,arr+n));

    return 0;
}

Compilation message

line.cpp: In function 'int main()':
line.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -