| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 136994 | 刘益梵 | 单词翻转 | C++ | Compile Error | 0 MS | 0 KB | 429 | 2025-11-15 17:24:33 |
#include<bits/stdc++.h> using namespace std; int main(){ string s; int cnt=0; getling(cin,s); int len=s.size(); for(int i=0;i<len;i++){ if(s[i]!=' '){ cnt++; } else if(s[i]==' ' && cnt!=0){ for(int j=1;j<=cnt;j++){ cout<<s[i-j]; } cout<<" "; cnt=0; } else if(s[i]==' ' && cnt==0){ cout<<" "; } if(i==len-1 && cnt!=0){ cout<<s[i-j+1]; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:6:15: error: 'getling' was not declared in this scope
getling(cin,s);
^
Main.cc:23:14: error: 'j' was not declared in this scope
cout<