/
Programming Contests Programming Contests

Programming Contests - PowerPoint Presentation

liane-varnes
liane-varnes . @liane-varnes
Follow
391 views
Uploaded On 2017-04-03

Programming Contests - PPT Presentation

The agony and the ecstasy Guiding Principle You are only as good as the set of problems that you can solve You can solve a problem if you HAVE solved it Brief History The ACM International Collegiate Programming Contest ICPC traces its roots to a competition held at Texas AampM Universit ID: 533090

contest teams team regional teams contest regional team compete uva university utd petersburg 2007 lsu 2009 cut word words

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Programming Contests" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Programming Contests

The agony and the ecstasySlide2

Guiding Principle

You are only as good as the set of problems that you can solve.

You can solve a problem if you HAVE solved it.Slide3

Brief History

The ACM International Collegiate Programming Contest, ICPC, traces its roots to a competition held at Texas A&M University in 1970 hosted by the Alpha Chapter of the Upsilon Pi Epsilon Computer Science Honor Society (UPE). The contest evolved into its present form as a multi-tier competition in 1977, with the first finals held in conjunction with the ACM Computer Science Conference.

(ACM student leaders, others, think about a UPE chapter at UTD).Slide4

Contest Format

One computer, three students, five hours, 8-10 problems.

Usually a Linux based OS with the PC^2 online submission system.

Multiple

IDEs

, editors.

Java, C/C++Slide5

The ACM ICPC South Central Regional

Each year in November 60 – 80 teams compete in the 3-state (TX, LA, OK) Regional Contest. Worldwide, over 6000 teams from 1800 universities in 82 countries compete in their local Regional Contests.

Depending on the number of teams competing at our Regional Contest, one or two teams go to the World Finals. Slide6

UTD’s success

We’ve been competing for over 10 years. Here are our best team placements for the past 9 years in the ACM South Central Regional Contest:

2000: 7th 2005: 2nd

2001: 4th 2006: 1st

2002: 13

th

2007: 14th

2003: 4th 2008: 5th

2004: 13th 2009: 10thSlide7

The 2009 South Central Regional Results

Number

of Problems solved

Number of Teams

7

1

6

1

5

1

4

5

3

4 UTD solved 327110044

73 teams competedSlide8

World Finals

The World Finals have been held in Hawaii, St. Petersburg Russia,

Berverly

Hills CA, San Antonio TX, Shanghai China, Prague The Check Republic, Tokyo Japan, Vancouver Canada, Stockholm Sweden, Banff Canada, and this year they will be held at Harbin University, China.Slide9

Winners, top US Teams:

Year

Winner

Best Placed US team

Best placed team from our region

2000

St. Petersburg UITMO

California IT, 9th

UT, HM

2001

St. Petersburg UITMO

Virginia Tech, 2nd

UT, HM

2002

Shanghai Jiao

Tong

MIT, 2nd

UT, 27+

2003

Warsaw, Poland

California IT, 13th

UT,21+

2004

St. Petersburg UITMO

MIT, 5th

TAM, HM

2005

Shanghai Jiao Tong

U of Illinois, 17th

UT, HM

2006

Saratov State

MIT, 8th

Rice, HM

2007

Warsaw, Poland

MIT, 4th

UT Dallas, 14th

2008

St. Petersburg SU

MIT, 4th

UT, HM

2009

St. Petersburg SU

MIT, 7th

UT, 49+

2010Slide10

Big Winners

Wins

Institution

Most Recent

3

Saint Petersburg University of Information Technologies, Mechanics

and Optics

2009

3

Stanford University

1991

2

University of Warsaw

20072

Shanghai Jiao Tong University

2006

2

Saint Petersburg State University

2001

2

University of Waterloo

1999

2

California Institute of Technology

1988

2

Washington University in St. Louis

1980Slide11

Winners By Country

Wins

Country

Most Recent

17

USA

1997

6

Russia

2009

2

Poland

2007

2China20052Canada

1999

1

Czech Republic

1998

1

Germany

1995

1

Australia

1992

1

New Zealand

1990Slide12

2007, Tokyo: Getting Ready!Slide13

The UTD Dream TeamSlide14

The 2007 Winners from WarsawSlide15

UTD Heroes

1999: A group of UTD students take a Greyhound Bus to Baton Rouge to compete in the the ACM ICPC Regional Contest at LSU. It’s raining when they arrive. They call LSU and get an IT technician to give them a ride to the university. They sleep on the floor in Coates Hall at LSU and compete the next day. With no coach, they cannot officially compete. They don’t even stay for the banquet and results – they have to catch the bus back to Dallas.

Their story becomes a legend of the LSU Regional Contests and is still told by the Contest Organizer at LSU.Slide16

My Role

2000: Students ask me to coach them. I begin holding local contests at UTD and taking 3 teams to LSU. We fly to Baton Rouge, once in a prop plane. We fly to New Orleans and drive 60 miles. We drive all the way.

The reward for taking part? I take the teams to Bourbon Street after each contest.

2006-2009: Regional contests go distributed and we compete at UT Arlington, East Central Oklahoma U, Baylor U, Le Tourneau U, resp. Slide17

The Dream Team is Formed

2005: Hurricane Katrina devastates LA. The number of contestants is way down in our region.

Matthew

Dempsky

and Michelle Berger, together with one other, compete at LSU and get 2

nd

place. We were the top placed team in the world not to go to the World Finals (held in San Antonio, TX.)

2006: Jack

Lindamood

joins UTD as a MS CS student. He competes in my local UTD contests as a team of 1. Matthew and Michelle compete as a team of 2. The 2 teams alternate winning. I put the three together and they win the Regional Contest that year.Slide18

