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

Re:拉了半天,终于出来了

Posted by huicpc39 at 2011-03-01 08:19:02 on Problem 3752
In Reply To:拉了半天,终于出来了 Posted by:wy54224 at 2011-01-28 16:32:45
#include <stdio.h>
int main(){
int m,n,i,j,c,s;
scanf("%d%d",&m,&n);
for(i=0;i<m;++i){
   for(j=0;j<n;++j){
      c=i<j?i:j;
      c=c>m-1-i?m-1-i:c;
      c=c>n-1-j?n-1-j:c;
      s=2*c*(m+n-2*c);
      if(i==c)s+=j-c;
      else if(n-1-j==c)s+=n-3*c+i-1;
      else if(m-1-i==c)s+=m+2*n-5*c-3-j;
      else s+=2*(m+n)-7*c-4-i;
      printf("   %c",'A'+(s%26));}
   printf("\n");}
return 0;}

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