This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "encoder.h"
#include "encoderlib.h"
#include<bits/stdc++.h>
#define fori(a,b,c) for(a=b; a<c; a++)
#define ford(a,b,c) for(a=b; a>=c; a--)
#define mp make_pair
#define pb push_back
#define ll long long
#define pii pair<int,int>
using namespace std;
void encode(int N, int M[])
{
int i;
int x = 1;
for(i=0; i<N; i++){
send(i*256+M[i]);
}
}
#include "decoder.h"
#include "decoderlib.h"
#include<bits/stdc++.h>
#define fori(a,b,c) for(a=b; a<c; a++)
#define ford(a,b,c) for(a=b; a>=c; a--)
#define mp make_pair
#define pb push_back
#define ll long long
#define pii pair<int,int>
using namespace std;
void decode(int N, int L, int X[])
{
int i, b;
sort(X,X+L);
for(i=0; i<L; i++) {
output(X[i]%256);
}
}
Compilation message (stderr)
encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:15:6: warning: unused variable 'x' [-Wunused-variable]
int x = 1;
^
decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:14:9: warning: unused variable 'b' [-Wunused-variable]
int i, 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... |