Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
41061 | liusiyu | 练59.1 第n大的数 | C++ | No Test Data | 0 MS | 0 KB | 248 | 2024-02-19 09:39:38 |
#include<bits/stdc++.h> using namespace std; int main() { int n,s[10]={99,200,95,87,98,-12,30,87,75,-25}; cin>>n; for(int i=0;i<10;i++){ for(int j=i+1;j<10;j++){ if(s[i]<s[j]) swap(s[i],s[j]); } } cout<<s[n-1]; return 0; }