| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
正常格式20行代码 114K 0ms#include <string.h>
int main(){
char d[16384];
memset(d,127,16384);
int mx,my,i=128,p=0,mp[4]={1,128,-1,-128},total,now=-1;
scanf("%d %d",&mx,&my);
for(int i=1;i<mx+1;++i) memset(d+128*i+1,0,my);
total=mx*my;
while(total--){
now=(now+1)%26;
d[i+=mp[p]]=now+'A';
if(d[i+mp[p]]) p=(p+1)&3;
}
for (int y=1;y<=mx;y++) {
for (int x=1;x<=my;x++)
printf(" %c",d[x+(y<<7)]);
printf("\n");
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator