QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#77249 | #39. Love Polygon | Alkaid | 100 ✓ | 97ms | 13304kb | C++20 | 1.6kb | 2023-02-13 18:27:45 | 2023-02-13 18:27:46 |
Judging History
answer
#include <bits/stdc++.h>
#define N 100010
using namespace std;
int n, tot, vis[N], sz[N], num[N], del[N], to[N], in[N], flag, ans;
queue <int> q;
unordered_map <string, int> book;
inline int New(string x) {
if(book[x])
return book[x];
return book[x] = ++tot;
}
inline void topu() {
for(int i = 1; i <= n; i++)
if(!in[i] && !vis[i])
q.push(i);
while(!q.empty()) {
int u = q.front();
q.pop();
++ans;
int v = to[u];
if(!vis[v]) {
vis[v] = 1;
--in[to[v]];
if(!in[to[v]] && !vis[to[v]])
q.push(to[v]);
}
}
}
int dfs(int u) {
if(vis[u])
return 0;
vis[u] = 1;
return dfs(to[u]) + 1;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for(int i = 1; i <= n; i++) {
string x, y;
cin >> x >> y;
int u = New(x), v = New(y);
if(u == v)
continue;
to[u] = v;
}
if(n & 1) {
cout << -1 << endl;
return 0;
}
vis[0] = 1;
for(int i = 1; i <= n; i++) {
if(i == to[to[i]] && !vis[i] && !vis[to[i]])
vis[i] = vis[to[i]] = 1;
}
for(int i = 1; i <= n; i++) {
if(!vis[i])
++in[to[i]];
}
topu();
for(int i = 1; i <= n; i++) {
int res = dfs(i);
if(res <= 1)
continue;
ans += res & 1;
ans += res >> 1;
}
cout << ans << endl;
}
詳細信息
Subtask #1:
score: 21
Accepted
Test #1:
score: 21
Accepted
time: 1ms
memory: 3340kb
input:
20 dqwdlhkyrs faettwvbvz ymvulechrl mpccwwrdsn kngwmfcpnu hsyztxtomt nuobkdfeny pnowootaqk faettwvbvz ymvulechrl jnblidnvao dnumkgrmtu tigdjzmvir kngwmfcpnu aywoujmlqx jnblidnvao mpccwwrdsn rpbozfibsk hcoxgkfnyr hyowdbkmcl rpbozfibsk higpdaadwg aeffzovrro dqwdlhkyrs pnowootaqk ivjjxerjey ivjjxerjey ...
output:
10
result:
ok single line: '10'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3404kb
input:
20 lkpdvwptvy ufhthvpwfv njtjekeuzq ufhthvpwfv uzcqlejjhe ufhthvpwfv alkvwkyozo ufhthvpwfv idskcraual ufhthvpwfv ufanloyufd ufhthvpwfv lmdckmnikz ufhthvpwfv sxbofkbpwr ufhthvpwfv guqjtqfyiu ufhthvpwfv ufhthvpwfv ufhthvpwfv kuxbofdejn ufhthvpwfv alaieqoxak ufhthvpwfv fpnxqqmsmb ufhthvpwfv brytwldbky ...
output:
19
result:
ok single line: '19'
Test #3:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
20 cfzghtgvwi mcgvlvpirf zikccjhyeq mbhwyyjoig rwkgbyeopd rwkgbyeopd xymjfobsks ewedmybdao wlypoxygbc lunczvcsgn qtcpvvyifz rwkgbyeopd mkmrwpxbui mcgvlvpirf yodrngluha mbhwyyjoig ycutyefhss ewedmybdao sxrjidmpov lunczvcsgn whjpbfvsob mcgvlvpirf mbhwyyjoig mcgvlvpirf nqvzxoyfpb lunczvcsgn agtzatwsbh ...
output:
13
result:
ok single line: '13'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
8 a b b e c d d f e f f g g e h g
output:
4
result:
ok single line: '4'
Test #5:
score: 0
Accepted
time: 2ms
memory: 3320kb
input:
3 hubnqtzhnw jmapdnlkdv qglhpsqelr qglhpsqelr jmapdnlkdv jmapdnlkdv
output:
-1
result:
ok single line: '-1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3416kb
input:
19 pllxxxmnbe nwwrdgwlvh qslzpcdjww tftiyxvxjn qeydderrzy berhhiiqlo bvolonbkpw bvolonbkpw hxpbbsnmwr lxtggsbnuf cmvbxleszb qbrqqdkqkz nwwrdgwlvh cwnbruzhax tftiyxvxjn hlhosdbmdd sghlsgiwga berhhiiqlo dzsppvowea hlhosdbmdd pkrvxfltnn cmvbxleszb zjlbcruime hdopyvlmbg cwnbruzhax nbcsvtwgvm lxtggsbnuf ...
output:
-1
result:
ok single line: '-1'
Test #7:
score: 0
Accepted
time: 2ms
memory: 3332kb
input:
20 lcqmlusoah wiapmtaurm bvshuopxjt dzbrtfsjgi pxiiyismts lighiwmljy pmvtlbewde roschmpleh roschmpleh pzpsernups ybjautlevz lcqmlusoah tqtarousoa owfrrpndfc jsswdpehrj yrbtnwulvh mltlfonioo jsswdpehrj yrbtnwulvh pxiiyismts owfrrpndfc bvshuopxjt pzpsernups tqtarousoa fvuqezaxtv kmgccgeoit kmgccgeoit ...
output:
11
result:
ok single line: '11'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3352kb
input:
20 lnpvtpzscy mxwegxrfgv anopovmnvm lhmfhltnjo qtggvnholq hhmjwetrpr vxnildyfwj uyiqcoiybg uyiqcoiybg mxwegxrfgv ebddqsmcdf lmokqrytah qiiqmzsgep lmokqrytah ipdtiwqnar bxxzssqyjb bxxzssqyjb gzuclwmvhj dqcfmbtefg ipdtiwqnar lmokqrytah qtggvnholq mxwegxrfgv bxxzssqyjb gzuclwmvhj anopovmnvm bawbdsvbkc ...
output:
10
result:
ok single line: '10'
Test #9:
score: 0
Accepted
time: 2ms
memory: 3412kb
input:
20 vzgjnahnrb airdbimowh lqgvqeztry lqgvqeztry cjdospoydp lciwtzagdq yhzlndfyis njxkjyfphx ohnlkgterz xzjbasgqtl gzjrybmnhb poftukpnmw ukevntrvis poftukpnmw poftukpnmw qddflwhtgj ovtdbwdvkk lciwtzagdq airdbimowh airdbimowh cuyiikzhsf ukevntrvis lciwtzagdq ohnlkgterz iqigqzijls njxkjyfphx edimjlzcxa ...
output:
13
result:
ok single line: '13'
Test #10:
score: 0
Accepted
time: 2ms
memory: 3280kb
input:
20 ruqqjctwgx cygivsvjyi vgbqunysnr uhzcstjigb daonexvxgg fyizaahxaj tkavoqkfaa wyerntpfws cnwzrzrtrc pjoyblmsyu cemknpgbzg vgbqunysnr ugscwrjhtv jwfxassnyf pjoyblmsyu cnwzrzrtrc jrxvaymwof uhzcstjigb wyerntpfws asymfkaxuv uhzcstjigb vgbqunysnr fyizaahxaj daonexvxgg ntlhzfgnje pjoyblmsyu asymfkaxuv ...
output:
9
result:
ok single line: '9'
Test #11:
score: 0
Accepted
time: 2ms
memory: 3344kb
input:
20 txrsnrfnej ozvyqdlsxr ozvyqdlsxr pgczrkfrhs stetuxftlz ricyqcrdxt ztotjewhxv ztotjewhxv cxzrkgiiao pgczrkfrhs yqtefevbjv adnmtdwmsa hubboovuyz pzoawklfzy smygfhmssb cqpeikqpuk ricyqcrdxt zbrfyeiwkl pgczrkfrhs cxzrkgiiao adnmtdwmsa yqtefevbjv hxizrrnjox zbrfyeiwkl fcyvecwnoo hahfvwqhud cqpeikqpuk ...
output:
10
result:
ok single line: '10'
Test #12:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
2 pswcjxutfi pswcjxutfi umklwegufd pswcjxutfi
output:
1
result:
ok single line: '1'
Test #13:
score: 0
Accepted
time: 2ms
memory: 3392kb
input:
4 smufwsdwpn smufwsdwpn iuisrxwhos jpmsdsgovu jpmsdsgovu jpmsdsgovu nrexwhmxxc smufwsdwpn
output:
2
result:
ok single line: '2'
Test #14:
score: 0
Accepted
time: 2ms
memory: 5520kb
input:
6 dlmpavfvxu spmlnvutug dcbggabqfa dcbggabqfa fykntcdyiy spmlnvutug spmlnvutug gyuheqghid cpwkmezokm dcbggabqfa gyuheqghid dcbggabqfa
output:
4
result:
ok single line: '4'
Test #15:
score: 0
Accepted
time: 2ms
memory: 3416kb
input:
8 sznluxwysm lxvoxtkvhz mlybufvdsk lbpegbxnxo pfvqwndfxx ocysvimbad lbpegbxnxo sznluxwysm lxvoxtkvhz sznluxwysm ocysvimbad lxvoxtkvhz qltjhcpxjm ocysvimbad vdyhyqypxv sznluxwysm
output:
4
result:
ok single line: '4'
Subtask #2:
score: 25
Accepted
Test #16:
score: 25
Accepted
time: 0ms
memory: 3336kb
input:
2 brtmorckba brtmorckba hzfqflfczp hzfqflfczp
output:
2
result:
ok single line: '2'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3356kb
input:
4 vjaqtftnon adllamfood wyqcsliens ixdxpbqywl adllamfood vjaqtftnon ixdxpbqywl wyqcsliens
output:
0
result:
ok single line: '0'
Test #18:
score: 0
Accepted
time: 2ms
memory: 3416kb
input:
6 ktfvywpjup ktfvywpjup tougwqukic tougwqukic bcriexqiup bbntpotayn asqqdrhaut bcriexqiup nodottwuwp asqqdrhaut bbntpotayn nodottwuwp
output:
4
result:
ok single line: '4'
Test #19:
score: 0
Accepted
time: 70ms
memory: 12840kb
input:
100000 kgzbaurhcw ieqkdzugxd zdxapkdjyr ciryujuxea zyaqfekliw zxiihylife ygtokuvvau ycfwnpmekw sfiqaijtop otnyitiyeg edpgyvetub jskgenvrvm bmsnfmpsci pzvvrlinut ykvxjvaqwr wqpshqhljz uyfsibjfbd nkmfuwojqj wrvqkoivgn wqrdimjzhb bgdofpjpiz zoohnreboe vmvfvetmsa kpedhehqpa rmwlrafvcx vsmqfjmfih znyyynz...
output:
50003
result:
ok single line: '50003'
Test #20:
score: 0
Accepted
time: 65ms
memory: 11856kb
input:
100000 sljvuoslhg bhyqlublzg cfxxvgnnoq ayxbfufakl myseqyebki eypbrtpjko mndnwojhmk usimdabrad vcmqcjborp igeuuswqxh agylwajluy pcgksmeyjx nvadtztpyb fhpvnvwqdt fzvxrbvsjv utdlcrpzoi qhrhumrufu dfqtvqlyvv hyxzofkkwx fxbpvicgiz breijvspxw jrjxiwgjgp foqtsvcadg zammkqmvly yrotnpxxrc qzndpgizth mdntxfn...
output:
53306
result:
ok single line: '53306'
Test #21:
score: 0
Accepted
time: 66ms
memory: 11804kb
input:
100000 mqjejqtaim adynnluflo tyuqttwunn bxgpxckyuv cswqvvyviu wrguicwvnh jsdhzxysmq rixnaqziey vvrorndcjp yvvkzyvvgw tlejurlumo brzrgdwmmd modktlracv icaveptbof xpztyndoit hwnjewgpko rpxxxcawkm qjihyslolw yzaswiwijm ltwvnijrfm jbbgbjviab loxddiqwta egsiepumaq kkxrpnqacm xyetwffbqz spdzrzlduy dvbjfzu...
output:
50000
result:
ok single line: '50000'
Test #22:
score: 0
Accepted
time: 70ms
memory: 11084kb
input:
99999 bhfudjyvco wzpbznarxh lwdnazaoan kpkbwqxbfa kpusnkurzp bpaucbpkfd pcjwctjtuf sfnmwzveoi uacvxzutfd rpqsvgnrbo hnbsnwoyqo yzklbcbidg dodsdgxozf xjshbafyrk armalzfzzt mkdlexlmer fsbdccbfdl vhdgrssoci nyxnxjpono bnzqopdcir nlyztlkerf mqhvheymxt glfanewehr kmxmsdnlnf xgkvzxpcso cmojrnipzo huwgbptz...
output:
-1
result:
ok single line: '-1'
Subtask #3:
score: 29
Accepted
Test #23:
score: 29
Accepted
time: 68ms
memory: 11896kb
input:
100000 jochpzryhw kbrhxbvsgu jfejdndufv ksouutcmzy binlnitgyw wytuxoixio hiiynmdoib mvxdjnxqmg zrvfpttvaa fvaaakyglq ryxhlcfoqe aswjlllecb mkpboggifp norydruurd vcvanmomxs auokoxrbjj jgnmcqebhk bcknjfemkm qpbahdmzqn cxfqoudzfg hxiqyqihmp dqjvhwgldq tnigwwuiiz qxiukoymms efpbwtcqfs dxiwctzkux rajtwbx...
output:
54104
result:
ok single line: '54104'
Test #24:
score: 0
Accepted
time: 63ms
memory: 11844kb
input:
100000 premclilde piioajalxf gqiofojkli pwazgbqelb ndshvotfcc mfwjwqiuex esmgwdcudp ijbjphjrgd ttztszpeuf vglvajvdor upklyjvtrk gwopgcjrbw dnahfgjibx cuikobyyrz eezohlypve zwfyiqvxux pcqkoiwczt sljchvuoer inluvchetb fasxvdnezo ccfjvojkvo omrvjnahyi jjqkhrstxs cuneltywfi ormosppyay pdufkvrolr hxksepp...
output:
52599
result:
ok single line: '52599'
Test #25:
score: 0
Accepted
time: 55ms
memory: 11216kb
input:
100000 mxnfkndpka mxnfkndpka befkiimhuj befkiimhuj pstwmezoom pstwmezoom ektrbepuph ektrbepuph wkqgnvlfae wkqgnvlfae uozzkndlfz uozzkndlfz pifyegpnzp pifyegpnzp vnkjgrzlqc vnkjgrzlqc odbsgjvfvv odbsgjvfvv vwkdgusanu vwkdgusanu gqfregemgn gqfregemgn fwwdvxdvuo fwwdvxdvuo vllhjleilq vllhjleilq dqptjvo...
output:
100000
result:
ok single line: '100000'
Test #26:
score: 0
Accepted
time: 69ms
memory: 10872kb
input:
99999 iznbcngerd kadaaspukk qpnvkyowde eetlzhwurd npujpfanmv vbquidexdc ortcyyhudv bkaydlnukr ltakxwacjy wkowcnhktq hjhrfkwfue cuqeqpsixp wtalkpowrh mnajmxznik awopbocnrx zxfjmdolbw vhqyhauqmf tzvbmngoem nhsdzmvezc pwfgjqvnkc mibkekabqy vpsfyuqdlf abgtskkznm pinqlvidhy zswkzxpqkg yopwtvubcx osjasktf...
output:
-1
result:
ok single line: '-1'
Test #27:
score: 0
Accepted
time: 48ms
memory: 11772kb
input:
100000 hprqzitoag hqbsudxwul uakbdzseru zpcavkevwy nbcbljqtxx iblrjbwyyd lafsuvprov iqbcxxdazv uykmuzqmyv kryqftdxva grkygjmjom gpsakgdwfj krbnjfebkv kfuupyhbpo dezlcwtajp araohvesxr qoeqjtepfu zivtrpukqe khdgbgyexo xqmkfbkzne owjwobmgjl sysphaoaww gppksffkpr qmcflvjbar dmhwwgjixk uylftryfnm mporqnq...
output:
50001
result:
ok single line: '50001'
Test #28:
score: 0
Accepted
time: 72ms
memory: 11812kb
input:
100000 qyfanbydbw ndydcymytz eokglekpcr jwjoapgcav ezfszcaymn cyumqhilaw fkydjuindh ttuhiqzxvl oqzioduozo amziyotnhi qmxyuibikb chgmfsktua hjigpdrgvu emqzxyaeri gintgsglvi lxuydpcxkn yenwcdjddu xbdmdkdzfm opldcocwba pftqyilghg igfylvdxxt fzayuoiocg jtctiggcsp yfjlxodpwk qdpzliyzki oaarrjyzyt nirmfrc...
output:
59657
result:
ok single line: '59657'
Test #29:
score: 0
Accepted
time: 92ms
memory: 11952kb
input:
100000 dddhcldgfe fjjzdyanxu usszczwwco hjecwqrynw iciawwpecs qbrqjnzkgk hduascinvz fmiqqwzmjv dtmzeupjyd hvgyagqagf bnzvpkgzwq bhbhxyzbhs ugdilmsnit bjzzsygrpd ygkpbjembd knglscjnvj gnkuthzzfn djukcpncjn cqoecuvkov vzmsppvqyn fkmadjwdmr ibnfqfczex dugbmtpesi yrfzzhbgmn ngvslipsgs nlushtfyuj kagsfgb...
output:
59677
result:
ok single line: '59677'
Test #30:
score: 0
Accepted
time: 81ms
memory: 12220kb
input:
100000 joikcxbxcv hmevblxonf wulmwuhxxg mdtxfjffpr dykuwucesb uletkxzoxb thqtmynntc thqtmynntc jximclslvi jximclslvi dxewjvvamq dxewjvvamq ezgqzlilys nzyvnvoegf ekcbdjlqjq ekcbdjlqjq zoydfayhhx mfuecphdfg bcxfxxwhsr bcxfxxwhsr acwxadnxpd xjnflhpzup kuqxgieawc kuqxgieawc wfxcylhtcd jjrehocsmp bcotxpe...
output:
68624
result:
ok single line: '68624'
Test #31:
score: 0
Accepted
time: 72ms
memory: 12076kb
input:
100000 tqvsigxscz wyplypbzcf rkbbadvhjr fbjwwhjcqs ckdzxrqozl ntuswyfawo sonjwoaija hmtxtsnkbg qdacpjvyne wdogbuvxue esetuxzphx gftxvlodka ypvtbaflki xuradbxluu oowzqmfsvl uwsolhtsov jrwfzdegfn anyqrbcmsh jpxpovjjfs wdsjsjvpnr rprcrmgrpg btnhteswbw pmcqlfkjyp wmjjvsckrm wrpgggzamn tjbztnukpq hilfloj...
output:
74881
result:
ok single line: '74881'
Test #32:
score: 0
Accepted
time: 65ms
memory: 11776kb
input:
100000 nijixamduf ntjsxlrlfo weyiplvznc ntjsxlrlfo aoylpmltxn ntjsxlrlfo yjbsndvncc ntjsxlrlfo jrpswwjrka ntjsxlrlfo xyiedhiyzr ntjsxlrlfo nltoxmciam ntjsxlrlfo fawzagvbks ntjsxlrlfo gblsqxuflk ntjsxlrlfo skoomllycu ntjsxlrlfo dakrzcnfoc ntjsxlrlfo ezfoztgvjn ntjsxlrlfo ghctlbqxad ntjsxlrlfo xaudiha...
output:
99999
result:
ok single line: '99999'
Test #33:
score: 0
Accepted
time: 0ms
memory: 3336kb
input:
16 vpkcqkwhzt vpkcqkwhzt jpcrutlrcy qrklavwalk wqjvsdoxvz vpkcqkwhzt yaxphfdere gsikvxfuek esprdjgwaj qrklavwalk dlamkiynfr gsikvxfuek siwoapddts esprdjgwaj ekhiornbck vpkcqkwhzt jgenmjpqow vkjuopatji gsikvxfuek wqjvsdoxvz wmqrnidbnr wqjvsdoxvz hxywnpcyqv vpkcqkwhzt yzpkysvwjl gsikvxfuek vkjuopatji ...
output:
10
result:
ok single line: '10'
Test #34:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
10 wkpswjrudm zavdsirfix zavdsirfix zavdsirfix vofxpsabfy vofxpsabfy gvjzdjiplo wkpswjrudm rehkwduhrk vofxpsabfy mwjlgfllav vofxpsabfy gjxnglnxxb gvjzdjiplo wjpqekkryk gvjzdjiplo izhybiwcwx zavdsirfix gihjihvgbu zavdsirfix
output:
7
result:
ok single line: '7'
Test #35:
score: 0
Accepted
time: 2ms
memory: 5376kb
input:
10 qcdpidyahe nmzrrdeudo nmzrrdeudo nmzrrdeudo uygynrnowi zslpqsliix owwgbhslco qcdpidyahe cuvybdegvh dnpxoqgfdm gsxdxsnqwp nmzrrdeudo nuzrjpojjq zhbrznzeii dnpxoqgfdm dnpxoqgfdm zslpqsliix zslpqsliix zhbrznzeii dnpxoqgfdm
output:
5
result:
ok single line: '5'
Test #36:
score: 0
Accepted
time: 2ms
memory: 3404kb
input:
16 ynxapqsoex ynxapqsoex vnfmqirwqz ynxapqsoex veswanjrbr bqxzldlyxa frdyfzrxjp frdyfzrxjp xumvexwsrb sjthyufkvr ijqsvqawtd sjthyufkvr sjthyufkvr sjthyufkvr fwqgcshhzb xumvexwsrb dhyjbjjrdd sjthyufkvr bqxzldlyxa ijqsvqawtd pcnzbzvowb qtkxushoks gxpzenslva kxhuzncmix jbwoqiimik qtkxushoks kxhuzncmix ...
output:
10
result:
ok single line: '10'
Subtask #4:
score: 25
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Test #37:
score: 25
Accepted
time: 64ms
memory: 12912kb
input:
100000 zjwwfwzvuz cyiqdlzjhs obxlyllokv zsqsodkule yinwgpcjod qrhzfkddgn jmqdqxdrup logfuqelth rajzsntreq locumfeuxp xmfgwytgth qwqcwbrvvl fvgbyqmoyx pptmjfmebn rmkeogtaxb pcghqvvnhv cbokkwzujp xpkpwmgndn kvpzawphww xwzzknztdp wdpjvhtfnu zmhrkqbbga oytnwycrwm gmcaspkpph nhydefbnho juuttlvixi vifbjuu...
output:
51898
result:
ok single line: '51898'
Test #38:
score: 0
Accepted
time: 78ms
memory: 11856kb
input:
100000 gxpnxybmjc ibdiymbutz ebtsnlyebw fzprvdllne nvrzbtikau exeffoclwl borbybijpt kgmwugdyxe fbcsvnlyvd aryjwbvrxi wtypfrdjpf ynfxnsduig attgtijgxi drgjzqyunq vcuvkurjsr fcjsuidpkc wyoogffmge dsjlpideut ynhpargmys vqzqzvvyuv tkhvxttudc zlnpytscpd qzjwosugay ultodthdme vopmmdclvo sebqwoeofl mlenrjk...
output:
58945
result:
ok single line: '58945'
Test #39:
score: 0
Accepted
time: 65ms
memory: 11932kb
input:
100000 nduqubjoul kkkantqcgi viswmpdfoy pskilxqhqy jxteadanxc tiaowbsqcu txetaztftb oouplotlap otvinkeufn hqqwiwqcpt fpgmlbqqav uubpktnzkk wregotpohq jlhnkwpcdb swigptqzof mjkhmrxlra ttrehfunpt irxcjhifem wvjbcxziey vqbqvwlpfe svlcjtinsw wikmyuamrj jacxtyojmp npirfbylci mmfsbxyppd vairsnkzmb oiudwsp...
output:
58583
result:
ok single line: '58583'
Test #40:
score: 0
Accepted
time: 73ms
memory: 11848kb
input:
100000 xsewdibqkg anfnxamzvl iteoovmcnm ubvimxfzvb gzxbvwpvvk dcgtllzgbl jpvmqicofb ccylnbkcym lawdkabcal ixevkchzty nwzsemoitd yagvqdbllh jpbptzdpet rvpudqzrlg mazphnldmg jjdhjlorgk dskuollvrh randfoumxz olwucljezu ykkqjrvxyf pbdsysidmx waifymcyti snuvuxdkce gnpckiydpd uwmniyjvol ziudatehya gwumbnt...
output:
59681
result:
ok single line: '59681'
Test #41:
score: 0
Accepted
time: 76ms
memory: 11956kb
input:
100000 rvtslsqnpm duwpnougjj yovxuethyj lmdzhnlymq qtzmduanot hgjowlsfut vompkxavfh wtperctomn yuipfhmqea cxatxiktsg niyrbhattr eclvnpswoe kaagdyzbok illfxbajws ggejyrlbxc cysgkyualh nkvgcbjgko cyspokbrki stdouisogm ekndvgzsql nkbkjqinpe wvixdlgwih nsssikddkp qwevtsxdnv kjafdhgayn kaxxtrksjx fldgflr...
output:
59689
result:
ok single line: '59689'
Test #42:
score: 0
Accepted
time: 66ms
memory: 11808kb
input:
100000 psiqdswllm ecywqphkri hyvccfyyio erydchkuxp yisuzeyasx npycbvnono hytldokbfl seaazwjpie ckkhvhpdsk eqxmkqtdvy twoozzvptn mhmtfnnryn wnxrarwkmm cgyptroyxb axhrqfclhy arafprswen skbbslqztr fdapqlzdsp snwzwdxajj ztecgrxufe ydstlozafw yreufqzlyr loiouawfra ovgcwprpkg zrhwkddyzy wuxpxqwaho hawninu...
output:
56779
result:
ok single line: '56779'
Test #43:
score: 0
Accepted
time: 78ms
memory: 11920kb
input:
100000 yhsnbyoamm zozzjtcdps zqhnzpphgj awcigsmtxx palbnmigde vgjtbyhmxr knwyeygdlh hiqudkdtna jkkzkcgkgi foivydnobv iaiwxridaa eowyqqvdmv lgzbasswxj biskgfzmpl ougczmoftf jmglsmkvwj rekyymkyxf arfmuevbwj ufisgngmaw fvghgefbzp kwdilfljae xgerfdxisy swogqowpyk xzweujbnpt awbpmmhuwv rvhocunlho usjkyjg...
output:
56653
result:
ok single line: '56653'
Test #44:
score: 0
Accepted
time: 82ms
memory: 11848kb
input:
100000 magmzfjxyc jcggriyejg oqkbtkhcya cmqbokqzry uhilikoswh gaocmbpkac wskqyphwpw vylfoxgrur skbyyhotpa dmryqxrzvc ucdjnvpkeh binfsnrzaa cxrgwieoim tbwjxirhra jabpknqdak dzemukvteq bmajtjtkut rchzvjbveu cbapllfjnc udcamknujg unklqbgolc hawoqphcfx srwxovmsxb ynaespoaqo wiupmkjedg filaasyjiw mnijvco...
output:
56631
result:
ok single line: '56631'
Test #45:
score: 0
Accepted
time: 97ms
memory: 11840kb
input:
100000 fhqikazvkg gwdfznbwwh wvpqlcarhg qwqiwqszvq sgbwfprcnx nmumeeriow aqbgljtzfv yhumglncje rbtmiusqgu tejwyubtnw qyyovmrbwu fxnzcezijc lbujouihvr hplnevhkzf blpupiphze hmhfsomfam quzmjymtuf ttmivgupsm nqgguzebcc ewxdzlsmof tayssitngp cljbtfnfux aknhcgnrot vtbeoteago yxtmxqdxks ffsrzjlibp ofdkxod...
output:
56721
result:
ok single line: '56721'
Test #46:
score: 0
Accepted
time: 97ms
memory: 13304kb
input:
100000 mskxoxuzcw ugdvsvxgom hjsfmamauc ohbzvixfsc faqssowcht fjcqhsyftd irsptbavry fcyskhnezx dtlywqnold ixdvalbxrx zrcenthhpf lkxzogjenm nykalepwbg dcembzwjqh hofizjkxed ntrfdyfoke mfzbhjfgfd rfqugoaplz ppospabmwu iydzqzveqv gfkcpglljb ljystkkehq gpwkjjngil vtrkmorqfr adibtbpfmc byckjqeepq ximvjzm...
output:
56733
result:
ok single line: '56733'
Test #47:
score: 0
Accepted
time: 82ms
memory: 13188kb
input:
100000 vcuospoqnz fiixczhyfv gtysycwaap cqkkpvesup youbzdkpde yzbzfhmpnn yvfxssckzm ehdyitboug msynxzcsyb rwcceqkmqe prvutvouxu jlthasqvyt txujrchxch uffifaoych fywppfovqq mhkkzdtooz phopuoesgm ifojzraiqr gehuuzxrpt dmkqoczvab mqftjhftgq alsnwsrrbj veswzckdfn ftkupgpnxa grwxnxtttz cskhwvitlw yrhbqse...
output:
74864
result:
ok single line: '74864'
Test #48:
score: 0
Accepted
time: 89ms
memory: 11956kb
input:
100000 jochpzryhw kbrhxbvsgu jfejdndufv ksouutcmzy binlnitgyw wytuxoixio hiiynmdoib mvxdjnxqmg zrvfpttvaa fvaaakyglq ryxhlcfoqe aswjlllecb mkpboggifp norydruurd vcvanmomxs auokoxrbjj jgnmcqebhk bcknjfemkm qpbahdmzqn cxfqoudzfg hxiqyqihmp dqjvhwgldq tnigwwuiiz qxiukoymms efpbwtcqfs dxiwctzkux rajtwbx...
output:
54104
result:
ok single line: '54104'
Test #49:
score: 0
Accepted
time: 90ms
memory: 12972kb
input:
100000 premclilde piioajalxf gqiofojkli pwazgbqelb ndshvotfcc mfwjwqiuex esmgwdcudp ijbjphjrgd ttztszpeuf vglvajvdor upklyjvtrk gwopgcjrbw dnahfgjibx cuikobyyrz eezohlypve zwfyiqvxux pcqkoiwczt sljchvuoer inluvchetb fasxvdnezo ccfjvojkvo omrvjnahyi jjqkhrstxs cuneltywfi ormosppyay pdufkvrolr hxksepp...
output:
52599
result:
ok single line: '52599'
Test #50:
score: 0
Accepted
time: 52ms
memory: 11256kb
input:
100000 mxnfkndpka mxnfkndpka befkiimhuj befkiimhuj pstwmezoom pstwmezoom ektrbepuph ektrbepuph wkqgnvlfae wkqgnvlfae uozzkndlfz uozzkndlfz pifyegpnzp pifyegpnzp vnkjgrzlqc vnkjgrzlqc odbsgjvfvv odbsgjvfvv vwkdgusanu vwkdgusanu gqfregemgn gqfregemgn fwwdvxdvuo fwwdvxdvuo vllhjleilq vllhjleilq dqptjvo...
output:
100000
result:
ok single line: '100000'
Test #51:
score: 0
Accepted
time: 58ms
memory: 10952kb
input:
99999 iznbcngerd kadaaspukk qpnvkyowde eetlzhwurd npujpfanmv vbquidexdc ortcyyhudv bkaydlnukr ltakxwacjy wkowcnhktq hjhrfkwfue cuqeqpsixp wtalkpowrh mnajmxznik awopbocnrx zxfjmdolbw vhqyhauqmf tzvbmngoem nhsdzmvezc pwfgjqvnkc mibkekabqy vpsfyuqdlf abgtskkznm pinqlvidhy zswkzxpqkg yopwtvubcx osjasktf...
output:
-1
result:
ok single line: '-1'
Test #52:
score: 0
Accepted
time: 73ms
memory: 11808kb
input:
100000 hprqzitoag hqbsudxwul uakbdzseru zpcavkevwy nbcbljqtxx iblrjbwyyd lafsuvprov iqbcxxdazv uykmuzqmyv kryqftdxva grkygjmjom gpsakgdwfj krbnjfebkv kfuupyhbpo dezlcwtajp araohvesxr qoeqjtepfu zivtrpukqe khdgbgyexo xqmkfbkzne owjwobmgjl sysphaoaww gppksffkpr qmcflvjbar dmhwwgjixk uylftryfnm mporqnq...
output:
50001
result:
ok single line: '50001'
Test #53:
score: 0
Accepted
time: 61ms
memory: 11808kb
input:
100000 qyfanbydbw ndydcymytz eokglekpcr jwjoapgcav ezfszcaymn cyumqhilaw fkydjuindh ttuhiqzxvl oqzioduozo amziyotnhi qmxyuibikb chgmfsktua hjigpdrgvu emqzxyaeri gintgsglvi lxuydpcxkn yenwcdjddu xbdmdkdzfm opldcocwba pftqyilghg igfylvdxxt fzayuoiocg jtctiggcsp yfjlxodpwk qdpzliyzki oaarrjyzyt nirmfrc...
output:
59657
result:
ok single line: '59657'
Test #54:
score: 0
Accepted
time: 75ms
memory: 11884kb
input:
100000 dddhcldgfe fjjzdyanxu usszczwwco hjecwqrynw iciawwpecs qbrqjnzkgk hduascinvz fmiqqwzmjv dtmzeupjyd hvgyagqagf bnzvpkgzwq bhbhxyzbhs ugdilmsnit bjzzsygrpd ygkpbjembd knglscjnvj gnkuthzzfn djukcpncjn cqoecuvkov vzmsppvqyn fkmadjwdmr ibnfqfczex dugbmtpesi yrfzzhbgmn ngvslipsgs nlushtfyuj kagsfgb...
output:
59677
result:
ok single line: '59677'
Test #55:
score: 0
Accepted
time: 84ms
memory: 12280kb
input:
100000 joikcxbxcv hmevblxonf wulmwuhxxg mdtxfjffpr dykuwucesb uletkxzoxb thqtmynntc thqtmynntc jximclslvi jximclslvi dxewjvvamq dxewjvvamq ezgqzlilys nzyvnvoegf ekcbdjlqjq ekcbdjlqjq zoydfayhhx mfuecphdfg bcxfxxwhsr bcxfxxwhsr acwxadnxpd xjnflhpzup kuqxgieawc kuqxgieawc wfxcylhtcd jjrehocsmp bcotxpe...
output:
68624
result:
ok single line: '68624'
Test #56:
score: 0
Accepted
time: 58ms
memory: 12240kb
input:
100000 tqvsigxscz wyplypbzcf rkbbadvhjr fbjwwhjcqs ckdzxrqozl ntuswyfawo sonjwoaija hmtxtsnkbg qdacpjvyne wdogbuvxue esetuxzphx gftxvlodka ypvtbaflki xuradbxluu oowzqmfsvl uwsolhtsov jrwfzdegfn anyqrbcmsh jpxpovjjfs wdsjsjvpnr rprcrmgrpg btnhteswbw pmcqlfkjyp wmjjvsckrm wrpgggzamn tjbztnukpq hilfloj...
output:
74881
result:
ok single line: '74881'
Test #57:
score: 0
Accepted
time: 69ms
memory: 13172kb
input:
100000 nijixamduf ntjsxlrlfo weyiplvznc ntjsxlrlfo aoylpmltxn ntjsxlrlfo yjbsndvncc ntjsxlrlfo jrpswwjrka ntjsxlrlfo xyiedhiyzr ntjsxlrlfo nltoxmciam ntjsxlrlfo fawzagvbks ntjsxlrlfo gblsqxuflk ntjsxlrlfo skoomllycu ntjsxlrlfo dakrzcnfoc ntjsxlrlfo ezfoztgvjn ntjsxlrlfo ghctlbqxad ntjsxlrlfo xaudiha...
output:
99999
result:
ok single line: '99999'
Test #58:
score: 0
Accepted
time: 2ms
memory: 3404kb
input:
16 vpkcqkwhzt vpkcqkwhzt jpcrutlrcy qrklavwalk wqjvsdoxvz vpkcqkwhzt yaxphfdere gsikvxfuek esprdjgwaj qrklavwalk dlamkiynfr gsikvxfuek siwoapddts esprdjgwaj ekhiornbck vpkcqkwhzt jgenmjpqow vkjuopatji gsikvxfuek wqjvsdoxvz wmqrnidbnr wqjvsdoxvz hxywnpcyqv vpkcqkwhzt yzpkysvwjl gsikvxfuek vkjuopatji ...
output:
10
result:
ok single line: '10'
Test #59:
score: 0
Accepted
time: 2ms
memory: 3340kb
input:
10 wkpswjrudm zavdsirfix zavdsirfix zavdsirfix vofxpsabfy vofxpsabfy gvjzdjiplo wkpswjrudm rehkwduhrk vofxpsabfy mwjlgfllav vofxpsabfy gjxnglnxxb gvjzdjiplo wjpqekkryk gvjzdjiplo izhybiwcwx zavdsirfix gihjihvgbu zavdsirfix
output:
7
result:
ok single line: '7'
Test #60:
score: 0
Accepted
time: 2ms
memory: 3336kb
input:
10 qcdpidyahe nmzrrdeudo nmzrrdeudo nmzrrdeudo uygynrnowi zslpqsliix owwgbhslco qcdpidyahe cuvybdegvh dnpxoqgfdm gsxdxsnqwp nmzrrdeudo nuzrjpojjq zhbrznzeii dnpxoqgfdm dnpxoqgfdm zslpqsliix zslpqsliix zhbrznzeii dnpxoqgfdm
output:
5
result:
ok single line: '5'
Test #61:
score: 0
Accepted
time: 2ms
memory: 3476kb
input:
16 ynxapqsoex ynxapqsoex vnfmqirwqz ynxapqsoex veswanjrbr bqxzldlyxa frdyfzrxjp frdyfzrxjp xumvexwsrb sjthyufkvr ijqsvqawtd sjthyufkvr sjthyufkvr sjthyufkvr fwqgcshhzb xumvexwsrb dhyjbjjrdd sjthyufkvr bqxzldlyxa ijqsvqawtd pcnzbzvowb qtkxushoks gxpzenslva kxhuzncmix jbwoqiimik qtkxushoks kxhuzncmix ...
output:
10
result:
ok single line: '10'
Test #62:
score: 0
Accepted
time: 2ms
memory: 3380kb
input:
2 brtmorckba brtmorckba hzfqflfczp hzfqflfczp
output:
2
result:
ok single line: '2'
Test #63:
score: 0
Accepted
time: 1ms
memory: 3400kb
input:
4 vjaqtftnon adllamfood wyqcsliens ixdxpbqywl adllamfood vjaqtftnon ixdxpbqywl wyqcsliens
output:
0
result:
ok single line: '0'
Test #64:
score: 0
Accepted
time: 2ms
memory: 3388kb
input:
6 ktfvywpjup ktfvywpjup tougwqukic tougwqukic bcriexqiup bbntpotayn asqqdrhaut bcriexqiup nodottwuwp asqqdrhaut bbntpotayn nodottwuwp
output:
4
result:
ok single line: '4'
Test #65:
score: 0
Accepted
time: 62ms
memory: 11808kb
input:
100000 kgzbaurhcw ieqkdzugxd zdxapkdjyr ciryujuxea zyaqfekliw zxiihylife ygtokuvvau ycfwnpmekw sfiqaijtop otnyitiyeg edpgyvetub jskgenvrvm bmsnfmpsci pzvvrlinut ykvxjvaqwr wqpshqhljz uyfsibjfbd nkmfuwojqj wrvqkoivgn wqrdimjzhb bgdofpjpiz zoohnreboe vmvfvetmsa kpedhehqpa rmwlrafvcx vsmqfjmfih znyyynz...
output:
50003
result:
ok single line: '50003'
Test #66:
score: 0
Accepted
time: 61ms
memory: 11844kb
input:
100000 sljvuoslhg bhyqlublzg cfxxvgnnoq ayxbfufakl myseqyebki eypbrtpjko mndnwojhmk usimdabrad vcmqcjborp igeuuswqxh agylwajluy pcgksmeyjx nvadtztpyb fhpvnvwqdt fzvxrbvsjv utdlcrpzoi qhrhumrufu dfqtvqlyvv hyxzofkkwx fxbpvicgiz breijvspxw jrjxiwgjgp foqtsvcadg zammkqmvly yrotnpxxrc qzndpgizth mdntxfn...
output:
53306
result:
ok single line: '53306'
Test #67:
score: 0
Accepted
time: 65ms
memory: 11812kb
input:
100000 mqjejqtaim adynnluflo tyuqttwunn bxgpxckyuv cswqvvyviu wrguicwvnh jsdhzxysmq rixnaqziey vvrorndcjp yvvkzyvvgw tlejurlumo brzrgdwmmd modktlracv icaveptbof xpztyndoit hwnjewgpko rpxxxcawkm qjihyslolw yzaswiwijm ltwvnijrfm jbbgbjviab loxddiqwta egsiepumaq kkxrpnqacm xyetwffbqz spdzrzlduy dvbjfzu...
output:
50000
result:
ok single line: '50000'
Test #68:
score: 0
Accepted
time: 56ms
memory: 11044kb
input:
99999 bhfudjyvco wzpbznarxh lwdnazaoan kpkbwqxbfa kpusnkurzp bpaucbpkfd pcjwctjtuf sfnmwzveoi uacvxzutfd rpqsvgnrbo hnbsnwoyqo yzklbcbidg dodsdgxozf xjshbafyrk armalzfzzt mkdlexlmer fsbdccbfdl vhdgrssoci nyxnxjpono bnzqopdcir nlyztlkerf mqhvheymxt glfanewehr kmxmsdnlnf xgkvzxpcso cmojrnipzo huwgbptz...
output:
-1
result:
ok single line: '-1'
Test #69:
score: 0
Accepted
time: 2ms
memory: 3336kb
input:
20 dqwdlhkyrs faettwvbvz ymvulechrl mpccwwrdsn kngwmfcpnu hsyztxtomt nuobkdfeny pnowootaqk faettwvbvz ymvulechrl jnblidnvao dnumkgrmtu tigdjzmvir kngwmfcpnu aywoujmlqx jnblidnvao mpccwwrdsn rpbozfibsk hcoxgkfnyr hyowdbkmcl rpbozfibsk higpdaadwg aeffzovrro dqwdlhkyrs pnowootaqk ivjjxerjey ivjjxerjey ...
output:
10
result:
ok single line: '10'
Test #70:
score: 0
Accepted
time: 2ms
memory: 3412kb
input:
20 lkpdvwptvy ufhthvpwfv njtjekeuzq ufhthvpwfv uzcqlejjhe ufhthvpwfv alkvwkyozo ufhthvpwfv idskcraual ufhthvpwfv ufanloyufd ufhthvpwfv lmdckmnikz ufhthvpwfv sxbofkbpwr ufhthvpwfv guqjtqfyiu ufhthvpwfv ufhthvpwfv ufhthvpwfv kuxbofdejn ufhthvpwfv alaieqoxak ufhthvpwfv fpnxqqmsmb ufhthvpwfv brytwldbky ...
output:
19
result:
ok single line: '19'
Test #71:
score: 0
Accepted
time: 1ms
memory: 3396kb
input:
20 cfzghtgvwi mcgvlvpirf zikccjhyeq mbhwyyjoig rwkgbyeopd rwkgbyeopd xymjfobsks ewedmybdao wlypoxygbc lunczvcsgn qtcpvvyifz rwkgbyeopd mkmrwpxbui mcgvlvpirf yodrngluha mbhwyyjoig ycutyefhss ewedmybdao sxrjidmpov lunczvcsgn whjpbfvsob mcgvlvpirf mbhwyyjoig mcgvlvpirf nqvzxoyfpb lunczvcsgn agtzatwsbh ...
output:
13
result:
ok single line: '13'
Test #72:
score: 0
Accepted
time: 2ms
memory: 3320kb
input:
8 a b b e c d d f e f f g g e h g
output:
4
result:
ok single line: '4'
Test #73:
score: 0
Accepted
time: 0ms
memory: 5420kb
input:
3 hubnqtzhnw jmapdnlkdv qglhpsqelr qglhpsqelr jmapdnlkdv jmapdnlkdv
output:
-1
result:
ok single line: '-1'
Test #74:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
19 pllxxxmnbe nwwrdgwlvh qslzpcdjww tftiyxvxjn qeydderrzy berhhiiqlo bvolonbkpw bvolonbkpw hxpbbsnmwr lxtggsbnuf cmvbxleszb qbrqqdkqkz nwwrdgwlvh cwnbruzhax tftiyxvxjn hlhosdbmdd sghlsgiwga berhhiiqlo dzsppvowea hlhosdbmdd pkrvxfltnn cmvbxleszb zjlbcruime hdopyvlmbg cwnbruzhax nbcsvtwgvm lxtggsbnuf ...
output:
-1
result:
ok single line: '-1'
Test #75:
score: 0
Accepted
time: 2ms
memory: 3396kb
input:
20 lcqmlusoah wiapmtaurm bvshuopxjt dzbrtfsjgi pxiiyismts lighiwmljy pmvtlbewde roschmpleh roschmpleh pzpsernups ybjautlevz lcqmlusoah tqtarousoa owfrrpndfc jsswdpehrj yrbtnwulvh mltlfonioo jsswdpehrj yrbtnwulvh pxiiyismts owfrrpndfc bvshuopxjt pzpsernups tqtarousoa fvuqezaxtv kmgccgeoit kmgccgeoit ...
output:
11
result:
ok single line: '11'
Test #76:
score: 0
Accepted
time: 2ms
memory: 3340kb
input:
20 lnpvtpzscy mxwegxrfgv anopovmnvm lhmfhltnjo qtggvnholq hhmjwetrpr vxnildyfwj uyiqcoiybg uyiqcoiybg mxwegxrfgv ebddqsmcdf lmokqrytah qiiqmzsgep lmokqrytah ipdtiwqnar bxxzssqyjb bxxzssqyjb gzuclwmvhj dqcfmbtefg ipdtiwqnar lmokqrytah qtggvnholq mxwegxrfgv bxxzssqyjb gzuclwmvhj anopovmnvm bawbdsvbkc ...
output:
10
result:
ok single line: '10'
Test #77:
score: 0
Accepted
time: 1ms
memory: 3380kb
input:
20 vzgjnahnrb airdbimowh lqgvqeztry lqgvqeztry cjdospoydp lciwtzagdq yhzlndfyis njxkjyfphx ohnlkgterz xzjbasgqtl gzjrybmnhb poftukpnmw ukevntrvis poftukpnmw poftukpnmw qddflwhtgj ovtdbwdvkk lciwtzagdq airdbimowh airdbimowh cuyiikzhsf ukevntrvis lciwtzagdq ohnlkgterz iqigqzijls njxkjyfphx edimjlzcxa ...
output:
13
result:
ok single line: '13'
Test #78:
score: 0
Accepted
time: 2ms
memory: 3356kb
input:
20 ruqqjctwgx cygivsvjyi vgbqunysnr uhzcstjigb daonexvxgg fyizaahxaj tkavoqkfaa wyerntpfws cnwzrzrtrc pjoyblmsyu cemknpgbzg vgbqunysnr ugscwrjhtv jwfxassnyf pjoyblmsyu cnwzrzrtrc jrxvaymwof uhzcstjigb wyerntpfws asymfkaxuv uhzcstjigb vgbqunysnr fyizaahxaj daonexvxgg ntlhzfgnje pjoyblmsyu asymfkaxuv ...
output:
9
result:
ok single line: '9'
Test #79:
score: 0
Accepted
time: 2ms
memory: 3380kb
input:
20 txrsnrfnej ozvyqdlsxr ozvyqdlsxr pgczrkfrhs stetuxftlz ricyqcrdxt ztotjewhxv ztotjewhxv cxzrkgiiao pgczrkfrhs yqtefevbjv adnmtdwmsa hubboovuyz pzoawklfzy smygfhmssb cqpeikqpuk ricyqcrdxt zbrfyeiwkl pgczrkfrhs cxzrkgiiao adnmtdwmsa yqtefevbjv hxizrrnjox zbrfyeiwkl fcyvecwnoo hahfvwqhud cqpeikqpuk ...
output:
10
result:
ok single line: '10'
Test #80:
score: 0
Accepted
time: 2ms
memory: 3392kb
input:
2 pswcjxutfi pswcjxutfi umklwegufd pswcjxutfi
output:
1
result:
ok single line: '1'
Test #81:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
4 smufwsdwpn smufwsdwpn iuisrxwhos jpmsdsgovu jpmsdsgovu jpmsdsgovu nrexwhmxxc smufwsdwpn
output:
2
result:
ok single line: '2'
Test #82:
score: 0
Accepted
time: 1ms
memory: 3396kb
input:
6 dlmpavfvxu spmlnvutug dcbggabqfa dcbggabqfa fykntcdyiy spmlnvutug spmlnvutug gyuheqghid cpwkmezokm dcbggabqfa gyuheqghid dcbggabqfa
output:
4
result:
ok single line: '4'
Test #83:
score: 0
Accepted
time: 3ms
memory: 5396kb
input:
8 sznluxwysm lxvoxtkvhz mlybufvdsk lbpegbxnxo pfvqwndfxx ocysvimbad lbpegbxnxo sznluxwysm lxvoxtkvhz sznluxwysm ocysvimbad lxvoxtkvhz qltjhcpxjm ocysvimbad vdyhyqypxv sznluxwysm
output:
4
result:
ok single line: '4'