Submission #1027974

#TimeUsernameProblemLanguageResultExecution timeMemory
1027974JahonaliXA Plus B (IOI23_aplusb)C++17
10 / 100
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; vector<int> smallest_sums(int n, vector<int> a, vector<int> b) { vector<int> c = {a[0] + b[0]}; int i = 1, j = 1; while (c.size() < n) { if (a[i] + b[0] > b[j] + a[0]) c.emplace_back(b[j++] + a[0]); else c.emplace_back(a[i++] + b[0]); } return c; }

Compilation message (stderr)

aplusb.cpp: In function 'std::vector<int> smallest_sums(int, std::vector<int>, std::vector<int>)':
aplusb.cpp:8:21: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
    8 |     while (c.size() < n) {
      |            ~~~~~~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...