# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
784395 |
2023-07-16T05:28:02 Z |
irmuun |
Saveit (IOI10_saveit) |
C++17 |
|
154 ms |
4624 KB |
#include<bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
void encode(int H,int N,int P,int *A,int *B){
vector<int>adj[N];
for(int i=0;i<P;i++){
adj[A[i]].pb(B[i]);
adj[B[i]].pb(A[i]);
}
int d[N];
for(int i=0;i<H;i++){
fill(d,d+N,-1);
queue<int>q;
d[i]=0;
q.push(i);
while(!q.empty()){
int x=q.front();
q.pop();
for(auto y:adj[x]){
if(d[y]==-1){
d[y]=d[x]+1;
q.push(y);
}
}
}
for(int j=0;j<N;j++){
for(int k=0;k<10;k++){
encode_bit(d[j]%2);
d[j]/=2;
}
}
}
}
#include<bits/stdc++.h>
#include "grader.h"
#include "decoder.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
void decode(int H,int N){
for(int i=0;i<H;i++){
for(int j=0;j<N;j++){
int ans=0;
for(int k=0;k<10;k++){
ans+=decode_bit()*(1<<k);
}
hops(i,j,ans);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
154 ms |
4624 KB |
Execution killed with signal 11 |
2 |
Runtime error |
2 ms |
468 KB |
Execution killed with signal 11 |
3 |
Runtime error |
5 ms |
780 KB |
Execution killed with signal 11 |
4 |
Correct |
3 ms |
4612 KB |
Output is correct - 250 call(s) of encode_bit() |
5 |
Runtime error |
13 ms |
848 KB |
Execution killed with signal 11 |
6 |
Runtime error |
5 ms |
832 KB |
Execution killed with signal 11 |
7 |
Runtime error |
15 ms |
1096 KB |
Execution killed with signal 11 |
8 |
Runtime error |
6 ms |
688 KB |
Execution killed with signal 11 |
9 |
Runtime error |
5 ms |
720 KB |
Execution killed with signal 11 |
10 |
Runtime error |
5 ms |
724 KB |
Execution killed with signal 11 |
11 |
Runtime error |
6 ms |
836 KB |
Execution killed with signal 11 |
12 |
Runtime error |
5 ms |
848 KB |
Execution killed with signal 6 |
13 |
Runtime error |
40 ms |
1312 KB |
Execution killed with signal 11 |
14 |
Runtime error |
7 ms |
720 KB |
Execution killed with signal 11 |
15 |
Runtime error |
9 ms |
840 KB |
Execution killed with signal 11 |
16 |
Runtime error |
25 ms |
1216 KB |
Execution killed with signal 11 |
17 |
Runtime error |
19 ms |
1156 KB |
Execution killed with signal 11 |
18 |
Runtime error |
19 ms |
1236 KB |
Execution killed with signal 11 |
19 |
Runtime error |
14 ms |
976 KB |
Execution killed with signal 11 |
20 |
Runtime error |
28 ms |
1532 KB |
Execution killed with signal 11 |
21 |
Runtime error |
30 ms |
1652 KB |
Execution killed with signal 11 |
22 |
Runtime error |
19 ms |
1220 KB |
Execution killed with signal 11 |
23 |
Runtime error |
50 ms |
1716 KB |
Execution killed with signal 11 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
154 ms |
4624 KB |
Execution killed with signal 11 |
2 |
Runtime error |
2 ms |
468 KB |
Execution killed with signal 11 |
3 |
Runtime error |
5 ms |
780 KB |
Execution killed with signal 11 |
4 |
Correct |
3 ms |
4612 KB |
Output is correct - 250 call(s) of encode_bit() |
5 |
Runtime error |
13 ms |
848 KB |
Execution killed with signal 11 |
6 |
Runtime error |
5 ms |
832 KB |
Execution killed with signal 11 |
7 |
Runtime error |
15 ms |
1096 KB |
Execution killed with signal 11 |
8 |
Runtime error |
6 ms |
688 KB |
Execution killed with signal 11 |
9 |
Runtime error |
5 ms |
720 KB |
Execution killed with signal 11 |
10 |
Runtime error |
5 ms |
724 KB |
Execution killed with signal 11 |
11 |
Runtime error |
6 ms |
836 KB |
Execution killed with signal 11 |
12 |
Runtime error |
5 ms |
848 KB |
Execution killed with signal 6 |
13 |
Runtime error |
40 ms |
1312 KB |
Execution killed with signal 11 |
14 |
Runtime error |
7 ms |
720 KB |
Execution killed with signal 11 |
15 |
Runtime error |
9 ms |
840 KB |
Execution killed with signal 11 |
16 |
Runtime error |
25 ms |
1216 KB |
Execution killed with signal 11 |
17 |
Runtime error |
19 ms |
1156 KB |
Execution killed with signal 11 |
18 |
Runtime error |
19 ms |
1236 KB |
Execution killed with signal 11 |
19 |
Runtime error |
14 ms |
976 KB |
Execution killed with signal 11 |
20 |
Runtime error |
28 ms |
1532 KB |
Execution killed with signal 11 |
21 |
Runtime error |
30 ms |
1652 KB |
Execution killed with signal 11 |
22 |
Runtime error |
19 ms |
1220 KB |
Execution killed with signal 11 |
23 |
Runtime error |
50 ms |
1716 KB |
Execution killed with signal 11 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
154 ms |
4624 KB |
Execution killed with signal 11 |
2 |
Runtime error |
2 ms |
468 KB |
Execution killed with signal 11 |
3 |
Runtime error |
5 ms |
780 KB |
Execution killed with signal 11 |
4 |
Correct |
3 ms |
4612 KB |
Output is correct - 250 call(s) of encode_bit() |
5 |
Runtime error |
13 ms |
848 KB |
Execution killed with signal 11 |
6 |
Runtime error |
5 ms |
832 KB |
Execution killed with signal 11 |
7 |
Runtime error |
15 ms |
1096 KB |
Execution killed with signal 11 |
8 |
Runtime error |
6 ms |
688 KB |
Execution killed with signal 11 |
9 |
Runtime error |
5 ms |
720 KB |
Execution killed with signal 11 |
10 |
Runtime error |
5 ms |
724 KB |
Execution killed with signal 11 |
11 |
Runtime error |
6 ms |
836 KB |
Execution killed with signal 11 |
12 |
Runtime error |
5 ms |
848 KB |
Execution killed with signal 6 |
13 |
Runtime error |
40 ms |
1312 KB |
Execution killed with signal 11 |
14 |
Runtime error |
7 ms |
720 KB |
Execution killed with signal 11 |
15 |
Runtime error |
9 ms |
840 KB |
Execution killed with signal 11 |
16 |
Runtime error |
25 ms |
1216 KB |
Execution killed with signal 11 |
17 |
Runtime error |
19 ms |
1156 KB |
Execution killed with signal 11 |
18 |
Runtime error |
19 ms |
1236 KB |
Execution killed with signal 11 |
19 |
Runtime error |
14 ms |
976 KB |
Execution killed with signal 11 |
20 |
Runtime error |
28 ms |
1532 KB |
Execution killed with signal 11 |
21 |
Runtime error |
30 ms |
1652 KB |
Execution killed with signal 11 |
22 |
Runtime error |
19 ms |
1220 KB |
Execution killed with signal 11 |
23 |
Runtime error |
50 ms |
1716 KB |
Execution killed with signal 11 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
154 ms |
4624 KB |
Execution killed with signal 11 |
2 |
Runtime error |
2 ms |
468 KB |
Execution killed with signal 11 |
3 |
Runtime error |
5 ms |
780 KB |
Execution killed with signal 11 |
4 |
Correct |
3 ms |
4612 KB |
Output is correct - 250 call(s) of encode_bit() |
5 |
Runtime error |
13 ms |
848 KB |
Execution killed with signal 11 |
6 |
Runtime error |
5 ms |
832 KB |
Execution killed with signal 11 |
7 |
Runtime error |
15 ms |
1096 KB |
Execution killed with signal 11 |
8 |
Runtime error |
6 ms |
688 KB |
Execution killed with signal 11 |
9 |
Runtime error |
5 ms |
720 KB |
Execution killed with signal 11 |
10 |
Runtime error |
5 ms |
724 KB |
Execution killed with signal 11 |
11 |
Runtime error |
6 ms |
836 KB |
Execution killed with signal 11 |
12 |
Runtime error |
5 ms |
848 KB |
Execution killed with signal 6 |
13 |
Runtime error |
40 ms |
1312 KB |
Execution killed with signal 11 |
14 |
Runtime error |
7 ms |
720 KB |
Execution killed with signal 11 |
15 |
Runtime error |
9 ms |
840 KB |
Execution killed with signal 11 |
16 |
Runtime error |
25 ms |
1216 KB |
Execution killed with signal 11 |
17 |
Runtime error |
19 ms |
1156 KB |
Execution killed with signal 11 |
18 |
Runtime error |
19 ms |
1236 KB |
Execution killed with signal 11 |
19 |
Runtime error |
14 ms |
976 KB |
Execution killed with signal 11 |
20 |
Runtime error |
28 ms |
1532 KB |
Execution killed with signal 11 |
21 |
Runtime error |
30 ms |
1652 KB |
Execution killed with signal 11 |
22 |
Runtime error |
19 ms |
1220 KB |
Execution killed with signal 11 |
23 |
Runtime error |
50 ms |
1716 KB |
Execution killed with signal 11 |