이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
string s[n];
int sc[n] = {};
for(int i = 0; i < n; i ++)
{
cin >> s[i];
for(int j = 0; j < 5; j++)
{
int x;
cin >> x;
sc[i] += x;
}
}
for(int i = 0; i < n; i ++)
{
pair<int, string> p1 = {-sc[i], s[i]};
pair<int, string> p2 = {-sc[i] - 500, s[i]};
int c1 = 0, c2 = 0;
for(int j = 0; j < n; j ++)
{
if(j == i) continue;
if(p1 < make_pair(-sc[j] - 500, s[j]))
c1++;
if(p2 < make_pair(-sc[j], s[j]))
c2++;
}
cout << n - c2 << ' ' << n - c1 << endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |