# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975089 |
2024-05-04T12:14:38 Z |
LucaIlie |
Wiring (IOI17_wiring) |
C++17 |
|
27 ms |
3932 KB |
#include "wiring.h"
#include <bits/stdc++.h>
using namespace std;
long long min_total_length( vector<int> r, vector<int> b ) {
int n = r.size(), m = b.size();
long long ans = 0;
for ( int i = 0; i < n; i++ )
ans -= r[i];
for ( int i = 0; i < m; i++ )
ans += b[i];
if ( n < m )
ans -= (long long)r[n - 1] * (m - n);
else
ans += (long long)b[0] * (n - m);
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 |
17 ms |
3068 KB |
Output is correct |
4 |
Correct |
13 ms |
2908 KB |
Output is correct |
5 |
Correct |
14 ms |
2908 KB |
Output is correct |
6 |
Correct |
17 ms |
3932 KB |
Output is correct |
7 |
Correct |
18 ms |
3932 KB |
Output is correct |
8 |
Correct |
27 ms |
3892 KB |
Output is correct |
9 |
Correct |
18 ms |
3932 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 |
- |