Daniar's blog

By Daniar, history, 6 years ago, In English

Hello CodeForces :D

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

Problem Setters && Testers :

Daniar Jarrous Daniar , Maala Mhrez XR_Maala , Joud Zouzou RedNextCentury , Fudail Hasan fudail225

Hussain Karra Fallah Pepe.Chess , Farouk Hjabo fresher96 , Anas Kastatntin kastarino , Hussain Hussain sqr_hussain

Zain Alabedeen Ali Zain , Hasan Jaddouh kingofnumbers , Marsil Zakkour Marcil , Noman Jessri Noman.jessri and Mohammad Asaad .

Contest Details:

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

  • Contest Length : 5 hours.

  • Number of Problems: 12 problems.

The contest difficulty should be similar to a Div2 Codeforces round.

I recommend participating as a team because it is a standard ACM-ICPC contest.

Hope you like the problems. Any feedback after the contest is appreciated!

Good luck and have fun !!

UPD : here is the Editorial

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

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

have fun :D

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

number of problemseters equals number of problems, it is (1 * 1);

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

how to solve K?

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it
    1. find a cycle with simple dfs. Since there are n edges, there exists exactly 1 cycle.
    2. For query u,v, find closest vertices in the cycle for each u,v.(say p,q respectively)
    3. If p and q are distinct, answer is dist(p,u)+dist(q,v)+(min_dist(p,q) in the cycle)
    4. If p and q are same, calculate distance with lca. I missed this part and took much time :(
    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How can we find the closest vertices to each u,v for each query? Should a simple djikstra be efficient enough?

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

        First, find every vertice in the cycle(in 1). Then start bfs from each vertice in the cycle.

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

      That was the official solution but there is an easy one mentioned in the editorial , you can take a look at it now.

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

      Could you please share your code?

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

How to solve C? I am checking if A[i] == B[n-i-1] && A[n-i-1] == B[i], then steps are odd, else if A[i] == B[i] && A[n-i-1] == B[n-i-1] then steps are even. Incrementing steps accordingly. This does not seem to work. Thanks

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

Auto comment: topic has been updated by Daniar (previous revision, new revision, compare).

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

Can I view the test data? I wish to see why my B is incorrect :(

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

    Sorry, tests are hidden but it's just random edges mostly

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

It was not interesting to solve any of the problems. I mean in official contest I would try to solve but here I have no intentions of upsolving any of the remaining problems. I hope damascus cpc will be more interesting in the future.

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

    Maybe because you only solved the easy ones? :P

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

      Dude, G and I are idealess. thank you for your efforts preparing and all. but it is just not interesting. I think a negative opinion should be accepted.

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

        Ofcourse it is accepted, but your first comment didn't contain any helpful feedback on what needs to be improved. Anyways I'm sorry you didn't like the problems.

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

    Thank you for your opinion and we respect it, but I don't really agree with you.

    This problemset is prepared for a local university competition (most of the contestants are beginners i.e. green or even grey on codeforces ) and it's difficulty is similar to a Div-2 contest.

    If you managed to solve most of the problems easily without thinking a lot or making any effort that's because you are a Div-1 ranked contestant with a very well knowledge of the basics, but that doesn't make the problems "idealess" .

    I think problems D , E and H are interesting and very good for a 3 stars rated gym contest but you probably didn't read or give enough time to think about them.

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

I have a hack data for problem G input: 1 2 5 100 10 20 output: 1 somebody's code output 2 but Accepted here is a wrong code: https://codeforces.net/gym/101808/submission/58792147

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

    Another data also can hack some Accepted codes input: 1 2 5 100 20 20 output: 1

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

I tried cloning this contest to a mashup today, and in the mashup, all submissions to problem F get "Judgment failed" even though it works perfectly in the original gym contest. Maybe it's worth looking into, MikeMirzayanov?