Submission #565068

# Submission time Handle Problem Language Result Execution time Memory
565068 2022-05-20T08:40:10 Z Uzouf Saveit (IOI10_saveit) C++14
0 / 100
1291 ms 12684 KB
#include <bits/stdc++.h>
using namespace std;
#include "grader.h"
#include "encoder.h"
 
void encode(int n,int h,int p,int a[],int b[]) {  
  int grid[n+5][n+5];
  for (int i=0;i<n;i++) {
    for (int j=0;j<n;j++) {
        grid[i][j]=1010;
    }
    grid[i][i]=0;
  }
  for (int i=0;i<p;i++) {
    grid[a[i]][b[i]]=1;
    grid[b[i]][a[i]]=1;
    grid[i][i]=0;
  }
 
  for (int k=0;k<n;k++) 
    for (int i=0;i<n;i++) {
      for (int j=0;j<n;j++) {
        grid[i][j]=min(grid[i][j],grid[i][k]+grid[k][j]);
      }
    }
 
  for (int i=0;i<h;i++) {
    for (int j=0;j<n;j++) {
      int nm=grid[i][j];
      for (int pp=0;pp<10;pp++) {
        if (((1<<pp)&nm)==0) encode_bit(0);
        else encode_bit(1);
      }
    }
  }
}
#include <bits/stdc++.h>
using namespace std;
#include "grader.h"
#include "encoder.h"
 
void decode(int n,int h) {
  for (int i=0;i<h;i++) {
    for (int j=0;j<n;j++) {
      int nm=0;
      for (int p=0;p<10;p++) {
      if (decode_bit()==1) nm+=(1<<p);
      }
      hops(i,j,nm);
    }
  }
  
}
# Verdict Execution time Memory Grader output
1 Runtime error 152 ms 12684 KB Execution killed with signal 11
2 Correct 4 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4604 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 10 ms 7304 KB Execution killed with signal 11
6 Runtime error 13 ms 8912 KB Execution killed with signal 11
7 Runtime error 27 ms 9108 KB Execution killed with signal 11
8 Runtime error 11 ms 8136 KB Execution killed with signal 11
9 Runtime error 12 ms 8796 KB Execution killed with signal 11
10 Runtime error 15 ms 8764 KB Execution killed with signal 11
11 Runtime error 21 ms 8796 KB Execution killed with signal 11
12 Correct 1291 ms 11392 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9372 KB Execution killed with signal 11
14 Runtime error 16 ms 8804 KB Execution killed with signal 11
15 Runtime error 14 ms 8780 KB Execution killed with signal 11
16 Runtime error 35 ms 9184 KB Execution killed with signal 11
17 Runtime error 30 ms 9128 KB Execution killed with signal 11
18 Runtime error 33 ms 9232 KB Execution killed with signal 11
19 Runtime error 21 ms 9040 KB Execution killed with signal 11
20 Runtime error 42 ms 9440 KB Execution killed with signal 11
21 Runtime error 50 ms 9708 KB Execution killed with signal 11
22 Runtime error 34 ms 9208 KB Execution killed with signal 11
23 Runtime error 49 ms 9776 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 152 ms 12684 KB Execution killed with signal 11
2 Correct 4 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4604 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 10 ms 7304 KB Execution killed with signal 11
6 Runtime error 13 ms 8912 KB Execution killed with signal 11
7 Runtime error 27 ms 9108 KB Execution killed with signal 11
8 Runtime error 11 ms 8136 KB Execution killed with signal 11
9 Runtime error 12 ms 8796 KB Execution killed with signal 11
10 Runtime error 15 ms 8764 KB Execution killed with signal 11
11 Runtime error 21 ms 8796 KB Execution killed with signal 11
12 Correct 1291 ms 11392 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9372 KB Execution killed with signal 11
14 Runtime error 16 ms 8804 KB Execution killed with signal 11
15 Runtime error 14 ms 8780 KB Execution killed with signal 11
16 Runtime error 35 ms 9184 KB Execution killed with signal 11
17 Runtime error 30 ms 9128 KB Execution killed with signal 11
18 Runtime error 33 ms 9232 KB Execution killed with signal 11
19 Runtime error 21 ms 9040 KB Execution killed with signal 11
20 Runtime error 42 ms 9440 KB Execution killed with signal 11
21 Runtime error 50 ms 9708 KB Execution killed with signal 11
22 Runtime error 34 ms 9208 KB Execution killed with signal 11
23 Runtime error 49 ms 9776 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 152 ms 12684 KB Execution killed with signal 11
2 Correct 4 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4604 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 10 ms 7304 KB Execution killed with signal 11
6 Runtime error 13 ms 8912 KB Execution killed with signal 11
7 Runtime error 27 ms 9108 KB Execution killed with signal 11
8 Runtime error 11 ms 8136 KB Execution killed with signal 11
9 Runtime error 12 ms 8796 KB Execution killed with signal 11
10 Runtime error 15 ms 8764 KB Execution killed with signal 11
11 Runtime error 21 ms 8796 KB Execution killed with signal 11
12 Correct 1291 ms 11392 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9372 KB Execution killed with signal 11
14 Runtime error 16 ms 8804 KB Execution killed with signal 11
15 Runtime error 14 ms 8780 KB Execution killed with signal 11
16 Runtime error 35 ms 9184 KB Execution killed with signal 11
17 Runtime error 30 ms 9128 KB Execution killed with signal 11
18 Runtime error 33 ms 9232 KB Execution killed with signal 11
19 Runtime error 21 ms 9040 KB Execution killed with signal 11
20 Runtime error 42 ms 9440 KB Execution killed with signal 11
21 Runtime error 50 ms 9708 KB Execution killed with signal 11
22 Runtime error 34 ms 9208 KB Execution killed with signal 11
23 Runtime error 49 ms 9776 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 152 ms 12684 KB Execution killed with signal 11
2 Correct 4 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4604 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 10 ms 7304 KB Execution killed with signal 11
6 Runtime error 13 ms 8912 KB Execution killed with signal 11
7 Runtime error 27 ms 9108 KB Execution killed with signal 11
8 Runtime error 11 ms 8136 KB Execution killed with signal 11
9 Runtime error 12 ms 8796 KB Execution killed with signal 11
10 Runtime error 15 ms 8764 KB Execution killed with signal 11
11 Runtime error 21 ms 8796 KB Execution killed with signal 11
12 Correct 1291 ms 11392 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9372 KB Execution killed with signal 11
14 Runtime error 16 ms 8804 KB Execution killed with signal 11
15 Runtime error 14 ms 8780 KB Execution killed with signal 11
16 Runtime error 35 ms 9184 KB Execution killed with signal 11
17 Runtime error 30 ms 9128 KB Execution killed with signal 11
18 Runtime error 33 ms 9232 KB Execution killed with signal 11
19 Runtime error 21 ms 9040 KB Execution killed with signal 11
20 Runtime error 42 ms 9440 KB Execution killed with signal 11
21 Runtime error 50 ms 9708 KB Execution killed with signal 11
22 Runtime error 34 ms 9208 KB Execution killed with signal 11
23 Runtime error 49 ms 9776 KB Execution killed with signal 11