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_13806199_21969.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include#include#include#includeusing namespace std;typedef set::iterator it;const int N = 10000;int dis[N], tdis[N], link[N][12];queue q;set zone;void bfs(int o){    memset(tdis, 0, sizeof(tdis));    tdis[o] = 1;    q.push(o);    while(!q.empty())    {        int cur = q.front();        q.pop();        if(tdis[cur] > dis[cur]) dis[cur] = tdis[cur];        for(int i = 1; i <= link[cur][0]; ++i)        {            int j = link[cur][i];            if(tdis[j] == 0)  q.push(j), tdis[j] = tdis[cur] + 1;        }    }}int main(){    int cas, nz, nr, id, mz, mr, ans, t;    scanf("%d", &cas);    while(cas--)    {        zone.clear();        memset(dis, 0, sizeof(dis));        scanf("%d%d", &nz, &nr);        for(int i = 1; i <= nz; ++i)        {            scanf("%d %d", &id, &mz);            link[id][0] = mz;            zone.insert(id);            for(int i = 1; i <= mz; ++i)                scanf("%d", &link[id][i]);        }        for(int i = 1; i <= nr; ++i)        {            scanf("%d", &mr);            for(int j = 1; j <= mr; ++j)            {                scanf("%d", &t);                bfs(t);            }        }        it i = zone.begin();        ans = *i;        for(++i; i != zone.end(); ++i)            if(dis[*i] < dis[ans]) ans = *i;        printf("%d %dn", dis[ans], ans);    }    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-12-02 06:36:42, Gzip enabled