You are not logged in. Please login at 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

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


answered 06 Nov '17, 01:07

sarkysaurabh's gravatar image

accept rate: 100%

edited 06 Nov '17, 01:09

thanks for help :)

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

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 05 Nov '17, 23:58

question was seen: 265 times

last updated: 06 Nov '17, 10:51