QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#362907 | #8512. Harmonic Operations | ucup-team133# | AC ✓ | 47ms | 9864kb | C++17 | 5.8kb | 2024-03-23 17:34:27 | 2024-03-23 17:34:29 |
Judging History
answer
// -fsanitize=undefined,
//#define _GLIBCXX_DEBUG
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <random>
#include <stdio.h>
#include <fstream>
#include <functional>
#include <cassert>
#include <unordered_map>
#include <bitset>
#include <chrono>
using namespace std;
#define rep(i,n) for (int i=0;i<n;i+=1)
#define rrep(i,n) for (int i=n-1;i>-1;i--)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << " )\n";
template<class T>
using vec = vector<T>;
template<class T>
using vvec = vec<vec<T>>;
template<class T>
using vvvec = vec<vvec<T>>;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
template<class T>
bool chmin(T &a, T b){
if (a>b){
a = b;
return true;
}
return false;
}
template<class T>
bool chmax(T &a, T b){
if (a<b){
a = b;
return true;
}
return false;
}
template<class T>
T sum(vec<T> x){
T res=0;
for (auto e:x){
res += e;
}
return res;
}
template<class T>
void printv(vec<T> x){
for (auto e:x){
cout<<e<<" ";
}
cout<<endl;
}
template<class T,class U>
ostream& operator<<(ostream& os, const pair<T,U>& A){
os << "(" << A.first <<", " << A.second << ")";
return os;
}
template<class T>
ostream& operator<<(ostream& os, const set<T>& S){
os << "set{";
for (auto a:S){
os << a;
auto it = S.find(a);
it++;
if (it!=S.end()){
os << ", ";
}
}
os << "}";
return os;
}
template<class T>
ostream& operator<<(ostream& os, const tuple<T,T,T>& a){
auto [x,y,z] = a;
os << "(" << x << ", " << y << ", " << z << ")";
return os;
}
template<class T>
ostream& operator<<(ostream& os, const map<int,T>& A){
os << "map{";
for (auto e:A){
os << e.first;
os << ":";
os << e.second;
os << ", ";
}
os << "}";
return os;
}
template<class T>
ostream& operator<<(ostream& os, const vec<T>& A){
os << "[";
rep(i,A.size()){
os << A[i];
if (i!=A.size()-1){
os << ", ";
}
}
os << "]" ;
return os;
}
const int INF = 1e9;
using ull = unsigned long long;
const ull MASK30 = (1ull << 30) - 1;
const ull MASK31 = (1ull << 31) - 1;
const ull MOD = (1ull << 61) - 1;
const ull MASK61 = MOD;
//mod 2^61-1を計算する関数
ull CalcMod(ull x)
{
ull xu = x >> 61;
ull xd = x & MASK61;
ull res = xu + xd;
if (res >= MOD) res -= MOD;
return res;
}
//a*b mod 2^61-1を返す関数(最後にModを取る)
ull Mul(ull a, ull b)
{
ull au = a >> 31;
ull ad = a & MASK31;
ull bu = b >> 31;
ull bd = b & MASK31;
ull mid = ad * bu + au * bd;
ull midu = mid >> 30;
ull midd = mid & MASK30;
return CalcMod(au * bu * 2 + midu + (midd << 31) + ad * bd);
}
struct RandomNumberGenerator {
mt19937 mt;
RandomNumberGenerator() : mt(chrono::steady_clock::now().time_since_epoch().count()) {}
ull operator()(ull a, ull b) { // [a, b)
uniform_int_distribution< ull > dist(a, b - 1);
return dist(mt);
}
int operator()(int b) { // [0, b)
return (*this)(0, b);
}
};
const int M = 2e5 + 10;
ull pow(ull a,ull k){
ull res = 1;
while (k){
if (k & 1){
res = Mul(res,a);
}
a = Mul(a,a);
k >>= 1;
}
return res;
}
void solve(){
RandomNumberGenerator RRR;
ull base = RRR(2,(1ull<<61) -1);
ull inv_base = pow(base,MOD-2);
vec<ull> b_pow(M,1);
for (int i=1;i<M;i++){
b_pow[i] = Mul(base,b_pow[i-1]);
}
string S;
cin>>S;
int N = S.size();
ull S_hash = 0,revS_hash = 0;
rep(i,N){
ull a = S[i] - 'a' + 1;
ull b = S[N-1-i] - 'a' + 1;
S_hash = CalcMod(S_hash+Mul(b_pow[i],a));
revS_hash = CalcMod(revS_hash+Mul(b_pow[i],b));
}
//debug(make_pair(S_hash,revS_hash));
int period = 0;
ull tmp_hash = S_hash;
for (int p=1;p<=N;p++){
int a = S[N-p] - 'a' + 1;
tmp_hash = Mul(CalcMod(tmp_hash+(MOD-Mul(b_pow[N-1],a))),base);
tmp_hash = CalcMod(tmp_hash+a);
if (tmp_hash == S_hash){
period = p;
break;
}
}
int diff = -1;
ull tmp_revhash = revS_hash;
for (int d=0;d<period;d++){
if (tmp_revhash == S_hash){
diff = d;
break;
}
int a = S[N-1-d] - 'a' + 1;
tmp_revhash = Mul(CalcMod(tmp_revhash+(MOD-a)),inv_base);
tmp_revhash = CalcMod(tmp_revhash+Mul(b_pow[N-1],a));
}
vector<pair<int,int>> ope;
int K;
cin>>K;
rep(i,K){
char c;
cin>>c;
if (c == 'I'){
ope.push_back({0,0});
continue;
}
int k;
cin>>k;
if (c == 'L'){
ope.push_back({1,(period-k) % period});
}
else{
ope.push_back({1,k % period});
}
}
vec<ll> even_flip_cnt(period,0),odd_flip_cnt(period,0);
int even_add = 0, odd_add = 0;
ll res = 0;
for (auto [t,x]:ope){
if (t == 1){
even_add += x;
even_add %= period;
even_flip_cnt[(x+period-even_add) % period]++;
odd_add += period - x;
odd_add %= period;
}
else{
swap(even_flip_cnt,odd_flip_cnt);
swap(even_add,odd_add);
odd_flip_cnt[(period-odd_add) % period]++;
}
res += even_flip_cnt[(period-even_add) % period];
if (diff!=-1){
res += odd_flip_cnt[(diff+period-odd_add) % period];
}
}
cout << res << "\n";
}
int main(){
int T;
T = 1;
while (T--){
solve();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 4596kb
input:
pda 2 R 2 L 2
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 2ms
memory: 4632kb
input:
aaa 4 R 1 I I R 1
output:
10
result:
ok 1 number(s): "10"
Test #3:
score: 0
Accepted
time: 0ms
memory: 4512kb
input:
caso 6 L 1 I I R 1 I I
output:
4
result:
ok 1 number(s): "4"
Test #4:
score: 0
Accepted
time: 0ms
memory: 4596kb
input:
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq 100 L 12 I R 47 L 54 I I R 80 L 86 L 19 R 5 L 53 L 40 R 20 L 11 R 40 I I R 66 R 6 L 76 L 93 R 39 I I L 24 R 59 R 99 L 52 I I R 77 L 11 R 60 L 16 I L 40 I R 35 L 64 R 11 L 34 I R 35 I L 87 I I L 42 L ...
output:
5050
result:
ok 1 number(s): "5050"
Test #5:
score: 0
Accepted
time: 2ms
memory: 4596kb
input:
wewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewewe 100 R 83 R 34 I I R 87 R 74 L 98 I L 77 L 8 R 23 L 94 I I L 79 L 87 L 47 L 85 L 49 L 7 I I R 97 R 15 I R 66 L 8 R 62 R 68 I I R 32 R 24 R 36 L 60 R 75 R 77 I L 42 I L 61 I I R 78 R 51 L 98 I L 77 I I...
output:
2556
result:
ok 1 number(s): "2556"
Test #6:
score: 0
Accepted
time: 2ms
memory: 4548kb
input:
rtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtrtr 100 R 27 R 68 I L 29 L 51 L 19 L 12 L 10 L 52 L 38 L 17 R 30 L 29 L 51 L 17 R 29 I R 96 R 50 R 56 I I I L 73 L 15 I R 1 R 81 L 94 R 27 R 52 R 57 R 44 I I L 53 I R 87 L 39 L 25 I I R 25 I I I L 88 L ...
output:
116
result:
ok 1 number(s): "116"
Test #7:
score: 0
Accepted
time: 0ms
memory: 4464kb
input:
tcldtcldtcldtcldtcldtcldtcldtcldtcld 100 L 20 I I I L 20 R 13 L 16 L 19 R 10 I I I L 11 R 30 R 30 I L 35 I L 28 R 23 R 24 L 20 R 15 I I L 13 I R 1 I R 6 I I L 22 I L 22 R 22 L 30 L 30 I I I R 35 I R 3 L 1 R 4 I R 11 R 2 R 21 R 15 I R 5 L 2 L 4 L 7 L 19 L 29 R 8 I L 24 I I I L 29 I R 35 R 32 I R 14 L...
output:
703
result:
ok 1 number(s): "703"
Test #8:
score: 0
Accepted
time: 0ms
memory: 4680kb
input:
wflbkhwflbkhwflbkhwflbkhwflbkhwflbkh 100 I R 28 R 13 R 7 R 29 I I I R 25 R 10 R 23 I R 26 I I L 18 I R 18 L 6 I I R 8 R 8 I R 6 L 16 I R 2 R 17 L 31 R 31 L 22 R 26 L 21 L 20 R 10 L 13 R 33 R 13 R 35 R 22 L 2 L 4 R 19 L 32 L 25 I L 31 R 10 R 17 R 15 L 6 L 9 R 31 R 20 I I R 4 I L 30 L 30 L 2 R 18 R 35...
output:
442
result:
ok 1 number(s): "442"
Test #9:
score: 0
Accepted
time: 2ms
memory: 4496kb
input:
mzgaokjwpmzgaokjwpmzgaokjwpmzgaokjwp 100 R 10 I L 24 L 8 I L 19 L 25 I I R 27 R 24 I I L 16 I I L 35 R 14 I L 23 R 17 R 16 R 4 R 4 L 29 I R 11 R 9 R 15 I L 18 I I L 25 R 13 L 24 I I L 8 I I I I L 24 I I L 19 L 23 I L 20 R 35 L 31 I I R 27 I I I L 35 R 16 L 10 R 28 R 14 I I R 30 R 18 L 16 L 6 L 12 R ...
output:
280
result:
ok 1 number(s): "280"
Test #10:
score: 0
Accepted
time: 3ms
memory: 4624kb
input:
gtvcymjngzntgtvcymjngzntgtvcymjngznt 100 L 33 L 5 R 31 R 18 I R 14 R 9 L 1 I R 1 R 15 L 15 I I I L 13 R 7 I I L 2 I L 3 I L 19 L 22 L 2 R 32 I L 1 R 24 R 23 I R 25 L 11 R 34 R 25 I L 25 R 22 R 34 I I L 2 R 13 L 3 I L 30 I R 7 R 20 I R 24 L 34 R 23 I L 26 R 22 I I I R 17 I I L 14 R 27 R 35 I L 34 L 3...
output:
206
result:
ok 1 number(s): "206"
Test #11:
score: 0
Accepted
time: 2ms
memory: 4608kb
input:
dvaauyemcqhrmduoumdvaauyemcqhrmduoum 100 L 21 R 12 R 30 L 13 I I L 1 L 31 R 4 L 20 I L 6 I L 29 R 19 L 12 R 25 R 25 I R 21 I L 12 L 25 R 35 L 8 R 7 R 29 I R 4 L 24 R 29 I I I L 12 L 24 R 19 L 33 L 4 I R 35 I R 16 I R 10 I R 18 R 7 L 33 I I R 22 L 16 L 7 L 20 R 32 I I R 27 I L 9 R 16 I I R 32 I R 1 L...
output:
180
result:
ok 1 number(s): "180"
Test #12:
score: 0
Accepted
time: 2ms
memory: 4508kb
input:
pkmsckbnjeeojagpdtfxlmlgofbrygcuqiahynrwooxgdruurdgxoowrnyhaiqucgyrbfoglmlxftdpgajoeejnbkcsmkplhxxhl 100 L 14 R 54 L 88 L 66 L 38 R 91 I I I I R 56 L 4 L 76 R 12 L 86 I I I I R 52 L 98 L 98 L 39 R 60 L 14 R 23 R 92 R 99 L 71 I I I I L 1 R 33 I R 65 L 72 I I I R 20 R 48 L 81 L 7 I R 72 R 14 I I R 10 ...
output:
75
result:
ok 1 number(s): "75"
Test #13:
score: 0
Accepted
time: 0ms
memory: 4768kb
input:
txgcggvgarkkflejgkaukutnsjogrglpdmocuhyiboientoffaaaffotneiobiyhucomdplgrgojsntukuakgjelfkkragvggcgxt 100 R 35 R 84 I R 68 R 24 L 42 L 24 R 16 R 80 R 95 L 9 L 26 L 96 R 64 I R 56 I L 5 R 83 R 2 R 57 R 28 I R 17 I R 11 I R 100 L 42 I L 89 I L 91 I I R 78 I R 30 L 6 I L 56 L 48 R 79 L 8 I R 5 L 25 R 2...
output:
76
result:
ok 1 number(s): "76"
Test #14:
score: 0
Accepted
time: 0ms
memory: 4580kb
input:
qhygenaiejhluibjfyjbdoslylsodbjyfjbiulhjeianegyhqydgoxbmbcuslmfqgraeqkpuerbnbreupkqeargqfmlsucbmbxogdy 100 L 41 R 73 R 41 I R 59 R 77 I I R 21 L 5 R 30 R 3 L 94 I L 36 R 2 R 85 L 39 L 17 R 47 I R 86 L 30 R 38 R 80 I R 39 I I L 99 I L 15 I L 76 L 68 L 91 I R 71 R 36 L 14 L 15 I L 63 R 71 I L 38 I R 3...
output:
48
result:
ok 1 number(s): "48"
Test #15:
score: 0
Accepted
time: 37ms
memory: 7072kb
input:
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy...
output:
20000100000
result:
ok 1 number(s): "20000100000"
Test #16:
score: 0
Accepted
time: 45ms
memory: 7076kb
input:
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu...
output:
20000100000
result:
ok 1 number(s): "20000100000"
Test #17:
score: 0
Accepted
time: 21ms
memory: 7084kb
input:
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...
output:
20000100000
result:
ok 1 number(s): "20000100000"
Test #18:
score: 0
Accepted
time: 41ms
memory: 7084kb
input:
opopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopopop...
output:
10000007832
result:
ok 1 number(s): "10000007832"
Test #19:
score: 0
Accepted
time: 41ms
memory: 9728kb
input:
asasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasas...
output:
199395
result:
ok 1 number(s): "199395"
Test #20:
score: 0
Accepted
time: 37ms
memory: 7136kb
input:
dffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdffdff...
output:
6666663346
result:
ok 1 number(s): "6666663346"
Test #21:
score: 0
Accepted
time: 37ms
memory: 7068kb
input:
ghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghjghj...
output:
3333345323
result:
ok 1 number(s): "3333345323"
Test #22:
score: 0
Accepted
time: 47ms
memory: 9692kb
input:
lkkzzkklzkklzzklllkzlkkzzzzlzlzlkzlzzzkzlklzkklzlzzlzlllkkzlzkkklklkzkkzllklkzkzzzkzkkzzllzllzzkkkzkzzkzklzzzzkllzkzlklzlkzllkkllzzlzkzkzlllzlllkzzkzkkzzkkzlllzzllkkzlkklllzzzkkzkzkkllkklzkkkzzzzlkzlzklzllzkklkzlzzzlzlzkzllkklzlkklzlkllzklllkllzzzzllzllkkllzlklkkllzzlzzlllzzzklzzkkkzlklkkkzlzllzllzk...
output:
74917
result:
ok 1 number(s): "74917"
Test #23:
score: 0
Accepted
time: 38ms
memory: 9760kb
input:
albusdamhnkbpphiurtnhdggnfjsvsdcypnsqurbidrszoremwfrqmdmyjkbxfpdcalhcmtehpatfqupucnlzelvkadygbhlrjjbmlyitutipaermatkqdtdfrmfsnfptcomcpnlkxnunvtbxllyyghykifokwklpptkocrgxjtmcnogbgnhlcgtapemexkxoocllzbsszztvctjnmlnkgrbplakpxgujpfrpelngfoknvrsdqvrdqzajbxtirdsmiekycojmhsbcqkclzsowkvuzmsysmialqmfivvzgndq...
output:
74399
result:
ok 1 number(s): "74399"
Test #24:
score: 0
Accepted
time: 45ms
memory: 9172kb
input:
rniwfckztiivwkcnxteghcavxgiqsygrpxnliiojczdxqylzgnztcburluxmntpjlwxhyugympaeewrjkugdzntrkdkaxgflgfhzxpsaisggvbwmeirprlowksbmyhmjbvtujsvhoawqzqoqcuyzeijmbgqnhzwhyficrtyjrxhlfwqiantnxnbjtxlrzomwycuxohpfschpxbwogepfjmkuxpupulgdkvelkodyoslajfftymsiazgrzhircmdetthficiexfhxoomkmqijoxocqlxmhgwcisiyhurxfkub...
output:
85203
result:
ok 1 number(s): "85203"
Test #25:
score: 0
Accepted
time: 42ms
memory: 9828kb
input:
fbjylvxoacqlofjvtxpkgglsfesutcqgpipusktuafjmqwqzqgvmnsvahecjbkakutjmblicyiufpjxdtvgsfioluxgukurkccjcynmakwrjdpksdbuqvmjwaadzrhugptwljgawlbscvligbhxeqldczpljzttlzpnmgotkwpuqboompspvbdhaocdirrlwiocmwuqgcghbwgrvsmtzgigucucrukpywyfwrbwaixrslahweekucosreiwgkozmistchdimjnktpxbqxriexqsmympycuwmhaymyzauihhh...
output:
125637
result:
ok 1 number(s): "125637"
Test #26:
score: 0
Accepted
time: 45ms
memory: 9864kb
input:
euzfuvlnzbucvvvbalzcpurzbolgxoohfnfzlrcbpjnxisidecdojzafzaanklvzyttgccekghsomgybamfcwmlvntnavtasvomczpxvzqnacyltszblvbuwwhdmezclilyygggnjjfcshghnitimbtmxbapgkvjhtmwvhlhlfjifhfrazrhpgrdjktaaqspduyxturzecvvubbuhhjvuwzycbdrjjkosiprxomxeobdyqknjidiediyzhihchbginbulepyrgoheosvyhyrkicglsorfzxksrxjyupkzyiz...
output:
124360
result:
ok 1 number(s): "124360"
Test #27:
score: 0
Accepted
time: 42ms
memory: 9748kb
input:
unbnsxcgavvynxatgliythqvjqyfkyldaytaopgdxfqtpyeuyccuounieygpllptrxmesjwgojroodmlzdezcffoxxbffgcsbltnuwbzbhfnbaehkdsuzsjimuubljrtlejbmaxjmpghjashysifcffsbbyzpnxmcehqsnnvbiuobcrimodyfwofowvdpmimsckhceinykwdvnqlvavfczsucdfeilmzqdiaqwdhndljyfahmzrjgimootbmndqnpjkspcgngsvojexrxjlomnlvvaamwzgxdjjjhocvvkqh...
output:
124758
result:
ok 1 number(s): "124758"
Test #28:
score: 0
Accepted
time: 36ms
memory: 6936kb
input:
njvekjflgdvxrkxymgepijcnrjqzroaaschvnlgpavcffffjeyjoigrunncmoduswvmnuojqgsaujhaqrmfmoqwzvajhxdffuztanwynaatjnkbrdgslgetypxtmkraaggdjiyxnfbxbgwkftzxsshrfnbphodltgcguncndshlosjzkychbislawtyrdnjvekjflgdvxrkxymgepijcnrjqzroaaschvnlgpavcffffjeyjoigrunncmoduswvmnuojqgsaujhaqrmfmoqwzvajhxdffuztanwynaatjnkb...
output:
52918599
result:
ok 1 number(s): "52918599"
Test #29:
score: 0
Accepted
time: 36ms
memory: 7044kb
input:
irnzrcherzsoipcrgzkfzycvkrypbdnzeqjtttgpgllujmiaumswqqlajbszcgmmhxxfggnqsvtcewakiqcbjsxaaoryifhvqctuhxbegmzoxjxdmfsxlzudhvboknidjgdgadqgncppnwqtzburacucgctrrwmyhfdxpiybbibvbtcgykiyimkhvxzsxldmsgqrqzqdxhdkxymloksnhkohmuocpfgesgvokzcthvuuklmrdygrpvmiulovrjtwfobrtxajrbbtnmltsduhkxffkvpuvvyjiaydjxdhdoxg...
output:
2006481
result:
ok 1 number(s): "2006481"
Test #30:
score: 0
Accepted
time: 36ms
memory: 7076kb
input:
ckewrtmlvdfgrtwhqfhrnnaqqpbzvnrjnqhclnuigkqtyqcrfdzlxtrtsuefvzytfhohexuytggxkljigzmkbscyeelgmtrzaolaitmzmttbdclogmzyyguzjejehuaybrrrlgxwpukqhhnrucszkympotlckwtaiwedtybbkhlyyzllbtwqbenluuhmnbvdsgtqrqwvmhjbknaljiaigoimvjdpfualdcwmhngjirsyyojkycnkyqjinpfffegisghwsdblsvzelczqnfcnqpsnpiqfuefnntruntrscori...
output:
1827034
result:
ok 1 number(s): "1827034"
Test #31:
score: 0
Accepted
time: 36ms
memory: 7052kb
input:
clhtskvezsrhnbrtcavswrsilokwqjirzrlfusiiaembtaekmfrffcjmdysafvxyszyobzqbzzgofiunqvsiuttrgxqhhwbnlsesjmfgpdxaykhmfvmxeyfmwhwrnnnqtsyiokbbscmahshftklzucxtudozqcjxnmfffbggnlnfxmbyeifksecwwitglclbmtfpmccvcqjopqzvrbcjnyvhcheviialyjanngeohjxcfxdvnjmkcetseshlggkevayqpcijydtmqobtcdqaorsqhcaddyezvkgwlheejcmc...
output:
986982
result:
ok 1 number(s): "986982"
Test #32:
score: 0
Accepted
time: 40ms
memory: 9136kb
input:
mmcwddbgxskxzjukffqmzvpzhvfytgsugruqwlbbvnpwtvrhjjhdynenaifbljwgaasyzyyabpghmnlezfxhkuujtczchcpotpzvczjjzcvasrnlejelkuesljstscuupwoivjecvrgukipjlmkrvbdirrxqbikqghmxtshxmsermfspigatgrlwyxqfkymhhoajjpzjjsyinpsvooqjjvovpttggwxvlnzhbnmhaczpnlozaxeervjaexiviutxxhgjgoapbcksddztddnsdyiecoagrcvownnxtxzkquyv...
output:
86036
result:
ok 1 number(s): "86036"
Test #33:
score: 0
Accepted
time: 37ms
memory: 6972kb
input:
bznsrbrsyugevrwjgvjlvdpcojndmrzypethckuwmdwutbqkeumdqgwwyypxfrcpejmpmdtryvfnfsyonmusidvrriokmklmjqjexwbkhagyayumotuzormcvqvjwtzolvrxmwiujrgulxjnrjfcbtczbshktkimdmbgqltsmozdeeuxpfhxucjtfnzrqgufdvzgsxbfaivlsfwtztqvkkrtnzjuhxihytkdjsnlnrtmhfvlvzmblnsnnktphimkgrregecbycbujcbhytwhpshushnsgmlrfxshvvnsqnmb...
output:
22394048
result:
ok 1 number(s): "22394048"
Test #34:
score: 0
Accepted
time: 45ms
memory: 9732kb
input:
ppnclotgolzjqnbxzdtgjocaggxughxevjnelmshfjyynnxdqxtmdkpmrhqyojptvbibtonizeqzdeusykdegxewvpcrfwxtryctwilmkiaxvtrpesxvkqgrwonallqtunoqprvqdzlaemwnkfhhapzcvpemmdpbinjjdsosevzzhpwafgozruwrzdfeixfslwmtnweehlrgdvbtfqfsrhukhqsyozdltqqzsspznbkppqxbznksfmbiwrpgzlfbzfciumbhuqcszdtgwtalsetpjowxccgogavemfxtgwok...
output:
75612
result:
ok 1 number(s): "75612"
Test #35:
score: 0
Accepted
time: 41ms
memory: 7204kb
input:
ttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbgmttcpbg...
output:
1428581328
result:
ok 1 number(s): "1428581328"
Test #36:
score: 0
Accepted
time: 42ms
memory: 7048kb
input:
whnqukzmwgsuzlkvbzqsyjietfpvhjbywaghyimtxlgfqtihizmrnoecskpwwzsnvqubrafgbwrbczqmvvnlymrtmmrlsyfemraiqyqjwmzweirfdeddfskajjtbuunwhjvnypxzgrqsxxvkdjdpbwkuovdvgvqntixlnucpisdkiemwhtqhyfyvkwroepfotjtylskrxdzihqrfopldsutzoyasyhxjalanwcpyrjiekkmcdsvmngexgzbljbjkisohcdvjtaxdeqporvimzsllllkglgmhgyytfpjniacn...
output:
372901
result:
ok 1 number(s): "372901"
Test #37:
score: 0
Accepted
time: 39ms
memory: 9732kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
75344
result:
ok 1 number(s): "75344"
Extra Test:
score: 0
Extra Test Passed