QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#810291#3591. KIARA is a Recursive AcronymSGColinAC ✓20ms36572kbC++20516b2024-12-11 20:55:082024-12-11 20:55:09

Judging History

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

  • [2024-12-11 20:55:09]
  • 评测
  • 测评结果:AC
  • 用时:20ms
  • 内存:36572kb
  • [2024-12-11 20:55:08]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

bool vis[26];

string str;

vector<string> s;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(0);
    int n; cin >> n;
    for (int i = 1; i <= n; ++i) {
        cin >> str; s.push_back(str);
        vis[str[0] - 'A'] = true;
    }
    for (auto a : s) {
        bool fl = true;
        for (auto c : a) 
            if (!vis[c - 'A']) {fl = false; break;}
        if (fl) {puts("Y"); return 0;}
    }
    puts("N");
    return 0;
}

詳細信息

Test #1:

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

input:

3
OF
BOB
BEWARE

output:

Y

result:

ok single line: 'Y'

Test #2:

score: 0
Accepted
time: 10ms
memory: 13144kb

input:

140732
IHXL
QGW
CG
ZE
RJHM
NZTQ
NLMNA
DNUMJ
MA
NJJ
ZZC
YD
KQOPL
AUIGU
JNPFO
ALCN
IM
CUKW
GPXDO
MQI
OOO
FZ
TL
PHCO
FGAV
SQUL
OU
TWGEZ
OBPPM
ZF
CI
QTU
ROQT
BN
XR
ZD
YBFNT
EV
WO
IK
LYXV
AB
JND
EUQ
SLK
LBFDM
EZ
IPI
IGRK
RKVO
CCTG
PUXKG
CUUJC
YENLW
HGDZ
EJ
PGFY
RMHA
MBLY
UN
CH
TFKS
WPR
FBFMF
ZR
EIO
RJ
XK...

output:

Y

result:

ok single line: 'Y'

Test #3:

score: 0
Accepted
time: 4ms
memory: 9000kb

input:

111499
WSKV
PXINZCYD
FGIUAP
VXVJEA
TVO
IKZV
TJYJXPW
RPJFA
ZCAXMZNY
REXG
UEHDB
KYJITQZ
ORKSXLO
DSETAR
QKVBSXR
LPVZA
PSKF
KMJNAXL
VXD
BJUG
BWK
RGH
NAP
ZADM
QRWGYGWY
AOOMB
SKL
FOIJ
EAEWI
PSCUFYDR
BCDFY
YUUCDNO
XFAEH
KMQNLWIX
KTID
HFGNQ
DLW
URCV
RJIAGQ
JQIQTXB
TRAI
YMLTSWE
MXYU
MJD
JJTIFG
FDVFHT
XWPXRWP...

output:

Y

result:

ok single line: 'Y'

Test #4:

score: 0
Accepted
time: 3ms
memory: 8956kb

input:

93734
RBPIJ
DVVYD
FESDIXWSDB
XPFBF
OZYARZO
WJJMKW
KVOOYQN
SZBEPLOFLE
TFQTT
GMYQNZWCF
NEWIKUTIQ
WVIMICXNNM
CEDJ
GGZNZ
ORJKQYOP
OEHIT
FZXA
JSLOL
ZVRVVC
SNTN
WXHD
YLBJWDAFNA
FKSF
AQPPB
DVXHDQR
VLRNZWABNA
BUKY
VAOX
UUKWDNFQOJ
XVFNULJMF
DSCDXETE
ZXSFITFBN
JCNQXIBJD
GHBFZTZTS
TNGQOCIF
HCDKRW
RPKEMHBS
NVZI...

output:

Y

result:

ok single line: 'Y'

Test #5:

score: 0
Accepted
time: 3ms
memory: 6436kb

input:

1
JWQNRENQRJFEIOBYHSFSAEWDEXZCNQAVKCHKOJXLHITBGMNVGNWDKUSDEZFPZAFTHMMRZBOALXXOVBIEYTVXUGUHTUHZCCAPOCEOCLQWGVZTMIFVDTAYJCBRRICLVFACXMXJMZOTHGZKBLUNXMMNMPDINXOURANSMGYHVBHYUISISKEHCIVKBKYFRDFMDDWLTUDAUQTEYGJJNJGFLCRCPURIOOGLWEINTREXHVXRDBYOVMREUOTZLYATOIZWDIRKMMEVGPTOJZENDHRDBWKFDSBVJDQWFXGLIMSBAMXKGD...

output:

N

result:

ok single line: 'N'

Test #6:

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

input:

