Submission #241715

# Submission time Handle Problem Language Result Execution time Memory
241715 2020-06-25T10:29:08 Z davi_bart Saveit (IOI10_saveit) C++14
0 / 100
441 ms 19256 KB
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
using namespace std;
#define ll long long
//#define int ll
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
vector<int> v[1010];
int dist[40][1010];
void bfs(int pos){
  vector<bool> vis(1100,0);
  queue<pair<int,int> >q;
  q.push({pos,0});
  while(!q.empty()){
    int p=q.front().first;
    int d=q.front().second;
    q.pop();
    if(vis[p])continue;
    vis[p]=1;
    dist[pos][p]=d;
    for(int k:v[p])q.push({k,d+1});
  }
}
void aggiungi(int k){
  for(int i=9;i>=0;i--){
    encode_bit((k&(1<<i))>0);
  }
}
void encode(int nv, int nh, int ne, int *v1, int *v2){
  for(int i=0;i<ne;i++){
    v[v1[i]].push_back(v2[i]);
    v[v2[i]].push_back(v1[i]);
  }
  for(int i=0;i<nh;i++){
    bfs(i);
  }

  for(int i=0;i<nh;i++){
    for(int j=0;j<nv;j++){
      aggiungi(dist[i][j]);
    }
  }
  return;
}/*
signed main(){
    ios_base::sync_with_stdio(0);cin.tie(0);

}*/
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include "grader.h"
#include "decoder.h"
using namespace std;
#define ll long long
//#define int ll
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int c(){
  int k=0;
  for(int i=9;i>=0;i--){
    k+=(1<<k)*decode_bit();
  }
  return k;
}
void decode(int nv, int nh){
  for(int i=0;i<nh;i++){
    for(int j=0;j<nv;j++){
      hops(i,j,c());
    }
  }
}
# Verdict Execution time Memory Grader output
1 Incorrect 441 ms 19256 KB Output isn't correct
2 Incorrect 11 ms 4804 KB Output isn't correct
3 Incorrect 93 ms 7632 KB Output isn't correct
4 Incorrect 12 ms 4908 KB Output isn't correct
5 Incorrect 84 ms 8040 KB Output isn't correct
6 Incorrect 94 ms 8300 KB Output isn't correct
7 Incorrect 135 ms 8796 KB Output isn't correct
8 Incorrect 80 ms 7784 KB wrong parameter
9 Incorrect 107 ms 7936 KB wrong parameter
10 Incorrect 84 ms 8036 KB wrong parameter
11 Incorrect 89 ms 8252 KB wrong parameter
12 Incorrect 84 ms 8016 KB wrong parameter
13 Incorrect 124 ms 8844 KB wrong parameter
14 Incorrect 87 ms 8240 KB wrong parameter
15 Incorrect 89 ms 8064 KB wrong parameter
16 Incorrect 120 ms 8588 KB wrong parameter
17 Incorrect 113 ms 8584 KB wrong parameter
18 Incorrect 156 ms 8976 KB wrong parameter
19 Incorrect 110 ms 8668 KB wrong parameter
20 Incorrect 168 ms 9236 KB wrong parameter
21 Incorrect 195 ms 9436 KB wrong parameter
22 Incorrect 125 ms 8924 KB wrong parameter
23 Incorrect 159 ms 9704 KB wrong parameter
# Verdict Execution time Memory Grader output
1 Incorrect 441 ms 19256 KB Output isn't correct
2 Incorrect 11 ms 4804 KB Output isn't correct
3 Incorrect 93 ms 7632 KB Output isn't correct
4 Incorrect 12 ms 4908 KB Output isn't correct
5 Incorrect 84 ms 8040 KB Output isn't correct
6 Incorrect 94 ms 8300 KB Output isn't correct
7 Incorrect 135 ms 8796 KB Output isn't correct
8 Incorrect 80 ms 7784 KB wrong parameter
9 Incorrect 107 ms 7936 KB wrong parameter
10 Incorrect 84 ms 8036 KB wrong parameter
11 Incorrect 89 ms 8252 KB wrong parameter
12 Incorrect 84 ms 8016 KB wrong parameter
13 Incorrect 124 ms 8844 KB wrong parameter
14 Incorrect 87 ms 8240 KB wrong parameter
15 Incorrect 89 ms 8064 KB wrong parameter
16 Incorrect 120 ms 8588 KB wrong parameter
17 Incorrect 113 ms 8584 KB wrong parameter
18 Incorrect 156 ms 8976 KB wrong parameter
19 Incorrect 110 ms 8668 KB wrong parameter
20 Incorrect 168 ms 9236 KB wrong parameter
21 Incorrect 195 ms 9436 KB wrong parameter
22 Incorrect 125 ms 8924 KB wrong parameter
23 Incorrect 159 ms 9704 KB wrong parameter
# Verdict Execution time Memory Grader output
1 Incorrect 441 ms 19256 KB Output isn't correct
2 Incorrect 11 ms 4804 KB Output isn't correct
3 Incorrect 93 ms 7632 KB Output isn't correct
4 Incorrect 12 ms 4908 KB Output isn't correct
5 Incorrect 84 ms 8040 KB Output isn't correct
6 Incorrect 94 ms 8300 KB Output isn't correct
7 Incorrect 135 ms 8796 KB Output isn't correct
8 Incorrect 80 ms 7784 KB wrong parameter
9 Incorrect 107 ms 7936 KB wrong parameter
10 Incorrect 84 ms 8036 KB wrong parameter
11 Incorrect 89 ms 8252 KB wrong parameter
12 Incorrect 84 ms 8016 KB wrong parameter
13 Incorrect 124 ms 8844 KB wrong parameter
14 Incorrect 87 ms 8240 KB wrong parameter
15 Incorrect 89 ms 8064 KB wrong parameter
16 Incorrect 120 ms 8588 KB wrong parameter
17 Incorrect 113 ms 8584 KB wrong parameter
18 Incorrect 156 ms 8976 KB wrong parameter
19 Incorrect 110 ms 8668 KB wrong parameter
20 Incorrect 168 ms 9236 KB wrong parameter
21 Incorrect 195 ms 9436 KB wrong parameter
22 Incorrect 125 ms 8924 KB wrong parameter
23 Incorrect 159 ms 9704 KB wrong parameter
# Verdict Execution time Memory Grader output
1 Incorrect 441 ms 19256 KB Output isn't correct
2 Incorrect 11 ms 4804 KB Output isn't correct
3 Incorrect 93 ms 7632 KB Output isn't correct
4 Incorrect 12 ms 4908 KB Output isn't correct
5 Incorrect 84 ms 8040 KB Output isn't correct
6 Incorrect 94 ms 8300 KB Output isn't correct
7 Incorrect 135 ms 8796 KB Output isn't correct
8 Incorrect 80 ms 7784 KB wrong parameter
9 Incorrect 107 ms 7936 KB wrong parameter
10 Incorrect 84 ms 8036 KB wrong parameter
11 Incorrect 89 ms 8252 KB wrong parameter
12 Incorrect 84 ms 8016 KB wrong parameter
13 Incorrect 124 ms 8844 KB wrong parameter
14 Incorrect 87 ms 8240 KB wrong parameter
15 Incorrect 89 ms 8064 KB wrong parameter
16 Incorrect 120 ms 8588 KB wrong parameter
17 Incorrect 113 ms 8584 KB wrong parameter
18 Incorrect 156 ms 8976 KB wrong parameter
19 Incorrect 110 ms 8668 KB wrong parameter
20 Incorrect 168 ms 9236 KB wrong parameter
21 Incorrect 195 ms 9436 KB wrong parameter
22 Incorrect 125 ms 8924 KB wrong parameter
23 Incorrect 159 ms 9704 KB wrong parameter