Submission #1016124

# Submission time Handle Problem Language Result Execution time Memory
1016124 2024-07-07T12:21:00 Z 79brue Saveit (IOI10_saveit) C++17
50 / 100
178 ms 14336 KB
#include "grader.h"
#include "encoder.h"
#include <bits/stdc++.h>

using namespace std;

namespace {
    int n, h, m;
    vector<int> link[1002];
    int dist[50][1002];
    bool visited[50][1002];
}

void encode(int nv, int nh, int ne, int *v1, int *v2){
    n = nv, h = nh, m = ne;
    for(int i=0; i<m; i++){
        link[v1[i]].push_back(v2[i]);
        link[v2[i]].push_back(v1[i]);
    }
    for(int s=0; s<h; s++){
        queue<int> que;
        que.push(s);
        visited[s][s] = 1;
        while(!que.empty()){
            int x = que.front(); que.pop();
            for(int y: link[x]){
                if(visited[s][y]) continue;
                visited[s][y] = 1, dist[s][y] = dist[s][x]+1;
                que.push(y);
            }
        }
    }
    for(int i=0; i<h; i++) for(int j=0; j<n; j++) for(int d=0; d<10; d++){
        encode_bit((dist[i][j] >> d) & 1);
    }
}
#include "grader.h"
#include "decoder.h"
#include <bits/stdc++.h>

using namespace std;

namespace {
    int n, h;
}

void decode(int nv, int nh){
    n = nv, h = nh;
    for(int i=0; i<h; i++) for(int j=0; j<n; j++){
        int s = 0;
        for(int d=0; d<10; d++) s += decode_bit() << d;
        hops(i, j, s);
    }
}
# Verdict Execution time Memory Grader output
1 Correct 178 ms 14336 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 4624 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7700 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 4620 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 59 ms 9120 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 46 ms 9356 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 8576 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 52 ms 7928 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 44 ms 7728 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 64 ms 7660 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 41 ms 8108 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 52 ms 7856 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 54 ms 8620 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 46 ms 8104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 43 ms 9484 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 60 ms 9424 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 59 ms 8364 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 55 ms 8608 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 45 ms 9744 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 84 ms 8912 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 83 ms 10440 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 67 ms 8688 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10544 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 178 ms 14336 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 4624 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7700 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 4620 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 59 ms 9120 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 46 ms 9356 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 8576 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 52 ms 7928 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 44 ms 7728 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 64 ms 7660 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 41 ms 8108 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 52 ms 7856 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 54 ms 8620 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 46 ms 8104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 43 ms 9484 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 60 ms 9424 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 59 ms 8364 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 55 ms 8608 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 45 ms 9744 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 84 ms 8912 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 83 ms 10440 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 67 ms 8688 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10544 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 178 ms 14336 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 4624 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7700 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 4620 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 59 ms 9120 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 46 ms 9356 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 8576 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 52 ms 7928 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 44 ms 7728 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 64 ms 7660 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 41 ms 8108 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 52 ms 7856 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 54 ms 8620 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 46 ms 8104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 43 ms 9484 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 60 ms 9424 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 59 ms 8364 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 55 ms 8608 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 45 ms 9744 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 84 ms 8912 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 83 ms 10440 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 67 ms 8688 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10544 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 178 ms 14336 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 4624 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7700 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 2 ms 4620 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 59 ms 9120 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 46 ms 9356 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 69 ms 8576 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 52 ms 7928 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 44 ms 7728 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 64 ms 7660 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 41 ms 8108 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 52 ms 7856 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 54 ms 8620 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 46 ms 8104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 43 ms 9484 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 60 ms 9424 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 59 ms 8364 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 55 ms 8608 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 45 ms 9744 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 84 ms 8912 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 83 ms 10440 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 67 ms 8688 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10544 KB Output is partially correct - 360000 call(s) of encode_bit()