RubayedMunna's blog

By RubayedMunna, history, 22 months ago, In English

Why am I getting TLE on test 1? My code is running on Codeblocks with the given test case. Even the code works on custom test(I used the given test case). It takes 15ms. I was expecting Accepted or Wrong Answer or TLE on larger test cases or something else. But why TLE on Test 1?

Problem: https: //codeforces.com/gym/100551/problem/A My submission: https://codeforces.net/gym/100551/submission/189018331

Full text and comments »

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

By RubayedMunna, history, 3 years ago, In English

I have used same code. I got WA on 45 test using "GNU C++20(64)" compiler but got accepted using "GNU C++17" compiler. Why?

Here is The code: https://codeforces.net/contest/217/submission/151172349

Full text and comments »

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

By RubayedMunna, history, 3 years ago, In English

I got a problem whenever I was solving Atcoder contest.

I have an array. I want to store index of every occurrences of every elements of the array so that whenever someone gives me two number x and k, I can show him/her the index of k th occurrence of x.

To do this, I used a map. I used the key value of map as elements of the given array and for mapped value I used a vector so that I can push back the occurrences of the elements to the vector(mapped value).

Now, the problem is I don't know how to push back indexes to the map of vector. I also faced problem whenever I tried to find k th occurrence of the element x.

If I'm wrong, please correct me.

Full text and comments »

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