4
IBPBZRJXZBWJLESRQGROWTIFJSZTCCAFRZQQSTZEDOYHPJCMOUWDYFGTDRDHCUFINLBYPKLEYXSKTHFWAYQFSXBZMVTLYXSJZZWBCFAXNUKCPGTEWKENKQVVSZUJRIFMMONBVXCQYAANUOKYHQGIUHMWLEIFBZCVIZDKHXNPAHWCRTNSRZCTNLSVLLZLFPMCMCRBEJZFXUACKEEDNABRGZLATWZHOGYJRVDFLSSVCQTOQPRWYDMWUMZYTLUZXBNVWDGMWLVRLWZVOIQMANDNUXLJBJXRPKNSXPWLYBOAML...

output:

N

result:

ok single line: 'N'

Test #7:

score: 0
Accepted
time: 1ms
memory: 3908kb

input:

4
KATKNHNORDYBIQKJQVSAVEWSRNWNIYTHLRIGMAWCFDKIEZLVQJROXLSOTQKJDZWSFQHDJPSNAEVJZIODRYCLNKWUAZQFHQVGLOKHLBIZNUGPENJNBNTDBQPEYEPODDKKILXHNICOCTXTYCGLYSEUWLXSMLLGSGBDJPUMYDSMCYCQJNHMGVJCBBFWBVHGREKZTGANAZBXMDPWTMESLKFOCRCDCAENPEDQHAQTYWIMKBATXURSHVRYYFUUJLAOECTVOQBIDJEQZVCSFGYXTTTIHJSIARVGKUUXHJYPQPFFYF...

output:

N

result:

ok single line: 'N'

Test #8:

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

input:

7
ISALXIKEJLALAJQRIPLCLHVLSBEWOOZRXAVKXEHWLRLAKMAGCWGIKNHTEOLNCMIAFUKDTFCXILDMNUCQLEJPGFQTXIEADBRSPYQJVHJFROFFWXKHTSFKGYZMNHMUIMYQMHBWRAHEMSRNCWHQBQGUPKORJROWTXVJSEWZZZNABKSULJMSCSHWHTMQCXQZZVITSRQLJOEPBAZIYXEVVGVHXWTMCYBNGMSEWIVNJIZMBMJFZZLXSNNFQLHELZOVZPAHWSHSFAEBHCUAEHDAAOFLTSTGXIXHIGGRMXMXRPNFJH...

output:

N

result:

ok single line: 'N'

Test #9:

score: 0
Accepted
time: 3ms
memory: 6284kb

input:

1
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

Y

result:

ok single line: 'Y'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

3
RRCRRCCCCRRRRRRRCCCCRRCCRRRCCCRCRRCRRCCRRRRCCRRCRRRCCRRCCCCRCRRRRRCCRRCRCCCRCRRCCRCCCCCRRCRRCRCRCRCRRCCCRCRRCCRCCRCCRRRCRCCRCCCCCRRCRRCCCCCCRCCRCCCCRCRCRCCCCRCCCRRRRCRCRRRCCRRRCRCCCCRCRCCRRRRCRCRRRRCCRRCRCCCRRCRRRCCRCRRCRCRCCCRCCCRRRRCCRCRCCCCCRCRCRRCCRRRCCRCRRCCRCCRRRRCCCRRRCCRRRCRCRCRCCCCRRRRCRC...

output:

Y

result:

ok single line: 'Y'

Test #11:

score: 0
Accepted
time: 1ms
memory: 4304kb

input:

7
ONYNNYOONNYYONOYNONNYYYNNNNOYYOOOYONOYYYNOOYNYYNYNYNYYNYOOYONYNYNOYYNNYNYYNOYYNYNOYYYYYYYNNYOOOOONOONOYYNOYOYYYOYNYOYYYONOYOONYOYOOYOYNYNYOYYYYOOOOOYNNNNYYYOYOOYNNNYYYYNNOOOOONYNNYYONOYYYYNNYOYYNYOOYNNNNNOYYYOYONNOYOOYONNOOOOYYYNOOYOOOOONOYOOONOOYNONONOYYYNOYYONYNYYOYYYNNNOOOYOONNNOYNYNYNOOOOYNNYO...

output:

Y

result:

ok single line: 'Y'

Test #12:

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

input:

3
WHO
MADE
WHO

output:

N

result:

ok single line: 'N'

Test #13:

score: 0
Accepted
time: 1ms
memory: 4256kb

input:

8
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM...

output:

Y

result:

ok single line: 'Y'

Test #14:

score: 0
Accepted
time: 3ms
memory: 6380kb

input:

1
NOAOARRNOCORNNNAROANRRARANRRANNORRCNROANNCNCOCRANCNNRROONAAONNNNNCCANAORORRRNNANRNACNRNRNANCRRRRCNCACRRRCACNANONANRROCNROCAACCORNNRCNNNRAACCARRCANCRAAOCACCCOACNNOONNNOAOCOCRNCCONRRNAARNRANAACAOCAOAONCAAAOCRONOORACCONCROAOCNRNOARNAONRNOOOCARNACCNRCRCONANOACRAORANNRRORANCAACOANCRAANOARORAAROCNNAARCO...

