Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
38378 | 奚晨瑞 | 四驱车比赛第一轮排名 | C++ | Runtime Error | 0 MS | 232 KB | 266 | 2024-01-26 20:56:52 |
#include<iostream> using namespace std; int main() { int a[6]; for(int i=0;i<6;i++){ cin>>a[i]; } for(int i=0;i<6;i++){ if(a[i]>a[i+1]){ int temp=a[i]; a[i]=a[i+1]; a[i+1]=temp; } } for(int i=0;i<6;i++){ cout<<a[i]<<" "; } }