Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

正常格式20行代码 114K 0ms

Posted by 602651749 at 2019-09-12 20:24:52 on Problem 3752
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator