# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
223984 |
2020-04-17T00:13:15 Z |
ly20 |
Parrots (IOI11_parrots) |
C++17 |
|
11 ms |
1536 KB |
#include "encoder.h"
#include "encoderlib.h"
void encode(int N, int M[])
{
int i;
for(i=0; i<N; i++)
for(int j = 0; j < 8; j++) {
int id = (1 << j);
if(id & M[i]) send(8 * i + j);
}
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int N, int L, int X[])
{
int resp[100];
int i, b;
for(int i = 0; i < 100; i++) {
resp[i] = 0;
}
for(i=0; i<L; i++) {
b = X[i];
resp[b / 8] += (1 << (b % 8));
}
for(int i = 0; i < N; i++) {
output(resp[i]);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1536 KB |
Output is correct |
2 |
Correct |
10 ms |
1536 KB |
Output is correct |
3 |
Correct |
10 ms |
1536 KB |
Output is correct |
4 |
Correct |
10 ms |
1536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
1536 KB |
Output is correct |
2 |
Correct |
10 ms |
1536 KB |
Output is correct |
3 |
Correct |
10 ms |
1536 KB |
Output is correct |
4 |
Correct |
11 ms |
1536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1536 KB |
Output is correct |
2 |
Correct |
11 ms |
1536 KB |
Output is correct |
3 |
Correct |
10 ms |
1536 KB |
Output is correct |
4 |
Correct |
11 ms |
1536 KB |
Output is correct |
5 |
Correct |
11 ms |
1536 KB |
Output is correct |
6 |
Correct |
11 ms |
1536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
10 ms |
1536 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
11 ms |
1536 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
8 ms |
872 KB |
Error : Bad encoded integer |
4 |
Incorrect |
8 ms |
896 KB |
Error : Bad encoded integer |
5 |
Incorrect |
9 ms |
772 KB |
Error : Bad encoded integer |
6 |
Incorrect |
8 ms |
896 KB |
Error : Bad encoded integer |
7 |
Incorrect |
9 ms |
904 KB |
Error : Bad encoded integer |