General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
115267864 Out of competition:
* EasonCookie197
1520C - 10 GNU C++17 Skipped 140 ms 3644 KB 2021-05-05 18:22:09 2021-05-06 16:49:17
 
 
→ Source
#include<iostream>

using namespace std;

int main(){
    int t,n;
    cin>>t;
    while(t--){
        cin>>n;
        if (n==2) cout<<-1<<endl;
        else{
            int now=1;
            for (int i=0;i<n;i++){
                for (int j=0;j<n;j++){
                    cout<<now<<" ";
                    now+=2;
                    if (now>n*n) now=2;
                }
                cout<<endl;
            }
        }
    }
}
 
 
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details