Submission #1135100

#TimeUsernameProblemLanguageResultExecution timeMemory
1135100Saul0906Thousands Islands (IOI22_islands)C++20
1.75 / 100
24 ms12228 KiB
#include "islands.h" #include <bits/stdc++.h> #define rep(a,b,c) for(ll a=b; a<c; a++) #define repr(a,b,c) for(ll a=b-1; a>c-1; a--) #define repa(a,b) for(auto a:b) #define ll long long #define pll pair<ll, ll> #define pii pair<int, int> #define fi first #define se second #define pb push_back #define mid ((l+r)>>1) #define ppb pop_back() using namespace std; using vi = vector<int>; template<typename T> using vec = vector<T>; const int N=2e5+5; vec<pii> adj[N]; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { rep(i,0,M) adj[U[i]].pb({V[i],i}); rep(i,0,M) adj[V[i]].pb({U[i],i}); if(adj[0].size()>=4) return true; repa(e,adj[0]) if(adj[e.fi].size()>=4 && e.se%2==0) return true; return false; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...