Senior Division Solutions



Download 8.57 Kb.
Date26.05.2017
Size8.57 Kb.
#19134
ACSL

Contest #2


2014 - 2015
American Computer Science League

Senior Division Solutions


  1. Prefix/Infix/Postfix


A + B * ( C + A2 ) – B / ( C + A) = A + B * ( C A 2 ↑ + ) – B / ( C A + )

= A + (B C A 2 ↑ + *) – (B C A + /)

= (A B C A 2 ↑ + * +) – (B C A + /)

= A B C A 2 ↑ + * + B C A + / −








1. As shown


  1. Bit-String Flicking

(LSHIFT-2 (RSHIFT-1 01101)) OR

( (LCIRC-2 (RSHIFT-1 01110)) AND (NOT 01100))

= (LSHIFT-2 00110) OR (LCIRC-2 00111 AND 10011)

= 11000 OR (11100 AND 10011)

= 11000 OR 10000

= 11000




4. Bit-String Flicking

Let X = abcde

LHS = (RCIRC-2 (LSHIFT-1 (NOT X)))

= (RCIRC-2 (LSHIFT-1 (NOT acde)))

= (RCIRC-2 (LSHIFT-1 ABCDE))

= (RCIRC-2 BCDE0)

= E0BCD

If E0BCD = 00101, then E = 0 (e = 1), B = 1 (b = 0), C = 0 (c = 1), D = 1 (d = 0).



So X = *0101 and there are 2 solutions.

  1. LISP

(ADD (MULT 3 (EXP 2 3))(MULT(EXP 2 2)(SUB(MULT 5 3) 6))(EXP 2 (SUB(9 3))))

= (ADD (MULT 3 8)(MULT 4 (SUB 15 6))(EXP 2 6))

= (ADD 24 (MULT 4 9) 64)

= (ADD 24 36 64)

= 124


5. 124

4. 2

3. 11000

2. Prefix/Infix/Postfix


− # * 8 6 / 4 2 − @ * @ 9 4 3 * ↑ 5 2 2 ↑ # 8 2 3

= − # (* 8 6 )(/ 4 2) − @ * (@ 9 4) 3 * (↑ 5 2 ) 2 ↑ (# 8 2) 3

= − (# 48 2) − @ (* 6 3 ) (* 25 2) ( ↑ 5 3)

= − 25 – (@ 18 50) 125 = − 25 (– 30 125) = − 25 -95 = 120








2. 120

Directory: ourpages -> auto -> 2017
2017 -> Avant garde adademy of broward
2017 -> Have you always wanted to go to space camp? Dreamt of becoming an astronaut here’s your chance!
2017 -> Atlanta, georgia-april 2017-a total solar eclipse occurs when the moon lines up between the earth and the sun-an extremely rare and beautiful event
2017 -> United states history and geography unit 1: The Rise of Industrial America 1877-1914
2017 -> 1. 1: Analyzing Categorical Data
2017 -> Out-of-Field Notification to Parents/Guardians English
2017 -> Modern History Notes 9-21-2017 Entertainment
2017 -> The secret of change is to focus all of your energy, not on fighting the old, but on building the new
2017 -> The Berlin Conference 1884 Simulation Historical Context
2017 -> Island Biogeography and Biodiversity Part I: Background Reading

Download 8.57 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page