Problem Set
Problem Set
The goal of this sheet is to enhance algorthmic probem solving skills for both programming competitions and interviws preparations
Currenet Version V7.0 Latest Version
This is read-access only file. Read line 31 to create your OWN COPY.
[email protected] Site
Once you are DONE with this sheet, utilize this supervision general pool or use it for ider topics-based training
For guys with interest only in preparing for interviews NOT competitiotns, use this sheet Interviews
Programming skills with prefreed ad-hoc problem solving styles (see udemy course below)
Prerequisites? Any language, but C++ us the most prefrred.
Coupons
Mastering 4 critical SKILLS using C++ 17 Specifically content till project #3
My Relevant
UDEMY courses Mastering 4 critical SKILLS using Python
- Complete and consistent roadmap for newcomers: What to solve & algorithms to learn in order
- In the bottom row, there are different sheet pages such as Faq, Topics, C2
- C1, C2 are (Codeforces Div2 C problems (or similar level from other OJs), but from easy to hard). Same for D1, D2, D3
- Covering most of topics needed up to codeforces Div2-D
- Problems of scales 1 - 5.5 / 10 + Few harder ones
What is this Sheet? - Problems increase in difficulty per topic with intermediate easy/medium problems + ad-hoc problems
- Speed problems to maintain speed goals
- A lot of recorded videos for problems solutions, especially for the entry levels (Arabic)
- Several students followed its order and managed to solve by themselves 95% of it (up to his current sheet page)
- Where are the problems? In the bottom of the sheet find Tabs: A, B, ...and so on
- You can train in one of the following ways:
- To be a strong contestant, one has to take care of a number of quality and quantitiy factors
==> This roadmap does its best to satisfy that
- Typical issues in our Arabian region: Guys with 700-1000 solved problems and still weak!
- Why?
A) No specific roadmap or keep switching between them
Advantages of this Sheet?
B) Training while knowing problem category / level
C) Focus on specific online judge
- Again, this sheet solves these issues
- Allows you to write down your statiscs to learn from them (e.g. you consume much time in debugging)
- Continuous refining based on feedback
This is a personal Google sheet for you [Make a copy from file MENU] to have sets of problems to solve coupled with algorithms to learn
NOTE: If u did so and still read-only format, then you are again opening my sheet (e.g. with old name), NOT your copy
For Whom? A junior is anyone who does't master solving codeforces Div2-D.
Skills Goals Moving from Junior Level to Semi-Senior Level: A one who do pretty well in CF-Div2 A, B, C, D and similar levels (e.g. TC-Div2-1000)
Knowledge Goals Understand and build fair knowledge in some algorithms in Number Theory, Dynamic Programming, Greedy, Graph Theory and Search
Sheet pages are mainly for Codeforces Div2 A, B, C, D + Problems on knolwdge topics (Mainly from UVA, SPOJ)
Each sheet has some sets, each set is ~10-15 problems....The top sets are mandatory....The below sets (after line mark) are optional
If you did well in the mandatory sets, move to next sheet...otherwise you still need training on similar level...then solve the optional problems
Please watch the videos in order, solve UVA/SPOJ problems in order. Don't skip them.
In some columns, some time recordings. This helps you to know how much time you take per a problem...use that to recognize your problems
Sheets In the level column give an estimate to the problem level from 1-2 (easy), 3-4 (medium), 5-6(hard), 7-8 (had to read editorials), 9-10 (can't solve)
In the comments column..write comments for hard problems.
Put problem Status AC (for Accepted) CS (can't solve) Other values: WA (wrong answer), TLE (time limit exceeded), RTE, MLE
If you solved a problem before, put ACX instead of AC. Don't resolve
Don't let a problem consumes more than 2-3 hours. If can't solve it, see editorials/solutions. If still can't solve it, just leave it for now.
Don't compare yourself with others. People vary in their progress
Div2-A => 1 - 2
Div2-B => 1.5 - 3
Div2-C => 3 - 5.5
Div2-D => 5 - 6.5
Problem Level Column
Div2-E => 6 - 7.5
Div1-D => 7 - 8.5
Div1-E => 8 - 9.75
In other words, most of the time, one shouldn't assign Div2-A problem level such as 5. But it can be: 1, 1.5, 2. Very few might be 2.5
CF136-D2-A CF (codeforces), D2 (Division 2), (136, A) is the problem URL. Note this is not Round 136 ... it is Round 97
Notations
SRM150-D2-1000 SRM 150 (Topcoder), D2 (Division 2), 1000 (3rd problem)
For Topcoder:
If using the applet arena, then we normally use SRM number (the old way)
However, if using the web arena, you need first the problem name itself! (the new way - https://arena.topcoder.com/)
The fastest way to get problem name is from the editorial if exist
For notes and tricks for using Java arena applet: See https://goo.gl/Q43tRL. We can download code with all cases on local machine and code normally.
Topcoder nowadays maybe slow. So wait for 5 min for a problem to open. If did not work, try in another day
https://codeforces.com/blog/entry/61252
Moving faster Do I have to solve every problem? For Div2 (A, B, C1) => No. If you can move faster, do it. For Non CF problems (E.g. UVA), please solve all
Others Solutions If you solved a problem, please see some other accepted solutions in codeforces. You don't need to watch my linked videos unless can't solve
Awesome Competitive Programming Many awesome links - very helpful for English guys
Ahmed Elsaghir Trainnig Ahmed is senior from GUC
A2oj Ladders Don't like my sheet? Go with Ahmed Aly Ladders
External Resources
Prgramming Ahmed M sayd Arabic Programming Playlist
External Resources
Note: If you were using version 4.X, then the major change for you is replacing "Misc" sheet with the 3 Div2-D sheets. If wanna migrate:
- Then Remove Misc sheet
- Click on the arrow for Div2-D sheets, and make copy for your sheet
V6:
- Added 3 columns to the sheet: debug time, category and by yourself columns
- Each sheet is enhanced with problems from the lower sheet (shifted from it). The purpose is to mix levels per sheet, hence allow multiple training levels in
same time (hard vs speed concern). See the new added color
- Added probability/expectations English videos/problems
- Added Topological sort problems
- Solution editorials linked to many non-CF problems / more videos in DIv2-A/Div2-B
- Add many problems where my trainees marked as interesting problems. Removed some problems that I think not that interesting or its ideas covered by
other problems (subjective). I am working on sheets with a simple, but hard to do idea: Most of the problems seems for the trainer novel in idea with less
repeated ideas, hence learning a lot while solving much less.
- Add topics based training style sheet page
V7:
- Added Topics2 (See notes there) - not intended for juniors
Thanks for all guys who sent sheet feedback: Mariam Alshereef, Magdy Hassan, Ahmed Yasser, Ahmed Elsayed Awad, Mohamed Nasser, Mostafa Ali Mansour, Aya elymany, Ayyad
shenouda, Others.
Special Thanks for Coach Alhussain Aly for his continuous help
Special Thanks for All volunteers in videos recording / editorials writing
Q) What is the sheet requirements? Should I study algorithms and Data structures?
- ONLY programming skills (e.g. Programming 1 level). It is highly advised to implement 2-3 projects
- NO for OOP
- NO for datastructures, but learn STL (or Collections in Java/C#). It helps alot
- NO for algorithms, the sheet will teach you that in a smooth way
- For C++ guys (and others as guide) - first 18 videos here: https://www.youtube.com/playlist?list=PLPt2dINI2MIZPFq6HyUB1Uhxdh1UDnZMS
- The sheet has ~900 problems. Around 60 videos. Problems targets average guys. However, you are ecnouraged to skip problems whenever you could. I expect many guys could skip 20%-30% of the
mandatory problems. Make use of the Topics page.
If you trained in the summer vacation seriously for 2 month (e.g. 10 hours * 30 days * 2 month = 600 hours) + the reamining of the year effort, you could solve the whole sheet smoothly and move to Div2-
E level goal
Q) About UVA
- Just started in Div2-A, could I finish its codeforces problems first, then solve the UVA/Colored problems?
- Many juniors find UVA problems in Div2-A hard, I understand
- Yes, almost same for DIv2-B. But don't do that in next sheets as order might matter, because all of such knowledge are mainly preparations for hard Div2-B or Div2-C
- However, following the order is a much better idea
- Similarly, one could finish All Div2-A/Div2-B codeforces problems, then solve their colored problems. Again, this is not the best way.
Q) Is using C# ok?
- Generally yes, but you won't be able to submit in UVA judge, as C# is not supported
- For such problems, write your code, but heavily test it. You may download an internet code and evalaute the test case on both
- On the other hand, learning Basic C++ + STL is not hard for C#/Java guys
- C++/Java/Python are official in UVA
- Codeforces allows more such as Javascript
Q) When I watch a video, should I solve the problems in its info section?
- No, sheet has subset of these problems already in specific order
- Sheet is self-contained
But let's go in details. Individual sucess in contests depends on several factors. Let me state some of them.
- Solving many problems of good quality
- Improving your different skills (reading, thinking, coding and accuracy).
-- 2 persons could solve in training the same problem. One got it in 20 min first submission, and the 2nd needed 90 minutes due to 60 minutes debugging.
- Healthy training: Regular / good times for training (e.g. morning) / weekly contests / reading other codes / collaboration with others / etc
- Stress management during contests
- Emotions management when fail in solving or feel performance is not improving enough
- Avoiding Psychological issues: Comparing to others, Negative feelings, Your image, Regretting trainging time
- Finish up to CF-C2 sheet, then study from the "Cracking the Coding Interview: 150 Programming Questions and Solutions" book
- Also watch: https://www.youtube.com/watch?v=39vqarATPyM
NOTE: If u did so and still read-only format, then you are again opening my sheet (e.g. with old name), NOT your copy
- This column is for the algorithm you used during solving. Usually, new guys in CF-A are confused. If so, leave it CF-A and start to write in CF-B
- The more you go in the sheet you will learn algorithms (e.g. Binary search, DP, DFS, etc). Then this what you write in level column
- The problem that has no algorithm but a specific idea called ad-hoc, This is the case for most of CF-A and less later
- Implementation: Means the problem request is almost direct, just code it
- Brute Force: Means instead of finding elegant solution, try all possible solutions (e.g. 3 nested loops) and select the solution
- Ad-hoc: Just per-problem thinking in a special way/analysis on how to solve the problem
- Please watch from this minute: https://youtu.be/DZ6YTtILCE8?t=839
That is, no one can give you a list that every problem for YOU is easier than the next problem.
In other words, If we gave 100 problems to 10 students of same level to solve and told them rank from easy to hard, they will rank them differently.
So, questions ordered by people average. The promise is, the problems will be within your range to solve.
Advantages:
- Mastering the algorithm till solving some hard problems in short time
Disadvantages:
- Discovering the algorithm behind the problem is an important skill. Given that you know the topic, you lose a good space to improve this skill
- Being in the mode of specific algorithm lets you solve many of it easier. However, when solving in real contests, your mind is not so active on specific topic
Claim:
- Although topics training let guys be so good early, they level stuck early and they don't improve. Seems to me, topics training is an important factor in doing so. Meanwhile, if you just target to be good in
Div2D level in shorter time and no interest in further competitions achievments, you may go topics based.
Q) Is it normal to re-solve a problem again and do same mistakes and take same time?
Yes, happens a lot
My Performance Notes: This is so bad performance. He thought for little time and
Sample Name2 Sample Link2 AC 1 5 10 35 20 70 2 No Impl
continued thinking while coding. As a result, much debug time too. RULE: Think More,
Code Faster
0 Watch - Intro to DP - 1
0 Watch - Intro to DP - 2
Vacations CF699-D2-C 0
Woodcutters CF545-D2-C 0
Barcode CF225-D2-C 0 Video Solution - Dr Mostafa Saad
Continents UVA 11094 0 Video Solution - Eng Ayman Salah
Brownie Points UVA 10865 0 Video Solution - Eng Magdy Hasan
Hanoi Tower TIMUS 1054 0 Sol
0
Roma and Changing
CF262-D2-B
Signs 0 Video Solution - Eng Mohamed Salah
Bear and Strings CF385-D2-B 0 Video Solution - Eng Mohamed Salah
I.O.U. CF376-D2-B 0 Video Solution - Eng Abanob Ashraf
Jeff and Periods CF352-D2-B 0 Video Solution - Eng Muntaser Abukadeja
Meeting CF144-D2-B 0 Video Solution - Eng Muntaser Abukadeja
Chocolate CF617-D2-B 0 Video Solution - Eng Yahia Ashraf
Easy Number Challenge
CF236-D2-B 0 Video Solution - Eng Yahia Ashraf
Han Solo and LazerCF514-D2-B
Gun 0 Video Solution - Eng Amr Fahmy
Physics Practical CF253-D2-B 0 Video Solution - Eng Mohamed Salah
Two Buttons CF520-D2-B 0 Video Solution - Solver to be (Java)
0
0 Watch - Computational Geometry - Complex Number and 2D Point
0 Watch - Computational Geometry - Lines and Distances
Intersecting Lines UVA 378 0
The Stern-Brocot Number
UVA 10077 0
Mr. Kitayuta's Colorful
CF505-D2-B
Graph 0 Video Solution - Eng Muntaser Abukadeja
0
DZY Loves Chemistry
CF445-D2-B 0 Video Solution - Eng Hussein Hesham
Kolya and Tanya CF584-D2-B 0 Video Solution - Eng Yahia Ashraf
Suffix Structures CF448-D2-B 0 Video Solution - Eng Mohamed Salah
Complete the WordCF716-D2-B 0 Video Solution - Eng Mohamed Salah
Submit Reading Thinking Coding Debug Total Problem By 1-2 line Comments
Problem Code Status Category
Count Time(m) Time(m) Time(m) Time(m) Time(m) Level /10 yourself? About your approach
AC Averages => 0 0 0 0 0 0 0 0 0 0 0
Sea and Islands CF544-D2-B 0 Video Solution - Eng Mohamed Salah
Hopscotch CF141-D2-B 0 Video Solution - Eng Yahia Ashraf
Valera and Contest CF369-D2-B 0 Video Solution - Eng Yahia Ashraf
Bear and FriendshipCF791-D2-B
Condition 0 Video Solution - Eng Mohamed Salah
Preparing OlympiadCF550-D2-B 0 Video Solution - SolverToBe (Java)
0
0 Watch - Focused and Diffused Thinking
0 Watch - Graph Theory - MST - Prime
0 Watch - Graph Theory - MST - Kruskal
Highways UVA 10147 0 Video Solution - Eng Mahmoud Adel
ACM contest and Blackout
UVA 10600 0 Video Solution - Eng Moaz Rashad
Virtual Friends UVA 11503 0 Video Solution - Eng Moaz Rashad
Arctic Network UVA 10369 0
Trees on the level UVA 122 0 Video Solution - SolverToBe (Java)
Final Standings TIMUS 1100 0 Stable sort exercise
Farm TIMUS 1349 0 Learn Fermat’s Last Theorem
0
Mashmokh and Tokens
CF415-D2-B 0 Video Solution - Eng Salma Yehia
Approximating a Constant
CF602-D2-B
Range 0 Video Solution - Eng Salma Yehia
Gena's Code CF614-D2-B 0
OR in Matrix CF486-D2-B 0
Fox And Two Dots CF510-D2-B 0 Video Solution - Eng Mohamed Adel
Routine Problem CF337-D2-B 0 Video Solution - Eng Mohamed Adel
Vasya and WrestlingCF493-D2-B 0
Hamming Distance CF608-D2-B
Sum 0
Wet Shark and Bishops
CF621-D2-B 0 Video Solution - Eng Mahmoud Mabrok
Kefa and CompanyCF580-D2-B 0 Video Solution - SolverToBe (Java)
Tavas and SaDDasCF535-D2-B 0 Video Solution - Eng Abanob Ashraf
0
Minimum Ternary String
CF1009-D12-B 0 Video Solution - Eng Hussein Hesham
CF1030-D12-B 0
CF1051-D2-B 0
CF1237-D12-B 0
0
0 Watch - Intro to Greedy
Painting Eggs CF282-D2-B 0
Pasha Maximizes CF435-D2-B 0 Video Solution - Eng Hossam Yehia
Little Girl and GameCF276-D2-B 0 Video Solution - Eng Hossam Yehia
Pasha and String CF525-D2-B 0 Video Solution - Eng Hossam Yehia
Booking System CF416-D2-C 0
Vanya and Exams CF492-D2-C 0
The Skyline Problem
UVA 105 0
Hanoi Tower Troubles
UVA! 10276 0 Video Solution - Eng Mahmoud Adel
Maze Exploration UVA 784 0 Video Solution - Eng Mahmoud Adel
IP-TV UVA 1174 0
0
You don't have to or encouraged to solve the next problem. If you felt you need so, try some of them. Or Proceed to next and solve
Optional Problems 0 in parallel, up to you.
0
Devu, the Dumb Guy
CF439-D2-B 0 Video Solution - Solver to be (Java)
Find The Bone CF796-D2-B 0 Video Solution - Solver to be (Java)
Regular Bracket Sequence
CF26-D12-B 0 Video Solution - Solver to be (Java)
Inbox (100500) CF465-D2-B 0
Different is Good CF672-D2-B 0
Permutation CF137-D2-B 0
Little Elephant and Magic
CF259-D2-B
Square 0
Airport CF218-D2-B 0
Cormen --- The BestCF732-D2-B
Friend Of a Man 0
Prison Transfer CF427-D2-B 0
A and B and Compilation
CF519-D2-B
Errors 0
Letter CF43-D2-B 0
Game of Robots CF670-D2-B 0
0
African Crossword CF90-D2-B 0
Cows and Poker Game
CF284-D2-B 0
Find Marble CF285-D2-B 0
Interesting drink CF706-D2-B 0
Megacity CF424-D2-B 0
Beautiful Paintings CF651-D2-B 0
Ilya and Queries CF313-D2-B 0
Code Parsing CF255-D2-B 0
Hungry Sequence CF327-D2-B 0
Chloe and the sequence
CF743-D2-B 0
Luxurious Houses CF581-D2-B 0
0
Settlers' Training CF63-D2-B 0
Far Relative’s Problem
CF629-D2-B 0
Wilbur and Array CF596-D2-B 0
Text Document Analysis
CF723-D2-B 0
Shower Line CF431-D2-B 0
Misha and Changing
CF501-D2-B
Handles 0
Coat of Anticubism CF667-D2-B 0
Ternary Logic CF136-D2-B 0
Counting Rhombi CF189-D2-B 0
Pashmak and Flowers
CF459-D2-B 0
0
The Monster and the
CF592-D2-B
Squirrel 0
Submit Reading Thinking Coding Debug Total Problem By 1-2 line Comments
Problem Code Status Category
Count Time(m) Time(m) Time(m) Time(m) Time(m) Level /10 yourself? About your approach
AC Averages => 0 0 0 0 0 0 0 0 0 0 0
The Fibonacci Segment
CF365-D2-B 0
Spider Man CF705-D2-B 0
Little Robber Girl's Zoo
CF686-D2-B 0
Unary CF133-D2-B 0
Canvas Frames CF127-D2-B 0
Ohana Cleans Up CF554-D2-B 0
Garland CF408-D2-B 0
Petya and Staircases
CF362-D2-B 0
Equidistant String CF545-D2-B 0
Vanya and Food Processor
CF677-D2-B 0
Calendar CF304-D2-B 0
Amr and Pins CF507-D2-B 0
Polo the Penguin and
CF289-D2-B
Matrix 0
0
George and Round CF387-D2-B 0
Alyona and flowers CF740-D2-B 0
Urbanization CF735-D2-B 0
Testing Pants for Sadness
CF104-D2-B 0
Cells Not Under Attack
CF701-D2-B 0
Vanya and Books CF552-D2-B 0
Worms CF474-D2-B 0
Fortune Telling CF59-D2-B 0
0
Walking in the RainCF192-D2-B 0
Dima and To-do ListCF366-D2-B 0
Sail CF298-D2-B 0
Fox and Cross CF389-D2-B 0
Rebranding CF591-D2-B 0
Increase and Decrease
CF246-D2-B 0
Alyona and Mex CF682-D2-B 0
Coins CF58-D2-B 0
Berland National Library
CF567-D2-B 0
Art Union CF416-D2-B 0
0
BerSU Ball CF489-D2-B 0
Random Teams CF478-D2-B 0
Friends CF94-D2-B 0
War of the Corporations
CF625-D2-B 0
Road Construction CF330-D2-B 0
Binary Number CF92-D2-B 0
Before an Exam CF4-D2-B 0
Running Student CF9-D2-B 0
Anton and currencyCF508-D2-B
you all know 0
Phone Numbers CF151-D2-B 0
Submit Reading Thinking Coding Debug Total Problem By 1-2 line Comments
Problem Name Problem Code Status Category
Count Time(m) Time(m) Time(m) Time(m) Time(m) Level /10 yourself? About your approach
AC Averages => 0 0 0 0 0 0 0 0 0 0 0
DON'T Skip colored problems. Don't skip others unless a block is really easy for you
Remove the given link and write a comment. Start your comment with a classification for the
problem: Useless, repeated idea, boring, normal, good problem, interesting problem or
important problem.
Drazil and Factorial CF515-D2-C 0 Video Solution - Dr Mostafa Saad
Lucky Permutation Triple
CF304-D2-C 0
Soldier and Cards CF546-D2-C 0
Watchmen CF651-D2-C 0
0
0 Watch - Thinking - Concretely - Symbolically - Pictorially
0 Watch - Thinking - Problem Constraints
0 Watch - Number Theory - Primes
Fox Dividing CheeseCF371-D2-B 0 Video Solution - Eng Abanob Ashraf
Duff in Love CF588-D2-B 0
Twin Primes UVA 10394 0
Summation of Four UVA 10168 [1] 0 Video Solution - Eng Moaz Rashad [2]
The Lottery UVA 10325 0 Video Solution - Eng Amr Bahaa [3]
Hamburgers CF371-D2-C 0
Mint UVA 10717 0 Sol
BITMAP - Bitmap SPOJ BITMAP 0 Editorial
CODECHEF GCDMOD 0 Sol uses __int128 to avoid overflow
UVA 10843 0 Theory result to read
The Child and Set CF437-D2-B 0
Tanya and PostcardCF518-D2-B 0
0
Greg and Array CF296-D2-C 0
The World is a Theatre
CF131-D2-C 0 Video Solution - Eng Youssef Ali
Trains CF88-D2-C 0 Video Solution - Solver to be (Java)
Semifinals CF378-D2-B 0
Towers CF479-D2-B 0
0 Watch - Algebra - Number Bases and Polynomials
To Carry or not to Carry
UVA 10469 0 Sol
Beat the Spread! UVA 10812 0
Summation of Polynomials
UVA 10302 0
Polly the PolynomialUVA 498 0
UVA 11053 0 Find O(n) Solution
LiveArchive 8078 0 Sol
0 Watch - Algebra - Patterns in Sequences
R U Kidding Mr. Feynman?
UVA 10509 0
Wandering Queen SPOJ QUEEN 0 Sol to read
HACKR sherlock-and-probability 0 Sol
0 Watch - Algebra - Summations
0 Watch - Algebra - Basic Matrix Operations
Searching for GraphCF402-D2-C 0
Flying Saucer Segments
CF227-D2-C 0
Vasya and Petya's Game
CF577-D2-C 0
Round Table KnightsCF71-D2-C 0
Kefa and Park CF580-D2-C 0 Video Solution - Solver to be (Java)
Knight Tournament CF357-D2-C 0
Special Offer! SuperCF219-D2-B
Price 999 Bourles! 0
0 Watch - Thinking - Problem Abstraction
0 Watch - Thinking - Problem Reverse
0 Watch - Search Techniques - Backtracking
Graph Coloring UVA 193 0 Video Solution - Dr Mostafa Saad
23 out of 5 UVA 10344 0 Video Solution - Eng Mohamed Nasser
8 Queens Chess Problem
UVA 750 0 Video Solution - Eng Ayman Salah
Assemble UVA 12124 0 Sol
SPOJ FUNPROB 0 Sol
0
Magic Formulas CF424-D2-C 0
Pythagorean TriplesCF707-D2-C 0
Gerald's Hexagon CF560-D2-C 0
Points on Line CF252-D2-C 0
Find Maximum CF353-D2-C 0
Jzzhu and Sequences
CF450-D2-B 0
Simple Game CF570-D2-B 0
Prime Matrix CF271-D2-B 0
0 Review bitmasking
0 Watch - DP - Subset Style
Vacation UVA 10192 0 Explained in the tutorial videos
Dividing coins UVA 562 0 Video Solution - Eng Ayman Salah
0 Watch - DP - Consecutive Ranges Style
SRM149-D1-500 0
SRM536-D2-1000 0
The Blocks ProblemUVA 101 0 Sol [4]
Divisibility UVA 10036 0 Sol
UVA 11628 0 Sol
0
Rational ResistanceCF344-D2-C 0
k-Multiple Free Set CF275-D2-C 0
Polycarpus' Dice CF534-D2-C 0 Sol
Print Check CF631-D2-B 0
Playing Cubes CF257-D2-B 0
T-primes CF230-D2-B 0
0 Watch - DP - Nested Ranges Style
0 Watch - DP - General Ranges Style
Creating PalindromeUVA 11753 0 Video Solution - Eng Aya Elymany
Submit Reading Thinking Coding Debug Total Problem By 1-2 line Comments
Problem Name Problem Code Status Category
Count Time(m) Time(m) Time(m) Time(m) Time(m) Level /10 yourself? About your approach
AC Averages => 0 0 0 0 0 0 0 0 0 0 0
Again Palindrome UVA 10617 0 Sol to read
Exploring Pyramids UVA 1362 0 Video Solution - Eng Ayman Salah
Cutting Sticks UVA 10003 0
Optimal Array Multiplication
UVA 348Sequence 0 Sol
Accordian Patience UVA 127 0 Video Solution - Eng Moaz Rashad
Software CRC UVA 128 0 Video Solution - Eng Moaz Rashad
ZOJ 1200 0 Sol
0
Maze CF378-D2-C 0
Thor CF705-D2-C 0
Hard problem CF706-D2-C 0
Unusual Product CF405-D2-C 0
Palindrome Transformation
CF486-D2-C 0
Removing ColumnsCF496-D2-C 0 Video Solution - Dr Mostafa Saad
Crazy Town CF499-D2-C 0 Video Solution - Dr Mostafa Saad
Queue CF490-D2-B 0
Vika and Squares CF610-D2-B 0
Cosmic Tables CF222-D2-B 0
0 Watch - Thinking - Incrementally
0 Watch - Thinking - Problem Domain re-interpretation
0 Watch - Number Theory - Factorization
Prime Factors UVA 583 0
Mr. Azad and his Son
UVA 10490 0 Sol to read
Perfect P-th PowersUVA 10622 0 Video Solution - Eng Moaz Rashad
Prime Land UVA 516 0 Sol
UVA 10920 0 Sol
SRM274-D1-500 0
Spreadsheet UVA 196 0 Sol
0
Text Editor CF253-D2-C 0
Alternative ThinkingCF604-D2-C 0
Tennis Championship
CF735-D2-C 0
Guess Your Way Out!
CF507-D2-C 0 Video Solution - Dr Mostafa Saad
Biathlon CF84-D2-C 0
Marina and Vasya CF584-D2-C 0
Divide by Three CF792-D2-C 0 Video Solution - Solver to be (Java)
Covered Path CF534-D2-B 0
Facetook Priority Wall
CF75-D2-B 0
Treasure Hunt CF979-D2-B 0
0
How Many Points ofUVA
? 10790 0 Sol
Factovisors UVA 10139 0 Sol
Fractions Again?! UVA 10976 0 Sol
Cut Ribbon CF189-D2-A 0 Video Solution - Solver to be (Java)
0
0 Watch - Probability - First 9 videos
Cows and Cars UVA 10491 0 Revise Probability
What is the Probability?
UVA 10056 0 Sol
Let’s Dance UVA 10218 0 Sol
Probability|Given UVA 11181 0 Sol
Another lottery UVA 11628 0 Sol
Airplane UVA 12461 0 Sol
HACKR tower-3-coloring 0 Learn Fermat's little theorem
CF445-D2-C 0
HACKR a-circle-and-a-square 0
UVA 11573 0 Learn 0/1 BFS
Rankings UVA 12263 0 Sol
0
Hacker, pack your bags!
CF822-D2-C 0 Video Solution - Solver to be (Java)
The Meaningless Game
CF834-D2-C 0 Video Solution - Solver to be (Java)
Star sky CF835-D2-C 0 Video Solution - Solver to be (Java)
0
You don't have to or encouraged to solve the next problem. If you felt you need so, try some of them. Or Proceed to next and
Optional Problems 0 solve in parallel, up to you.
0
Diverse PermutationCF483-D2-C 0
Replacement CF136-D2-C 0
Homework CF102-D2-C 0
Little Elephant and Problem
CF221-D2-C 0
Developing Skills CF581-D2-C 0
Maxim and Discounts
CF262-D2-C 0
Fox and Box Accumulation
CF389-D2-C 0
Ice Skating CF218-D2-C 0
Valera and Tubes CF441-D2-C 0
Secret CF271-D2-C 0
Key Task SPOJ CERC07K 0
Cleaning Robot SPOJ CLEANRBT 0
0
They Are Everywhere
CF701-D2-C 0
Monitor CF16-D2-C 0
System Administrator
CF22-D2-C 0
Lucky Sum CF122-D2-C 0
NP-Hard Problem CF688-D2-C 0
Vladik and fractionsCF743-D2-C 0
Case of Matryoshkas
CF556-D2-C 0
Vanya and Label CF677-D2-C 0
Exams CF479-D2-C 0
Submit Reading Thinking Coding Debug Total Problem By 1-2 line Comments
Problem Name Problem Code Status Category
Count Time(m) Time(m) Time(m) Time(m) Time(m) Level /10 yourself? About your approach
AC Averages => 0 0 0 0 0 0 0 0 0 0 0
Boredom CF456-D2-C 0
Learning LanguagesCF278-D2-C 0
Beautiful Sets of Points
CF268-D2-C 0
0
Strategic Defense Initiative
UVA 497 0 Explained in the tutorial videos
String to PalindromeUVA 10739 0 Explained in the tutorial videos
Trouble of 13-Dots UVA 10819 0
Sagheer and NubianCF812-D2-C
Market 0 Video Solution - Solver to be (Java)
Purification CF330-D2-C 0
Division into Teams CF149-D2-C 0
Disposition CF49-D2-C 0
Mashmokh and Numbers
CF415-D2-C 0
Statues CF129-D2-C 0
Inna and Huge Candy
CF400-D2-C
Matrix 0
Anagram Search CF144-D2-C 0
Ilya and Sticks CF525-D2-C 0
Day at the Beach CF599-D2-C 0
0
Appleman and Toastman
CF462-D2-C 0 Sol
Anya and Smartphone
CF518-D2-C 0
Little Girl and Maximum
CF276-D2-C
Sum 0
Sereja and Algorithm
CF368-D2-C 0
The Child and Toy CF437-D2-C 0
Perfect Pair CF318-D2-C 0
Another Problem onCF165-D2-C
Strings 0
Socks CF731-D2-C 0
Valera and ElectionsCF369-D2-C 0
Submit Reading Thinking Coding Debug Total Problem By 1-2 line Comments
Problem Name Problem Code Status Category
Count Time(m) Time(m) Time(m) Time(m) Time(m) Level /10 yourself? About your approach
AC Averages => 0 0 0 0 0 0 0 0 0 0 0
0 Watch - Thinking - Search Space and Output Analysis
0 Watch - Thinking - Observations Discovery
0 Watch - Game Theory - Intro
Win or Freeze CF151-D2-C 0 Video Solution - Dr Mostafa Saad
Euclid's Game UVA 10368 0 Video Solution - Eng Moaz Rashad
Pyramids SPOJ PIR 0 Sol
Power of Cryptography
UVA 113 0 Sol
SRM458-D2-500 0
Is There A Second Way
UVALeft?
10462 0 Sol
SRM381-D2-1000 0
0
Modified GCD CF75-D2-C 0 Video Solution - Dr Mostafa Saad
Alyona and mex CF740-D2-C 0 Video Solution - Dr Mostafa Saad
Hamburgers CF371-D2-C 0
Wet Shark and Flowers
CF621-D2-C 0
Predict Outcome of the
CF451-D2-C
Game 0
Balls and Boxes CF260-D2-C 0 Video Solution - Dr Mostafa Saad
Alice and Bob CF347-D2-C 0 Video Solution - Eng Mohamed Nasser
Mahmoud and Ehab and
CF959-D2-C
the wrong algorithm 0 Video Solution - Eng Mohamed Salah
Almost Equal CF1206-D2-C 0 Video Solution - Dr Mostafa Saad
CF1220-D12-C 0
CF1065-D2-C 0
CF1036-D2-C 0
CF1068-D2-C 0
CF313-D2-C 0
Balls Game CF430-D2-B 0
Magical Array CF84-D2-B 0
0 Watch - Thinking - Misc - Solution Verification - Implementation
0 Watch - Graph Theory - Dijkstra
Jugs UVA 571 0 Video Solution - Dr Mostafa Saad
Sending email UVA 10986 0
Lift Hopping UVA 10801 0
Shopping SPOJ SHOP 0
Ordering UVA 872 0 Sol
CF1064-D2-C 0
CF1059-D2-C 0
CF101933-GYM-K 0 Sol
Karen and Coffee CF816-D2-B 0 Video Solution - Dr Mostafa Saad
0
Bulls and Cows CF63-D2-C 0 Sol
Xor-tree CF430-D2-C 0
Median Smoothing CF591-D2-C 0
Coloring Trees CF711-D2-C 0 Video Solution - Solver to be
Clear Symmetry CF202-D2-C 0
CF1237-D12-C2 0
Sereja and Mirroring CF426-D2-B 0
Restoring Painting CF675-D2-B 0
Reading
Read within 3-5 minutes for short text problem. If no, you need to work on your Reading English Skills
Never suspect later your problem understanding? If happens, you need to improve your comprehension / cases tracing
Thinking
Ready and in the challenging mood before start solving.
Striving against the problem for a reasonable time. If no, you need to change your solving spirit. Be a fighter.
Found a solution; Do verifications: text cases / extra cases / correctness / time & memory
Coding
Sketch in your mind the big picture of the code first. Don't rush for coding
Code within 10 minutes. If more, you have coding skills problem or your understanding for the approach is not complete
A lot of copy paste? Something wrong. Need a better code organization
Needed more than 10 minutes to code medium size codes? Why? Identify the issue and solve it
Debugging
Which will be faster to catch the mistake? Printing or Debugger
Don't know how to use a debugger? Learn this skill
Needed more than 10 minutes to solve bugs? Something is wrong. Why need all this time? How to solve this issue?
Code is ready!
Just submit and see if passed? Wrong. Behave as if you are in the real contest. Are you almost sure it will be AC? If yes, submit
TRAIN offline as if you are in a real contest. This shortens the gap between training and the real contest
Code Failed :(
Are you nervous / frustrated? Yes => Wrong behavior. Take it easy
Rush to test cases? Yes => Wrong, revise idea, then code, then trace more samples. Try for 15 minutes or more first
Got it AC
Read and Understood editorial solutions?
Checked 1-3 other AC solutions?
Tried to write a much shorter version of your code?
Tried to write a faster coder (better complexity)?
Speed
How much time do you need in Div2-A/Div2-B? Target (5, 10) minutes for semiseniors, (3, 6) for seniors
Not that fast? You need regular speed training on easy problems
Weakly contests
Do you participate in 1-2 contests per week at least? If no, this is bad. Offline training != Online contests
You need to train yourself to behave in online contests similar to offline training. This is an important skill.
Sheet stats
Recorded them? Yes: read your problem's row. Where do you consume the most of the time? These are your weak skills
No, I don't record! => How will you know your weak points?!
Can't record timing as I am mixing thinking with coding? => Wrong behavior. get done with thinking, then move to coding. Don't cycle
Training Time
Is it regular and scheduled? Yes => you will have regular improvements.
Your plan was to train X hours, Did so? If no, why?
Without regular and continous training, your mind might not improve well
Training with?
Yourself only? You may feel bored. If can collaborate with others = longer commitment
Psychological issues
Do you keep comparing yourself with others?
Do you have negative feelings? Like I am stupid..I am hopeless...I will never have a comparable level...?
Do you think of your image/appearance if failed in online contests so avoid contests?
Do you use another account with a weird name to train so that people don't know about your progress/failure?
Do you wish your friends fail in the contest? or get annoyed with their better performance?
Do you avoid teaching your friends something or give no support to remain better than them?
Do you feel bored/frustrated as no/weak community in your college?
Do you keep training day and night without breaks? No socialization at all?
Do you hate specific topics and avoid them (probability/geometry)?
‘Should I stop’ Dilemma? Keep thinking is it worth vs a waste of time?
If any of the above questions is YES, you probably have a problem and need to find a solution to it.
[1] Google first Goldbach's conjecture
[2] Or shorter:
http://naivered.github.io/2016/07/03/Problem_Solving/UVa/UVa-10168-Summation-of-Four-Primes/
[3] Or shorter:
https://github.com/ilyesLtifi/Competitive-Programming/blob/master/UVA/UVA%2010325.cpp
[4] Summary
This is a simple Simulation problem. There should be more than enough time to pass.
Explanation
Things to think about include deciding what data structure to use and how to find where each block is.
Since the main operations are deletion, insertion, and splicing, linked lists are a good choice. You can also
use a lookup table for keeping track of where each block is, as long as you update it for each operation.
In this problem using modularity really helps; create a function for each of the different move/pile operations
and one other for printing. This way you can make sure each of the individual operations is done correctly
instead of trying to find a bug amongst your whole program.
Gotchas
Illegal commands are to be ignored:
Those where a = b.
Those with a and b in the same stack.
The problem statement is incorrect - to avoid Presentation Error, there is no space before the single-digit
numbers: check the below output.
[5] Or shorter:
https://github.com/ilyesLtifi/Competitive-Programming/blob/master/UVA/UVA%2010325.cpp
[8] Summary
This is a simple Simulation problem. There should be more than enough time to pass.
Explanation
Things to think about include deciding what data structure to use and how to find where each block is.
Since the main operations are deletion, insertion, and splicing, linked lists are a good choice. You can also
use a lookup table for keeping track of where each block is, as long as you update it for each operation.
In this problem using modularity really helps; create a function for each of the different move/pile operations
and one other for printing. This way you can make sure each of the individual operations is done correctly
instead of trying to find a bug amongst your whole program.
Gotchas
Illegal commands are to be ignored:
Those where a = b.
Those with a and b in the same stack.
The problem statement is incorrect - to avoid Presentation Error, there is no space before the single-digit
numbers: check the below output.