da.2396's blog

By da.2396, history, 7 years ago, In English

Ques link : http://www.spoj.com/problems/ACMAKER/ Need some help , gone through many test cases still getting WA!

http://ideone.com/avp1C5

Thanks in Advance!

Full text and comments »

Tags #dp
  • Vote: I like it
  • 0
  • Vote: I do not like it

By da.2396, history, 7 years ago, In English

so the ques is

and on this test case 30 29 2 1 3 2 4 3 5 2 6 4 7 4 8 1 9 5 10 4 11 4 12 8 13 2 14 2 15 8 16 10 17 1 18 17 19 18 20 4 21 15 22 20 23 2 24 12 25 21 26 17 27 5 28 27 29 4 30 25

my ans is 11 but they are showing 15 . Is there any possibility of ans > 11 ! Here is the link to tree

Full text and comments »

Tags dsu
  • Vote: I like it
  • -22
  • Vote: I do not like it

By da.2396, history, 7 years ago, In English

https://www.codechef.com/problems/FLIPCOIN

Tester's solution is http://ideone.com/cq0dPj My solution is http://ideone.com/YEy9sm

I Tested my solution on various test cases , still couldn't find difference in the output file generated , Any idea?

Full text and comments »

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

By da.2396, history, 7 years ago, In English

This ques is solved by DP , and the main idea behind the DP is (considering testers solution — http://codeforces.com/contest/543/submission/11035704)

that either the new coder in the queue will write zero lines of code z[i][j][k] = z[i ^ 1][j][k];

But then the next line just shook me :

z[i][j][k] += z[i][j — 1][k — a[it — 1]];

By which it mean new coder will only take one line as a[it-1] is bugs per line of code .

Now considering a new coder can write lines more than one . Isn't it a bit wrong solution ?

Full text and comments »

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

By da.2396, history, 7 years ago, In English

Ques was to find Kth minimum divisor of N! my soln is http://pastebin.com/SwjJvp6E.

However I am getting it as a WA . is there any edge cases that I am missing?

Ques link : http://codeforces.com/group/gRkn7bDfsN/contest/210680/problem/B

Full text and comments »

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

By da.2396, history, 7 years ago, In English

Hi guys ,I was just lingering through problem set where I found this question http://codeforces.com/contest/368/problem/B

I was curious about whether this Question can be done using fenwick tree.(Which,apparently,I could not think of as in how to implement!? )

If u guys can implement fenwick tree for the question I would be more than overwhelmed . Or even if You can actively suggest some idea on how to proceed in implementing fenwick tree for finding distinct integers !!

Thanking you

Full text and comments »

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

By da.2396, history, 8 years ago, In English

Recently I was working on Greedy problems and I encountered one of the very prominent problem of runtime error while submitting soln to ques .

Problems are : http://codeforces.com/problemset/problem/494/A http://codeforces.com/problemset/problem/723/D

Probable reason I could think of is corrupt memory access but Locally they are running well .

My soln to the problem are:

http://codeforces.com/contest/494/submission/21373511
    http://codeforces.com/contest/723/submission/21299381

Any help is Appreciated .

Full text and comments »

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