[백준 14469번] 소가 길을 건너간 이유 3 (C++)
문제링크 : https://www.acmicpc.net/problem/14469 #include using namespace std;typedef long long ll;typedef pair pii;const int MAX = INT_MAX;int N, a, b;vectorv;int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cin >> N; for(int i=0; i> a >> b; v.push_back({a, b}); } sort(v.begin(), v.end()); int time = v[0].first + v[0].second; for(int i=1; i 간단한 정렬문제이다.처음 도착시간을 기준으로..
백준/실버
2024. 6. 27. 18:49