Skip to content

Commit d03f90c

Browse files
committed
add more Kattis problems
1 parent 052e802 commit d03f90c

8 files changed

+75
-27
lines changed

notebooks/Ch02-1-Data-Variables-StdIO.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,8 @@
12931293
"- R2 - [https://open.kattis.com/problems/r2](https://open.kattis.com/problems/r2)\n",
12941294
"- Amerískur vinnustaður - [https://open.kattis.com/problems/ameriskur](https://open.kattis.com/problems/ameriskur)\n",
12951295
"- Fifa - [https://open.kattis.com/problems/fifa](https://open.kattis.com/problems/fifa)\n",
1296-
"- Diggy Hole - https://open.kattis.com/problems/grafaholur\n"
1296+
"- Diggy Hole - https://open.kattis.com/problems/grafaholur\n",
1297+
"- Dannebrog - https://open.kattis.com/problems/dannebrog\n"
12971298
]
12981299
},
12991300
{

notebooks/Ch04-Conditionals.ipynb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@
895895
"- Almost every problem involve some form of conditional statements\n",
896896
"- The following problems are good examples of conditional statements and the concepts covered so far:\n",
897897
"\n",
898+
"- Elevators - https://open.kattis.com/problems/elevators\n",
898899
"- Veður - Vindhraði - [https://open.kattis.com/problems/vedurvindhradi](https://open.kattis.com/problems/vedurvindhradi)\n",
899900
"- A Terrible Fortress - https://open.kattis.com/problems/aterriblefortress\n",
900901
"- Úllen dúllen doff - [https://open.kattis.com/problems/ullendullendoff](https://open.kattis.com/problems/ullendullendoff)\n",
@@ -904,6 +905,10 @@
904905
"- Staying Frosty https://open.kattis.com/problems/stayingfrosty\n",
905906
"- Wake up call https://open.kattis.com/problems/wakeupcall\n",
906907
"- Pigeon-holes - https://open.kattis.com/problems/dufuskuffur\n",
908+
"- Driving Dilemma - https://open.kattis.com/problems/drivingdilemma\n",
909+
"- L33T H4X0R - https://open.kattis.com/problems/l33th4x0r\n",
910+
"\n",
911+
"\n",
907912
"\n"
908913
]
909914
},

