제출 #869380

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8693802023-11-04 08:53:20vjudge1Commuter Pass (JOI18_commuter_pass)C++14
컴파일 에러
0 ms0 KiB
#include <iostream>
#include <limits>
#include <vector>
#include <set>
#include <cstdint>
using namespace std;
using Pair = pair<int64_t, int64_t>;
struct Edge
{
int64_t w, v, u;
};
constexpr int64_t maxn = 100000, inf = numeric_limits<int64_t>::max();
int64_t n, m, x1, y1, x2, y2;
Edge edge[maxn + 1];
vector<int64_t> adj[maxn + 1];
bool isVisited[maxn + 1];
bool DFS(int64_t v = x1)
{
isVisited[v] = true;
bool result = v == y1;
for (int64_t e : adj[v])
{
int64_t u = edge[e].v + edge[e].u - v;
if (isVisited[u])
continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

commuter_pass.cpp: In function 'int64_t Dijkstra()':
commuter_pass.cpp:47:12: error: missing template arguments before 'd'
   47 |     vector d = vector<int64_t>(n + 1, inf);
      |            ^
commuter_pass.cpp:50:5: error: 'd' was not declared in this scope
   50 |     d[x2] = 0;
      |     ^