Submission #840843

# Submission time Handle Problem Language Result Execution time Memory
840843 2023-08-31T18:33:00 Z Desh03 A Plus B (IOI23_aplusb) C++17
30 / 100
10 ms 1484 KB
#include <bits/stdc++.h>

using namespace std;

vector<int> smallest_sums(int n, vector<int> a, vector<int> b) {
    vector<int> v;
    for (int j = 0; j < min(30, n); j++) {
        for (int i = j; i < n; i++) {
            v.push_back(a[j] + b[i]);
            if (i != j) v.push_back(b[j] + a[i]);        
        }
    }
    sort(v.begin(), v.end());
    return vector<int> (v.begin(), v.begin() + n);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 368 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 368 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 596 KB Output is correct
25 Correct 2 ms 596 KB Output is correct
26 Correct 7 ms 1484 KB Output is correct
27 Correct 8 ms 1484 KB Output is correct
28 Correct 8 ms 1484 KB Output is correct
29 Correct 1 ms 380 KB Output is correct
30 Correct 2 ms 720 KB Output is correct
31 Correct 3 ms 596 KB Output is correct
32 Correct 2 ms 596 KB Output is correct
33 Correct 7 ms 1484 KB Output is correct
34 Correct 9 ms 1484 KB Output is correct
35 Correct 10 ms 1484 KB Output is correct
36 Incorrect 8 ms 1484 KB 1st lines differ - on the 1662nd token, expected: '34563', found: '34586'
37 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 368 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 596 KB Output is correct
25 Correct 2 ms 596 KB Output is correct
26 Correct 7 ms 1484 KB Output is correct
27 Correct 8 ms 1484 KB Output is correct
28 Correct 8 ms 1484 KB Output is correct
29 Correct 1 ms 380 KB Output is correct
30 Correct 2 ms 720 KB Output is correct
31 Correct 3 ms 596 KB Output is correct
32 Correct 2 ms 596 KB Output is correct
33 Correct 7 ms 1484 KB Output is correct
34 Correct 9 ms 1484 KB Output is correct
35 Correct 10 ms 1484 KB Output is correct
36 Incorrect 8 ms 1484 KB 1st lines differ - on the 1662nd token, expected: '34563', found: '34586'
37 Halted 0 ms 0 KB -