saiteja_0712's blog

By saiteja_0712, 3 weeks ago, In English

Problem Link : 1895C - Torn Lucky Ticket Submission Link : 257911247

Im getting exit code: -1073741819 (STATUS_ACCESS_VIOLATION), checker exit code: 0, verdict: RUNTIME_ERROR for this code. Im unable to figue out. Can someone help me out in this!!.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By saiteja_0712, 4 weeks ago, In English

Problem Link : 1955D - Inaccurate Subsequence Search Submission : 256939551 My Approach : I tried to solve this problem using and array of size (1e6+1).Wth the help of sliding window technique i updated the segments. But i got Time limit Exceeded for O(N). Unable to figure out why Im getting TLE. Could someone please help me out in this.

Full text and comments »

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

By saiteja_0712, 3 months ago, In English

Problem link : 1920D - Array Repetition Submission : 248332727 My Approach : I stored the sizes of the array in a vector whenever an element is inserted and stored that element in a map. Incase of array repititon i just updated the size. To find the number at a given index im using a upper_bound() and iterating until it points to an index present in the map. This approach is worked well for many cases. But im getting wrong answer. Im unable to figure out where it is going wrong. can someone please help me with this .

Full text and comments »

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

By saiteja_0712, history, 3 months ago, In English

Problem link : https://codeforces.com/contest/1926/problem/D Submission : 247469924

My Approach Here I tried to make the groups of 2 integers whose xor will be 0. If we consider number of bits=3 then max possible number in binary = 111(7) and after flipping the bits it will be 000(0). lets take a number 101(5) after flipping bits it will be 010(2) (as we are considering only 3 bits) then i concluded to get the number after flipping the bits we should do (maxPossibleNumber — currNumber) -> this gives the number after flip. In the same way I formed the groups for 11 bits maxnum=2147483647 for the given problem. But im getting TLE for this code. But unable to figure out why im getting TLE.Even though it is an O(N) approach. Please help me out in this.

Full text and comments »

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