# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
565094 |
2022-05-20T09:05:54 Z |
Dodo |
Saveit (IOI10_saveit) |
C++14 |
|
260 ms |
23092 KB |
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
#include "decoder.h"
#define ll long long
using namespace std;
void encode(int n, int h, int p, int a[], int b[]){
map<pair<ll,ll>,bool>mp;
for(int i=0;i<p;i++)
mp[{a[i],b[i]}]=1;
for(int i=0;i<h;i++)
{
for(int j=0;j<n;j++)
{
if(mp[{i,h}]==1)encode_bit(1);
else encode_bit(0);
}
}
return;
}
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
#include "decoder.h"
#define ll long long
using namespace std;
void decode(int n, int h) {
vector<ll>v[n];
for(int i=0;i<h;i++)
{
for(int j=0;j<n;j++)
{
int a = decode_bit();
if(a==1)
{
v[i].push_back(h);
v[h].push_back(i);
}
}
}
ll arr[h][n];
for(int i=0;i<h;i++)
{
deque<ll>q;
ll vis[n]={};
vis[i]=1;
q.push_back(i);
while(!q.empty())
{
ll x=q.front();
q.pop_front();
for(auto u:v[x])
{
if(vis[u]==0)
{
vis[u]=vis[x]+1;
q.push_back(u);
}
}
}
for(int j=0;j<n;j++)
{
arr[i][j]=vis[j];
}
}
for(int i=0;i<h;i++)
{
for(int j=0;j<n;j++)
{
hops(i,j,arr[i][j]);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
260 ms |
23092 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
4484 KB |
Output isn't correct |
3 |
Incorrect |
19 ms |
5440 KB |
Output isn't correct |
4 |
Incorrect |
3 ms |
4612 KB |
Output isn't correct |
5 |
Incorrect |
20 ms |
5872 KB |
Output isn't correct |
6 |
Incorrect |
22 ms |
6000 KB |
Output isn't correct |
7 |
Incorrect |
38 ms |
7204 KB |
Output isn't correct |
8 |
Incorrect |
15 ms |
5372 KB |
Output isn't correct |
9 |
Incorrect |
19 ms |
5544 KB |
Output isn't correct |
10 |
Incorrect |
19 ms |
5608 KB |
Output isn't correct |
11 |
Incorrect |
23 ms |
6012 KB |
Output isn't correct |
12 |
Incorrect |
17 ms |
5248 KB |
Output isn't correct |
13 |
Incorrect |
43 ms |
8036 KB |
Output isn't correct |
14 |
Incorrect |
16 ms |
5624 KB |
Output isn't correct |
15 |
Incorrect |
19 ms |
5604 KB |
Output isn't correct |
16 |
Incorrect |
40 ms |
7664 KB |
Output isn't correct |
17 |
Incorrect |
36 ms |
7256 KB |
Output isn't correct |
18 |
Incorrect |
57 ms |
7976 KB |
Output isn't correct |
19 |
Incorrect |
30 ms |
6624 KB |
Output isn't correct |
20 |
Incorrect |
54 ms |
8752 KB |
Output isn't correct |
21 |
Incorrect |
64 ms |
9508 KB |
Output isn't correct |
22 |
Incorrect |
40 ms |
7692 KB |
Output isn't correct |
23 |
Incorrect |
64 ms |
9908 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
260 ms |
23092 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
4484 KB |
Output isn't correct |
3 |
Incorrect |
19 ms |
5440 KB |
Output isn't correct |
4 |
Incorrect |
3 ms |
4612 KB |
Output isn't correct |
5 |
Incorrect |
20 ms |
5872 KB |
Output isn't correct |
6 |
Incorrect |
22 ms |
6000 KB |
Output isn't correct |
7 |
Incorrect |
38 ms |
7204 KB |
Output isn't correct |
8 |
Incorrect |
15 ms |
5372 KB |
Output isn't correct |
9 |
Incorrect |
19 ms |
5544 KB |
Output isn't correct |
10 |
Incorrect |
19 ms |
5608 KB |
Output isn't correct |
11 |
Incorrect |
23 ms |
6012 KB |
Output isn't correct |
12 |
Incorrect |
17 ms |
5248 KB |
Output isn't correct |
13 |
Incorrect |
43 ms |
8036 KB |
Output isn't correct |
14 |
Incorrect |
16 ms |
5624 KB |
Output isn't correct |
15 |
Incorrect |
19 ms |
5604 KB |
Output isn't correct |
16 |
Incorrect |
40 ms |
7664 KB |
Output isn't correct |
17 |
Incorrect |
36 ms |
7256 KB |
Output isn't correct |
18 |
Incorrect |
57 ms |
7976 KB |
Output isn't correct |
19 |
Incorrect |
30 ms |
6624 KB |
Output isn't correct |
20 |
Incorrect |
54 ms |
8752 KB |
Output isn't correct |
21 |
Incorrect |
64 ms |
9508 KB |
Output isn't correct |
22 |
Incorrect |
40 ms |
7692 KB |
Output isn't correct |
23 |
Incorrect |
64 ms |
9908 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
260 ms |
23092 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
4484 KB |
Output isn't correct |
3 |
Incorrect |
19 ms |
5440 KB |
Output isn't correct |
4 |
Incorrect |
3 ms |
4612 KB |
Output isn't correct |
5 |
Incorrect |
20 ms |
5872 KB |
Output isn't correct |
6 |
Incorrect |
22 ms |
6000 KB |
Output isn't correct |
7 |
Incorrect |
38 ms |
7204 KB |
Output isn't correct |
8 |
Incorrect |
15 ms |
5372 KB |
Output isn't correct |
9 |
Incorrect |
19 ms |
5544 KB |
Output isn't correct |
10 |
Incorrect |
19 ms |
5608 KB |
Output isn't correct |
11 |
Incorrect |
23 ms |
6012 KB |
Output isn't correct |
12 |
Incorrect |
17 ms |
5248 KB |
Output isn't correct |
13 |
Incorrect |
43 ms |
8036 KB |
Output isn't correct |
14 |
Incorrect |
16 ms |
5624 KB |
Output isn't correct |
15 |
Incorrect |
19 ms |
5604 KB |
Output isn't correct |
16 |
Incorrect |
40 ms |
7664 KB |
Output isn't correct |
17 |
Incorrect |
36 ms |
7256 KB |
Output isn't correct |
18 |
Incorrect |
57 ms |
7976 KB |
Output isn't correct |
19 |
Incorrect |
30 ms |
6624 KB |
Output isn't correct |
20 |
Incorrect |
54 ms |
8752 KB |
Output isn't correct |
21 |
Incorrect |
64 ms |
9508 KB |
Output isn't correct |
22 |
Incorrect |
40 ms |
7692 KB |
Output isn't correct |
23 |
Incorrect |
64 ms |
9908 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
260 ms |
23092 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
4484 KB |
Output isn't correct |
3 |
Incorrect |
19 ms |
5440 KB |
Output isn't correct |
4 |
Incorrect |
3 ms |
4612 KB |
Output isn't correct |
5 |
Incorrect |
20 ms |
5872 KB |
Output isn't correct |
6 |
Incorrect |
22 ms |
6000 KB |
Output isn't correct |
7 |
Incorrect |
38 ms |
7204 KB |
Output isn't correct |
8 |
Incorrect |
15 ms |
5372 KB |
Output isn't correct |
9 |
Incorrect |
19 ms |
5544 KB |
Output isn't correct |
10 |
Incorrect |
19 ms |
5608 KB |
Output isn't correct |
11 |
Incorrect |
23 ms |
6012 KB |
Output isn't correct |
12 |
Incorrect |
17 ms |
5248 KB |
Output isn't correct |
13 |
Incorrect |
43 ms |
8036 KB |
Output isn't correct |
14 |
Incorrect |
16 ms |
5624 KB |
Output isn't correct |
15 |
Incorrect |
19 ms |
5604 KB |
Output isn't correct |
16 |
Incorrect |
40 ms |
7664 KB |
Output isn't correct |
17 |
Incorrect |
36 ms |
7256 KB |
Output isn't correct |
18 |
Incorrect |
57 ms |
7976 KB |
Output isn't correct |
19 |
Incorrect |
30 ms |
6624 KB |
Output isn't correct |
20 |
Incorrect |
54 ms |
8752 KB |
Output isn't correct |
21 |
Incorrect |
64 ms |
9508 KB |
Output isn't correct |
22 |
Incorrect |
40 ms |
7692 KB |
Output isn't correct |
23 |
Incorrect |
64 ms |
9908 KB |
Output isn't correct |