# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
965537 | Alkaser_ID | Copy and Paste 3 (JOI22_copypaste3) | C++17 | 3082 ms | 1304 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 <algorithm>
#include <vector>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7, mod2 = 998422353;
#define ml(x,y) ((x*y)%mod)
ll b1 = 53, b2 = 47, p1[3003], p2[3003];
ll inv[3003];
ll a, b, c;
map<ll, ll> dp;
inline ll fsp(ll x, ll b) {
if (b == 0) return 1;
if (b == 1) return x;
ll g = ml(x, x);
g = fsp(g, b / 2);
if (b % 2 == 0) return g;
return (g * x) % mod;
}
inline ll small(vector<ll> k) {
if (k.size() == 1) return a;
if (k.size() == 2) {
ll fr = k[0], sc = (k[1] - k[0] + mod) % mod;
sc = (sc * inv[1]) % mod;
if (fr == sc) return min(2 * a, a + b + 2 * c);
return 2 * a;
}
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... |