| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 339090 | 马圣洁 | 【C4-9】魔方阵 | C++ | Wrong Answer | 0 | 2 MS | 252 KB | 386 | 2025-08-09 20:20:12 |
#include<bits/stdc++.h> using namespace std; int n,a[25][25],d,b,c; int main(){ cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; } } for(int i=1;i<=n;i++){ d+=i; for(int j=1;j<=n;j++){ b+=j; if(i==j) c+=a[i][j]; else if(i+j==n+1) c+=a[i][j]; } } if(d==b&&b==c){ cout<<"Yes"; } else{ cout<<"No"; } return 0; }