Submission #1051276

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10512762024-08-10 03:24:08andecaandeciSenior Postmen (BOI14_postmen)C++17
0 / 100
159 ms262144 KiB
#include <bits/stdc++.h>
#define nikah ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
const ll maxn = 5e5+7, modn = 1e9+7;
using namespace std;
ll n,m,cur=0;
vector<pll>adj[maxn];
vector<ll>ans[maxn];
ll par[maxn], cnt[maxn];
bool cek[maxn];
void dfs(ll node) {
for (auto [next, idx] : adj[node]) {
if (cek[idx]) continue;
cek[idx] = 1;
cnt[node]--;
cnt[next]--;
par[next] = node;
if (cnt[next] % 2 == 0) {
cur++;
ans[cur].pb(next);
ll bt = node;
while (bt != next) {
ans[cur].pb(bt);
bt = par[bt];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...