Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
36468 | C++|刘一阳 | 谁考了第k名 | C++ | Wrong Answer | 0 MS | 248 KB | 299 | 2024-01-13 16:01:12 |
#include<bits/stdc++.h> using namespace std; struct node{ int id; double f; }a[1000]; bool cmp(node a,node b){ return a.f<b.f; } int main() { int i,m,n; cin>>n>>m; for(i=0;i<n;i++){ cin>>a[i].id>>a[i].f; sort(a,a+n,cmp); printf("%d %g",a[m].id,a[m].f); } return 0; }