# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
881729 | spdling | A Plus B (IOI23_aplusb) | C++17 | 0 ms | 756 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<vector>
using namespace std;
vector<int> smallest_sums(int N, vector<int> A, vector<int> B) {
vector<int> ans;
int ans_n = 0;
int i = 0, j = 0, last_i = 0, last_j = 0;
for (; ans_n < N;) {
ans.push_back(A[i] + B[j]);
ans_n++;
if (A[i] + B[j+1] < A[i+1] + B[0]) {
++j; i = last_i;
} else {
++i; j = 0;
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |