=#"8 8 &>+?7&
J-88*<-8/H(3358/L*,/;K+3H+6*4-7,/-3/)(H-/L,(<,*))*4+(3/-4_(7/-3
)(H-/;-647,-
*MMXS"T T UFUJKN
rEAd
N::X5GeG6CG64:32@4G745G<C@CAX3@45
ProG
N::X5GeG6CG<@1T@CAAC3;18G745G<C@CAX3@45G7>483@94G43G74G51@3;4
(174G7>C::X5GeG6CG<@1T@CAAC3;18G745G<C@CAX3@45G
CodE
7>483@94G43G74G51@3;4
P.CodE
H@1T@CAAC3;18G7a28G812D4C2G:174G7aC::X5
SiMUL
N::X5GeG6CG5;A26C3;18G7aCBB;:UCT4
GEnE
N::X5GeG6CG5;A26C3;18G74G6CG51@3;4GC8C61T;V24
CLEAr
&BBC:4A483G745GC6C@A45GA9A1@;5945
CLr.tA
O2<<@455;18G74G6CG3C@4
&FQJUIS
InPut
N::X5GC2G5125GA482G<@1T@CAAC3;18G74G6>483@94
tYPE
'[<4G7>483@94
U
&83@94G3485;18
MA
&83@94G:12@C83G
&83@94G3485;18G43G483@94G:12@C83
CALib
(U1;PG72G:C6;=@4G3485;18
0-10
&83@94G-GeGK-GZG]12G+K-/K-Z^
300
&83@94G-GeGL--GZG]12G+L--/L--Z^
0-0. 1
&83@94G-GeGK--GAZG]12G+K--/K--AZ^
0-1
&83@94G-GeGKGZG]12G+K/fKZ^
Y9=23G74G6>9:U4664G7>483@94
d.in
S;8G74G6>9:U4664G7>483@94
F.in
(U1;PG74G6CGB18:3;18G74G3@C;34A483
Funct
W;89C;@4
LinEA.
&P3@C:3;18G74G6CG@C:;84G:C@@94
root
U
MA
W;89C@;5C3;18G5<9:;C64
Li.SPE
%1A=@4G74G<1;835G74G6;89C@;5C3;18
nb
N=5:;554G7a28G<1;83G74G6CG6;89C@;5C3;18G5<9:;C64
Axx
*VVGMWKTI
diSPL.
N::X5GC2G5125GA482G74G<@1T@CAAC3;18G74G6>CBB;:UCT4
(U1;PG74G6CG<15;3;18G74G6CGD;@T264G
Point
- - . - -
H15;3;18G74G6CGD;@T264
d.diSP
Y9=23G7>9:U4664G7>CBB;:UCT4
F.diSP
S;8G7>9:U4664G7>CBB;:UCT4
bxx
#@718894G7a28G<1;83G74G6CG6;89C@;5C3;18G5<9:;C64
Cut.oF
(23+1BBG<@1T@CAAC=64G12G<C5G
IntEG.
`87;:4G7>;839T@C3;18
$KJKDXQJIS"R9KVVGMWKTI
Pr.diS
O125GA482G74G<@1T@CAAC3;18G745G:C@C:39@;53;V245G7>CBB;:UCT4
br.diG
"9T6CT4G74G6CG62A;815;39G745G7;T;35G].G8;D4C2P^
1 1 1 1
W2A;815;39G6CG<625GBC;=64G
br.bAr
"9T6CT4G74G6CG62A;815;39G72G=C@T@C<UG43G745G6475
1 1 1 1
W2A;815;39G6CG<625GBC;=64G
L.dIG
Y4@8;4@G7;T;3G]<1;75GBC;=64^
On
Y4@8;4@G7;T;3G48G54@D;:4G
nuLL
&BBC:4A483G745Gk9@15G818G5;T8;B;:C3;B5
YES
#2;
LEdS
$%%*'5!5&;1"+*",!",*+"J
no
HC5G7>CBB4:3C3;18
tArE
W47GC662A94G5;G3C@4G48@4T;53@94
LEd6
$%%*'5!5&;1"+*",!",*+"L
no
HC5G7>CBB4:3C3;18
4444
W2A;815;39G6CG<625GB1@34
4444
W2A;815;39G6CG<625GB1@34
OFF
Y4@8;4@G7;T;3GB1@:9GeG-
%18
no
%&#