Recent actions
On lewinWunder Fund Round 2016, 15 months ago
+5

MikeMirzayanov Any updates on T-shirts ? I am from India.

On lewinWunder Fund Round 2016, 18 months ago
+3

It would be nice if you provide us tracking numbers. Each time I winn a T-shirt I have to call FedEx to confirm the shipment (I don't know why they can't call me :( )

On lewinWunder Fund Round 2016, 18 months ago
0

I guess it's the idea of the organizers.

On lewinWunder Fund Round 2016, 18 months ago
+8

Why different people get T-shirts in different colors?

On lewinWunder Fund Round 2016, 18 months ago
+15

Not yet received.

On lewinWunder Fund Round 2016, 18 months ago
+43

On lewinWunder Fund Round 2016, 18 months ago
+41

finally

On lewinWunder Fund Round 2016, 18 months ago
0

Not yet.

On lewinWunder Fund Round 2016, 20 months ago
0

Not yet for me.

On lewinWunder Fund Round 2016, 20 months ago
0

On lewinWunder Fund Round 2016, 20 months ago
0

Do you mean MemSQL 2014 T-shirt? I received this 9 months after the contest :)

On lewinWunder Fund Round 2016, 20 months ago
0

MikeMirzayanov has not sent me the package's track info. So maybe the T-shirt has not been sent yet.

On lewinWunder Fund Round 2016, 20 months ago
0

No for here.

Off-topic: besides Mike pmed me in-site that the Memsql 2.0 Tshirt (which happened 2 years before) is going to be sent, did anyone receive that either?

On lewinWunder Fund Round 2016, 20 months ago
+3

Has anyone received a T-Shirt yet? :)

On lewinWunder Fund Round 2016, 21 month(s) ago
0

oh~ so sad...

On lewinWunder Fund Round 2016, 22 months ago
0

wheeeee

On lewinWunder Fund Round 2016, 22 months ago
+12

For the first time ever, I have won a T-shirt from a CodeForces contest! Feels great, I hope there will be many more to come. :)

On lewinWunder Fund Round 2016, 22 months ago
+33

Finally I'm lucky enough to be randomly selected to win a t-shirt. Thanks! :)

On lewinWunder Fund Round 2016, 22 months ago
+80
On lewinWunder Fund Round 2016, 22 months ago
+8

On lewinWunder Fund Round 2016, 22 months ago
+14

When will be T-shirts sent?

On lewinWunder Fund Round 2016, 22 months ago
+5

well next time don't add unneeded ifs:)
I bet both solution for y > x and y < x would give right answer for x = y automatically

On lewinWunder Fund Round 2016, 22 months ago
+8

CanJustGetSomeACWhyAmINotTourist

On lewinWunder Fund Round 2016, 22 months ago
0

I am placed 492th too.

On lewinWunder Fund Round 2016, 22 months ago
+10

CanJustGetSomeACWhyAmISuperWeak

On lewinWunder Fund Round 2016, 22 months ago
0

C preprocessor operates with text, nothing more complicated. It doesn't know what the double is so you can replace that way anything you want.

On lewinWunder Fund Round 2016, 22 months ago
-24

hi~ Sorry About that. Truth to tell, connor is my small id (alternate id)

After ACM-ICPC World Final 2015, I stop using kybconnor in TC & CF. I also stop training after that. but I still enjoy participating algorithm contest. So I bring back connor and ronnoc.

QwQ

On lewinWunder Fund Round 2016, 22 months ago
0

Thank You !

On lewinWunder Fund Round 2016, 22 months ago
+5

I'm placed 393 too.

On lewinWunder Fund Round 2016, 22 months ago
+3

A lot of assumptions for an unrated user!

On lewinWunder Fund Round 2016, 22 months ago
-15

Take it easy! Just think like, he is better than you. maybe he doesn't always take the contests seriously like you?

On lewinWunder Fund Round 2016, 22 months ago
+5

Is that why tourist didn't participate?

On lewinWunder Fund Round 2016, 22 months ago
0

Thank you, I will be more careful with precision and bounds. By the way, #define double long double ???????? I didn't know that it's possible to do that.

On lewinWunder Fund Round 2016, 22 months ago
+11

This is a wrong way of comparing longs. Contract for comparison methods in Java is that they return either zero, or something positive, or either negative (depending on relation). a - b is not ok even for general integers, and here you subtract two longs, get some big result (which may not fit into int) and then truncate it with explicit typecast with data loss. Simply, overflow. You do not have control over sign. Correct way is to use Integer.compare(a, b) or Long.compare(a, b).

On lewinWunder Fund Round 2016, 22 months ago
+18

When this happened previously, they gave tshirts to all of them. Link

On lewinWunder Fund Round 2016, 22 months ago
+2

Congratulations to winners I'm so happy to them

On lewinWunder Fund Round 2016, 22 months ago
+36

I'm placed 425th too (and so are yukihana0416 + gsa93). Will all 4 of us get a T-Shirt?

On lewinWunder Fund Round 2016, 22 months ago
0

For problem C , I am sorting all the points by the distance from origin and then choosing 3 points closest to origin but it seems to be giving WA 4.This idea will fail if three points are colinear but the reason for WA — 4 mentioned by CF judge is triangle is not empty.I am unable to figure out how this idea fails in situation where 3 points found are not colinear. Here is the wrong code http://codeforces.com/contest/618/submission/15677172 .Thanx in advance.

On lewinWunder Fund Round 2016, 22 months ago
+23

This line is incorrect: height[v] = 1 + dfs(node[v][1].first);

Arrays and vectors in C/C++ are zero-based, so if node[v] has size of one, there is a single element here of index zero, not one. That's undefined behavior and you was lucky enough to get a crash instead of spurious wrong answer. I would recommend you to adapt zero-starting arrays instead of trying to enumerate everything starting with ones.

On lewinWunder Fund Round 2016, 22 months ago
0

I was trying to solve question D. On codeforces it shows runtime error on test case 1 while same code gives correct output in ideone. Here is my ideone solution link. IDEONE

Here is codeforces solution link Codeforces

PLease help.

On lewinWunder Fund Round 2016, 22 months ago
+3
  1. Precision
  2. Wrong dmax

15672460

On lewinWunder Fund Round 2016, 22 months ago
+9

Short answer: precision. Your solution with long double passed 15672148.

Long answer: try to avoid floats as much as possible. For example in my solution 15657222 I use fact that you can compare the squares of the distances to determine which is shorter so there is no need to take root. Also I search third point by comparing areas of triangles and they are always N/2, where N is some non-negative integer, so I simply doubled them. Owing to those facts I have only integer operations, no EPS, no precision problems, also faster solution.

On lewinWunder Fund Round 2016, 22 months ago
+3

Whenever there are large value such as 10 ^ 9 you should use double constant instead of default float constant. Change 1.0 to 1.0L to get accepted.

On lewinWunder Fund Round 2016, 22 months ago
0

In problem C, my submission gives output 1 1 2 in CF . But, in my pc it gives 1 2 3 . Why is this happening ?

http://codeforces.com/contest/618/submission/15671958

On lewinWunder Fund Round 2016, 22 months ago
0

Thanks a lot for debugging! :)