The Glory Year

2007: Jack, Matthew and Michelle get 14

th

place in the World Finals in Tokyo – the highest place so far for any team from our region, 3

rd

among USA teams, 5

th

among North and South American teams.

The TX house of Representatives passes a resolution in honor of our team’s success (motion made by Fred Hill)Slide19

The Problems

There are literally thousands of problems at many web archives. And there are many automatic online judges that will try your solutions and keep statistics of your successes.

We will consider just a few.Slide20

Scope of the Problems

Arithmetic, modulo arithmetic, number theory, combinatorics, probability theory, algebra, trees, graphs, mechanics, geometry, data structures.

Programming styles: Brute force, backtracking, greedy methods, divide and conquer, dynamic programming.

The book: Programming Challenges, Steven S. Skiena, Miguel A Revilla, Springer.

The way to learn: Join Codeburners and Compete.Slide21

Common Permutation: UVa 10252

Given two strings of lowercase letters, a and b, print the longest string x of lowercase letters such that there is a permutation of x that is a subsequence of a and there is a permutation of x that is a subsequence of b.

Sample Input Sample output

the et

streetSlide22

Stack of Flapjacks: UVa 120

Given the diameters of flapjacks in a pile, short them into size order, smallest at the top, using a minimum number of flips:

Flip: Insert a spatula somewhere in the pile and flip the pile of those above the spatula:

2 3 1

3

-> 2 -> 2

1

1

3

4 4 4Slide23

Vito’s Family: UVa 10041

Vito has a very big family, all living in Lamafia Avenue. He is trying to find a house close to all of them. 
Vito wants to minimize the total distance to all of them and wants you to write a program to find a location for him to live. He might have to move in with a relative. The houses are equally spaced with addresses 1,2,3,. . .

You are given a list of addresses (house numbers) of his relatives. Several may live at the same house. Slide24

The Trip: UVa 10137

A number of students take a trip together. They agree in advance to share expenses equally, but it is not practical to have them share every expense as it occurs. After the trip, each student's expenses are tallied and money is exchanged so that the net cost to each is the same, to within one cent.

Compute, from a list of expenses, the minimum amount of money that must change hands in order to equalize (within a cent) all the students' costs.Slide25

Cutting Sticks: UVa 10003

You have to cut a stick into pieces. The cost of a single cut is equal to the length of the stick being cut. The order in which cuts are made affects the total price: consider a stick of 10m that is to be cut at 2m, 4m and 7m from one end.

Cut first at 2, then 4, then 7: price = 10 + 8 + 6 = 24

Cut first at 4, then 2, then 7: price = 10 + 4 + 6 = 20.

Find an ordering for the cuts that minimizes price.Slide26

Dividing Coins: UVa 562

Given a list of of up to 100 coins, each of value in [1,500], (there can and will be repeated values) divide the coins into 2 piles such that the value difference is minimized.

For example, given the set 1, 1, 2, 3, 100, the best partition is [1,1,2,3], [100], giving a value difference of 100 - 7 = 93. Slide27

Tug of War: UVa 10032

A tug of war is to be arranged. The athletes must be divided into two teams. The memberships of the two teams must not differ by more than 1. The total weights of the two teams should be as nearly equal as possible.

Input: an unordered sequence of weights.

Output: the total weights of the two teams:

Sample Input: Sample Output:

100 190 200

90

200 Slide28

Bigger Square Please: UVa 10270

Tommy has many paper-squares of each size from 1 to N-1.

He wants to make a square of size N by tiling the

NxN

space with as few of his squares as possible. For example. A square of size 7 can be made up with 9 smaller squares, shown below.

(See

http://www.squaring.net/history_theory/brooks_smith_stone_tutte_II.html

Or Google

Mrs

Perkin’s Quilt) Slide29

2

2

1

1

2

1

3

4

3Slide30

“YO” from the 2009 Regional

Given a starting word and a dictionary, determine how many ways you could "paint over" combinations of letters in the starting word and end up with one or more correctly spelled words from the dictionary.

If a "paint over" combination produces multiple words (including the same word appearing at multiple locations in the starting word), then it is counted separately from the combinations that produce individual words. Multiple words need not be separated, and a single word may contain embedded spaces. Slide31

More YO

For example, if the dictionary contains "he" and "vet" and the starting word is "CHEVROLET", then four possible combinations can be produced:

.HE......, .H.....E., ...V...ET, .HEV...ET

However, multiple words may not overlap each other in any way. For example, the starting word "CHEVROLET" can form individual words "hoe" and "vet", but the combination of both words would not be valid.Slide32

Even more YO

Sample Input: Sample Output:

2 2

2 TOYOTA 2

toy

yo

5 CHEVROLET

does

he

like

her

programSlide33

The Next UTD Contest

We will have a 3-hour “sprint, pre-

Superbowl

” contest on Saturday, February 6

th

, from 1p – 4p, in the main computer lab on the ground floor of ECSS.

Teams of 1, 2, or 3 may compete. Bring paper, pencils, pens, text books, and notes, but do not bring any recording media, such as thumb drives, data CD’s etc. (You can bring music CD’s, iPods, etc for listening to music) You must not download or cut and paste any part of your solutions from the web.

Each team gets ONE computer. Problem sets will be distributed on paper. Judging will be online and fast. Slide34

Codeburners

To join, go to

http://groups.google.com/group/code-burners?hl=en

Or Go to my website,

www.utdallas.edu/~ivor

and click on the link to join Codeburners.

Codeburners has 210 current members.

UVa online judge:

http://uva.onlinejudge.org/index.php