weakestOsuPlayer_244's blog

By weakestOsuPlayer_244, history, 5 weeks ago, In English

Relevant image

There have been some issues with C++20 so it keeps going away at times but was there any talk of issues related to Clang?

If there were any please share links.

Full text and comments »

By weakestOsuPlayer_244, history, 16 months ago, In English

Hello all,

After several years of escaping the CF plagiarism catcher, today I have finally been caught red-handed by the system.

It took a relatively long amount of time and I was wondering when it would happen.

I see a very long list of people on the message, probably not less than 100 people for problem C in today's round 852.

Here is my submission to C open to scrutiny by the CF community.

https://codeforces.com/contest/1793/submission/193309665

Now like every other defendant, I would like to plea for not being guilty of copying the solution (indeed I have no proof of such a thing but yeah)

Anyways it was a funny thing to happen so I decided to make the blog.

Your solution 193309665 for the problem 1793C significantly coincides with solutions chuchu/193292752, Alphx/193308147, weakestOsuPlayer_244/193309665, sam2001sahil/193316282, python_0098/193316695, harshmakwana22/193316697, im_into_cp/193317885, TheEliteCoder/193317894, OXYgen_ru/193318528, akshat_017/193319600, Tanay1234/193319916, _i_am_viper/193320720, ayushpratap344/193320868, rvdddddd/193320872, yoloo123/193320880,........

Full text and comments »

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

By weakestOsuPlayer_244, history, 4 years ago, In English

Hello everyone. I was trying to learn how GDB works and learn about debugging.

While trying to set breakpoint on main function I saw that it's not displaying the line number in decimal.

So I looked up a bit and found that one needs to include the -g flag while compiling the cpp file.

I did that and yet it doesn't show the line numbers in decimal. (Thereafter I tried to search this up but couldn't get the issue resolved)

My GDB version is 7.6.1 (probably latest for windows)

https://www.imageupload.net/image/gdb-issue.KQ1E2

If someone can help me out with this it would be much appreciated.

UPD: Found out issue. Seems like compilation generates a separate file (a.out) and you have to run gdb on that file.

Full text and comments »

By weakestOsuPlayer_244, history, 4 years ago, In English

Hello guys.

I was trying the problem https://codeforces.com/contest/182/problem/D

The intended complexity of my solution is supposed to be $$$O(n\sqrt{n})$$$ but somehow I was repeatedly getting TLE. When I switched the concerned part where I was using + for concatenation of two strings with append it got accepted.

I went over to stackoverflow for figuring out the cause but I couldn't understand much of it besides trying the reserve keyword. I also tried using the reserve keyword for reserving space for the string but it resulted in TLE as well.

Here are my submissions:-

https://codeforces.com/contest/182/submission/82678284 -Using append.

https://codeforces.com/contest/182/submission/82677975 -Using + for concatenation.

Full text and comments »

By weakestOsuPlayer_244, history, 4 years ago, In English

While learning about segment tree I came across this problem:-

The task is as follows: for a given value x we have to quickly find smallest index i such that the sum of the first i elements of the array a[] is greater or equal to x (assuming that the array a[] only contains non-negative values).

Link-https://cp-algorithms.com/data_structures/segment_tree.html

The solution mentions storing prefix sums in the segment trees.

I cannot figure out how to build up a segment tree of prefix sums. Also how is it different from the range sums?

Full text and comments »