// Isso tá claramente errado
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
int n;
cin >> n;
if (n%2 == 0)
{
cout << "-1\n";
return 0;
}
int d = 0;
for (int i = 1; i <= n; i++)
{
cout << ++d;
for (int j = 2; j <= n; j++)
cout << " " << ++d;
cout << "\n";
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
376 KB |
Integer -1 violates the range [0, 1000000000] |
2 |
Correct |
2 ms |
488 KB |
Output is correct |
3 |
Incorrect |
2 ms |
532 KB |
Integer -1 violates the range [0, 1000000000] |
4 |
Correct |
3 ms |
532 KB |
Output is correct |
5 |
Incorrect |
2 ms |
532 KB |
Integer -1 violates the range [0, 1000000000] |
6 |
Incorrect |
2 ms |
532 KB |
Integer -1 violates the range [0, 1000000000] |
7 |
Incorrect |
2 ms |
548 KB |
Integer -1 violates the range [0, 1000000000] |
8 |
Incorrect |
2 ms |
548 KB |
Integer -1 violates the range [0, 1000000000] |
9 |
Incorrect |
2 ms |
548 KB |
Integer -1 violates the range [0, 1000000000] |
10 |
Incorrect |
3 ms |
568 KB |
Integer -1 violates the range [0, 1000000000] |