Submission #565060

# Submission time Handle Problem Language Result Execution time Memory
565060 2022-05-20T08:29:38 Z Uzouf Saveit (IOI10_saveit) C++14
0 / 100
1055 ms 12616 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)==(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;
      for (int p=0;p<10;p++) {
      if (decode_bit()==1) nm+=(1<<p);
      }
      hops(i,j,nm);
    }
  }
  
}

Compilation message

decoder.cpp: In function 'void decode(int, int)':
decoder.cpp:9:16: warning: unused variable 't' [-Wunused-variable]
    9 |       int nm=0,t=0;
      |                ^
# Verdict Execution time Memory Grader output
1 Runtime error 178 ms 12616 KB Execution killed with signal 11
2 Correct 3 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7180 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 7376 KB Execution killed with signal 11
6 Runtime error 13 ms 8820 KB Execution killed with signal 11
7 Runtime error 23 ms 9160 KB Execution killed with signal 11
8 Runtime error 10 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8784 KB Execution killed with signal 11
10 Runtime error 11 ms 8808 KB Execution killed with signal 11
11 Runtime error 14 ms 8912 KB Execution killed with signal 11
12 Correct 1055 ms 11456 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 25 ms 9296 KB Execution killed with signal 11
14 Runtime error 13 ms 8780 KB Execution killed with signal 11
15 Runtime error 11 ms 8812 KB Execution killed with signal 11
16 Runtime error 30 ms 9208 KB Execution killed with signal 11
17 Runtime error 27 ms 9168 KB Execution killed with signal 11
18 Runtime error 34 ms 9264 KB Execution killed with signal 11
19 Runtime error 20 ms 9044 KB Execution killed with signal 11
20 Runtime error 41 ms 9600 KB Execution killed with signal 11
21 Runtime error 49 ms 9620 KB Execution killed with signal 11
22 Runtime error 27 ms 9244 KB Execution killed with signal 11
23 Runtime error 54 ms 9776 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 178 ms 12616 KB Execution killed with signal 11
2 Correct 3 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7180 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 7376 KB Execution killed with signal 11
6 Runtime error 13 ms 8820 KB Execution killed with signal 11
7 Runtime error 23 ms 9160 KB Execution killed with signal 11
8 Runtime error 10 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8784 KB Execution killed with signal 11
10 Runtime error 11 ms 8808 KB Execution killed with signal 11
11 Runtime error 14 ms 8912 KB Execution killed with signal 11
12 Correct 1055 ms 11456 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 25 ms 9296 KB Execution killed with signal 11
14 Runtime error 13 ms 8780 KB Execution killed with signal 11
15 Runtime error 11 ms 8812 KB Execution killed with signal 11
16 Runtime error 30 ms 9208 KB Execution killed with signal 11
17 Runtime error 27 ms 9168 KB Execution killed with signal 11
18 Runtime error 34 ms 9264 KB Execution killed with signal 11
19 Runtime error 20 ms 9044 KB Execution killed with signal 11
20 Runtime error 41 ms 9600 KB Execution killed with signal 11
21 Runtime error 49 ms 9620 KB Execution killed with signal 11
22 Runtime error 27 ms 9244 KB Execution killed with signal 11
23 Runtime error 54 ms 9776 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 178 ms 12616 KB Execution killed with signal 11
2 Correct 3 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7180 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 7376 KB Execution killed with signal 11
6 Runtime error 13 ms 8820 KB Execution killed with signal 11
7 Runtime error 23 ms 9160 KB Execution killed with signal 11
8 Runtime error 10 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8784 KB Execution killed with signal 11
10 Runtime error 11 ms 8808 KB Execution killed with signal 11
11 Runtime error 14 ms 8912 KB Execution killed with signal 11
12 Correct 1055 ms 11456 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 25 ms 9296 KB Execution killed with signal 11
14 Runtime error 13 ms 8780 KB Execution killed with signal 11
15 Runtime error 11 ms 8812 KB Execution killed with signal 11
16 Runtime error 30 ms 9208 KB Execution killed with signal 11
17 Runtime error 27 ms 9168 KB Execution killed with signal 11
18 Runtime error 34 ms 9264 KB Execution killed with signal 11
19 Runtime error 20 ms 9044 KB Execution killed with signal 11
20 Runtime error 41 ms 9600 KB Execution killed with signal 11
21 Runtime error 49 ms 9620 KB Execution killed with signal 11
22 Runtime error 27 ms 9244 KB Execution killed with signal 11
23 Runtime error 54 ms 9776 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 178 ms 12616 KB Execution killed with signal 11
2 Correct 3 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 10 ms 7180 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 7376 KB Execution killed with signal 11
6 Runtime error 13 ms 8820 KB Execution killed with signal 11
7 Runtime error 23 ms 9160 KB Execution killed with signal 11
8 Runtime error 10 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8784 KB Execution killed with signal 11
10 Runtime error 11 ms 8808 KB Execution killed with signal 11
11 Runtime error 14 ms 8912 KB Execution killed with signal 11
12 Correct 1055 ms 11456 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 25 ms 9296 KB Execution killed with signal 11
14 Runtime error 13 ms 8780 KB Execution killed with signal 11
15 Runtime error 11 ms 8812 KB Execution killed with signal 11
16 Runtime error 30 ms 9208 KB Execution killed with signal 11
17 Runtime error 27 ms 9168 KB Execution killed with signal 11
18 Runtime error 34 ms 9264 KB Execution killed with signal 11
19 Runtime error 20 ms 9044 KB Execution killed with signal 11
20 Runtime error 41 ms 9600 KB Execution killed with signal 11
21 Runtime error 49 ms 9620 KB Execution killed with signal 11
22 Runtime error 27 ms 9244 KB Execution killed with signal 11
23 Runtime error 54 ms 9776 KB Execution killed with signal 11