이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int const N=2e5+5;
int const mod=1e9+7;
int main(){
int n;
cin>>n;
vector<pair<int,string>> con;
for (int i = 0; i < n; ++i)
{
con.push_back({0,"ief"});
cin>>con[i].second;
for (int j = 0; j < 5; ++j)
{
int a;
cin>>a;
con[i].first-=a;
}
}
vector<pair<int,string>> cp;
for (int i = 0; i < n; ++i)
{
con[i].first-=500;
cp=con;
sort(cp.begin(), cp.end());
for (int j = 0; j < n; ++j)
if(con[i]==cp[j]){
cout<<j+1<<' ';
break;
}
con[i].first+=1000;
cp=con;
sort(cp.begin(), cp.end());
for (int j = 0; j < n; ++j)
if(con[i]==cp[j]){
cout<<j+1<<endl;
break;
}
con[i].first-=500;
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |