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

Автор MikeMirzayanov, история, 10 лет назад, По-русски

Добро пожаловать на 2016-2017 CT S03E02: Codeforces Trainings Season 3 Episode 2 - 2004-2005 Open Cup, Volga Grand Prix. Продолжительность тренировки — 4 часа 30 минут. Тренировка открыта как для команд, так и для индивидуальных участников. После ее окончания вы можете дорешивать задачи тренировки или поучаствовать в ней виртуально, если не смогли принять участие одновременно со всеми. Пожалуйста, участвуйте в тренировке честно.

Ориентировочный старт: 14 сентября 2016 г., 16:10 (Московское время).

Так как это тренировка, то возможно набор задач будет расширен, если для значительного количества участников он окажется простым.

Условия задач будут на английском языке, ведь мы же готовимся к ACM-ICPC!

Удачи!

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

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

if editorials of season 1 were published or atleast the codes of other people are made visible then it would be quite helpful.. :) thank you.. :)

»
10 лет назад, скрыть # |
← Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

how to a beginner can participate this season ?
thank you :)

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +17 Проголосовать: не нравится

Why does the title say "S03 E01", but the episode is Episode 02?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Wrong Ans on TestCase 104 20243522 isn't it more pathetic ? :p

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Please reopen registration :(

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Unrelated, but can I use the image in the post as my avatar?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Could you give more explanation about the question Fence. What does "if there are two red boards in the fence with the number of boards between them multiple to K" mean?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Testcase 22 in H? :D

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve H?

  • »
    »
    10 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    For all keep indices xmod that are 1's.

    Segment [l, r] is good, if l mod k = (r + 1) mod k.
    So we just need to check that there are exists modulo mod, such that xmod and xmod + 1 are both non-empty.

  • »
    »
    10 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Hint:

    Simplified the problem as : Find a subarray of an array whose sum is divided by given number K . If the sum of the numbers in the range [a, b] is divisible by K, then: (∑i=1 to a-1 arr[i]) % K = (∑i=1 to b arr[i]) % K

    Construct a hash-map which will store the cumulative sum of all the numbers thus far mod K.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

How do you solve E?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Can someone tell how to solve I please?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Well, it seems the fact that the graph isn't guaranteed to be connected makes C so much harder (adding edges carelessly to make it connected doesn't work). What was the expected solution?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

Can problem B be solved in C++???

all the Accepted solutions were either in Python or Java, I know that it could be solved using the BigDecimal Class in Java, but is there anyway to solve it with C++???

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Is there any editorial available for this round?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone give me idea about G and H just getting TLE there

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

How to solve B & I ?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why can't I see test cases?!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

test 12 in A?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anybody share there approach to the problem I ??

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

problem k : wa on test 5 ? i dont know what did i miss ? can anyone help ?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i think its better to add the time limit to the statement for each problem.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

When can we see the test cases ?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

test 3 in E?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone tell me how this solution for G is wrong ? Code

  • »
    »
    10 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    You are only looking at pairs (i, 2 * i).

    I'm guessing that you looked at and thought that there exists a pair with (i, 2 * i) by Pigeonhole or something.

    However, just look at n = 5, k = 3 and 1, 4, 5.

    To solve the problem, you have to look for every (i, x * i) which takes

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone give me ideas for solution of A or C?

In A, can you modify convex hull and do it?

In C, the graph should have a Hamiltonian cycle, that's all I could think of. How to add minimum edges to make it happen, I have no idea

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In the light of the upcoming ACM contest I looked into the last year Moscow quarterfinal problems: http://codeforces.me/gym/100792

I wanted to peek at solutions of some problems, but I didn't find any editorials or sourcecodes. Here on cf sourcecodes and tests are also not shown. So I have two questions:

  1. Does anybody know where to find editorial/outlines for solution/sourecodes of someone's solutions?

  2. If no, am I allowed to write and publish the editorial myself (at least partially), or is it forbidden for some reasons?

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +15 Проголосовать: не нравится

Regarding problem H (The Fence), there is a missing test case that makes some solutions fail due to exceeding the time limit. I think you should add it and rejudge all solutions.

The test case can be generated by this C++ code:

#include <iostream>
using namespace std;
int main() {
  cout << 2 << endl;
  for (int i = 0; i < 50000; ++i)
    cout << "10";
  cout << endl;
}
»
10 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Is there any official outlines for this contest? can't find them anywhere

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Problem F was one of the least solved problems in the contest. I wonder why nobody has asked for a solution/hint yet. So let me do the honors. The statement is amazingly simple, but I haven't been able to make any headway on this. Any ideas in the right direction would be appreciated. :-)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

How to solve K?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Someone please post their approach to problem K- Parquet ?