Submission #565054

# Submission time Handle Problem Language Result Execution time Memory
565054 2022-05-20T08:21:12 Z Uzouf Saveit (IOI10_saveit) C++14
0 / 100
1057 ms 12644 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][n];
  for (int i=0;i<n;i++) {
    for (int j=0;j<n;j++) {
        grid[i][j]=1e9;
    }
    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)==(1<<pp)) encode_bit(1);
        else encode_bit(0);
      }
    }
  }
}
#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,t=0;
      while (t<10) {
      if (decode_bit()==1) nm+=(1<<t);
      t++;
      }
      hops(i,j,nm);
    }
  }
  
}
# Verdict Execution time Memory Grader output
1 Runtime error 162 ms 12644 KB Execution killed with signal 11
2 Correct 4 ms 4484 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7204 KB Execution killed with signal 11
4 Runtime error 2 ms 464 KB Execution killed with signal 6
5 Runtime error 10 ms 7308 KB Execution killed with signal 11
6 Runtime error 12 ms 8784 KB Execution killed with signal 11
7 Runtime error 24 ms 9136 KB Execution killed with signal 11
8 Runtime error 12 ms 8016 KB Execution killed with signal 11
9 Runtime error 11 ms 8656 KB Execution killed with signal 11
10 Runtime error 13 ms 8736 KB Execution killed with signal 11
11 Runtime error 15 ms 8784 KB Execution killed with signal 11
12 Correct 1057 ms 11408 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9160 KB Execution killed with signal 11
14 Runtime error 12 ms 8656 KB Execution killed with signal 11
15 Runtime error 12 ms 8784 KB Execution killed with signal 11
16 Runtime error 34 ms 9180 KB Execution killed with signal 11
17 Runtime error 25 ms 9104 KB Execution killed with signal 11
18 Runtime error 37 ms 9264 KB Execution killed with signal 11
19 Runtime error 21 ms 8904 KB Execution killed with signal 11
20 Runtime error 40 ms 9448 KB Execution killed with signal 11
21 Runtime error 48 ms 9584 KB Execution killed with signal 11
22 Runtime error 27 ms 9184 KB Execution killed with signal 11
23 Runtime error 51 ms 9672 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 162 ms 12644 KB Execution killed with signal 11
2 Correct 4 ms 4484 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7204 KB Execution killed with signal 11
4 Runtime error 2 ms 464 KB Execution killed with signal 6
5 Runtime error 10 ms 7308 KB Execution killed with signal 11
6 Runtime error 12 ms 8784 KB Execution killed with signal 11
7 Runtime error 24 ms 9136 KB Execution killed with signal 11
8 Runtime error 12 ms 8016 KB Execution killed with signal 11
9 Runtime error 11 ms 8656 KB Execution killed with signal 11
10 Runtime error 13 ms 8736 KB Execution killed with signal 11
11 Runtime error 15 ms 8784 KB Execution killed with signal 11
12 Correct 1057 ms 11408 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9160 KB Execution killed with signal 11
14 Runtime error 12 ms 8656 KB Execution killed with signal 11
15 Runtime error 12 ms 8784 KB Execution killed with signal 11
16 Runtime error 34 ms 9180 KB Execution killed with signal 11
17 Runtime error 25 ms 9104 KB Execution killed with signal 11
18 Runtime error 37 ms 9264 KB Execution killed with signal 11
19 Runtime error 21 ms 8904 KB Execution killed with signal 11
20 Runtime error 40 ms 9448 KB Execution killed with signal 11
21 Runtime error 48 ms 9584 KB Execution killed with signal 11
22 Runtime error 27 ms 9184 KB Execution killed with signal 11
23 Runtime error 51 ms 9672 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 162 ms 12644 KB Execution killed with signal 11
2 Correct 4 ms 4484 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7204 KB Execution killed with signal 11
4 Runtime error 2 ms 464 KB Execution killed with signal 6
5 Runtime error 10 ms 7308 KB Execution killed with signal 11
6 Runtime error 12 ms 8784 KB Execution killed with signal 11
7 Runtime error 24 ms 9136 KB Execution killed with signal 11
8 Runtime error 12 ms 8016 KB Execution killed with signal 11
9 Runtime error 11 ms 8656 KB Execution killed with signal 11
10 Runtime error 13 ms 8736 KB Execution killed with signal 11
11 Runtime error 15 ms 8784 KB Execution killed with signal 11
12 Correct 1057 ms 11408 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9160 KB Execution killed with signal 11
14 Runtime error 12 ms 8656 KB Execution killed with signal 11
15 Runtime error 12 ms 8784 KB Execution killed with signal 11
16 Runtime error 34 ms 9180 KB Execution killed with signal 11
17 Runtime error 25 ms 9104 KB Execution killed with signal 11
18 Runtime error 37 ms 9264 KB Execution killed with signal 11
19 Runtime error 21 ms 8904 KB Execution killed with signal 11
20 Runtime error 40 ms 9448 KB Execution killed with signal 11
21 Runtime error 48 ms 9584 KB Execution killed with signal 11
22 Runtime error 27 ms 9184 KB Execution killed with signal 11
23 Runtime error 51 ms 9672 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 162 ms 12644 KB Execution killed with signal 11
2 Correct 4 ms 4484 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7204 KB Execution killed with signal 11
4 Runtime error 2 ms 464 KB Execution killed with signal 6
5 Runtime error 10 ms 7308 KB Execution killed with signal 11
6 Runtime error 12 ms 8784 KB Execution killed with signal 11
7 Runtime error 24 ms 9136 KB Execution killed with signal 11
8 Runtime error 12 ms 8016 KB Execution killed with signal 11
9 Runtime error 11 ms 8656 KB Execution killed with signal 11
10 Runtime error 13 ms 8736 KB Execution killed with signal 11
11 Runtime error 15 ms 8784 KB Execution killed with signal 11
12 Correct 1057 ms 11408 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9160 KB Execution killed with signal 11
14 Runtime error 12 ms 8656 KB Execution killed with signal 11
15 Runtime error 12 ms 8784 KB Execution killed with signal 11
16 Runtime error 34 ms 9180 KB Execution killed with signal 11
17 Runtime error 25 ms 9104 KB Execution killed with signal 11
18 Runtime error 37 ms 9264 KB Execution killed with signal 11
19 Runtime error 21 ms 8904 KB Execution killed with signal 11
20 Runtime error 40 ms 9448 KB Execution killed with signal 11
21 Runtime error 48 ms 9584 KB Execution killed with signal 11
22 Runtime error 27 ms 9184 KB Execution killed with signal 11
23 Runtime error 51 ms 9672 KB Execution killed with signal 11