답안 #394255

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
394255 2021-04-26T09:06:56 Z Sugardorj 자매 도시 (APIO20_swap) C++14
컴파일 오류
0 ms 0 KB
#include "swap.h"
#include <bits/stdc++.h>
using namespace std;
long long  i,j,s,t;
long long a[261523],b[234567],l,r,tt,k,y,z,n,m,x;
vector<long long>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)
        if (u>m)
          	m=u;
}
int getMinimumFuelCapacity(int u, int v) {
    if (N==M+1)
        return -1;
    
    
    return m;
}

Compilation message

swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:16:9: error: 'N' was not declared in this scope
   16 |     if (N==M+1)
      |         ^
swap.cpp:16:12: error: 'M' was not declared in this scope
   16 |     if (N==M+1)
      |            ^