| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1200754 | mr_junk | 자매 도시 (APIO20_swap) | C++20 | 컴파일 에러 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
include "stub.h"
#define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)
#define int long long
using namespace std;
const int NN=1e2+60,N=1e6+70,MOD=1e9+7,inf=1e18+7,pr1=420,K=(int)(sqrt(2e5));
vector<pair<int,int>> g[N];
int getMinimumFuelCapacity(int X,int Y){
return -1;
}
void init(int N,int M,int U[],int V[],int W[]){
for(int i=0;i<M;i++){
g[U[i]].push_back({V[i],W[i]});
g[V[i]].push_back({U[i],W[i]});
}int q;
cin>>q;
while(q--){
int x,y;
cin>>x>>y;
getMinimunFuelCapacity(x,y);
}
}
컴파일 시 표준 에러 (stderr) 메시지
swap.cpp:2:1: error: 'include' does not name a type
2 | include "stub.h"
| ^~~~~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | vector<pair<int,int>> g[N];
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from swap.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
swap.cpp:7:1: error: 'vector' does not name a type
7 | vector<pair<int,int>> g[N];
| ^~~~~~
swap.cpp: In function 'void init(long long int, long long int, long long int*, long long int*, long long int*)':
swap.cpp:13:17: error: 'g' was not declared in this scope
13 | g[U[i]].push_back({V[i],W[i]});
| ^
swap.cpp:16:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
16 | cin>>q;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:75,
from swap.cpp:1:
/usr/include/c++/11/iostream:60:18: note: 'std::cin' declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
swap.cpp:20:17: error: 'getMinimunFuelCapacity' was not declared in this scope; did you mean 'getMinimumFuelCapacity'?
20 | getMinimunFuelCapacity(x,y);
| ^~~~~~~~~~~~~~~~~~~~~~
| getMinimumFuelCapacity