I guess the condition r1 ^ 2 + r2 ^ 2 should be minimum was wrong ( I don't know why ). I just changed it to finding third point with minimum value of x and minimum value of y and it got accepted.

On lewinWunder Fund Round 2016, 22 months ago
+34
On lewinWunder Fund Round 2016, 22 months ago
0

me 2, i've lost 5 minutes to connect to CF.

On lewinWunder Fund Round 2016, 22 months ago
+15

I think you need to have the array holding the handles of users instead of the ranks because many ranks do not exist and many participants share the same rank.

On lewinWunder Fund Round 2016, 22 months ago
+26

But some places are not exist. For example 452(or 500). It's good?

On lewinWunder Fund Round 2016, 22 months ago
+5

First idea was diameter, was about to code it, but then looked at the case with 2 large chains and realized that it's something else.

On lewinWunder Fund Round 2016, 22 months ago
0

I got Wrong Answer on test 15 in problem C, but when I run it with the same code in my computer, I get a different output. How is it possible?? this is my submission http://codeforces.com/contest/618/submission/15662738

On lewinWunder Fund Round 2016, 22 months ago
0

MikeMirzayanov, is the above list the final list of winning ranks?

On lewinWunder Fund Round 2016, 22 months ago
+2

Finally returned my yellow, thanks for the round! And like it if your first submission for problem D was a diameter too!

On lewinWunder Fund Round 2016, 22 months ago
0

Your code using scanf take only 93 ms.

On lewinWunder Fund Round 2016, 22 months ago
0

Difference isn't big but you must write ios_base::sync_with_stdio(0) when using iostream (cin, cout).

On lewinWunder Fund Round 2016, 22 months ago
0

you are right! In efficiency,is there a lot of difference between cin and scan? how many milisec?

On lewinWunder Fund Round 2016, 22 months ago
0

Just use scanf instead of cin ,your code is fine .

On lewinWunder Fund Round 2016, 22 months ago
+10

Exactly! Thanks.

On lewinWunder Fund Round 2016, 22 months ago
0

Hello, what can i do to make my code more efficient? thanks. http://codeforces.com/contest/618/submission/15668412 it's O(nlog) 0.5 seg on test 4

On lewinWunder Fund Round 2016, 22 months ago
0

The Rating increases does not depend fully on how much problems you have solved in the round. It depends also on the time you have spend solving the problems. Try to solve problems fast.

On lewinWunder Fund Round 2016, 22 months ago
0

didnt debug your code . Just wanted to suggest that finding 2 points with minimum x coord can be done easily by sorting and picking the first two points . Refer this .

On lewinWunder Fund Round 2016, 22 months ago
+1

I'm not sure, but it is possible there are two triangles (p1 p2 p3) and (p1 p2 p4), where distance from p3 and p4 would be equals and p4 would be inside (p1 p2 p3). But I'm not sure.

On lewinWunder Fund Round 2016, 22 months ago
0

I solved it a bit differently from yours in O(N):

The first point in answer is the first point in input data. Then choose closest point to it from others. Then choose closest point to the segment of to points that we already have. Also, this third point mustn't lie on the line made from two already choosed points. Got AC, but your solution, I think, more easy to prove and understand.

On lewinWunder Fund Round 2016, 22 months ago
+67

Problems with awesome quality. Nice, lewin. And for me drawings in E were extremely helpful. Thanks for a round.

On lewinWunder Fund Round 2016, 22 months ago
0

Thanks i got AC

On lewinWunder Fund Round 2016, 22 months ago
+5

Rating increases if you solved better (more tasks OR equal, but faster) than the participants with the same level (or greater) as you.

And it decreases, if you solved lesser or slower.

So it is not based on the amount of solved tasks itself, but on the comparison on your peers.

On lewinWunder Fund Round 2016, 22 months ago
0

good contest

On lewinWunder Fund Round 2016, 22 months ago
0

Thanks for that case. But i am still getting wrong answer. Now i am finding two points with minimum x and if they are equal then i am finding points with minimum y.

On lewinWunder Fund Round 2016, 22 months ago
0

Hello...this is my third contest on codeforces. In my first two contests I only solved one question. Today I solved two but my rating decreased! Can somebody explain this to me ? Is it because that this round is a combined round ?

On lewinWunder Fund Round 2016, 22 months ago
+68

When the T-shirts will be announced?

On lewinWunder Fund Round 2016, 22 months ago
0

That was my mistake, I am so sorry for my previous comment. But now Um_nik is in 6 points from XBox One)

On lewinWunder Fund Round 2016, 22 months ago
0

When It was 97 percent of testing I thought that nothing can be changed at the top of the table. That was my stupidity. Egor have sent solution when it was 1 hour and 59 minutes. Congratulations to him!

On lewinWunder Fund Round 2016, 22 months ago
0

The approach is broadly correct. I just implemented it to test: 15667843. However:

  1. it's not enough to sort just by x (or y) coordinate; points that have the same x coordinate should be sorted by y coordinate (x, respectively).

  2. points can be on the same line that is neither horizontal nor vertical; this case should be recognized and skipped.

On lewinWunder Fund Round 2016, 22 months ago
0

It's not enough. For example, points A(0,0), B(1,1) and C(2,2) can't form a triangle, in spite of they don't have the same x or y. You should check that the area of that triangle is 0. If it's not 0, print that 3 points.

On lewinWunder Fund Round 2016, 22 months ago
+13

if you only sort by x , then you could choose 1 point on a vertical line ( P ) and 3 on the next one( P1,P2,P3). In that case, you may choose P , P1 and P3 where P2 is inside of the triangle(on the border). You should sort by y too

On lewinWunder Fund Round 2016, 22 months ago
+1

E.g. you have points:

0 1
0 3
0 2
1 1

Your algo will pick points 1 2 and 4 as a result. And it is wrong, because point 3 is inside this triangle. Valid answer will be 1 3 4 or 2 3 4.

On lewinWunder Fund Round 2016, 22 months ago
0

It was the right idea to solve C . May be Int flow issue was there same as me . btw its not essential that only they will only horizontally or vertically in line . point ( 0 , 0 ) , point( 1 , 1 ) and point( 2 , 2 ) can also form a line .

On lewinWunder Fund Round 2016, 22 months ago
0

But in that case, whichever triangle you form will have zero area. That is not valid.

On lewinWunder Fund Round 2016, 22 months ago
0

I think it's something about CF running several solutions on the same machine (but different cores). Try asking MikeMirzayanov to investigate if you're absolutely sure that it's CF-related problem.

On lewinWunder Fund Round 2016, 22 months ago
+1

E.g. if you have 5 points with the same X value you just pick first two, while other three could be inside them. So they will be inside the triangle that you've found.

On lewinWunder Fund Round 2016, 22 months ago
+174

For the past 5 minutes I was watching aropan's submission too.

Thanks for the congratations.

On lewinWunder Fund Round 2016, 22 months ago
+5

True :) Actually Div 1 & Div 2 combine contest never went good for me. Today i was hoping to break this :p Anyway it was a great contest .

Thank you lewin :)

On lewinWunder Fund Round 2016, 22 months ago
0

Can any body tell me why my approach is wrong for C

sort point by x .

for each 3 consecutive points make sure that their not in the same line ( horizontally or vertically ) if its the case print these 3 points and return .

On lewinWunder Fund Round 2016, 22 months ago
Created or updated the text
On lewinWunder Fund Round 2016, 22 months ago
+74

4 people placed 499. 4 * 2614 = 10456.

T-Shirt Random Winners: 498 218 125 86 452 496 145 405 99 412 260 382 449 461 240 131 337 116 210 249 393 488 457 447 266 416 370 386 497 58 197 104 478 165 254 251 374 181 111 307 132 471 360 124 299 229 425 492 63 363

On lewinWunder Fund Round 2016, 22 months ago
0

I think you did the good thing in that situation. Of course in hindsight you shouldn't have hacked, but in contest you couldn't know how common that bug was (so other people would make these hacks) or that there weren't 4 node test cases. If you were at a harder problem, which few people submitted, then that's another story.

On lewinWunder Fund Round 2016, 22 months ago
0

I thought that too. In graph 1->2->3->4 there is not Hamiltonian path if you start from vertex #1, But if you start from 2, 2->4->1->3 is possible path.

On lewinWunder Fund Round 2016, 22 months ago
0

What is wrong in this approach for problem C? First i am finding two leftmost points i.e. points with minimum x co-ordinates. Then i check for all other points such that they donot from a line with these two points and r1 ^ 2 + r2 ^ 2 is minimum where r1 and r2 are distances of the point from first and second point.

On lewinWunder Fund Round 2016, 22 months ago
0

This is really weird. In custom test, I designed some test cases for n = m = 3e5, and they got TLE. But now it is working pretty fast when I actually submit. This is confusing to me.

Thanks anyways.

On lewinWunder Fund Round 2016, 22 months ago
+2

You probably should add after "I will always use scanf and printf", "I will always use at least int64 type" :)

Really almost every contest have int32 overflow in some form. And in many tasks it is present to cut some specific fast algorithms, like counting in array where index = value.

On lewinWunder Fund Round 2016, 22 months ago
0

lol

On lewinWunder Fund Round 2016, 22 months ago
0

That's why I like TC SRM the most :( no problem for int or long long .

WA at 93th

AC

whatever my logic was right. I should be happy :)

On lewinWunder Fund Round 2016, 22 months ago
+74

Somehow I thought that in problem D there is no Hamiltonian path avoiding edges of path on 4 vertices. That is the only testcase my solution fails.

This case wasn't in the system test, but sadly one other competitor in our room made the same mistake and I hacked his solution. As you probably know, successful hacking cases are added to system test.

If I didn't hack him, we would probably both passed :-(

On lewinWunder Fund Round 2016, 22 months ago
+3

i did the same it was accepted , the approach is correct http://codeforces.com/contest/618/submission/15660749

On lewinWunder Fund Round 2016, 22 months ago
+33

FatalEagle be like

On lewinWunder Fund Round 2016, 22 months ago
0

Same here ! Submitted C thrice ( once after getting hacked ). All that for a WA because of overflow :(

On lewinWunder Fund Round 2016, 22 months ago
+148

For the past 5 minutes I was watching aropan's submission, hoping that test 67 might be some strong TLE case.

Nonetheless, congrats to aropan for that incredible luck in server timing :)

Edit: Reached IGM for the first time, so this contest is still a success for me!

On lewinWunder Fund Round 2016, 22 months ago
0

All N points are never collinear . It's mentioned in the statement .

On lewinWunder Fund Round 2016, 22 months ago
0

I thought about O(N log N) : I sort the points by distance from the first point.

On lewinWunder Fund Round 2016, 22 months ago
0

Nope it is not.

Maybe I wasn't too clear with description, in second step it is more precise to say that "if point is INSIDE OR ON EDGE of triangle".