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

Автор Casual_W, 8 месяцев назад, По-английски

Problem A1 : Pentagon Orchard(Easy version)
Author : Casual_W

Hint1
Hint 2
Hint 3
Solution
Code

Problem A2 : Pentagon Orchard(Hard version)
Author : Casual_W

Hint 1
Hint 2
Hint 3
Solution
Code

Problem B : Helicopter Rescue
Author : Godbot

Hint 1
Hint 2
Hint 3
Solution
Code

Problem C : Bitwise Transitions
Author : Godbot

Hint 1
Hint 2
Hint 3
Solution
Code

Problem D : Score Normalization
Author : Godbot

Hint 1
Hint 2
Hint 3
Solution

Problem E : Equal Floors
Author : Its_Tarun

Hint 1
Hint 2
Hint 3
Solution
Code

Problem F : The Broken Staircase
Author : Casual_W

Hint 1
Hint 2
Hint 3
Solution
Code

Problem G : Bilewater
Author : JAS1123

Hint 1
Hint 2
Solution
Code
  • Проголосовать: нравится
  • +19
  • Проголосовать: не нравится

»
8 месяцев назад, скрыть # |
 
Проголосовать: нравится -7 Проголосовать: не нравится

I was right.. It's euler's func in A2...., every tree lies in some dir from the center. If there is already a tree closer to the center in the same dir, then the new tree be hidden. Two trees lie in the same dir when their ratios are the same, which means their gcd > 1.... (Common factor) dir that appears for the first time.... coprime nums. Euler’s function exactly did same thing: how many nums are coprime with a given num So when I think that visbl trees = coprime dirs, it became clear that Euler’s function should be used here. BTW Very Good Contest...

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

For G the testcase

2

1 100

1 100000

This 1000 times would lead to TLE and is a valid testcase