// incorrect/solution-wa.cpp
#include "aplusb.h"
#include <vector>
#include <algorithm>
std::vector<int> smallest_sums(int N, std::vector<int> A, std::vector<int> B) {
std::vector<int> ans(N);
std::vector<int> vec(2*N-1);
vec[0] = A[0] + B[0];
for(int i=1; i<N; i++) {
vec[i] = A[i] + B[0];
vec[N+i] = A[0] + B[i];
}
std::sort(vec.begin(),vec.end());
for(int i=0; i<N; i++) ans[i] = vec[i];
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 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 |
1 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 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '1', found: '0' |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 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 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '1', found: '0' |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 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 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '1', found: '0' |
6 |
Halted |
0 ms |
0 KB |
- |