[프로그래머스 2레벨] 충돌위험 찾기 (C++)
#include #include #include using namespace std;map>, int>m; //특정 시간에 특정 위치를 지난 사람 카운트int solution(vector> points, vector> routes) { int answer = 0; for(auto route : routes) { int time = 0; for(int i=0; i 0 ? 1 : -1; m[{time++, {x, y}}]++; } while(y!=points[e][1]) { y += points[e][1] - y > 0 ? 1..
프로그래머스/2레벨
2025. 6. 8. 06:12