Submission #387437

#TimeUsernameProblemLanguageResultExecution timeMemory
387437Aldas25Parrots (IOI11_parrots)C++14
81 / 100
6 ms1384 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(n) FOR(O, 1, (n)) #define pb push_back #define f first #define s second void encode(int N, int M[]) { FOR(i, 0, N-1) { int a = i<<3; FOR(j, 0, 7) { if (M[i] & (1<<j)) { int b = a + j; //cout << " i = " << i << " a = " <<a << " j = " << j << " b = " << b << endl; send(b); } } } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(n) FOR(O, 1, (n)) #define pb push_back #define f first #define s second void decode(int N, int L, int X[]) { vector<int> rez(N, 0); FOR(i, 0, L-1) { int b = X[i]; int j = b%8; int a = b>>3; rez[a] += 1<<j; } for (int x : rez) output(x); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...