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

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

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.me/gym/100551/submission/189018331

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

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

Автор RubayedMunna, история, 3 года назад, По-английски

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.me/contest/217/submission/151172349

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

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

Автор RubayedMunna, история, 3 года назад, По-английски

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.

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

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