Блог пользователя saptarshikuar2003

Автор saptarshikuar2003, история, 5 месяцев назад, По-английски
  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 7 месяцев назад, По-английски

I am solving problems in the range of 800-1400 for very long but still the progress is very less I try to observe patterns try

implement logic the only thing I feel I am suffering is that I couldn't able to solve a problem in required time limit

how to improve the speed

please give some tips to improve

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 11 месяцев назад, По-английски

problem link:- https://codeforces.me/problemset/problem/1914/E2

i am not getting the proof for the above problem please someone help me in analyzing the problem

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 12 месяцев назад, По-английски
  • Проголосовать: нравится
  • -17
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 13 месяцев назад, По-английски
  • Проголосовать: нравится
  • -10
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 15 месяцев назад, По-английски

problem link:- https://codeforces.me/contest/2116/problem/B

submission link :- https://codeforces.me/contest/2116/submission/323376355

please help me understand what is wrong with this solution......

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 17 месяцев назад, По-английски

submission link:- https://codeforces.me/contest/2009/submission/313634231

problem link:- https://codeforces.me/contest/2009/problem/C

what is my mistake please someone clarify.......

here the author used ceil(x/k)<=ceil(y/k)----->> I have written (x<=y) why it is showing wrong

answer please clarify......

Полный текст и комментарии »

  • Проголосовать: нравится
  • -12
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 18 месяцев назад, По-английски

1788B — Sum of Two Numbers Let's assume that there is no carry while adding x and y . Denote n=a9⋯a1a0 , x=b9⋯b1b0 , y=c9⋯c1c0 in decimal system. The condition can be changed as the following condition.

  • ai=bi+ci for all 0≤i≤9 . — Sum of bi and sum of ci should differ by at most 1 .

If ai is even, let bi=ci=ai/2 . Otherwise, let bi and ci be ai+12 or ai−12 . By alternating between (bi,ci)=(ai+12,ai−12) and (bi,ci)=(ai−12,ai+12) , we can satisfy the condition where sum of bi and sum of ci differ by at most 1 .

There is an alternative solution. If n is even, divide it into (n2,n2 ). If remainder of n divided by 10 is not 9 , divide it into (n+12,n−12 ). If remainder of n divided by 10 is 9 , recursively find an answer for ⌊n10⌋_- _ which is (x′,y′ ) and the answer will be (10x′+4,10y′+5 ) or (10x′+5,10y′+4 ) depending on what number has a bigger sum of digits.

The following solution has a countertest.

  1. Trying to find x and y by bruteforce from (1,n−1 ). 2. Trying to find x and y by bruteforce from (n+12,n−12 )

A solution that randomly finds (x,y ) passes.

here I just wanted to how recursively I can find the for n/10 floor values please clarify

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 18 месяцев назад, По-английски

if a1+a2+a3+a4>b1+b2+b3+b4 then

is it right to say that p.a1+q.a2+r.a3+s.a4>p.b1+q.b2+r.b3+s.b4?????

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 19 месяцев назад, По-английски

problem link:- https://codeforces.me/problemset/problem/1973/B

here we have to determine the smallest possible value of k for which the below condition should be right that is for any i and j , 1<=i,j<=n...

a(i)|a(i+1)|.....|a(i+k-1)=a(j)|a(j+1)|.....|a(j+k-1)

Here the main Idea used is Binary search on answer......

If the segment of length k is working according to the conditions the k+1 will also be a right ans......

but how this occurs according to me-------

for a segment which not is capable to keep the bits same throughout all the subarrays of length k that means some integer in the array which can contribute to further to maintain the bits same

hence if it is not possible for k then it is also not possible for k-1......

hence binary search on answer........

am I thinking right.....????

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 19 месяцев назад, По-английски

please can any one give me a formal proof for its editorial.....

problem link:--

https://codeforces.me/problemset/problem/1984/C1

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 19 месяцев назад, По-английски

submission link:-- https://codeforces.me/contest/1991/submission/305969839 problem link:-- https://codeforces.me/contest/1991/problem/C

My idea is to come to a state of balance that's why I am taking x=(v[0]+v[1])/2.then to have a greater value of x I larger vales v[0] and v[1].

I also tried to take the average but still didn't work.....(v[0]+v[1]+v[2]+....+v[v.size()-1])/v.size().

but it is not working as may taking more oppertion than it should take....

then I come across the editorial and there they used the narrowing the range concept....

can someone help my what is mistake I am doing.......

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 19 месяцев назад, По-английски

I am trying hard to do better but I am failing please can any one help me in solving problems after contests so that I can also grow better.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 19 месяцев назад, По-английски

lets say we have an array a of length n.

we are given q queries with indices l,r.

we have to locate the position of minimum or maximum value within that range....of l,r.

the constraints are
.........1<=n<=10^5 .........1<=l<=r<=n .........1<=ai<=10^9 .........1<=q<=10^5

Полный текст и комментарии »

  • Проголосовать: нравится
  • -5
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 20 месяцев назад, По-английски

Hello everyone,

problem link:- https://codeforces.me/problemset/problem/1979/C

I was solving the problem and got stuck,

and in the editorial it was mentioned their that we have to use LCM I am not getting how the LCM is intuted.

what is the role of LCM...... is it observational or there is some proof for the use of LCM

please clarify about it..

Полный текст и комментарии »

  • Проголосовать: нравится
  • -13
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 20 месяцев назад, По-английски

problem link:- https://codeforces.me/problemset/problem/1881/D

here we have to choose two element in the array let ai,aj and choose a divisor of ai let x and replace ai=ai/x ans aj=aj*x;

after some operation we have to make all the element equal in that array

now let consider an array of two elements a1,a2 now let ai=a1 and aj=a2 x the divisor a1

==>let say a1=a1/x and a2=a2*x; ==>now a1/x=a2*x now multiply these two we get (a1/x)*(a2*x)=a1*a2;

we can generalise after all the operation when we multiply all the elements we get a1*a2*a3*a4...... so we can generalise if the nth root of a1*a2*a3....*an is a whole number then return yes otherwise return no; I don't no how to implement this idea..... also please clarify that the idea is right or wrong.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 21 месяц назад, По-английски

hello, I got stuck in this problem can any one help me in figuring out what is the mistake. submission link:- https://codeforces.me/contest/1790/submission/296512970

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

Автор saptarshikuar2003, история, 21 месяц назад, По-английски

can anyone help me in figuring out the problem I am not getting the editorial and how it is working. please some one explain me. the problem link:- https://codeforces.me/problemset/problem/1979/C

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится