Competitive Programming 3: The New Lower Bound of Programming Contests

Below are my solutions to programming problems mentioned in the book. The book also has theoretical problems which I am not going to include. The book is by Steven Halim and Felix Halim and you can grab yourself a copy. If money is an issue, the first edition of the book has now been made free which you can get from the author’s website.

Introduction

Getting Started: The Easy Problems

Super Easy

Easy

Medium

Ad Hoc Problems

Game (Card)

Game (Chess)

Game (Others), Easier

Game (Others), Harder (more tedious)

  • 114 – Simulation Wizardry
  • 141 – The Spot Game
  • 220 – Othello
  • 227 – Puzzle
  • 232 – Crossword Answers
  • 339 – SameGame Simulation
  • 379 – Hi-Q
  • 584 – Bowling
  • 647 – Chutes and Ladders
  • 10363 – Tic Tac Toe
  • 10443 – Rock, Scissors, Paper
  • 10813 – Traditional BINGO
  • 10903 – Rock-Paper-Scissors Tournament

Palindrome

  • 353 – Pesky Palindromes
  • 401 – Palindromes
  • 10018 – Reverse and Add
  • 10945 – Mother bear
  • 11221 – Magic square palindromes.
  • 11309 – Counting Chaos

Anagram

  • 148 – Anagram checker
  • 156 – Ananagrams
  • 195 – Anagram
  • 454 – Anagrams
  • 630 – Anagrams (II)
  • 642 – Word Amalgamation
  • 10098 – Generating Fast

Interesting Real Life Problems, Easier

  • 161 – Traffic Lights
  • 187 – Transaction Processing
  • 362 – 18,000 Seconds Remaining
  • 637 – Booklet Printing
  • 857 – Quantiser
  • 10082 – WERTYU
  • 10191 – Longest Nap
  • 10528 – Major Scales
  • 10554 – Calories from Fat
  • 10812 – Beat the Spread!
  • 11530 – SMS Typing
  • 11945 – Financial Management
  • 11984 – A Change in Thermal Unit
  • 12195 – Jingle Composing
  • 12555 – Baby Me

Interesting Real Life Problems, Harder (more tedious)

  • 139 – Telephone Tangles
  • 145 – Gondwanaland Telecom
  • 333 – Recognizing Good ISBNs
  • 346 – Getting Chorded
  • 403 – Postscript
  • 447 – Population Explosion
  • 448 – OOPS!
  • 449 – Majoring in Scales
  • 457 – Linear Cellular Automata
  • 538 – Balancing Bank Accounts
  • 608 – Counterfeit Dollar
  • 706 – LCD Display
  • 1061 – Consanguine Calculations
  • 10415 – Eb Alto Saxophone Player
  • 10659 – Fitting Text into Slides
  • 11223 – O: dah dah dah!
  • 11743 – Credit Check
  • 12342 – Tax Calculator

Time

  • 170 – Clock Patience
  • 300 – Maya Calendar
  • 579 – Clock Hands
  • 893 – Y3K Problem
  • 10070 – Leap Year or Not Leap Year and …
  • 10339 – Watching Watches
  • 10371 – Time Zones
  • 10683 – The decadary watch
  • 11219 – How old are you?
  • 11356 – Dates
  • 11650 – Mirror Clock
  • 11677 – Alarm Clock
  • 11947 – Cancer or Scorpio
  • 11958 – Coming Home
  • 12019 – Doom’s Day Algorithm
  • 12136 – Schedule of a Married Man
  • 12148 – Electricity
  • 12439 – February 29
  • 12531 – Hours and Minutes

‘Time Waster’ Problems

  • 144 – Student Grants
  • 214 – Code Generation
  • 335 – Processing MX Records
  • 337 – Interpreting Control Sequences
  • 349 – Transferable Voting (II)
  • 381 – Making the Grade
  • 405 – Message Routing
  • 556 – Amazing
  • 603 – Parking Lot
  • 830 – Shark
  • 945 – Loading a Cargo Ship
  • 10033 – Interpreter
  • 10134 – AutoFish
  • 10142 – Australian Voting
  • 10188 – Automated Judge Script
  • 10267 – Graphical Editor
  • 10961 – Chasing After Don Giovanni
  • 11140 – Little Ali’s Little Brother!
  • 11717 – Energy Saving Microcontroller
  • 12060 – All Integer Average
  • 12085 – Mobile Casanova
  • 12608 – Garbage Collection

Data Structures and Libraries

Programming exercies involving linear data structures (and algorithms) with libraries

1D Array Manipulation

  • 230 – Borrowers
  • 394 – Mapmaker
  • 414 – Machined Surfaces
  • 467 – Synching Signals
  • 482 – Permutation Arrays
  • 591 – Box of Bricks
  • 665 – False coin
  • 755 – 487-3279
  • 10038 – Jolly Jumpers
  • 10050 – Hartals
  • 10260 – Soundex
  • 10978 – Let’s Play Magic!
  • 11093 – Just Finish it up
  • 11192 – Group Reverse
  • 11222 – Only I did it!
  • 11340 – Newspaper
  • 11496 – Musical Loop
  • 11608 – No Problem
  • 11850 – Alaska
  • 12150 – Pole Position
  • 12356 – Army Buddies

2D Array Manipulation

  • 101 – The Blocks Problem
  • 434 – Matty’s Blocks
  • 466 – Mirror, Mirror
  • 541 – Error Correction
  • 10016 – Flip-Flop the Squarelotron
  • 10703 – Free spots
  • 10855 – Rotated square
  • 10920 – Spiral Tap
  • 11040 – Add bricks in the wall
  • 11349 – Symmetric Matrix
  • 11360 – Have Fun with Matrices
  • 11581 – Grid Successors
  • 11835 – Formula 1
  • 12187 – Brothers
  • 12291 – Polyomino Composer
  • 12398 – NumPuzz I

One thought on “Competitive Programming 3: The New Lower Bound of Programming Contests”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: