답안 #94144

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
94144 2019-01-16T11:43:23 Z ekrem Prosjecni (COCI16_prosjecni) C++
24 / 120
2 ms 380 KB
#include <bits/stdc++.h>
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define N 1000005
using namespace std;

int n;

int main() {
	// freopen("in.txt", "r", stdin);
	// freopen("out.txt", "w", stdout);
	scanf("%d",&n);
	if(n % 2 == 0){
		puts("-1");
		return 0;
	}
	for(int i = 1; i <= n; i++,puts(""))
		for(int j = 1; j <= n; j++)
			printf("%d ", (i - 1)*n + j);
	return 0;
}

Compilation message

prosjecni.cpp: In function 'int main()':
prosjecni.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ~~~~~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB Integer -1 violates the range [0, 1000000000]
2 Correct 1 ms 376 KB Output is correct
3 Incorrect 2 ms 256 KB Integer -1 violates the range [0, 1000000000]
4 Correct 2 ms 380 KB Output is correct
5 Incorrect 2 ms 376 KB Integer -1 violates the range [0, 1000000000]
6 Incorrect 1 ms 256 KB Integer -1 violates the range [0, 1000000000]
7 Incorrect 2 ms 256 KB Integer -1 violates the range [0, 1000000000]
8 Incorrect 1 ms 256 KB Integer -1 violates the range [0, 1000000000]
9 Incorrect 2 ms 376 KB Integer -1 violates the range [0, 1000000000]
10 Incorrect 2 ms 376 KB Integer -1 violates the range [0, 1000000000]