벗어난경우 , 하나만 일치하는 경우, 두개 일치하는 경우, 그외
import sys
input = sys.stdin.readline
for _ in range(4):
    x1,y1,p1,q1,x2,y2,p2,q2 = map(int, input().split())
    if p1 < x2 or p2 < x1 or y1 > q2 or q1 < y2:
        print('d')
        continue
    elif x1==p2 or x2==p1:
        if q1==y2 or q2==y1:
            print('c')
            continue
        else:
            print('b')
            continue
    elif q1==y2 or q2==y1:
            print('b')
            continue
    else:
        print('a')
        continue
'practivceAlgorithm > 백준' 카테고리의 다른 글
| [백준][Python] 10158 개미 (0) | 2021.08.28 | 
|---|---|
| [백준][Python] 10157 자리배정 (0) | 2021.08.28 | 
| [백준][Python] 2578 빙고 (0) | 2021.08.28 | 
| [백준][Python] 2559 수열 (0) | 2021.08.28 | 
| [백준][Python] 2304 창고다각형 (0) | 2021.08.28 |