제출 #394261

#제출 시각아이디문제언어결과실행 시간메모리
394261Sugardorj자매 도시 (APIO20_swap)C++14
컴파일 에러
0 ms0 KiB
#include "swap.h" #include <bits/stdc++.h> using namespace std; int i,j,s,t; int a[261523],b[234567],l,r,tt,k,y,z,n,m,N,M,x; vector<int>te,so, p[1234],an; void init(int N, int M, vector <int> U,vector <int> V, vector <int> W) { m= W[0]; for (auto u:W) m=max (m,u); } int getMinimumFuelCapacity(int u, int v) { if (N==M+1) return -1; m= -1; for (auto u:W) m=max (m,u); return m; }

컴파일 시 표준 에러 (stderr) 메시지

swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:19:17: error: 'W' was not declared in this scope
   19 |     for (auto u:W)
      |                 ^