Submission #565116

# Submission time Handle Problem Language Result Execution time Memory
565116 2022-05-20T09:59:38 Z Dodo Saveit (IOI10_saveit) C++14
0 / 100
261 ms 25392 KB
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
#define ll long long
using namespace std;

void encode(int n, int h, int p, int a[], int b[]){

  map<pair<int,int>,bool>mp;

  for(int i=0;i<p;i++)
    mp[{a[i],b[i]}]=1;

  for(int i=0;i<h;i++)
  {
    for(int j=0;j<n;j++)
    {
      if(mp[{i,j}]||mp[{j,i}])encode_bit(1);
      else encode_bit(0);
    }
  }
  return;
}
#include <bits/stdc++.h>
#include "grader.h"
#include "decoder.h"
#define ll long long
using namespace std;


void decode(int n, int h) {
  vector<ll>v[n];
   for(int i=0;i<h;i++)
   {
     for(int j=0;j<n;j++)
     {
       int a = decode_bit();
       if(a==1)
       {
         v[i].push_back(j);
         v[j].push_back(i);
       }
     }
   }

   for(int i=0;i<h;i++)
   {
     deque<ll>q;
     ll vis[n]={};
     vis[i]=1;
     q.push_back(i);
     while(!q.empty())
     {
       ll x=q.front();
       q.pop_front();
       for(auto u:v[x])
       {
         if(vis[u]==0)
         {
           vis[u]=vis[x]+1;
           q.push_back(u);
         }
       }
     }
     for(int j=0;j<n;j++)
     {
       hops(i,j,vis[j]-1);
     }
   }
}
# Verdict Execution time Memory Grader output
1 Correct 261 ms 25392 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4612 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9048 KB wrong parameter
4 Correct 2 ms 4604 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 32 ms 9472 KB wrong parameter
6 Incorrect 52 ms 9892 KB wrong parameter
7 Incorrect 63 ms 11136 KB wrong parameter
8 Incorrect 26 ms 9328 KB wrong parameter
9 Incorrect 28 ms 9592 KB wrong parameter
10 Incorrect 28 ms 9560 KB wrong parameter
11 Incorrect 37 ms 9956 KB wrong parameter
12 Incorrect 29 ms 9456 KB wrong parameter
13 Incorrect 68 ms 11920 KB wrong parameter
14 Incorrect 31 ms 9744 KB wrong parameter
15 Incorrect 32 ms 9740 KB wrong parameter
16 Incorrect 54 ms 11544 KB wrong parameter
17 Incorrect 56 ms 11216 KB wrong parameter
18 Incorrect 70 ms 11952 KB wrong parameter
19 Incorrect 46 ms 10656 KB wrong parameter
20 Incorrect 70 ms 12668 KB wrong parameter
21 Incorrect 85 ms 13412 KB wrong parameter
22 Incorrect 69 ms 11632 KB wrong parameter
23 Incorrect 106 ms 13768 KB wrong parameter
# Verdict Execution time Memory Grader output
1 Correct 261 ms 25392 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4612 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9048 KB wrong parameter
4 Correct 2 ms 4604 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 32 ms 9472 KB wrong parameter
6 Incorrect 52 ms 9892 KB wrong parameter
7 Incorrect 63 ms 11136 KB wrong parameter
8 Incorrect 26 ms 9328 KB wrong parameter
9 Incorrect 28 ms 9592 KB wrong parameter
10 Incorrect 28 ms 9560 KB wrong parameter
11 Incorrect 37 ms 9956 KB wrong parameter
12 Incorrect 29 ms 9456 KB wrong parameter
13 Incorrect 68 ms 11920 KB wrong parameter
14 Incorrect 31 ms 9744 KB wrong parameter
15 Incorrect 32 ms 9740 KB wrong parameter
16 Incorrect 54 ms 11544 KB wrong parameter
17 Incorrect 56 ms 11216 KB wrong parameter
18 Incorrect 70 ms 11952 KB wrong parameter
19 Incorrect 46 ms 10656 KB wrong parameter
20 Incorrect 70 ms 12668 KB wrong parameter
21 Incorrect 85 ms 13412 KB wrong parameter
22 Incorrect 69 ms 11632 KB wrong parameter
23 Incorrect 106 ms 13768 KB wrong parameter
# Verdict Execution time Memory Grader output
1 Correct 261 ms 25392 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4612 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9048 KB wrong parameter
4 Correct 2 ms 4604 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 32 ms 9472 KB wrong parameter
6 Incorrect 52 ms 9892 KB wrong parameter
7 Incorrect 63 ms 11136 KB wrong parameter
8 Incorrect 26 ms 9328 KB wrong parameter
9 Incorrect 28 ms 9592 KB wrong parameter
10 Incorrect 28 ms 9560 KB wrong parameter
11 Incorrect 37 ms 9956 KB wrong parameter
12 Incorrect 29 ms 9456 KB wrong parameter
13 Incorrect 68 ms 11920 KB wrong parameter
14 Incorrect 31 ms 9744 KB wrong parameter
15 Incorrect 32 ms 9740 KB wrong parameter
16 Incorrect 54 ms 11544 KB wrong parameter
17 Incorrect 56 ms 11216 KB wrong parameter
18 Incorrect 70 ms 11952 KB wrong parameter
19 Incorrect 46 ms 10656 KB wrong parameter
20 Incorrect 70 ms 12668 KB wrong parameter
21 Incorrect 85 ms 13412 KB wrong parameter
22 Incorrect 69 ms 11632 KB wrong parameter
23 Incorrect 106 ms 13768 KB wrong parameter
# Verdict Execution time Memory Grader output
1 Correct 261 ms 25392 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4612 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9048 KB wrong parameter
4 Correct 2 ms 4604 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 32 ms 9472 KB wrong parameter
6 Incorrect 52 ms 9892 KB wrong parameter
7 Incorrect 63 ms 11136 KB wrong parameter
8 Incorrect 26 ms 9328 KB wrong parameter
9 Incorrect 28 ms 9592 KB wrong parameter
10 Incorrect 28 ms 9560 KB wrong parameter
11 Incorrect 37 ms 9956 KB wrong parameter
12 Incorrect 29 ms 9456 KB wrong parameter
13 Incorrect 68 ms 11920 KB wrong parameter
14 Incorrect 31 ms 9744 KB wrong parameter
15 Incorrect 32 ms 9740 KB wrong parameter
16 Incorrect 54 ms 11544 KB wrong parameter
17 Incorrect 56 ms 11216 KB wrong parameter
18 Incorrect 70 ms 11952 KB wrong parameter
19 Incorrect 46 ms 10656 KB wrong parameter
20 Incorrect 70 ms 12668 KB wrong parameter
21 Incorrect 85 ms 13412 KB wrong parameter
22 Incorrect 69 ms 11632 KB wrong parameter
23 Incorrect 106 ms 13768 KB wrong parameter