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_20611802_12202.cpp:11:5: error: expected unqualified-id before '>' token
     >n>>m,n+m){        memset(mark,0,sizeof mark);        memset(pos,-1,sizeof pos);        for(int i=0;i<n;++i){            scanf("%d",&s[i]);            if(pos[s[i]] == -1)pos[s[i]]=i;        }        s[n]=n;        for(int i=1;i<=m;++i){            scanf("%d",&q);            int l=n,r=-1,maxlen=INF;            for(int j=0;j<q;++j){                scanf("%d",&a);                num[a]=0;                mark[a]=i;                if(pos[a]>r)r=pos[a];                if(pos[a]<l)l=pos[a];            }            for(int j=l;j<=r;++j)++num[s[j]];            maxlen=r-l+1;            while(r<n){                --num[s[l]];                if(num[s[l]] == 0){                    while(++r<n && s[r] != s[l])++num[s[r]];                    num[s[r]]=1;                }                while(++l<=r && mark[s[l]] != i);                if(r<n && maxlen>r-l+1)maxlen=r-l+1;            }            cout<<maxlen<<endl;        }    }    return 0;}
     ^


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-25 18:33:24, Gzip enabled