| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 127651 | A班卞定熙 | 冒泡排序法 | C++ | Wrong Answer | 0 | 39 MS | 384 KB | 428 | 2024-01-25 09:46:47 |
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int a[100010]; for ( int i = 1; i <= n; i++ ){ cin >> a[i]; } int b[100010]; int c[100010]; for ( int i = 1; i <= n; i++ ){ b[i] = a[i]; c[i] = a[i]; } sort ( a + 1, a + n + 1 ); for ( int i = 1; i <= n; i++ ){ b[a[i]] = n - i; } for ( int i = 1; i <= n; i++ ){ cout << c[i] << ' ' << b[c[i]] + 1 << endl; } return 0; }