Submission #61947
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp:10:10: error: stray ‘#’ in program
for(i#include <iostream>
^
./Main.cpp: In function ‘int main()’:
./Main.cpp:10:9: error: ‘i’ was not declared in this scope
for(i#include <iostream>
^
./Main.cpp:13:13: warning: declaration of ‘int main()’ has ‘extern’ and is initialized
signed main()
^
./Main.cpp:15:5: error: expected primary-expression before ‘int’
int n, W, v[1001], w[1001];
^~~
./Main.cpp:15:5: error: expected ‘}’ before ‘int’
./Main.cpp:14:1: note: to match this ‘{’
{
^
./Main.cpp:15:5: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
int n, W, v[1001], w[1001];
^~~
./Main.cpp:15:5: error: function ‘int main()’ is initialized like a variable
./Main.cpp:14:2: error: expected ‘;’ before ‘int’
{
^
;
int n, W, v[1001], w[1001];
~~~
./Main.cpp:15:5: error: expected primary-expression before ‘int’
int n, W, v[1001], w[1001];
^~~
./Main.cpp:14:2: error: expected ‘)’ before ‘int’
{
^
)
int n, W, v[1001], w[1001];
~~~
./Main.cpp:10:8: note: to match this ‘(’
for(i#include <iostream>
^
./Main.cpp:16:22: error: redeclaration of ‘int dp [101][10001]’
int dp[101][10001] = {}, ans;
^
./Main.cpp:7:9: note: ‘int dp [101][10001]’ previously declared here
int dp[101][10001] = {}, ans;
^~
./Main.cpp:16:30: error: redeclaration of ‘int ans’
int dp[101][10001] = {}, ans;
^~~
./Main.cpp:7:30: note: ‘int ans’ previously declared here
int dp[101][10001] = {}, ans;
^~~
./Main.cpp: At global scope:
./Main.cpp:45:2: error: ‘nt’ does not name a type; did you mean ‘int’?
}nt i=1 ;i<=n ;i++ ){
^~
int
./Main.cpp:45:10: error: ‘i’ does not name a type
}nt i=1 ;i<=n ;i++ ){
^
./Main.cpp:45:16: error: ‘i’ does not name a type
}nt i=1 ;i<=n ;i++ ){
^
./Main.cpp:49:5: error: expected unqualified-id before ‘for’
for(int i=1 ;i<=n ;i++ ){
^~~
./Main.cpp:49:18: error: ‘i’ does not name a type
for(int i=1 ;i<=n ;i++ ){
^
./Main.cpp:49:24: error: ‘i’ does not name a type
for(int i=1 ;i<=n ;i++ ){
^
./Main.cpp:65:5: error: ‘ans’ does not name a type
ans = 0;
^~~
./Main.cpp:66:5: error: expected unqualified-id before ‘for’
for(int j=1 ;j<=W ;j++ ){
^~~
./Main.cpp:66:18: error: ‘j’ does not name a type
for(int j=1 ;j<=W ;j++ ){
^
./Main.cpp:66:24: error: ‘j’ does not name a type
for(int j=1 ;j<=W ;j++ ){
^
./Main.cpp:70:5: error: ‘cout’ does not name a type
cout << ans << endl;
^~~~
./Main.cpp:71:1: error: expected declaration before ‘}’ token
}
^
セット
テストケース