Comments

I'd agree with the point regarding fun. Contests obsess people, that's true. People like them, because they can see the results in scoreboard, they get excited and spend more and more time to get higher ranking.

I participated a lot in CTF contests, which are much more practical and broad than algorithmic programming, and nevertheless many security guys, who cannot afford to solve even simple CTF challenges, keep saying these competitions are useless and artificial, and it's better to invest time in research.

The truth is that you should better keep balance in any computer field: do contests for fun and skills and do research and real projects for knowledge and profit.

That being said, just remember the fact, that most of great computer scientists were not competitive programmers, and neither are most of highly qualified software engineers.

Don't underestimate and don't overestimate contests, don't be fanatic about them, luckytoilet is almost right about inflection point, but the concrete value of rating depends on you and the field you're gonna work in.

It seems to me, that you're overestimating the importance of CF rating. Competitive programming is a narrow field, which requires highly special skills. These skills are not necessarily relevant to CS research. While competitive programming is a sprint with no right for mistake, research is a long marathon, where you can think carefully and try a lot.

Furthermore, most of successful CS researchers are not successful competitive programmers, and most competitive programmers probably don't do research at all.

I think, that many of problems mentioned here will be solved after several rounds, because maybe many people will move to div1 due to rating formula change (even though we don't know exactly what is it like now). Even without significant change -- don't you remember div1+2 rounds, when you could gain a huge rating boost? That's what can happen in current new div2 rounds. Another observation: before this moment the one, who won his first div2 round, got like 1750-1800 points and moved to div1. If the property (win the first round -- move to div1) will be preserved, it possibly means, that rating changes can be bigger now %)

A funny viral tweet on this topic (hiring at Google and algorithmic questions): https://twitter.com/mxcl/status/608682016205344768

On TensorShare your typing speed xD, 11 years ago
0

Just registered and tried a couple of races there -- got 86 and 84 wpm: http://data.typeracer.com/pit/profile?user=beched

However, my english-typing is quite slow (about 1.4 time slower than russian, as measured by klavogonki.ru).

On ArtermGood Code, 11 years ago
+60

Reminded me of this Java snippet in Python-like style =)

https://pbs.twimg.com/media/B-hLBUFIYAAKhPN.png:large

On ZloboberVK Cup Round 2 online mirror, 11 years ago
+3

No, consider the case "aab". If you insert 'a' before the first char and before the second char, you'll get the same strings. The answer is 25 * N + 26, as I mentioned above.

On ZloboberVK Cup Round 2 online mirror, 11 years ago
+5

If the strings are equal, the answer is 25 * n + 26

Python2 division is integer, unlike Python3's.

Change x / 10 to x // 10 and get AC.

You don't need even hashes, the tests are very poor. Check out my accepted O(|p|*m) solution: 10721289. It simply compares substrings of p for each y_i.

Seems like it's PyPy's magic optimization. Same code fails with Python: 10721757

EPIC fail, I've coded stupid algorithm for D with O(n) comparison, I've made a couple of mistakes (didn't consider that indexes start with 1 and tried to read y_i even if m=0), and it failed on 33th test.

Now I've fixed these errors, and my inefficient solution passed all tests. WTF? :D 10721289

Just create a mesh-up in gym (http://codeforces.me/mashups) with 3 problems A-B-C. Then you can take a look, what place you would have taken, if you were participating in actual round with these problems.

On SeyauaRockethon 2015 Announcement, 12 years ago
0

Shit, I haven't noticed for 40 minutes that my A hasn't been submitted because of server fault =(

0

Yeah, you're right, but actually there're strong algorithmic competitors, who also participate in CTFs from time to time (and have quite good results). At least Endagorion, ifsmirnov, droptable, winger, package.zaic, AlTimin, AlexFetisov =) BTW, some members of Dragon Sector team got medals at Polish Olympiads in informatics and mathematics.

0

I can add that CTF hacking competitions are also in many ways programming competitions (but require much more broad knowledge and skills than just programming algorithms), and sometimes there's even special category called PPC (professional programming and coding), which usually includes tasks, where you need to win some game using algorithms (sometimes there're also classical algorithm problems, and sometimes you need to automate routine operations like recognizing captcha).

What has happened to this participant? http://codeforces.me/submissions/Nuta She's sent submissions to all problems during the round, and was at top-2. But right after the end she got out of rating.

Very strange: during the round I was hacked by kgbugy659. She solved all the problems and was on the 2nd place before the end. But now she's out of scoreboard, her submissions are not listed in the room o_O Furthermore, her last rated round (before today) is not included in the graph. Weird %)

-11

It should not be skipped, probably both solutions should be tested, and the best one should be chosen...

Ok, maybe this is done to avoid overloading of system testing with a lot of submitions which pass the pretests.

Good evening!

I've sent 2 solutions for C just in case. I thought that it's logical, that the second try will be ignored. Why the first try is ignored? It has passed the tests and would've given more points. Is this normal behaviour? I've missed it...

01:28:17 Попытка игнорирована [претесты] → 8919160 01:53:40 Полное решение [финальные тесты] → 8921562

0

Does the interface always inform about hacks with delay?

I got a message about my stupid C solution being hacked only after about 20 minutes and hadn't enough time to correct it =(

On PrinceOfPersiaCrypto Cup 1.0, 12 years ago
0

Cool, crypto CTF at CF =)

Nothing works, can't see any problems.

On NerevarCodeforces Round #274, 12 years ago
0

Damn it, why did I write sorted(a, key = lambda e: e[0]) instead of sorted(a) >.<

Couldn't one solve C with segment tree? I've almost implemented it, hadn't enough time, but don't know if such a solution would pass tests.

I solved C a bit another way with DP: http://codeforces.me/contest/466/submission/7770043 First consider the case when Σ a = 0, where a is input. Then count the number dp of all indexes i from 0 to n - 2, for which Σ0ia = 0. The answer is .

Now consider the case when s = Σ a ≠ 0. Take two lists dp0 and dp1. dp0 will contain all indexes i, for which , and dp1 will contain all indexes j, which satisfy . Now remains a bit tricky part, which can get TLE, if not correctly implemented: count all ordered pairs from dp0 and dp1. This can be done in linear time by looping through dp1 and saving current dp0 index:

f=0
for sec in dp1:
    ans += f
    for fir in dp0[f:]:
        if fir < sec:
            ans+=1
            f+=1
print ans
0

Hm, very weird, I got AC only after I've added the check for length in check() (if l > 1: ...).

And even more weird is that one-symbol password should always be weak, this fix doesn't make any sense...

Maybe it was some bug in checking system.

import re

n = int(raw_input())
ts = [raw_input().strip() + raw_input() for i in xrange(n)]


def check(p):
    r = 0
    l = len(p)
    if re.match('.*\d.*', p):
        r += 1
    if re.match('.*[a-zA-Z].*', p):
        r += 1
    if re.match(r'.*[\!@#\$%\^&\*\(\)].*', p):
        r += 1
    if l > 5:
        r += 1
    if l > 10:
        r += 1
    if re.match('.*[a-z].*', p) and re.match('.*[A-Z].*', p):
        r += 1
    for i in xrange(l):
        if p[i] in p[:i]:
            return r
    if l > 1:
        r += 1
    return r

for i in xrange(n):
    print 'Case #%s:' % (i + 1)
    t = ts[i]
    c = check(t)
    if c < 4:
        print 'weak'
    elif c >= 6:
        print 'strong'
    else:
        print 'normal'
0

I guess, the statement of problem A was not completely clear.

"All characters of the password are different. (Small and capital form of the same Latin character are considered different)"

First I reformulated this as "Each character appears only once in the password" and considered that one-symbol password satisfies this condition, which was wrong.

On MinakoKojimaCodeforces Round #259, 12 years ago
0

Can't see any differencies, there's the same (incorrect) answer at ideone, isn't there?

18 3 2 1 2 4 5 7 5 10 5 4 8 4 9 4 3 6 3

On MinakoKojimaCodeforces Round #259, 12 years ago
+3

Oh LOL, DIV2C/DIV1A was damn simple, and I messed it up %)

Wow! I just wanted to code such a thing, quite useful