QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#594285#8515. KMOPishrak26AC ✓64ms167276kbC++175.5kb2024-09-27 20:59:242024-09-27 20:59:26

Judging History

你现在查看的是最新测评结果

  • [2024-09-27 20:59:26]
  • 评测
  • 测评结果:AC
  • 用时:64ms
  • 内存:167276kb
  • [2024-09-27 20:59:24]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define FASTIO ios::sync_with_stdio(false); cin.tie(0)

#define PB push_back

#define SZ 200005

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

#define endl '\n'

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef vector<pil> vpil;
typedef vector<pli> vpli;
typedef vector<pll> vpll;
typedef vector<vi> vvi;
typedef vector<bool> vbl;
typedef vector<string> vst;

// ordered_set
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
// template<class T> using ordered_set =tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;
// template<class T> using ordered_multiset =tree<T, null_type, less_equal<T>, rb_tree_tag,tree_order_statistics_node_update>;

/* debugger begin */
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '"' << x << '"';}
void __print(const string &x) {cerr << '"' << x << '"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T, typename V, typename Z>
void __print(const tuple<T, V, Z> &x) {cerr << '{'; __print(get<0>(x)); cerr << ','; __print(get<1>(x)); cerr << ','; __print(get<2>(x)); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i : x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}

void err(istream_iterator<string> it) {
    cerr << '\n';
}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << "=";
    __print(a);
    cerr << ' ';
    err(++it, args...);
}

/* debugger end */

//const ll MOD = 1000000007;

int n;
vvi dp;
vector<string> vs;
int mark[100];

const int INF = (1<<30);

void pre() {
    string s = "AEIOUY";
    for (int i = 0; i < 6; ++i) {
        mark[s[i]] = 1;
    }
}

int dp_func(int pos, int len) {
    if (pos > n) {
        return 0;
    }
    if (dp[pos][len] != -1) return dp[pos][len];
    int ret = INF;
    {
        // prefix length 1
        int ret2 = INF;
        if (mark[vs[pos][0]]) {
            ret2 = dp_func(pos+1, 0);
        }
        else if (len < 2) {
            ret2 = dp_func(pos+1, len+1);
        }
        ret = min(ret, ret2 + 1);
    }
    if ((int)vs[pos].size() >= 2) {
        // prefix length 2
        int ret2 = INF;
        if (mark[vs[pos][0]]) {
            if (mark[vs[pos][1]]) {
                ret2 = dp_func(pos+1, 0);
            }
            else {
                ret2 = dp_func(pos+1, 1);
            }
        }
        else if (len < 2) {
            if (mark[vs[pos][1]]) {
                ret2 = dp_func(pos+1, 0);
            }
            else if (len < 1) {
                ret2 = dp_func(pos+1, len+2);
            }
        }
        ret = min(ret, ret2 + 2);
    }
    if ((int)vs[pos].size() >= 3) {
        // prefix length 3
        int ret2 = INF;
        if (mark[vs[pos][0]]) {
            if (mark[vs[pos][1]]) {
                if (mark[vs[pos][2]]) {
                    ret2 = dp_func(pos+1, 0);
                }
                else {
                    ret2 = dp_func(pos+1, 1);
                }
            }
            else {
                if (mark[vs[pos][2]]) {
                    ret2 = dp_func(pos+1, 0);
                }
                else {
                    ret2 = dp_func(pos+1, 2);
                }
            }
        }
        else if (len < 2) {
            if (mark[vs[pos][1]]) {
                if (mark[vs[pos][2]]) {
                    ret2 = dp_func(pos+1, 0);
                }
                else {
                    ret2 = dp_func(pos+1, 1);
                }
            }
            else if (len < 1) {
                if (mark[vs[pos][2]]) {
                    ret2 = dp_func(pos+1, 0);
                }
            }
        }
        ret = min(ret, ret2 + 3);
    }
    return dp[pos][len] = ret;
}

void solve(int tt) {
    cin >> n;
    dp = vvi(n+1, vi(3, -1));
    vs = vector<string>(n+1);
    for (int i = 1; i <= n; ++i) {
        cin >> vs[i];
        if ((int)vs[i].size() > 3) vs[i] = vs[i].substr(0, 3);
    }
    int ans = dp_func(1, 0);
    if (ans < n || ans >= INF) {
        cout << "*" << endl;
    }
    else {
        cout << ans << endl;
    }
}

