Submission #271123

# Submission time Handle Problem Language Result Execution time Memory
271123 2020-08-18T04:48:26 Z 최은수(#5096) Saveit (IOI10_saveit) C++14
50 / 100
523 ms 13728 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;j++)
            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 Correct 523 ms 13728 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 4828 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 83 ms 7576 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 3 ms 4608 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 95 ms 7672 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 93 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 145 ms 8396 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 83 ms 7672 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 95 ms 7832 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 104 ms 7808 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 98 ms 8016 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 88 ms 8000 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 114 ms 8536 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 111 ms 7912 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 109 ms 7920 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 143 ms 8392 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 143 ms 8192 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 123 ms 8432 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 104 ms 8056 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 157 ms 9048 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 150 ms 9056 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 114 ms 8496 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 149 ms 9072 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 523 ms 13728 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 4828 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 83 ms 7576 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 3 ms 4608 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 95 ms 7672 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 93 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 145 ms 8396 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 83 ms 7672 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 95 ms 7832 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 104 ms 7808 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 98 ms 8016 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 88 ms 8000 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 114 ms 8536 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 111 ms 7912 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 109 ms 7920 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 143 ms 8392 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 143 ms 8192 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 123 ms 8432 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 104 ms 8056 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 157 ms 9048 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 150 ms 9056 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 114 ms 8496 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 149 ms 9072 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 523 ms 13728 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 4828 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 83 ms 7576 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 3 ms 4608 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 95 ms 7672 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 93 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 145 ms 8396 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 83 ms 7672 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 95 ms 7832 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 104 ms 7808 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 98 ms 8016 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 88 ms 8000 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 114 ms 8536 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 111 ms 7912 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 109 ms 7920 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 143 ms 8392 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 143 ms 8192 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 123 ms 8432 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 104 ms 8056 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 157 ms 9048 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 150 ms 9056 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 114 ms 8496 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 149 ms 9072 KB Output is partially correct - 360000 call(s) of encode_bit()
# Verdict Execution time Memory Grader output
1 Correct 523 ms 13728 KB Output is partially correct - 360000 call(s) of encode_bit()
2 Correct 2 ms 4828 KB Output is correct - 150 call(s) of encode_bit()
3 Correct 83 ms 7576 KB Output is partially correct - 324000 call(s) of encode_bit()
4 Correct 3 ms 4608 KB Output is correct - 250 call(s) of encode_bit()
5 Correct 95 ms 7672 KB Output is partially correct - 324000 call(s) of encode_bit()
6 Correct 93 ms 7980 KB Output is partially correct - 360000 call(s) of encode_bit()
7 Correct 145 ms 8396 KB Output is partially correct - 360000 call(s) of encode_bit()
8 Correct 83 ms 7672 KB Output is partially correct - 345960 call(s) of encode_bit()
9 Correct 95 ms 7832 KB Output is partially correct - 360000 call(s) of encode_bit()
10 Correct 104 ms 7808 KB Output is partially correct - 360000 call(s) of encode_bit()
11 Correct 98 ms 8016 KB Output is partially correct - 360000 call(s) of encode_bit()
12 Correct 88 ms 8000 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Correct 114 ms 8536 KB Output is partially correct - 360000 call(s) of encode_bit()
14 Correct 111 ms 7912 KB Output is partially correct - 360000 call(s) of encode_bit()
15 Correct 109 ms 7920 KB Output is partially correct - 360000 call(s) of encode_bit()
16 Correct 143 ms 8392 KB Output is partially correct - 360000 call(s) of encode_bit()
17 Correct 143 ms 8192 KB Output is partially correct - 360000 call(s) of encode_bit()
18 Correct 123 ms 8432 KB Output is partially correct - 360000 call(s) of encode_bit()
19 Correct 104 ms 8056 KB Output is partially correct - 360000 call(s) of encode_bit()
20 Correct 157 ms 9048 KB Output is partially correct - 360000 call(s) of encode_bit()
21 Correct 150 ms 9056 KB Output is partially correct - 360000 call(s) of encode_bit()
22 Correct 114 ms 8496 KB Output is partially correct - 360000 call(s) of encode_bit()
23 Correct 149 ms 9072 KB Output is partially correct - 360000 call(s) of encode_bit()