Hi!
I wanted to make a new fun screencast. In this video, I'm solving Codeforces Round #747 (div. 2) but there are two main differences from a regular screencast:
It's a highlight video which means that it's not a 2-hour long video of me thinking about problems but just some fun, interesting, exciting moments.
It's something I called a "Challenge Screencast" which means that there is a challenge I need to complete during the contest. This time the challenge was to not use any loops in the code. So no for loops, no while loops... At all!
I hope you'll enjoy it! I'll be happy to hear any comments and suggestions for the future challenge screencasts!
Just use this
As I said at the start of the video of course there always are some hacks like using goto or std::generate but I wanted to actually avoid loops or any replacements of loops.
That was a joke, but on a more serious side, all of the STL functions internally use loops, and
transform
is a close as there is to a loop replacement. The recursive solution doesn't use loops at any level.Ok, sorry :)
About STL functions. Yes, of course, that is true. But when you use a function like
find
oraccumulate
, you're not thinking in terms of loops. You're thinking at a higher level, where you're just performing some operations with sequences. If we would use something like accumulative variable +iota
+generate
or smth that would actually be just a loop replacement, but I don't think that basic STL usage is "loopy".can't u do recursion?
Wow. This is really a cool way to do this challenge.
A challenge where you use have to use goto to make your code execute from bottom to top.
upvoted cuz I am already having ptsd seeing 5 mins of stream. cant imagine life without loops
Man had to spend more time on Stack Overflow than on Codeforces, during the contest XDXD.
Literally.
Can't wait for the second episode in div1
You should check out how functional programmers do it. IIRC clyring competes using haskell!
I really enjoy haskell. Thank's one of the reasons I decided to do this challenge.
This was something different, Loved it!!
Suggestion: write every problem in a different language
Another suggestion: you cannot type anything when you are not blindfolded
Probably the most popular one: drink (alcohol) before each submit
I don't drink :(
But the other ones are great.
Then 10 push-ups before each submit
And extra 30 after each incorrect one
And this grows arithmetic with each wrong submission
Hm I actually like this one, probably will do something like this myself
We can make it a competition with multiple participants
Rather than blindfolded, using a weird font like wingdings makes for a more entertaining screencast. You should invite Ari who does this a lot:
https://www.youtube.com/watch?v=gvXNFP0ef8Y
https://www.youtube.com/watch?v=5n9-wLFdT_0
aa aa aaa
A challenge where only C language can be used, without importing any headers except stdio.h would be fun
You don't even need stdio.h, it's possible to solve problems without any headers
My suggestions :-
Read all the problem statements at once noting necessary details in first 10-15 minutes and then never look at them during the contest.
Only one attempt per problem. You can't resubmit once you get a WA or TLE or a RUNTIME error etc.
Not using #include <bits/stdc++.h> (Not that challenging TBH)
Imagine a beginner who didn’t understand the concept from editorial and accidentally open peltorator's codes!
Lmao
Now next challenge : Don't use cout or printf in C++. :XD
how about not using 'if'