Submission #710324

# Submission time Handle Problem Language Result Execution time Memory
710324 2023-03-15T07:17:28 Z hpesoj Stray Cat (JOI20_stray) C++17
0 / 100
39 ms 15232 KB
#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 time Memory Grader output
1 Incorrect 39 ms 15232 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 15232 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 12948 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 12948 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 1284 KB Output is correct
2 Correct 1 ms 1024 KB Output is correct
3 Correct 2 ms 1284 KB Output is correct
4 Correct 2 ms 1292 KB Output is correct
5 Correct 2 ms 1284 KB Output is correct
6 Correct 2 ms 1284 KB Output is correct
7 Correct 2 ms 1284 KB Output is correct
8 Correct 2 ms 1284 KB Output is correct
9 Correct 2 ms 1292 KB Output is correct
10 Correct 2 ms 1296 KB Output is correct
11 Correct 2 ms 1292 KB Output is correct
12 Incorrect 2 ms 1292 KB Wrong Answer [6]
13 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 11264 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 33 ms 11360 KB Output is correct
2 Incorrect 30 ms 11372 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -