| # | 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 | 134 |
| 9 | maroonrk | 133 |
| 10 | qwexd | 130 |
|
0
This wasn't a part of the problem, but I was wondering what is the maximum number of rectangles that can be formed for problem D? My approach Without loss of generality, assume $$$R$$$ is the biggest number, $$$G$$$ is the second biggest number and $$$B$$$ is the smallest number. $$$ans$$$ is the required number. Please correct me if I am wrong. |
|
0
Can someone explain why this solution fails? Instead of finding the length of the side directly, I found it using an indirect approach. Submission I found the length of the longest diagonal and then using Pythagorean theorem the side of the square can be found. I think there were some precision issues with square root calculation. How to go around this? Edit: Got the problem. The |
|
+3
Is there a name for the technique used in E? Or where can I read more on it (formal proofs, etc.)? |
|
0
$$$b$$$ cannot be anything. $$$a_i \lt = b_i$$$ for all $$$i$$$ has to still hold for the inclusion-exclusion calculation to hold. P.S. Thanks for the link. |
|
0
How would you solve $$$(a, D)$$$? This is precisely where I was stuck. |
|
0
A quick Google search found the definitions of these terms but only in the context of the ambiguities that arise out of using them :) |
|
+6
Well, when they say sorted in some order, the ordering is often clear. For example, if they say sorted in alphabetical, lexicographic, ascending or descending, it is known what they mean or even then in some cases, they explicitly define the ordering. |
|
+1
What is the meaning of |
|
+1
Yes, I figured it out. I was comparing the numbers stored in the arrays incorrectly. This is not the correct way to check if num1 > num2. Thanks! |
|
0
Could anyone here help me figure out what's wrong with my solution for Div 2 (C)? I have tried to follow the editorial here. |
|
+2
Yes, that makes sense if the tester is expecting an $$$O(1)$$$ or $$$O(log n)$$$ solution. But I suppose for $$$O(n)$$$ and $$$O(n log n)$$$ solutions, it hardly makes a difference. |
|
+1
Are you saying that having several separate test cases is worse than having the same test cases compiled into a single query-based test case? I'm assuming that the former works by generating a single output file from the code and running it several times. The latter would work by running the same output file only once in this case. But even then I don't see how there would be a significant benefit from doing this. |
|
+1
Is there some added advantage on asking query-based test cases? Do they do it so they can test on more cases this way? |
|
0
It's always taken care of on its own. For ex., when you're doing |
|
+1
It's very similar. You just have to be careful about the weights in the 10's expansion that you assign to the longer number. For this, my approach was to maintain a frequency array having Now, for each number in your input array, traverse its 10's expansion. If you're at the For ex., My submission: http://codeforces.me/contest/1195/submission/57237562 |
|
+7
Observe that for each digit of each number, you can predict what position it would occupy in the functional output. For ex., if the numbers are To complete the example above, you'd have My submission: http://codeforces.me/contest/1195/submission/57225770 |
|
0
With reference to the editorial for problem B:
Can this fact be elaborated on? I tried a few cases but I'm unable to build an intuition for this. For ex., consider the string |
| Name |
|---|


