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_22359506_15799.cpp:2:4: error: stray '#' in program
  2 #include<cmath>
    ^
0_0_22359506_15799.cpp:3:4: error: stray '#' in program
  3 #include<cstring>
    ^
0_0_22359506_15799.cpp:4:4: error: stray '#' in program
  4 #include<algorithm>
    ^
0_0_22359506_15799.cpp:2:2: error: expected unqualified-id before numeric constant
  2 #include<cmath>
  ^
0_0_22359506_15799.cpp:6:2: error: expected unqualified-id before numeric constant
  6 const int N=105;
  ^
0_0_22359506_15799.cpp:7:2: error: expected unqualified-id before numeric constant
  7 int on[N],off[N];
  ^
0_0_22359506_15799.cpp:8:2: error: expected unqualified-id before numeric constant
  8 char s[N];
  ^
0_0_22359506_15799.cpp: In function 'int main()':
0_0_22359506_15799.cpp:12:5: error: 'cin' was not declared in this scope
     cin>>T;
     ^
0_0_22359506_15799.cpp:12:5: note: suggested alternative:
In file included from 0_0_22359506_15799.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
0_0_22359506_15799.cpp:14:14: error: 's' was not declared in this scope
         cin>>s;
              ^
0_0_22359506_15799.cpp:15:21: error: 'strlen' was not declared in this scope
         len=strlen(s);
                     ^
0_0_22359506_15799.cpp:17:13: error: 'on' was not declared in this scope
             on[0]=2;off[0]=2;
             ^
0_0_22359506_15799.cpp:17:21: error: 'off' was not declared in this scope
             on[0]=2;off[0]=2;
                     ^
0_0_22359506_15799.cpp:20:13: error: 'on' was not declared in this scope
             on[0]=2;off[0]=1;
             ^
0_0_22359506_15799.cpp:20:21: error: 'off' was not declared in this scope
             on[0]=2;off[0]=1;
                     ^
0_0_22359506_15799.cpp:24:17: error: 'on' was not declared in this scope
                 on[i]=min(on[i-1],off[i-1]+1)+1;
                 ^
0_0_22359506_15799.cpp:24:35: error: 'off' was not declared in this scope
                 on[i]=min(on[i-1],off[i-1]+1)+1;
                                   ^
0_0_22359506_15799.cpp:24:45: error: 'min' was not declared in this scope
                 on[i]=min(on[i-1],off[i-1]+1)+1;
                                             ^
0_0_22359506_15799.cpp:24:45: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_22359506_15799.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:240:5: note:   'std::min'
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
0_0_22359506_15799.cpp:28:17: error: 'on' was not declared in this scope
                 on[i]=min(on[i-1]+1,off[i-1]+1)+1;
                 ^
0_0_22359506_15799.cpp:28:37: error: 'off' was not declared in this scope
                 on[i]=min(on[i-1]+1,off[i-1]+1)+1;
                                     ^
0_0_22359506_15799.cpp:28:47: error: 'min' was not declared in this scope
                 on[i]=min(on[i-1]+1,off[i-1]+1)+1;
                                               ^
0_0_22359506_15799.cpp:28:47: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_22359506_15799.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:240:5: note:   'std::min'
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
0_0_22359506_15799.cpp:32:9: error: 'cout' was not declared in this scope
         cout<<min(on[len-1]+1,off[len-1])<<endl;
         ^
0_0_22359506_15799.cpp:32:9: note: suggested alternative:
In file included from 0_0_22359506_15799.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
0_0_22359506_15799.cpp:32:19: error: 'on' was not declared in this scope
         cout<<min(on[len-1]+1,off[len-1])<<endl;
                   ^
0_0_22359506_15799.cpp:32:31: error: 'off' was not declared in this scope
         cout<<min(on[len-1]+1,off[len-1])<<endl;
                               ^
0_0_22359506_15799.cpp:32:41: error: 'min' was not declared in this scope
         cout<<min(on[len-1]+1,off[len-1])<<endl;
                                         ^
0_0_22359506_15799.cpp:32:41: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_22359506_15799.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:240:5: note:   'std::min'
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
0_0_22359506_15799.cpp:32:44: error: 'endl' was not declared in this scope
         cout<<min(on[len-1]+1,off[len-1])<<endl;
                                            ^
0_0_22359506_15799.cpp:32:44: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39:0,
                 from 0_0_22359506_15799.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:564:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^


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-17 09:47:35, Gzip enabled