General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
187431074 Practice:
DaiRuiChen007
1734E - 43 C++14 (GCC 6-32) Accepted 31 ms 492 KB 2022-12-31 12:52:11 2022-12-31 12:52:11
→ Source
// LUOGU_RID: 98371300
#include<bits/stdc++.h>
using namespace std;
const int MAXN=350;
int a[MAXN][MAXN];
signed main() {
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;++i) {
		scanf("%d",&a[i][i]);
		for(int j=i,k=a[i][i];j>=0;--j,k=(k+n-i)%n) a[j][i]=k;
		for(int j=i,k=a[i][i];j<n;++j,k=(k+i)%n) a[j][i]=k;
	}
	for(int i=0;i<n;++i) {
		for(int j=0;j<n;++j) {
			printf("%d ",a[i][j]);
		}
		puts("");
	}
	return 0;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details