Please subscribe to the official Codeforces channel in Telegram via the link ×

shef_2318's blog

By shef_2318, history, 8 years ago, In English

Hello CodeForces Community,

I would like to co-ordially invite you all to take part in the CodeChef February Cook-Off, contest. The problems were set by me and tested by kostya_by (Kanstantsin Sokal). I hope you will enjoy solving them. You may find the rest of the details about the contest below.

Time: 21st February 2016 (2130 hrs) to 22nd February 2016 (0000 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.


Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

  • Problem Setter & Russian Translator: shef_2318 (Pavel Sheftelevich)
  • Editorialist: ma5termind (Sunny Aggarwal)
  • Problem Tester: kostya_by (Kanstantsin Sokal)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Contest Admin: PraveenDhinwa (Praveen Dhinwa)
  • Vietnamese Translator: VNOI Team
  • Language Verifier: rarora7777 (Rahul Arora)


  • Top 10 performers in Global and Indian category will win a cool CodeChef T-shirt. (For those who have not yet got their previous winning, please send an email to [email protected])

Good Luck! Hope to see you participating!!


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

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

Can anyone see the problem statements?

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

old codechef is back !!

8 years ago, # |
Rev. 2   Vote: I like it +18 Vote: I do not like it

My solution of Puppy and Triangles: triangulate the quadrilateral (try both diagonals); check if the resulting triangles, given as multisets of sidelength^2, are equal to the two given triangles (in either order). In order to avoid triangulating by an outer diagonal in a non-convex polygon, check also if the area of the given triangles is equal to the area of the quadrilateral.

It seems quite simple, with no special cases. Can you prove it wrong? UPD: I can see where it fails from the editorial.

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

    I think there is another case when quadrilateral is not convex and you can extend one side of it until crossing another. It's also will be a partition into triangles. UPD. Editorial.