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_19224626_31096.cpp: In function 'bool selectAndDfs(int, int, int, int*, int*, int, int)':
0_0_19224626_31096.cpp:23:167: error: 'dfs' was not declared in this scope
 int i;    if(total-from < elect) return false;    if(from == total && elect == 0) {        for(i=0; i<m; i++) finished[result[i]] = true;        dfs(lev+m, semester+1);        for(i=0; i<m; i++) finished[result[i]] = false;        return true;    }    for(i=from; i<total; i++) {        result[m-elect] = que[i];        selectAndDfs(total, elect-1, i+1, que, result, lev, semester);    }    return true;} bool dfs(int lev, 
                                                                                                                                                                       ^
0_0_19224626_31096.cpp: In function 'int main()':
0_0_19224626_31096.cpp:11:12: error: unable to find numeric literal operator 'operator""bool'
 #define oo 100000bool dfs(int, int); 
            ^
0_0_19224626_31096.cpp:28:765: note: in expansion of macro 'oo'
 int i,j,k,p,t;        for(i=0; i<n; i++) {            scanf("%s", &subject[i].name);            subject[i].time = subject[i].preNum = 0;        }        for(i=0; i<n; i++) {            char s[10];            scanf("%s", s);            for(j=0; j<n && strcmp(s, subject[j].name) != 0; j++);            scanf("%s", s);            if(s[0] == 'B') subject[j].time = 3;            else if(s[0] == 'S') subject[j].time = 1;            else subject[j].time = 2;            scanf("%d", &t);            for(k=0; k<t; k++) {                scanf("%s", s);                for(p=0; p<n && strcmp(s, subject[p].name) != 0; p++);                subject[j].prerequisites[subject[j].preNum++] = p;            }        }        memset(finished, 0, sizeof(finished));        mini = oo;        dfs(0,1);        printf("The minimum number of semesters required to graduate is %d.\n", mini);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^
0_0_19224626_31096.cpp:11:12: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
 #define oo 100000bool dfs(int, int); 
            ^
0_0_19224626_31096.cpp:28:765: note: in expansion of macro 'oo'
 int i,j,k,p,t;        for(i=0; i<n; i++) {            scanf("%s", &subject[i].name);            subject[i].time = subject[i].preNum = 0;        }        for(i=0; i<n; i++) {            char s[10];            scanf("%s", s);            for(j=0; j<n && strcmp(s, subject[j].name) != 0; j++);            scanf("%s", s);            if(s[0] == 'B') subject[j].time = 3;            else if(s[0] == 'S') subject[j].time = 1;            else subject[j].time = 2;            scanf("%d", &t);            for(k=0; k<t; k++) {                scanf("%s", s);                for(p=0; p<n && strcmp(s, subject[p].name) != 0; p++);                subject[j].prerequisites[subject[j].preNum++] = p;            }        }        memset(finished, 0, sizeof(finished));        mini = oo;        dfs(0,1);        printf("The minimum number of semesters required to graduate is %d.\n", mini);    }    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 02:39:35, Gzip enabled