introduction to competitive programming - get started with ... · introduction to competitive...
TRANSCRIPT
![Page 1: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/1.jpg)
bfs(competitive programming)
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 1 / 14
![Page 2: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/2.jpg)
Introduction to Competitive ProgrammingGet started with competitive programming - part 3
Balajiganapathi S
code-drills.com
April 23, 2017
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 2 / 14
![Page 3: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/3.jpg)
Outline
1 Verdicts
2 Beginner tips
3 Conclusion
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 3 / 14
![Page 4: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/4.jpg)
Verdicts
Outline
1 VerdictsEvaluationTypes of verdicts
2 Beginner tips
3 Conclusion
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 4 / 14
![Page 5: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/5.jpg)
Verdicts Evaluation
How programs are evaluated
Problem setter uploads inputs and expected correct output
Programs are run against the inputs and compared to the expected output
Some program have multiple correct output - they are handled by a custom checker
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 5 / 14
![Page 6: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/6.jpg)
Verdicts Evaluation
How programs are evaluated
Problem setter uploads inputs and expected correct output
Programs are run against the inputs and compared to the expected output
Some program have multiple correct output - they are handled by a custom checker
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 5 / 14
![Page 7: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/7.jpg)
Verdicts Evaluation
How programs are evaluated
Problem setter uploads inputs and expected correct output
Programs are run against the inputs and compared to the expected output
Some program have multiple correct output - they are handled by a custom checker
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 5 / 14
![Page 8: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/8.jpg)
Verdicts Types of verdicts
Accepted (AC)
Congrats! your solution is correct
Your program outputs the expected answer for each test input
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 6 / 14
![Page 9: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/9.jpg)
Verdicts Types of verdicts
Accepted (AC)
Congrats! your solution is correct
Your program outputs the expected answer for each test input
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 6 / 14
![Page 10: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/10.jpg)
Verdicts Types of verdicts
Wrong Answer (WA)
Oops! your solution is wrong
For some test input your program does NOT output the expected ouput
Check for special conditions (edge cases)
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 7 / 14
![Page 11: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/11.jpg)
Verdicts Types of verdicts
Wrong Answer (WA)
Oops! your solution is wrong
For some test input your program does NOT output the expected ouput
Check for special conditions (edge cases)
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 7 / 14
![Page 12: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/12.jpg)
Verdicts Types of verdicts
Wrong Answer (WA)
Oops! your solution is wrong
For some test input your program does NOT output the expected ouput
Check for special conditions (edge cases)
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 7 / 14
![Page 13: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/13.jpg)
Verdicts Types of verdicts
Time Limit Exceeded (TLE)
Your program took more time than the time limit on some test input
Your solution may or may not be correct
Stress tests - for large values of input. Check the constraints
Optimize the implementation
Need more efficient solution
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 8 / 14
![Page 14: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/14.jpg)
Verdicts Types of verdicts
Time Limit Exceeded (TLE)
Your program took more time than the time limit on some test input
Your solution may or may not be correct
Stress tests - for large values of input. Check the constraints
Optimize the implementation
Need more efficient solution
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 8 / 14
![Page 15: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/15.jpg)
Verdicts Types of verdicts
Time Limit Exceeded (TLE)
Your program took more time than the time limit on some test input
Your solution may or may not be correct
Stress tests - for large values of input. Check the constraints
Optimize the implementation
Need more efficient solution
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 8 / 14
![Page 16: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/16.jpg)
Verdicts Types of verdicts
Time Limit Exceeded (TLE)
Your program took more time than the time limit on some test input
Your solution may or may not be correct
Stress tests - for large values of input. Check the constraints
Optimize the implementation
Need more efficient solution
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 8 / 14
![Page 17: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/17.jpg)
Verdicts Types of verdicts
Time Limit Exceeded (TLE)
Your program took more time than the time limit on some test input
Your solution may or may not be correct
Stress tests - for large values of input. Check the constraints
Optimize the implementation
Need more efficient solution
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 8 / 14
![Page 18: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/18.jpg)
Verdicts Types of verdicts
Runtime Error (RTE)
Your program crashed while running on a test input
FPE - Divide by zero
Segmentation fault - accessing values outside allocated memory
Assert failure
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 9 / 14
![Page 19: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/19.jpg)
Verdicts Types of verdicts
Runtime Error (RTE)
Your program crashed while running on a test input
FPE - Divide by zero
Segmentation fault - accessing values outside allocated memory
Assert failure
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 9 / 14
![Page 20: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/20.jpg)
Verdicts Types of verdicts
Runtime Error (RTE)
Your program crashed while running on a test input
FPE - Divide by zero
Segmentation fault - accessing values outside allocated memory
Assert failure
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 9 / 14
![Page 21: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/21.jpg)
Verdicts Types of verdicts
Runtime Error (RTE)
Your program crashed while running on a test input
FPE - Divide by zero
Segmentation fault - accessing values outside allocated memory
Assert failure
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 9 / 14
![Page 22: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/22.jpg)
Verdicts Types of verdicts
Other verdicts
Memory limit exceeded
Compile error
Presentation error
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 10 / 14
![Page 23: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/23.jpg)
Verdicts Types of verdicts
Other verdicts
Memory limit exceeded
Compile error
Presentation error
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 10 / 14
![Page 24: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/24.jpg)
Verdicts Types of verdicts
Other verdicts
Memory limit exceeded
Compile error
Presentation error
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 10 / 14
![Page 25: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/25.jpg)
Beginner tips
Outline
1 Verdicts
2 Beginner tips
3 Conclusion
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 11 / 14
![Page 26: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/26.jpg)
Beginner tips
Beginner tips
Take your time
Solve LOTS of problems
Learn from others’ code
Learn your programming language well
Test on atleast few more tests other than just samples
Make a list of your coding errors
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 12 / 14
![Page 27: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/27.jpg)
Beginner tips
Beginner tips
Take your time
Solve LOTS of problems
Learn from others’ code
Learn your programming language well
Test on atleast few more tests other than just samples
Make a list of your coding errors
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 12 / 14
![Page 28: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/28.jpg)
Beginner tips
Beginner tips
Take your time
Solve LOTS of problems
Learn from others’ code
Learn your programming language well
Test on atleast few more tests other than just samples
Make a list of your coding errors
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 12 / 14
![Page 29: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/29.jpg)
Beginner tips
Beginner tips
Take your time
Solve LOTS of problems
Learn from others’ code
Learn your programming language well
Test on atleast few more tests other than just samples
Make a list of your coding errors
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 12 / 14
![Page 30: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/30.jpg)
Beginner tips
Beginner tips
Take your time
Solve LOTS of problems
Learn from others’ code
Learn your programming language well
Test on atleast few more tests other than just samples
Make a list of your coding errors
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 12 / 14
![Page 31: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/31.jpg)
Beginner tips
Beginner tips
Take your time
Solve LOTS of problems
Learn from others’ code
Learn your programming language well
Test on atleast few more tests other than just samples
Make a list of your coding errors
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 12 / 14
![Page 32: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/32.jpg)
Conclusion
Outline
1 Verdicts
2 Beginner tips
3 Conclusion
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 13 / 14
![Page 33: Introduction to Competitive Programming - Get started with ... · Introduction to Competitive Programming Get started with competitive programming - part 3 Balajiganapathi S code-drills.com](https://reader033.vdocuments.us/reader033/viewer/2022052104/603f8d87580c5e18bc330aad/html5/thumbnails/33.jpg)
Conclusion
Thank you
https://code-drills.com/bfscp/modules/intro
Balajiganapathi S (code-drills.com) Intro to CP April 23, 2017 14 / 14