제출 #68188

#제출 시각아이디문제언어결과실행 시간메모리
68188mirbek01Wiring (IOI17_wiring)C++17
컴파일 에러
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;
}

컴파일 시 표준 에러 (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];
                           ^