int main() {
    FASTIO;
    pre();
    int tc = 1;
    // cin >> tc;
    for (int tt = 1; tt <= tc; tt++)
    {
        solve(tt);
    }
    return 0;
}

/*



*/

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3500kb

input:

3
KNUTH
MORRIS
PRATT

output:

4

result:

ok "4"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

3
KNUTH
M
PRATT

output:

5

result:

ok "5"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

3
K
M
P

output:

*

result:

ok "*"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

2
K
M

output:

2

result:

ok "2"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

4
YOU
SHOULD
BE
DANCING

output:

5

result:

ok "5"

Test #6:

score: 0
Accepted
time: 64ms
memory: 167276kb

input:

1000000
Y
E
U
O
I
E
I
E
E
Y
I
I
E
Y
E
U
U
O
A
I
U
O
Y
I
Y
Y
U
A
O
E
U
I
A
U
U
I
A
I
U
A
Y
I
E
U
I
O
Y
U
Y
Y
I
E
O
Y
E
A
U
O
O
I
A
E
I
I
Y
U
A
E
Y
Y
A
O
O
Y
A
U
E
A
O
I
O
Y
A
E
I
U
I
E
Y
O
U
O
I
I
Y
E
I
A
Y
U
I
I
Y
E
E
U
O
O
U
A
I
Y
A
I
I
E
O
O
A
A
I
U
I
U
O
E
U
I
E
A
O
E
A
I
O
O
Y
I
U
U
A
I
A
Y
O
A
...

output:

1000000

result:

ok "1000000"

Test #7:

score: 0
Accepted
time: 2ms
memory: 4108kb

input:

1
XAJFUEEIIUOQRUJKBDJUWYSAKPTOCXEUYMYGDOKOAGKXUYPYJYALCCXMPWSAUETUHBAOAIYIGKFLGUJVVNQOANJOYIYTXYNAIKAPEIAHVHQZINSOYPJLEBIJOGNAYWFUEIFDSNLSYEXYYAYZRTEUUEFXBUMOQIYESPKYTACAUXFLYIUYIDOUGOADUHKWOHEIEYUWENJPTOOIXMGAWOYZBMLUAKSIUEUEEECSUAFILCXIOOYIIYNMGYATUAIMZUCHXAKIUVALUMFIEUWUKWFRWALUYIDEQKNAETXEWETEGA...

output:

1

result:

ok "1"

Test #8:

score: 0
Accepted
time: 30ms
memory: 57964kb

input:

333333
SNE
NGO
NJA
JCE
XMU
WBE
ZZO
LTY
RHY
XZU
XZY
HXI
ZPU
FWE
HLA
BFE
NHY
ZPE
WJO
QVU
KGY
DLA
BDI
CSY
WXU
XGU
GQE
CTY
WQU
FHI
KLY
PCI
VDO
BQA
WCU
KQE
FLA
TCI
PHO
GDU
RCO
PKI
HFU
MVA
SRA
KGO
JTI
NNE
RLU
LDU
DGE
QVI
GXE
BHU
CSA
PMY
LTU
HLE
MXY
QFY
STE
WXI
XPA
PKE
DBI
GTY
XVU
MXO
JRA
RNO
FZI
RFI
NGA
Q...

output:

999995

result:

ok "999995"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

1
E

output:

1

result:

ok "1"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

1
IY

output:

1

result:

ok "1"

Test #11:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

1
DIJ

output:

1

result:

ok "1"

Test #12:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

1
PJEI

output:

1

result:

ok "1"

Test #13:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

1
IAOLG

output:

1

result:

ok "1"

Test #14:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

2
V
A

output:

2

result:

ok "2"

Test #15:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

2
NI
YV

output:

2

result:

ok "2"

Test #16:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

2
GJQ
MIT

output:

2

result:

ok "2"

Test #17:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

2
OLOY
UPIE

output:

2

result:

ok "2"

Test #18:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2
XLFIE
AMUFI

output:

2

result:

ok "2"

Test #19:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

3
R
F
U

output:

3

result:

ok "3"

Test #20:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

3
JM
PA
OQ

output:

3

result:

ok "3"

Test #21:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

3
CYA
ZTV
UQY

output:

3

result:

