# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
659934 | lunchbox | Zamjene (COCI16_zamjene) | C++17 | 5904 ms | 460472 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 <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
// #include "debugging.hpp"
using std::cout;
using std::endl;
using std::vector;
using ll = long long;
struct Hash {
static const ll MOD1 = 1e9 + 7;
static const ll MOD2 = 1e9 + 9;
ll h1, h2;
Hash(ll h1, ll h2) : h1(h1), h2(h2) { }
Hash() : h1(0), h2(0) { }
Hash operator+(const Hash& o) {
return Hash((h1 + o.h1) % MOD1, (h2 + o.h2) % MOD2);
}
Hash operator-(const Hash& o) {
return Hash((h1 - o.h1 + MOD1) % MOD1, (h2 - o.h2 + MOD2) % MOD2);
}
Hash exp(const ll& n) {
return Hash(h1 * n % MOD1, h2 * n % MOD2);
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... |
# | 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... |