| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3447 |
| 6 | Um_nik | 3387 |
| 7 | heuristica | 3322 |
| 8 | turmax | 3317 |
| 9 | tourist | 3307 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 156 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 141 |
| 5 | Errichto | 139 |
| 6 | adamant | 137 |
| 7 | AmShZ | 135 |
| 8 | BledDest | 132 |
| 9 | maroonrk | 131 |
| 10 | qwexd | 129 |
|
+2
Here is a clean brute force implementation for C Spoiler Approach: If two consecutive wizards see equal numbers: they have to be wearing their cloaks in opposite ways, otherwise they are wearing cloaks in same direction. So keep a vector which stores which direction a wizard is wearing cloak in [0 = left, 1 = right] Make a lambda which will populate it starting with 0 or 1 Make another lambda which will check if the current arrangement is valid or not. For that count number of right cloaked wizard, and left cloaked wizard for each Check my code |
|
0
I am thinking a similar approach — but how to formalize space here? Initially lets say I have logn range, second time I might have logn * logn ranges... and (logn)^i ranges at ith position? Should it not explode? |
|
0
You traverse the array, from 2 to n. The first index where gcd(a[i], a[i+1)<gcd(a[i], a[i-1]), you can either remove i-1, i, or i+1. You do all of it, and check if any of them gives you a favourable outcome. |
|
0
I did worse :( |
|
-7
Failed in this contest desperately (-1000 aura) It was unrated for me (+100 aura) Still what did I do :( |
|
0
Start from reverse. Start from one element that is going to be remaining at last, after removing every other. Then keep multiplying second last, third last… while taking modulo. And then print array of answers in reverse |
| Name |
|---|


