Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

altrko's blog

By altrko, history, 2 months ago, In English

i changed it from C/C++: Edit configurations (UI) and it says i have new version but whenever i check i have c++98 even though i changed it to c++20. (i can figure out what version i am using from this code : https://coderslegacy.com/c/check-cpp-compiler-version/. oh ye and reason why i wanted to change this in the first place was because i couldn't use __gcd function. PLS HELP.

Full text and comments »

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

By altrko, history, 2 months ago, In English

I am using C++ and as we all know we have this function __gcd(a,b). but for some reason using this was giving me error. So I thought it was my c++ version and changed it in Vscode. So now it shows in Vscode that i have that new version but when i run the program in terminal (there is a specific program which tells the version of c++ you are using in Vscode, i'll put link below) it still shows me old version that I was using. Therefore i still have same error. Pls someone help.

heres link: https://coderslegacy.com/c/check-cpp-compiler-version/

Full text and comments »

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

By altrko, history, 3 months ago, In English

Now that i think about it, i wonder same in life as well.

1967B1 - Reverse Card (Easy Version)

if a+b ⋮ b*gcd(a,b) then a ⋮ b*gcd(a,b) so gcd(a,b) is b therefor a⋮b^2

p.s i didn't get the editorial so someone telling me it would be nice as well

Full text and comments »

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

By altrko, history, 3 months ago, In English

recently i solved a problem which needed some answers on given pairs (each one of them) and i did it on sorted pairs and only normal way to get my answer (on unsorted pairs) was to create pair <pair<int,int>,int> p[2e5]. third int was for the index of unsorted pairs. so by sorting the pairs ,index automatically followed it and eventually i did it but code got messy and "time consuming" like p[i].first.second. Is there a better way of doing this?

Full text and comments »

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

By altrko, history, 3 months ago, In English

how to make find function on set/multiset correspond to last element of that kind? like on multiset with elements 1 7 7 7 8 9 i want iterator pointing on last 7 on index 3.

Full text and comments »

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