Блог пользователя Errichto

Автор Errichto, 6 лет назад, По-английски

Hi.

https://www.codingame.com/ regularly holds 10-day long competitions where you should write a program that plays a 2-player game. Sometimes you must move units/soldiers in a grid, sometimes it's a card game. The next game starts tomorrow (Friday) and then we'll see what's the topic (well, it must be food related).

I'm going to stream my approach from scratch on Youtube and Twitch. Start on Friday at 9pm CET (3pm EST). Btw. I streamed the previous game three months ago, link.

No prerequisites needed. I will explain my thoughts and give general advice for this type of contests. Feel free to ask questions in chat.

See you!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +47
  • Проголосовать: не нравится

Автор Errichto, история, 6 лет назад, По-английски

The qualification round starts in 50 minutes. Let's share scores and discuss the problem after the contest. Useful links below.

Judge System
Official livestream
FAQ

Good luck!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +79
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Sadly, after spending a few hours learning about quantum programming, I decided to cancel the stream. Maybe I would be able to solve some problems in the warm-up round, but certainly, I don't have enough knowledge to make a stream about it, and I'm afraid I would say something incorrect multiple times and thus cause damage to viewers. I'm extremely sorry for that.

Instead, I will talk about the Google Hash Code competition. I competed last year with a success. Our team won the qualification round and we were 6-th in the final round (I hope I remember that correctly because I can't find the standings). I'm going to go through the problems from that 2018 edition, talk about my codes, and I will give general advice for the contest. If you want to participate this year, you must hurry — the registration closes tomorrow (on Monday)! Registration link.

The stream starts at 12:00 CET.

My next stream is this Sunday at 12:00 CET, and I will try to solve problems from the ongoing warm-up of Q# Coding Contest by Microsoft's Quantum team. Read more details about that contest in the announcement.

I'm very excited about this because it will be something unusual, just like distributed algorithms that were new and amazing for me. mareksom competed in the first edition and he said it's very cool. If it turns out boring, let's blame him.

PS. I have no idea what quantum programming is, but I watched Ant-man and Ant-man 2. I hope this is enough. (yeah...)

You can watch me on Youtube or Twitch.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +114
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Hi.

On Sunday, I'm going to solve problems from the Educational Dynamic Programming contest on AtCoder — https://atcoder.jp/contests/dp. Start at 10:00 CET (check your timezone), expected duration 5 hours. Watch me on YT or Twitch: https://www.youtube.com/errichto, https://www.twitch.tv/errichto.

There will be 26 problems, all on dynamic programming. More info here.

See you tomorrow!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +149
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

What to do when you need help with a problem?

  1. If there is an editorial, read it. If you don't know some technique, google it and read a tutorial.
  2. Ask a friend for help. It's very useful to find someone in your university/country who also does competitive programming.
  3. "I'm getting WA and don't know why."
    Try to find a counter-test. Take an accepted code if it's available, and write a brute force otherwise. Test it against your solution on thousands of random tests, especially small ones.
  4. "My code doesn't work on this test."
    Use some debugging tools (google them for your OS/IDE) or just print values of everything you compute. I use gdb and valgrind. Simulate the program on paper too. This way you should find an exact place where something incorrect happens, or you will see that your approach is completely wrong.
  5. "The output differs on my machine and in Codeforces/anotherPlatform."
    It's likely "undefined behavior", e.g. you don't initialize a local variable or you don't return anything from a non-void function. It doesn't happen often if you know the language well. Avoid non-integer values if possible, because real values involve the precision error. Try running your program in a few places online like ideone.com or Codeforces custom invocation. Don't use ideone during a contest or somebody will see your code and you will be disqualified! If it's C++, use compilations flags that catch more errors. I use g++ -std=c++17 -Wshadow -Wall -o a a.cpp -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG -g. It increases the running time though, so compile in a different way if you need the speed.

General advice:

  1. Practice by solving problems with editorials, especially if you don't know people doing CP, e.g. in your university.
  2. Solve problems slightly above your level, not something extremely hard. If the solution/editorial is overwhelming, maybe get back to this problem in a few months.

Still want to ask for help?

  1. If you think your question is small and easy to answer, consider asking in the discord channel, link.
  2. Write a blog instead of asking some random red guy in priv. This way more people can see it and more people can read the answer and learn something.
  3. Provide a source of your problem.
    If there is no link and a person is not well known in the community, I'm assuming it's from an ongoing contest or it's your homework. I think such blogs should be answered too, but not immediately.
  4. Describe what you already came up with.
  5. If you have some code, use meaningful variable names and put comments. If you know which part doesn't work, mention it.
  6. Either put the code in "block" and "spoiler" tags (you can see them next to bolding and enumeration), or give a link to a submission or an upload in pastebin/ideone/etc.
  7. Use proper English. Full words, dots to finish sentences, uppercase to start them. Use a browser that checks your spelling in English.
  8. You can read more here.

Also:

"Can I ask a question?"

This happens often in priv. Just ask your question instead of wasting my time. Also, http://www.nohello.com/.

Using "bro/sir"

Don't use that. See how others write in Codeforces or any other international forum.

"Why is my blog downvoted?"

You shouldn't care about it. Codeforces votes are strange and random sometimes. Still, use your main account. I prefer answering people that use Codeforces and have some non-empty contest history.

"How to train, get better, etc.?"

Google your question. There were plenty of those in Codeforces and Quora. If you don't want to do that, just read this.

What should I add here? Suggestions in comments or priv, please. And when you see a badly asked question or somebody bothers you in priv, feel free to link to this blog.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +127
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

I got a private message in Codeforces:

"hey u r on cf and toc both . how r problems at toc div1 for gcj and fb hc ? for practicing."

I told the guy to use full words and to start the beginning of a sentence with uppercase, so it would be easier to understand him. And he indeed sent me a version that is easy to read!

"ok ! Hey , you use both codeforces and topcoder ! I wanna know How are problems at topcoder division 1 for practicing for google code jam and facebook hacker cup !
Which is the best Platform for it !"

So much better! Remove an unnecessary space character before punctuation marks (dots, exclamation marks, etc.) and you have proper grammar and everything. I also recommend using uppercase for abbreviations like CF, TC, FHC, GCJ. My English isn't perfect either, but I'm learning. And I use Grammarly (a free add-on with optional premium) that finds a lot of errors, typos, and missing commas. For example, I've just written "grammarly" and it suggested correcting it to "Grammarly". Fair enough. Btw. my answer was: Topcoder and Atcoder for GCJ, Codeforces and Codechef for FHC.

Anyway, what did make you proud of Codeforces recently? Did you see some post that asked for help with a problem and wasn't downvoted into oblivion? Or maybe somebody wanted to share their private videos for free? Share your stories!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +206
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Hi.

Thanks to kostka, this weekend you can participate virtually in an old edition of Polish olympiad: POI XVIII, stage 2. There are two days of a contest, Saturday and Sunday, 9-14 CET (check your timezone here). An hour after the contest ends on Sunday (so, 15 CET), I will talk about problems from both days in a stream. You can watch me on Youtube and Twitch.

Create an account in Szkopul first, link. The statements will be both in Polish and English, or the link to the English version will be provided as an announcement.

If you can't participate, I still recommend you to read the problems and try to solve them yourself before my stream.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +53
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Hi. I'm finally done with organizing Algorithmic Engagements, and I have time to go back to my streams!

Other Twitch programming streamers usually just do their job/project and they stream that. I'm going to do a similar thing. So, apart from my lectures and problem-solving streams, I will do a weekly longer stream, maybe around 6 hours.

My first Boring Programming Stream will be on Wednesday Tuesday (10am to 4pm CET, youtube link with countdown) and some of the things I might do are:

  • Writing editorials for my old problems.
  • Adding timestamps to my lectures on Youtube.
  • Planning the next lecture (or Facebook posts).
  • Reading the "Segment tree beats" blog (I know that tree, but I've never read examples and tasks given there).
  • Learning how to edit videos.
  • Reading Codeforces comments and maybe helping someone with a problem.
  • Learning how to use OneNote for drawing.
  • Choosing graphics (banner and thumbnails) for my channel.
  • Answering people's questions and comments.

This is something that I would do anyway, and it isn't confidential (unlike preparing problems), so I can stream it and allow people to hang out with me. Feel free to suggest something via discord or in the comments below this blog, but please notice that I will mainly do things that I need/want to do.

Cheers.

My Youtube channel: https://www.youtube.com/errichto.
I will stream on Twitch at the same time: https://www.twitch.tv/errichto.
Competitive Programming Discord: https://discordapp.com/invite/UzaURu7.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +167
  • Проголосовать: не нравится

Автор Errichto, история, 6 лет назад, По-английски

Wednesday evening (check your time zone) I will stream solving an AI bot problem on Codingame, https://www.codingame.com/ide/challenge/xmas-rush. As usually, I will talk a lot about what I'm doing. The goal is to show you how to approach this kind of problems.

Link to the stream on Youtube (and currently just the countdown): link.

If you want to chat with me before or after the stream, visit the Competitive Programming discord, link.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +90
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Hi. I'm back from USA!

I will do a new lecture tomorrow (Thursday) at 2pm CEST on my Youtube channel: https://www.youtube.com/watch?v=7hFWrKa6yRM. Watch me live (and ask questions), or just watch the video later. This will be part 1, and I will do part 2 in a few days (maybe Tuesday).

UPDATE — part 2 is coming on Thursday, same time. Link: https://www.youtube.com/watch?v=gXxu-Cr4b4c.

There are no prerequisites this time. I recommend reading the materials below in advance, and trying to solve problems 1 and 5. If you are strong, just read problems and see if you can't solve something (maybe problem 8?).

Technique "Exchange Arguments"

If we're given n items and we should choose some of them and choose their order, we should sort them with some strange/tricky comparator, and then do O(N2) dynamic programming. The dp should be dp[pref][used] — best possible result (balance) if we chose used items so far (in the prefix pref).

"Strange/tricky comparator" checks which of the two elements should be earlier, usually just solving the problem for N = 2.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +478
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Instruction

I recommend this blog also for red users. Read the theory and problems below, try to solve them. For solutions and extra insight/tips, watch my stream on Monday or watch the video later. If you aren't familiar with EV or summing problems, see part 1 first: http://codeforces.net/blog/entry/62690.

I will stream a lecture on Monday at 14:00 CESThttps://www.youtube.com/watch?v=HDk6zQw0Rdo (also Twitch). I will go through theory and problems from this blog.

Expected Value theory, part 2

We roll a 6-sided die. Remember, EV of square of the number of pips is something different than square of EV:

Two events are independent if the result of one doesn't affect the distribution of p-bilities of the other. Results of throwing two dice (or throwing one die twice) are independent, but the amount of rain and the strength of wind are dependent.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +166
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

part 2: https://codeforces.net/blog/entry/62792

Watch my lecture-stream tomorrow (Thursday) at 14:00 CESThttps://www.youtube.com/watch?v=qdlPY37MBPo https://www.youtube.com/watch?v=U_h3IjreRek. I will go through theory and problems from this blog. The only prerequisite is knowing what is probability. The next (harder) part on Monday.

The video will be available later, with timestamps for each problem — so you don't have to watch everything.

Definition of EV

Let's say we bought a lottery ticket for 2$. We will win 10$ with probability 10%, and 20$ with p-bility 2%. On average, it gives us 0.1·10 + 0.02·20 = 1.4, so we are worse off after buying the ticket. The computed average is called the expected value.

The expected value (EV, expectation) is the average value of an event/experiment. For example, EV of the number of pips rolled on a 6-sided die is 3.5:

Linearity of EV (super important theorem):

Полный текст и комментарии »

  • Проголосовать: нравится
  • +614
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

If you use Facebook, you might want to check out my new page https://www.facebook.com/errichto. I will post some short problems, puzzles I know/heard (maybe also not-algo puzzles, who knows), mention upcoming contests or cool problems from recent ones, sometimes share my thoughts about an algorithm or a contest. Kind of a blog, but likely with shorter but more frequent posts. Cheers!

PS. next Competitive Programming stream will be on Monday, div2 C-D problems from recent CF rounds, 12pm CEST.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +155
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Hi.

There is a new game where you can win $10k for writing the best bot for a 2-player game Terminal: https://terminal.c1games.com. There are some smaller local competitions, mainly for universities. In short, it's a tower-defense game where you build towers to defend against minions sent by your opponent, and at the same time you attack with minions too.

I have some experience with games like this (we had a few 24-hour game-bot competitions in Poland), so I think I can share some knowledge and intuition. I will stream on Wednesday (1pm CEST), Friday and Sunday. You can see the exact time on my Youtube channel as a scheduled event. If you miss it, you can watch a video later.

I talked with contest organizers and they encourage the stream, but ofc. you shouldn't expect to hear something enough to get top1.

See you.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +139
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

Hello again.

Next stream will start tomorrow (Wednesday) at 2pm CEST (your timezone), solving problems from POI 22, round 1 (link). It will be on my Youtube channel.

I did two streams this weekend that you can now find on my youtube channel. The first with quite easy Codeforces problems that I solved from scratch (I haven't seen them before), also implementing them. The second one with a bit harder Topcoder problems that I've solved before, but I didn't necessarily remember the solution now — and for those I only described the solution, without implementation. The streams were fine but there are a lot of things to improve.

I wanted to see two things:

  1. Can I stream? Am I able to try to solve a hard problem and at the same time talk in English, that isn't my native language? So so. It wasn't a disaster, but I hoped to be better, more efficient. I think I'm not able to stream solving hard problems from scratch, without knowing the solution already. Not if I want to keep it educational and spend time explaining everything.
  2. Do people like it? Yes, apparently they did :)

I watched some of Petr's streams and I would say he shares his thought process, basically saying out loud what he thinks about. But he doesn't explain things. It's an interesting thing but I don't see learning from that. Still, I think it's the best possible format of streaming an actual contest, where you shouldn't waste time. I also think that I would do it much worse: I'm worse in CP and in English proficiency.

$$

Полный текст и комментарии »

  • Проголосовать: нравится
  • +240
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

I want to try streaming competitive programming. The goal is to make it educational so I will be talking a lot, also answering (at least some) questions.

I'm planning three completely different streams to see what format to use:

  1. Solving random easy-medium problems.
  2. Solving old problems from Polish olympiad.
  3. Post-contest stream, assuming I'm a setter or tester of a contest. Similar to what scott_wu, ecnerwala and stevenkplus did.

Any thoughts, ideas?

The first stream will most likely be on Sunday, starting around 7-8pm CEST. I will use Twitch and talk in English only. These first streams should show me and you whether it's cool and useful, and whether I like doing it.

Also, I will try to make the video accessible later.

--- UPDATE ---

The first stream will start on Saturday at 10am CEST (check your timezone) here: https://www.twitch.tv/errichto. I will solve some div1 A-C problems, not necessarily from Codeforces.

--- UPDATE 2 ---

The second stream on Sunday evening, with problems from POI 22, round 1. You can try to solve them yourself first — link. I will do problems from POI in a few days.

I will start today at 19:35 CEST (check your timezone) and I will talk about hard problems from this year TCO qualification rounds. If I do well in SRM today, I can start with problems from the round first. So, the main topic is hard DP problems, I guess. I prefer to stream on Youtube today, but I have some difficulties. I will announce here where the stream will happen. If someone has experience with Youtube live, please write to me.

I will stream on Youtube: https://www.youtube.com/channel/UCBr_Fu6q9iHYQCh13jmpbrg.

--- UPDATE 3 ---

SRM was moved by one hour, so my stream will start at 20:35 CEST.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +973
  • Проголосовать: не нравится

Автор Errichto, 6 лет назад, По-английски

I initially wrote a longer comment on Radewoosh's blog but realized the following part is a completely separate thing.

Wanting to get contribution is a good thing.

It's an incentive to literally contribute to the community. This is how rankings work. People dream to be top10 rating one day and it motivates them to work harder. The "top contributors" list has the same goal: to incentivize people to help others.

I don't mind if someone says "you want to get to top10 contribution" to me, and I joke with friends about it (also about Swistakk and Radewoosh). The bad thing is that a comment like this can be seen by others and make them less motivated (maybe unconsciously) to contribute. You likely don't realize how much the feedback matters. Preparing contests isn't more profitable than working in a company, but it's so rewarding to know some people liked your problems that it motivates you to do it again. It should be similar for writing educational blogs.

The contribution isn't a perfect measurement and for example fcspartakm has so incredible impact on the whole CP world (he works on Polygon) that he deserves to be top10 easily. There are so many people contributing locally too. kostka recently organized a relatively cheap camp for polish representation for IOI (and a few people next in line). He invited me and a few others as organizers and paid us, did most of the problems-related job himself anyway. We got some money (a payment/salary as agreed earlier), he didn't. He spent week+ of his time and some money on gasoline, and he didn't get anything. It's good to appreciate people like that. While an upvote is a nice easy thing, remember that you can always let them know that you appreciate their job and commitment.

(And I'm not saying you should start spamming some people now, because that would be annoying for them ;p )

So remember: saying "you just want contribution" basically means "you just want people to find your comment/blog useful". It's a very stupid insult. Btw. I have some predictions about the first comment under this blog xd

Полный текст и комментарии »

  • Проголосовать: нравится
  • +460
  • Проголосовать: не нравится

Автор Errichto, 7 лет назад, По-английски

What do you think about Topcoder's policy regarding (not) revealing the author before the round? This time I was allowed to announce I'm an author (btw. do participate in SRM 727!) but it was generally forbidden so far. Should it stay that way? Cons of announcing the author:

  1. Every problem setter has their own style of problems. Some people will skip rounds of some setters because they don't like some type of problems. So one should carefully choose rounds in order to maximize their rating.
  2. Knowing the problem author might help you in solving a problem, e.g. when you know this author loves flows.
  3. Rounds of new setters aren't that attractive so they might get fewer participants.

My opinion is that one's rating doesn't matter much so (1) isn't important. Similarly, I'm fine with the fact that you can read problems in CF but decide not to participate — it doesn't affect me much.

If we want to deal with (2), we would also have to forbid any personal references in the statements. I wouldn't want that.

The last thing (3) is actually fine in my opinion. The author should try their best to prepare nice problems and his/her reward will be high participation in his/her next round.

Pros of announcing:

  1. Hopefully more participants in general. As an author, I want my round to get many participants and thus I announce it on CF and I invite my friends on facebook or in person. Let's also note that usually a problem setter and thus his/her friends are highly rated — in some way they make the contest more prestigious and indirectly increase the participation in the future.
  2. I don't have to hide from friends that I'm preparing a round. While it's normal to not show statements, solutions, etc., it's very hard to ensure that nobody sees that I use topcoder software or that I'm current coding in Intelli (what implies Java that I use only for TC). I'm talking mainly about programming camps where I'm usually not alone in a room. On the other hand, I once talked with Petr about this and he gave a good counterargument: a setter is paid for their work and there might be some requirements, also about keeping something secret.
  3. As a participant, I'm more eager to attend rounds of some authors. If I like their problems, I'm more likely to skip classes or stay awake until 3am. Thus, I prefer to know.
  4. Other platforms reveal everything and nobody complies.

My opinion is that authors or particular problems should be secret only for big important contests like IOI, acm regionals and WF, TCO. We usually know who authors are there but every detail matters there and thus we shouldn't know the exact author of each problem. And reasons about high/low participation don't matter there.

What is your opinion?

I wrote two comments to create a voting, but I think discussing arguments is much more important.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +178
  • Проголосовать: не нравится

Автор Errichto, 8 лет назад, По-английски

Hello, Codeforces!

I’d like you to invite for CodeChef April Lunchtime that will start in less than 3 hours (check your time zone here). The contest will last 3 hours.

Setters: Errichto, 300iq, and big help from PraveenDhinwa. Main tester: Lewin. Editorials: mgch. Translators: 300iq (Russian), huzecong (Mandarin) and VNOI team (Vietnamese). Language verification: arjunarul.

There is no registration required, anybody with a CodeChef handle can participate. Top school participants can win CodeChef laddus (details on the contest page).

You will be provided 4 problems with subtasks (IOI-style grading). Ties are broken by time of reaching your final score. The contest should be a bit easier than a Div1 Codeforces round. Remember about subtasks if you can't solve a problem for the full score, and read the editorial after the contest.

I wish you great fun and no frustrating bugs. Hope to see a lot of you on the leaderboard!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +51
  • Проголосовать: не нравится

Автор Errichto, 8 лет назад, По-английски

Good evening.

I’d like you to invite for CodeChef April Cook-Off that will start at 21:30 IST of 23rd April 2017 (check your time zone here) and will last 2.5 hours.

Problems are prepared by me and kingofnumbers. Testers are mnbvmar and PraveenDhinwa (who is also an editorialist). Translators: huzecong, Team VNOI, CherryTree (Mandarin, Vietnamese and Russian respectively).

There is no registration required, anybody with a CodeChef handle can participate.

We want cook-off contests to attract even the strongest competitors. You will be provided 5 problems, with difficulty div2-A through div1-E. We expect even the best to struggle to solve all the problems.

I wish you great fun and no frustrating bugs. See you on the leaderboard!

Additional announcement: we look for setters, testers and editorialists, especially for a setter for the coming lunchtime contest. You can reach me by PM on Codeforces.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +85
  • Проголосовать: не нравится

Автор Errichto, 8 лет назад, По-английски

Hello, Codeforces!

The CodeChef April Challenge will end in less than 4 days. You can still join and reach the top of the leaderboard. There are 9 binary/subtask problems and 1 approximation problem (a tie-breaker).

I was a tester and an author of some problems. Other problem setters are: gautam27, Frank Chen, cgy4ever, Sereja, and PraveenDhinwa who is also an editorialist. Translators: CherryTree (Russian), Team VNOI (Vietnamese) and huzecong (Mandarin). Language verifier: arjunarul.

There is no registration required, anybody with a CodeChef handle can participate. Top participants can win CodeChef laddus (details on the contest page). Prizes for first two places are 400$ and 300$.

I wish you great fun and no frustrating bugs. See you on the leaderboard!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +38
  • Проголосовать: не нравится

Автор Errichto, 8 лет назад, По-английски

Hi. I recently overcomplicated one easy-ish geometry problem and encountered the following difficulty.

Let's say I have a set of linear functions f(x) = ax + b and two types of online queries:

  1. Given a and b, insert a new linear function.
  2. Given x0, print the maximum value f(x0).

I can handle both queries in logarithmic time by using BST and maintaining the convex hull of linear functions. Can I do the same (easily?) using set in C++? The problem is that the second query requires lower_bound that is able to say whether a linear function is on the left or on the right from the optimal one. I think it's impossible because it depends on the neighboring (after sorting CH by slope) functions.

During a contest, I implemented something in O(log2) — a lower_bound that runs an internal lower_bound to find the next linear function in the set. Later I came up with an idea to extend a linear-function struct to also store a copy of the next function in the set. It requires some extra work but should work and should be O(log), right? Do you see any easier way?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +43
  • Проголосовать: не нравится

Автор Errichto, 8 лет назад, По-английски

Hello Codeforces!

I’d like you to invite for CodeChef March Lunchtime that will start at 19:30 IST of 25-th March 2017 (check your time zone here) and will last 3 hours.

I'm a setter. Testers: kingofnumbers, CherryTree. Translators: CherryTree (Russian), huzecong (Mandarin) and VNOI team (Vietnamese). Language verification: arjunarul.

There is no registration required, anybody with a CodeChef handle can participate. Top school participants can win CodeChef laddus (details on the contest page).

You will be provided 4 problems with subtasks (IOI-style grading). Ties are broken by time of reaching your final score. The contest should be a bit easier than a Div1 Codeforces round. Remember about subtasks if you can't solve a problem for the full score, and read the editorial after the contest.

I wish you great fun and no frustrating bugs. Hope to see a lot of you on the leaderboard!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +72
  • Проголосовать: не нравится

Автор Errichto, 8 лет назад, По-английски
Tutorial is loading...

Code: 25627790

Tutorial is loading...

Code: 25627860

Tutorial is loading...

Code: 25627873.

Tutorial is loading...

Code: 25627885.

Tutorial is loading...

Code: 25627898.

Tutorial is loading...

Code: 25627911.

Tutorial is loading...

Code: 25627924.

Полный текст и комментарии »

Разбор задач VK Cup 2017 - Раунд 1
  • Проголосовать: нравится
  • +51
  • Проголосовать: не нравится

Автор Errichto, 8 лет назад, перевод, По-русски

Всем привет.

VK Cup 2017 Раунд 1 пройдет 18-го марта в 18:35 по московскому времени (время в вашем часовом поясе), параллельно состоятся обычные div1 и div2 Codeforces Round #405.

Соревнование «VK Cup 2017 — Раунд 1» предназначено для команд, вышедших из квалификационных раундов. Лучшие 400 команд пройдут дальше в Раунд 2, у остальных же будет еще один шанс пройти дальше в Уайлд-кард Раунде 1 в Апреле. Те, кто не участвуют в VK Cup, могут принять участие в Codeforces Round #405 индивидуально. Все три раунда будут длиться 2 часа, все три будут рейтинговыми.

Хочу поблагодарить: KAN за помощь в подготовке соревнования, MikeMirzayanov за то, что мы тут, AlexFetisov за тестирование задач и компанию ВКонтакте за прекрасный ежегодный турнир.

Я являюсь автором задач и надеюсь (и ожидаю?), что вам они понравятся. Помните, что вы можете прочитать много задач и попробовать решить те, что найдете наиболее интересными.

Желаю вам насладиться раундом и избежать глупых ошибок.

Проблема с регистрацией на основной раунд исправлена.

div2: 500-1000-1500-2000-2500
div1: 500-1000-1500- 2250 -2500
vk-cup: 250-500-1000-1500- 2250 -2500

Поздравляем команды, занявшие первые места в VK Cup Раунде 1:

  1. Zlobober, zemen
  2. LHiC, V--o_o--V
  3. Arthur, kefaa
  4. map, Babanin_Ivan
  5. felix, Trumen

Также поздравляем победителей в параллельных раундах!

Div. 1:

  1. -XraY-
  2. Laakeri
  3. Lewin
  4. dotorya
  5. RAVEman

Div. 2:

  1. rupxup
  2. YES_RPG
  3. T0RRES
  4. HXLLL
  5. Len

Разбор тут.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +286
  • Проголосовать: не нравится