output:

N

result:

ok single line: 'N'

Test #15:

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

input:

4
RAAAROCRCAOCOAOCOCOROAOAARRAOAARAOOAOOOROROACRACCCOAAOCOORCAOAORACRCRRRAAORCOORCORACAAOAOAAARARCCOOCRRAORCOOCRRCORORCOCOOCAOCCCCOARCAROCCRRORORRCAROOCOARRRCAOOOCACOOOAAAACRAOAACARACCOCAOOROACCCOOAOARRCOOARAOCRRCOOCCCORCARCACOOCRCRRRRCRACOOOCAARCROARCACAOROROCOOACAOCROCRRCCOOAOARCRRACOAOOAORCAARCAO...

output:

N

result:

ok single line: 'N'

Test #16:

score: 0
Accepted
time: 1ms
memory: 3920kb

input:

4
ACCRCAACCRRARARAACACRACAARRRRCAACARACRCARCACARRRRCARCCACCAACCAACCACCCRACCARCRCRCRCARRCACCACARCCRCACARRRACCAACCCCARCCCACACRRRCRARCACARCRCCCRARCRCARRAARRRCCACRRAARAARRAAAACRCCCRCAARAACRARRACACARARCCRACCARCCAACRRRARACARARARRAACACACAACACACACRRARARCCRCCRCCCRCARCARARCARARCCCRCARACCCCCAARACRRRRRACCCACRRR...

output:

N

result:

ok single line: 'N'

Test #17:

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

input:

8
CACACCCAACAACCCACAACAAACCAACCACACCACCCCCACACCCAAAAAACCCAACAAAAAAAAAAACCACCAAAAACCAAACCAAACCCCAACCACCCCACCAACACAAAACCCACCACCAACACACACCACCCCCCAACACCAAACCAACCCCCCACAACAACCAACCAAACCCCACAACAAAAACCCAACACACACACACCCACAACCCCCACCCACACAAAAAAAAAACCCACCACCCCACAAACACCCACACCACACAACCCAAAAACCAAACAACACACCCAAACACACC...

output:

N

result:

ok single line: 'N'

Test #18:

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

input:

1
ROOACNOCNCCCNAOARORACCAROCRCONACRNCNAANCRACONCONNRRCAOCRCOORROCAOONOANRNOOCCCACORACNNNNNCRRRCNCNROONOCACRNNNACOOROOAAANNRACCONNNORRAARCANANNOONNONRONRNNRCNNCRCARRACOOOOARRRNRONRAAORORAAOROAOCARRNCNOONAAARNNROONRRCCCNNACARAROAROCRAANORRARRRARAANAAAANAONOCOAAARORANCCRCCCNCARRNANRCNARCRAOARCRRONCOOAO...

output:

N

result:

ok single line: 'N'

Test #19:

score: 0
Accepted
time: 1ms
memory: 3924kb

input:

3
CRCOCACARAROOCOAOARCROARRRAAAOOCCROOAARCCAROCCRCOROARCRAAROOOARCOOOOCCCOOCCROOCROORRARCRORRORRROROAOCCCAAACCRCAAOAOCRORRRAACCOROCAORROAAACAORRRCCORCRCCRROOROORACARCRRCARRRRACRARARAOCCOROARACROOACOOOCRRROAOAOACORAARCCAOCAAACACCRCRAACRCCACAOACRRROOAARCOCOOAOCCAROOCORCCAAAORCCORCRROORROCCCOCROAORAORA...

output:

N

result:

ok single line: 'N'

Test #20:

score: 0
Accepted
time: 1ms
memory: 4144kb

input:

6
CAACARCCCAAARCARRCCCAACARARRARCRCCRCCRRRCCCARCAAACAAACARARCCAARRAACAACAACRCRACCAAAARRRCRACARCARCCRCAARARAACAAACCRCCRCCCCACCCAACRRAACCRRRARACCRRCAARRCACACCCCAARARRARRCARCRAACARCAAACRCAARARARCAAACRCRCCAARCCRARRCRACCRARRCAAACACAARCRACAAACRARRCRAACRAARARRARCCRAAAACCRRAAAARCRCRRAAACRARARCAACRAAACRAACAR...

output:

N

result:

ok single line: 'N'

Test #21:

score: 0
Accepted
time: 1ms
memory: 4252kb

input:

7
CAAAAACCCACCAAAAACCACCAAAAAACAAACACCACCCCCAACCAAAAAACCCCCAACCACCACAAAACAAACACCACAAACCAAACACCAAAAACCCAAACAACACCCACACACACCCAAACAACCAACACCCACACAACCCCCAACAAACCAAACCCCACAACCCCCCCAAAAAAAAACCCACCCCCCACCCCCAAAACACAACCCAAAAAACAACCAACACCCACACCCACCCCAACCCACCAAACCCCAACACCAAACCACAAAACCCACCACCAAAACAAAAACACACCCC...

