Submission #759319

#TimeUsernameProblemLanguageResultExecution timeMemory
759319boyliguanhanStray Cat (JOI20_stray)C++17
5 / 100
41 ms19812 KiB
#include "Anthony.h" #include <bits/stdc++.h> using namespace std; vector<int> X; vector<pair<int, int>> adj[200100]; void dfs(int n, int p, int x) { for(auto i: adj[n]) if(i.first!=p) X[i.second] = x, dfs(i.first, n, !x); } std::vector<int> Mark(int N, int M, int A, int B, std::vector<int> U, std::vector<int> V) { X.resize(M); for(int i = 0; i < M; i++) adj[U[i]].push_back({V[i], i}), adj[V[i]].push_back({U[i], i}); dfs(0,N,0); return X; }
#include "Catherine.h" #include <vector> int a, b, prev, vis; void Init(int A, int B) { a = A; b = B; } int Move(std::vector<int> y) { if(y[!prev]) { vis = 1; return prev = !prev; } if(!vis){ vis = 1; return (bool)y[1];} else return -1; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...