답안 #962915

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
962915 2024-04-14T09:43:42 Z Malix 앵무새 (IOI11_parrots) C++14
0 / 100
1 ms 1324 KB
#include <bits/stdc++.h>
#include "encoder.h"
#include "encoderlib.h"

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef pair<int,int> pi;

#define REP(i,a,b) for(int i=a;i<b;i++)
#define F first
#define S second
#define PB push_back
#define MP make_pair


void encode(int N, int M[])
{
  REP(i,0,N){
    int k=i<<3;
    REP(j,0,8){
      int t=M[i]&(1<<j);
      if(t!=0){
        send(k+j);
      }
    }
  }
}
#include <bits/stdc++.h>
#include "decoder.h"
#include "decoderlib.h"

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef pair<int,int> pi;

#define REP(i,a,b) for(int i=a;i<b;i++)
#define F first
#define S second
#define PB push_back
#define MP make_pair


void decode(int N, int L, int X[])
{
  vi a(L);
  REP(i,0,L)a[i]=X[i];
  sort(a.begin(),a.end());
  REP(i,0,N){
    int k=i>>3;
    int ans=0;
    REP(j,0,8){
      bool flag=binary_search(a.begin(),a.end(),k+j);
      if(flag)ans|=(1<<j);
    }
    output(ans);
  }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 796 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1316 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1316 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1308 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1324 KB Error : Output is wrong
2 Halted 0 ms 0 KB -