제출 #881714

#제출 시각아이디문제언어결과실행 시간메모리
881714spdlingA Plus B (IOI23_aplusb)C++17
컴파일 에러
0 ms0 KiB
vector<int> smallest_sums(int N, vector<int> A, vector<int> B) { vector<int> ans; int ans_n = 0; int i = 0, j = 0; while (ans_n < N) { ans.push_back(A[i] + B[j]); ans_n++; if (A[i] + B[j+1] < A[i+1] + B[j]) { ++j; } else { ++i; } } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

aplusb.cpp:2:1: error: 'vector' does not name a type
    2 | vector<int> smallest_sums(int N, vector<int> A, vector<int> B) {
      | ^~~~~~