# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
29263 | osmanorhan | Parrots (IOI11_parrots) | C++14 | 15 ms | 2448 KiB |
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<cmath>
#include<cstdio>
#include<bits/stdc++.h>
bool a[9];
void encode(int N, int M[])
{
int sum=0;
// printf("hebele\n");
for(int i=0; i<N; i++) {
for(int b=0; b<9; b++) a[b] = false;
int n = M[i];
int msg=i;
// printf("%d sayi var i=%d\n",N, i);
msg = msg<<2;
// printf("msg %d\n", msg);
//n sayisi ikilik tabana donusturule
for(int j=7; j>-1; j--) {
if( n>=(1<<j) ) {
a[j] = true;
// printf("%d true\n", j);
n-=1<<j;
}
}
for(int j=0; j<4; j++) {
if(a[2*j] and a[2*j+1]) { sum+=3; }
Compilation message (stderr)
# | 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... |