Submission #565079

# Submission time Handle Problem Language Result Execution time Memory
565079 2022-05-20T08:48:46 Z Uzouf Saveit (IOI10_saveit) C++14
0 / 100
791 ms 12604 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]=2000;
    }
    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++) {
        int tmp=grid[i][k]+grid[k][j];
        if (i!=j && grid[i][j]>tmp) grid[i][j]=tmp;
      }
    }
 
  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 166 ms 12604 KB Execution killed with signal 11
2 Correct 2 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 9 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4616 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 11 ms 7376 KB Execution killed with signal 11
6 Runtime error 12 ms 8912 KB Execution killed with signal 11
7 Runtime error 26 ms 9168 KB Execution killed with signal 11
8 Runtime error 9 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8756 KB Execution killed with signal 11
10 Runtime error 11 ms 8784 KB Execution killed with signal 11
11 Runtime error 13 ms 8844 KB Execution killed with signal 11
12 Correct 791 ms 11520 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9284 KB Execution killed with signal 11
14 Runtime error 13 ms 8800 KB Execution killed with signal 11
15 Runtime error 11 ms 8752 KB Execution killed with signal 11
16 Runtime error 31 ms 9272 KB Execution killed with signal 11
17 Runtime error 24 ms 9160 KB Execution killed with signal 11
18 Runtime error 35 ms 9316 KB Execution killed with signal 11
19 Runtime error 18 ms 9052 KB Execution killed with signal 11
20 Runtime error 41 ms 9544 KB Execution killed with signal 11
21 Runtime error 41 ms 9704 KB Execution killed with signal 11
22 Runtime error 30 ms 9208 KB Execution killed with signal 11
23 Runtime error 51 ms 9688 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 166 ms 12604 KB Execution killed with signal 11
2 Correct 2 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 9 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4616 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 11 ms 7376 KB Execution killed with signal 11
6 Runtime error 12 ms 8912 KB Execution killed with signal 11
7 Runtime error 26 ms 9168 KB Execution killed with signal 11
8 Runtime error 9 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8756 KB Execution killed with signal 11
10 Runtime error 11 ms 8784 KB Execution killed with signal 11
11 Runtime error 13 ms 8844 KB Execution killed with signal 11
12 Correct 791 ms 11520 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9284 KB Execution killed with signal 11
14 Runtime error 13 ms 8800 KB Execution killed with signal 11
15 Runtime error 11 ms 8752 KB Execution killed with signal 11
16 Runtime error 31 ms 9272 KB Execution killed with signal 11
17 Runtime error 24 ms 9160 KB Execution killed with signal 11
18 Runtime error 35 ms 9316 KB Execution killed with signal 11
19 Runtime error 18 ms 9052 KB Execution killed with signal 11
20 Runtime error 41 ms 9544 KB Execution killed with signal 11
21 Runtime error 41 ms 9704 KB Execution killed with signal 11
22 Runtime error 30 ms 9208 KB Execution killed with signal 11
23 Runtime error 51 ms 9688 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 166 ms 12604 KB Execution killed with signal 11
2 Correct 2 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 9 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4616 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 11 ms 7376 KB Execution killed with signal 11
6 Runtime error 12 ms 8912 KB Execution killed with signal 11
7 Runtime error 26 ms 9168 KB Execution killed with signal 11
8 Runtime error 9 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8756 KB Execution killed with signal 11
10 Runtime error 11 ms 8784 KB Execution killed with signal 11
11 Runtime error 13 ms 8844 KB Execution killed with signal 11
12 Correct 791 ms 11520 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9284 KB Execution killed with signal 11
14 Runtime error 13 ms 8800 KB Execution killed with signal 11
15 Runtime error 11 ms 8752 KB Execution killed with signal 11
16 Runtime error 31 ms 9272 KB Execution killed with signal 11
17 Runtime error 24 ms 9160 KB Execution killed with signal 11
18 Runtime error 35 ms 9316 KB Execution killed with signal 11
19 Runtime error 18 ms 9052 KB Execution killed with signal 11
20 Runtime error 41 ms 9544 KB Execution killed with signal 11
21 Runtime error 41 ms 9704 KB Execution killed with signal 11
22 Runtime error 30 ms 9208 KB Execution killed with signal 11
23 Runtime error 51 ms 9688 KB Execution killed with signal 11
# Verdict Execution time Memory Grader output
1 Runtime error 166 ms 12604 KB Execution killed with signal 11
2 Correct 2 ms 4604 KB Output is correct - 150 call(s) of encode_bit()
3 Runtime error 9 ms 7248 KB Execution killed with signal 11
4 Correct 2 ms 4616 KB Output is correct - 250 call(s) of encode_bit()
5 Runtime error 11 ms 7376 KB Execution killed with signal 11
6 Runtime error 12 ms 8912 KB Execution killed with signal 11
7 Runtime error 26 ms 9168 KB Execution killed with signal 11
8 Runtime error 9 ms 8144 KB Execution killed with signal 11
9 Runtime error 11 ms 8756 KB Execution killed with signal 11
10 Runtime error 11 ms 8784 KB Execution killed with signal 11
11 Runtime error 13 ms 8844 KB Execution killed with signal 11
12 Correct 791 ms 11520 KB Output is partially correct - 360000 call(s) of encode_bit()
13 Runtime error 30 ms 9284 KB Execution killed with signal 11
14 Runtime error 13 ms 8800 KB Execution killed with signal 11
15 Runtime error 11 ms 8752 KB Execution killed with signal 11
16 Runtime error 31 ms 9272 KB Execution killed with signal 11
17 Runtime error 24 ms 9160 KB Execution killed with signal 11
18 Runtime error 35 ms 9316 KB Execution killed with signal 11
19 Runtime error 18 ms 9052 KB Execution killed with signal 11
20 Runtime error 41 ms 9544 KB Execution killed with signal 11
21 Runtime error 41 ms 9704 KB Execution killed with signal 11
22 Runtime error 30 ms 9208 KB Execution killed with signal 11
23 Runtime error 51 ms 9688 KB Execution killed with signal 11