Sign up now
to enroll in courses, follow best educators, interact with the community and track your progress.
Enroll
84
Download
Getting Started With Competitive Programming
1,639 plays

More
Learn what competitive programming is all about and solve your first problem on codechef.

Balajiganapathi Senthilnathan
I am a competitive programming enthusiast.

U
Unacademy user
  1. bfs (competitive programming) Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 1/ 24


  2. Introduction to Competitive Programming Get started with competitive programming Balajiganapathi 9 code-drills.com April 17, 2017 Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 2/24


  3. Outline 1 What is competitive programming? 2 Solving your first problem 3 More sites 4 Contests 6 Conclusion 5 Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 3 24


  4. What is competitive programming? Outline What is competitive programming? o Definition o Advantages Solving your first problem 2 More sites Contests Conclusion Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 4/24


  5. What is competitive programming? Definition Competitive programming - Definition Definition Competitive programming is a mind sport usually held over the Internet [..], involving participants trying to program according to provided specifications. A programming competition generally involves the host presenting a set of logical or mathematical problems to the contestants [..], and contestants are required to write computer programs capable of solving each problem Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 5/24


  6. What is competitive programming? Advantages Competitive programming - Advantages o Develops computational thinking Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 6/ 24


  7. What is competitive programming? Advantages Competitive programming - Advantages o Develops computational thinking o Helps in job interviews Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 6/ 24


  8. What is competitive programming? Advantages Competitive programming - Advantages o Develops computational thinking o Helps in job interviews o Helps in software jobs Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 6/24


  9. What is competitive programming? Advantages Competitive programming - Advantages o Develops computational thinking o Helps in job interviews o Helps in software jobs o Is addictive and fun! Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 6/24


  10. Solving your first problem Outline 0 What is competitive programming? Solving your first problem o Prerequisite 2 Codechef o Coding and submitting More sites Contests Conclusion Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 7/ 24


  11. Solving your first problem Prerequisite Prerequisite o Know how to compile and run C+ program Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 8/ 24


  12. Solving your first problem Codechef Codechef https://www.codechef.com ci Secure https://www.codechef.com Hello ubalajiganapath Logout CODECHEF A Dire cti Educational Initiative PRACTICE COMPETE DISCUSS COMMUNITY HELP ABOUT April Challenge Start date:7 April. 15:00 IST End Date : 17h April, 15:00 IST Problem Setters Kamil Debowski, Praveen Dhinwa, Goutam Saluja, Frank Chen, Pawel Kacprzak, Gaoyuan Chen and Sergey Nagin 1 Contest Admin&Tester Kamil Debowss 1 Transiators Sergey Kulk (Russian) Team vNor (iethamese), Hu Zecong (Mandanin April Challenge 2017 Performance April Challenge 2017SnackDown Hubs Practice Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 9/ 24


  13. Solving your first problem Codechef First problem Examples Input The first line contains an integer T, total number of test cases. Then follow T lines, each line contains two Integers A and B Output Add A and B and display it. Constraints 1STs1000 1SA B S 10000 Example Input 1 2 100 200 10 4 Output 300 50 Author Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 11 24


  14. Solving your first problem Coding and submitting First problem - Verdict File Edit View History Tools People Help er User I cc , Add Two Numbers C secure httpS//www.codechef.com.submit/complete/133 16657 Logout CODECHEF A Directi EducationalIinitiative PRACTICE COMPETE DISCUSS | *COMMUNITY HELP ABOUT Home Practice(schooO Add Two Numbers Successful Submission Successful Submission Cotrect Answer Exeoution Time: 0.00 Want to see your old submissions? Thats ok, you can always go to Mty Submssions and see how you did About CodeChet About OrecsCEO'S Comer1 C-Programmingl Programming Languages| Contact Us 2009 Direcn Group Aa Rights Reserved CodeChef uses SP by Sphere Research Labs In oeder to repont copyright violations of any kind seed in an email to copyright@codechef.com Directi The pme now is: 08 5245 PM Your IP 106 51 132.31 CodeChef-A Platform for Aspiring Programmers Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 14/ 24


  15. More sites More sites - spoj http://www.spoj.com/ | wwwspoj.com 9phere online judge PROBLEMS STATUS PRANKS ~DISCUSS CONTESTS I,,. AOPROFILE Learn programming Start with our set of elementary problems. This will help you to get famillar with the basics of programming. Don't worry, nothing is difficult when you are supported by our wonderful and helpful community! Practice algorithms Can you easily cope with all programming tasks you are asked to solve? How about taking your algorithmic skilis to a higher level? We have organized our problems, grouping them in accordance with the algorithm technique and required data structure. Select your topic of interest and find the right problems Take the challenge If you are familiar with all basic and advanced concepts of algorithms and data are probably looking for new chalienges. We can pick a problem at random for you or you can find yourself a problem from our vast database. structures, you Basic problems Random problem coming soon! SPOJ in other languages: Latest problems TOP Coders last week -Polish Fibonacci Polynomial ShaatChara Binary Game Reloaded Matrix Multiplication 2K Simple Path 26 26 25 Andrew = Bolivia Armenian ANKIT JAIN r Manish Popular contests: 20 ECHO 20 Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 16 24 017 16/24


  16. More sites More sites - codeforces http://codeforces.com/ C | codeforces.com a31 - CoDEFORCESP Sponsored by Telegram You have 41 Wwe HOME CONTESTS GYM pROBLEMSET GROUPS RATING Apl RCC VKCUp Join the oticial Codeforces group in VK. There we will publish of rounds and important news HFT Battle 2017 By malcolm, 2 days ago, translation Pay attention Before contest 22:40:26 Hello Codeforces! HFT Batle 2017 is going on- the trading algorhms compettion, in which every participant can try on an HFT researcher's hat. The goal is k Like 112 people ke this. Be the Sest of your to create a stable and profitable HFT algorithm by researching a market microstructure and a behaviour of the financial instrument. In May we will be hosting another 24-hour competition in code optimization and speeding up based on algorithms created during HFT Battle. We hope that Codeforces users will especially lke this format) During the competition we provide you a set of real HFT-instruments for research and strategy analysis and real market data from one of the world's largest exchanges. Same as last year, trading conditions are simplified compared to the real ones: there are lower fees and round-tip Rating: 2029 Contbuton: +127 Also there are some significant differences from the previous competition: You are able to create your strategies both in C++ or Python. . We made it possible to participate in teams. To do this you should create a single account for the entire team and provide the information about one of the participants during the registration process. . You can call out any other participant for a duel, where your strategies can see and affect each other's transactions. Let the battle Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 17 24


  17. More sites More sites - topcoder https://arena.topcoder.com/#/u/dashboard C secure https/arenatopcoder.com/#/u/dashboard [topcoder]. ARENA BETA TC TIME 9:26:01 PMIST Welcome Balajiganapathi Competition Arena: Dashboard $2400 Hercules React NatietoxRE Cleanup and animation updates Time Left 4 hours and 5 minutes !iode;s.vuct. Active Matches Match Schedule April 2017 2017 TCO Algorithm Round 1B is completec Sun Mon TueWed Thu Sat Match SummaryMatch Schedule Rooms Enter 26 27 2903 Registration Phase Coding Phase Intermission Phase Challenge Phase System Test Phase Started at Apr 8,530 PM IST started ar Apr 8, 9:30 PM IST Started at Ape 81045 PMIS Started at Apr 8,10SO PMIS Ended at Apr ,11505 PMIST Ended at Apr89:25 PM151T Ended at Apr8,1045 PMIS Ended atApr8,10.50 PMIS Erded at Apr 8,11:05 PM IST 9 10 11 12 13 14 15 16 1 23 24 25 2 30 18 19 20 21 22 25 26 27 28 29 View Details Now chatting in: Chat Room 1 Medium Chat Room 1 Profile Overview & Important Messages > Rating key Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 18 24


  18. Contests Outline What is competitive programming? Solving your first problem 3 More sites 4 Contests Conclusion Balajiganapathi S (code-drills.com) Intro to CP April 17. 2017 19 24


  19. Contests Annual contests o IOI o ICPC o Topcoder Open o Google Codejam o Facebook Hackercup o Codechef Snackdown Balajiganapathi S (code-drills.com) Intro to CP April 17. 2017 22 24


  20. Conclusion Thank you Balajiganapathi S (code-drills.com) Intro to CP April 17, 2017 24/ 24