| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152658 | Kevin | 字符串反转 | C++ | Compile Error | 0 MS | 0 KB | 417 | 2026-04-29 20:03:43 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; string s; cin>>n; cin.ignore; for(int i=1;i<=n;i++){ getline(cin,s); int cnt=0; int len=s.size(); for(int j=0;j<len;j++){ if(s[j]==' '){ for(int c=j-1;c>=cnt;c--){ cout<<s[c]; } cout<<s[j]; cnt=j+1; } } for(int c=len-1;c>=cnt;c--){ cout<<s[c]; } cout<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:7:12: error: statement cannot resolve address of overloaded function
cin.ignore;
^