답안 #565120

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
565120 2022-05-20T10:05:18 Z Dodo 저장 (Saveit) (IOI10_saveit) C++14
0 / 100
275 ms 25356 KB
#include "bits/stdc++.h"
using namespace std;
#include "grader.h"
#include "encoder.h"
#define ll long long

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"
using namespace std;
#include "grader.h"
#include "encoder.h"
#define ll long long

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);
     }
   }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 275 ms 25356 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4604 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9068 KB wrong parameter
4 Correct 2 ms 4516 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 34 ms 9524 KB wrong parameter
6 Incorrect 31 ms 9976 KB wrong parameter
7 Incorrect 48 ms 11252 KB wrong parameter
8 Incorrect 24 ms 9328 KB wrong parameter
9 Incorrect 30 ms 9592 KB wrong parameter
10 Incorrect 29 ms 9532 KB wrong parameter
11 Incorrect 32 ms 10000 KB wrong parameter
12 Incorrect 25 ms 9476 KB wrong parameter
13 Incorrect 56 ms 11872 KB wrong parameter
14 Incorrect 26 ms 9580 KB wrong parameter
15 Incorrect 28 ms 9712 KB wrong parameter
16 Incorrect 53 ms 11636 KB wrong parameter
17 Incorrect 56 ms 11160 KB wrong parameter
18 Incorrect 60 ms 11996 KB wrong parameter
19 Incorrect 39 ms 10656 KB wrong parameter
20 Incorrect 86 ms 12672 KB wrong parameter
21 Incorrect 93 ms 13472 KB wrong parameter
22 Incorrect 59 ms 11576 KB wrong parameter
23 Incorrect 83 ms 13636 KB wrong parameter
# 결과 실행 시간 메모리 Grader output
1 Correct 275 ms 25356 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4604 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9068 KB wrong parameter
4 Correct 2 ms 4516 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 34 ms 9524 KB wrong parameter
6 Incorrect 31 ms 9976 KB wrong parameter
7 Incorrect 48 ms 11252 KB wrong parameter
8 Incorrect 24 ms 9328 KB wrong parameter
9 Incorrect 30 ms 9592 KB wrong parameter
10 Incorrect 29 ms 9532 KB wrong parameter
11 Incorrect 32 ms 10000 KB wrong parameter
12 Incorrect 25 ms 9476 KB wrong parameter
13 Incorrect 56 ms 11872 KB wrong parameter
14 Incorrect 26 ms 9580 KB wrong parameter
15 Incorrect 28 ms 9712 KB wrong parameter
16 Incorrect 53 ms 11636 KB wrong parameter
17 Incorrect 56 ms 11160 KB wrong parameter
18 Incorrect 60 ms 11996 KB wrong parameter
19 Incorrect 39 ms 10656 KB wrong parameter
20 Incorrect 86 ms 12672 KB wrong parameter
21 Incorrect 93 ms 13472 KB wrong parameter
22 Incorrect 59 ms 11576 KB wrong parameter
23 Incorrect 83 ms 13636 KB wrong parameter
# 결과 실행 시간 메모리 Grader output
1 Correct 275 ms 25356 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4604 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9068 KB wrong parameter
4 Correct 2 ms 4516 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 34 ms 9524 KB wrong parameter
6 Incorrect 31 ms 9976 KB wrong parameter
7 Incorrect 48 ms 11252 KB wrong parameter
8 Incorrect 24 ms 9328 KB wrong parameter
9 Incorrect 30 ms 9592 KB wrong parameter
10 Incorrect 29 ms 9532 KB wrong parameter
11 Incorrect 32 ms 10000 KB wrong parameter
12 Incorrect 25 ms 9476 KB wrong parameter
13 Incorrect 56 ms 11872 KB wrong parameter
14 Incorrect 26 ms 9580 KB wrong parameter
15 Incorrect 28 ms 9712 KB wrong parameter
16 Incorrect 53 ms 11636 KB wrong parameter
17 Incorrect 56 ms 11160 KB wrong parameter
18 Incorrect 60 ms 11996 KB wrong parameter
19 Incorrect 39 ms 10656 KB wrong parameter
20 Incorrect 86 ms 12672 KB wrong parameter
21 Incorrect 93 ms 13472 KB wrong parameter
22 Incorrect 59 ms 11576 KB wrong parameter
23 Incorrect 83 ms 13636 KB wrong parameter
# 결과 실행 시간 메모리 Grader output
1 Correct 275 ms 25356 KB Output is correct - 36000 call(s) of encode_bit()
2 Correct 2 ms 4604 KB Output is correct - 15 call(s) of encode_bit()
3 Incorrect 25 ms 9068 KB wrong parameter
4 Correct 2 ms 4516 KB Output is correct - 25 call(s) of encode_bit()
5 Incorrect 34 ms 9524 KB wrong parameter
6 Incorrect 31 ms 9976 KB wrong parameter
7 Incorrect 48 ms 11252 KB wrong parameter
8 Incorrect 24 ms 9328 KB wrong parameter
9 Incorrect 30 ms 9592 KB wrong parameter
10 Incorrect 29 ms 9532 KB wrong parameter
11 Incorrect 32 ms 10000 KB wrong parameter
12 Incorrect 25 ms 9476 KB wrong parameter
13 Incorrect 56 ms 11872 KB wrong parameter
14 Incorrect 26 ms 9580 KB wrong parameter
15 Incorrect 28 ms 9712 KB wrong parameter
16 Incorrect 53 ms 11636 KB wrong parameter
17 Incorrect 56 ms 11160 KB wrong parameter
18 Incorrect 60 ms 11996 KB wrong parameter
19 Incorrect 39 ms 10656 KB wrong parameter
20 Incorrect 86 ms 12672 KB wrong parameter
21 Incorrect 93 ms 13472 KB wrong parameter
22 Incorrect 59 ms 11576 KB wrong parameter
23 Incorrect 83 ms 13636 KB wrong parameter