| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 137168 | A班卞定熙 | 车厢重组 | C++ | Wrong Answer | 0 | 0 MS | 252 KB | 272 | 2024-03-09 17:38:37 |
#include<bits/stdc++.h> using namespace std; int i,j,x; int a[11]; int main(){ for(i=1;i<11;i++){ cin>>a[i]; for(j=1;j<=10-1;j++){ for(int i=1;i<=10-j;i++){ if(a[i]>a[i+1]){ x++; swap(a[i],a[i+1]); } } } } cout<<x<<endl; return 0; }