제출 #824988

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8249882023-08-14 12:53:36phoenixCrossing (JOI21_crossing)C++17
100 / 100
273 ms40400 KiB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
namespace hashing {
struct H {
int len;
ll h1;
unsigned long long h2;
H() : len(0), h1(0), h2(0) {}
H(int c) : len(1), h1(c), h2(c) {}
};
map<char, int> tran = {
{'J', 0},
{'O', 1},
{'I', 2}
};
const int MOD = 1e9 + 7, MAX_LEN = 2e5 + 10;
ll p1[MAX_LEN];
unsigned long long p2[MAX_LEN];
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
H spam_str[MAX_LEN][3];
H operator + (const H a, const H b) {
H res;
res.len = a.len + b.len;
res.h1 = (a.h1 * p1[b.len] + b.h1) % MOD;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...