이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define pb push_back
#define pii pair<int,int>
#define ss second
#define ff first
#define debu(x) (cerr << #x << " = "<< x << "\n")
#define bitout(x,y) {\
cerr << #x << " : ";\
for (int justforbits = y; justforbits >=0; justforbits--)cout << (((1 << justforbits) & x)>=1);\
cout << "\n";\
}
void encode(int N, int M[])
{
for (int a = 0; a < N; a++)
{
for (int b = 0; b < 8; b++)
{
int thenum = (a << 4);
//cout << a << " , ";
//bitout(a,8);
thenum += (b << 1);
thenum += (((1 << b) & M[a]) >=1);
//bitout(thenum,8);
send(thenum);
}
}
}
//#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define pb push_back
#define pii pair<int,int>
#define ss second
#define ff first
#define debu(x) (cerr << #x << " = "<< x << "\n")
#define bitout(x,y) {\
cerr << #x << " : ";\
for (int justforbits = y; justforbits >=0; justforbits--)cout << (((1 << justforbits) & x)>=1);\
cout << "\n";\
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int N, int L, int X[])
{
vector<int>thenums(N,0);
for (int a = 0; a < L; a++)
{
int pos = (X[a] >> 4);
//debu(pos);
X[a]-=(pos << 4);
int inpos = (X[a] >> 1);
X[a] -= (inpos << 1);
thenums[pos] = (thenums[pos] | (X[a] << inpos));
}
for(int i=0; i<N; i++)
{
int b = thenums[i];
output(b);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |