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_35880385_10216.cpp:19:21: error: 'string' does not name a type
     int solve(const string& src,const string& dst){
                     ^
0_0_35880385_10216.cpp:19:39: error: 'string' does not name a type
     int solve(const string& src,const string& dst){
                                       ^
0_0_35880385_10216.cpp: In constructor 'Solution::Solution()':
0_0_35880385_10216.cpp:9:19: error: 'INT_MAX' was not declared in this scope
         memset(dp,INT_MAX/2,sizeof(dp));
                   ^
0_0_35880385_10216.cpp:9:39: error: 'memset' was not declared in this scope
         memset(dp,INT_MAX/2,sizeof(dp));
                                       ^
0_0_35880385_10216.cpp: In member function 'int Solution::solve(const int&, const int&)':
0_0_35880385_10216.cpp:20:20: error: request for member 'length' in 'src', which is of non-class type 'const int'
         auto n=src.length();
                    ^
0_0_35880385_10216.cpp:22:30: error: invalid types 'const int[int]' for array subscript
             numSrc[i+1]=src[i]-'0';
                              ^
0_0_35880385_10216.cpp:23:30: error: invalid types 'const int[int]' for array subscript
             numDst[i+1]=dst[i]-'0';
                              ^
0_0_35880385_10216.cpp:40:88: error: 'min' was not declared in this scope
                                                                     dp[i-1][j][k]+upNum);
                                                                                        ^
0_0_35880385_10216.cpp:49:90: error: 'min' was not declared in this scope
                                                                     dp[i-1][j][k]+downNum);
                                                                                          ^
0_0_35880385_10216.cpp:56:20: error: 'INT_MAX' was not declared in this scope
         int result=INT_MAX;
                    ^
0_0_35880385_10216.cpp:59:46: error: 'min' was not declared in this scope
                 result=min(result,dp[n][i][j]);
                                              ^
0_0_35880385_10216.cpp: In function 'int main()':
0_0_35880385_10216.cpp:68:5: error: 'string' was not declared in this scope
     string s1="896521",s2="183995";
     ^
0_0_35880385_10216.cpp:69:12: error: 'cin' was not declared in this scope
     while(!cin.eof()){
            ^
0_0_35880385_10216.cpp:70:14: error: 's1' was not declared in this scope
         cin>>s1>>s2;
              ^
0_0_35880385_10216.cpp:70:18: error: 's2' was not declared in this scope
         cin>>s1>>s2;
                  ^
0_0_35880385_10216.cpp:71:9: error: 'cout' was not declared in this scope
         cout<<Solution().solve(s1, s2)<<endl;
         ^
0_0_35880385_10216.cpp:71:41: error: 'endl' was not declared in this scope
         cout<<Solution().solve(s1, s2)<<endl;
                                         ^


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-06-22 04:15:48, Gzip enabled