#include "aplusb.h"
#include <bits/stdc++.h>
using namespace std;
// #define int long long
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define pb push_back
#define all(a) a.begin(), a.end()
#define endl "\n"
void printVector(vector<int> a){
for (auto x: a) cout << x << " ";
cout << endl;
}
vector<int> smallest_sums(int N, vector<int> A, vector<int> B) {
vector<int> x;
int u = A[0];
FOR(i,0,N){
FOR(j,0,N){
x.pb(B[i]+A[j]);
}
}
sort(all(x));
vector<int> ans;
FOR(i,0,N) ans.pb(x[i]);
return ans;
}
Compilation message
aplusb.cpp: In function 'std::vector<int> smallest_sums(int, std::vector<int>, std::vector<int>)':
aplusb.cpp:18:6: warning: unused variable 'u' [-Wunused-variable]
18 | int u = A[0];
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
432 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
432 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
3 ms |
728 KB |
Output is correct |
23 |
Correct |
35 ms |
5612 KB |
Output is correct |
24 |
Correct |
34 ms |
6440 KB |
Output is correct |
25 |
Correct |
33 ms |
5324 KB |
Output is correct |
26 |
Correct |
389 ms |
33572 KB |
Output is correct |
27 |
Correct |
392 ms |
33980 KB |
Output is correct |
28 |
Correct |
393 ms |
33980 KB |
Output is correct |
29 |
Correct |
2 ms |
724 KB |
Output is correct |
30 |
Correct |
20 ms |
5580 KB |
Output is correct |
31 |
Correct |
16 ms |
5064 KB |
Output is correct |
32 |
Correct |
17 ms |
6244 KB |
Output is correct |
33 |
Correct |
175 ms |
33984 KB |
Output is correct |
34 |
Correct |
209 ms |
34496 KB |
Output is correct |
35 |
Correct |
108 ms |
34492 KB |
Output is correct |
36 |
Correct |
311 ms |
33980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
432 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
3 ms |
728 KB |
Output is correct |
23 |
Correct |
35 ms |
5612 KB |
Output is correct |
24 |
Correct |
34 ms |
6440 KB |
Output is correct |
25 |
Correct |
33 ms |
5324 KB |
Output is correct |
26 |
Correct |
389 ms |
33572 KB |
Output is correct |
27 |
Correct |
392 ms |
33980 KB |
Output is correct |
28 |
Correct |
393 ms |
33980 KB |
Output is correct |
29 |
Correct |
2 ms |
724 KB |
Output is correct |
30 |
Correct |
20 ms |
5580 KB |
Output is correct |
31 |
Correct |
16 ms |
5064 KB |
Output is correct |
32 |
Correct |
17 ms |
6244 KB |
Output is correct |
33 |
Correct |
175 ms |
33984 KB |
Output is correct |
34 |
Correct |
209 ms |
34496 KB |
Output is correct |
35 |
Correct |
108 ms |
34492 KB |
Output is correct |
36 |
Correct |
311 ms |
33980 KB |
Output is correct |
37 |
Execution timed out |
1143 ms |
1651428 KB |
Time limit exceeded |
38 |
Halted |
0 ms |
0 KB |
- |