Submission #00400


ソースコード

ステータス

項目 データ
問題 0004 - railway
ユーザー名 kissy1206
投稿日時 2017-11-26 15:13:45
言語 C++11
状態 Compile Error
得点 0
ソースコード長 1579 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:13:18: error: ‘std::vector<int> time’ redeclared as different kind of symbol
 std::vector<int> time, froma, fromb;
                  ^~~~
In file included from /usr/include/pthread.h:26:0,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/gthr.h:148,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ext/atomicity.h:35,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/ios_base.h:39,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:42,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ostream:38,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/iostream:39,
                 from ./Main.cpp:1:
/usr/include/time.h:186:15: note: previous declaration ‘time_t time(time_t*)’
 extern time_t time (time_t *__timer) __THROW;
               ^~~~
./Main.cpp: In function ‘void f(int, int, std::vector<int>)’:
./Main.cpp:20:56: error: request for member ‘at’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
             from.at(next) = (from.at(next) == 0 ? time.at(i) + from.at(k) : std::min(from.at(next), time.at(i) + from.at(k)));
                                                        ^~
./Main.cpp:20:106: error: request for member ‘at’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
             from.at(next) = (from.at(next) == 0 ? time.at(i) + from.at(k) : std::min(from.at(next), time.at(i) + from.at(k)));
                                                                                                          ^~
./Main.cpp:25:56: error: request for member ‘at’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
             from.at(next) = (from.at(next) == 0 ? time.at(i) + from.at(k) : std::min(from.at(next), time.at(i) + from.at(k)));
                                                        ^~
./Main.cpp:25:106: error: request for member ‘at’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
             from.at(next) = (from.at(next) == 0 ? time.at(i) + from.at(k) : std::min(from.at(next), time.at(i) + from.at(k)));
                                                                                                          ^~
./Main.cpp: In function ‘int main()’:
./Main.cpp:41:10: error: request for member ‘resize’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
     time.resize(m);
          ^~~~~~
./Main.cpp:43:73: error: request for member ‘at’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
     rep(i, m) std::cin >> data.at(i).first >> data.at(i).second >> time.at(i);
                                                                         ^~

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #