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_35301107_1966.cpp:2:7: error: expected nested-name-specifier before 'naemspace'
 using naemspace std;
       ^
0_0_35301107_1966.cpp: In function 'void add(int, int, int)':
0_0_35301107_1966.cpp:9:6: error: 'cnt' was not declared in this scope
  e[++cnt].v=v;
      ^
0_0_35301107_1966.cpp:11:14: error: 'head' was not declared in this scope
  e[cnt].next=head[u];
              ^
0_0_35301107_1966.cpp: In function 'void dfs(int, int, int)':
0_0_35301107_1966.cpp:18:12: error: 'head' was not declared in this scope
  for(int i=head[u];i!=-1;i=e[i].next){
            ^
0_0_35301107_1966.cpp:27:10: error: too few arguments to function 'void dfs(int, int, int)'
   dfs(v,u);
          ^
0_0_35301107_1966.cpp:14:6: note: declared here
 void dfs(int u,int FA,int mid){
      ^
0_0_35301107_1966.cpp:29:12: error: 'head' was not declared in this scope
  for(int i=head[u];i!=-1;i=e[i].next){
            ^
0_0_35301107_1966.cpp:37:27: error: 'min' was not declared in this scope
   else dp[u]=min(dp[u],sum);
                           ^
0_0_35301107_1966.cpp:37:27: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_35301107_1966.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3444:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_35301107_1966.cpp: In function 'bool check()':
0_0_35301107_1966.cpp:41:12: error: 'M' was not declared in this scope
  if(dp[1]<=M) return 1;
            ^
0_0_35301107_1966.cpp: In function 'int main()':
0_0_35301107_1966.cpp:45:2: error: 'ios' has not been declared
  ios::sync_with_stdio(false);
  ^
0_0_35301107_1966.cpp:46:8: error: 'cin' was not declared in this scope
  while(cin>>N>>M&&(N!=0&&M!=0)){
        ^
0_0_35301107_1966.cpp:46:8: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:74:0,
                 from 0_0_35301107_1966.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
0_0_35301107_1966.cpp:46:13: error: 'N' was not declared in this scope
  while(cin>>N>>M&&(N!=0&&M!=0)){
             ^
0_0_35301107_1966.cpp:46:16: error: 'M' was not declared in this scope
  while(cin>>N>>M&&(N!=0&&M!=0)){
                ^
0_0_35301107_1966.cpp:47:10: error: 'head' was not declared in this scope
   memset(head,-1,sizeof(head));
          ^
0_0_35301107_1966.cpp:48:3: error: 'cnt' was not declared in this scope
   cnt=-1;
   ^
0_0_35301107_1966.cpp:62:4: error: expected ';' before 'else'
    else l=mid+1;
    ^
0_0_35301107_1966.cpp:64:13: error: 'cout' was not declared in this scope
   if(r+1>M) cout<<"-1"<<"\n";
             ^
0_0_35301107_1966.cpp:64:13: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:74:0,
                 from 0_0_35301107_1966.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
0_0_35301107_1966.cpp:65:8: error: 'cout' was not declared in this scope
   else cout<<r+1<<"\n";
        ^
0_0_35301107_1966.cpp:65:8: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:74:0,
                 from 0_0_35301107_1966.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^


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 13:46:44, Gzip enabled