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

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

Hello CodeForces Community!

I would like to invite you all to participate on Tishreen-CPC 2018 contest on GYM. The contest was originally held in Syria, Lattakia for Tishreen University.

Problem Setters and Testers

I hope you will enjoy solving the problems we prepared. Please give your feedback on the problem set in the comments below, after the contest. The contest difficulty should be similar to a Div2 Codeforces round, However I would recommend participating as a team because it is a standard ACM-ICPC contest.

Contest Details:

Time: 19th May 2018 (12:00 hrs) (GMT+3). You can check your local time here.

Contest Length: 5 hours.

Number of Problems: 12 problems.

Good Luck! Hope to see you participating!!

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

»
6 лет назад, # |
  Проголосовать: нравится +33 Проголосовать: не нравится

It is bad that it is right before codejam round 2 (17:00 MSK)

I guess I am gonna try those problems tomorrow.

»
6 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

How to solve E and H?

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

What does Ballon Color mean in the statements?

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

    Since it is a standard ACM-ICPC contest, problem statements contained ballon colors. In this GYM contest they don't mean anything, but we published problem statementa the same as they were in the original contest.

»
6 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

very nice problems! I'm glad to win contest and beat road to grandmaster team :)

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

    Glad you enjoyed them. The remaining 2 problems are a good practice to solve ;)

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

      yes, I will try to solve remaining problems tomorrow. they are interesting problem too!

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

Thank you! I want to ask you if my proof is true or not ! Problem I. Odd and Even Queries if number is odd then odd * odd never give me the even number and odd * odd =odd, if number is even then even * odd will give me the even number and even*even=even, assume that we have the array of 1 2 3 4 5 6 7 8 9 10, the odd array is index for numbers 1 3 5 7 9 and the even array is index for numbers 2 4 6 8 10 if x =1 and the l=1 and r=5 then we have 1 3 5 , to calculate the multiplication for them as 1*3 and 1*5 3*5 1 3 5 so the answer is 6%(1e9+7) we can calculate them as the number of odd numbers from l to r as ((the number of odd number*(the number of odd number+1))/2 but for the even number we have to add to the answer the number of even numbers * the number of odd numbers from l to r Am I wrong ? sorry for my bad English!

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

    The problem asks for sub-sequences not only pairs (Try solving it for subsequences before checking the spoiler).

    Спойлер
    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +8 Проголосовать: не нравится

      Thank you joud. Thank you for your help. I didn't know Spoiler,but you explained it to me .thank you !

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    Never mind this comment.

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

      can you give me an example to avoid this mistake in the future ? I calculated a lot of numbers but never gives me an even number .

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

tutorial ??

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

    Bump! When will the tutorial be published?

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

      how you solved H;

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

        I am pretty bad at explaining things, but nevertheless I will give it a try.

        Root the tree at A for ease. Observe that if we choose any vertex from subtree of B as D, and any vertex from subtree of A(but not subtree of B including B) as C, the path between A -> C and B -> D will never intersect.

        Now, you can even select any vertex which is parent of B(but not A) as D. In this case, the vertex that are candidates of C are all the vertices in subtree of A — vertices in subtree of chosen vertex D.

        This can be calculated by running a DFS with root as A and storing subtree size. Here's my code for reference. I hope its readable.

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

        Also, can you please share your approach for E?

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

How to solve problem J please is it Mo's +trie?

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

Where could find the tutorial?