zoro_2278's blog

By zoro_2278, history, 3 years ago, In English

I am getting different output for this problem. While using C++14, I am getting 50 instead of 42 in second subtask of test case 1 (My submission- 94759038). But I am getting correct answer on my pc, other online IDE link and if I use C++17. Can somewhat point out what is causing this unusual behaviour so that I can avoid it in the future.
Note: Though my logic is not correct for whole problem, it should pass the 1st test case.

Full text and comments »

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

By zoro_2278, history, 4 years ago, In English

Given an undirected graph with N vertices and M edges. In how many ways we can choose K vertices, such that after removing them, the graph remains still remains connected? I know we can find Articulation points when k=1, but not able to understand what to do for k>1.
1<= N <=50 , N-1<= M <=(N*(N-1)/2) and 0<= k <=N.
Link to question Link

UPD There was a mistake from my side. There was a typo in the question. I have corrected it now.

Full text and comments »

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