# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
666503 | rainboy | Ancient Machine (JOI21_ancient_machine) | C++17 | 66 ms | 7688 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <cassert>
#include <vector>
using namespace std;
typedef vector<char> str;
namespace A {
const int N = 100001, K = 63, L = 44, M = 70000;
long long ff[K + 1];
void init() {
ff[0] = 1, ff[1] = 2;
for (int i = 2; i <= K; i++)
ff[i] = ff[i - 1] + ff[i - 2];
assert(1LL << L >= ff[K] && (N + K - 1) / K * L <= M);
}
}
void encode(str aa, int n) {
for (int i = 0; i < n; i += A::K) {
long long x = 0;
for (int j = 0; j < A::K && i + j < n; j++)
if (aa[i + j] == 1)
x += A::ff[j];
for (int l = 0; l < A::L; l++)
Send(x >> l & 1);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |