Submission #1171751

#TimeUsernameProblemLanguageResultExecution timeMemory
1171751pawelkawaA Plus B (IOI23_aplusb)C++20
10 / 100
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; vector <int> smallest_sums(int N, vector <int> A, vector <int> B) { vector <int> C(N); if (N==1) { C[0] = A[0]+B[0]; } else { int i = 0, j = 0, k=0; while (k < N) { C[k] = (A[i]+B[j]); if (i == N-1) j++; else if (j == N-1) i++; else { if (A[i]+B[j+1] < A[i+1] + B[j]) j++; else i++; } k++; // cout << i << ' ' << j << endl; } } return C; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...