Submission #22874

# Submission time Handle Problem Language Result Execution time Memory
22874 2017-04-30T07:57:48 Z Jongwon Party(#988, gs13105) Polynomial Quine (KRIII5_PQ) C++14
0 / 7
0 ms 1116 KB
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);

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

    return 0;
}

Compilation message

PQ.cpp: In function 'int main()':
PQ.cpp:14:20: 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 Correct 0 ms 1116 KB Output is correct
2 Correct 0 ms 1116 KB Output is correct
3 Incorrect 0 ms 1116 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Incorrect 0 ms 1116 KB Output isn't correct
3 Halted 0 ms 0 KB -