문제:
- 제목: 선분위의 점
- 링크 : https://www.acmicpc.net/problem/11663
- 접근 방법 : 탐색
해결 방식:
import sys
sys.stdin = open('sample.txt')
input = sys.stdin.readline
N, M = map(int, input().split())
graph = list(map(int, input().split()))
for _ in range(M):
start, end = map(int, input().split())
near_idx_start = 0
near_idx_end = 0
for idx, search_value in enumerate(graph):
if search_value == start:
near_idx_start = search_value
else:
if search_value > start:
near_idx_start = search_value[idx-1]
near_idx =