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

why OLE? for the tailing new line???

Posted by qiqilrq at 2008-04-04 11:31:13 on Problem 3566
char unb[50][50][50];
int n;

char get_ch(int x)
{
    if(x<26) return x+'a';
    x-=26;   return x+'A';
}

int main(){
    scanf("%d",&n);
    
    int i,j,k;
    for(i=0;i<n;i++)
        memset(unb[i], get_ch(i), sizeof(unb[0]));
    for(i=0;i<n;i++){
        char ch=get_ch(i);
        for(k=0;k<n;k++)
            unb[k][i][i]=ch;
    }
    printf("%d 50 50\n",n);
    for(i=0;i<n;i++){
        for(j=0;j<50;j++, puts("")){
            for(k=0;k<50;k++)
                putchar(unb[i][j][k]);
        }
        puts("");
    }
}

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