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_20610685_25908.cpp:6:6: error: 'qu' does not name a type
      qu;    if(isEnd(t1))    {        printf("Preserved\n");        return;    }    t1.flag=0;    qu.push(t1);    while(!qu.empty())    {        t2=qu.front();        qu.pop();        if(t2.flag==0)        {            t1.flag=1;            rt90();            if(isEnd(t1))            {                printf("Rotated through 90 degrees\n");                return;            }            rt180();             if(isEnd(t1))            {                printf("Rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Rotated through 270 degrees\n");                return;            }            reflect();            if(isEnd(t1))            {                printf("Reflected\n");                return;            }            qu.push(t1);        }        else if(t2.flag==1)        {            rt90();            if(isEnd(t1))            {                printf("Reflected and rotated through 90 degrees\n");                return;            }            rt180();            if(isEnd(t1))            {                printf("Reflected and rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Reflected and rotated through 270 degrees\n");                return;            }            printf("Improper\n");        }    }}int main(){     while(scanf("%d",&n)&&n!=0)    {        for(i=0;i<n;i++)        {            scanf("%s%s",t1.map[i],endstate[i]);        }        BFS();    }}
      ^
0_0_20610685_25908.cpp:6:13: error: expected unqualified-id before 'if'
      qu;    if(isEnd(t1))    {        printf("Preserved\n");        return;    }    t1.flag=0;    qu.push(t1);    while(!qu.empty())    {        t2=qu.front();        qu.pop();        if(t2.flag==0)        {            t1.flag=1;            rt90();            if(isEnd(t1))            {                printf("Rotated through 90 degrees\n");                return;            }            rt180();             if(isEnd(t1))            {                printf("Rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Rotated through 270 degrees\n");                return;            }            reflect();            if(isEnd(t1))            {                printf("Reflected\n");                return;            }            qu.push(t1);        }        else if(t2.flag==1)        {            rt90();            if(isEnd(t1))            {                printf("Reflected and rotated through 90 degrees\n");                return;            }            rt180();            if(isEnd(t1))            {                printf("Reflected and rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Reflected and rotated through 270 degrees\n");                return;            }            printf("Improper\n");        }    }}int main(){     while(scanf("%d",&n)&&n!=0)    {        for(i=0;i<n;i++)        {            scanf("%s%s",t1.map[i],endstate[i]);        }        BFS();    }}
             ^
0_0_20610685_25908.cpp:6:85: error: 't1' does not name a type
      qu;    if(isEnd(t1))    {        printf("Preserved\n");        return;    }    t1.flag=0;    qu.push(t1);    while(!qu.empty())    {        t2=qu.front();        qu.pop();        if(t2.flag==0)        {            t1.flag=1;            rt90();            if(isEnd(t1))            {                printf("Rotated through 90 degrees\n");                return;            }            rt180();             if(isEnd(t1))            {                printf("Rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Rotated through 270 degrees\n");                return;            }            reflect();            if(isEnd(t1))            {                printf("Reflected\n");                return;            }            qu.push(t1);        }        else if(t2.flag==1)        {            rt90();            if(isEnd(t1))            {                printf("Reflected and rotated through 90 degrees\n");                return;            }            rt180();            if(isEnd(t1))            {                printf("Reflected and rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Reflected and rotated through 270 degrees\n");                return;            }            printf("Improper\n");        }    }}int main(){     while(scanf("%d",&n)&&n!=0)    {        for(i=0;i<n;i++)        {            scanf("%s%s",t1.map[i],endstate[i]);        }        BFS();    }}
                                                                                     ^
0_0_20610685_25908.cpp:6:99: error: 'qu' does not name a type
      qu;    if(isEnd(t1))    {        printf("Preserved\n");        return;    }    t1.flag=0;    qu.push(t1);    while(!qu.empty())    {        t2=qu.front();        qu.pop();        if(t2.flag==0)        {            t1.flag=1;            rt90();            if(isEnd(t1))            {                printf("Rotated through 90 degrees\n");                return;            }            rt180();             if(isEnd(t1))            {                printf("Rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Rotated through 270 degrees\n");                return;            }            reflect();            if(isEnd(t1))            {                printf("Reflected\n");                return;            }            qu.push(t1);        }        else if(t2.flag==1)        {            rt90();            if(isEnd(t1))            {                printf("Reflected and rotated through 90 degrees\n");                return;            }            rt180();            if(isEnd(t1))            {                printf("Reflected and rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Reflected and rotated through 270 degrees\n");                return;            }            printf("Improper\n");        }    }}int main(){     while(scanf("%d",&n)&&n!=0)    {        for(i=0;i<n;i++)        {            scanf("%s%s",t1.map[i],endstate[i]);        }        BFS();    }}
                                                                                                   ^
0_0_20610685_25908.cpp:6:115: error: expected unqualified-id before 'while'
      qu;    if(isEnd(t1))    {        printf("Preserved\n");        return;    }    t1.flag=0;    qu.push(t1);    while(!qu.empty())    {        t2=qu.front();        qu.pop();        if(t2.flag==0)        {            t1.flag=1;            rt90();            if(isEnd(t1))            {                printf("Rotated through 90 degrees\n");                return;            }            rt180();             if(isEnd(t1))            {                printf("Rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Rotated through 270 degrees\n");                return;            }            reflect();            if(isEnd(t1))            {                printf("Reflected\n");                return;            }            qu.push(t1);        }        else if(t2.flag==1)        {            rt90();            if(isEnd(t1))            {                printf("Reflected and rotated through 90 degrees\n");                return;            }            rt180();            if(isEnd(t1))            {                printf("Reflected and rotated through 180 degrees\n");                return;            }            rt270();            if(isEnd(t1))            {                printf("Reflected and rotated through 270 degrees\n");                return;            }            printf("Improper\n");        }    }}int main(){     while(scanf("%d",&n)&&n!=0)    {        for(i=0;i<n;i++)        {            scanf("%s%s",t1.map[i],endstate[i]);        }        BFS();    }}
                                                                                                                   ^


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-29 23:52:42, Gzip enabled