# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
416492 |
2021-06-02T13:33:04 Z |
yanire |
Wiring (IOI17_wiring) |
C++11 |
|
29 ms |
1856 KB |
#include <bits/stdc++.h>
using namespace std;
#include "wiring.h"
#define fin(i,s,n) for(auto i = s; i < n; ++i)
#define fine(i,s,n) for(auto i = s; i <= n; ++i)
#define pb push_back
#define eb emplace_back
#define x first
#define y second
#define all(x) (x).begin(),(x).end()
#define chkmin(a,b) a = min(a,b)
#define chkmax(a,b) a = max(a,b)
using stdvec = vector<int>;
#define int int64_t
using ii = pair<int,int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vii = vector<ii>;
const int inf = 1e17;
#define sz(a) int((a).size())
long long min_total_length(stdvec r, stdvec b) {
int n = r.size(), m = b.size();
int X = r.back();
int ans = 0;
fin(i,0,n) ans += X-r[i];
fin(i,0,m) ans += b[i]-X;
if(n>m) ans += (n-m)*(b[0]-X);
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 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 |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
25 ms |
1400 KB |
Output is correct |
4 |
Correct |
21 ms |
1404 KB |
Output is correct |
5 |
Correct |
20 ms |
1400 KB |
Output is correct |
6 |
Correct |
27 ms |
1848 KB |
Output is correct |
7 |
Correct |
29 ms |
1844 KB |
Output is correct |
8 |
Correct |
27 ms |
1856 KB |
Output is correct |
9 |
Correct |
27 ms |
1844 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 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 |
0 ms |
204 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 |
204 KB |
3rd lines differ - on the 1st token, expected: '25859', found: '-4909' |
2 |
Halted |
0 ms |
0 KB |
- |