Submission #271116

# Submission time Handle Problem Language Result Execution time Memory
271116 2020-08-18T04:46:18 Z 최은수(#5096) Saveit (IOI10_saveit) C++14
0 / 100
318 ms 136040 KB
#include"grader.h"
#include"encoder.h"
#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
static vector<int>adj[1010];
static vector<int>make(int n,int sc)
{
    vector<bool>chk(n,0);
    vector<int>dis(n,0);
    chk[sc]=1;
    dis[sc]=0;
    queue<int>q;
    q.ep(sc);
    while(!q.empty())
    {
        int x=q.front();
        q.pop();
        for(int&t:adj[x])
            if(!chk[t])
                chk[t]=1,dis[t]=dis[x]+1,q.ep(t);
    }
    return dis;
}
void encode(int nv,int nh,int ne,int*v1,int*v2)
{
    for(int i=0;i<ne;i++)
        adj[v1[i]].eb(v2[i]),adj[v2[i]].eb(v1[i]);
    for(int i=0;i<nh;i++)
    {
        vector<int>get=make(nv,i);
        for(int j=0;j<nv;i++)
            for(int k=0;k<10;k++)
                encode_bit(get[j]>>k&1);
    }
    return;
}
#include"grader.h"
#include"decoder.h"
#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
void decode(int nv,int nh)
{
    for(int i=0;i<nh;i++)
    {
        for(int j=0;j<nv;j++)
        {
            int x=0;
            for(int k=0;k<10;k++)
                x|=decode_bit()<<k;
            hops(i,j,x);
        }
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 318 ms 136040 KB too many calls to encode_bit(b) function
2 Incorrect 105 ms 125936 KB too many calls to encode_bit(b) function
3 Incorrect 91 ms 126448 KB too many calls to encode_bit(b) function
4 Incorrect 92 ms 126192 KB too many calls to encode_bit(b) function
5 Incorrect 96 ms 126952 KB too many calls to encode_bit(b) function
6 Incorrect 101 ms 126704 KB too many calls to encode_bit(b) function
7 Incorrect 118 ms 127472 KB too many calls to encode_bit(b) function
8 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
9 Incorrect 95 ms 126448 KB too many calls to encode_bit(b) function
10 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
11 Incorrect 100 ms 126704 KB too many calls to encode_bit(b) function
12 Incorrect 93 ms 126544 KB too many calls to encode_bit(b) function
13 Incorrect 120 ms 127736 KB too many calls to encode_bit(b) function
14 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
15 Incorrect 102 ms 126512 KB too many calls to encode_bit(b) function
16 Incorrect 121 ms 127528 KB too many calls to encode_bit(b) function
17 Incorrect 126 ms 127216 KB too many calls to encode_bit(b) function
18 Incorrect 121 ms 128008 KB too many calls to encode_bit(b) function
19 Incorrect 111 ms 126960 KB too many calls to encode_bit(b) function
20 Incorrect 143 ms 128496 KB too many calls to encode_bit(b) function
21 Incorrect 135 ms 129088 KB too many calls to encode_bit(b) function
22 Incorrect 120 ms 127728 KB too many calls to encode_bit(b) function
23 Incorrect 144 ms 129264 KB too many calls to encode_bit(b) function
# Verdict Execution time Memory Grader output
1 Incorrect 318 ms 136040 KB too many calls to encode_bit(b) function
2 Incorrect 105 ms 125936 KB too many calls to encode_bit(b) function
3 Incorrect 91 ms 126448 KB too many calls to encode_bit(b) function
4 Incorrect 92 ms 126192 KB too many calls to encode_bit(b) function
5 Incorrect 96 ms 126952 KB too many calls to encode_bit(b) function
6 Incorrect 101 ms 126704 KB too many calls to encode_bit(b) function
7 Incorrect 118 ms 127472 KB too many calls to encode_bit(b) function
8 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
9 Incorrect 95 ms 126448 KB too many calls to encode_bit(b) function
10 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
11 Incorrect 100 ms 126704 KB too many calls to encode_bit(b) function
12 Incorrect 93 ms 126544 KB too many calls to encode_bit(b) function
13 Incorrect 120 ms 127736 KB too many calls to encode_bit(b) function
14 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
15 Incorrect 102 ms 126512 KB too many calls to encode_bit(b) function
16 Incorrect 121 ms 127528 KB too many calls to encode_bit(b) function
17 Incorrect 126 ms 127216 KB too many calls to encode_bit(b) function
18 Incorrect 121 ms 128008 KB too many calls to encode_bit(b) function
19 Incorrect 111 ms 126960 KB too many calls to encode_bit(b) function
20 Incorrect 143 ms 128496 KB too many calls to encode_bit(b) function
21 Incorrect 135 ms 129088 KB too many calls to encode_bit(b) function
22 Incorrect 120 ms 127728 KB too many calls to encode_bit(b) function
23 Incorrect 144 ms 129264 KB too many calls to encode_bit(b) function
# Verdict Execution time Memory Grader output
1 Incorrect 318 ms 136040 KB too many calls to encode_bit(b) function
2 Incorrect 105 ms 125936 KB too many calls to encode_bit(b) function
3 Incorrect 91 ms 126448 KB too many calls to encode_bit(b) function
4 Incorrect 92 ms 126192 KB too many calls to encode_bit(b) function
5 Incorrect 96 ms 126952 KB too many calls to encode_bit(b) function
6 Incorrect 101 ms 126704 KB too many calls to encode_bit(b) function
7 Incorrect 118 ms 127472 KB too many calls to encode_bit(b) function
8 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
9 Incorrect 95 ms 126448 KB too many calls to encode_bit(b) function
10 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
11 Incorrect 100 ms 126704 KB too many calls to encode_bit(b) function
12 Incorrect 93 ms 126544 KB too many calls to encode_bit(b) function
13 Incorrect 120 ms 127736 KB too many calls to encode_bit(b) function
14 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
15 Incorrect 102 ms 126512 KB too many calls to encode_bit(b) function
16 Incorrect 121 ms 127528 KB too many calls to encode_bit(b) function
17 Incorrect 126 ms 127216 KB too many calls to encode_bit(b) function
18 Incorrect 121 ms 128008 KB too many calls to encode_bit(b) function
19 Incorrect 111 ms 126960 KB too many calls to encode_bit(b) function
20 Incorrect 143 ms 128496 KB too many calls to encode_bit(b) function
21 Incorrect 135 ms 129088 KB too many calls to encode_bit(b) function
22 Incorrect 120 ms 127728 KB too many calls to encode_bit(b) function
23 Incorrect 144 ms 129264 KB too many calls to encode_bit(b) function
# Verdict Execution time Memory Grader output
1 Incorrect 318 ms 136040 KB too many calls to encode_bit(b) function
2 Incorrect 105 ms 125936 KB too many calls to encode_bit(b) function
3 Incorrect 91 ms 126448 KB too many calls to encode_bit(b) function
4 Incorrect 92 ms 126192 KB too many calls to encode_bit(b) function
5 Incorrect 96 ms 126952 KB too many calls to encode_bit(b) function
6 Incorrect 101 ms 126704 KB too many calls to encode_bit(b) function
7 Incorrect 118 ms 127472 KB too many calls to encode_bit(b) function
8 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
9 Incorrect 95 ms 126448 KB too many calls to encode_bit(b) function
10 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
11 Incorrect 100 ms 126704 KB too many calls to encode_bit(b) function
12 Incorrect 93 ms 126544 KB too many calls to encode_bit(b) function
13 Incorrect 120 ms 127736 KB too many calls to encode_bit(b) function
14 Incorrect 94 ms 126448 KB too many calls to encode_bit(b) function
15 Incorrect 102 ms 126512 KB too many calls to encode_bit(b) function
16 Incorrect 121 ms 127528 KB too many calls to encode_bit(b) function
17 Incorrect 126 ms 127216 KB too many calls to encode_bit(b) function
18 Incorrect 121 ms 128008 KB too many calls to encode_bit(b) function
19 Incorrect 111 ms 126960 KB too many calls to encode_bit(b) function
20 Incorrect 143 ms 128496 KB too many calls to encode_bit(b) function
21 Incorrect 135 ms 129088 KB too many calls to encode_bit(b) function
22 Incorrect 120 ms 127728 KB too many calls to encode_bit(b) function
23 Incorrect 144 ms 129264 KB too many calls to encode_bit(b) function