Submission #710324

#TimeUsernameProblemLanguageResultExecution timeMemory
710324hpesojStray Cat (JOI20_stray)C++17
0 / 100
39 ms15232 KiB
#include <bits/stdc++.h> #include "Anthony.h" #define pb push_back #define pi pair <int, int> #define fi first #define se second using namespace std; vector <pi> adj[20005]; vector <int> ans; int mark = 0; queue <int> q; bool visited[20005]; void bfs(int x){ q.push(x); while(!q.empty()){ int sz = q.size(); while(sz--){ int curr = q.front(); q.pop(); visited[curr] = 1; for(pi i : adj[curr]) if(!visited[i.fi]) ans[i.se] = mark, q.push(i.fi); } mark = !mark; } } std::vector <int> Mark(int n, int m, int a, int b, std::vector <int> u, std::vector <int> v){ for(int i = 0; i < m; i++) ans.pb(0); for(int i = 0; i < m; i++) adj[u[i]].pb({v[i], i}), adj[v[i]].pb({u[i], i}); bfs(0); return ans; }
#include <bits/stdc++.h> #include "Catherine.h" #define pb push_back #define pi pair <int, int> #define fi first #define se second using namespace std; void Init(int a, int b){ ; } int Move(std::vector <int> y){ for(int i = 0; i < 2; i++) if(y[i] == 1) return i; 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...