Submission #869400

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8694002023-11-04 09:13:15vjudge1Commuter Pass (JOI18_commuter_pass)C++17
0 / 100
240 ms18524 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, maxm = 200000, inf = numeric_limits<int64_t>::max();
int64_t n, m, x1, y1, x2, y2;
Edge edge[maxm + 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
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...