Submission #583245

# Submission time Handle Problem Language Result Execution time Memory
583245 2022-06-25T06:38:17 Z Jomnoi Saveit (IOI10_saveit) C++17
0 / 100
252 ms 12616 KB
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
using namespace std;

const int MAX_N = 1000;

vector <int> graph[MAX_N];
int dist[MAX_N][MAX_N];

void encode(int nv, int nh, int ne, int *v1, int *v2) {
    for(int i = 0; i < ne; i++) {
        graph[v1[i]].push_back(v2[i]);
        graph[v2[i]].push_back(v1[i]);
    }

    for(int i = 0; i < nh; i++) {
        for(int j = 0; j < nv; j++) {
            dist[i][j] = -1;
        }

        queue <int> q;
        dist[i][i] = 0;
        q.push(i);
        while(!q.empty()) {
            int u = q.front();
            q.pop();

            for(auto v : graph[u]) {
                if(dist[i][v] == -1) {
                    dist[i][v] = dist[i][u] + 1;
                    q.push(v);
                }
            }
        }
    }

    for(int i = 0; i < nh; i++) {
        for(int j = 0; j < nv; j++) {
            for(int k = 0; k < 10; k++) {
                if((1<<k) & dist[i][j]) {
                    encode_bit(1);
                }
                else {
                    encode_bit(0);
                }
            }
        }
    }
}
#include <bits/stdc++.h>
#include "grader.h"
#include "decoder.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 sum = 0;
            for(int k = 0; k < 10; k++) {
                sum += (1<<k) * decode_bit();
            }

            cout << i << ' ' << j << " : " << sum << endl;
            hops(i, j, sum);
        }
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 252 ms 12616 KB Do not print anything to standard output: 0 0 : 0
2 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
3 Incorrect 78 ms 7472 KB Do not print anything to standard output: 0 0 : 0
4 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
5 Incorrect 91 ms 7644 KB Do not print anything to standard output: 0 0 : 0
6 Incorrect 102 ms 7960 KB Do not print anything to standard output: 0 0 : 0
7 Incorrect 128 ms 8256 KB Do not print anything to standard output: 0 0 : 0
8 Incorrect 120 ms 7448 KB Do not print anything to standard output: 0 0 : 0
9 Incorrect 95 ms 7712 KB Do not print anything to standard output: 0 0 : 0
10 Incorrect 97 ms 7740 KB Do not print anything to standard output: 0 0 : 0
11 Incorrect 104 ms 7804 KB Do not print anything to standard output: 0 0 : 0
12 Incorrect 90 ms 7676 KB Do not print anything to standard output: 0 0 : 0
13 Incorrect 119 ms 8420 KB Do not print anything to standard output: 0 0 : 0
14 Incorrect 94 ms 7956 KB Do not print anything to standard output: 0 0 : 0
15 Incorrect 96 ms 7784 KB Do not print anything to standard output: 0 0 : 0
16 Incorrect 115 ms 8364 KB Do not print anything to standard output: 0 0 : 0
17 Incorrect 122 ms 8240 KB Do not print anything to standard output: 0 0 : 0
18 Incorrect 115 ms 8476 KB Do not print anything to standard output: 0 0 : 0
19 Incorrect 110 ms 8096 KB Do not print anything to standard output: 0 0 : 0
20 Incorrect 151 ms 8800 KB Do not print anything to standard output: 0 0 : 0
21 Incorrect 182 ms 8912 KB Do not print anything to standard output: 0 0 : 0
22 Incorrect 151 ms 8564 KB Do not print anything to standard output: 0 0 : 0
23 Incorrect 172 ms 9140 KB Do not print anything to standard output: 0 0 : 0
# Verdict Execution time Memory Grader output
1 Incorrect 252 ms 12616 KB Do not print anything to standard output: 0 0 : 0
2 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
3 Incorrect 78 ms 7472 KB Do not print anything to standard output: 0 0 : 0
4 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
5 Incorrect 91 ms 7644 KB Do not print anything to standard output: 0 0 : 0
6 Incorrect 102 ms 7960 KB Do not print anything to standard output: 0 0 : 0
7 Incorrect 128 ms 8256 KB Do not print anything to standard output: 0 0 : 0
8 Incorrect 120 ms 7448 KB Do not print anything to standard output: 0 0 : 0
9 Incorrect 95 ms 7712 KB Do not print anything to standard output: 0 0 : 0
10 Incorrect 97 ms 7740 KB Do not print anything to standard output: 0 0 : 0
11 Incorrect 104 ms 7804 KB Do not print anything to standard output: 0 0 : 0
12 Incorrect 90 ms 7676 KB Do not print anything to standard output: 0 0 : 0
13 Incorrect 119 ms 8420 KB Do not print anything to standard output: 0 0 : 0
14 Incorrect 94 ms 7956 KB Do not print anything to standard output: 0 0 : 0
15 Incorrect 96 ms 7784 KB Do not print anything to standard output: 0 0 : 0
16 Incorrect 115 ms 8364 KB Do not print anything to standard output: 0 0 : 0
17 Incorrect 122 ms 8240 KB Do not print anything to standard output: 0 0 : 0
18 Incorrect 115 ms 8476 KB Do not print anything to standard output: 0 0 : 0
19 Incorrect 110 ms 8096 KB Do not print anything to standard output: 0 0 : 0
20 Incorrect 151 ms 8800 KB Do not print anything to standard output: 0 0 : 0
21 Incorrect 182 ms 8912 KB Do not print anything to standard output: 0 0 : 0
22 Incorrect 151 ms 8564 KB Do not print anything to standard output: 0 0 : 0
23 Incorrect 172 ms 9140 KB Do not print anything to standard output: 0 0 : 0
# Verdict Execution time Memory Grader output
1 Incorrect 252 ms 12616 KB Do not print anything to standard output: 0 0 : 0
2 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
3 Incorrect 78 ms 7472 KB Do not print anything to standard output: 0 0 : 0
4 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
5 Incorrect 91 ms 7644 KB Do not print anything to standard output: 0 0 : 0
6 Incorrect 102 ms 7960 KB Do not print anything to standard output: 0 0 : 0
7 Incorrect 128 ms 8256 KB Do not print anything to standard output: 0 0 : 0
8 Incorrect 120 ms 7448 KB Do not print anything to standard output: 0 0 : 0
9 Incorrect 95 ms 7712 KB Do not print anything to standard output: 0 0 : 0
10 Incorrect 97 ms 7740 KB Do not print anything to standard output: 0 0 : 0
11 Incorrect 104 ms 7804 KB Do not print anything to standard output: 0 0 : 0
12 Incorrect 90 ms 7676 KB Do not print anything to standard output: 0 0 : 0
13 Incorrect 119 ms 8420 KB Do not print anything to standard output: 0 0 : 0
14 Incorrect 94 ms 7956 KB Do not print anything to standard output: 0 0 : 0
15 Incorrect 96 ms 7784 KB Do not print anything to standard output: 0 0 : 0
16 Incorrect 115 ms 8364 KB Do not print anything to standard output: 0 0 : 0
17 Incorrect 122 ms 8240 KB Do not print anything to standard output: 0 0 : 0
18 Incorrect 115 ms 8476 KB Do not print anything to standard output: 0 0 : 0
19 Incorrect 110 ms 8096 KB Do not print anything to standard output: 0 0 : 0
20 Incorrect 151 ms 8800 KB Do not print anything to standard output: 0 0 : 0
21 Incorrect 182 ms 8912 KB Do not print anything to standard output: 0 0 : 0
22 Incorrect 151 ms 8564 KB Do not print anything to standard output: 0 0 : 0
23 Incorrect 172 ms 9140 KB Do not print anything to standard output: 0 0 : 0
# Verdict Execution time Memory Grader output
1 Incorrect 252 ms 12616 KB Do not print anything to standard output: 0 0 : 0
2 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
3 Incorrect 78 ms 7472 KB Do not print anything to standard output: 0 0 : 0
4 Incorrect 2 ms 4608 KB Do not print anything to standard output: 0 0 : 0
5 Incorrect 91 ms 7644 KB Do not print anything to standard output: 0 0 : 0
6 Incorrect 102 ms 7960 KB Do not print anything to standard output: 0 0 : 0
7 Incorrect 128 ms 8256 KB Do not print anything to standard output: 0 0 : 0
8 Incorrect 120 ms 7448 KB Do not print anything to standard output: 0 0 : 0
9 Incorrect 95 ms 7712 KB Do not print anything to standard output: 0 0 : 0
10 Incorrect 97 ms 7740 KB Do not print anything to standard output: 0 0 : 0
11 Incorrect 104 ms 7804 KB Do not print anything to standard output: 0 0 : 0
12 Incorrect 90 ms 7676 KB Do not print anything to standard output: 0 0 : 0
13 Incorrect 119 ms 8420 KB Do not print anything to standard output: 0 0 : 0
14 Incorrect 94 ms 7956 KB Do not print anything to standard output: 0 0 : 0
15 Incorrect 96 ms 7784 KB Do not print anything to standard output: 0 0 : 0
16 Incorrect 115 ms 8364 KB Do not print anything to standard output: 0 0 : 0
17 Incorrect 122 ms 8240 KB Do not print anything to standard output: 0 0 : 0
18 Incorrect 115 ms 8476 KB Do not print anything to standard output: 0 0 : 0
19 Incorrect 110 ms 8096 KB Do not print anything to standard output: 0 0 : 0
20 Incorrect 151 ms 8800 KB Do not print anything to standard output: 0 0 : 0
21 Incorrect 182 ms 8912 KB Do not print anything to standard output: 0 0 : 0
22 Incorrect 151 ms 8564 KB Do not print anything to standard output: 0 0 : 0
23 Incorrect 172 ms 9140 KB Do not print anything to standard output: 0 0 : 0