답안 #307958

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
307958 2020-09-29T16:40:08 Z tjdgus4384 자매 도시 (APIO20_swap) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
vector<int> U, V, W;
vector<pair<int, pair<int, int> > > mv;
int N, M, pa[100001];

int init(int n, int m, vector<int> u, vector<int> v, vector<int w){
    N=n, M=m, U=u, V=v, W=w;
}

int getMinimumFuelCapacity(int X, int Y){
    return -1;
}

Compilation message

swap.cpp:7:65: error: template argument 1 is invalid
    7 | int init(int n, int m, vector<int> u, vector<int> v, vector<int w){
      |                                                                 ^
swap.cpp:7:65: error: template argument 2 is invalid
swap.cpp:7:65: error: template argument 1 is invalid
swap.cpp:7:65: error: template argument 2 is invalid
swap.cpp:7:65: error: template argument 1 is invalid
swap.cpp:7:65: error: template argument 2 is invalid
swap.cpp:7:54: error: 'vector' is not a type
    7 | int init(int n, int m, vector<int> u, vector<int> v, vector<int w){
      |                                                      ^~~~~~
swap.cpp:7:60: error: expected ',' or '...' before '<' token
    7 | int init(int n, int m, vector<int> u, vector<int> v, vector<int w){
      |                                                            ^
swap.cpp: In function 'int init(int, int, std::vector<int>, std::vector<int>, int)':
swap.cpp:8:27: error: 'w' was not declared in this scope
    8 |     N=n, M=m, U=u, V=v, W=w;
      |                           ^
swap.cpp:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | }
      | ^