Programming Challenges 13-13
Programming Challenges 13-13
1 Getting Started 1
1.1 Getting Started With the Judge . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 The Programming Challenges Robot Judge . . . . . . . . . . 2
1.1.2 The Universidad de Valladolid Robot Judge . . . . . . . . . . 2
1.1.3 Feedback From the Judge . . . . . . . . . . . . . . . . . . . . 3
1.2 Choosing Your Weapon . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Programming Languages . . . . . . . . . . . . . . . . . . . . . 5
1.2.2 Reading Our Programs . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 Standard Input/Output . . . . . . . . . . . . . . . . . . . . . 7
1.3 Programming Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4 Elementary Data Types . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 About the Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.6.1 The 3n + 1 Problem . . . . . . . . . . . . . . . . . . . . . . . 15
1.6.2 Minesweeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6.3 The Trip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.6.4 LCD Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.6.5 Graphical Editor . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.6.6 Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.6.7 Check the Check . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.6.8 Australian Voting . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.7 Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.8 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26