Home 백준 - 7568 덩치
Post
Cancel

백준 - 7568 덩치

문제

7568 덩치

screencaptures

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.

백준 - 1012 유기농 배추

백준 - 1018 체스판 다시 칠하기