SAeed's blog

By SAeed, 6 years ago, In English

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!!

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

| Write comment?
»
6 years ago, # |
  Vote: I like it +33 Vote: I do not like it

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

I guess I am gonna try those problems tomorrow.

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    Sorry, didn't realize that. Anyways good luck tomorrow ;)

»
6 years ago, # |
  Vote: I like it +8 Vote: I do not like it

How to solve E and H?

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    We will publish a tutorial soon.

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it +4 Vote: I do not like it

      The problems were very good. Thanks for a great contest ^_^

      • »
        »
        »
        »
        6 years ago, # ^ |
          Vote: I like it +2 Vote: I do not like it

        Glad you enjoyed them. Try the ones you didn't solve. We will try to publish a tutorial soon.

»
6 years ago, # |
  Vote: I like it +3 Vote: I do not like it

What does Ballon Color mean in the statements?

  • »
    »
    6 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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 years ago, # |
  Vote: I like it +17 Vote: I do not like it

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

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +22 Vote: I do not like it

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

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it +19 Vote: I do not like it

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

»
6 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

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

    Spoiler
    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

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

  • »
    »
    6 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Never mind this comment.

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      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 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Ah sorry I thought you meant something else. Never mind

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

tutorial ??

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Bump! When will the tutorial be published?

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      how you solved H;

      • »
        »
        »
        »
        6 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        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 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Also, can you please share your approach for E?

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Where could find the tutorial?