백준 - 7568 덩치
문제
7568 덩치
답
kotlin code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fun main() {
val count = readln().toInt()
val inputs = Array(count) { readln().split(' ').map { it.toInt() } }
val output = StringBuilder()
for (input in inputs) {
var rank = 1
for(input2 in inputs) {
if(input2[0] > input[0] && input2[1] > input[1]) rank++
}
output.append(rank).append(' ')
}
println(output)
}
This post is licensed under CC BY 4.0 by the author.