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_15183355_23142.cpp: In function 'void dfs(int, int, int)':
0_0_15183355_23142.cpp:23:148: error: expected '}' at end of input
 bool flag;int n,L,vis[301],A;set<int >S[33];set<int >::iterator it,itt;void dfs(int last,int x,int num){    if(x==n+1&&num==L+1)    {        flag=1;//cout<<1<<endl;        return ;    } if(flag)return ;    //if(num>L)return ;    //if(n-last+num-1<L)return ;    for(int i=x; i<=n; i++)    {        int maxx;        for(itt=S[x].begin(); itt!=S[x].end(); itt++)        {             maxx=1;            for(int j=x+1; j<=i; j++)            {                if(S[j].count(*itt))maxx++;            }         if(maxx==i-last)           break;        }         if(maxx==i-last)            dfs(i,i+1,num+1);if(flag)return ;    }}int main(){    int T=read();    while(T--)    {        scanf("%d%d",&n,&L);        for(int i=1;i<=n;i++)             S[i].clear();        FOR(i,1,n)        {            scanf("%d",&A);            FOR(j,1,A)            {                int x=read();                S[i].insert(x);            }        }        flag=0;        dfs(0,1,1);        if(flag)        {            printf("YES\n");        }        else printf("NO\n");    }    return 0;}
                                                                                                                                                    ^
0_0_15183355_23142.cpp:23:148: error: expected '}' at end of input


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-02-17 12:44:16, Gzip enabled