Submission #1066881

#TimeUsernameProblemLanguageResultExecution timeMemory
1066881MunkhErdeneA Plus B (IOI23_aplusb)C++17
Compilation error
0 ms0 KiB
vector<int> solve(int n, int arr1[100'000], int arr2[100'000]){ sort(arr1, arr1+n); sort(arr2, arr2+n); int g=0; int h=0; vector<int> result (100'000); for(int i=0 ; i<n ; i++){ result[i]=arr1[g]+arr2[h]; if(arr1[g+1]+arr2[h]>arr1[g]+arr2[h+1]){ h++; } else{ g++; } } return result; }

Compilation message (stderr)

aplusb.cpp:1:1: error: 'vector' does not name a type
    1 | vector<int> solve(int n, int arr1[100'000], int arr2[100'000]){
      | ^~~~~~