#include "wiring.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
const int INF = 1e9+10;
const ll LINF = 1e18+10;
#define all(x) x.begin(), x.end()
#define sz(x) x.size()
#define mk make_pair
#define pb push_back
#define f first
#define s second
ll min_total_length(vector<int> r, vector<int> b) {
ll ans = 0;
for(auto x : r) ans -= x;
for(auto x : b) ans += x;
if(sz(b) > sz(r)) ans -= (ll)(sz(b) - sz(r)) * r.back();
else ans += (ll)(sz(r) - sz(b)) * b[0];
return ans;
}
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
13 ms |
1372 KB |
Output is correct |
4 |
Correct |
13 ms |
2908 KB |
Output is correct |
5 |
Correct |
13 ms |
2908 KB |
Output is correct |
6 |
Correct |
22 ms |
3924 KB |
Output is correct |
7 |
Correct |
17 ms |
3668 KB |
Output is correct |
8 |
Correct |
24 ms |
3932 KB |
Output is correct |
9 |
Correct |
17 ms |
3664 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '27', found: '12' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |