#include "encoder.h"
#include "encoderlib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sz size()
void encode(int N, int M[])
{
vector<pair<ll,ll> > v;
for(int i = 0; i < N; i++) v.push_back({M[i],i});
sort(v.begin(),v.end());
for(int i = 0; i < N; i++)
{
send(M[i]);
}
for(int i = 0; i < N; i++)
{
send(v[i].second);
}
}
#include "decoder.h"
#include "decoderlib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sz size()
ll ans[100];
void decode(int N, int L, int X[])
{
vector<ll> v;
for(int i = 0; i < N; i++)
{
v.push_back(X[i]);
}
sort(v.begin(),v.end());
for(int i = 0; i < N; i++)
{
ans[X[i+N]] = v[i];
}
for(int i=0; i< N; i++) {
output(ans[i]);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
792 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1296 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1548 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1292 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1304 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |