반응형
https://www.acmicpc.net/problem/7568
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;;
int N;
int Solve(vector <pair<int, int>> v, int con) {
int rank = 0;
for (int i = 0;i < N;i++)
{
if (i == con) continue;
if (v[i].first > v[con].first && v[i].second > v[con].second) ++rank;
}
return rank + 1;
}
int main(void) {
vector <pair<int, int>> v;
pair<int, int> tmp;
cin >> N;
for (int i = 0;i < N;i++) {
v.push_back(tmp);
}
for (int i = 0;i < N;i++)
{
cout << Solve(v,i) << " ";
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
|
반응형