Submission #894839

# Submission time Handle Problem Language Result Execution time Memory
894839 2023-12-29T05:42:37 Z 12345678 Saveit (IOI10_saveit) C++17
50 / 100
184 ms 20624 KB
#include "grader.h"
#include "encoder.h"
#include <bits/stdc++.h>

using namespace std;

int a=0;

void send(int x)
{
    for (int i=0; i<10; i++) encode_bit((x&(1<<i)?1:0));
}

void encode(int nv, int nh, int ne, int *v1, int *v2){
    vector<int> d[nv];
    for (int i=0; i<ne; i++) d[v1[i]].push_back(v2[i]), d[v2[i]].push_back(v1[i]);
    for (int i=0; i<nh; i++)
    {
        vector<int> vs(nv), res(nv);
        queue<int> q;
        vs[i]=1;
        q.push(i);
        while (!q.empty())
        {
            int u=q.front();
            q.pop();
            for (auto v:d[u]) if (!vs[v]) res[v]=res[u]+1, vs[v]=1, q.push(v);
        }
        for (int j=0; j<nv; j++) send(res[j]);
    }
}
#include "grader.h"
#include "decoder.h"
#include <bits/stdc++.h>

using namespace std;

void decode(int nv, int nh) {
    for (int i=0; i<nh; i++)
    {
        for (int j=0; j<nv; j++)
        {
            int res=0;
            for (int k=0; k<10; k++) if (decode_bit()) res|=(1<<k);
            hops(i, j, res);
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 184 ms 20624 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 11268 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 51 ms 15592 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 11268 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 50 ms 15988 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 55 ms 15772 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 16032 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 51 ms 15528 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 54 ms 15416 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 55 ms 15412 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 57 ms 15520 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 15480 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 73 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 61 ms 15684 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 59 ms 15496 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 72 ms 15896 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 65 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 78 ms 16336 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 63 ms 15940 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 81 ms 18312 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 91 ms 18340 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 68 ms 16280 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 95 ms 18540 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 184 ms 20624 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 11268 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 51 ms 15592 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 11268 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 50 ms 15988 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 55 ms 15772 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 16032 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 51 ms 15528 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 54 ms 15416 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 55 ms 15412 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 57 ms 15520 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 15480 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 73 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 61 ms 15684 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 59 ms 15496 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 72 ms 15896 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 65 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 78 ms 16336 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 63 ms 15940 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 81 ms 18312 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 91 ms 18340 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 68 ms 16280 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 95 ms 18540 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 184 ms 20624 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 11268 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 51 ms 15592 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 11268 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 50 ms 15988 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 55 ms 15772 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 16032 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 51 ms 15528 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 54 ms 15416 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 55 ms 15412 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 57 ms 15520 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 15480 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 73 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 61 ms 15684 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 59 ms 15496 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 72 ms 15896 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 65 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 78 ms 16336 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 63 ms 15940 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 81 ms 18312 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 91 ms 18340 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 68 ms 16280 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 95 ms 18540 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 184 ms 20624 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 11268 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 51 ms 15592 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 11268 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 50 ms 15988 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 55 ms 15772 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 16032 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 51 ms 15528 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 54 ms 15416 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 55 ms 15412 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 57 ms 15520 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 15480 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 73 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 61 ms 15684 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 59 ms 15496 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 72 ms 15896 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 65 ms 15880 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 78 ms 16336 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 63 ms 15940 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 81 ms 18312 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 91 ms 18340 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 68 ms 16280 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 95 ms 18540 KB Output is partially correct - 360000 call(s) of encode_bit()