Submission #79340
ソースコード
ステータス
項目 |
データ |
問題 |
0930 - 背の順 |
ユーザー名 |
r2422
|
投稿日時 |
2024-06-03 17:17:13 |
言語 |
C++ |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
256 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp:3:7: error: expected nested-name-specifier before ‘namespase’
using namespase std;
^~~~~~~~~
./Main.cpp: In function ‘int main()’:
./Main.cpp:6:5: error: ‘cin’ was not declared in this scope
cin >>n;
^~~
./Main.cpp:6:5: note: suggested alternative:
In file included from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:60:18: note: ‘std::cin’
extern istream cin; /// Linked to standard input
^~~
./Main.cpp:8:14: error: expected ‘;’ before ‘-’ token
for(int i-0;i<n;i++){
^
;
./Main.cpp:8:20: error: expected ‘)’ before ‘;’ token
for(int i-0;i<n;i++){
~ ^
)
./Main.cpp:8:21: error: name lookup of ‘i’ changed for ISO ‘for’ scoping [-fpermissive]
for(int i-0;i<n;i++){
^
./Main.cpp:8:21: note: if you use ‘-fpermissive’ G++ will accept your code
./Main.cpp:8:24: error: expected ‘;’ before ‘)’ token
for(int i-0;i<n;i++){
^
;
./Main.cpp:11:5: error: ‘sort’ was not declared in this scope
sort(a,a+n);
^~~~
./Main.cpp:11:5: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:4854:5: note: ‘std::sort’
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^~~~
./Main.cpp:13:9: error: ‘cout’ was not declared in this scope
cout <<a[i]<<"\n";
^~~~
./Main.cpp:13:9: note: suggested alternative:
In file included from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:61:18: note: ‘std::cout’
extern ostream cout; /// Linked to standard output
^~~~
セット
テストケース