답안 #1016122

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1016122 2024-07-07T12:18:03 Z 79brue 저장 (Saveit) (IOI10_saveit) C++17
0 / 100
192 ms 14000 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[1002][1002];
    bool visited[1002][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<pair<int, int> > que;
        que.push(make_pair(s, 0));
        visited[s][s] = 1;
        while(!que.empty()){
            auto &[x, d] = que.front(); que.pop();
            for(int y: link[x]){
                if(visited[s][y]) continue;
                visited[s][y] = 1, dist[s][y] = d+1;
                que.push(make_pair(y, d+1));
            }
        }
    }
    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);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 192 ms 14000 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 6672 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7680 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 1 ms 4624 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 54 ms 7856 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 42 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 57 ms 10412 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 56 ms 9136 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 50 ms 9132 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 59 ms 9136 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 45 ms 8276 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 7900 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 70 ms 8732 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 43 ms 9104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 50 ms 7976 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 59 ms 8668 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Incorrect 55 ms 8460 KB Output isn't correct
18 Correct 60 ms 9900 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 48 ms 9644 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Incorrect 66 ms 9964 KB Output isn't correct
21 Correct 84 ms 10604 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 74 ms 8544 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10660 KB Output is partially correct - 360000 call(s) of encode_bit()
# 결과 실행 시간 메모리 Grader output
1 Correct 192 ms 14000 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 6672 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7680 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 1 ms 4624 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 54 ms 7856 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 42 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 57 ms 10412 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 56 ms 9136 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 50 ms 9132 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 59 ms 9136 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 45 ms 8276 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 7900 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 70 ms 8732 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 43 ms 9104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 50 ms 7976 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 59 ms 8668 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Incorrect 55 ms 8460 KB Output isn't correct
18 Correct 60 ms 9900 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 48 ms 9644 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Incorrect 66 ms 9964 KB Output isn't correct
21 Correct 84 ms 10604 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 74 ms 8544 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10660 KB Output is partially correct - 360000 call(s) of encode_bit()
# 결과 실행 시간 메모리 Grader output
1 Correct 192 ms 14000 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 6672 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7680 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 1 ms 4624 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 54 ms 7856 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 42 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 57 ms 10412 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 56 ms 9136 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 50 ms 9132 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 59 ms 9136 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 45 ms 8276 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 7900 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 70 ms 8732 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 43 ms 9104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 50 ms 7976 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 59 ms 8668 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Incorrect 55 ms 8460 KB Output isn't correct
18 Correct 60 ms 9900 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 48 ms 9644 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Incorrect 66 ms 9964 KB Output isn't correct
21 Correct 84 ms 10604 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 74 ms 8544 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10660 KB Output is partially correct - 360000 call(s) of encode_bit()
# 결과 실행 시간 메모리 Grader output
1 Correct 192 ms 14000 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 1 ms 6672 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 40 ms 7680 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 1 ms 4624 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 54 ms 7856 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 42 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 57 ms 10412 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 56 ms 9136 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 50 ms 9132 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 59 ms 9136 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 45 ms 8276 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 56 ms 7900 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 70 ms 8732 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 43 ms 9104 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 50 ms 7976 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 59 ms 8668 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Incorrect 55 ms 8460 KB Output isn't correct
18 Correct 60 ms 9900 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 48 ms 9644 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Incorrect 66 ms 9964 KB Output isn't correct
21 Correct 84 ms 10604 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 74 ms 8544 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 77 ms 10660 KB Output is partially correct - 360000 call(s) of encode_bit()