# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
565043 |
2022-05-20T08:08:21 Z |
AbdullahMW |
Saveit (IOI10_saveit) |
C++14 |
|
1387 ms |
262144 KB |
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
#define ll int
#define pb push_back
#define f first
#define s second
using namespace std;
vector <ll> gr[1005];
vector <pair <ll, ll>> bfs(ll xx)
{
ll cnt = 0;
vector <pair <ll, ll>> ret;
queue <ll> q;
unordered_map <ll, bool> vis;
q.push(xx);
ret.pb({xx, 0});
vis[xx] = true;
while (q.size())
{
ll x = q.front();
q.pop();
vis[x] = true;
cnt++;
for (auto v : gr[x])
{
if (!vis[v])
{
q.push(v);
ret.pb({v, cnt});
}
}
}
return ret;
}
/*ll encode_bit(ll b)
{
return b;
}*/
void encode(ll n, ll h, ll p, ll a[], ll b[])
{
for (ll i = 0; i < p; i++)
{
gr[a[i]].pb(b[i]);
gr[b[i]].pb(a[i]);
}
for (ll i = 0; i < h; i++)
{
vector <pair <ll, ll>> vec = bfs(i);
sort(vec.begin(), vec.end());
for (auto v : vec)
{
for (ll b = 0; b < 10; b++)
{
encode_bit((1 << b) & v.s);
}
}
}
}
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
#define ll int
#define pb push_back
#define f first
#define s second
using namespace std;
/*ll decode_bit()
{
return
}*/
/*ll hops(ll h, ll c, ll d)
{
return d;
}*/
void decode(ll n, ll h)
{
for (ll i = 0; i < h; i++)
{
for (ll j = 0; j < n; j++)
{
ll d = 0;
ll b = decode_bit();
d += (1 << b);
hops(i, j, d);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1387 ms |
10524 KB |
encode_bit(b) wrong parameter |
2 |
Incorrect |
1 ms |
636 KB |
encode_bit(b) wrong parameter |
3 |
Incorrect |
6 ms |
1020 KB |
encode_bit(b) wrong parameter |
4 |
Incorrect |
0 ms |
644 KB |
encode_bit(b) wrong parameter |
5 |
Incorrect |
12 ms |
1416 KB |
encode_bit(b) wrong parameter |
6 |
Incorrect |
11 ms |
1440 KB |
encode_bit(b) wrong parameter |
7 |
Incorrect |
48 ms |
2032 KB |
encode_bit(b) wrong parameter |
8 |
Runtime error |
593 ms |
262144 KB |
Execution killed with signal 9 |
9 |
Incorrect |
11 ms |
1288 KB |
encode_bit(b) wrong parameter |
10 |
Incorrect |
13 ms |
1524 KB |
encode_bit(b) wrong parameter |
11 |
Incorrect |
28 ms |
2072 KB |
encode_bit(b) wrong parameter |
12 |
Incorrect |
4 ms |
760 KB |
encode_bit(b) wrong parameter |
13 |
Incorrect |
72 ms |
2696 KB |
encode_bit(b) wrong parameter |
14 |
Runtime error |
722 ms |
262144 KB |
Execution killed with signal 9 |
15 |
Incorrect |
24 ms |
2184 KB |
encode_bit(b) wrong parameter |
16 |
Incorrect |
251 ms |
18940 KB |
encode_bit(b) wrong parameter |
17 |
Incorrect |
105 ms |
3436 KB |
encode_bit(b) wrong parameter |
18 |
Incorrect |
152 ms |
3772 KB |
encode_bit(b) wrong parameter |
19 |
Incorrect |
57 ms |
2188 KB |
encode_bit(b) wrong parameter |
20 |
Incorrect |
142 ms |
4244 KB |
encode_bit(b) wrong parameter |
21 |
Incorrect |
182 ms |
4452 KB |
encode_bit(b) wrong parameter |
22 |
Incorrect |
72 ms |
2716 KB |
encode_bit(b) wrong parameter |
23 |
Incorrect |
167 ms |
3476 KB |
encode_bit(b) wrong parameter |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1387 ms |
10524 KB |
encode_bit(b) wrong parameter |
2 |
Incorrect |
1 ms |
636 KB |
encode_bit(b) wrong parameter |
3 |
Incorrect |
6 ms |
1020 KB |
encode_bit(b) wrong parameter |
4 |
Incorrect |
0 ms |
644 KB |
encode_bit(b) wrong parameter |
5 |
Incorrect |
12 ms |
1416 KB |
encode_bit(b) wrong parameter |
6 |
Incorrect |
11 ms |
1440 KB |
encode_bit(b) wrong parameter |
7 |
Incorrect |
48 ms |
2032 KB |
encode_bit(b) wrong parameter |
8 |
Runtime error |
593 ms |
262144 KB |
Execution killed with signal 9 |
9 |
Incorrect |
11 ms |
1288 KB |
encode_bit(b) wrong parameter |
10 |
Incorrect |
13 ms |
1524 KB |
encode_bit(b) wrong parameter |
11 |
Incorrect |
28 ms |
2072 KB |
encode_bit(b) wrong parameter |
12 |
Incorrect |
4 ms |
760 KB |
encode_bit(b) wrong parameter |
13 |
Incorrect |
72 ms |
2696 KB |
encode_bit(b) wrong parameter |
14 |
Runtime error |
722 ms |
262144 KB |
Execution killed with signal 9 |
15 |
Incorrect |
24 ms |
2184 KB |
encode_bit(b) wrong parameter |
16 |
Incorrect |
251 ms |
18940 KB |
encode_bit(b) wrong parameter |
17 |
Incorrect |
105 ms |
3436 KB |
encode_bit(b) wrong parameter |
18 |
Incorrect |
152 ms |
3772 KB |
encode_bit(b) wrong parameter |
19 |
Incorrect |
57 ms |
2188 KB |
encode_bit(b) wrong parameter |
20 |
Incorrect |
142 ms |
4244 KB |
encode_bit(b) wrong parameter |
21 |
Incorrect |
182 ms |
4452 KB |
encode_bit(b) wrong parameter |
22 |
Incorrect |
72 ms |
2716 KB |
encode_bit(b) wrong parameter |
23 |
Incorrect |
167 ms |
3476 KB |
encode_bit(b) wrong parameter |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1387 ms |
10524 KB |
encode_bit(b) wrong parameter |
2 |
Incorrect |
1 ms |
636 KB |
encode_bit(b) wrong parameter |
3 |
Incorrect |
6 ms |
1020 KB |
encode_bit(b) wrong parameter |
4 |
Incorrect |
0 ms |
644 KB |
encode_bit(b) wrong parameter |
5 |
Incorrect |
12 ms |
1416 KB |
encode_bit(b) wrong parameter |
6 |
Incorrect |
11 ms |
1440 KB |
encode_bit(b) wrong parameter |
7 |
Incorrect |
48 ms |
2032 KB |
encode_bit(b) wrong parameter |
8 |
Runtime error |
593 ms |
262144 KB |
Execution killed with signal 9 |
9 |
Incorrect |
11 ms |
1288 KB |
encode_bit(b) wrong parameter |
10 |
Incorrect |
13 ms |
1524 KB |
encode_bit(b) wrong parameter |
11 |
Incorrect |
28 ms |
2072 KB |
encode_bit(b) wrong parameter |
12 |
Incorrect |
4 ms |
760 KB |
encode_bit(b) wrong parameter |
13 |
Incorrect |
72 ms |
2696 KB |
encode_bit(b) wrong parameter |
14 |
Runtime error |
722 ms |
262144 KB |
Execution killed with signal 9 |
15 |
Incorrect |
24 ms |
2184 KB |
encode_bit(b) wrong parameter |
16 |
Incorrect |
251 ms |
18940 KB |
encode_bit(b) wrong parameter |
17 |
Incorrect |
105 ms |
3436 KB |
encode_bit(b) wrong parameter |
18 |
Incorrect |
152 ms |
3772 KB |
encode_bit(b) wrong parameter |
19 |
Incorrect |
57 ms |
2188 KB |
encode_bit(b) wrong parameter |
20 |
Incorrect |
142 ms |
4244 KB |
encode_bit(b) wrong parameter |
21 |
Incorrect |
182 ms |
4452 KB |
encode_bit(b) wrong parameter |
22 |
Incorrect |
72 ms |
2716 KB |
encode_bit(b) wrong parameter |
23 |
Incorrect |
167 ms |
3476 KB |
encode_bit(b) wrong parameter |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1387 ms |
10524 KB |
encode_bit(b) wrong parameter |
2 |
Incorrect |
1 ms |
636 KB |
encode_bit(b) wrong parameter |
3 |
Incorrect |
6 ms |
1020 KB |
encode_bit(b) wrong parameter |
4 |
Incorrect |
0 ms |
644 KB |
encode_bit(b) wrong parameter |
5 |
Incorrect |
12 ms |
1416 KB |
encode_bit(b) wrong parameter |
6 |
Incorrect |
11 ms |
1440 KB |
encode_bit(b) wrong parameter |
7 |
Incorrect |
48 ms |
2032 KB |
encode_bit(b) wrong parameter |
8 |
Runtime error |
593 ms |
262144 KB |
Execution killed with signal 9 |
9 |
Incorrect |
11 ms |
1288 KB |
encode_bit(b) wrong parameter |
10 |
Incorrect |
13 ms |
1524 KB |
encode_bit(b) wrong parameter |
11 |
Incorrect |
28 ms |
2072 KB |
encode_bit(b) wrong parameter |
12 |
Incorrect |
4 ms |
760 KB |
encode_bit(b) wrong parameter |
13 |
Incorrect |
72 ms |
2696 KB |
encode_bit(b) wrong parameter |
14 |
Runtime error |
722 ms |
262144 KB |
Execution killed with signal 9 |
15 |
Incorrect |
24 ms |
2184 KB |
encode_bit(b) wrong parameter |
16 |
Incorrect |
251 ms |
18940 KB |
encode_bit(b) wrong parameter |
17 |
Incorrect |
105 ms |
3436 KB |
encode_bit(b) wrong parameter |
18 |
Incorrect |
152 ms |
3772 KB |
encode_bit(b) wrong parameter |
19 |
Incorrect |
57 ms |
2188 KB |
encode_bit(b) wrong parameter |
20 |
Incorrect |
142 ms |
4244 KB |
encode_bit(b) wrong parameter |
21 |
Incorrect |
182 ms |
4452 KB |
encode_bit(b) wrong parameter |
22 |
Incorrect |
72 ms |
2716 KB |
encode_bit(b) wrong parameter |
23 |
Incorrect |
167 ms |
3476 KB |
encode_bit(b) wrong parameter |