Hacking a tester (again) | Codeforces Round 748 - Facecam + Commentary + All Solutions (A-G) [28th]

  Рет қаралды 10,834

Colin Galen

Colin Galen

Күн бұрын

Contest link: codeforces.com/contest/1593
My submissions: codeforces.com/submissions/ga...
Apparently I hacked another tester with the test that got myself, got another unexpected verdict, which means either the author's or a tester's solution was hacked too (not on camera this time, though) . Test 15 is mine - any TLE will be my fault. It's just that there's no bound on the sum of K, so an O(tK) solution will probably die.
Timestamps:
Intro 00:00
A (solving) 00:18
B (solving) 02:00
D1 (solving) 05:50
C (solving) 08:31
E (solving) + losing my compiler 13:58
D2 (solving) 21:40
G (solving) 39:00
F (solving) 1:00:00
Contest reflection 1:10:49
A (solution + code) 1:16:32
B (solution + code) 1:18:30
C (solution + code) 1:22:10
D1 (solution + code) 1:28:08
D2 (solution + code) 1:37:50
E (solution + code), and realizing I'm hackable 1:41:08
F (solution + code) 1:49:50
G (solution) 1:54:29
Conclusion 2:01:00

Пікірлер: 32
@tearnfourstar
@tearnfourstar Жыл бұрын
It would be great if you could make a video going over your template and the reasoning behind why you've constructed it the way you did for cp. I personally would get a lot of value out of it so I'm sure others would too!
@RudraSingh-pb5ls
@RudraSingh-pb5ls 2 жыл бұрын
For problem D1, Isn't printing -1 for the case when gcd of all differences = 0 legitimate ? Because then there is no upper bound on value of k
@ColinGalen
@ColinGalen 2 жыл бұрын
Sure, but considering that the answer is the gcd, it's much more natural to print 0 since the identity value for gcd is 0. 0 would also be a valid answer for infinity since it's a meaningless value of k anyway, but they chose -1 instead.
@gigachad4278
@gigachad4278 2 жыл бұрын
2:02:14 the LinkedIn effect
@nskybytskyi
@nskybytskyi 2 жыл бұрын
Nice catch!
@nskybytskyi
@nskybytskyi 2 жыл бұрын
@YUZHE NI when I don't feel negative about certain things happening in CP.
@ranveerrandhawa282
@ranveerrandhawa282 2 жыл бұрын
@@nskybytskyi mind if I ask, what are those things?
@Why_I_am_a_theist
@Why_I_am_a_theist 2 жыл бұрын
Can you please tell me some resources to start with data structures and algorithms for competitive programming For example, I know a website CP algorithms. A book ' Guide to competitive programming ' but you know a complete course
@RudraSingh-pb5ls
@RudraSingh-pb5ls 2 жыл бұрын
Had some issue in proving/getting intuition for problem D1. There is a method of taking differences of all elements with smallest element, and then taking their gcd which will be max value of K. why is it optimal to reduce all elements to the smallest element present in array, why don't we reduce all elements to some arbitrary value which is even smaller than the already present smallest element in the given array ?
@ColinGalen
@ColinGalen 2 жыл бұрын
That's a possible strategy, but it doesn't matter because you also have to reduce the smallest number to that target value. Say you do x operations on the smallest and end up with a smaller number. Then you could have just not done those x operations, and the numbers would still be equal.
@RudraSingh-pb5ls
@RudraSingh-pb5ls 2 жыл бұрын
@@ColinGalen but what if on doing those extra x operations ( to further reduce every element) we get a higher value of k then ? Why can't this scenario happen because out goal is to maximize k?
@onurcanisler
@onurcanisler 2 жыл бұрын
18:09 *The top BRUHest moment of Colin Galen.*
@MiketheCoder
@MiketheCoder 2 жыл бұрын
You should take math 340 and 341 in umd!
@jeremiah5226
@jeremiah5226 2 жыл бұрын
How did you hack the tester
@sohammukherjee8079
@sohammukherjee8079 2 жыл бұрын
When "Can I do anything? " came a number of times, I thought for once it was my system messing with me too. PS : Do you hate non-terminal based static input online compilers?
@ColinGalen
@ColinGalen 2 жыл бұрын
Generally, I prefer to have control over the terminal so I can have control over the environment. But I think, overall, online compilers like that are fine as long as they're functional. I used repl.it here because I'm roughly used to it.
@rishabhverma7730
@rishabhverma7730 2 жыл бұрын
Anyone know in which edge case E got hacked
@AbhishekKumar-fp7bm
@AbhishekKumar-fp7bm 2 жыл бұрын
if you come to know plz tell me
@ColinGalen
@ColinGalen 2 жыл бұрын
The sum of K over all test cases isn't limited. So any solution with O(K) per test case will likely fail.
@I_U_I_T_C
@I_U_I_T_C 2 жыл бұрын
Bhai mujhe bhi bna hai teri tarah
@priyanshsharma5707
@priyanshsharma5707 2 жыл бұрын
Fast AF 🙏
@rohannirmal7396
@rohannirmal7396 2 жыл бұрын
Nice hair bro ❤
@shanewalsch
@shanewalsch 2 жыл бұрын
I couldnt even solve A ;( Always got mistakes in test cases
@griffin5631
@griffin5631 2 жыл бұрын
Me too 🥺 how to think about all test cases
@blitztage3245
@blitztage3245 2 жыл бұрын
Everyone starts somewhere, don't worry
@griffin5631
@griffin5631 2 жыл бұрын
@@blitztage3245 😔
@ash.ketchum.
@ash.ketchum. 2 жыл бұрын
I solved A when he solved all LMAO😂
@leovl1041
@leovl1041 2 жыл бұрын
1st
@Why_I_am_a_theist
@Why_I_am_a_theist 2 жыл бұрын
Can you please tell me some resources to start with data structures and algorithms for competitive programming For example, I know a website CP algorithms. A book ' Guide to competitive programming ' but you know a complete course
@ColinGalen
@ColinGalen 2 жыл бұрын
usaco.guide is pretty good, I used train.usaco.org for my knowledge base
@Why_I_am_a_theist
@Why_I_am_a_theist 2 жыл бұрын
@@ColinGalen Thanks Colin
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 14 МЛН
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 41 МЛН
ТАМАЕВ vs ВЕНГАЛБИ. ФИНАЛЬНАЯ ГОНКА! BMW M5 против CLS
47:36
Unsolicited feedback Git Dailies
1:36
Move Work Forward
Рет қаралды 1
Unlocking Your Intuition: How to Solve Hard Problems Easily
17:34
Colin Galen
Рет қаралды 1,2 МЛН
3-Minute Mental Hack to Take Control of Your Subconscious
11:25
Colin Galen
Рет қаралды 1,2 МЛН
I Made a Neural Network with just Redstone!
17:23
mattbatwings
Рет қаралды 594 М.
C++ Mistakes Noobs Make (and how to prevent them)
28:22
Colin Galen
Рет қаралды 19 М.
The Dark Side of Competitive Programming
10:49
Colin Galen
Рет қаралды 43 М.
A Simpler Way to See Results
19:17
Logan Smith
Рет қаралды 96 М.
The Feasibility Bias: Why You're Not Happy With Where You Are
14:45
Code With Me: 24 FAANG Interview Questions
3:39:55
Colin Galen
Рет қаралды 106 М.
Купил этот ваш VR.
37:21
Ремонтяш
Рет қаралды 263 М.
Нашел еще 70+ нововведений в iOS 18!
11:04
📦Он вам не медведь! Обзор FlyingBear S1
18:26
Неразрушаемый смартфон
1:00
Status
Рет қаралды 1,2 МЛН
ВЫ ЧЕ СДЕЛАЛИ С iOS 18?
22:40
Overtake lab
Рет қаралды 129 М.