[Swift] 백준7568 덩치
·
📝 코테/BOJ
import Foundation let N = Int(readLine()!)! var tuples = [(x: Int, y: Int)]() for _ in 1...N { let xy = readLine()!.components(separatedBy: " ").map { Int($0)! } let x = xy[0] let y = xy[1] tuples.append((x, y)) } var ranks = [Int]() for tuple in tuples { let rank = tuples.filter { $0.x > tuple.x && $0.y > tuple.y }.count + 1 ranks.append(rank) } for rank in ranks { if rank.hashValue == ranks.la..
JerryiOS
'브루탈포스' 태그의 글 목록