# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
565126 |
2022-05-20T10:16:12 Z |
Dodo |
Saveit (IOI10_saveit) |
C++14 |
|
238 ms |
25304 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<int,int>,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,j}]||mp[{j,i}])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(j);
v[j].push_back(i);
}
}
}
for(int i=0;i<h;i++)
{
deque<ll>q;
int 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++)
{
hops(i,j,vis[j]-1);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
238 ms |
25304 KB |
Output is correct - 36000 call(s) of encode_bit() |
2 |
Correct |
3 ms |
4476 KB |
Output is correct - 15 call(s) of encode_bit() |
3 |
Incorrect |
29 ms |
9212 KB |
wrong parameter |
4 |
Correct |
3 ms |
4604 KB |
Output is correct - 25 call(s) of encode_bit() |
5 |
Incorrect |
32 ms |
9396 KB |
wrong parameter |
6 |
Incorrect |
34 ms |
9828 KB |
wrong parameter |
7 |
Incorrect |
53 ms |
11304 KB |
wrong parameter |
8 |
Incorrect |
28 ms |
9252 KB |
wrong parameter |
9 |
Incorrect |
34 ms |
9584 KB |
wrong parameter |
10 |
Incorrect |
31 ms |
9552 KB |
wrong parameter |
11 |
Incorrect |
52 ms |
10032 KB |
wrong parameter |
12 |
Incorrect |
28 ms |
9488 KB |
wrong parameter |
13 |
Incorrect |
64 ms |
11764 KB |
wrong parameter |
14 |
Incorrect |
28 ms |
9592 KB |
wrong parameter |
15 |
Incorrect |
39 ms |
9732 KB |
wrong parameter |
16 |
Incorrect |
65 ms |
11632 KB |
wrong parameter |
17 |
Incorrect |
51 ms |
11236 KB |
wrong parameter |
18 |
Incorrect |
72 ms |
11948 KB |
wrong parameter |
19 |
Incorrect |
53 ms |
10596 KB |
wrong parameter |
20 |
Incorrect |
65 ms |
12612 KB |
wrong parameter |
21 |
Incorrect |
79 ms |
13456 KB |
wrong parameter |
22 |
Incorrect |
61 ms |
11580 KB |
wrong parameter |
23 |
Incorrect |
96 ms |
13612 KB |
wrong parameter |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
238 ms |
25304 KB |
Output is correct - 36000 call(s) of encode_bit() |
2 |
Correct |
3 ms |
4476 KB |
Output is correct - 15 call(s) of encode_bit() |
3 |
Incorrect |
29 ms |
9212 KB |
wrong parameter |
4 |
Correct |
3 ms |
4604 KB |
Output is correct - 25 call(s) of encode_bit() |
5 |
Incorrect |
32 ms |
9396 KB |
wrong parameter |
6 |
Incorrect |
34 ms |
9828 KB |
wrong parameter |
7 |
Incorrect |
53 ms |
11304 KB |
wrong parameter |
8 |
Incorrect |
28 ms |
9252 KB |
wrong parameter |
9 |
Incorrect |
34 ms |
9584 KB |
wrong parameter |
10 |
Incorrect |
31 ms |
9552 KB |
wrong parameter |
11 |
Incorrect |
52 ms |
10032 KB |
wrong parameter |
12 |
Incorrect |
28 ms |
9488 KB |
wrong parameter |
13 |
Incorrect |
64 ms |
11764 KB |
wrong parameter |
14 |
Incorrect |
28 ms |
9592 KB |
wrong parameter |
15 |
Incorrect |
39 ms |
9732 KB |
wrong parameter |
16 |
Incorrect |
65 ms |
11632 KB |
wrong parameter |
17 |
Incorrect |
51 ms |
11236 KB |
wrong parameter |
18 |
Incorrect |
72 ms |
11948 KB |
wrong parameter |
19 |
Incorrect |
53 ms |
10596 KB |
wrong parameter |
20 |
Incorrect |
65 ms |
12612 KB |
wrong parameter |
21 |
Incorrect |
79 ms |
13456 KB |
wrong parameter |
22 |
Incorrect |
61 ms |
11580 KB |
wrong parameter |
23 |
Incorrect |
96 ms |
13612 KB |
wrong parameter |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
238 ms |
25304 KB |
Output is correct - 36000 call(s) of encode_bit() |
2 |
Correct |
3 ms |
4476 KB |
Output is correct - 15 call(s) of encode_bit() |
3 |
Incorrect |
29 ms |
9212 KB |
wrong parameter |
4 |
Correct |
3 ms |
4604 KB |
Output is correct - 25 call(s) of encode_bit() |
5 |
Incorrect |
32 ms |
9396 KB |
wrong parameter |
6 |
Incorrect |
34 ms |
9828 KB |
wrong parameter |
7 |
Incorrect |
53 ms |
11304 KB |
wrong parameter |
8 |
Incorrect |
28 ms |
9252 KB |
wrong parameter |
9 |
Incorrect |
34 ms |
9584 KB |
wrong parameter |
10 |
Incorrect |
31 ms |
9552 KB |
wrong parameter |
11 |
Incorrect |
52 ms |
10032 KB |
wrong parameter |
12 |
Incorrect |
28 ms |
9488 KB |
wrong parameter |
13 |
Incorrect |
64 ms |
11764 KB |
wrong parameter |
14 |
Incorrect |
28 ms |
9592 KB |
wrong parameter |
15 |
Incorrect |
39 ms |
9732 KB |
wrong parameter |
16 |
Incorrect |
65 ms |
11632 KB |
wrong parameter |
17 |
Incorrect |
51 ms |
11236 KB |
wrong parameter |
18 |
Incorrect |
72 ms |
11948 KB |
wrong parameter |
19 |
Incorrect |
53 ms |
10596 KB |
wrong parameter |
20 |
Incorrect |
65 ms |
12612 KB |
wrong parameter |
21 |
Incorrect |
79 ms |
13456 KB |
wrong parameter |
22 |
Incorrect |
61 ms |
11580 KB |
wrong parameter |
23 |
Incorrect |
96 ms |
13612 KB |
wrong parameter |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
238 ms |
25304 KB |
Output is correct - 36000 call(s) of encode_bit() |
2 |
Correct |
3 ms |
4476 KB |
Output is correct - 15 call(s) of encode_bit() |
3 |
Incorrect |
29 ms |
9212 KB |
wrong parameter |
4 |
Correct |
3 ms |
4604 KB |
Output is correct - 25 call(s) of encode_bit() |
5 |
Incorrect |
32 ms |
9396 KB |
wrong parameter |
6 |
Incorrect |
34 ms |
9828 KB |
wrong parameter |
7 |
Incorrect |
53 ms |
11304 KB |
wrong parameter |
8 |
Incorrect |
28 ms |
9252 KB |
wrong parameter |
9 |
Incorrect |
34 ms |
9584 KB |
wrong parameter |
10 |
Incorrect |
31 ms |
9552 KB |
wrong parameter |
11 |
Incorrect |
52 ms |
10032 KB |
wrong parameter |
12 |
Incorrect |
28 ms |
9488 KB |
wrong parameter |
13 |
Incorrect |
64 ms |
11764 KB |
wrong parameter |
14 |
Incorrect |
28 ms |
9592 KB |
wrong parameter |
15 |
Incorrect |
39 ms |
9732 KB |
wrong parameter |
16 |
Incorrect |
65 ms |
11632 KB |
wrong parameter |
17 |
Incorrect |
51 ms |
11236 KB |
wrong parameter |
18 |
Incorrect |
72 ms |
11948 KB |
wrong parameter |
19 |
Incorrect |
53 ms |
10596 KB |
wrong parameter |
20 |
Incorrect |
65 ms |
12612 KB |
wrong parameter |
21 |
Incorrect |
79 ms |
13456 KB |
wrong parameter |
22 |
Incorrect |
61 ms |
11580 KB |
wrong parameter |
23 |
Incorrect |
96 ms |
13612 KB |
wrong parameter |