| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79390 | 贾子煜 | 奇偶位互换 | C++ | Runtime Error | 0 MS | 260 KB | 330 | 2024-07-04 19:04:05 |
#include<iostream> #include<cstring> #include<algorithm> using namespace std; char sz[50][51]; int main(){ int c; cin>>c; for(int i=0;i<c;i++){ cin>>sz[i]; int n=strlen(sz[i]); for(int j=0;j<n;j=j+2) { swap(sz[i][j],sz[i][j+1]); } } for(int i=0;i<c;i++){ cout<<sz[i]<<"\n"; } return 0; }
Runtime Error:Segmentation fault