ICPC 2010 · Problem J · by millions of
Statement
ntry around the
eating chocola ites: some wou ifficult to deter e and for all!
bar. The bar co two pieces alon g pieces in the s late that has a s f all of it can be
that a chocolate tively, by brea
F
s, each describ ≤ 15), the num wo integers x an ers, giving the n
ning the intege
number. Then sible, and “No” blem J
Choco
ID: choco
f people around e world.
ate is to share i uld like more a rmine whether
onsists of same ng a division b same manner. specified numb e distributed to
e bar consistin aking it 3 times
Figure 9
ing a chocolate mber of parts in nd y (1 ≤ x, y ≤ number of piec
er zero.
display wheth ” otherwise. Fo
Output for
Case 1:
Case 2:
J
late
olate
d the world eve
it with friends. and others less r their demands
e-sized rectang between rows o Each of your f ber of pieces. Y o your friends,
g of 3 × 4 pie s. (This corresp
e bar to share. nto which the b ≤ 100), the dim ces that are sup
her it is possible ollow the forma
r the Sample
Yes
No
ery day. It is a
Unfortunately of the chocola s can be met. It
gular pieces. To or columns of t friends insists o You are a little with none left
eces can be spli ponds to the fir
Each descripti bar is supposed mensions of the pposed to be in
e to break the c at of the sampl
e Input
truly universal
y, your friends te that you offe t is time to writ
o share the the bar. You on a getting a bit insistent as over.
it into 4 parts rst sample
ion starts with a d to be split. chocolate bar. n each of the n
chocolate in th le output. l
fer te
s
a
he This page intentionally left blank.
No official solution in the source collection.