F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_33380737_334.cpp: In function 'int main()':
0_0_33380737_334.cpp:5:118: error: expected '}' at end of input
 {    int a,i,j,n=1;    char b,c;    while (scanf("%d %c %c",&a,&b,&c)!=EOF)    {        if (n!=1)        printf("\n");//关键就这一句处理 ,格式对了其他的就都很好解决。        memset(d,0,sizeof(d));        if (a==1)            printf("%c\n",b);        else {        if (((a+1)/2)%2!=0)        {            for(i=0;i<a;i++)                for(j=0;j<a;j++)                    d[i][j]=b;            for(i=0;i<a;i++)                if(i%2!=0)                for(j=i;j<a-i&&i;j++)            {                d[i][j]=c;                d[j][i]=c;                d[a-i-1][j]=c;                d[j][a-i-1]=c;            }        }        else        {            for(i=0;i<a;i++)                for(j=0;j<a;j++)                    d[i][j]=c;            for(i=0;i<a;i++)                if(i%2!=0)                for(j=i;j<a-i&&i;j++)            {                d[i][j]=b;                d[j][i]=b;                d[a-i-1][j]=b;                d[j][a-i-1]=b;            }        }           for(i=0;i<a;i++)           {                for(j=0;j<a;j++)                    if((i==0&&j==0)||(i==0&&j==a-1)||(i==a-1&&j==0)||(i==a-1&&j==a-1))                    printf(" ");                else                    printf("%c",d[i][j]);                    printf("\n");           }        }        n++;    }}
                                                                                                                      ^
0_0_33380737_334.cpp:5:118: error: expected '}' at end of input


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-15 20:29:42, Gzip enabled