| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 80064 | 石晋骁 | 数组中元素交换 | C++ | Output Limit Exceeded | 0 MS | 268 KB | 291 | 2024-07-11 10:55:13 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,t; cin >> n; int a[n]; for(int i = 0;i< n;i++){ cin >> a[i]; } for(int j = 0;j< n;j = j+2){ t = a[j]; a[j] = a[j+1]; a[j+1] = t; } for(int k = 0;k< n;k = k++){ cout << a[k]; } return 0; }