| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 4048 | 王兮 | 字符串反转 | C++ | Wrong Answer | 0 | 0 MS | 244 KB | 383 | 2019-12-28 20:34:08 |
#include<iostream> using namespace std; int main() { int n; char str[1001]; for(int k=1;k<=n;k++) { gets(str); int i=0; while(str[i]) { while(str[i]==' ')printf("%c",str[i++]); int WordLeft=i; while(str[i]&&str[i]!=' ') i++; int WordRight=i-1; while(WordLeft<=WordRight) printf("%c",str[WordRight--]); } cout<<endl; } return 0; }