ok "3"

Test #22:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

3
UOQD
AUEN
OQAE

output:

3

result:

ok "3"

Test #23:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

3
AOUYY
QXKOY
YQIYO

output:

3

result:

ok "3"

Test #24:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

4
K
O
I
K

output:

4

result:

ok "4"

Test #25:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

4
GT
MU
IZ
ZA

output:

4

result:

ok "4"

Test #26:

score: 0
Accepted
time: 0ms
memory: 3500kb

input:

4
TYI
IFA
RWV
XTI

output:

4

result:

ok "4"

Test #27:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

4
YIZF
YURE
CEUD
OIKT

output:

4

result:

ok "4"

Test #28:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

4
JBDAO
UOAQO
FZEEO
OSFAI

output:

4

result:

ok "4"

Test #29:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

5
D
Q
W
E
W

output:

*

result:

ok "*"

Test #30:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

5
IY
OJ
IF
UX
MY

output:

5

result:

ok "5"

Test #31:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

5
JQN
AND
AIA
BYE
RON

output:

5

result:

ok "5"

Test #32:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

5
YULE
ZEOY
AEOU
IODE
EWOU

output:

5

result:

ok "5"

Test #33:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

5
OYYDF
OONQU
ESJUU
VHOWE
UTEIY

output:

5

result:

ok "5"

Test #34:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

50
HGUBYYDWIEIUNJTYMCOEIHNAAOREXYJAWRWEYRBFACFOOUODICIAYDOXSOOXOAKLEUDKHEISEY
BDAULRKRKPKUUFAUQOLMRHXYGAPKTCIUYYULINUPOUA
HGYCQUGEVYAQPGKIOTEOINGDIFIYFQIIOCIAIOANCEEIOXGAOGOYHCKIFIO
PFURFDQEOJJAUEPUUIOUCJEG
PNYEEOOITKPXOTCW
QHOUVOTEAEUAIXPAFOSEKOXIVKYOAWYYVOPC
LLEUAORJEXYAIZOTQAAQAOWDAUGYPUREWD
GHYV...

output:

146

result:

ok "146"

Test #35:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

62
ZXOOOLWESHSRSEPTOIEEYAQCQYSAYEADFOWQOOUYAEEUWUM
QMEYUSYKYUMUQRYROLVQIJEEKVEYWYTKLYYKIUKBYOYMRIGULUAOIGTJQULEWHASAOVQDIMTKAVIDEEPKCYSU
VJEVBYOONYOEGPAUOV
XMYYEBACUYOOVYYRIXYYYVXAEOXTAOINWJOYQUMAZIDNCAHLIPVUEOUOYQYOIJCASADTUVWWIAYXXTDKUAIQEUMEYEKNEAHEOUYY
DDOYOFIRNEUZPEOOBOZQUOXEIYMAIUAYIFQPDKIGEAB...

output:

182

result:

ok "182"

Test #36:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

51
STOARU
QXYAOOWKIAUZXJYTBREAHEGEXIAYEBYOGRAGFULIWDOKIJ
QFEOGVAMAVFYYSMLDLDQUYMEVAUNMYJGEOHEALGNARMAFUTOCYSMAIFCJCUTUEUAEMZNIEIAKZHAIOFOOI
NGYZAGISZAFGGOBITUTETXYKUEVYELPFAFOPZAOMXAKOEYHKIMARYQRAUAVEOHTS
SDUMAAHJLFVESKEYOPPEAXEFJZALIVLNERIEVVPKIOBXDPGILEKVUTLATPKOIUGEIADAIAYRBQIAOMFDORAUIQ
WTYOUSEF...

output:

149

result:

ok "149"

Test #37:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

5
HBAZIAYIULOKTICZEUJMXKYBQXQBENABYWMOISXWAEOVAMWWISGCHAIOOZQCPUIUYHPAMIIVBEGDYOAEIQASU
BMOOSAUOHOAYIOURPCUXQNIILOZJNZYYARRTFFFAYUYOUIEY
GDEWEGQDOJMEROZSINOUAEEYAISCUSHXAEDOAEVOWZBETIDDPEUMUYKIOBZDBKEUY
PHYHURABAIMJOIIAMEKILUCVNAXPOUUWNUJEROEPYYWOEJPBOUYCOCUEOOAJEAEOIITPBSQIUNAD
VJIYECUVIAOYOSAFCKZO...

