QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#295808#4828. Four Plus Fourhos_lyricAC ✓1134ms80780kbC++144.8kb2024-01-01 03:20:512024-01-01 03:20:53

Judging History

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

  • [2024-01-01 03:20:53]
  • 评测
  • 测评结果:AC
  • 用时:1134ms
  • 内存:80780kb
  • [2024-01-01 03:20:51]
  • 提交

answer

#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

using Int = long long;

template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")


char buf[110];

int M, N;
vector<string> A, B;
unordered_map<string, int> idsA, idsB;
vector<vector<int>> graph;
vector<vector<int>> f;
vector<vector<int>> g;

void dict() {
  scanf("%d", &M);
  A.resize(M);
  for (int i = 0; i < M; ++i) {
    scanf("%s", buf); A[i] = buf;
  }
  scanf("%d", &N);
  B.resize(N);
  for (int j = 0; j < N; ++j) {
    scanf("%s", buf); B[j] = buf;
  }
  
  idsA.clear();
  idsB.clear();
  for (int i = 0; i < M; ++i) idsA[A[i]] = i;
  for (int j = 0; j < N; ++j) idsB[B[j]] = j;
  graph.assign(M, {});
int numEdges=0;
  for (int i = 0; i < M; ++i) {
    string a = A[i];
    sort(a.begin(), a.end());
    do {
      const string b = a.substr(0, 4);
      auto it = idsB.find(b);
      if (it != idsB.end()) {
++numEdges;
        graph[i].push_back(it->second);
      }
      reverse(a.begin() + 4, a.end());
    } while (next_permutation(a.begin(), a.end()));
  }
cerr<<"numEdges = "<<numEdges<<endl;
  
  vector<int> degA(M, 0), degB(N, 0);
  for (int i = 0; i < M; ++i) {
    for (const int j : graph[i]) {
      ++degA[i];
      ++degB[j];
    }
  }
  vector<int> is;
  for (int i = 0; i < M; ++i) if (degA[i] >= 3) is.push_back(i);
  sort(is.begin(), is.end(), [&](int i0, int i1) -> bool {
    return (degA[i0] < degA[i1]);
  });
cerr<<"|is| = "<<is.size()<<endl;
  
  f.assign(M, vector<int>(3, -1));
  g.assign(N, vector<int>(N, -1));
int success=0;
  for (const int i : is) {
    auto &js = graph[i];
    const int jsLen = js.size();
    sort(js.begin(), js.end(), [&](int j0, int j1) -> bool {
      return (degB[j0] < degB[j1]);
    });
    for (int k0 = 0; k0 < jsLen; ++k0) {
      const int j0 = js[k0];
      for (int k1 = k0 + 1; k1 < jsLen; ++k1) {
        const int j1 = js[k1];
        if (!~g[j0][j1]) {
          for (int k2 = k1 + 1; k2 < jsLen; ++k2) {
            const int j2 = js[k2];
            if (!~g[j0][j2] && !~g[j1][j2]) {
              f[i][0] = j0;
              f[i][1] = j1;
              f[i][2] = j2;
              g[j0][j1] = g[j0][j2] = g[j1][j0] = g[j1][j2] = g[j2][j0] = g[j2][j1] = i;
              --degB[j0];
              --degB[j1];
              --degB[j2];
              goto found;
            }
          }
        }
      }
      if (!~g[j0][j0]) {
        f[i][0] = f[i][1] = f[i][2] = j0;
        g[j0][j0] = i;
        --degB[j0];
        goto found;
      }
    }
cerr<<"FAIL success = "<<success<<endl;
cerr<<A[i]<<": ";for(const int j:js)cerr<<B[j]<<" ";cerr<<endl;
    assert(false);
   found:{}
++success;
// cerr<<degA[i]<<" "<<A[i]<<": ";for(const int j:f[i])cerr<<B[j]<<" ";cerr<<endl;
  }
}

