QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#147419#1212. Navigationppavic0 0ms0kbC++141.3kb2023-08-23 07:44:052023-08-25 01:29:31

Judging History

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

  • [2023-08-25 01:29:31]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-08-23 07:44:05]
  • 提交

Anna

#include <cstdio>
#include <vector>
#include "Annalib.h"

using namespace std;

#define X first
#define Y second
#define PB push_back

const int MAXN = 1e5 + 500;

vector < int > v[MAXN];
int dis[MAXN];

void dfs(int x, int lst) {
    dis[x] = dis[lst] + 1;
    for(int y : v[x])
        if(y != lst) dfs(y, x);
}

void Anna(int ty, int n, int t, int v1[], int v2[]) {
    for(int i = 0;i < n - 2;i++) {
        v[v1[i]].PB(v2[i]);
        v[v2[i]].PB(v1[i]);
    }
    dfs(t, t);
    if(ty <= 2) {
        for(int i = 1;i <= n;i++)
            Flag(i, dis[i] % 3);
    } else {
        for(int i = 1;i <= n;i++) {
            Flag(i, dis[i] % 4 == 0 || dis[i] % 4 == 3);
        }
    }
}

Bruno

#include <cstdio>
#include "Brunolib.h"

void Bruno(int ty, int cur, int my, int len, int sus[], int flg[]){
    if(ty <= 2) {
        for(int i = 0;i < len;i++) {
            if(flg[i] == (my + 2) % 3) {
                Answer(sus[i]); return;
            }
        }
        Answer(cur); return;
    } else {
        int cnt[2] = {0, 0};
        for(int i = 0;i < len;i++) {
            cnt[flg[i]]++;
        }    
        if(!cnt[0] || !cnt[1]) {
            Answer(cur);
        } else {
            for(int i = 0;i < len;i++) 
                if(cnt[flg[i]] == 1)
                    Answer(sus[i]);
        }
    }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Checker Judgement Failed

Test #1:

score: 0
Checker Judgement Failed

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:

1 94560 2 99999
91913 69503 39684 47595 96623 8011 15498 92403 84183 44035 39994 82975 30698 17596 93175 12253 60807 16111 35848 19061 25435 64721 79086 95487 98059 93865 84074 47584 77418 15271 82666 57858 21726 62847 90603 40247 64714 59668 13698 15586 58276 57618 20231 16177 77966 44363 69669 679...

input:

1 94560 2 99999
91913 69503 39684 47595 96623 8011 15498 92403 84183 44035 39994 82975 30698 17596 93175 12253 60807 16111 35848 19061 25435 64721 79086 95487 98059 93865 84074 47584 77418 15271 82666 57858 21726 62847 90603 40247 64714 59668 13698 15586 58276 57618 20231 16177 77966 44363 69669 679...

output:

16294

result:


Subtask #2:

score: 0
Checker Judgement Failed

Test #26:

score: 0
Checker Judgement Failed

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:

2 57165 2 99999
48992 19387 71033 13350 52013 39911 31569 57655 47865 61895 79639 35978 47454 76859 45447 31140 67169 95791 60405 80905 55354 95642 8667 88274 721 61541 31467 62158 93646 5791 37673 90967 70822 50373 6922 9211 12493 55791 99612 86337 52418 27225 13284 54010 57405 99213 36389 5528 532...

input:

2 57165 2 99999
48992 19387 71033 13350 52013 39911 31569 57655 47865 61895 79639 35978 47454 76859 45447 31140 67169 95791 60405 80905 55354 95642 8667 88274 721 61541 31467 62158 93646 5791 37673 90967 70822 50373 6922 9211 12493 55791 99612 86337 52418 27225 13284 54010 57405 99213 36389 5528 532...

output:

10261

result:


Subtask #3:

score: 0
Checker Judgement Failed

Test #53:

score: 0
Checker Judgement Failed

input:

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

output:

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

input:

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

output:

1

result:


Subtask #4:

score: 0
Checker Judgement Failed

Test #85:

score: 0
Checker Judgement Failed

input:

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

output:

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

input:

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

output:

4

result: