MokaMoka's blog

By MokaMoka, history, 7 years ago, In English

Hello Codeforces,

I was thinking of writing a script that utilize Codeforces api to get some kind of a server push with the rating change after the contest, since it's annoying to periodically refresh and check if it has changed yet or not

but I'm not sure it's the best strategy to make an Http request on a regular interval, so I'd like to ask if anyone has a better idea (or maybe has written such a tool and can explain how to get it achieved better)?

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it

By MokaMoka, history, 8 years ago, In English

Hello Codeforces,

I started learning Python a week ago, and I've just solved my first problem using it. However; I was surprised by the huge execution time and memory for a very trivial problem, which makes me doubt if there's any effective tricks/advice to follow when using Python for competitive programming.

Wouldn't it be nice if we just collect some of those ideas here or somewhere else and make it available for everyone?

Please don't comment such comments like "The only advice I can tell is Don't use Python for competitive programming" :P, this is serious :)

Full text and comments »

  • Vote: I like it
  • +16
  • Vote: I do not like it

By MokaMoka, history, 8 years ago, In English

Hello guys,

I am here to ask a question that many of you might find it off-topic, but I believe this is the most suitable place to ask such a question :)

most of us — CS students who fall in love with competitive programming — want to practice this pretty sport as much as possible, and most of the times we don't find much time for that as we have too much school work, and we end up failing exams to practice more at CodeForces and similar sites :P

but some of our school homework and projects are free to find an idea in a specific field and work on it, since then, we wanna maximize the benefit returned by this projects and make it as close as possible to competitive programming

so guys, what do you think are some good ideas that use and cover some competitive programming topics to do as a college homework/project?

for example: What do you think is a good simulation project idea to choose that covers some parts of computational geometry?

thanks for your listening and waiting for your opinions :D

PS: Forgive my bad English :P

Full text and comments »

  • Vote: I like it
  • +10
  • Vote: I do not like it

By MokaMoka, history, 8 years ago, In English

How do you — Competitive Programmers :) — maintain your motivation ? what strategies do you follow to keep yourself motivated ?

I am not talking about a guy who doesn't like CP and wanna motivate himself to do tasks, this question aims to see different strategies competitive programmers do to keep themselves in the mode :D !

Full text and comments »

  • Vote: I like it
  • +25
  • Vote: I do not like it

By MokaMoka, history, 8 years ago, In English

Hello guys,

I have a probability problem that might look easy for most of you mature and experienced programmers,

" For a football team which consist of 11 players, there's a player that's gonna retire.

the coach of that team decided to make a challenge among n young players to have that player's position, and he decided to make some 1-to-1 matches

the coach has some expectations for that matches, so he wrote down an n*n matrix that holds these expectations,

let's call that matrix with the name A, so for A[i][j], there's a value between 0 and 1 which denotes the probability of player i wins against player j according to the coach expectations. for sure that matrix is gonna be symmetric and A[j][i] = 1 — A[i][j]."

I need to find out each player's probability of holding that position according to the given information, to be real this problem is driving me nuts and for sure any help would be appreciated :"))

Forgive my bad English since I'm a non native speaker, and thank you guys :)

Full text and comments »

  • Vote: I like it
  • +11
  • Vote: I do not like it

By MokaMoka, history, 8 years ago, In English

Any hints to solve this problem ?

http://a2oj.com/p.jsp?ID=11

I tried to get the least common multiple (lcm) of the increasing factors of these two sequences but there was a bug which is that the starting points are not always equal

Any help please?

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it