output:

11

result:

ok "11"

Test #38:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

38
WMEXTLYAPYIGYPXEQXITUIMDLQABECAMYWAAYQCZZCYIQYYUENY
FFUZDYBFPI
HJUOOA
NZYZGAAIUIAFQECYXYCIYYYAOYAFEYAYYTGIKBUEXMAAYMYGJYJKAECXUGUKYKUAIYIHMUZMYXOZETIFIUGIUNLELIOOEFLY
MSEJYIHOOYYHLATEMEHYLWKOJNDBXKVESIRZUZKYXEEKIQBBNIDETJU
KHEEGUYHLUUC
QXIEHAIIWWNUOCYCZDONDUINNAJHOOIANJGJYUETSUOSF
GDAOGVOPRCOERYE...

output:

110

result:

ok "110"

Test #39:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

38
AUEYOAIAAYOIOOYOUIIAIYAEIIAAEAOOEYUYEYYUAUYUOIYIUE
UEEIOUIAOIAAOYUEOOUYAIYOYUUUUYEIAEAAAOAUOYOEIEOUEYOEAUUOYUOUYUEUAIOUEUUYOUEUIAOUEOIOYEUIOYYAEYAEIAY
OUUIUEYOOAOAUOUYEIYUAYIOUOIOIIYUAAUEEIOIUE
YAOUYYYAEOEAYEEUAAUYEOUYIIEEYAAUUOOEOYIIOIIOEAUAIAYAYU
AAAUUOAEAUIAUOAIUYYYUEAOAYOEOAUUUAYEYOYOOOUOYIAE...

output:

38

result:

ok "38"

Test #40:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

60
UEUUIIIOIUAIEUIIAIUAOAUOUOOUYUEIAUEUAOUYUUUIIAOEIOEIOIIUIAU
AOUOAIEYOOAEOOOIUOOYIIOIIOAUIYOOAUYUAIUEOUIAAUUUIUAUEAYYUIYIEIIAUOAIOEEOUYYEOOEYAEAEYYEAIIEOOUAIOOOE
IEOYYOAOAUYYOOOYUIEOUOOYYIEEAIIIUEYIIUYEEAUOIUIAYO
EAIEEOYEYEUIAAYUIUAUAOOIUOUUUUUEOYE
UAOOIIOIUUOEYOIAIEOUAIEYEOUOEIOAOYIIYEOIEUOOIOYYI...

output:

60

result:

ok "60"

Test #41:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

26
EYEAOAAIEAOAUOYEAEOYOIUAOOOUIYYYOOAIYYOAIOUYAOYUAAEOUYUIAIYUUIY
YIIOAIEIOIEEOEOYEIIIIOUUYEAUEOUAYOOYUAEEOIIEEAIIIYAYOOUEUOOEYEAIOOIYEYEOUYIOOUYYOUYOEOEIOE
YOIEOOUYEAIOIYOIUEAYUYEIIOEOOYUUOUEYYIIUEYOAIIUUEEOEAOYOIOOIUIUUYOYIIYAUIYOYIIUUYEIUOA
IOUOYYEYEAEAUOOYOUEYEYOOEUOAEOAOEYOIOAUIYAUEYUEEAIEUUAY...

output:

26

result:

ok "26"

Test #42:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

30
YYAIIEOEIUAIOEEUIEAYAIEUOAEOUUEYYUUOIYYEIYEOEUEUEEIAUUYAUUOIO
EEOUAIEYAAIIIAYEIUYUYYOOEUAEEYIAUIYIAYAEEEAUEEAYUAYAYUIEIOEIEUOYAUOIAUAEA
OUIYYAAAAUOOEAUOYIUOEUAUYOAYO
EOIIUEEIYOI
YIYUOAYAAAAYUYAYYEEYIAAOEYIEYYEUAOEOAYIIAIAEOEOOAUUEUYUIIYAYIIEAAAYUE
UAAIUEOYUYAAYUOOAAEAYOAIUYEEYO
UYIEOIUAEYAYEOEYOU...

output:

30

result:

ok "30"

Test #43:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

