Submission details
Task:Polut
Sender:alli
Submission time:2026-01-17 15:45:17 +0200
Language:C++ (C++20)
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
#40
#50
Test results
testverdicttimegroup
#10.01 s1, 3, 4, 5details
#2ACCEPTED0.01 s1, 4, 5details
#30.01 s1, 4, 5details
#40.01 s1, 4, 5details
#50.20 s2, 5details
#60.20 s2, 5details
#70.01 s2, 4, 5details
#80.19 s3, 5details
#90.21 s3, 5details
#100.01 s3, 4, 5details
#110.01 s4, 5details
#120.01 s4, 5details
#130.20 s5details
#140.20 s5details
#150.01 s4, 5details
#16ACCEPTED0.01 s1, 4, 5details

Code

#include<bits/stdc++.h>
 
typedef long long ll;
using namespace std;
int n, m, p;
vector<int> v[101010];
int z[101010];
int l = 0;


void lyhyin(){
    queue<pair<int,int>> q;
    q.push({1,0});
    int a = 0;
    int r = 0;
    while (!q.empty()){
        int x = q.front().first, c = q.front().second; q.pop(); 
        if (x == n){
            r = c;
            break;
        }
        for (int i : v[x]){
            if (i == n) a++;
            if (z[i])continue;
            z[i] = 1;
            q.push({i,c+1});
        }
    }
    cout << r << " ";
    memset(z,0,sizeof(z));
    for (int j = 1; j < p; j++){
        a = 0;
        while (!q.empty()) q.pop();
        

        q.push({1,0});
        while (!q.empty()){
            int x = q.front().first, c = q.front().second; q.pop(); 
            if (c == 5) break;
            //cout << "x c " << x << " " << c << "\n"; 
            z[x] = 0;   
            if (x == n){
                if (c != r+j)
                a = 0;
                break;
            }
            for (int i : v[x]){
                if (i == n && c+1 == r+j) a++;
                z[i] = 1;
                q.push({i,c+1});
            }
        }
        cout << a << " ";
    }
    
}
 
int main(){
    
    cin >> n >> m >> p;
    for (int i = 1; i <= m; i++){
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    
    lyhyin();
}

Test details

Test 1 (public)

Group: 1, 3, 4, 5

Verdict:

input
4 5 3
1 2
1 3
2 3
2 4
...

correct output
2 2 10 

user output
2 0 0 

Feedback: Incorrect character on line 1 col 3: expected "2", got "0"

Test 2

Group: 1, 4, 5

Verdict: ACCEPTED

input
2 1 1
2 1

correct output

user output

Test 3

Group: 1, 4, 5

Verdict:

input
10 20 10
6 10
8 1
4 6
9 1
...

correct output
2 5 34 123 611 2503 11415 4882...

user output
2 0 0 0 0 0 0 0 0 0 

Feedback: Incorrect character on line 1 col 3: expected "5", got "0"

Test 4

Group: 1, 4, 5

Verdict:

input
10 20 10
4 10
2 3
8 4
7 8
...

correct output
1 7 26 140 509 2483 9454 43570...

user output
2 0 0 0 0 0 0 0 0 0 

Feedback: Incorrect character on line 1 col 1: expected "1", got "2"

Test 5

Group: 2, 5

Verdict:

input
100000 200000 2
96303 53915
64836 4748
6389 40954
60420 91374
...

correct output
1 0 

user output
8 0 

Feedback: Incorrect character on line 1 col 1: expected "1", got "8"

Test 6

Group: 2, 5

Verdict:

input
100000 200000 2
72817 17293
93269 856
51497 26888
41679 96276
...

correct output
5 8 

user output
10 0 

Feedback: Incorrect character on line 1 col 1: expected "5", got "10"

Test 7

Group: 2, 4, 5

Verdict:

input
474 517 2
1 2
1 3
2 4
3 4
...

correct output
0 0 

user output
59 0 

Feedback: Incorrect character on line 1 col 1: expected "0", got "59"

Test 8

Group: 3, 5

Verdict:

input
100000 200000 3
59846 53439
11468 57874
83443 13914
46177 15147
...

correct output
1 0 32 

user output
8 0 0 

Feedback: Incorrect character on line 1 col 1: expected "1", got "8"

Test 9

Group: 3, 5

Verdict:

input
100000 200000 3
23665 7205
83252 56604
14852 7299
2836 9864
...

correct output
1 0 33 

user output
8 0 0 

Feedback: Incorrect character on line 1 col 1: expected "1", got "8"

Test 10

Group: 3, 4, 5

Verdict:

input
474 517 3
1 2
1 3
2 4
3 4
...

correct output
0 0 986681410 

user output
59 0 0 

Feedback: Incorrect character on line 1 col 1: expected "0", got "59"

Test 11

Group: 4, 5

Verdict:

input
1000 2000 10
691 424
80 318
681 539
33 342
...

correct output
1 6 39 252 1242 7715 36269 212...

user output
5 0 0 0 0 0 0 0 0 0 

Feedback: Incorrect character on line 1 col 1: expected "1", got "5"

Test 12

Group: 4, 5

Verdict:

input
1000 2000 10
979 324
770 562
560 7
169 738
...

correct output
2 2 81 150 2435 6460 66843 223...

user output
5 0 0 0 0 0 0 0 0 0 

Feedback: Incorrect character on line 1 col 1: expected "2", got "5"

Test 13

Group: 5

Verdict:

input
100000 200000 10
54544 86042
14060 20746
47891 4317
76648 84193
...

correct output
1 3 54 169 1917 6237 56922 192...

user output
8 0 0 0 0 0 0 0 0 0 

Feedback: Incorrect character on line 1 col 1: expected "1", got "8"

Test 14

Group: 5

Verdict:

input
100000 200000 10
73275 88704
74521 54506
51906 57193
29561 44568
...

correct output
6 19 338 1212 12462 49357 3873...

user output
11 0 0 0 0 0 0 0 0 0 

Feedback: Incorrect character on line 1 col 1: expected "6", got "11"

Test 15

Group: 4, 5

Verdict:

input
1000 1989 10
822 821
979 989
138 139
968 981
...

correct output
1 44 2935 131120 6357888 28564...

user output
955 0 0 0 0 0 0 0 0 0 

Feedback: Incorrect character on line 1 col 1: expected "1", got "955"

Test 16

Group: 1, 4, 5

Verdict: ACCEPTED

input
3 3 1
1 2
1 3
2 3

correct output

user output