QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#397857 | #8079. Range Periodicity Query | qwqUwU_ | WA | 1156ms | 83816kb | C++17 | 3.0kb | 2024-04-24 17:58:05 | 2024-06-15 11:51:35 |
Judging History
你现在查看的是测评时间为 2024-06-15 11:51:35 的历史记录
- [2024-06-15 15:38:16]
- hack成功,自动添加数据
- (/hack/699)
- [2024-06-15 15:32:38]
- hack成功,自动添加数据
- (/hack/698)
- [2024-06-15 15:28:06]
- hack成功,自动添加数据
- (/hack/696)
- [2024-06-15 15:23:18]
- hack成功,自动添加数据
- (/hack/695)
- [2024-06-15 15:03:19]
- hack成功,自动添加数据
- (/hack/694)
- [2024-06-15 12:23:52]
- hack成功,自动添加数据
- (/hack/689)
- [2024-06-15 12:15:05]
- hack成功,自动添加数据
- (/hack/688)
- [2024-06-15 12:11:26]
- hack成功,自动添加数据
- (/hack/687)
- [2024-06-15 12:07:23]
- hack成功,自动添加数据
- (/hack/686)
- [2024-06-15 12:02:06]
- hack成功,自动添加数据
- (/hack/684)
- [2024-06-15 11:50:54]
- hack成功,自动添加数据
- (/hack/682)
- [2024-06-15 11:45:20]
- hack成功,自动添加数据
- (/hack/681)
- [2024-06-15 11:39:29]
- hack成功,自动添加数据
- (/hack/680)
- [2024-04-24 17:58:05]
- 提交
answer
// clang-format off
#include<bits/stdc++.h>
#define pb push_back
#define P make_pair
#define fi first
#define se second
#define bit(s,x) (((s)>>(x))&1)
#define pnp(s) __builtin_popcountll(s)
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
using namespace std;
mt19937 gen(time(0));
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii; typedef pair<ll,int> pli; typedef pair<ll,ll> pll; typedef pair<int,ll> pil;
inline ll read(){
ll x=0,f=1,c=getchar();
while(c<'0'||c>'9')f=(c=='-'?-1:1),c=getchar();
while(c>='0'&&c<='9')x=(x<<1)+(x<<3)+(c^48),c=getchar();
return x*f;
}
const int N=5e5+3;
const int bs=26;
// clang-format on
inline int fp(int x,int p,int m){
int res=1;
for(;p;p>>=1){
if(p&1)res=1ll*res*x%m;
x=1ll*x*x%m;
}
return res;
}
const int mod1=998244353,mod2=167772161,mod3=1004535809;
struct Int{
int x,y,z;
Int(int a=0,int b=0,int c=0){x=a,y=b,z=c;}
//Int(Int A){x=A.x,y=A.y,z=A.z;}
};
Int B(bs,bs,bs);
Int operator +(Int a,Int b){return Int((a.x+b.x)%mod1,(a.y+b.y)%mod2,(a.z+b.z)%mod3);}
Int operator -(Int a,Int b){return Int((a.x-b.x+mod1)%mod1,(a.y-b.y+mod2)%mod2,(a.z-b.z+mod3)%mod3);}
Int operator *(Int a,Int b){return Int(1ll*a.x*b.x%mod1,1ll*a.y*b.y%mod2,1ll*a.z*b.z%mod3);}
bool operator == (Int a,Int b){return a.x==b.x && a.y==b.y && a.z==b.z;}
Int p[N],h[N];
int n,m,a[N],lp[N],rp[N],s[N];
struct Node{int l,r,id;};
inline bool check(int k,int len){
if(k==len)return 1;
int l=lp[k],r=rp[k]-len;
Int res1 = h[r] - (h[l-1]*p[r-l+1]);
l=lp[k]+len,r=rp[k];
Int res2 = h[r] - (h[l-1]*p[r-l+1]);
return res1 == res2;
}
const int M=1<<19;
int t[M<<1];
inline void update(int x,int k){
t[x+=M]=k;
for(x>>=1;x;x>>=1)t[x]=min(t[x<<1],t[x<<1|1]);
}
inline int query(int l,int r){
int res=INT_MAX;
for(l+=M-1,r+=M+1;l^r^1;l>>=1,r>>=1){
if(~l&1)res=min(res,t[l^1]);
if(r&1) res=min(res,t[r^1]);
}
return res;
}
vector<Node>que[N];
vector<pii>op[N];
int main() {
//freopen("data.in", "r", stdin);
// freopen(".in","r",stdin);
// freopen("myans.out","w",stdout);
p[0]=Int(1,1,1);rep(i,1,N-1)p[i]=p[i-1]*B;
n=read();
static char tmp[N];scanf("%s",tmp+1);
int l=1,r=0;
deque<int>dq;
rep(i,1,n){
if(tmp[i]>='a' && tmp[i]<='z'){ dq.push_front(tmp[i]-'a'+1); --l; }
else{ dq.push_back(tmp[i]-'A'+1); ++r; }
lp[i]=l,rp[i]=r;
}
rep(i,1,n)s[i]=dq[i-1],lp[i]-=l-1,rp[i]-=l-1,h[i]=Int(s[i],s[i],s[i]) + h[i-1]*B;
m=read();
rep(i,1,m){
a[i]=read();
int l=a[i],r=n;
while(l<=r){
int mid=(l+r)>>1;
if(check(mid,a[i]))l=mid+1;
else r=mid-1;
}
op[r].pb(P(i,a[i]));
op[a[i]-1].pb(P(i,INT_MAX));
}
int q=read();
rep(i,1,q){
int k=read(),l=read(),r=read();
que[k].pb({l,r,i});
}
memset(t,0x7f,sizeof t);
static int ans[N];
per(k,n,1){
for(auto tmp:op[k])update(tmp.fi,tmp.se);
for(auto tmp:que[k])ans[tmp.id]=query(tmp.l,tmp.r);
}
rep(i,1,q)printf("%d\n",ans[i]>n?-1:ans[i]);
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 11ms
memory: 51716kb
input:
7 AABAAba 9 4 3 2 1 7 5 3 6 1 6 1 4 4 2 1 4 2 1 3 3 3 5 5 4 7 7 8 9
output:
1 1 2 -1 3 6
result:
ok 6 lines
Test #2:
score: 0
Accepted
time: 130ms
memory: 64284kb
input:
200000 BAbBbBabBBbbABbbaBbaaabaBBAbBbBAAAAABBaBaAAabBAAbABaaBABAabAAAbabbAaBABAbabbAAAbbbbabBBAbbBaabBAAAbBBBbBbbAbbbBabbBABaBAaAAAbBbaABabBAbAAbBbbAbAbBaabAbBBbaaaaBaBbbABBBaaabBaBABAbBabBbbAABBbaBAbaBAbAAABABAbaabbaAAaBAbAbAbBBbaaaAaBaaABBbBAAaAAAaaABbbaAbAaBbaAaaababbaBbaAAAAAAabbBaAabbbaBBAAaABb...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 61006 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 500000 lines
Test #3:
score: 0
Accepted
time: 160ms
memory: 65928kb
input:
10 baaAaAAaAA 500000 6 8 2 3 1 8 7 3 9 4 1 6 9 4 10 10 4 3 1 7 4 3 9 7 1 2 9 3 3 1 10 8 1 6 4 1 6 10 1 5 1 8 9 9 7 3 6 3 9 1 7 6 7 7 9 10 3 2 4 10 7 3 7 1 5 3 5 1 10 1 3 2 2 4 2 3 4 10 5 2 7 10 5 6 8 9 10 6 9 7 5 4 5 4 4 2 5 8 1 9 1 2 10 8 2 5 6 6 6 4 3 1 2 2 3 5 7 4 5 7 5 8 1 8 9 7 6 3 10 7 5 4 8 8...
output:
5 4 4 2 6 3 3 4 6 3 1 6 4 5 3 5 2 5 4 4 2 5 3 5 5 1 2 5 3 5 4 3 5 6 4 5 4 6 4 6 4 1 5 4 4 3 5 3 3 4 5 5 5 4 1 6 5 5 4 4 2 4 3 5 4 5 1 5 1 1 4 4 5 4 4 3 3 4 2 4 4 4 2 4 6 5 2 5 4 3 4 2 4 5 5 4 6 1 2 6 4 5 6 1 1 3 2 3 1 4 4 3 4 4 4 3 6 5 4 5 5 4 1 2 3 4 5 4 4 4 3 6 4 4 4 2 3 3 3 3 3 6 3 5 3 4 6 3 4 5 ...
result:
ok 500000 lines
Test #4:
score: 0
Accepted
time: 225ms
memory: 66336kb
input:
500 ababbBbBabaaBAbabBbbBBAAABabBbBAAABbaBbBAAbabaBaAAaabAaABBBabababAAbaaAbbAAabAAbBbaabbBbaAAABaAaBbbBbabBAABBaabbAabbBabbbAbABaBAABaBbAaaBABBbBAAbbbBabbABABAaAaAAAbaAabBbBaaaaAAAAAabaBBAAABAbbabAaBAbAaaBBbABbBBbaaAaAaBBbaBbabBbBABbaaBbAaabBABaBBbAAaaBABBAaaABAbbaaAaBaAAbAbbbbbaabBabaBbaabaAbaBaaa...
output:
386 327 309 141 424 175 186 273 45 498 99 262 478 149 424 444 49 267 233 388 359 310 203 81 498 12 97 295 400 351 352 407 310 471 291 479 448 203 267 60 223 458 421 391 5 470 212 253 99 281 167 451 154 86 299 434 370 255 383 207 258 310 487 380 6 368 235 137 334 141 50 128 29 478 448 223 466 345 407...
result:
ok 500000 lines
Test #5:
score: 0
Accepted
time: 331ms
memory: 69772kb
input:
10000 BaBbAAaaaaBAbbbbbaBbaaAbaaaabAaaaAAbabBAbaaBABaaabaAbBBaBBABAbabBAbaaAAaAABABbbbABBaBBaABbbAAbBabaAbaBBaAbabaaAAAabAbAABAabBbBaBaAaAbbBAAABbbabAaABABaBbaAABBbbBAABbbbAaABaAaaABAbbbABAabbaAaaBbbbBaBBbAaaabbaBbaaAbabBabaBaAAAbBAabbBAbabAAbbBBBbBAAaBBbBBAbaaaAbBaaBAAbbaAbbbBAbaAaaAbBBAaBabBaaaBab...
output:
-1 5219 4322 2614 7302 1876 -1 5584 2861 3586 4821 6579 6706 1605 7878 886 9218 293 167 7298 5146 6860 2921 8263 4330 9578 7472 6086 5537 4890 8285 58 9733 -1 3157 262 9533 6943 8285 2837 451 6494 7918 8912 2187 9832 4487 2077 871 210 951 1761 6892 4304 6634 9572 9544 5744 4015 7418 7804 5928 3611 8...
result:
ok 500000 lines
Test #6:
score: 0
Accepted
time: 655ms
memory: 76492kb
input:
100000 aabAbBbaBAaabbbbbaAAABaaabbBaBAAaBabbBAbBbbBbbbaaaABaaBaBbBABBBbabBAABbabbAaaaBBaAAbABaBABAABbBAbBAAAbaBaabbAAABaBAaaaBBbBbaBabAbBBaaabaaaaBbBaAaAbAbbBaABaabBbBaAAaAaaBbbAbbaaBBbbbaAaAabaBaAaaBaAAbbBabBaBAbAaabAbbbAbaAbBbaABABAaBBABAaABBBBABAaBAbbbaBbaAABBaAabaAbaAaabAAAbbbaBBbBaaaaAaaAABbBaa...
output:
35335 42708 80231 -1 52892 27828 25395 21105 26112 55093 16568 16170 -1 73256 -1 82801 58592 52120 48659 -1 -1 -1 92581 -1 67746 9463 50384 69443 71368 -1 62536 83524 71293 88216 83685 45630 5450 969 3140 19286 79236 80564 33058 44088 24142 -1 40385 68116 -1 20399 78247 52636 37514 -1 54565 44272 75...
result:
ok 500000 lines
Test #7:
score: 0
Accepted
time: 964ms
memory: 80348kb
input:
500000 AaAAaaAaaaAaaaaaAaAAAaaaaAAaAAAaaAAAaAaaaaAaAaaaAaAaAAaAAaAaaAaaAaAAAAAAAAAAAAaAaAAAaAaAAAAAaaaAaAAAaAaaaAaaAaaaaaaAaaaaAaAaaAAaAAaaAAAaAaaaaaaaAaAaAaAaaAAaaaAAaAaaAAAaaaaaaaAAaAAaAaaaaaAAaAaAaaAAaaaAAaaaAaAAaaaAaAaaAAAaaAAAaAaaaaaaaaaAaAaAaAAAaaAAAAaAaAAAAAAaAAAaAaaaaaaAAaAaaAAaAAAaaaAaAAaAA...
output:
3 13 3 4 3 3 6 3 6 131 3 3 6 4 33 5 9 3 195 105 77 4 3 3 3 3 3 4 3 3 4 3 4 3 3 3 3 4 3 3 4 4 4 4 4 3 9 3 3 23 33 3 4 3 3 3 3 4 4 3 4 4 4 3 5 1 3 5 3 74 3 23 5 3 3 4 3 3 3 3 3 6 4 3 4 3 4 4 3 4 3 3 4 7 4 3 3 4 3 13 3 4 1 6 3 5 3 3 4 4 20 4 532 4 3 3 3 6 97 4 6 3 3 4 3 4 6 3 3 3 3 3 3 4 7 3 6 4 4 4 3 ...
result:
ok 500000 lines
Test #8:
score: 0
Accepted
time: 1020ms
memory: 83300kb
input:
500000 BbBabaaAABbABbaAABaaAabBBABbBBBAbaAbbABAaBbbAAabAaBaabBbaABAbaAbBabbaaaaaaaaBBbbBabaaAAbaAABaAAAaAaAbbbaaAaaAaaABAAAAAbbbABaBBbBAAaAAaBbABbBaaBabaAAaBAABaAaaBBbaBaBaBaaAbBAbAaABbBaaAAAAAabBAABaaAbbBaBAAbBBaBaabBaBBAbAbaaaaAbBbaAbbaAaABBaaAbAaaBABABBaAbaBbAAbaAAbaBAbAAaabBbAaabABAaBBBAbBbbBABa...
output:
-1 125970 -1 -1 -1 435323 -1 425031 252960 236797 -1 -1 -1 334816 -1 -1 319448 234360 344601 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 38745 -1 379427 -1 325294 -1 -1 -1 365248 387079 -1 492283 346128 -1 -1 -1 356064 -1 -1 321398 -1 -1 13515 -1 338767 461122 -1 436442 -1 309126 -1 207537 -1 -1 -1 -1 381656 1079...
result:
ok 500000 lines
Test #9:
score: 0
Accepted
time: 1046ms
memory: 83348kb
input:
500000 cCCBAcaAbbbBAbAAAabaCCcbbaCAacABcaCBCBCBCaacCCBbcBacAaaAABBBaCbcccBcaAcaBCBcccbCcaBAbbCAcCbcacAaAbcCbcCAcaaaBabBCbCCaCbCAcAAbAaCbcCCACbCccCACcCcCbAcAbBaCCAbacBAcaBbAcCBcAcbacCCabCAacbCCbCCCBcacCaCbCacccaCbcBaaCCaACAaaabCAbBcAAAcCaCaBcaccaacAaacbbCacBBBCBaaCBACCAaaccbBaBCacabcBbCACCbaBaCaCbAbb...
output:
-1 -1 373736 135320 -1 -1 -1 -1 -1 -1 -1 -1 106473 295826 386781 382253 -1 -1 211227 -1 -1 435332 -1 487098 -1 -1 -1 322685 387263 -1 366267 299799 -1 -1 -1 63851 301486 426183 -1 -1 -1 158872 299489 -1 158501 -1 -1 -1 421755 -1 -1 -1 -1 -1 -1 -1 379236 -1 -1 162368 -1 20735 -1 379535 408080 43142 -...
result:
ok 500000 lines
Test #10:
score: 0
Accepted
time: 1082ms
memory: 83516kb
input:
500000 CGLmxIQvAprgtdDDuZvZDwKvAyqsptLBKwehlQYMUAGNZYjIBwQJotGzdfdJefPNFsvQmsQMQHDThKCosCRLBfDPBmYrOzoPCOmRFKyCEwmCYZrZpzNeUuHsUBqpXrqKbmoNqsUAIGBCNFeHnXUeGaUAKLXrjtcHVKgdmNavqTnAqAIcqyujjfqPDbrQaYwiqKQNMQMCMjxcxVgHfoMdlIjsRbKBADzljmfNENfFOXjVCcUAmnqgcRKfIqCeQMXcqqTtgDSjYpDrKCbAIvpYqtxDCmniGfURGBNPg...
output:
-1 -1 -1 -1 153175 -1 -1 160471 8265 -1 -1 304616 -1 -1 457941 -1 136029 239352 -1 -1 248379 201699 -1 376599 218943 -1 -1 -1 -1 -1 283494 441809 -1 471567 -1 -1 -1 40751 -1 -1 181033 -1 -1 -1 -1 -1 -1 4025 -1 398460 -1 -1 339034 -1 -1 -1 89916 -1 -1 -1 -1 -1 -1 -1 203747 160541 -1 -1 -1 -1 -1 -1 -1...
result:
ok 500000 lines
Test #11:
score: 0
Accepted
time: 1105ms
memory: 83276kb
input:
500000 iPpiIpiPIPIPpipGagAPIpPIipPiIPIpPIiPIPpIPGAipPipipIiPpaIPgIpPIiPpIPIiPpiIPpGipiApiPIpiPpagIpPiIpiPIpPipLmMPlpipIPIiPpIPiGAPIpiPpIPagpIPipipIiPpIPiIPpiIPGAPpiIpPiIPpagpIPIiPIpipipPipiIpiPIpPiGApPIaPIgPIpipPiIPIpPiIpipPiIpPGAPipIPIipagPpIiPIpPIipPIPipiIpPipGipipAPagpiIPpIiPpIPIipipiPIPpiIpipaPI...
output:
44808 330831 40007 156828 89616 -1 44808 -1 156828 44808 22404 44808 44808 156828 156828 44808 745 22404 119492 37342 224040 -1 156828 40427 -1 44808 156828 -1 44808 44808 44808 44808 -1 156828 -1 22404 44808 -1 156828 22404 44808 37237 -1 44808 44808 44808 44808 44808 22404 44808 156828 22404 44808...
result:
ok 500000 lines
Test #12:
score: 0
Accepted
time: 1054ms
memory: 82668kb
input:
500000 xEGXEGgexXEGgXEGexXEgexGXEGgexXEgGXexEGXEgexgexgeGXEGxgXEGXexgexgEGexXgeEGXxgexgexEgexgGexXgexgeExGXEGgXeExGgexXgEGeXxEGgexXgexgEexGXgEGexgexXgexgEGeXxgeEGXxgEexGXgexgEGeXxgexEgeGXxgexEGXgexgEexgeGxXEgGeXEGxgexgexgeXEGxXgexEGgXEGexXgeEGxgXexgexEGgXexEGgeXxEGXgexEgexGgXEGeXxgeExGXEGXgEexGgexgX...
output:
6 51880 51880 156658 51880 103760 103760 103760 58694 6 51880 51880 170203 155640 103760 160123 51880 6 271827 103760 51880 51880 259400 155640 84830 51880 259400 269226 103760 51880 82478 51880 51880 51880 76292 51880 103760 103760 103760 6 6 103760 51880 51880 51880 95600 103760 103760 51880 51880...
result:
ok 500000 lines
Test #13:
score: 0
Accepted
time: 1045ms
memory: 83268kb
input:
500000 qrbBRqrbQqrbBRQqrbBRqQBRrbqQBRrQbqBrRQbBRqQrbBqRrQBbRqrbqrbQBRqQBRQBrbRqQrbqBRrQBRbQBRqQrBRQBbRQqrbqrBbqrRQBRQbBRQBqrRQBbRQBqRQrBRQbBqrbqrRbqrbQBRqQBrRQBbRqQrBRQBRQBbRQBRQqBRQrBbRQBRQqrbBRqQBRQBrRQbBRqQrBbqRrQBbqRrbqrbqrQbqBRQBrbRqQBrbRqQrbqBrRbqrQBRQBbRqQBRQBrbqrRbQBqRQBRrQBRQBbqrbRqrQbBRQBq...
output:
105840 35280 25200 105840 35280 25200 25200 25200 5040 25200 5040 5973 5040 5040 5040 25200 25200 55440 25200 5040 5040 27 5040 5040 35280 5040 5040 5040 25200 231840 5040 5040 126000 67338 50400 236880 5040 5040 5040 196059 201600 5040 5040 100800 15120 25200 5040 5040 5040 95760 5040 25200 5040 25...
result:
ok 500000 lines
Test #14:
score: 0
Accepted
time: 1041ms
memory: 82800kb
input:
500000 YxlLXyxYlyLxXYLXlYyLxlyXYxLXlyYLXxYlyxlLyxlyXYLxXYLXlYyLXxlYyLxXlyYLXYxlyLXxlyYLXxYlLXyYLXYLxXYLlXyxYlLyxXlyYxLXlYyLxXlYLXyxYLlyXYxlyLXYxLXYLlyxlyxXYLXYlLXyYxLlyxXlYyLxlyXxYLXlyYLxXYLlXYyLXxlyYxLlXyxYlyLxlXYyxlLXyYLXYLxlyXYxLlXyYxlyxLlXYLXYLyxXlYLyxXYlyxlLXyxYLXlyxlYyxLlyxlyXxYLXYLXlyYLxlyXxl...
output:
45 34211 53269 102633 102633 465625 183048 34211 68422 387846 43885 9 34211 34211 68422 34211 34211 68422 34211 34211 68422 102633 34211 34211 58093 34211 385830 15 34211 34211 6 15 34211 68422 68422 34211 102633 102633 102633 102633 34211 68422 68422 34211 195528 102633 102633 34211 102633 34211 34...
result:
ok 500000 lines
Test #15:
score: 0
Accepted
time: 1117ms
memory: 82088kb
input:
500000 ZTOoZTtzOotZzTOZTotzoOtzotZzotzTotOZzTOZoTOZtTOzZTotOZzotTzOotZzotTzOotzZoTtzOoZtzToOtzotzZTOZoTOZTtzotOZzTOoZTOZTtzOoZTtzotOZzTOZTotOZTzoOtZzTOoZTOtZTzoOZtzoTtzOZotzTOZTOoZTOtZzotTzOotzZToOtZzoTtzoOtzotzoZTOZTOtzoZTtzoOZtTOzotzotzZotTOzoZTOtZzTOZoTOZtTOZzTOotZzoTOtzotzZTotOzotZTzOotzotzotzZo...
output:
346550 9 717 382207 9 346550 3 3 4392 57 9 346550 9 9 9 3 3 60 3 3 57 346550 9 346550 9 381145 3 3 9 9 9 3 3 346550 9 346550 3 9 66 346550 3 346550 3 9 3 3 9 3 9 3 9 36 3 9 402727 60 346550 3 69 567 346550 36 346550 3 346550 60 60 9 346550 36 346550 346550 9 9 3 3 3 261 3 9 3 3 3 9 36 346550 9 3 3 5...
result:
ok 500000 lines
Test #16:
score: 0
Accepted
time: 1038ms
memory: 83540kb
input:
500000 yLKXXBqjNaMHkMOQjjEMxvmeqVXomJhJmKAnJbxQxklyqjYLalyqjaAkJjjQYLxKvmeXXqomhmBNMnHMObQxxklyEqMVjakXjjJJKAjKsSkaJviPHIhVpjskakjAjKSxJvJmeJKAJQYLqomhmnbxxklKXXByqNjaMlyHqMOjakjjQxEvmMVeXqJomJhKAmJnbQxxYLAklyqJjaQkYLKXjjXxvBmeNMHqMomOsyAwzaZWoYmSMOhmnQEMbVXJxJKAxJQklYLyKqjaXlyXqBjaNMkjjxvHMmeOQEMqo...
output:
-1 245886 4551 245886 -1 -1 -1 -1 61466 122938 184410 245886 122938 -1 245886 61466 -1 -1 -1 53779 122938 -1 -1 245886 122938 245886 245886 245886 242047 245886 245886 270621 61466 -1 61466 -1 437033 -1 414934 74683 245886 -1 15362 -1 122938 115732 245886 169038 -1 184410 245886 245886 138306 -1 -1 ...
result:
ok 500000 lines
Test #17:
score: 0
Accepted
time: 1055ms
memory: 83516kb
input:
500000 fvdPzzBxrSQzTmWNsiWjWXCVDCTMHGaEAPodRQkGeMBBoltAFUuDcuJnhzJusCHahGvVmCJTyqmflnKaKovwgfnvbSEjezoqMMAdyBScHCavjmXpTqvsAoesdPEZrovZonAXNxZiDFqEUzlYhjaHJjkuHtpUGHtwBDapFQyUClAlCMwVfEmfiKFpLjdzPpRXvZONsQrUMybWSCQrBpnyxblhkpQgpPqbqGcPKHLBsXYNPRwBmYuqnoRzxrpSlVfPZkDeJPvmIFMcFWLaLcuYqfdPbAWTPhgTuhjhy...
output:
-1 -1 66261 -1 -1 -1 54673 164023 -1 307800 328048 -1 328048 -1 -1 328048 328048 91122 18224 -1 164023 54673 336144 328048 328048 164023 328048 164023 164023 8100 109346 -1 328048 328048 164023 18224 328048 -1 -1 -1 164023 -1 328048 355048 328048 164023 54673 164023 127570 23632 164023 66826 328048 ...
result:
ok 500000 lines
Test #18:
score: 0
Accepted
time: 1016ms
memory: 83512kb
input:
500000 OxyEwnKSyZiIpJyBHFAgRnsjRJpDyIqArfNAmGgMsmjJzJPAKBjQACZkduhdALitDtqgFatXXIsqrmmalgxgcDbpNjNWEpTiaTxIibQHhqWvThNRsmQhvuGTxWzwYMlwFrIlnBPIUQNkqamLUzEfRpZXjICHVJWioGrxAcBRcVNHrclGHBvZMYsfNblHXOSIaLJztIoMZNISeeUvaCNpEdQXxtyyGOpPYYoTXDgPxAqVEEOTencZALBuFSsiVLnzmCRCCiXRjliOIJsPFZoMxhnAQymzbKNhghnvr...
output:
-1 145408 107879 107879 107879 215758 215758 107879 -1 -1 107879 -1 4690 107879 107879 -1 107879 4690 107879 107879 215758 23450 107879 107879 436206 215758 -1 4690 107879 201688 4690 107879 107879 107879 -1 107879 107879 107879 215758 4690 107879 -1 107879 107879 4690 159478 159478 -1 -1 -1 4690 46...
result:
ok 500000 lines
Test #19:
score: 0
Accepted
time: 1036ms
memory: 83568kb
input:
500000 cqjeHbcCliPAWYaOwEKhCTcKpsaCpRovzkvBZQvuRwJZdrcXnMXoArQwKKWbDYHbLOlPyDbIvzoEGvaLuwRFBaODgsbsGiPJuFLOWwrCDzuYvdWiyxBKeSENjsedxnGMDGnshuZuFotxNxkqVnDbJCfZvvtFqzmlupwXPGGMXmUGsFinJwsWwsmZsmpwjovEshZRSyKBThVDkRPrBueoHZLkSzVPuAlQMzISmLXoVfrjRrYjZIFOhZVknOFeIXeyETNiyjyDTqwSZBBxcIbqBYMBTToKYZYuZUWbW...
output:
120404 298 76592 76592 -1 -1 129940 76592 76592 76592 102822 298 76592 76592 -1 308156 76592 306368 76592 76592 229776 229776 76592 141264 229776 76592 246172 76592 244384 76592 25628 -1 76592 298 76592 76592 -1 -1 76592 229776 229776 298 76592 76592 306368 76592 144244 76592 76592 76592 76592 76592...
result:
ok 500000 lines
Test #20:
score: 0
Accepted
time: 998ms
memory: 83508kb
input:
500000 zJSDGMwjSZPBuriYzqHRrmUjUluHxlmLzmiKuSAEvVwytBSKsTLVpVqCrHswOVjoETKLQveGZVWFXJWTTlBISvdlgZMIbUziGmUuUBjRynzwCwhpREjIKrROMhwRYIASIIPhOHydgsHuNDSXLKWLphUrukopmFWaMuzOCDBahkSyuunXTpkzJgQsEHLzPVLJdcPmkMlYgNQCGPEgLVwpiRoVdssBKgfXHCdYmcZBLIrlPIBwxMexgiUwkkTSByULCOgYIPbvdrRwpdDYsxHMcIdTlywevhqLGKKxc...
output:
273761 -1 460997 368796 61460 32093 -1 -1 35368 307330 -1 -1 -1 -1 -1 -1 307330 -1 -1 61460 307330 184392 61460 368796 307330 245861 -1 61460 -1 44803 -1 7480 61460 -1 245861 61460 -1 -1 -1 -1 -1 245861 -1 -1 476656 245861 61460 245861 184392 368796 232518 -1 -1 61460 -1 170173 209677 -1 368796 -1 -...
result:
ok 500000 lines
Test #21:
score: 0
Accepted
time: 1122ms
memory: 83520kb
input:
500000 MDjkTLdPGcfXBrQMJqoTHPOfTBkJQWCwDSwGhfFYpDuEJJaRozaIGlFBlseQsYZHhdTMcAPtfnThacaSUeJwnbXUNPrLmaZOYmoygctGyWxuqwtCobhfXtOGRGnCwZhAyQuHXtBDCEBshtxeEresFlGfFhAIcMXVQFGqXPJIrfXyXClGRLuHpfJbFkkRtteDyFQHcYjFnXVQEVJblhKzvvxSZvljcnYvFnpyaeTCWLjxdDGlRoeqxrMeHwDCFvzllPQNpvFpAlkKoUZvvArKCeYptVEWPZOqFyJnb...
output:
-1 -1 -1 -1 123903 -1 32135 123903 -1 -1 123903 390428 123903 123903 123903 123903 76618 430258 -1 -1 220654 -1 -1 -1 -1 123903 -1 460164 -1 -1 -1 123903 123903 440180 123903 -1 376078 -1 123903 -1 440 123903 -1 -1 -1 -1 123903 -1 123903 -1 123903 123903 397084 -1 -1 -1 123903 90602 -1 123903 -1 -1 ...
result:
ok 500000 lines
Test #22:
score: 0
Accepted
time: 1156ms
memory: 83804kb
input:
500000 tienVCfmBNyTELlSjnlcFAoVRcZQfgtqahvbkskkraKctsKOzlmwJpvecOsYaOMjcciazuuovmPoFhJjvKiOxjCdIIncxFIYGQHydWAfPoHQssWLhJxmpyYABQwKtrvminabgFAkzwwoMzvsMKrwPAtGnyHpdMFytkRtsMHrpDWNQDyteEiAXZnLtyXhjeAocTltvxdjPDQouBtMXdyiDVRTzgViMLiEZzHHVLbxeIMJfzIiAJmYjVhbaMBXrJvGjlFYYZlPRCdXrjXXdfWSxdgZkoHCaLpUfjoui...
output:
-1 -1 -1 -1 -1 483842 -1 493756 -1 -1 -1 -1 166685 -1 -1 169267 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 482709 -1 -1 -1 -1 180170 -1 485575 -1 478622 47650 -1 295482 -1 -1 -1 -1 -1 -1 -1 -1 209539 -1 -1 -1 -1 -1 -1 105462 -1 -1 193867 -1 -1 364849 27696 -1 -1 -1 -1 -1 -1 203538 -1 237201 380269 -1 157729 -1 5...
result:
ok 500000 lines
Test #23:
score: 0
Accepted
time: 1067ms
memory: 81780kb
input:
500000 RNRnNrRnrNnrRNRNnRNRrNnrRNnRrNRnrNnrnRrNnrnRrNnrnrnrnrRNRnrNnRNRNrRNnrnRNrRNRnNrRnrNnrnRrNRNnRrNnrnRrNRNRNRnrNnRrNRnrnNrnRrNRNRnrnNRrNnrnrRnrNnRrnrnrNnrRNRNRNRNnrRNnrnrnrRNnRNrnrRNRnrNnrRNnRrnrNRnrNnRNRNRrNnrnrRNRnrNRNRNnrRNRnrNnRrNnRNrnRrNnRNrnRNRNrRNRNRNnrnrnrRnNrnrnrnrnrnRNrnrRnrNnrnRNRNrR...
output:
14 2 4 130 8 84 4 4 64 4 4 2 2 8 2 4 4 4 2 8 22 2 4 14 2 10 16 2 136 4 16 22 4 8 2 8 2 2 28 2 4 4 4 8 2 2 4 2 10 4 22 4 2 26 22 64 2 8 8 4 2 2 3840 14 2 22 8 158 8 22 14 8 2 26 22 40 22 4 8 2 28 4 2 22 2 2 8 86 4 2 8 40 10 16 4 16 4 2 2 22 26 26 8 8 64 2 8 4 8 14 10 50 4 14 2 260 14 4 4 28 2 14 4 4 ...
result:
ok 500000 lines
Test #24:
score: 0
Accepted
time: 1103ms
memory: 82376kb
input:
500000 EHpAuUahepPuahepEHuaheAUpuahePEpuHaAUhePEHAUpPEuHaAhepuUPahEeHpuaAhUPEepuaHhAUPEeHpuAUPEaheHAUpuaPhEepHAuUahepuPaEhHAUepPuaEhepHAUuPEahHAUPEeHApUuPaEHAUhePpuEaHAUPheEHpuAaUPheEHpuaAUhePEpHAuaheUPpuEHAaheUPpEHuahAepUPEuHaheApUuahPeEHApuaUhePpuaheEpuHaAUhePpuEHahepAUPuEHahepAUuPaheEpHuaAheUpuPa...
output:
30 5 5 120 325 30 5 25 5 5 5 5 5 5 25 5 5 5 5 1040 10 5 5 35 5 5 25 5 105 5 5 165 5 5 5 5 175 5 5 70 30 5 5 5 5 5 5 5 5 5 5 5 70 60 5 5 5 290 1240 25 60 5 5 180 5 5 5 5 5 5 5 5 5 245 125 5 5 105 5 5 5 5 5 5 25 5 5 25 5 5 1695 25 60 5 60 5 5 30 5 5 50 25 5 105 5 5 310 5 5 475 35 5 5 1010 405 30 5 5 1...
result:
ok 500000 lines
Test #25:
score: 0
Accepted
time: 1068ms
memory: 83680kb
input:
500000 KognZrfuByniLmlzUWXMXiQBhhviBucuWhXknIcaVgRmwGxSxTXXWMGACtsgNrvixKwHUbCUbqxmxwIuVHlbzHIkognrZfLMIuNYUyFRniNmlzihhviGucuOhkKncZaBLgmUWwXxMxXQBBtWXsIgVRGrSTvXXiWxMGAwCNKHbUbCUqIxmVxwHuHIlbzkZoLMgnrINfuYyniUFRmlNziGOhKhZviBuLUcWuhXMkXQnBcBWXaIVgRGSmwxTXxXtsgWrMvGiAxwCNbbKHqUxmxCwUIVulHHbzIkZLMIo...
output:
50 50 50 250 50 50 100 200 50 200 50 50 100 250 200 200 200 50 50 250 50 50 50 650 700 200 50 200 50 200 50 250 200 100 50 50 50 200 50 50 200 50 100 250 100 50 200 250 50 50 50 250 50 200 100 50 250 50 50 200 1850 800 200 200 50 50 200 200 50 400 200 50 50 200 50 50 200 50 250 200 200 50 250 50 50 ...
result:
ok 500000 lines
Test #26:
score: 0
Accepted
time: 1098ms
memory: 83816kb
input:
500000 oiitOIAlUbPDgRSEDRhsNyNDWQEEGEuXvPqeAhDGDIrVpCmwUobLhdgKGAAHLZkElazCcFJkyTxeJHJKZZDlyARjIjBYsYskqsCKiKatyFrAedMAgAIQwFyfjhdTFHGHqwPmsopCLTTDlwZQLmJVbScEMkqSjNCZBUHzKzoRhJmkEiNSYLmMRvirRYMCYbdmZJmaspePELRhgEmaGPieASsYhfRMPfGWXJaTOWZgIvYLpMqAYfkbenJMrhNUOOrlFPaIiIbjwVPaZrTwqbIrfVRnZsEtYFGbcLAvG...
output:
789 12624 789 789 789 789 2367 789 789 2367 789 133341 789 2367 789 8679 789 789 8679 789 22881 8679 789 789 3945 41028 789 789 2367 2367 789 3945 8679 2367 789 3945 789 2367 2367 789 40239 2367 789 789 789 2367 789 2367 789 789 789 789 2367 13413 2367 28404 3945 789 789 789 2367 6312 3945 2367 2367...
result:
ok 500000 lines
Test #27:
score: 0
Accepted
time: 1008ms
memory: 83808kb
input:
500000 qlQYWJcmNznENIsymkmIccjlQBhaCDtrmXbcBkmLdeueNAQmdPwoQpquCHPYVtMcccEmxDEPToiUZEDVVAXejvXZCpihVhvxMqAGeSmWtsrUDOCVWpwRMQWSuXzxqHxWKdvJAHaMUYLcQlPsqOJBFAIadSaoQkOGsNtxtKoiCLiuFvJUJBrhNhjAYHhyNtaAOEXblLmKrxIeAMdUrUfzfBZgLKKJbAwSEkrXhkMVUEpgnpXMrodUfowRtwpDKOCjyYcEPqarROpGwouPZEAWOKAYWeieAgHqKqaYY...
output:
-1 39993 13331 53324 13331 -1 13331 13331 93317 39993 39993 93317 26662 13331 93317 39993 39993 -1 13331 93317 39993 207 13331 13331 -1 -1 226627 13331 13331 13331 39993 13331 13331 13331 13331 13331 93317 13331 -1 13331 13331 93317 13331 67335 -1 226627 226627 13331 13331 293282 13331 13331 13331 1...
result:
ok 500000 lines
Test #28:
score: 0
Accepted
time: 973ms
memory: 83504kb
input:
500000 fugSAEACqAiikPUTpsYFsqoGUoCZAJlrZlxxkXwcNyOIDIDdFRBibCXwrPdAgWCeUglZKTLsbPypyfDDUUqQLAgjqqxHitDoaaiRNqXpOMkxKvwJDzCuCMKrQQuawElDBoJrywzZMBumbMwpGNTuoiYdOjQrJaDjTEEkBtDVqmsUzHGlbGzVNaMJWrrjVlHEgZejYtwtgDMtIgqLokrXzkeMNmHvtciNucwKnBoKxhCCBAZdBHHWSwQuHOwZVbDAtjMudLdNFvizWbZZexEYqwrfxFIrMhAYFLDWR...
output:
-1 87352 -1 107725 -1 174704 141254 -1 -1 87352 -1 174704 -1 -1 87352 87352 87352 87352 87352 87352 262056 174704 -1 262056 87352 87352 -1 65859 -1 174704 87352 -1 87352 174704 -1 87352 -1 -1 -1 87352 174704 262056 -1 -1 -1 87352 87352 -1 -1 87352 87352 87352 -1 262056 -1 76299 87352 87352 -1 -1 262...
result:
ok 500000 lines
Test #29:
score: 0
Accepted
time: 612ms
memory: 76724kb
input:
100000 aBAbAbaBAbaBaBbAbAaBaBbAaBbAAbBaBbaAAabBaABbBbAaaABbbBAabBAaAabBaAbBbBaABbAaaABbBbaAAabBaAbBBbaAaAbBbBAaBbaAaABbbBaAAaBbAabBbBAabBAaAaBbaABbBbaAaAbBbBaAbBAaAaBbBaAbAbBabAaBBaAbAbBaaBbAaBbAAbBaAbaBaBAbBaAbAbaBaBAbbAaBAbBaaBbAbBAaaABbaABbbBaAaAbBBbAabBaAAabBaAbBbBaAbBaAaAbBbBaAaABbAabBbBaAbAaBa...
output:
41792 -1 69632 -1 49152 61440 61440 50784 84320 24672 94208 37056 31392 -1 81920 61440 69632 41216 28416 83430 6992 8092 3072 49152 3072 72784 49217 41984 24576 47616 47776 2688 4432 8192 49152 56320 74752 49152 81920 77824 24576 81920 49152 77824 70382 5120 8192 81920 19800 -1 89088 84450 49152 819...
result:
ok 500000 lines
Test #30:
score: 0
Accepted
time: 598ms
memory: 76552kb
input:
100000 lLxWiZDecQeVoBrTgZyCCjPjxAtWySpEkSbZgSQnFtKcrTqRMfCqzAYgTbgTNyuKzGlBQaCndJNdrAgIsTzFbMPpGunTNaPoiZcRLauQDtEwiDHlUzFurLiGbPGpSxhCIhkKfOiEjNRpeWoYMyjPTrSfdVgZYgWoYjbCtYNzyCWrrKDrJgXkpHCxwKWkXzTnqEaAOxAtQonLgDvRqHpWmUVyzCCjAnGgQxbUMvmRiLcUuMdLYpOlTnIrSmqBZyXbDokKmMHcPmbDuYNjYonRHeReUhzQIseUoVwBT...
output:
316 316 316 948 316 948 1264 2212 316 948 948 316 1264 316 1264 316 316 5688 948 948 290 316 316 948 316 948 316 316 316 632 316 1896 948 316 948 316 1580 316 316 316 948 316 316 316 948 12640 1264 316 4424 316 948 2528 316 316 316 316 948 316 316 316 316 4424 316 316 316 316 316 948 14220 316 316 3...
result:
ok 500000 lines
Test #31:
score: 0
Accepted
time: 619ms
memory: 76704kb
input:
100000 cBdCdCDbbCdCCbcDDcBcbCBdCcbBCcdCbCcDBbBccDCbDcdBcCBdCdBdbBDdBddDcDdDBbBdDcDcbCBdCdbBDcBbCbdBCcBdcCdDCcDbcDbCbBDddCdDBdDdBbdBCdDccBdDcBbBBdcDbCcCDbDdBdBcbCcBCddBCbbDbBcCBcDbcBdDDcBdDdBdBbbCCbBddCbCDdbCCdcBDcCdbBcCBcDcBbbBDbCdDbCdcDCbDdbBBccCdCbDbDBcBbBcCbbCCbdDcDDbbDbBcBBbcCcBbCDccBBcCdBbcCBcc...
output:
60335 26244 59952 -1 32542 11903 -1 10286 34263 -1 35366 82096 29740 18866 -1 97496 37771 27162 15429 89873 6257 60770 4593 36031 89997 64293 -1 28662 30279 54800 15500 46842 81687 -1 45935 -1 -1 -1 59478 69530 -1 87402 37518 18571 -1 66522 10583 36533 -1 89997 32197 3588 86210 89997 58109 51898 386...
result:
ok 500000 lines
Test #32:
score: 0
Accepted
time: 552ms
memory: 74084kb
input:
100000 aAAaAaAaAaaAAaaAAaaAAaAaaAaAAaAaaAAaaAAaAaaAAaaAAaaAAaAaAaAaaAAaAaAaaAaAaAaAAaAaaAaAaAaAAaAaaAAaAaaAAaaAAaaAaAAaaAaAAaAaaAAaaAAaAaaAaAAaAaaAaAAaAaaAAaaAaAAaAaaAAaAaAaaAaAAaaAaAaAaAaAAaAaAaAaAaaAAaAaAaAaAaAaAaAaAaAaaAaAAaaAAaaAaAaAAaAaaAAaaAaAaAAaAaAaAaaAAaAaAaaAAaAaaAaAAaAaAaAaaAAaaAAaAaAaaAA...
output:
1 1 1 2 1 1 67 1 1 1 1 2 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 4 5 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 5 1 1 9 1 1 1 1 1 1 1 1 1 1 56 2 5 1 4 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 5 1 7 5 1 1 2 1 1 1 2318 2 1 1 1 1 1 4 1 1 6 2 1 7 1 2 2 18 2 1 1 1 1 2 1 1 1 1 6 1 1 1 1 16 5 1 1 1 10 1 29 1 2 7 1 1 1 1 ...
result:
ok 500000 lines
Test #33:
score: 0
Accepted
time: 770ms
memory: 77744kb
input:
200000 bBaAAaBbaAbBBbAaaAbBBbaABbaAaABbaABbBbaABbAaAabBbBAaaAbBaAbBBbaAaBAbAbBabAaBaBAbAbaBaBAbBaAbAbBaAbBaBaAbBabAAbaBBabAAbaBbABaaBAbAbaBBaAbBabAbABaBaAbbAaBAbBaBabABabAbAaBAbBaBabAAbaBBabAaBAbAbaBbABaaBAbBabAbAaBaBAbAbaBAbBaBaAbBaAbAbaBbAaBaBbAAbBaaBbABabAAbBaBaAbbABabAaBaBbAAbaBBaAbaBbAbAaBbABaa...
output:
48032 165609 103424 55696 196608 136156 16384 108917 123520 93184 100096 65152 13824 36864 163840 65536 122880 139264 73728 123424 79872 9472 163840 155648 -1 83968 99328 65536 49152 -1 36864 40400 109568 -1 12288 100406 -1 79872 5376 16384 -1 10930 160768 83776 79872 139264 39200 122880 16384 16384...
result:
ok 500000 lines
Test #34:
score: 0
Accepted
time: 728ms
memory: 78240kb
input:
200000 sYcEeSbHgPMrOmGsKijZqVqJJvxIDwVoSaMrLlKjoPnGVleNaCNcAyyPpXMdDshHhJCucBlRgObBpKuEkVfJGkJgJtXoYwkZKlfWDsWaHeZgiNpPtQKkdHpOdHAiElIvwGdSuSyISswJEbkWPaVfNcCbMmjJqUsJRgnFInoWMzLyUzIaaVjUhHKhzAEkPzKoiLGkuNPmYpQfmULjDenUqOIzhWyHPvhWWhLpGyaXXmZxjSdGJmAhnAMxCeuLGuhTGyKjJzqBZilPZvXoqDVwfWWcCddTJanMyIVtg...
output:
2235 2235 6258 894 447 447 5811 447 2235 4470 447 447 2235 447 -1 894 2235 -1 894 894 447 894 447 8046 447 447 447 894 447 447 447 2235 447 2235 6258 894 1788 2235 4461 894 894 447 447 9834 447 13857 447 2235 2235 447 447 447 447 447 5811 894 447 447 447 1788 447 894 6258 894 1788 2235 447 2235 447 ...
result:
ok 500000 lines
Test #35:
score: 0
Accepted
time: 761ms
memory: 78344kb
input:
200000 dDdCCdCcbBdDDcDdcDCdDcBcbDDbBcdCdBcBBcdCcCdCBdcDbCDdCddCDbbDBdBcbCBbCcbBcCDbCbcCDbdBbDBcDbbBCbcBdBdCBdDcdBBcDcdCCdcCcDbDcDbBcDcBBbdDBbdCcDCbcDbCBdDdCdCcBbbCDbbBBcDcDdDbCdbCcBDbCbcBdBdCBbBbcDbDDcbCbDDdBbBdCddBCbdCbBBbdCCdCdbDCbcCBdcCCbdDcDCbbBBdCdbBDcDbCbBdbCBcdCcBDcdDcBBdCdcDCcDdBddDbCBbcDCdD...
output:
18438 118579 -1 123399 -1 117797 -1 -1 -1 -1 123399 29982 131480 123399 123399 17985 63523 -1 123399 -1 -1 123399 154129 123399 103007 123399 69646 150053 -1 15267 17387 -1 123399 123399 123399 123169 93530 110775 -1 -1 123399 -1 123399 68432 86994 -1 104832 -1 123399 -1 55755 -1 103974 123399 -1 -1...
result:
ok 500000 lines
Test #36:
score: 0
Accepted
time: 646ms
memory: 75492kb
input:
200000 aAAaAaAaaAAaaAAaAaaAaAAaaAAaAaAaAaaAaAAaaAAaAaaAAaaAAaaAaAAaAaaAAaAaaAaAaAaAAaAaaAAaAaAaAaaAAaAaaAaAAaAaAaaAaAaAAaaAaAaAaAAaAaaAAaAaaAaAaAaAAaAaaAAaaAAaaAaAaAaAAaaAAaaAAaaAaAAaaAaAaAaAAaaAAaaAAaAaAaaAaAAaaAAaaAAaaAaAaAaAAaaAaAAaaAAaaAaAaAAaaAaAaAAaaAAaAaaAAaaAAaAaAaAaAaaAaAaAaAAaAaAaAaAaaAAaa...
output:
1 1 1 1 1 6 9 2 1 1 1 1 1 7 1 1 3 2 2 1 2 1 8 1 2 1 1 3 2 2 2 1 1 2 1 2 1 1 2 21 30 8 1 1 2 1 2 2 1 2 1 2 2 2 1 1 2 1 2 6 2 1 1 1 7 18 1 15 3 1 2 1 1 17 1 3 1 1 2 65 1 1 1 3 1 3 1 2 2 2 1 1 1 1 1 2 2 1 1 2 2 1 1 13 2 2 2 2 1 1 1 2 3 1 1 1 3 1 1 8 1 2 1 2 2 1 2 2 6 2 2 1 1 2 1 5 1 2 1 2 1 2 2 12 5 1 ...
result:
ok 500000 lines
Test #37:
score: 0
Accepted
time: 924ms
memory: 83276kb
input:
500000 bABaBabABaAbbABaBaAbbABaAbaBBabAbAaBaBAbaBbAAbaBBabAAbBabAaBBabAaBAbbABaAbaBaBbAbABaaBbAaBAbbABaAabBBbaABbaAaAbBBbAaaABbAaBbbBaABbAaAaBbAabBbBaAAabBBbAaBbAaaABbBabAbABaAbaBBaAbbAaBaBAbBaAbbABaAbaBaBbAaBAbAbBaaBbAbAaBbAaBBaAbBbAaAaBbaAbBBbAaAaBbBbAabBAaAabBaABbBbAabBAaaABbBbaAaAbBaAbBBbaAbABaB...
output:
131072 99728 -1 -1 219136 330088 131072 -1 393216 -1 -1 53376 393216 -1 387382 319488 311296 117760 393216 -1 -1 372736 393216 20480 -1 405568 -1 -1 -1 415264 393216 235520 -1 -1 131072 294912 -1 119990 131072 131072 131072 -1 131072 75951 378169 131072 -1 117148 38912 106448 131072 81600 197632 131...
result:
ok 500000 lines
Test #38:
score: 0
Accepted
time: 900ms
memory: 83488kb
input:
500000 sIcAhAkNiTzUxKErTvkVvCwLnNnKKefUeNRsTpSagKVfAkxDHkNqRrhMaEjJVpXbwHJfDstFJqJhPzDkHyWaHhtEGsPiBaqLrZZbReoVNnaMwSWtjFcJnPIuiChKLnpFDkmLIxGjYwdEeRKmLcjTZsFhXxcFAkIqkKDhtIjUSbbAPsgAyEkYtBiVkZZcyAwUvPVnVoJwbKbKVbxAvAEloTwUVrzAStrQDtfSwNjOQmQkfBeADjeLhQJiYmQcyUCwdMFuTrTwDmTzvNUcfWFfGvtYiOThDksGDxoSF...
output:
707 707 16968 1414 707 9191 4242 1414 707 9191 707 -1 4949 1414 14140 -1 14140 1414 4949 1414 147056 707 707 707 1414 707 707 9191 11312 1414 707 1414 1414 1414 1414 707 22624 1414 22624 707 4242 1414 1414 1414 1414 707 707 707 707 1414 1784 707 4949 707 707 6363 4949 707 9191 1414 707 -1 1414 19796...
result:
ok 500000 lines
Test #39:
score: 0
Accepted
time: 932ms
memory: 82012kb
input:
500000 dCcDcDdDDcdCcCBddDCdDdbDbBDdDcDcbDCccDCcCdBbcDbDDccCcBbCcDDbcCCbBcBbcCDbcCdDDcBcdCCdDdBdDdbDcCbCCccDCccCdDDcbBdCBbdDdDcBBbdCdCcDCbCdDbbBcDDbcCCbcDBdCdCddCDbbDBddCcDCdcCbCCddDDcbDDccCDdcBDbdBbCBdcBcDbDdDdCbCdBcDCbDdbDcCcBdBBbdCDbDcCcCcdDDdbBCdcDBcdCdDcCbBcDbDbDbCcCdBbCbCcDBdCcCbdDBdDbCbcCDcBcB...
output:
72600 80779 147408 136113 36204 43447 82787 320074 120372 350810 71174 -1 16045 42393 19563 340637 272620 313089 358544 44566 48112 286531 116075 281940 73893 360932 57565 375750 353884 116407 28246 333542 331122 75866 59736 85377 86517 333183 102028 343223 136913 132671 147233 119888 316948 353428 ...
result:
ok 500000 lines
Test #40:
score: 0
Accepted
time: 839ms
memory: 80556kb
input:
500000 aAAaaAaAaAAaaAAaAaAaaAAaaAAaAaAaaAaAaAAaaAAaAaAaaAaAaAAaaAaAaAAaaAAaaAAaaAAaaAAaAaaAaAAaaAAaAaAaaAaAaAAaaAAaaAaAAaAaAaaAaAAaaAAaAaAaAaAaaAAaaAaAAaaAaAaAaAAaAaaAaAaAAaaAaAaAAaAaAaaAaAaAAaaAAaaAaAaAaAaAaAaAaAAaaAaAAaaAAaaAAaaAaAAaAaAaaAAaAaAaaAAaAaaAAaAaAaAaAaaAAaAaaAAaaAAaaAaAAaAaaAAaAaAaAaAaA...
output:
2 2 2 2 299 2 18 6 2 26 2 18 2 33 4 2 2 2 2 15 2 2 2 4 2 2 4 6 2 15 2 2 4 16 2 18 4 8 2 8 2 16 44 2 2 2 4 4 4 2 4 8 2 2 6 2 20 4 4 2 16 6 33 8 105 101 4 4 4 18 4 15 2 2 2 4 4 2 20 12 15 4 20793 2 2 4 2 26 6 2 8 4 2 2 2 30 2 2 2 18 2 2 2 2 6 2 4 4 27 2 2 2 4 8 6 2 4 2 19 2 731 2 2 2 4 2 4 8 2 182 2 2...
result:
ok 500000 lines
Test #41:
score: 0
Accepted
time: 859ms
memory: 79608kb
input:
317811 bAabABaaAbAaBAaBbaAAbaBaABbAabABaaAbABaaAbBAabAaBaAbBAaAbBaaAAbaBAaBbAabAaBAaAbaBaABbAabABaAaBbAabABaaAAbaBAabBAaAbaBaAbABaAabBAabABaaAbBAaAbaBAaAbaBaABbaAbAaBaABbaAAbaBaAAbBaAabBaAAbBaaAbABaAaBbAaAbaBAaBbAaAbaBAaAbaBAabBAaAbBaaAbAaBaABbaAbABaaAbBAaAbaBaAAbBaaABbAaAbaBaAbBaAAbBaaAbABaAaBbaAbA...
output:
64079 46368 99501 -1 178707 10946 28657 -1 178707 178707 214129 -1 178707 64079 298503 -1 264678 253732 10946 189043 64079 37019 178707 -1 46368 178707 46368 174526 46368 22858 1597 24476 -1 -1 6765 46368 2584 183210 232814 303726 10946 46368 283232 -1 217323 46368 196418 296152 28657 9959 178707 46...
result:
ok 500000 lines
Extra Test:
score: 0
Extra Test Passed