Programming Meeting Slides

12
7/18/2019 Programming Meeting Slides http://slidepdf.com/reader/full/programming-meeting-slides 1/12 break; return; // to school :’(

description

Meeting Slides for a Meeting at school

Transcript of Programming Meeting Slides

Page 1: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 1/12

break;return; // to school :’(

Page 2: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 2/12

PotW Solution• Problem recap: Write a Befunge program thatprints out a Brain**** program that prints out aHQ9+ program that prints out Hello! "orl#$%&o HQ9+ program output b' Brain**** program is H%

o Brain**** program output b' Befunge program ma' be ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++& (inclu#ing the #ot at the en#; thereare #ierent "a's to "rite this program but this is the simplest)

o an' "a's to approach Befunge program

Page 3: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 3/12

Example Solutions• , characters (-n#re" Wang)89* v

,"+"-1_v#:<

  "

  .

  "

  ,

  @

• .9 characters (on' 0iang)89*>: v

  ^ , "+"-1_".",@

• .1 characters (2te3en Hao)"#>56++v

,:| >

  @

Page 4: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 4/12

Announcements• Pro4o on a' 5! 6- 7 8Po egistration is temporaril' full% until more space is foun#! but there’s

a "aiting list 'ou can sign up for at http://proco&stanfor#&e#u&

• 2 pen/2-4 results

o 4ongratulations to 2te3en Hao an# 0ohnn' Ho for placing n#

 an# 1r#

 inthe countr' for 2 pen <ol# #i3ision$

o ='nbroo> stu#ents #i# 3er' "ell in this 'ear’s o3erall 2-4 ran>ings$(0ohnn' Ho .st in <ol#! 2te3en Hao 9th in <ol#! < 4hi .9th in <ol#!Qing?i @eng n# in 2il3er! Aaren u'ang th in 2il3er! 0ulia Huang .6th in2il3er)

o Au#os to e3er'one "ho consistentl' participate# in 2-4 this 'ear$

• 2-4 Cinalistso 2pecial congratulations to 2te3en Hao for ?ualif'ing for the 2-4

camp$

o h! an# 0ohnn' too&

Page 5: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 5/12

Officer Applications•  his 'ear’s oDcer application "ill be ma#ea3ailable to#a'$o 4hec> the "ebsite (http://l'nbroo>cs&com); also "ill be emaile#

• Eue on on#a'! a' . at ..:89:89 Po esults "ill be announce# on on#a'! a' 1

• 2ame oDcer positions as this 'ear:o . presi#ent

o . 3ice presi#ent

o . secretar'

o . treasurer

Page 6: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 6/12

US Open=et’s ha3e a loo> at some of the problems$

Page 7: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 7/12

Bronze – Three Lines• <i3en a set of up to n FG 8,,,, co"s on the IJ plane

"ith integer coor#inates! #etermine if it is possible toco3er all the co"s "ith three horiKontal or 3ertical lines&

• 4reate histogram% of ho" man' times each #istinct 'I

coor#inate appears as "ell as ho" man' #istinct 'Icoor#inates there areo 4oor#inates ma' ha3e to be compresse#% Lrst: normaliKe the coor#inates to be

"ithin the range M,! N) (or use Hashap)

• 4hec> cases of "hat points can be co3ere# b':o 1 horiKontal lines: Passes if number of #istinct 'Icoor#inates is as most 1

o horiKontal! . 3ertical: 2ort points on O! for each #istinct OIcoor#inate remo3eall points "ith that OIcoor#inate (simulating 3ertical line there)! test if number of#istinct 'Icoor#inates #rops to at most

o ther t"o cases i#entical to these t"o! eOcept s"ap O% an# '%

Page 8: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 8/12

Silver – Unlocking Blocks• <i3en the shapes an# locations of three obects

(represente# as series of the coor#inates for thein#i3i#ual boOes that form the shapes)! #eterminethe minimum number of sli#es (one object moved

one tile north, east, south, or west) nee#e# toseparate the bloc>s (bounding boxes no longeroverlap)&

Page 9: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 9/12

Silver – Unlocking Blocks• se #epth/brea#thILrst search: Ln# path from

initial state to state "/ #isoint boun#ing boOeso 2ince "e are not loo>ing for an' particular path! an' of these graph

search algorithms "or>s

epresent state "ith integers (O an# ' osets ofobects an# 1 from their original positions)o ach mo3e consists of a##ing/subtracting . from one of these

numbers! or a##ing/subtracting . from both OIcoor#inates or both 'Icoor#inates (representing obect . being mo3e#)

EC2/BC2 ma' ?uic>l' branch out but obects an#coor#inates are small so it’s o>a'

Page 10: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 10/12

 Gold – Tied Down• <i3en n FG ., poles stuc> in the groun# an# a

string that "raps aroun# them! Ln# the minimumnumber of poles that must be remo3e# before thestring can be untangle#o b3iousl'! the string cannot pass through poles unless the' are

remo3e#

o  he poles are con3enientl' all on the same line (same OIcoor#inate)

•  r' remo3ing all ., subsets of the poleso Cin# ' coor#inates of intersections bet"een the string an# the line

o se a stac> to simplif' the crossings as 'ou tra3erse the stringo Rf a string crosses across one portion of the line an# then imme#iatel'

returns across the same portion! the string "ill then un"rap

o Rf the stac> is completel' emptie# b' the time the entire string hasbeen tra3erse#! the string can be untangle#

Page 11: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 11/12

 Gold – Tied Down

Page 12: Programming Meeting Slides

7/18/2019 Programming Meeting Slides

http://slidepdf.com/reader/full/programming-meeting-slides 12/12

PotW• No PotW this "ee> 7 stu#' for -P eOams if 'ou’re

ta>ing an'$ (or Lnish that -P =it research paperS)

•  he Befunge problem mar>s the last PotW of thisschool 'ear (or #oes itT)