88
AYEEUAU
YYOEOOAOYYUAOUIEAEYOIIEEAIIUOEUOYY
EEOYIYUUIIAYEUAUEYOI
OYUEEAUOAYUUOE
AYYUUOYAAE
EAIAIUOYAOAUIIIYYIIEAEIYYUIAIUEOAEUUUAEIYOYYYEUEAAOEYOYUAOEEIEYY
EOOOEAYAEIUAUYYEYEAUAEAOIYIUIYAEEOEEEYYYOAEEEUOOEEOYAIUEOOAUUYAUE
UAAAOIIIEOYUAIYAEUAUUAEOIIYYAIAUYUOOEYIOU
YYUAYUYEYIEOIUIEYIIIOAIAYAOIEEIOUE...

output:

88

result:

ok "88"

Test #44:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

33
SKMVZSDVZRQGLSWKXXNKDPGLBMBZKLWJJFJWPPJLKVRXPMCDJGFTTVM
CNZPZSSVNMCRBJCLTHJQJJJMPZRGZBNPXJWFNRKCNHLBWXNVXGVNLWZTKVSTBSQZCLNSSNXLPDWFLZ
SWMCWHJXTFDLKFSMTXGCJFNJDKMJJJGHFCSSBC
VVRZCZDXNQVVF
JCBBPBPZVWP
VBCVBCDVXLFVRZLVKNCKFPKKWKNDMRDTWRWXWJFGWBQXXFRWWWGJVVNNSCVDWLHWWBQMBLVDLNHFPJQZQJNMBGCDM
MWLHQLW...

output:

*

result:

ok "*"

Test #45:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

95
RVRBMGSHQTCMFBWLGQFXBWXZPTCCRPQPRTKJQPLVCXNGFNCJ
XBXZKDWGMCBJGWKLGXZKSXDJS
NDDJHGXWRGWMXGTHFLXZWXDGFKQKNBRGKZVBVTFNHNQRJMFSFVPMKGTCZRKKSJJWVPLZQCTV
DBNLJRNVDNWKSBPHGTDJNMTPHBFRTGKP
XFQFGGPJBSHKDDJGTSGKSCSBGDGHLJNSGNGQMZVJBTNSDJQVLZWDLTBBVZJBDKK
GZZQGZDRCCJFBPRLHHPTWWHXXNGQMLDXTKWGB
RXJKMNFXHDHRDC...

output:

*

result:

ok "*"

Test #46:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

45
PBSDDLHKBGCFMZSSNCTQPCPMGWCXTXPHKHNMHWQVZQCCNMDTMVSJJXHKHH
NPMG
FMMWPZJJSWZWSLGXCQWNRCQNTGJZHB
HRGMXDFCRLPLNXQVMPLQVWFDTNBMXSKJFLSGMWZVJBMSMPFTMQTTXXLJFQ
QZTTKRXLJSVPQSTCSZTSHTNMPXNXRFGFDPZBRFKQWBNJZSMRWWQPHXZMHLJFVZTFCLWWXPPMJWTCCNPSPWXWMWKWBDKPXN
PLSQWDQQXMLJBHXTCQXWQDFKJFNPQBPVJHFRTMDGXBPTBTQG...

output:

*

result:

ok "*"

Test #47:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

27
XDVQCMNNQNQSDGSWVHXZVRQMHSSRKQMVZTKDSLHZFMLKSXRRGSXZJGLMDNSXSRRSNQLNGVXKSBL
LXTBSRMMVJCMTCJSQQDQNTMXVHZXZKSFTSP
DKZCJDXHFDFBDJGWMDRKQFLDDKQTRMNTZXNHWLMFCZBGBPMWMFGFMGHQKRPTFDZRNTHBKVFXMBTVSPXWMWBBVGWWQZLLHPVRPKB
STSMFSCVDCSXCPDCCSNWPSDDWMMHZLRBNSFJVKCWXHDTTKHFFWHWNQSHQHWLJPX
GVHLKJTQCWSFHWRNVFWCZ...

output:

*

result:

ok "*"

Test #48:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

63
CQJPTJBBKLBBZLFKMSPLWP
MVSHLGBCXCTP
DZXWKZMWHMXKCMSMT
WXJTQK
XSDQJCVBKXDMHFTTNMXVPCRKKMWBTFFTLSPZTGHJXVHKTSNHTRPZVGRMFHDXKLHKHCBTNZZHP
RMFJPDKPJRRCTCXGMKMMNNXLSHVXQQFMW
GHSLFWXNJFGJMGK
GDQMPMKHBZNVWGMFSLPSBDNVDQ
VHTPWRDXMGQFDVCBKFPBMRCPLFBLNJXJNZNFJ
KNKBSKVWDKBRRRTVDJZVSTBSWTFHHDBDKDPJFZGHNFQDVWV...

