Submission #68188

#TimeUsernameProblemLanguageResultExecution timeMemory
68188mirbek01Wiring (IOI17_wiring)C++17
Compilation error
0 ms0 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; long long min_total_length(vector<int> r, vector<int> b) { long long ans = 0; int n = (int)(r.size()); int m = (int)(b.size()); for(int i = 0; i < n; i ++) ans += b[0] - a[i]; for(int i = 0; i < m; i ++) ans += b[i] - a[n - 1]; return ans; }

Compilation message (stderr)

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:11:27: error: 'a' was not declared in this scope
             ans += b[0] - a[i];
                           ^
wiring.cpp:13:27: error: 'a' was not declared in this scope
             ans += b[i] - a[n - 1];
                           ^