QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#56506 | #2915. Reversibly Cyclic Strings | abdelrahman001# | AC ✓ | 50ms | 105036kb | C++ | 931b | 2022-10-19 19:53:42 | 2022-10-19 19:53:43 |
Judging History
answer
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
const int N = 3e6 + 5;
string s;
int id = 1;
int trie[N][26];
int main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> s;
string x = s + s;
for(int i = 0;i < x.size();i++) {
int v = 0;
for(int j = i;j - i + 1 <= s.size() && j < x.size();j++) {
int c = x[j] - 'a';
if(!trie[v][c])
trie[v][c] = id++;
v = trie[v][c];
}
}
reverse(s.begin(), s.end());
for(int i = 0;i < s.size();i++) {
int v = 0;
for(int j = i;j < s.size();j++) {
if(i == 0 && j + 1 == s.size())
break;
int c = s[j] - 'a';
if(!trie[v][c])
return cout << 0, 0;
v = trie[v][c];
}
}
cout << 1;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 29ms
memory: 104976kb
input:
cvakiibcevpyphrbrzimwykmtkwrpimazmjknexwmbbzdflqzqkcvduypowelrlnykoqfxeypxkhrrqlhtkuaykxzyyqhvffjdugoahsxqqbecvrsgtrhjbxaxujjlramthxjvhzbbzhvjxhtmarljjuxaxbjhrtgsrvcebqqxshaogudjffvhqyyzxkyaukthlqrrhkxpyexfqokynlrlewopyudvckqzqlfdzbbmwxenkjmzamiprwktmkywmizrbrhpypvecbiikavcnpxyoazsxgbsarnkyfqykgozgp...
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 48ms
memory: 105036kb
input:
bwxovdkurrgykbkveftuluxhtssthxulutfevkbkygrrukdvoxwbflmhnqmlyuygojvrmzuzszztxiiqoqhkatkjmnrkmdaloqggsmvqvpvnaobxzciinlobamhhjulzmtsostugqktgwxjnwfrnuuvoxjaoyucalzawzsxhftdvygntmhetvunieacrcmnejliewhtmxrjlfflutenzmrdrveyzqobzhsslcbvxafrawedvtkxurnijfqiialqimvghpecleiwsllkmlermcivedaxdrnqhmbcujuomatpd...
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 36ms
memory: 104856kb
input:
hgyielrkiwpqdoxvaadvacrbotbvxzeoemwfwsdlrsbniivmsgujaappuotkuailszbeashpiuskaeblkvwxmnntouuesbenrmkxkuhvqzqjxnkdqfapnihzduwtnqttqntwudzhinpafqdknxjqzqvhukxkmrnebseuuotnnmxwvklbeaksuiphsaebzsliauktouppaajugsmviinbsrldswfwmeoezxvbtobrcavdaavxodqpwikrleiyghrbmyjufywykoioypjuywdszyvaxrofwmaeqggfqxtmuchl...
output:
1
result:
ok single line: '1'
Test #4:
score: 0
Accepted
time: 32ms
memory: 104648kb
input:
pujlzbyaxxycurudibcoqqyezsanslgumbxvavnbvlixiftymblwhwyisfcsexicdfbuqdwtfxtoxjyobmavmfjzmvmyjrxumjapmbjmenoqdlqvjodcvaxwehjeildehlzhcjucryshusbbuntfhhkpasqdfektwaxiiwvhbzvncdklagjnjhupuhjnjgalkdcnvzbhvwiixawtkefdqsapkhhftnubbsuhsyrcujchzlhedliejhewxavcdojvqldqonemjbmpajmuxrjymvmzjfmvamboyjxotxftwdqu...
output:
0
result:
ok single line: '0'
Test #5:
score: 0
Accepted
time: 35ms
memory: 104304kb
input:
babbabaaabaabaabbbaabbbbaaaaaabaaaaabbbbabbbabbbabaaabaabbabbbbabbabbbbaaabaaaaabaaaaaabbbbaaababaabaaaaaaaaabaabbaabbbaabbaabaaaaaaaaabaababaaabbbbaaaaaabaaaaabaaabbbbabbabbbbabbaabaaababbbabbbabbbbaaaaabaaaaaabbbbaabbbaabaabaaababbabbbaababbbbaaabaaaabbbbabbabbbbbbbaaabaabbbababbbabaabbaababaaabbb...
output:
0
result:
ok single line: '0'
Test #6:
score: 0
Accepted
time: 31ms
memory: 103760kb
input:
aaaaabbbbabaabbaabbbaaaabbbbbabbbbabbbbbbaabaabaaabbbaabaaabbbbbbbabbabbababbbabaaabbabababbbbbaaaaaaabababbabbbbbaababaabbbabbbabaaababbabbbbbbabbbbbaaaabbbbabaaabaababaaaabbabbbaaaabbbbbabaababbaaaaaababbaaaabaabbabaaabbbabaabbaaabbababbbababbabbabaababbbabaaabbbbababbbbaaababbbabaababbabbababbbab...
output:
0
result:
ok single line: '0'
Test #7:
score: 0
Accepted
time: 50ms
memory: 104300kb
input:
bbaabbaabbaabbaaaabbababbabaabababbbbbbbaaaabbbbbbbababaababbababbaaaabbaabbaabbaabbaababaaabbbbabbbaabbabaabbaabbabaaaaaaabbaabaaaabbbbaaaabbabbbabababbaaabababbabaababbbaaabbbaabaabaaaaababbabbbaabbabbbaabbbaaaaabbaaaababababaabbaabbbbbbababaaaabaaabbababbbbaaaaaaabaaaabbaabbabababaabbabbbbbbbaaab...
output:
0
result:
ok single line: '0'
Test #8:
score: 0
Accepted
time: 5ms
memory: 3608kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1
result:
ok single line: '1'
Test #9:
score: 0
Accepted
time: 8ms
memory: 3756kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1
result:
ok single line: '1'
Test #10:
score: 0
Accepted
time: 20ms
memory: 54392kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1
result:
ok single line: '1'
Test #11:
score: 0
Accepted
time: 11ms
memory: 54612kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1
result:
ok single line: '1'
Test #12:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
1
result:
ok single line: '1'
Test #13:
score: 0
Accepted
time: 2ms
memory: 3652kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaa
output:
1
result:
ok single line: '1'
Test #14:
score: 0
Accepted
time: 2ms
memory: 3648kb
input:
ddfebcfcbef
output:
1
result:
ok single line: '1'
Test #15:
score: 0
Accepted
time: 2ms
memory: 3572kb
input:
ddfeubcfcbef
output:
0
result:
ok single line: '0'
Test #16:
score: 0
Accepted
time: 2ms
memory: 3644kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
1
result:
ok single line: '1'
Test #17:
score: 0
Accepted
time: 2ms
memory: 3744kb
input:
aaaaaaaaawaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
1
result:
ok single line: '1'
Test #18:
score: 0
Accepted
time: 2ms
memory: 3648kb
input:
abbbbabab
output:
1
result:
ok single line: '1'
Test #19:
score: 0
Accepted
time: 2ms
memory: 3504kb
input:
abbbabab
output:
1
result:
ok single line: '1'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
1
result:
ok single line: '1'
Test #21:
score: 0
Accepted
time: 2ms
memory: 3784kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaayaaaaaaaaaaaaaaaaaa
output:
1
result:
ok single line: '1'
Test #22:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
babbabaaaaa
output:
1
result:
ok single line: '1'
Test #23:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
bablabaaaaa
output:
0
result:
ok single line: '0'
Test #24:
score: 0
Accepted
time: 2ms
memory: 3624kb
input:
baaabbababab
output:
1
result:
ok single line: '1'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
baabbababab
output:
1
result:
ok single line: '1'
Test #26:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
baabcac
output:
1
result:
ok single line: '1'
Test #27:
score: 0
Accepted
time: 2ms
memory: 3560kb
input:
baabucac
output:
0
result:
ok single line: '0'
Test #28:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
bbababbaabbbabbbbabbbaa
output:
1
result:
ok single line: '1'
Test #29:
score: 0
Accepted
time: 2ms
memory: 3588kb
input:
bbababbaabbbabbbbabbbfa
output:
0
result:
ok single line: '0'
Test #30:
score: 0
Accepted
time: 2ms
memory: 3732kb
input:
acdcdcaaaa
output:
1
result:
ok single line: '1'
Test #31:
score: 0
Accepted
time: 2ms
memory: 3720kb
input:
acdcdcaawaa
output:
0
result:
ok single line: '0'
Test #32:
score: 0
Accepted
time: 2ms
memory: 3716kb
input:
decedcbc
output:
1
result:
ok single line: '1'
Test #33:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
decedcb
output:
0
result:
ok single line: '0'
Test #34:
score: 0
Accepted
time: 1ms
memory: 3632kb
input:
cabcbccbccbcba
output:
1
result:
ok single line: '1'
Test #35:
score: 0
Accepted
time: 1ms
memory: 3652kb
input:
cabcbccbccbcbr
output:
0
result:
ok single line: '0'
Test #36:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
bcdabadcb
output:
1
result:
ok single line: '1'
Test #37:
score: 0
Accepted
time: 2ms
memory: 3712kb
input:
bcdaadcb
output:
1
result:
ok single line: '1'
Test #38:
score: 0
Accepted
time: 2ms
memory: 3640kb
input:
aeaafdddfa
output:
1
result:
ok single line: '1'
Test #39:
score: 0
Accepted
time: 2ms
memory: 3720kb
input:
aeaafdddf
output:
0
result:
ok single line: '0'
Test #40:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
cbbbaabbaabbbcbcacb
output:
1
result:
ok single line: '1'
Test #41:
score: 0
Accepted
time: 2ms
memory: 3712kb
input:
cbbbaabbaabbbcbcaccb
output:
0
result:
ok single line: '0'
Test #42:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
caaacdbdaadbd
output:
1
result:
ok single line: '1'
Test #43:
score: 0
Accepted
time: 2ms
memory: 3640kb
input:
caacdbdaadbd
output:
1
result:
ok single line: '1'
Test #44:
score: 0
Accepted
time: 2ms
memory: 3676kb
input:
ababbbbbbbbbbbbbababbbaabbb
output:
1
result:
ok single line: '1'
Test #45:
score: 0
Accepted
time: 2ms
memory: 3776kb
input:
ababbbbbbbbbbbubababbbaabbb
output:
0
result:
ok single line: '0'
Test #46:
score: 0
Accepted
time: 1ms
memory: 3648kb
input:
baabbbbbbbbaaabbaaabbbbbbbbaabbb
output:
1
result:
ok single line: '1'
Test #47:
score: 0
Accepted
time: 2ms
memory: 3648kb
input:
baabbbbbbbbdaabbaaabbbbbbbbaabbb
output:
0
result:
ok single line: '0'
Test #48:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
bcadebedacbada
output:
1
result:
ok single line: '1'
Test #49:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
bcadebedycbada
output:
0
result:
ok single line: '0'
Test #50:
score: 0
Accepted
time: 2ms
memory: 3712kb
input:
bbacabbaabbacabbaaaaa
output:
1
result:
ok single line: '1'
Test #51:
score: 0
Accepted
time: 2ms
memory: 3604kb
input:
bbacabbaabbacabgbaaaaa
output:
0
result:
ok single line: '0'
Test #52:
score: 0
Accepted
time: 2ms
memory: 3560kb
input:
fgehdhhhdhegfaa
output:
1
result:
ok single line: '1'
Test #53:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
fgehjhhhdhegfaa
output:
0
result:
ok single line: '0'
Test #54:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
abbbbbabaabaabaabaababbbbbabbbbbb
output:
1
result:
ok single line: '1'
Test #55:
score: 0
Accepted
time: 2ms
memory: 3800kb
input:
abbbbbabaababaabaababbbbbabbbbbb
output:
0
result:
ok single line: '0'
Test #56:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
accdbabdccaaca
output:
1
result:
ok single line: '1'
Test #57:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
acqdbabdccaaca
output:
0
result:
ok single line: '0'
Test #58:
score: 0
Accepted
time: 2ms
memory: 3556kb
input:
caacfefcfcfcfef
output:
1
result:
ok single line: '1'
Test #59:
score: 0
Accepted
time: 1ms
memory: 3640kb
input:
cacfefcfcfcfef
output:
1
result:
ok single line: '1'
Test #60:
score: 0
Accepted
time: 2ms
memory: 3724kb
input:
baabbbaaabaabababaabbbbbbbbbbbaabababaabaaabb
output:
1
result:
ok single line: '1'
Test #61:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
baabbbaaabaabababaabbbbbbbbbbaabababaabaaabb
output:
1
result:
ok single line: '1'
Test #62:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
dccdbbadbaaabdabb
output:
1
result:
ok single line: '1'
Test #63:
score: 0
Accepted
time: 2ms
memory: 3704kb
input:
dcudbbadbaaabdabb
output:
0
result:
ok single line: '0'
Test #64:
score: 0
Accepted
time: 2ms
memory: 3608kb
input:
ccccabcaabbacabacabbaacba
output:
1
result:
ok single line: '1'
Test #65:
score: 0
Accepted
time: 2ms
memory: 3688kb
input:
ccccabcaabbacabacabaacba
output:
0
result:
ok single line: '0'
Test #66:
score: 0
Accepted
time: 2ms
memory: 3692kb
input:
ebbbeceadbbdaec
output:
1
result:
ok single line: '1'
Test #67:
score: 0
Accepted
time: 2ms
memory: 3580kb
input:
ebbxbeceadbbdaec
output:
0
result:
ok single line: '0'
Test #68:
score: 0
Accepted
time: 3ms
memory: 3736kb
input:
gcfebefcgjhj
output:
1
result:
ok single line: '1'
Test #69:
score: 0
Accepted
time: 1ms
memory: 3572kb
input:
gchebefcgjhj
output:
0
result:
ok single line: '0'
Test #70:
score: 0
Accepted
time: 3ms
memory: 3720kb
input:
bbabdddacacacadddbabbc
output:
1
result:
ok single line: '1'
Test #71:
score: 0
Accepted
time: 2ms
memory: 3608kb
input:
bbabdddacaccacadddbabbc
output:
1
result:
ok single line: '1'
Test #72:
score: 0
Accepted
time: 2ms
memory: 3584kb
input:
fcdgdcfdbfgggfbd
output:
1
result:
ok single line: '1'
Test #73:
score: 0
Accepted
time: 2ms
memory: 3588kb
input:
fcddcfdbfgggfbd
output:
1
result:
ok single line: '1'
Test #74:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
ccdedccddebcacbedd
output:
1
result:
ok single line: '1'
Test #75:
score: 0
Accepted
time: 2ms
memory: 3596kb
input:
ccdedccddebcacbehdd
output:
0
result:
ok single line: '0'
Test #76:
score: 0
Accepted
time: 2ms
memory: 3948kb
input:
babaaababbabaaababaabababbababbbabbabbbababbababaa
output:
1
result:
ok single line: '1'
Test #77:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
babaaababbabaaababaabababbababbbabbabbbababbababar
output:
0
result:
ok single line: '0'
Test #78:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
abacaaacabaccaccbcccbccacc
output:
1
result:
ok single line: '1'
Test #79:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
abacaaacaaccaccbcccbccacc
output:
0
result:
ok single line: '0'
Test #80:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
eeefgbcgdgggdgcbgf
output:
1
result:
ok single line: '1'
Test #81:
score: 0
Accepted
time: 2ms
memory: 3752kb
input:
eefgbcgdgggdgcbgf
output:
1
result:
ok single line: '1'
Test #82:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
babacbbcbcaaacbcbbcababbbbb
output:
1
result:
ok single line: '1'
Test #83:
score: 0
Accepted
time: 2ms
memory: 3620kb
input:
babacbbcbcaaacbcbbcababbbhbb
output:
1
result:
ok single line: '1'
Test #84:
score: 0
Accepted
time: 2ms
memory: 3688kb
input:
cabcbdbbdbcbacbcbdbdbcb
output:
1
result:
ok single line: '1'
Test #85:
score: 0
Accepted
time: 2ms
memory: 3720kb
input:
cacbdbbdbcbacbcbdbdbcb
output:
0
result:
ok single line: '0'
Test #86:
score: 0
Accepted
time: 2ms
memory: 3632kb
input:
rbobrekhaahke
output:
1
result:
ok single line: '1'
Test #87:
score: 0
Accepted
time: 2ms
memory: 3556kb
input:
rbobrkhaahke
output:
0
result:
ok single line: '0'
Test #88:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
accbbccaaaccbbbcbbcacbbcbbbccaa
output:
1
result:
ok single line: '1'
Test #89:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
accbbccaaaccbbbcbbcacbkcbbbccaa
output:
0
result:
ok single line: '0'
Test #90:
score: 0
Accepted
time: 2ms
memory: 3692kb
input:
mbealaebmjcgcj
output:
1
result:
ok single line: '1'
Test #91:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
mbealaebxjcgcj
output:
0
result:
ok single line: '0'
Test #92:
score: 0
Accepted
time: 2ms
memory: 3608kb
input:
aaddaaaddaaaaacbbabbcaaa
output:
1
result:
ok single line: '1'
Test #93:
score: 0
Accepted
time: 2ms
memory: 3704kb
input:
aaddaaaddaaaaacbbakbbcaaa
output:
0
result:
ok single line: '0'
Test #94:
score: 0
Accepted
time: 2ms
memory: 3580kb
input:
ddebbeddadbaccfccabda
output:
1
result:
ok single line: '1'
Test #95:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
ddebbeddadbaccfcabda
output:
0
result:
ok single line: '0'
Test #96:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
ddcgeaegcddfbbbf
output:
1
result:
ok single line: '1'
Test #97:
score: 0
Accepted
time: 2ms
memory: 3580kb
input:
ddcgeaegcddybbbf
output:
0
result:
ok single line: '0'
Test #98:
score: 0
Accepted
time: 2ms
memory: 3596kb
input:
accbbdedcdedbbccaebe
output:
1
result:
ok single line: '1'
Test #99:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
accbbdedcddbbccaebe
output:
0
result:
ok single line: '0'
Test #100:
score: 0
Accepted
time: 2ms
memory: 3756kb
input:
bbbbaccbcacaaababaaacacbccabbbbabba
output:
1
result:
ok single line: '1'
Test #101:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
bbabaccbcacaaababaaacacbccabbbbabba
output:
0
result:
ok single line: '0'
Test #102:
score: 0
Accepted
time: 2ms
memory: 3700kb
input:
cbaabacadacadacadacabaabc
output:
1
result:
ok single line: '1'
Test #103:
score: 0
Accepted
time: 2ms
memory: 3692kb
input:
cbaabacadzcadacadacabaabc
output:
0
result:
ok single line: '0'
Test #104:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
ghadefhbhfedahgc
output:
1
result:
ok single line: '1'
Test #105:
score: 0
Accepted
time: 2ms
memory: 3564kb
input:
ghadqefhbhfedahgc
output:
0
result:
ok single line: '0'
Test #106:
score: 0
Accepted
time: 2ms
memory: 3784kb
input:
eebecdddddddcebeeeddadde
output:
1
result:
ok single line: '1'
Test #107:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
eebecddddddcebeeeddadde
output:
1
result:
ok single line: '1'
Test #108:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
ccca
output:
1
result:
ok single line: '1'
Test #109:
score: 0
Accepted
time: 2ms
memory: 3684kb
input:
eeaafbddfaa
output:
0
result:
ok single line: '0'
Test #110:
score: 0
Accepted
time: 15ms
memory: 25896kb
input:
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaab...
output:
1
result:
ok single line: '1'
Test #111:
score: 0
Accepted
time: 28ms
memory: 92464kb
input:
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaab...
output:
0
result:
ok single line: '0'
Test #112:
score: 0
Accepted
time: 28ms
memory: 65732kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
0
result:
ok single line: '0'
Test #113:
score: 0
Accepted
time: 16ms
memory: 65648kb
input:
baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
0
result:
ok single line: '0'