Submission #759321

#TimeUsernameProblemLanguageResultExecution timeMemory
759321boyliguanhanStray Cat (JOI20_stray)C++17
0 / 100
28 ms20080 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+1)%3); } 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) { int cnt = 0; if(!y[0]) cnt++; if(!y[1]) cnt++; if(!y[2]) cnt++; if(cnt==1) { if(y[0]) return 0; if(y[1]) return 1; if(y[2]) return 2; } if(!y[0]) return 1; else if(!y[1]) return 2; else return 0; }
#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...