Submission #35568


ソースコード

ステータス

項目 データ
問題 0930 - 背の順
ユーザー名 ei1710
投稿日時 2018-05-12 20:37:30
言語 C++11
状態 Compile Error
得点 0
ソースコード長 320 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:9:5: error: ‘cin’ was not declared in this scope
     cin >> n;
     ^~~
./Main.cpp:9:5: note: suggested alternative:
In file included from ./Main.cpp:1:0:
/usr/local/gcc-7.1.0/include/c++/7.1.0/iostream:60:18: note:   ‘std::cin’
   extern istream cin;  /// Linked to standard input
                  ^~~
./Main.cpp:14:26: error: ‘greater’ was not declared in this scope
     sort(data, data + n, greater<int>() );
                          ^~~~~~~
./Main.cpp:14:26: note: suggested alternative:
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/string:48:0,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/locale_classes.h:40,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/ios_base.h:41,
                 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/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_function.h:371:12: note:   ‘std::greater’
     struct greater : public binary_function<_Tp, _Tp, bool>
            ^~~~~~~
./Main.cpp:14:34: error: expected primary-expression before ‘int’
     sort(data, data + n, greater<int>() );
                                  ^~~
./Main.cpp:14:5: error: ‘sort’ was not declared in this scope
     sort(data, data + n, greater<int>() );
     ^~~~
./Main.cpp:14:5: note: suggested alternative:
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/algorithm:62:0,
                 from ./Main.cpp:2:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algo.h:4842:5: note:   ‘std::sort’
     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
     ^~~~

セット

セット 得点 Cases

テストケース

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