7568๋ฒ: ๋ฉ์น
์ฐ๋ฆฌ๋ ์ฌ๋์ ๋ฉ์น๋ฅผ ํค์ ๋ชธ๋ฌด๊ฒ, ์ด ๋ ๊ฐ์ ๊ฐ์ผ๋ก ํํํ์ฌ ๊ทธ ๋ฑ์๋ฅผ ๋งค๊ฒจ๋ณด๋ ค๊ณ ํ๋ค. ์ด๋ค ์ฌ๋์ ๋ชธ๋ฌด๊ฒ๊ฐ x kg์ด๊ณ ํค๊ฐ y cm๋ผ๋ฉด ์ด ์ฌ๋์ ๋ฉ์น๋ (x, y)๋ก ํ์๋๋ค. ๋ ์ฌ๋ A ์ B์ ๋ฉ
www.acmicpc.net
ํค์ ๋ชธ๋ฌด๊ฒ๊ฐ ๋ ํด๋( > ) ๋ฉ์น์นด ๋ ํฌ๋ค ๋ผ๊ณ ํ๋ค. ๋ฉ์น ๋ฑ์๋ ์์ ๋ณด๋ค ๋ "ํฐ ๋ฉ์น"์ ์ฌ๋์ ์๋ก ์ ํด์ง๋ค
1. people ๋ฆฌ์คํธ์ ๊ฐ ์ฌ๋์ ํค์ ๋ชธ๋ฌด๊ฒ๋ฅผ ๋ฆฌ์คํธ๋ก ์ถ๊ฐ
2. people ๋ฆฌ์คํธ์์ MyHeight(mh), MyWeight(mw), YourHeight(yh), YourWeight(yw) ๋ฅผ ๋ถ๋ฌ์ค๊ณ ๋น๊ตํ์ฌ ๋ฉ์น๊ฐ ๋ ํด ๋ count++ ( count๋ 1๋ก ์ด๊ธฐํ. ์์ ๋ณด๋ค ๋ฉ์น๊ฐ ํฐ ์ฌ๋์ด ์๋ฌด๋ ์๋ค๋ฉด 1๋ฑ )
3. count ๋ฅผ ์ถ๋ ฅ
# 7568.py
n = int(input())
people = []
for i in range(n):
โโโโpeople.append(list(map(int, input().split())))
for mh, mw in people:
โโโโcount = 1
โโโโfor yh, yw in people:
โโโโโโโโif mh < yh and mw < yw:
โโโโโโโโโโโโcount += 1
โโโโprint(count, end=' ')