# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
18651 |
2016-02-13T10:13:53 Z |
ggoh |
Parrots (IOI11_parrots) |
C++ |
|
8 ms |
2184 KB |
#include "encoder.h"
#include "encoderlib.h"
void encode(int N,int M[])
{
int t,u;
for(int i=0;i<N;i++)
{
u=M[i];t=0;
while(u)
{
if(u%2)send(32*t+i);
u/=2;
t++;
}
}
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int N,int L,int X[])
{
int ans,ch[256]={};
for(int i=0;i<L;i++)ch[X[i]]++;
for(int i=0;i<N;i++)
{
ans=0;
for(int j=0;j<8;j++)
{
if(ch[32*j+i])ans+=(1<<j);
}
output(ans);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
752 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
1632 KB |
Output is correct |
2 |
Correct |
6 ms |
2040 KB |
Output is correct |
3 |
Correct |
5 ms |
2040 KB |
Output is correct |
4 |
Correct |
7 ms |
2040 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
2096 KB |
Output is correct |
2 |
Correct |
4 ms |
2128 KB |
Output is correct |
3 |
Correct |
5 ms |
2128 KB |
Output is correct |
4 |
Correct |
6 ms |
2128 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
2128 KB |
Output is correct |
2 |
Correct |
6 ms |
2128 KB |
Output is correct |
3 |
Correct |
6 ms |
2144 KB |
Output is correct |
4 |
Correct |
6 ms |
2176 KB |
Output is correct |
5 |
Correct |
8 ms |
2176 KB |
Output is correct |
6 |
Correct |
7 ms |
2176 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
5 ms |
2176 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
8 ms |
2184 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
4 ms |
2184 KB |
Error : Bad encoded integer |
4 |
Incorrect |
4 ms |
2184 KB |
Error : Bad encoded integer |
5 |
Incorrect |
4 ms |
2184 KB |
Error : Bad encoded integer |
6 |
Incorrect |
4 ms |
2184 KB |
Error : Bad encoded integer |
7 |
Incorrect |
4 ms |
2184 KB |
Error : Bad encoded integer |