Submission #1027961

#TimeUsernameProblemLanguageResultExecution timeMemory
1027961JahonaliXA Plus B (IOI23_aplusb)C++17
60 / 100
1113 ms1470044 KiB
#include <bits/stdc++.h> using namespace std; vector<int> smallest_sums(int n, vector<int> a, vector<int> b) { vector<int> c; for (int i : a) for (int j : b) c.emplace_back(i + j); sort(c.begin(), c.end()); while (c.size() > n) c.pop_back(); return c; }

Compilation message (stderr)

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