Placeholder Image

字幕列表 影片播放

  • Come on come on

  • Yes!!!

  • You might have seen my video of winning Google Kickstart Round A and you might have no idea what's going on.

  • If you haven't seen it, be sure to check it out.

  • The video will probably appear somewhere on the screen and I'll also provide a link in the description.

  • Competitive programming, or CP for short, is a mind sport where participants need to write programs to solve well-defined problems.

  • Those problems are often related to algorithms, data structures, math, and logic.

  • The programs of the contestants are judged by many different factors including how much time the programs take

  • and how much memory the programs use.

  • There are many benefits to doing CP which I'll describe later.

  • If you don't completely understand what I just said

  • then that's okay. I'll show you a really simple example of a problem right now.

  • Here we have a problem where we are asked to compute the sum of two integers.

  • So the input that we're given is two integers and a is the first integer and b is the second integer.

  • We're supposed to return the sum of the two integers and this should be pretty simple

  • for anyone who has a bit of programming experience.

  • So if we go to the code here,

  • we just need to type

  • return a plus b and that'll solve the problem.

  • To check if our program is correct, we'll submit this program and

  • it will be judged against a few test cases to see if the program is correct.

  • Our program got accepted and

  • Yeah, so that's great.

  • This is a very simple example. The actual problems you see in CP will be much harder than this.

  • Basically for each problem you need to write a program that takes in some input

  • and processes the input and outputs the answer.

  • By the way, if you want to try this out yourself, this site is called HackerRank and

  • it's one of the well-known sites for CP.

  • Also, I used C++ in this example, but you can use any language to solve CP problems, like Java or Python.

  • Now, in contests, you basically have a bunch of these problems that you need to solve.

  • The contestants are generally ranked by the number of problems that they solve, the time that they take to solve those problems,

  • and the number of incorrect attempts that they make.

  • I'll explain the scoring for this Codeforces contest briefly.

  • In this contest, there are six problems from A to F and each problem has a maximum score shown at the top.

  • So problem A has a maximum score of 500 and problem E has a maximum score of 2500.

  • After each minute of the contest, the scores of the problems decrease by a small fraction.

  • As you can see here, I solved problem A within the first minute of the contest,

  • so the score did not decrease at all and I got the full 500 points for this problem.

  • I solved problem F much later in the contest

  • so my score for problem F is much lower than the maximum score for problem F.

  • Lastly your total score is just the sum of your scores for the individual problems and

  • contestants are ranked according to the scores.

  • So now I will go over the benefits of doing CP.

  • First of all, doing CP helps you prepare for coding interviews for major companies like FAANG, which stands for Facebook, Amazon,

  • Apple, Netflix, and Google.

  • Questions that are asked in coding interviews are basically just easy-to-medium-leveled CP problems and that's why you see many of the top

  • competitive programmers ending up with a job at these companies.

  • The second benefit, which only applies to secondary school students, is Olympiads.

  • Informatics Olympiads are basically just CP contests for high school students.

  • Each country has a national contest and a training camp,

  • for example, the USA has the USA computing Olympiad.

  • Each country ultimately selects four students to represent their country in the International Olympiad in informatics.

  • Obtaining a medal in the International Olympiad in informatics is a huge boost for applying to certain prestigious universities.

  • Some countries even have rules which will guarantee your admission to those universities.

  • If you represent Taiwan and obtain a medal, for example, you're guaranteed admission to National Taiwan University,

  • which is basically the best university in Taiwan.

  • Lastly, CP is fun. I consider CP to be no different than any other esport

  • so that's why you may have noticed I set the category of my channel to games.

  • I just love the feeling of satisfaction

  • when I paste together the final part of a problem, code and submit my program, and see the green "Accepted" status on my program

  • after hours of hard work.

  • During contests, I love the rush of adrenaline as I race time to innovate solutions for the problems presented before me.

  • For me, the tiny green status

  • ignites exhilaration that an athlete and their fans would experience after a goal.

  • If you are interested in competitive programming then be sure to subscribe as I'll be posting more information about how you can start competitive programming.

  • I also have a Discord server and the link is in the description below

  • I will be posting solutions to various contests on the server and you can also discuss CP with other members on the server.

  • That's basically it. Thanks for watching!

Come on come on

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

B1 中級 美國腔

什麼是競爭性編程? (What is Competitive Programming?)

  • 17 1
    姚佳成 發佈於 2021 年 01 月 14 日
影片單字