QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#52842 | #1806. Character Grid | Tain_U# | AC ✓ | 2ms | 3724kb | C++ | 438b | 2022-10-04 15:30:26 | 2022-10-04 15:30:29 |
Judging History
answer
#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int a[14][14];
int main(){
for(int i=0;i<13;i++){
for(int j=0;j<=i;j++){
int x=i-j,y=j;
a[x][y]=(i*(i+1)/2+j)%26;
a[12-y][12-x]=a[x][y];
}
}
printf("13\n");
for(int i=0;i<13;i++){
for(int j=0;j<13;j++)printf("%c",a[i][j]+'a');printf("\n");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3724kb
input:
output:
13 acfjoubjscnzm beintairbmylz dhmszhqalxkyn glrygpzkwjxmc kqxfoyjviwlbs pwenxiuhvkarj vdmwhtgujzqib clvgsftiyphau kufreshxogzto teqdrgwnfysnj dpcqfvmexrmif obpeuldwqlhec aodtkcvpkgdba
result:
ok accepted