Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

It_Wasnt_Me's blog

By It_Wasnt_Me, 2 months ago, In English,

https://codeforces.com/contest/195/problem/D I am so close to the solution but there is something that confuse me

the problem describe that $$$S(x)$$$ is sum of $$$n$$$ functions, the solution just use $$$F(x)$$$ for each line,

Should I consider $$$S(x)$$$ so I should sum all $$$k_i$$$ and $$$b_i$$$ ? https://codeforces.com/contest/195/submission/67170155 Anyone know why I am wrong?

Can anyone help me If he have explanation for the solution or explain the tutorial more because it is a bit unclear for me. :)

Read more »

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

By It_Wasnt_Me, history, 4 months ago, In English,

552D - Vanya and Triangles in this problem, shortly you should count all number of triangles with non-zero area.

My idea was to count all triangle I could which is NC3 then I will subtract zero-area triangles

zero-area triangle will occur if there is 3 points on the same line(horizontal, vertical) or have same diagonal.

Unfortunately I received (Wrong answer) and I can't prove why my solution is wrong, I tested it on several testcases and it gives Right answer.

https://ideone.com/iiuxuP Any help

Read more »

 
 
 
 
  • Vote: I like it
  • +6
  • Vote: I do not like it