| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3611 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 163 |
| 2 | adamant | 149 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 143 |
| 5 | errorgorn | 141 |
| 6 | cry | 138 |
| 7 | Proof_by_QED | 135 |
| 7 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 10 | soullless | 132 |
|
0
Thanks for the reply! Actually I misunderstood that 'Output' was an answer and 'Answer' was my output ;) |
|
0
Could anyone please explain why this code prints wrong output compared to my local execution environment? (Problem D) http://mirror.codeforces.com/contest/1469/submission/102626247 |
|
0
And I spent almost 2 hours to solve E. |
|
+3
I don't think |
|
0
Seems like cout is not flushed so not inputs are provided. |
|
0
What a bitwise math. Thanks! |
|
0
So how can I find a1 anyway? |
|
+22
I got 4 WA on A and almost kill myself when got AC |
|
0
Pretty nervous having sense of getting WA on systest D. :o |
|
0
You can sweep the entire column. |
|
-12
I smell math for this round either |
|
+4
My pleasure. Actually I thought just like you at first :) |
|
+1
by statement of problem C, ... is the answer given by the jury's solution. and the jury's solution is printing more than 6 decimal points. |
|
0
No it actually has difference 1.3333337 — 1.333334 = 0.0000003(3e-7) which is smaller than 1e-6 |
|
+9
I think printing %.6f would be fine and can not be hacked. |
|
+5
So you mean the ancilla bit has information about the result which is result = (result + initial value). And we can get the answer by using that 'information' ? |
|
+8
Round was ended earlier than Russia vs Spain. What a surprise. |
|
0
Oh I see.. So the type of oracle should be determined by kind of "behavior of the function". Thanks! |
|
0
A quantum bit will be set to |0 > if measured value is 0 otherwise |1 > after measuring so yes, it will break the superposition. |
|
+3
Is XOR used only for satisfying inversability? If so, Can XOR(CNOT gate) be replaced by any another two-bit unitary operation? |
|
0
Thanks. I suddenly wonder how multi-bit logic gates actually work on a real quantum computer atomically :| Amazing! |
|
0
Nickolas, One question please. Are the inputs of Problem G any random state of qubits? Like, x[k] = α|0 > + β|1 > with any proper α and β? |
|
0
Thanks. Actually I saw Deutsch-Jozsa algorithm before(Yet not fully understood). But how this can be applied to Problem G? |
|
+3
Is there any materials for quantum oracle? I'm stuck in G :'( |
|
+8
Excited to code Q#. Are the problems typical problem-solving style or some kind of different one? Like, using unitary matrix or something.- |
|
+6
Then there's no systest so there's maybe also no such 'during' system testing ? ;) |
|
0
DP round :o |
|
0
As long as you use correct algorithm, (like tarjan's SCC or something) I think it would be fine.
You can just count number of SCC vertices which has 0 indegree, but when counting, exclude a SCC vertex which contains the capital vertex. |
|
+20
Solving all problems in 25 minutes (me) VS Scoring 1 point in 90 minutes (South Korea) I'm seriously wondering which one is harder. |
|
0
ummm :| I think you should read this |
|
+2
Since h is strictly increasing, it is optimal to distribute as much as favorite cards to each peraon. eg. Let 3 people likes |
|
+9
|
|
0
3 1 1 2 3 Your answer = 2 (1 -> 2, 1 -> 3) Correct answer = 1 (1 -> 2) |
|
0
Consider any single number of card. Now the problem is 'For given N cards and M people, each person can have at most k cards. What is the maximum score?' |
|
+3
My idea : First, run dfs on capital vertex. While running dfs, make every path as bi-directional. Now build Strongly Connected Commponents. Count number of vertices which has 0 indegree expect the one containing capital vertex. |
|
0
let each entry represent the probability (ex : 1 → 2 is the probability of going from 1 to 2) Then, A2 =
(this one is bit hard to recognize, by the way.) By generalization,
where ... can be any sequence of n - 1 vertices The answer is MAXline(sum - of - the - (row, column)[Mline * Am - 1]) where Mline is initial state of for each line and (row=index of vertices belongs to initial line), (column=vertex index of destination) (i'm sorry this must be hard to understand, but this is my best explanation) (and with some optimizations originally written in editorial) You can google 'markov chain' for much more elegant explains. |
|
0
Think x axis as position and y axis as time. then, For moon, x = yw For cloud with speed s, x = sy + xo and x = sy + xo + l where s is 1 or -1 |
|
0
Problem E turns out to be an exact Markov chain problem xD |
|
0
LOL. Which one you think is harder? |
|
+15
Super fast editorial ! |
|
0
By reading examples on B. so I can say actually that is based on intuition instead of reading the constraints on B very carefully. (without considering whether constraint is really wrong like commented below) |
|
0
LOL. So D was literally the 'upgraded version' of the older one. |
|
0
Because you don't know what sequence is after N. |
|
0
Whhhhat? So constraint was just like http://mirror.codeforces.com/contest/956/problem/D, which was the original one I thought and I was still not able to manage it ;'( |
|
0
I've written down several equations about Problem D, but thrown it away eventually. And I realized that wind speed is always positive after the contest. :P |
|
0
|
|
0
Solved it using Li-Chao tree. Learned a new thing. thanks! |
|
+2
Your lambda code still does not satisfy the rule. This is the right one. without the equal sign. |
|
0
http://mirror.codeforces.com/blog/entry/59770?#comment-434966 For your case, |
|
+5
Let A = C + 2a, B = C + 2b, A ≥ B. According to the problem, A - B = 2a - 2b = 2x should hold. Divide each side by 2b. The equation would be 2a - b - 1 = 2x - b. 1) If x - b = 0, then 2a - b - 1 = 1 -> 2a - b = 2 -> a - b = 1 -> a = b + 1 2) If x - b ≠ 0, contradiction since left side is odd and right side is even. So there are at most 3 which is C, C + 2a, C + 2a + 1 IMHO, this kind of problem is little challenging for div3 but worthy at the same time. |
|
+1
C++ sort requires strict weak ordering. for more, https://stackoverflow.com/questions/32263560/errorinvalid-comparator-when-sorting-using-custom-comparison-function |
|
+6
How to solve E? |
|
0
since [205-208] is mapped to 205. if [205-212] is mapped to 205, it is illegal to condition since there are 8 values between 205 and 212 (205,206,207,208,209,210,211,212) |
|
0
Ok. I'm back with my laptop. Because 0 2 0 254 254 is lexicographically greater than 0 1 1 255 254. |
|
0
|
|
0
First, sort array in non-decreasing order. We must have a barrel which contains a1 stave. So each maximal total sum of volumes of barrel cannot be larger than a1 + l let C = (number of stave which has length ≤ a1 + l) - N. If C < 0, then answer is 0. Otherwise, While picking staves, if C > 0, pick the smallest stave you have, and decrease C by 1. else, pick the largest stave you have. |
|
0
How to solve F with LCP? |
|
0
Does sqrt work in O(1)? |
|
+29
The worst excuse ever. |
|
0
Oh, wow. That's a very impressive approach! Thinking final sequence as symmetry first, and removing redundant tail part. I really learned many things from your code. XD |
|
0
Yeah, I also have to admit that I didn't read the statement carefully. What I'm sad is that I asked for it so late. If there were more time, I could solve it. ( since I got AC just before ;) ) |
|
0
Run two binary searches. one for 1,....,K and another one for K + 1, .... LARGEST_VALUE, ... K + 1 |
|
+8
Yes. Now you panicked just like me. |
|
+5
Read accidentally, got spoiled. :o |
|
+21
Problem D. — I thought h1 was a typo in |
|
+1
I think this would be helpful to explain it more. :)
|
|
0
Although unordered_map has constant time complexity, that |
|
On
FalseMirror →
Codeforces Round #483 [Thanks, Botan Investments and Victor Shaburov!] Editoral, 8 years ago
0
Div1C. Any relation with editorial and solution code? The definition of 'state' is different at least i think. The solution code is just representing the state in base of 10. |
|
0
The time limitation on Div2C is too tight.... just reassigning gcd value made it passed.. -_- |
|
0
NVM. my approach was wrong. it was a simple pyramid-dp problem like answered below. |
|
0
Using 2d segment-tree would be enough, I think. |
|
+8
Look at the title of that problem. There's a huge hint. |
|
0
I realized that the TITLE of the Problem Div2D,Div1B was such a huge hint, but it was too late. no time to debug. |
|
0
I asked about it and the answer was no. |
|
0
upvoters : did contest with good score downvoters : the others fight of the most subjective voters |
|
0
Although I did the contest badly, overall problems are good. But it's also true there's some mistakes on statements :'( |
|
0
single line of mis-coding leads me to WA on C and I couldn't never fix it until the end of the contest. |
|
+16
My head just blow up. what a stupid. |
|
0
Problem D. Why O(NMlog10^5) gets TLE where N = number of query1 and M = number of query2 ? |
|
+8
This round is for 1600 below |
|
0
[33,34,35,36,37,38,39] , [236,237,238,239,240,241,242] Other numbers are 'don't care'. Ans: 33 236 236 |
|
0
You can pick contiguous range, [a1, a2, ...an] where an - a1 ≤ K, ai ≤ 255, as many as you want. Each element must belong to exactly 1 group(range). Now you are given a sequence. For each element, find a group it belongs. replace the original element with the first element of that group. After replacing all elements, the result sequence should be the lexicographically smallest among all possible results. |
|
+3
Notice that 119 turns into 114 which means range [114, 119] is mapped to 114. so 121 cannot be mapped to such value lower than 119 since K = 7 |
|
+1
No your factorization code looks fine. The problem is, your code still has NlogN complexity. operator [] of |
|
+4
Because nesting set operations in N2 code means the total complexity becomes N2log(n) which is nearly 3×10^9. (Normally we suppose 10^9 iterations take 1 second) While you can map each elements into another array access time of which is O(1). To do that, prepare map < int, int > and int[5000]mapped. Now in input phase, you can map each elements into single index of mapped. eg) 28 -> 7. Find if 7 exists in a map. If not, map[7] = nextidx + + . now mapped[i] = map[7]. |
|
0
Thanks for the awesome problems! I wish there was a explanation for a example though. :) |
|
+9
Problem B Based on intuition : easy Based on Proof : hard |
|
+1
That'_s not true. unordered_map is getting slower when many hash collision happens. Otherwise, unordered_map is much faster than normal map. |
|
+3
You ignored MAP[A[i]] that was originally stored. test : 9 10 11 12 8 9 10 11 10 11 ans = 4 yours = 3 |
|
0
unordered_map is based on Hash table. Normally a search operation of hash table works in amortized(1) but worst is O(N) (caused by hash-collision). std::map, on the other hand, is based on red-black tree, which has O(logN) complexity in search operation on average. Your solution was hacked by anti-hash test. |
|
0
You have to search such value which is sum of arrows until all warriors dead. When all warriors are dead, reset the value to 0 and repeat the previous step. Your approach is not considering about remaining helath of warrior (which is warrior[index]) in C2. Ex) warriors : 3 2 arrows : 2 2 After first arrow is shoot, first warrior still has 1 hp. Your code might be ignoring it. |
|
0
Choosing maximum difference regardless of sum of other values is not optimal |
|
0
LOL |
|
-11
Parallel rounds, yeah! Hope translation of this round would be better. |
|
0
According to the code(http://mirror.codeforces.com/contest/965/submission/37617599), It just merge two sets by joining smaller one to larger one. |
|
0
I don't think that works. 36 2 9 3 when d = 1 or 2 : impossible when d = 3 : possible distributions = 6,7,8 , formula gives 6. best is 7. |
|
0
For E, I had right idea but failed in implementing minimizing depth. |
|
0
Might be a timezone is wrong when creating a link. That should be Moscow time which is https://www.timeanddate.com/worldclock/fixedtime.html?msg=Codeforces+Round+%23476+%28Div.+2%29+%5BThanks%2C+Telegram%21%5D&iso=20180425T2035&p1=166&ah=2 |
|
0
Can't understand the problem.. Descriptions are so suck. |
|
0
What a simple idea it was. Deleting a vertex will separate trees, that thought confused me. thanks. |
| Name |
|---|


