| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 69186 | 许铭锐 | 31统计单词数 | C++ | Compile Error | 0 MS | 0 KB | 219 | 2024-03-31 09:07:19 |
#include<bits/stdc++.h> using namespase std; int main() { strig a; getline(cin,a); int =a.length(),c=0; fo(int i=0; i<b; i++) { if(a[i]==' '&&a[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 a;
^
Main.cc:5:10: error: 'cin' was not declared in this scope
getline(cin,a);
^
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: 'a' was not declared in this scope
getline(cin,a);
^
Main.cc:6:6: error: expected unqualified-id before '=' token
int =a.length(),c=0;
^
Main.cc:7:5: error: expected primary-expression before 'int'
fo(int i=0; i