int main() {
  char typ[110];
  for (; ~scanf("%s", typ); ) {
    if (!strcmp(typ, "password")) {
      int Q;
      scanf("%d", &Q);
      vector<string> X(Q);
      for (int q = 0; q < Q; ++q) {
        scanf("%s", buf); X[q] = buf;
      }
      
      dict();
      
      for (int q = 0; q < Q; ++q) {
        const int i = idsA[X[q]];
        for (int k = 0; k < 3; ++k) {
          if (k) printf(" ");
          printf("%s", B[f[i][k]].c_str());
        }
        puts("");
      }
    } else if (!strcmp(typ, "keys")) {
      int Q;
      scanf("%d", &Q);
      vector<string> Y(Q), Z(Q);
      for (int q = 0; q < Q; ++q) {
        scanf("%s", buf); Y[q] = buf;
        scanf("%s", buf); Z[q] = buf;
      }
      
      dict();
      
      for (int q = 0; q < Q; ++q) {
        const int jY = idsB[Y[q]];
        const int jZ = idsB[Z[q]];
        puts(A[g[jY][jZ]].c_str());
      }
    } else {
      assert(false);
    }
  }
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1114ms
memory: 76800kb

input:

password
2
password
couthier
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatises abattoir abbacies abbatial abbesses abdicate abdomens abdomina abducens abducent abducing abducted abductee abductor abelmosk aberrant abetment abettals abet...

output:

wrap sows woad
huic ruth thou

input:

keys
4
wrap sows
thou ruth
woad wrap
sows woad
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatises abattoir abbacies abbatial abbesses abdicate abdomens abdomina abducens abducent abducing abducted abductee abductor abelmosk aberrant abet...

output:

password
couthier
password
password

result:

ok OK

Test #2:

score: 100
Accepted
time: 1112ms
memory: 76876kb

input:

password
1
quirkier
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatises abattoir abbacies abbatial abbesses abdicate abdomens abdomina abducens abducent abducing abducted abductee abductor abelmosk aberrant abetment abettals abetters abet...

output:

keir kier ruer

input:

keys
1
kier ruer
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatises abattoir abbacies abbatial abbesses abdicate abdomens abdomina abducens abducent abducing abducted abductee abductor abelmosk aberrant abetment abettals abetters abettin...

output:

quirkier

result:

ok OK

Test #3:

score: 100
Accepted
time: 1121ms
memory: 76836kb

input:

password
3
aardvark
aardwolf
aardvark
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatises abattoir abbacies abbatial abbesses abdicate abdomens abdomina abducens abducent abducing abducted abductee abductor abelmosk aberrant abetment abet...

output:

kava vara arak
flaw afar flow
kava vara arak

input:

keys
18
vara arak
kava arak
flow flaw
kava vara
kava arak
arak vara
afar flow
flaw afar
arak kava
flow afar
vara arak
flaw flow
kava vara
arak vara
vara kava
afar flaw
arak kava
vara kava
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatise...

output:

aardvark
aardvark
aardwolf
aardvark
aardvark
aardvark
aardwolf
aardwolf
aardvark
aardwolf
aardvark
aardwolf
aardvark
aardvark
aardvark
aardwolf
aardvark
aardvark

result:

ok OK

Test #4:

score: 100
Accepted
time: 1128ms
memory: 80628kb

input:

password
10000
aardvark
aardwolf
aasvogel
abacuses
abalones
abampere
abandons
abapical
abasedly
abashing
abatable
abatises
abattoir
abbacies
abbatial
abbesses
abdicate
abdomens
abdomina
abducens
abducent
abducing
abducted
abductee
abductor
abelmosk
aberrant
abetment
abettals
abetters
abetting
abetto...

output:

kava vara arak
flaw afar flow
lava saga goal
cube cabs sabs
anoa alba bone
beep barm ramp
anna bond bods
blip paca clip
abys deys lady
agha gabs bigs
abba belt blet
sibs bait stab
bott batt obia
abba sibb ebbs
abba alba blat
ebbs abbe babe
data bice bait
bond bema mods
bond bima anoa
baud cubs scud
...

input:

keys
60000
clag gale
feel fehs
flic lift
azon zigs
code deco
fino grog
turk kerb
dink nidi
adze bird
fort kifs
grim gram
neem demo
offs fall
alif fail
birk kiss
duad aunt
load land
unco onus
adit hast
flap fays
obit both
cels lacs
next dins
grog gels
fido fano
fail fair
ired diss
fork rook
vita vina...

output:

cleaning
fleeches
felsitic
agonizes
coincide
frogging
bruskest
dinkiest
arabized
forkiest
armigero
endosome
falloffs
fallible
briskest
denudate
canoodle
conquers
dashiest
flypasts
bioethic
carrells
dextrins
cloggers
fricando
filarees
dressier
formwork
aviating
dogeship
arousals
celestas
buttocks
epi...

result:

ok OK

Test #5:

score: 100
Accepted
time: 1121ms
memory: 80480kb

input:

password
10000
fucoidal
fuddling
fuehrers
fuellers
fuelling
fuelwood
fugacity
fuggiest
fugitive
fugleman
fuglemen
fuguists
fulcrums
fulfills
fullback
fullered
fullface
fullness
fulmined
fulmines
fulminic
fumarase
fumarate
fumarole
fumatory
fumblers
fumbling
fumeless
fumelike
fumettes
fumigant
fumiga...

output:

cuif fido filo
gulf fund find
fehs surf rhus
full surf feel
full gill glue
woof foul wold
cagy yuga yuca
fugs gift gigs
five gift give
fume flag flam
fume gulf glum
fugu fugs fuss
curf sulu scum
lull luff fill
fuck bulk flak
full dull feud
cuff full calf
full fess flue
fume find mild
fume muns fens
...

input:

keys
60000
tarn iris
heth toit
boll hill
pond poop
poll pelt
kept koto
doms dipt
verb vill
wood vrow
prof flap
kiva mick
gout grit
bump burp
none riot
ahoy hays
nowt twat
gowk wink
liar rare
quay luny
sild diss
grey eyen
cant nota
puce dipt
tour purr
worm wilt
ammo oboe
yell racy
murr sump
mutt aunt...

output:

inertias
hitherto
hornbill
proponed
pollster
pokeroot
imposted
overbill
overword
platform
maverick
outrings
plumbery
inventor
pansophy
nanowatt
knowings
realiser
quaintly
linseeds
greenery
notecase
pictured
posturer
milkwort
moonbeam
rectally
presumer
nutmeats
legality
hidrosis
panderer
haunches
ove...

result:

ok OK

Test #6:

score: 100
Accepted
time: 1122ms
memory: 79920kb

input:

password
8488
redounds
redpolls
redrafts
redrawer
redreams
redreamt
redrills
redriven
redrives
redroots
redrying
redshank
redshift
redshirt
redskins
redstart
redtails
redubbed
reducers
reducing
reductor
reduviid
redwares
redwings
redwoods
redyeing
reearned
reechier
reechoed
reechoes
reedbird
reedbuc...

output:

duds udos dour
poll pods prod
daft arfs reft
awee ward wade
dram dams emes
dram mete deme
dill ills dirl
vend vier rind
devs vier eide
dorr roto dost
yirr deny yird
dhak rank hand
heft fids dish
dish herd thir
dirk kiss kins
tart tads rads
dirl tads sled
rudd burd drub
curr scud surd
guid curn duce
...

input:

keys
50928
vier vees
teen etna
ours sori
teel lint
murr mura
pend drip
meet perm
gene gems
prof woof
busy yups
wens wage
cloy icky
duff fold
mawn whim
ogle loss
five very
iris inti
puls pics
troy toyo
wail swim
teth tent
tact fact
wags caws
wrap prow
nick skag
leet teth
urus nuns
undy inky
pads parr...

output:

voleries
serenata
survivor
veinlets
variorum
underpin
tampered
seemings
wetproof
subtypes
resawing
rollicky
souffled
whamming
soilages
revivify
sinister
spicules
rotatory
wailsome
strength
trifecta
scalawag
warpower
snacking
shtetels
sunburns
unkindly
spreader
uprushed
remotest
wastries
shitakes
scr...

result:

ok OK

Test #7:

score: 100
Accepted
time: 1112ms
memory: 76840kb

input:

password
10
clumsier
accursed
dovening
electron
ruddling
roadshow
tabooley
eugenics
meristic
nebulose
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatises abattoir abbacies abbatial abbesses abdicate abdomens abdomina abducens abducent abd...

output:

culm uric mice
ceca crud dura
void vend give
clot lorn rotl
rudd dung nurl
dhow wood hows
boyo byte bolo
cigs genu sung
miri cris cist
buns ebon lobs

input:

keys
46
crud ceca
bolo byte
lobs ebon
wood hows
ceca crud
culm uric
byte boyo
mice uric
buns ebon
cris cist
give vend
boyo byte
ceca dura
culm mice
clot lorn
dura crud
give void
wood dhow
rudd nurl
lorn rotl
uric culm
vend void
mice culm
genu sung
dura ceca
vend give
cigs genu
void vend
hows wood
bu...

output:

accursed
tabooley
nebulose
roadshow
accursed
clumsier
tabooley
clumsier
nebulose
meristic
dovening
tabooley
accursed
clumsier
electron
accursed
dovening
roadshow
ruddling
electron
clumsier
dovening
clumsier
eugenics
accursed
dovening
eugenics
dovening
roadshow
nebulose
ruddling
meristic
ruddling
mer...

result:

ok OK

Test #8:

score: 100
Accepted
time: 1114ms
memory: 77028kb

input:

password
100
bandying
travoise
wattapes
moonfish
guruship
reground
canvased
undenied
areolate
choushes
angakoks
replicas
widthway
pitchout
noumenal
skeining
reshines
invokers
golconda
unchokes
slowworm
peplumed
captious
glochids
longeing
spectate
helicoid
spongily
donators
bunchier
strummer
unsolder...

output:

gaby inby yang
vast vies rove
wept twat swap
hoof homo fons
pugh guru push
durr doge genu
vacs vend nada
dude died nine
tala rotl alae
hush ouch cuss
kaka konk kaon
clip spec lipa
whid wady dawt
putt phut huic
noun alum menu
skeg king kens
hiss hern shin
keno vino irks
good clog dago
honk husk sunk
...

input:

keys
313
homo hoof
jamb jeux
drug geed
deet dint
mute yeti
dogy pogy
dits raid
waul yowl
film lift
moot quit
para haar
cock bibs
lour rout
half flam
atop puts
kilt keet
gosh clog
jeux jamb
drib bleb
nips pirn
noun guts
ouch cuss
door toad
king skeg
gyms pogy
jamb juba
spec clip
vent vial
tart raid
t...

output:

moonfish
jambeaux
repugned
trendier
yummiest
gypsydom
striated
outlawry
leftisms
mosquito
hardpans
bibcocks
outliers
fishmeal
captious
treelike
glochids
jambeaux
cribbled
respring
nonguest
choushes
donators
skeining
gypsydom
jambeaux
replicas
ventails
striated
areolate
treelike
donators
brougham
bun...

result:

ok OK

Test #9:

score: 100
Accepted
time: 1119ms
memory: 77056kb

input:

password
1000
idealist
xanthein
reworded
hopheads
scutters
beakless
charkhas
gaywings
footpath
tonearms
extremes
mortuary
journals
hominids
notchers
variorum
wangling
arousing
curacoas
tellable
fellator
muenster
flatuses
canzonet
biasness
reremind
ectozoan
graftage
typhonic
masthead
scholars
amygdal...

output:

ilia delt adit
next hent then
word weed dorr
hehs opah hods
cuss tuts cute
skas kabs leke
haha arak hack
wyns gags gays
hoof poof toft
morn atom mart
sext meet emes
murr your army
jarl soja nurl
imid mhos shod
chon hent hots
ovum murr mura
lawn gang wain
gaun goas snug
caca ocas ursa
lall beet blat
...

input:

keys
2230
dust dirt
bill ibis
paps pant
pips lips
lulu plot
pond coda
daff miff
chid whid
wauk caws
brad crib
opts psst
viol kiva
tact tory
goas gaun
bill illy
peep porn
nurl durr
vees ever
epee glee
eses sene
moke dyke
tilt sins
hila heal
bald bima
muds auld
edge eide
sals rill
nett sets
item meet
...

output:

sturdied
sibyllic
appoints
slippers
pullouts
canopied
affirmed
richweed
sawbucks
carbides
ripostes
novalike
cryostat
arousing
sibyllic
peperoni
trundler
verbless
espiegle
descents
misyoked
tintless
caliches
imbalmed
ladanums
rerigged
salliers
antsiest
eremitic
botanize
reaginic
apostles
couloirs
eye...

result:

ok OK

Test #10:

score: 100
Accepted
time: 1118ms
memory: 79872kb

input:

password
10000
parrying
wayfarer
resodded
trounced
fumbling
outvaunt
dealated
flappers
canonist
eggheads
roughage
intoners
totalism
lobsters
soundmen
toothier
implores
revamped
foreword
floccule
glossier
slideway
bottlers
expiates
mephitic
erratics
overcook
kipperer
wickiups
rescuers
fauvisms
tyrami...

output:

yirr gapy parr
fray away awry
odds redd sord
duct duro cord
bumf flub numb
tutu vatu unau
dada deed tala
flap palp farl
conn cast cats
ghee gags dags
hogg huge gage
neon snot riot
mott milo slam
boss belt bole
doum sunn menu
otto teth thro
romp limo lops
vamp damp deva
woof ford word
floc full cull
...

input:

keys
49151
iwis weet
taxi ibex
suss ouch
plot plop
gene nett
came cams
vang gave
data anna
segs vigs
sons ions
dumb burn
lutz hula
amas mace
envy vend
cosy toyo
nosy only
yock yolk
rays ryas
trap carp
bott tote
flus flue
glad palp
delf dell
kane rink
bach bans
door lour
fiat fley
curf fuse
pech hued...

output:

viewiest
bauxites
hocusses
toppling
genettes
amesaces
gingivae
adnation
vestiges
essonite
numbered
hazelnut
massacre
convoyed
cytosols
acyloins
mullocky
arrayals
accepter
abettors
sulfones
dappling
refelled
kaiserin
brechans
dolorous
fayalite
surfacer
capuched
weeniest
carbaryl
clinched
followed
sca...

result:

ok OK

Test #11:

score: 100
Accepted
time: 1111ms
memory: 77056kb

input:

password
10000
inertiae
satiable
riverbed
defeater
coffling
sucroses
nonbeing
martagon
birdcall
cumberer
octuplet
befitted
witchier
faithing
euphuism
disunity
meathead
musician
currants
basilary
erepsins
fluorine
ripostes
mesnalty
downhaul
squarely
conjoins
sweatier
outlined
enchants
extincts
lifele...

output:

inia tarn teen
abas belt bits
vibe birr vied
daft fard raft
coff flog clog
suss coss crus
bong gibe bone
agma grot morn
bill carb drib
murr cube rube
putt loup puce
beef bitt deft
wich crew whit
haft fang ghat
hump hemp hums
undy tidy tiny
amah data meth
scum maun muns
curr scut turn
abys raya alba
...

input:

keys
1
inky yeuk
28558
aardvark aardwolf aasvogel abacuses abalones abampere abandons abapical abasedly abashing abatable abatises abattoir abbacies abbatial abbesses abdicate abdomens abdomina abducens abducent abducing abducted abductee abductor abelmosk aberrant abetment abettals abetters abettin...

output:

unlikely

result:

ok OK

Test #12:

score: 100
Accepted
time: 1127ms
memory: 80656kb

input:

password
10000
biunique
chinning
chowchow
civility
cyclicly
diacidic
dibbukim
diluvium
divvying
dizzying
exceeded
exiguity
expellee
finiking
fizzling
frizzily
froufrou
giddying
gimmicky
gingilli
haggadah
henequin
heniquen
higgling
humidify
illiquid
infinity
infixion
jingling
jujutsus
kickback
levell...

output:

quin unbe bine
chin inch nigh
chow coco coho
tivy city clit
illy lily yill
acid cadi caid
dumb dumb dumb
imid imid imid
viny viny viny
zing zing zing
exec deed cede
exit yeti etui
epee epee epee
fink gink king
fizz zing ling
fizz friz liri
ruff roof four
didy nidi ding
immy icky mick
gill nill ling
...

input:

keys
60000
dada hard
meou orra
jots togs
doze azon
wily waly
oxen oryx
cosy cyme
glen glee
been limb
girt iris
husk beck
zori momi
chip chip
hair haar
orzo izar
unau buns
vent give
abba barb
fley friz
fugu gull
sees eves
liri veil
have vibe
dark mock
orra hora
clay caca
mewl moll
ywis whey
hint ghat...

output:

hardhead
armourer
jingoist
anodized
willywaw
pyroxene
cymosely
creeling
bemingle
stirring
buckshee
memorize
pinching
harianas
grazioso
suburban
genitive
barbaric
frenzily
guileful
reserves
livelier
behaving
drammock
abhorrer
caecally
mellowly
whiskeys
catching
coldcock
covetous
tittuppy
sailfish
hic...

result:

ok OK

Test #13:

score: 100
Accepted
time: 1119ms
memory: 77420kb

input:

password
10000
biunique
chinning
chowchow
civility
cyclicly
diacidic
dibbukim
diluvium
divvying
dizzying
exceeded
exiguity
expellee
finiking
fizzling
frizzily
froufrou
giddying
gimmicky
gingilli
haggadah
henequin
heniquen
higgling
humidify
illiquid
infinity
infixion
jingling
jujutsus
kickback
levell...

output:

quin unbe bine
chin inch nigh
chow coco coho
tivy city clit
illy lily yill
acid cadi caid
dumb dumb dumb
imid imid imid
viny viny viny
zing zing zing
exec deed cede
exit yeti etui
epee epee epee
fink gink king
fizz zing ling
fizz friz liri
ruff roof four
didy nidi ding
immy icky mick
gill nill ling
...

input:

keys
10000
wawl wyle
wile news
beys blob
wend wino
koph piki
foys pony
loot toll
kudo duck
epee mere
doze zone
brin ibis
awed weer
gaps pang
thud chum
cyan clay
toit that
dago barb
suds suqs
kami mink
nene thee
noon only
soul suss
dodo poll
whir hewn
yips gyps
yodh ahoy
ohed doth
obit boss
next punt...

output:

wellaway
wiliness
bellboys
windowed
pirozhki
opsonify
axolotls
cuckooed
temperer
deionize
brisling
rewarder
parasang
dutchman
carnally
tithonia
gabbroid
squushed
mannikin
entrench
nonroyal
soleuses
dolloped
whinnier
gypsying
ladyhood
crotched
bossiest
unexpert
overseer
wineskin
mandarin
bryozoan
air...

result:

ok OK

Test #14:

score: 100
Accepted
time: 1120ms
memory: 79316kb

input:

password
9998
sacredly
yeshivas
tattiest
diluvian
conjunct
crumbers
lambasts
pupilage
leggings
dispirit
galleass
deserver
shutting
schmucks
bitching
methanol
prefects
floppers
untended
usurpers
trundler
syringes
lambency
skylines
intender
disclaim
reanoint
recoiler
tincture
feminize
vicomtes
moistur...

output:

scry dyer lady
shiv have yeah
stat teat sett
ulva diva auld
noun conn cunt
murr scum burs
balm atma sabs
pupa gulp gape
gleg engs gens
dipt tipi irid
gall sags alls
devs seed errs
thug gust huns
muck much huck
bint chit itch
holm lath ahem
feet cepe refs
flop fops prop
dude dunt dent
purr spue supe
...

input:

keys
40537
hide padi
firn fons
woof hoof
vide irid
lock kirk
elks keps
wink dawk
lawn gnaw
spud urds
fern teff
twit weir
then thee
carl orca
gamb smog
vugs glob
derm mild
dawt wiry
dido cell
flub gulf
inns glia
yuck bulk
hobo tomb
lorn loan
fads fans
plop epee
clue cell
bent bots
ills sols
undo updo...

output:

headship
infernos
showoffs
viverrid
rocklike
pliskies
dawnlike
waggling
disputer
efferent
retwists
retrench
solacers
gambados
lovebugs
dismaler
cityward
collided
flubbing
anglings
bullocky
bathroom
nonviral
deafness
repeople
coquille
bonesets
soilless
unpoised
thronged
vitiates
picquets
derating
pli...

result:

ok OK

Test #15:

score: 100
Accepted
time: 1128ms
memory: 79488kb

input:

password
9997
imperils
gunfight
beladies
fatstock
nonionic
oblongly
mensural
bolognas
gleaners
ascetics
midterms
windsurf
aweather
groschen
priedieu
sporular
unsonsie
evulsion
shogunal
cardioid
mortises
lapidify
intrudes
opposing
rooftops
snippier
adultery
meteoric
mestizas
gainless
shoptalk
ceiling...

output:

impi merl lips
thug gift hung
bald dibs libs
toft kafs tack
noon coon cion
bogy bony glob
alum nurl mule
gobo bags loon
glee gaen rage
ceca sics cast
mime mids derm
fund fuds funs
whee thaw weet
cogs hong cosh
irid puri dupe
purr orra opal
noun suns sins
luvs viol live
haul gosh ughs
dado dido irid
...

input:

keys
41296
gobo bong
tuna gnat
kifs lunk
gang zing
pong glop
veep pros
mott teth
that heel
ilia titi
whys awry
both cosh
crew sews
colt liri
agar gats
hype yeah
lags tags
muck kagu
arco carn
imam gasp
gosh mool
abas stay
vill lave
dusk tsks
ergs sris
qats nuns
teel cees
tics nisi
prim peed
mads damn...

output:

wobegone
nutating
skinfuls
agnizing
poppling
reproves
monteith
athletes
litigate
haywards
biotechs
screwers
nitrolic
gastraea
hyphemia
otalgies
blackgum
raccoons
spamming
homologs
satiably
lavalier
duskiest
sniggers
quinnats
clearest
niceties
demireps
mastodon
talesman
floppers
tapeless
steroids
ren...

result:

ok OK

Test #16:

score: 100
Accepted
time: 1122ms
memory: 79516kb

input:

password
9999
flitting
perigons
andirons
torosity
valuable
prickles
kismetic
gomerils
motivate
cocksure
albumins
triplite
epicarps
honorand
spending
clinched
copilots
misbound
furcated
smellier
tectites
seriated
yestreen
phenetic
drinkers
caudally
defiling
easiness
huisache
rouleaux
deadhead
cleanes...

output:

gift titi lint
gorp open pion
anon ados nods
toyo rosy tort
ulva bell beau
kelp perk kips
mick tiki emic
glom limo girl
move mott vote
cock ruck souk
numb alum nubs
titi pili pelt
paps pics cape
noon hood hand
pegs pend gids
chic hind held
coop clip loot
dumb muon mobs
curf daft duct
mell emes slim
...

input:

keys
41858
noun genu
agma ansa
grid ghee
nuts lunt
chic chez
mild dive
bend bind
pond atop
comp malt
sirs tilt
ilia carl
sees nene
wyte wyes
slag rags
slit lilt
dido sown
grat gast
nods anon
duci djin
bout bong
migg gigs
purr sips
hoed hods
harl hols
walk caws
guid bunn
hail lich
lily yams
celt plat...

output:

enginous
grandams
rehinged
unsteels
zecchino
midlives
benzidin
satinpod
compleat
slitters
critical
ensnares
gateways
regalers
niellist
disowned
starring
andirons
jaundice
gunboats
priggism
spurries
scorched
althorns
woolsack
bundling
chalazia
mesially
sceptral
impledge
pygmyish
paradrop
dactylic
sig...

result:

ok OK

Test #17:

score: 100
Accepted
time: 1113ms
memory: 79552kb

input:

password
9998
enneagon
ungotten
electors
applique
delights
vibronic
foothold
sappiest
wheedled
detruded
databank
melanoma
ironware
starkers
witherer
walloper
mitogens
stiflers
foreside
semitone
johnnies
conceals
sublunar
recusals
aldehyde
leprotic
ptomains
linkable
antitank
insurers
reshowed
caruncl...

output:

ogee anon nona
gout tout neon
clot scot slot
quip pupa pulp
held hilt geld
vino crib born
hoof food hood
paps psst spat
whee weel lewd
rudd turd deed
kana bank taka
mama mome anal
warn wino enow
tsks asks kart
whee whit thew
plow warp well
smog mint gone
fess lift fits
fido ford fees
neem mots meno
...

input:

keys
44951
kern kris
cell moll
turk suck
lewd view
jack high
loge neon
chop heap
boss zebu
heel eves
kirn trek
milt muns
palm flap
moot umbo
bice beet
tads dona
forb boor
nett gelt
gaum agha
comp imps
molt marl
clef coof
club daub
gobo loom
toft fons
funs chef
seis even
dewy yews
mopy pyes
hons hour...

output:

einkorns
calomels
truckers
swiveled
highjack
eloining
reproach
subzones
shelvers
trinkets
luminist
preflame
motorbus
citeable
odorants
forebode
gantlets
mahuangs
polemics
amitrole
floccose
cuboidal
beglooms
oftenest
fuchsine
versines
dyeweeds
employes
unhorses
everyman
empurple
premixes
commoved
sli...

result:

ok OK

Test #18:

score: 100
Accepted
time: 1124ms
memory: 79800kb

input:

password
9995
hatching
liturgic
ravagers
defrayal
whickers
lockstep
mufflers
zoogenic
repairer
multiped
beclouds
demising
steading
bodysurf
balloter
mousings
xanthoma
directer
chancels
linguine
bandages
cajolery
despited
littered
finances
fontanel
impaling
paltered
messiahs
backlogs
pedicure
trithin...

output:

high hang than
glut trug cult
vara raga agas
defy afar raya
wick chew skew
kept lock toke
muff fems effs
zinc ooze goon
parr pair peer
dump dipt mild
club buds clod
imid gems gids
dags dint tags
fury body fubs
boll tall bort
gums smog muon
hoax taxa amah
dirt cete iced
ceca lech heal
glue linn genu
...

input:

keys
48114
elhi that
muns muon
gone egos
turk kabs
whir grow
then horn
flub fley
moor torr
doty odyl
kick konk
jams jabs
huge howe
tits diss
dorm prom
hots thee
gyms skeg
awry awny
torc coat
lava aves
boob look
ruer rune
riff fils
crew wert
forb fora
tivy tidy
muss emeu
join jots
culm dual
zits tart...

output:

lathiest
luminous
isogenic
outbarks
showgirl
thornier
bellyful
wormroot
torridly
knocking
jobnames
roughhew
staidest
pomander
ethnoses
kerygmas
greenway
carotene
salvager
bobolink
reinjure
rifflers
crewcuts
fireboat
lividity
muteness
disjoint
muscadel
tsaritza
peatiest
coadmits
sisterly
crofters
vin...

result:

ok OK

Test #19:

score: 100
Accepted
time: 1132ms
memory: 80544kb

input:

password
9995
bribable
confrere
cohoshes
whoopers
subspace
arenites
tinniest
tornados
kolhozes
longeron
octonary
werewolf
shoveler
anodized
announce
reniform
haploidy
defoamer
prelives
tamboura
fleshpot
peponium
fanworts
refrying
stobbing
fathered
horsecar
disposal
clobbers
slippage
coquitos
trample...

output:

bibb barb birl
corf fern free
hehs coho oohs
phew prow hoop
pubs cube scup
teen rain ante
titi nine test
door dost soon
zeks hook kohl
noon ogle oleo
toyo cyan coon
flow frow weel
hove hols love
doze adze azon
noun nona neon
firm info firn
yodh oldy dahl
feme fado fora
veep vile pele
umbo aura barm
...

input:

keys
59872
adit ilia
awry waxy
bond lorn
deem dams
coss toil
tees rins
puri emeu
cabs dabs
muss suds
heck khet
feud gulf
emeu runt
erne edge
rout tour
fugs ague
anoa axal
tiny agly
oots spiv
jabs jamb
slag palp
bott trot
gosh hone
dibs bods
agio ague
birr bows
epee peps
fill fall
card vend
dong gong...

output:

idealist
waxberry
banderol
daemones
solecist
internes
perineum
cabstand
dumbness
kvetched
gulfweed
mutineer
gandered
virtuous
fuselage
monaxial
tallying
oviposit
jobnames
grapples
tabouret
histogen
embodies
agouties
ribworts
prepense
flailing
cravened
gudgeons
hunkered
glassier
outliner
hooklike
sli...

result:

ok OK

Test #20:

score: 100
Accepted
time: 1134ms
memory: 80708kb

input:

password
9997
coleslaw
rikshaws
intended
rondeaux
dendroid
footling
tackling
shittahs
beaklike
unpacker
bearhugs
misthrow
sphinges
franklin
terrible
somebody
firetrap
peasecod
leukosis
ferruled
subgraph
grizzles
oversize
argentum
didactic
buckbean
previews
driveway
allovers
sailorly
flavorer
cycling...

output:

clew cows cell
hawk haik wark
nene deet need
doux axed axon
dido died done
goof font loft
tank talk lank
hath hahs sash
keek bilk bike
punk ruck peck
burg huge bush
whim whit moth
pegs ghis phis
fink lark nark
birr beet belt
body demy boom
frap frit fart
cepe dopa coda
koss kues kilo
durr furl delf
...

input:

keys
59908
glow frug
mome mump
snot tone
nidi dorr
dags gird
friz fley
gent tilt
show what
tout doat
rift fact
visa cave
dens irid
myna amyl
fill film
kudo dirk
feet fibs
move nene
yank yech
been wide
irid card
meet seem
shiv vein
mids isms
card cent
loon lorn
clod dona
dips dipt
mows maws
bond duds...

output:

wrongful
pummelos
concents
gridiron
darnings
frenzily
settling
woolhats
outacted
craftier
achieves
nitrides
cyclamen
flimsily
drouking
beefiest
envenoms
hackneys
bewinged
carditic
esteemed
vixenish
misdeeds
crenated
rosinols
colander
dippiest
woomeras
disbound
peacocks
trawlnet
meatuses
tenderer
con...

result:

ok OK

Test #21:

score: 100
Accepted
time: 1119ms
memory: 80780kb

input:

password
9989
manacles
pastromi
squarely
fetterer
anatoxin
bilberry
demagogs
libelers
scarphed
berretta
birdings
diapered
evincive
mannered
unfilmed
misprize
strikers
abductee
ovariole
eyeholes
clotting
wooingly
locutory
doorknob
pitiless
extruded
repugned
quiniela
heroizes
ravagers
crispers
sixpenn...

output:

calm casa clan
tamp trop mots
quey ruly rays
feet reft tref
taxa naan anon
yirr byrl birr
agog dago gads
bill sill libs
pech hard daps
batt bate beat
ibis irid dins
padi died pard
vive vice even
nene deem mead
fume fund film
zips miri perm
tsks skis irks
baud duct cube
viol olio vail
holy hoys eyes
...

input:

keys
59915
vavs vase
fids heft
alms slim
clam mils
mons corm
corn runs
kola kelp
duds down
tush thug
rath harl
puss cuss
tads dals
born boar
form boom
heme mete
gogo urge
hall hyla
cant sect
toke beck
gems tugs
daft safe
mola moss
feud fave
heel hale
litu unai
guck pung
koto woos
path opah
puny yuch...

output:

aversive
redshift
melanins
classism
sermonic
cornuses
soaplike
swounded
huntings
slathers
specious
dilators
reobtain
foreboom
meshiest
gorgeous
phyllary
scantier
brockets
augments
drafters
oralisms
favoured
haleness
nautilus
kingcups
kotowers
hardtops
punchily
dindling
coniosis
knitwear
shkotzim
run...

result:

ok OK

Test #22:

score: 100
Accepted
time: 1118ms
memory: 80644kb

input:

password
9992
seatwork
hominian
liqueurs
clomping
repliers
hulloaed
fallowed
dialyzed
fireless
vaqueros
neumatic
creamier
moneyers
hilliest
cravings
quezales
reenacts
myrmidon
hacklers
morainal
inbursts
headland
motility
handbell
consumed
enduring
counties
herrying
faltboat
feldsher
blowiest
robotic...

output:

woke weak weka
ohia mini anon
sulu slur rule
glom comp glop
peel lips pile
hull hold hued
flaw fado wolf
didy lazy adze
fess firs file
vaus voes vase
cunt neum mute
carr cram acme
eyen rosy yore
hili tell sell
vigs vans scag
zees laze saul
cant cast arcs
immy momi yond
lakh cark cake
anoa limo marl
...

input:

keys
59935
yell tell
orra raia
moly tyee
that cash
ajar jack
beer beet
tofu deft
hail chic
purr spiv
atap ball
forb flab
wore brrr
amid meed
bank flak
boss barn
pill mell
hums hurt
suds duly
sics cels
mist mitt
linn mold
pyic icky
stet sots
grot ghat
exec cate
purr park
spiv saps
hawk wham
djin jato...

output:

retrally
rasorial
motleyer
attaches
jackaroo
begetter
outfired
chalices
provirus
trapball
fordable
burrower
dreamier
blackfin
baroness
impeller
mistruth
cussedly
licenses
mistiest
mandolin
picnicky
stertors
shortage
execrate
larkspur
parvises
hawkmoth
adjoints
ballyhoo
gharials
escapers
airsheds
tup...

result:

ok OK

Test #23:

score: 100
Accepted
time: 1129ms
memory: 80572kb

input:

password
10000
tornados
overwise
martagon
pleasers
doggones
photonic
monishes
affirmed
monogamy
timorous
coinvent
prodigal
misstart
kailyard
decreers
chabouks
agronomy
grossest
movement
medusoid
floccose
caecally
arenites
gabelled
fervency
tableted
marasmus
cowberry
brokages
supermom
bellbird
outspa...

output:

door dost soon
vows view wees
agma grot morn
peel saps sals
gogo gods geds
coho phon onto
mhos hons isms
miff daff deaf
gamy ammo mony
moot stum rums
vent conn etic
gorp glad gaol
matt mart sims
alky kadi arak
cede cees dees
chub bock auks
gamy gory myna
grot segs ogre
move meme vent
duds meou modi
...

input:

keys
59903
fees corf
bobs hobs
tidy yodh
curt vert
vend cove
boyo byte
gink skeg
hurl furl
soys oyes
upon puna
gaum yuga
clag gave
thro hoot
gleg gigs
pika knop
doss lids
chit hell
gley gyre
hern coho
sync coda
then thio
hurl halm
door coho
vavs voes
mayo tall
dibs bads
rook crow
land delt
ilia alba...

output:

frescoer
nabobish
holytide
curveted
convened
tabooley
kennings
cheerful
oxysomes
eupnoeas
autogamy
cleavage
soothers
gigglers
polkaing
soldiers
chillest
glyceric
schooner
cyanosed
thornier
haulmier
trochoid
oversave
tomalley
banished
cockcrow
antlered
albizzia
corbinas
motordom
backwrap
moronism
cus...

result:

ok OK