Submission #1088411

#TimeUsernameProblemLanguageResultExecution timeMemory
1088411MateiKing80A Plus B (IOI23_aplusb)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; vector<int> smallest_sums(int n, int a[], int b[]) { sort(a, a + n); sort(b, b + n); vector<int> x; for(int i = 0; i < n; i ++) for(int j = 0; j < n / (i + 1); j ++) x.push_back(a[i] + b[j]); sort(x.begin(), x.end()); x.resize(n); return n; }

Compilation message (stderr)

aplusb.cpp: In function 'std::vector<int> smallest_sums(int, int*, int*)':
aplusb.cpp:16:12: error: could not convert 'n' from 'int' to 'std::vector<int>'
   16 |     return n;
      |            ^
      |            |
      |            int