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_25677412_24403.cpp:4:22: error: 'int time [101]' redeclared as different kind of symbol
 int val[101],time[101],dp[101][1001];
                      ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ctime:42:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:49,
                 from 0_0_25677412_24403.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/time.h:233:29: note: previous declaration 'time_t time(time_t*)'
 __CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); }
                             ^
0_0_25677412_24403.cpp: In function 'int main()':
0_0_25677412_24403.cpp:15:24: error: cannot bind 'std::istream {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&'
             cin>>time[i]>>cal[i];
                        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_25677412_24403.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:872:5: note: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = long long int(long long int*)]'
     operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
     ^
0_0_25677412_24403.cpp:15:27: error: 'cal' was not declared in this scope
             cin>>time[i]>>cal[i];
                           ^
0_0_25677412_24403.cpp:27:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
                 for(k = l; k>=time[i]; k--)
                                     ^
0_0_25677412_24403.cpp:29:61: error: invalid operands of types 'int' and 'time_t(time_t*) {aka long long int(long long int*)}' to binary 'operator-'
                     dp[j][k] = max(dp[j][k],dp[j-1][k-time[i]]+val[i]);
                                                             ^


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-22 22:56:15, Gzip enabled