You are not logged in. Please login at www.codechef.com to post your questions!

×

Getting TLE for TYTACTIC even after using BIT(Fenwick Tree)

I have used fenwick tree to solve the TYTACTIC question but I'm still getting TLE! My solution link

asked 05 Nov '17, 23:58

dushyant7917's gravatar image

5★dushyant7917
716
accept rate: 0%


I found 1 error in your code, edges given do not necessarily mean u is immediate superior of v (check problem statement). Also long is not needed here, since skill levels are limited by 20000, so the maximum sum in bit would be 2*109 which easily fits in int. I submitted your code after changing these and got AC in 0.06. Your AC code

link

answered 06 Nov '17, 01:07

sarkysaurabh's gravatar image

6★sarkysaurabh
203
accept rate: 100%

edited 06 Nov '17, 01:09

thanks for help :)

(06 Nov '17, 10:51) dushyant79175★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×371
×171
×6

question asked: 05 Nov '17, 23:58

question was seen: 265 times

last updated: 06 Nov '17, 10:51