QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#719494 | #512. Pear-wise Voting | kevinyang# | AC ✓ | 4ms | 3956kb | C++20 | 1.6kb | 2024-11-07 02:02:06 | 2024-11-07 02:02:06 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 26;
struct Ballot {
int cnt;
int ord[MAXN];
Ballot(int cnt, string& s) {
this->cnt = cnt;
for (int i = 0; i < s.size(); ++i) {
ord[s[i]-'A'] = i;
}
}
bool beat(int i, int j) { return ord[i] < ord[j]; }
};
vector<int> adj[MAXN];
bitset<MAXN> vis;
void dfs(int c) {
if (vis[c]) return;
vis[c] = 1;
for (int t : adj[c]) {
dfs(t);
}
}
int main() {
cin.tie(0)->sync_with_stdio(0);
int N, M; cin >> N >> M;
vector<Ballot> ballots;
for (int i = 0; i < M; ++i) {
int cnt; string s;
cin >> cnt >> s;
ballots.push_back(Ballot(cnt,s));
}
for (int i = 0; i < N; ++i) {
for (int j = i+1; j < N; ++j) {
int cnti = 0;
int cntj = 0;
for (Ballot& b : ballots) {
if (b.beat(i, j)) {
cnti += b.cnt;
} else {
cntj += b.cnt;
}
}
if (cnti > cntj) adj[i].push_back(j);
else adj[j].push_back(i);
}
}
for (int i = 0; i < N; ++i) {
vis.reset();
dfs(i);
bool good = 1;
for (int j = 0; j < N; ++j) {
if (!vis[j]) good = 0;
}
char c = 'A'+i;
string ans = good ? "can win" : "can't win";
cout << c << ": " << ans << '\n';
}
}
/*
5 5
4 ADCBE
3 DCABE
3 CADBE
2 BDCAE
1 EBCDA
3 3
1 ABC
1 BCA
1 CAB
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3592kb
input:
5 5 4 ADCBE 3 DCABE 3 CADBE 2 BDCAE 1 EBCDA
output:
A: can win B: can't win C: can win D: can win E: can't win
result:
ok 5 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
3 3 1 ABC 1 BCA 1 CAB
output:
A: can win B: can win C: can win
result:
ok 3 lines
Test #3:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
5 3 1 EDCBA 1 BAECD 1 ACBED
output:
A: can win B: can win C: can win D: can't win E: can win
result:
ok 5 lines
Test #4:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
5 1 5 ABCDE
output:
A: can win B: can't win C: can't win D: can't win E: can't win
result:
ok 5 lines
Test #5:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
5 2 2 BADEC 3 EBADC
output:
A: can't win B: can't win C: can't win D: can't win E: can win
result:
ok 5 lines
Test #6:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
6 2 3 ABCDEF 4 FABCDE
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can win
result:
ok 6 lines
Test #7:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
21 2 3 ABCDEFGHIJKLMNOPQRSTU 4 UABCDEFGHIJKLMNOPQRST
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win M: can't win N: can't win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can't win U: can win
result:
ok 21 lines
Test #8:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
22 2 3 ABCDEFGHIJKLMNOPQRSTUV 4 VABCDEFGHIJKLMNOPQRSTU
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win M: can't win N: can't win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can't win U: can't win V: can win
result:
ok 22 lines
Test #9:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
6 5 1 ABCDEF 1 BCDEAF 1 CDEABF 1 DEABCF 1 EABCDF
output:
A: can win B: can win C: can win D: can win E: can win F: can't win
result:
ok 6 lines
Test #10:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
6 6 1 ABCDEF 1 BCDEAF 1 CDEABF 1 DEABCF 1 EABCDF 6 FEDCBA
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can win
result:
ok 6 lines
Test #11:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
5 10 40 BDCAE 35 ACBED 63 BEACD 67 ADBCE 9 AECDB 71 CBDEA 50 DCEAB 75 DEBCA 32 AEDBC 41 DECAB
output:
A: can't win B: can't win C: can't win D: can win E: can't win
result:
ok 5 lines
Test #12:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
6 20 46 AFEBDC 89 DCFEBA 29 ADBCFE 45 CAFBDE 18 ACBEFD 74 CDEBAF 28 EBCDFA 86 EBDCAF 99 BFCEDA 95 BCEDAF 92 DCFBAE 28 CEFDAB 98 ACDBEF 39 CEBFDA 17 DBACEF 3 EBDAFC 93 BEFADC 27 FDBAEC 58 DAFEBC 89 EAFCBD
output:
A: can't win B: can win C: can't win D: can't win E: can't win F: can't win
result:
ok 6 lines
Test #13:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
7 30 64 CBAEDFG 33 FGABDEC 83 DBGCEAF 92 EDGBFCA 82 GDFEBAC 47 CABEGFD 56 FECDAGB 48 ABDECFG 34 CBFGEAD 61 FEAGCDB 12 GBFACDE 80 FAGCDBE 76 FGAECDB 50 EABCDFG 34 DFGACBE 49 GCFDEAB 22 CAGEBFD 46 FADCGBE 64 BFDGECA 36 ACFGBED 29 DGCBFEA 68 ACGEBFD 24 GCAEDBF 14 BDCAEFG 95 FDEAGBC 94 BCADGEF 81 EFCBAD...
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can win G: can't win
result:
ok 7 lines
Test #14:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
8 40 71 EAGBCHDF 28 BAEGHFDC 13 DHECAGFB 97 DFHECGBA 95 DCAHFGEB 47 BAFCEGDH 34 DGEBHCAF 48 GAEBCDFH 13 CDGBAEFH 87 DFBACGHE 27 EACGHDBF 21 GFECBHDA 95 BCEDGHFA 15 CEFDAGBH 14 CFGHDBEA 23 AHCBFGED 12 CAEGFBDH 53 DGFBAHEC 64 CBGAEHDF 11 AEDFBHGC 69 DAFHGBCE 43 BFADHCGE 4 AFBCEDHG 14 AHCFBEGD 54 EBDAC...
output:
A: can't win B: can't win C: can't win D: can't win E: can win F: can't win G: can't win H: can't win
result:
ok 8 lines
Test #15:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
9 50 4 FGDIAHBCE 99 BAEGDCHFI 56 BFGIHCEAD 99 EBGDIAFCH 21 AGFDBCEHI 13 GIHCBFDEA 18 CDGHEBAIF 27 DCEIAHFGB 17 DHFBICEGA 90 CGDEIHFBA 90 DFGAIHCBE 2 HBAFCGIED 63 AFIDCHBGE 35 HAFCDBGEI 17 HDBGCAIEF 81 FBDIACHGE 71 ECBHDIAGF 57 DHCEFBIAG 71 BIEFCHAGD 75 CGIHFEDAB 39 CBGDAEHIF 26 BGHIDFECA 40 FBEADIGC...
output:
A: can't win B: can't win C: can win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win
result:
ok 9 lines
Test #16:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
10 60 71 HDJCGFEBAI 57 HBIAJGECDF 27 ADJIEFGHBC 96 CBHGIEJDAF 89 AIHBGFJEDC 52 FHEIADBJCG 86 EBCAFGJIHD 23 JIGDBCEHAF 19 CEIADFJGHB 21 BEIHFJADGC 41 IDGACFEHJB 73 IFGCBJEDAH 90 EGCHFAIDBJ 66 BEGDFIJCHA 69 FAGIDHJEBC 53 JCBDGIHFEA 61 EDJABFIHGC 92 DECFIAHJGB 8 IJHGEBADFC 34 HCEDBIGFAJ 75 DIEGBCFHJA 3...
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can win H: can't win I: can't win J: can't win
result:
ok 10 lines
Test #17:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
11 100 61 DEHJFGCBAKI 53 DFCAGIBEKJH 88 HEKIFAGDCJB 97 GBKFEJDAICH 10 FKJIDBAECHG 12 KCBGAEFJIHD 68 DGJFBKCAEIH 67 DAEHIBFGCJK 96 GAKFEICHDJB 40 KFDBIGACHJE 44 AEFJGIHDCBK 11 CHAKIJEDGBF 16 GECDHBAIKJF 6 GKICJHBDFEA 34 IDAJEHKGCFB 61 AEKDGJIHFCB 55 EAFGHBDKCJI 28 EBCJKHAGIDF 80 KCFIBEAGDJH 96 KCIHFB...
output:
A: can win B: can't win C: can't win D: can win E: can win F: can win G: can win H: can't win I: can't win J: can't win K: can win
result:
ok 11 lines
Test #18:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
12 200 77 AEDILFKBHJCG 36 KLBIFJDAEHGC 56 ABKCHELJIFGD 17 CIGKFHLBJAED 9 BDGHEAJLCIKF 4 FAGEHILDBJCK 28 LJDFKEHIACBG 16 KELIJGADFBHC 18 CLAJFEDHKBIG 5 KIEJDCLBGFHA 72 CIGKFLDHBEAJ 86 EFHCJAGBLDKI 83 JDHGFLAEBKCI 97 EIALDJFKCBHG 83 HGJDACIKLFEB 83 FDHLEKCJGIBA 97 IDJCAGEHFKBL 62 EKFBDCAHJILG 16 FHALJ...
output:
A: can't win B: can't win C: can't win D: can't win E: can win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win
result:
ok 12 lines
Test #19:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
13 300 29 EMHJADCFILBGK 81 FKCBHMJDGELIA 23 BGJHDKMFECLIA 27 IFDGLAKHECBJM 1 MHFDABJLECIGK 2 FKIHEAGLDMBJC 99 CMBJDGAIEKHFL 99 JAMDILKEHCGBF 28 EFAKHCLGJIMBD 79 MEDACBJGIKHFL 21 BDFLJIGHCMAKE 32 HJILFAMDEBCKG 20 MEFBILKCHAGJD 93 DCMFLHIJABGEK 47 BMDFLCJAGEKHI 63 IKDMLBJHFCGEA 62 DLAJFIGBEMKHC 93 FDG...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can't win H: can win I: can win J: can win K: can win L: can win M: can win
result:
ok 13 lines
Test #20:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
14 400 5 GDJLMFNBKIACHE 70 AMGNILHBFDCEKJ 95 LJKECFHDNAGBIM 40 HFMLKDGACENJIB 54 KBADNCMJHIFEGL 33 MLGCNJIDFEBHAK 95 GBMDKEHCIANLFJ 64 NGFLJBKIACDMHE 69 NAMLEFJDCGIKHB 15 IDLCBKHGNMAFJE 49 GCMLJEAKFHDINB 89 BKNGFDMILCJHAE 87 DNEIACKJBMHFGL 21 JDGEMINBALFCHK 51 NMDGBKLAEIJFCH 71 CAEGBHDFLMKJNI 59 LCD...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win
result:
ok 14 lines
Test #21:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
15 500 52 OEBKFALHCDINMGJ 34 BACFMLDOEJGNHKI 39 IJMFKACOHDENLBG 86 JBLCMFDNKEIOGHA 76 FBAOIGELJKMNHDC 66 LKONADFEGCIJHBM 74 NAIHOKJFMCDLGBE 4 NEBAKDMILCHGOJF 32 MEJAINCBHFGDLKO 88 LGMANCOEDBIKJHF 74 MDKBHOILJEANFGC 91 KCGNJDHFIAMOBLE 26 GNIKLCOEADBFMHJ 40 OCEFMIJLNGKBAHD 58 ALBJIDMENFHOGKC 52 GAMJDK...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win
result:
ok 15 lines
Test #22:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
16 600 9 EHILMGFCBJPADKNO 96 HJICGMNPLEKABFDO 80 KOAPJFEICDMNLBHG 89 GKLIEAHNOCDFJMPB 84 BLACEHPFDMNJKGIO 55 KHDPFELOAGNBJICM 66 MNAGPJEBLDCIHFKO 35 GNMDBJOPIFCKHELA 33 BILPEMGDANFOKCJH 9 BCIHDMJOKAFELGPN 7 IEAGMPLFKBCHJOND 75 KJFLBDOAMHGPICEN 63 JKMODGCBEFIHNPLA 54 PLKNHFCJDBMIOEAG 33 KNMPCGIJFOLHA...
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can win H: can't win I: can't win J: can't win K: can't win L: can't win M: can't win N: can't win O: can't win P: can't win
result:
ok 16 lines
Test #23:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
17 700 79 NELJBHFAGIMKCPDQO 21 BDOAJGNIQCLPHEKFM 95 LFEACJPKHMONBQDGI 56 BNHPGDKFJEMOCLAQI 6 MIJCQFLPBKEONGHDA 63 MIALEGOJHFCNQKPDB 62 JFQHPIGNCDMAEKLBO 72 IALEBGOKQDFPHMJCN 53 BQMPHOJCDGFAILENK 61 NOPCJLKHEIBFADMGQ 100 JEPCOQDHFBALNGKIM 59 IMFABPJHCLDOKGNQE 66 AGJODLPCEQHFBMKIN 71 GHELIQKNMPBDJOCAF...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win
result:
ok 17 lines
Test #24:
score: 0
Accepted
time: 1ms
memory: 3748kb
input:
18 800 38 CLDRAEFPGBOKQMNIHJ 82 IPJBDCLMEHAQOFRNGK 43 AHIFMCDBQLPEOJRNGK 92 OPKJDMLGNQIFHBECAR 97 BCHJEKGDQIOLMNAFPR 36 FGHJKRNCLDPQBOAMIE 43 KQJEFAIPHCORDNBGLM 4 KQBNDLCHGOPJMIFRAE 46 DBMCQNOAHFGLKPJEIR 100 RDEKJHLQINCOPMFGBA 83 HOIDRAJBMCKGQFPENL 43 LMOKCFPQNRIGDEJBAH 53 OFADKPBCJIHGLRENMQ 71 AQOF...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win
result:
ok 18 lines
Test #25:
score: 0
Accepted
time: 1ms
memory: 3888kb
input:
19 900 57 BLCKRQSEIOAPMJDNGFH 10 SBOMNKPCGLDJFIRAEHQ 73 MKRISGAOPNLHEFDCQBJ 92 GKSBCQPODMAIJFHRLNE 37 IFLGBMECPNQASRHKDJO 40 QIHCJFKSGBRNLEODPAM 16 EHFBPRCOGAMJLNSQIKD 100 PMKRIFDGBHEQCOJNSLA 7 EADBJHKIOMSGLFQPNRC 98 EQRHPBSIMKNDCLFGAOJ 79 SPLOHKBIRNMQGFJEADC 79 EJNDIGKBQCHMOLARFSP 9 BOMFRNAGQPDCKEH...
output:
A: can win B: can win C: can win D: can't win E: can win F: can win G: can win H: can win I: can win J: can't win K: can't win L: can win M: can win N: can't win O: can win P: can win Q: can win R: can win S: can win
result:
ok 19 lines
Test #26:
score: 0
Accepted
time: 1ms
memory: 3732kb
input:
20 1000 16 JRANQGDEKBTPSOIFCMLH 83 JKAIQSRTNEFPBMDOLGHC 30 FCAGHSNQJMDRIBLOPKET 68 HNFPMTKCSODQEAILGRJB 96 TMOPQFGADISHKJRNCBLE 44 TBIFHNKRCAGJDPSLMOQE 21 ATEDNFJQBMCPISKOHGLR 47 PKRFBCODETJANQGLISMH 28 ETLHSBMJCQRKAGIFNDPO 30 MFTNCKOLDJEGPIHRQBSA 42 EHQPGMTCLDOBJNKIRFAS 90 DGLSPNFTJHQKMCEBRAIO 92 C...
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win M: can win N: can't win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can't win
result:
ok 20 lines
Test #27:
score: 0
Accepted
time: 2ms
memory: 3880kb
input:
21 1100 55 TSLCOUNPGAFRBQKDJEIHM 28 MSJHLPQAUCITBEGNRODFK 93 JGUTBDSIFKALRPQMOENCH 42 CMOUSEADGFQNKHJPBILRT 65 DOECNTSKBRAPLGHJUFMIQ 19 FIJDQUAONTMRKLHSCPBGE 33 TQECBAOLIMSUDKNRPGJHF 10 QIGEDRNMCFLKPHJOBUATS 36 UGSQODPNBERCLMIFTJAHK 41 UIQLCEKMJNSBGPFAHTROD 5 OEJKUBSICTGQRALPNFDHM 16 PFEDTCMJLNUGHRA...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can't win R: can win S: can win T: can win U: can win
result:
ok 21 lines
Test #28:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
22 1200 91 IOHGCSELRUJBFPKNATMQDV 99 LPKBCSQOIVRTANGHDEUFMJ 81 DBQTLSUVNGEIHAOCFRKJPM 48 GJKVNIOHAPESUMTRFQCDLB 24 COEPISNDUAGVMBQLFHTKRJ 38 THNQMGKJASLOBDICEVURPF 7 BPDEQRTLVNACMHUIOGKFSJ 60 LJBHTFQMAEORPUNCDKISVG 7 MHIKVJRBOGAFPNDELUQSCT 70 NOHTKGIAVQBSUDFJPECRLM 70 ESVUFHNOQLAJBMRKIGDTPC 59 QNAUJ...
output:
A: can win B: can't win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win M: can't win N: can't win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can't win U: can't win V: can't win
result:
ok 22 lines
Test #29:
score: 0
Accepted
time: 2ms
memory: 3748kb
input:
23 1300 4 BVHJACWUGLKQETRPFMSONID 67 WTQMROCLDPVGJNHAUEFISKB 53 PSAGDTLHNJKOEQWMVRUIBFC 57 IMASHTBFNDPQWUGJLVCKEOR 17 NFJVGAULKMOWTCIBRHQDSPE 75 QWLNRMGEVTABHPIOUKSJCFD 44 RPSUBHCGEDJOTNMVAQIFLWK 56 VDNMWKGOETHCIBURPSQFALJ 13 UHCOISLJRMGAWQNEDPBVKTF 21 ORTMASHIDUGPBNCQLEKJFWV 25 AJHTKSECGUDWPOFBVNMR...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win
result:
ok 23 lines
Test #30:
score: 0
Accepted
time: 2ms
memory: 3656kb
input:
24 1400 36 HDSFVGWXEMBPNTOURAQJILKC 42 IMDBLEOXKPUQAVNGTJHCWFRS 47 TGSKJMDPBNWQOAHVXICLEFRU 36 GDFNXHEPOSLCARIKUMQJBWTV 47 UDVWGKJFENHXMLCTSAPIQBOR 89 JQODGCNBWMLUFSHVIPKERTXA 31 AWKPFSTVOELQNBRICDHGJXUM 17 OEJDFRSCUBGMKXPTAWNQVHIL 32 LWSPFAUMNITXKVDRBQHCGJOE 25 KCNXPFWBJSVALGHUTDMIROQE 50 FSBAXJGVR...
output:
A: can't win B: can win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win M: can't win N: can't win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can't win U: can't win V: can't win W: can't win X: ...
result:
ok 24 lines
Test #31:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
26 1600 7 HENOUZXCFWQVYBDGSJTKAMPILR 78 HLXIZOYNVDFCKEARQUTGPMSWBJ 59 CETXRVQYHJKZPWBNUILOADSFMG 88 YUXOBQMTIJLKVPZNGREWFHDCAS 100 VQCUSKPLZMWFABNRHJEXYGTODI 45 GOKYVURHZWFJDSMAQNCXITELPB 17 ELTHUWYRPKOCBGIQJFMXANVDZS 24 JVCASBWFYLUQNMGPXIETHOZRKD 25 UMIHCZJDOWPXRLETBQGNVFYAKS 40 XVEADJHUCSNYFWKILOM...
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win M: can't win N: can win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can't win U: can't win V: can't win W: can't win X: ...
result:
ok 26 lines
Test #32:
score: 0
Accepted
time: 3ms
memory: 3724kb
input:
26 1700 25 EIVGZNTLAJRBDFCHYUPKWMOQSX 23 JSWEYAONFMDGHURCVZPIXLTBKQ 51 ZHUPWJTDQMVFNORCXGYAKBILSE 72 WPRFCENKHJDAOVSTGULMZYBIQX 25 UICLDEXTWAMFOSGKHRQBVYNJZP 51 GWLMQPCATOZVFUYDSBJIEKRXHN 87 XREZOBWSNUDPYMKTJGCALHFIQV 28 UCJGBEOAFDKLQHXSRZNIPWTYVM 50 LXYMSDBKCHFINOWZUVTGJPEARQ 26 VOUMYRDESCWIZPHTGBJ...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win X: can win Y: can win Z: can win
result:
ok 26 lines
Test #33:
score: 0
Accepted
time: 3ms
memory: 3956kb
input:
26 1800 75 CQNWIDFXAMTEYRJVKOLSUZBPHG 1 LQDCKRWIFJANPYZTBHMGUEOVSX 15 EHXYFMDOQATIKSRZLJVBNUWPGC 17 AIZRFYQTNMCGHEKJDVWSLBXPOU 38 BTRKAMUVNIYZGEFXCOLPHDQJWS 39 RZQLUWIMSDEBXANKCGVHJTYOPF 87 SRUKHWCXPLVEDGOZIJTFMYQABN 13 KBIRHGZLPJTYODWACXENMFQVUS 93 GAMZYIKQXVOWFCNRHJDEPBTSUL 39 PSKCMBGOZDLIHATWUQEV...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win X: can win Y: can win Z: can win
result:
ok 26 lines
Test #34:
score: 0
Accepted
time: 3ms
memory: 3956kb
input:
26 1900 50 NGXWBFEHYMIOPLQTJUSVRZCADK 52 PGOMCEIVFDZYKUXQLRABWNTSHJ 3 EUTOASKFRNJCDMXQVWZLBHYPGI 66 MYHOFQNSCVXGLJERUTIAPZDWBK 39 EUVORAZYQTWKCXJDHBGIMLSNFP 13 YGMWSLDNBXPVRCQIUZKAOEJTFH 70 ZVYMNFQHDXJSETBPURAIKLWOCG 23 LRKJCYTIHOPBNZXUQMFGEVSWDA 66 KGDVWARUTYEPQMOBCINXJSZFLH 61 MCXIBPAJODWUYGSNKTEH...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win X: can win Y: can win Z: can win
result:
ok 26 lines
Test #35:
score: 0
Accepted
time: 4ms
memory: 3716kb
input:
26 2000 54 YZNWSHTLUXPDAEIKMVROCGJBQF 76 SWIXUNFAHZTMJOVPQYLDGRECKB 64 GKAZUBIXYECWSHDLTFVRQMPJNO 93 ARBSJGVOUDQLWNHZPXCKTMEFIY 62 IVPZHLEACJXDTOWGRNUYSBMKQF 11 EMQAVZNPKOBTSGFDURLCIJWHXY 43 JYNQVUSZMHATEDXGILFRBWPOCK 60 LGPYXMBQFHKDNVCOJIWSZTARUE 32 QLEXSRJBNKTMDZVHWAYFCOIPUG 55 HOJNUYECZXGRLFVKAQW...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win X: can win Y: can win Z: can win
result:
ok 26 lines
Test #36:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
26 2000 94 IXANUPZTDMGKEWYCVQLBJHOFSR 93 TFMVBGUHEKWYZAPRJIQLXODCSN 17 NQGAURVOTBDCKLPHZJMFYEXWIS 30 VDUPIGLKWRTOEJHZMCFBAQYNXS 12 RSHOTMBYACVGXWQKZDPNJFLUEI 12 VOXQBCTMFUDKZPWGNHLJESARIY 54 QTMHZPRKDUSWLXVYGAECBIONJF 66 QOCDSBEJIAPVULGFZKYHTWXNRM 63 XJDSFKHVQGACUMRTIBZWPOELNY 68 XFNLEHDZWVUPOYBCARQ...
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can't win K: can't win L: can't win M: can't win N: can't win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can win U: can't win V: can't win W: can't win X: ...
result:
ok 26 lines
Test #37:
score: 0
Accepted
time: 4ms
memory: 3744kb
input:
26 2000 49 KELTNZHUGOXIAWCQSPJDBRFVYM 82 JPAGHUNLDXFSMVTRWKECYOIBQZ 8 LTDCMXHRWYAGKFPVBJQIZESNUO 58 CWMOSZRGBXIADEKVHQJTUPYNLF 25 AXJTIRLWNFCPZDYEKOUGHMSBQV 10 LUDRPEAHVBQSYTNFZCWKOGXIJM 46 CTALRQXMSYNBIGZKDVUHPWOJFE 87 QXFKTGJLDPVICAMSZHBWYRUENO 68 WASDFUNMHCXIJBOETGQVLRPKZY 12 KCDWSMXGQABUVFHINJRP...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win X: can win Y: can win Z: can win
result:
ok 26 lines
Test #38:
score: 0
Accepted
time: 4ms
memory: 3728kb
input:
26 2000 63 HITMPNQBDZYLEUXOSAWCKJVRFG 38 LWZCFGRKJDBAHISMEUYOVQTPXN 32 IZWTOMSXBCLNFUJEYAVKGRDQPH 6 ARHEUMDTYJZOQXWNBGCKFVPLSI 53 BMJRQKSELGUIOXPVFTDWHCAZYN 72 JBWFNVUTLCGADXEOHKIZQRMYSP 66 VBMIOYGLTECDKUJSAXRQPZHNFW 27 DFMRCOQINGBKATYSUXHEWJPLZV 47 NLZGTAHVWKMQXUBCIJYOPRSDFE 47 KVSIJZERGNLTQYDAMWOF...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win X: can win Y: can win Z: can win
result:
ok 26 lines
Test #39:
score: 0
Accepted
time: 3ms
memory: 3728kb
input:
26 2000 14 FQLVYEZKCAXNBMHIDGWRSTPJUO 18 NWGASUZCIYBRLKPOJEVMTXQHFD 74 NWHDYMSFBPKAZVCXQURIELOTJG 29 FHOQVGWBIAYJPMKNUTLREDSXZC 62 HZGKQSMCBEFUNOTIARDYXWJLVP 95 WGBHPFDLQKOJUZIVRNMXCTEYAS 31 SZCOHNLQUWTMJGEXVYDRFPKBAI 46 RCUZJNLQXKMBETYAGSWFOIDHVP 96 HMNUAEQZXPWGVORSTKCJYLBIFD 33 EYAGZJWCOVUFDKNSXML...
output:
A: can't win B: can't win C: can't win D: can't win E: can't win F: can't win G: can't win H: can't win I: can't win J: can win K: can't win L: can't win M: can't win N: can't win O: can't win P: can't win Q: can't win R: can't win S: can't win T: can't win U: can't win V: can't win W: can't win X: ...
result:
ok 26 lines
Test #40:
score: 0
Accepted
time: 3ms
memory: 3716kb
input:
26 2000 28 DRUVESWQZYANHGKCIJMXFPLOBT 74 RDFXQEOASVYTGULCPIKMWNHBZJ 97 LCBWEGVPNSXIUMZKHRDJTOYFQA 77 ACJGWSHRZXNTYKFEPLMDUOVIQB 90 IOGEXNSLWCTMZAFURPKBVHQYJD 5 WMDTLYNAFKCRVBSZPQUGXJIHOE 99 LIFOCVYQSEJDMWRABZHGNUPTXK 85 EKRYSUPLBDWMAHFXVIZGNQOTJC 75 ZWAFOKIHPYNSQLGXUVRJBCMDET 15 CRZSPVGJEIHAXFOTYDMN...
output:
A: can win B: can win C: can win D: can win E: can win F: can win G: can win H: can win I: can win J: can win K: can win L: can win M: can win N: can win O: can win P: can win Q: can win R: can win S: can win T: can win U: can win V: can win W: can win X: can win Y: can win Z: can win
result:
ok 26 lines