| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | jiangly | 3670 |
| 3 | Kevin114514 | 3657 |
| 4 | maroonrk | 3355 |
| 5 | Um_nik | 3353 |
| 6 | squareOf105 | 3346 |
| 7 | tourist | 3343 |
| 8 | strapple | 3324 |
| 9 | heuristica | 3322 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | AmShZ | 143 |
| 5 | Um_nik | 141 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | BledDest | 133 |
| 8 | maroonrk | 133 |
| 10 | qwexd | 130 |
|
-45
I did, just didn't submit |
|
-77
Easiest D ever seen |
|
0
What could be the difficulty ratings for all the problems ? |
|
0
Who is StackExchange ? |
|
+2
One other way to do E is my considering 9 based numbers instead of 10 based(decimal) numbers. Convert k to a 9 based number and change all 4's to 5, 5's to 6, 6's to 7, 7's to 8 and 8's to 9 |
|
0
Don't tell me you submitted the wrong solution 4 times just to comment this |
|
0
yep, you got it |
|
0
Did you actually get it? My solution was too complex |
|
0
(Everything is 1-indexed) Case 1: k is 0 fill whole array with -1. Case 2: k is of the form (n*(n+1))/2. Let x = (n*(n+1))/2. Fill the first n elements of the required array with 1 and the remaining ones with (-1000) Case 3: k is not of the form (n*(n+1))/2. Find highest index i such that (i*(i+1))/2<k. Let count=k-(i*(i+1))/2. Fill first count elements of the array with 30 and remaining elements upto i with 1. Fill ith index with -31 and rest of the array with -1000 |
|
0
C is a constructive algo based problem. There are usually multiple ways to solve these kind of problems |
|
0
Yep I got it, but thanks anyways |
|
+1
For G2 and G1, after sorting the array I knew that that one of the conditions was that every element should be at max the sum of all the elements that occured before it. Little did I know that it was the only condition required. Could someone explain me why we can always make every number from [1 — sum of all elements occured] from the given elements ? |
|
0
It will take some time for your rating to update |
|
0
Can you explain why ? |
|
0
Because for each iteration of the 'forloop', if you notice carefully the 'while loop' is running at most once. So at the end it is a O(n) solution |
| Name |
|---|