notebooks/Ch05-Iterations.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,13 @@
936936
"- Cups and Balls - https://open.kattis.com/problems/cupsandballs\n",
937937
"- Pneultimate Ice Cream - https://open.kattis.com/problems/pneultimateicecream\n",
938938
"- Number Reduction - https://open.kattis.com/problems/numberreduction\n",
939-
"\n"
939+
"- Sum of the Year - https://open.kattis.com/problems/sumoftheyear\n",
940+
"- km/h - https://open.kattis.com/problems/kmh\n",
941+
"- Is Everybody Appy - https://open.kattis.com/problems/appy\n",
942+
"- Fancy Frames - https://open.kattis.com/problems/fancyframes\n",
943+
" - Hints: Loops and string\n",
944+
"- Sort of Sort - https://open.kattis.com/problems/sortofsort\n",
945+
" - Hint: print first all the sorted elements to the end; skip if smaller than the last printed"
940946
]
941947
},
942948
{

notebooks/Ch06-Strings.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,12 @@
20102010
"- Image Decoding - https://open.kattis.com/problems/imagedecoding\n",
20112011
"- Viðsnúningur - [https://open.kattis.com/problems/vidsnuningur](https://open.kattis.com/problems/vidsnuningur)\n",
20122012
"- File Extension - https://open.kattis.com/problems/nafnauki\n",
2013-
"- Getting Wood - https://open.kattis.com/problems/gettingwood"
2013+
"- Getting Wood - https://open.kattis.com/problems/gettingwood\n",
2014+
"- Hexaphobic Square - https://open.kattis.com/problems/hexaphobicsquare\n",
2015+
"- Danish Date Format - https://open.kattis.com/problems/danishdateformat\n",
2016+
"- Attempted Alphabet - https://open.kattis.com/problems/attemptedalphabet\n",
2017+
"- Alphabet Soup - https://open.kattis.com/problems/alphabetsoup\n",
2018+
"- Free-Form Input - https://open.kattis.com/problems/freeforminput\n"
20142019
]
20152020
},
20162021
{

notebooks/Ch08-1-Lists.ipynb

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,17 +2803,23 @@
28032803
"## Kattis problems\n",
28042804
"- the following Kattis problems can be solved using list\n",
28052805
"\n",
2806-
"\n",
2807-
"1. Dice Game - https://open.kattis.com/problems/dicegame\n",
2808-
"2. Height Ordering - https://open.kattis.com/problems/height\n",
2809-
"3. What does the fox say? - https://open.kattis.com/problems/whatdoesthefoxsay\n",
2810-
"4. Army Strength (Easy) - https://open.kattis.com/problems/armystrengtheasy\n",
2811-
"5. Army Strength (Hard) - https://open.kattis.com/problems/armystrengthhard\n",
2812-
"6. Black Friday - https://open.kattis.com/problems/blackfriday\n",
2806+
"- Culture Shock - https://open.kattis.com/problems/cultureshock\n",
2807+
"- Dice Game - https://open.kattis.com/problems/dicegame\n",
2808+
"- Height Ordering - https://open.kattis.com/problems/height\n",
2809+
"- What does the fox say? - https://open.kattis.com/problems/whatdoesthefoxsay\n",
2810+
"- Army Strength (Easy) - https://open.kattis.com/problems/armystrengtheasy\n",
2811+
"- Army Strength (Hard) - https://open.kattis.com/problems/armystrengthhard\n",
2812+
"- Black Friday - https://open.kattis.com/problems/blackfriday\n",
2813+
"- E-Clips - https://open.kattis.com/problems/eclips\n",
2814+
"- Exact Change - https://open.kattis.com/problems/exactchange\n",
2815+
"- Oddities - https://open.kattis.com/problems/oddities\n",
2816+
" - Hint: use two loops, division and modulo\n",
2817+
"- Tic-Tac-Toe Solver - https://open.kattis.com/problems/tictactoesolver\n",
2818+
" - Hint: 2-D List or List of strings - simply check 8 winning ways from each X or O char - just like in tic-tac-toe\n",
28132819
"\n",
28142820
"### List sorting with two keys\n",
2815-
"1. Roll Call - https://open.kattis.com/problems/rollcall\n",
2816-
"2. Cooking Water - https://open.kattis.com/problems/cookingwater\n"
2821+
"- Roll Call - https://open.kattis.com/problems/rollcall\n",
2822+
"- Cooking Water - https://open.kattis.com/problems/cookingwater"
28172823
]
28182824
},
28192825
{

notebooks/Ch09-1-Dictionaries.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,8 @@
11101110
"- Hardwood Species - https://open.kattis.com/problems/hardwoodspecies\n",
11111111
"- Conformity - https://open.kattis.com/problems/conformity\n",
11121112
"- Galactic Collegiate Programming Contest - https://open.kattis.com/problems/gcpc\n",
1113-
"- Simplicity - https://open.kattis.com/problems/simplicity"
1113+
"- Simplicity - https://open.kattis.com/problems/simplicity\n",
1114+
"- Dialling Digits - https://open.kattis.com/problems/diallingdigits"
11141115
]
11151116
},
11161117
{

notebooks/Ch09-2-Built-in-DataStructures.ipynb

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,31 +2110,40 @@
21102110
"### Kattis problems\n",
21112111
"- Some kattis problems that can be solved using Python built-in data structures\n",
21122112
"\n",
2113-
"1. sort - https://open.kattis.com/problems/sort\n",
2114-
"2. Trending Topic - https://open.kattis.com/problems/trendingtopic\n",
2115-
"3. FizzBuzz2 - https://open.kattis.com/problems/fizzbuzz2\n",
2116-
"4. CD - https://open.kattis.com/problems/cd \n",
2113+
"- Midjan - https://open.kattis.com/problems/midjan\n",
2114+
" - Hint: set differences\n",
2115+
"- sort - https://open.kattis.com/problems/sort\n",
2116+
"- Tag - https://open.kattis.com/problems/jage\n",
2117+
" - Hint: use two sets to simulate hunters and cheaters\n",
2118+
" - print the sorted cheaters after simulation\n",
2119+
"- Trending Topic - https://open.kattis.com/problems/trendingtopic\n",
2120+
"- FizzBuzz2 - https://open.kattis.com/problems/fizzbuzz2\n",
2121+
"- CD - https://open.kattis.com/problems/cd \n",
21172122
" - Hint: implement set intersection of sorted list; don't use built-in set as it's slower for Python\n",
2118-
"5. Keyboardd - https://open.kattis.com/problems/keyboardd\n",
2123+
"- Keyboardd - https://open.kattis.com/problems/keyboardd\n",
21192124
" - Hint: two Counters; print the difference\n",
2120-
"6. Course Scheduling - https://open.kattis.com/problems/coursescheduling\n",
2125+
"- Course Scheduling - https://open.kattis.com/problems/coursescheduling\n",
21212126
" - Hint: Counter of courses, defaultdict(set) of courseToStudents\n",
2122-
"7. Train Boarding - https://open.kattis.com/problems/trainboarding\n",
2127+
"- Train Boarding - https://open.kattis.com/problems/trainboarding\n",
21232128
" - Hint: Counter or List \n",
2124-
"8. Shopping List - https://open.kattis.com/problems/shoppinglist\n",
2129+
"- Shopping List - https://open.kattis.com/problems/shoppinglist\n",
21252130
" - Hint: Use set to keep track of intersection and sort the final list \n",
2126-
"9. Knigs of the Forest - https://open.kattis.com/problems/knigsoftheforest\n",
2131+
"- Knigs of the Forest - https://open.kattis.com/problems/knigsoftheforest\n",
21272132
" - Hint: sort contestents based on year and use priority queue keeping K contestents per year and finding the winner\n",
2128-
"10. Seven Wonders - https://open.kattis.com/problems/sevenwonders\n",
2133+
"- Seven Wonders - https://open.kattis.com/problems/sevenwonders\n",
21292134
" - Hint: Counter\n",
2130-
"11. Select Group - https://open.kattis.com/problems/selectgroup\n",
2135+
"- Select Group - https://open.kattis.com/problems/selectgroup\n",
21312136
" - Stack for RPN parsing and Set\n",
2132-
"12. Zipf's Law - https://open.kattis.com/problems/zipfslaw\n",
2137+
"- Zipf's Law - https://open.kattis.com/problems/zipfslaw\n",
21332138
" - Use Counter to store frequency of each word\n",
21342139
" - parse character by character and ignore words with length 1\n",
21352140
" - words contain only alphabets; ignore case; multiple test cases in input\n",
2136-
"13. Jane Eyre - https://open.kattis.com/problems/janeeyre\n",
2137-
" - Simulate using Priority Queue and a sorted list of gifts or two sorted lists of books less than Jane Eyre"
2141+
"- Jane Eyre - https://open.kattis.com/problems/janeeyre\n",
2142+
" - Simulate using Priority Queue and a sorted list of gifts or two sorted lists of books less than Jane Eyre\n",
2143+
"- Overnight Oats - https://open.kattis.com/problems/overnightoats\n",
2144+
" - Use a deque to simulate the process of adding and eating oats\n",
2145+
"- Bank Closing - https://open.kattis.com/problems/bankclosing\n",
2146+
" - min proiroty queue to simulate the process"
21382147
]
21392148
},
21402149
{

notebooks/Ch14-OOP.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,21 @@
11461146
"# because of exception due to invalid grades, class_grades_invalid object is never created\n",
11471147
"print(class_grades_invalid.grades)"
11481148
]
1149+
},
1150+
{
1151+
"cell_type": "markdown",
1152+
"metadata": {},
1153+
"source": [
1154+
"## Kattis Problems\n",
1155+
"\n",
1156+
"- Premier Leagure Table - https://open.kattis.com/problems/premierleague\n",
1157+
" - Hint: use class to represent each team with relevant attributes and methods"
1158+
]
1159+
},
1160+
{
1161+
"cell_type": "markdown",
1162+
"metadata": {},
1163+
"source": []
11491164
}
11501165
],
11511166
"metadata": {

0 commit comments

Comments
 (0)