#include "wiring.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
long long min_total_length(std::vector<int> r, std::vector<int> b) {
int n=r.size(), m=b.size(), md=n>m?b[0]:r[n-1];
ll ans(0);
for (int i=0; i<n; i++) ans+=md-r[i];
for (int i=0; i<m; i++) ans+=b[i]-md;
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '25859', found: '-4909' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
14 ms |
3012 KB |
Output is correct |
4 |
Correct |
13 ms |
2976 KB |
Output is correct |
5 |
Correct |
13 ms |
3036 KB |
Output is correct |
6 |
Correct |
18 ms |
3668 KB |
Output is correct |
7 |
Correct |
17 ms |
3748 KB |
Output is correct |
8 |
Correct |
17 ms |
3664 KB |
Output is correct |
9 |
Correct |
22 ms |
3664 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '17703', found: '-19052' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
3rd lines differ - on the 1st token, expected: '27', found: '12' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '25859', found: '-4909' |
2 |
Halted |
0 ms |
0 KB |
- |