| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82387 | 胡盛哲 | 31统计单词数 | C++ | Compile Error | 0 MS | 0 KB | 215 | 2024-07-13 11:11:44 |
#include<bits/stdc++.h> using namespase std; int main() { strig s; getline(cin,s); int =s.length(c=0); fo(int i=0; i<b; i++) { if(s[i]==' '&&s[i+1]!=' '&&[i-1]!=0) c++; } cout<c+1; retur 0; }
Main.cc:2:7: error: expected nested-name-specifier before 'namespase'
using namespase std;
^
Main.cc: In function 'int main()':
Main.cc:4:2: error: 'strig' was not declared in this scope
strig s;
^
Main.cc:5:10: error: 'cin' was not declared in this scope
getline(cin,s);
^
Main.cc:5:10: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:74:0,
from Main.cc:1:
/usr/include/c++/5/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^
Main.cc:5:14: error: 's' was not declared in this scope
getline(cin,s);
^
Main.cc:6:6: error: expected unqualified-id before '=' token
int =s.length(c=0);
^
Main.cc:7:5: error: expected primary-expression before 'int'
fo(int i=0; i