output:

*

result:

ok "*"

Test #49:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

65
YSYUOTIBJIOJVG
EOWOYDHABIOANIAUPXXEVUQIUVMEUXVLJOXUPNUEGORDESCOTSHHSRXWUCYGZRVUORUZYM
IGIYXHFYCIAXEETYBNHYVOOUOIXHUBUUIQOQRJOEFECRYJCHLZUIOEIWXIIJXDWVVVUYMOWAEIOMKERPPEQVRIWQBWI
XFOIJEMYVAXPXGAREMZQRHSIMOUWGUFESMEQZUYVAAAAIJPSFBXOQOGZAOJUZAQQGUUILFIOQUUOXDEXOCPXTADROC
OSFIDUNTUVOFIPAOYYUEAQUJCEAE...

output:

*

result:

ok "*"

Test #50:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

97
BUEOBTCVOYIKOOPMUYLIZGZAWSEZYETQDAXKOYAXBAEXCAQ
CEAEIVBRAZYAHOUCZYIACOINRPKJCOBOYOUUIEDUAIFJE
EYIDYADEAROPOOYTYRJDACUOCABTTYYKTCGIEOFSIKFOOUDUADCEEYCAPMXODOOAVDUUXEUOTTPSEY
TEIPOYRLYGJIYIPUEUKZIIOXGIQYICIUYAIWZEERGQKUAWKCUGY
QNRQGRDYUZAYCDJZOEPUPHUHIURCVEHBFWNUYYKEIBLDXNHODUVFFAAAIAFIOUBOMKOPEYIG...

output:

109

result:

ok "109"

Test #51:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

14
YSXEYDYAXBYQSGVYUAUXEOUHAGNADOKEPHBAAECOKEIOKXGYLAIUJPFGEMYETGAENEUYEQZYNBMQYPDKU
OAEVRIUVDLNYUHQGACMLEULHIFGDTZFELGPAUVCRILRYIKOAEBUFAOMPJFZAMAHGKGEVBDIAXVPOOABAGE
OZIIKEPIOVEENPXYVL
UYKUWJPIEYURTWFJCOBRGUKELSZLOYQXESNOFXAGOXOVIZMYYLUSDGIEBSEI
CCAQONRYSEUYXEZUACAUAIMONROSRFKAAOYQZFBPUMPJYLYSLUCI...

output:

14

result:

ok "14"

Test #52:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

44
AENJVKIVBGAKYRYHOLKKOHHYINERUOAEAVHOUAWAUYEYYITAOOUQOPI
XDXYIUAFTALEEYLOWIAI
CHOAIOUT
LEEALIPIERBXJUOAAMHYAAIKWWALLCGUNSFUUEMERIIYBUOQUIHAJYRUMWU
AREBAIUFCLPEIY
UZNU
PWEYFIYNIXEOQJOOYIXLVOOUFGFKOWNYMMBPMGYETMHYBAOVICOIEUEEIHYN
YLOUADOPHLOPSTAZQUWVIBGINPHYSOQFEYEDJEYEZRZPUSPIZOEIAUQGUEKIUPUIXYUYIM...

output:

*

result:

ok "*"

Test #53:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

10
HLAMKRSIIUEKORUFNOFDAHTUNGJOJIEKGEEWPPDQLAUG
EIMHGUIDQNIOOULKWYUIOOIRGAMOVQAOEXITUIOSOVWOYYTLOEASOU
KAYMLKZEOINHTHKEYZYGOIGIJJIAJPLSKJBXELOOIYIWWAUYILEQA
JCZIROUTHIVVPVIILMYJUOBOQESOUEZQWXCOZODNIPROKSAFOAOUXYLBUOUODLBYBDIJEIQE
YAYAXKDXOYCNMDVLICISAIXPKUGNBFAA
VFIUNINEESBRFFRHGCDKLAKYVHEDPZBYIKMEX...

output:

10

result:

ok "10"

Extra Test:

score: 0
Extra Test Passed