output:

N

result:

ok single line: 'N'

Test #22:

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

input:

5
JUST
USE
WORD
XX
TWICE

output:

Y

result:

ok single line: 'Y'

Test #23:

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

input:

1
YYYYYYYYYYY

output:

Y

result:

ok single line: 'Y'

Test #24:

score: 0
Accepted
time: 1ms
memory: 3848kb

input:

428
ISUGFAAVRNKGUTZQDBORUMOQUZIBQJKWUAUZVLIVZKTJBMHNEEOJOKYHUOIBVSCDBTOCZJWWDDHWMJBDBIESRDWGLLPBDBYRJRPRQGOYDRTJUCUEILNDRWDBAUOZVYSKZHHTNAVDLQAWESGSYPFVFHOSDKWUGYMFULITLNFHCRUXNHCHZJNUYEMZJJNXRMENEYJUOHZGAZUQCHLZTSUPJYDZMDAVZYEGTHJRBFQYPKPYKURKAOWYPEDXIPVEWLBCUDGXCSYVAQPPZASPAXRSQBFOBOGGWKEXBIFBPCKY...

output:

Y

result:

ok single line: 'Y'

Test #25:

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

input:

52
OAWADHRAKTRDNFQTAIIHDLYLLVAWIBCZELOOELJFCSWRYGOACGFNMXRYDROLYFQHQDSXFUVUAPVRMELTSXDCYTHQGBBSUQVAFKHIGGWFWNXCZOTMOOIYKSFCZJZVCTAYPOXACXAFMSJVBRQCHWBZYIAQZBQKRZTVVWGHPXLVYURIUKOJACXPBCXXMXIJFULJRXUBXTJDKXWQCBMDNFFQXEWYZEXRFJRMSDAIQDZSWSIZHTDMXLOUOAWMDPUKQBTJYJXNONHPLDEKUDFKBQUDZSVWLGMCVWBCZATRJSXYJ...

output:

N

result:

ok single line: 'N'

Test #26:

score: 0
Accepted
time: 1ms
memory: 4160kb

input:

565
IHXOHAADKYMMIFBTXKTMVQCCOTIIFXWQTVBJHDARFZIAJISORDWPHLPZPLMKPTYMRKSHCZWFVIOIWXN
LKQAJGHPXYYIZPKSJADWSUGWLHXQGCVIUGMKYLDSNDJUXHJSRYLPBLXPYYNOWONGMSFAGEVSMBAJCGJBTAWRQPWYYBFTRQJWENNIVPKBHZCTGZRLSHTJTVYBBQJSHOVXVQWTZVZPSAIUMDQJXWZYCGOLGPUWAUSZXYRULKKUJAUBGOXXELJXHEBKPEPYRNXZTUKYJGSMDGLBXJMTBDIRGLEN...

output:

Y

result:

ok single line: 'Y'

Test #27:

score: 0
Accepted
time: 1ms
memory: 3816kb

input:

274
MQGIFTBZQBOHQYUXMOV
OXMJOCIWJCLHGCBUJKSKJQBWZFUSVNILPJMJJSSFEKEWFGESUBBQBVSCHJDLDSCAZUUWRJPDNZVLUEKFNLGAOWIECGKLOFXLXJFRXBYWOCUUSHIJXCVWVLMKFIAJECLWNCIZVWIEIHECNHMJCVQBJFGTVSJVWTTXGLVHYBBVKQOPWIIMFZCYYAYCYJVHNWKOOGBASIHVTZWAPHTUJHKAJRC
CSGVTZAROAFZPJXLIYVTQPCIMTFAQABXJZYJXQRCZDKCCOPBWLHFBHXOOQJQ...

output:

Y

result:

ok single line: 'Y'

Test #28:

score: 0
Accepted
time: 20ms
memory: 36572kb

input:

1000000
L
H
J
S
O
J
A
M
Y
F
Z
G
Y
A
Z
R
V
N
Y
N
T
G
H
O
Y
C
N
P
U
Q
F
S
S
R
D
A
Q
M
W
Z
C
E
Z
Z
R
R
H
Z
D
W
X
R
L
N
G
Q
R
I
W
U
O
P
N
L
B
A
B
Z
Z
S
D
R
N
O
E
N
D
U
I
V
R
S
W
Y
Q
N
D
W
U
A
R
H
V
J
C
S
X
K
B
D
O
M
A
T
M
E
F
T
S
D
P
E
C
M
C
R
Q
Y
H
E
T
O
Y
I
B
P
R
N
X
A
X
V
R
Z
C
V
O
V
O
B
M
O
A
S
W
L
...

output:

Y

result:

ok single line: 'Y'