QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#647101#1212. Navigationfast_photon0 2ms8200kbC++14923b2024-10-17 11:41:102024-10-17 11:41:11

Judging History

你现在查看的是最新测评结果

  • [2024-10-17 11:41:11]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:8200kb
  • [2024-10-17 11:41:10]
  • 提交

Anna

#include "Annalib.h"
#include<vector>
#include<queue>
#include<cstring>

using namespace std;

int dis[100005], h[100005], en;
queue<int> q;
struct edge {
	int v, next;
} e[200005];
void add(int u, int v) {
	e[en] = (edge){v, h[u]}; h[u] = en++;
}

void Anna(int K, int N, int T, int A[], int B[]) {
	memset(dis, 0x3f, sizeof(dis));
	memset(h, 0xff, sizeof(h));
	en = 0;
	for(int i = 0; i < N - 1; i++) add(A[i], B[i]), add(B[i], A[i]);
	q.push(T);
	while(!q.empty()) {
		int r = q.front(); q.pop();
		Flag(r, (dis[r] / 2) % 2);
		for(int j = h[r]; ~j; j = e[j].next) {
			int v = e[j].v;
			if(dis[v] > 2) {
				if(v < r) dis[v] = dis[r];
				else dis[v] = 1 - dis[r];
			}
		}
	}
}

Bruno

#include "Brunolib.h"

void Bruno(int K, int S, int F, int L, int P[], int Q[]) {
	for(int i =  0; i < L; i++) {
		if((Q[i] == F) ^ (S > P[i])) {
			Answer(P[i]);
			return ;
		}
	}
	Answer(S);
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 7908kb

input:

100000 94560 16294 1
91913 94560
94560 69503
94560 39684
47595 94560
94560 96623
8011 94560
94560 15498
94560 92403
94560 84183
94560 44035
39994 94560
82975 94560
94560 30698
94560 17596
93175 94560
12253 94560
94560 60807
94560 16111
35848 94560
94560 19061
94560 25435
64721 94560
94560 79086
9548...

output:

Wrong Answer [4]

input:

21866 1 0 2
0 0 
0 0 

output:

1

result:

wrong answer Wrong Answer [5]

Subtask #2:

score: 0
Wrong Answer

Test #26:

score: 0
Wrong Answer
time: 2ms
memory: 7932kb

input:

100000 57165 10261 2
57165 48992
57165 19387
71033 57165
13350 57165
52013 57165
39911 57165
31569 57165
57165 57655
47865 57165
57165 61895
79639 57165
35978 57165
47454 57165
76859 57165
57165 45447
31140 57165
57165 67169
57165 95791
57165 60405
57165 80905
57165 55354
57165 95642
8667 57165
8827...

output:

Wrong Answer [4]

input:

22073 1 0 2
0 0 
0 0 

output:

1

result:

wrong answer Wrong Answer [5]

Subtask #3:

score: 0
Wrong Answer

Test #53:

score: 0
Wrong Answer
time: 0ms
memory: 7904kb

input:

5 4 1 3
2 4
3 4
5 4
4 1

output:

Wrong Answer [4]

input:

21939 1 0 2
0 0 
0 0 

output:

1

result:

wrong answer Wrong Answer [5]

Subtask #4:

score: 0
Wrong Answer

Test #85:

score: 0
Wrong Answer
time: 2ms
memory: 8200kb

input:

5 5 4 4
5 1
5 4
5 3
2 5

output:

Wrong Answer [4]

input:

21873 1 0 2
0 0 
0 0 

output:

1

result:

wrong answer Wrong Answer [5]