Comments

im just curious you've been on CF for 2 years, how you don't know about it?

after getting accepted, you can lock problem by just clicking on the lock icon

image

Solution

The reason for limiting the iterations to 30 (Because 2^30 >= 1e9) is that after 30 halving operations (whether floor or ceiling), the value of x becomes very small, typically close to 0 ( 0 for floor and 1 for ceil), 0≤x≤1e9.More than 30 iterations are unnecessary

and do ceil oper2 for min first and oper1 for max first

yep, binary search

i believe the ratings of round 1004 haven't been rolled back yet. round 1004 is currently unrated for you, so once the rollback happens, your rating will remain unchanged..

image

You're 'Out of Competition,' when the rollback happens, your rating will remain unchanged

On Ali_BBNCongratulations to jiangly, 16 months ago
-13

Nvm

Untitled-Export-V4

Tourist -> <-

Congrats jiangly

Untitled-Export-V4

Tourist -> <-

Nah it's still here

image

Does Segment Tree have fruits?

I wish I could read minds

let's go another BledDest' Edu round

On WardCS and competitive programming, 17 months ago
-28

it's probably "Computer science"

i am just a chill guy who participates in every atcoder contest

On xiaowuc1USACO 2024-2025 First Contest, 17 months ago
+9

_"Can I use prewritten code / templates?

No."_

it's clearly mentioned

On Ra16bitMeta Hacker Cup 2024 Finalists, 17 months ago
0

Screenshot-2024-12-06-194710

he's at 25th

On pwnedCodeforces Round 987 (Div. 2), 18 months ago
+8

After more than two years of preparation and nearly thirty problems on our shortlist

Couldn’t be more excited to get into this

images

On patri_cai_bia_kormoHandle change!, 19 months ago
+14

You're allowed to change your handle name once in the first ten days of each new year! I haven't tried it myself, but that’s what my research says!

Read this

And this

On FBICodeforces Round 981 (Div. 3), 19 months ago
+3

finally a div 3 after a month, lets go!!!

My bad , just read your comment again !

Install CF Analytics on your browser to see this

my bad this one is my updated code!!.. actually i just sorted the pairs based on the sum of their two elements, which effectively minimizes inversions by placing pairs with smaller sums first. This approach aligns with the goal of keeping smaller elements before larger ones, even though it doesn't use standard lexicographical order. so, the logic meets the problem's requirements and gives the correct output....

Create a vector to store each array as a pair of integers. Next, for each array, input its two elements and store them as pairs. Once all pairs are collected, sort them primarily by the first element and secondarily by the second element when the first elements are equal. Finally, concatenate the sorted pairs into a single array, ensuring the relative order minimizes inversions by keeping smaller elements before larger ones as much as possible..

Solution

To solve the problem B, first sort the slots by the number of cans to prioritize slots with fewer cans, minimizing button presses. Then, start pressing buttons for each slot, collecting cans one by one. For each slot, calculate the maximum number of cans that can be collected from that slot and reduce the target number of cans k accordingly. Continue pressing buttons until you’ve collected at least k cans, keeping track of the total number of presses required. Stop once the required cans are collected and return the total number of button presses.

Solution
-10

._.

bro :(

+1

Thank you! Wishing you a great week ahead too :)

+2

Install CF Analytics on your browser

+11

Screenshot-2024-10-20-190304

that's why!

you should solve more problems of these (1600 < rating points )

create a vector to store each array as a pair of integers. Next, for each array, input its two elements and store them as pairs. Once all pairs are collected, sort them primarily by the first element and secondarily by the second element when the first elements are equal. Finally, concatenate the sorted pairs into a single array, ensuring the relative order minimizes inversions by keeping smaller elements before larger ones as much as possible...

On KEPuzOfficialHack it | Contest, 19 months ago
+5

meta hacker cup :)

we got CP version of PUB G before GTA VI.. This sounds amazing! A social platform just for competitive programming is a great idea. I love the features you're planning. Best of luck, I hope it becomes a big success!

ohh aight, thank you

thj

We both ( in the red circle ) are newbies, we both solved two problems, I solved both faster than Hasan22_1 but he got +111 and I got +25 MikeMirzayanov

it's nice feature btw and I guess it will save time to test all submitted solutions.. Thanks for adding this

Screenshot-2024-08-24-004810234

Lesgo C++23 (GCC 14-64, msys2) is pretty fast. Thank you for adding this Mike!!!

yes i checked and it executed the same solution 3.3x slower than C++20 (14-64)

Screenshot-2024-08-23-02190234

Same code but different compiler versions, Solutions: C++20 and C++23 . The submission by C++20 was noticeably faster.

I used unordered_map, i though C++23 will execute it faster but ... :)

Screenshot-2024-08-23-02190234

I encountered a significant difference in execution time between two submissions that used the same code but different compiler versions, Solutions: C++20 and C++23 . The submission by C++20 was noticeably faster.

Why C++23 is slower in my case???

On 0xF1IOI 2024 predictions, 21 month(s) ago
-18

.

just Practice Practice and Practice...

I found A2OJ Ladders very helpful..

I practice many questions from This List and now I can solve 1-3 Questions of Div 2

On MisukiCodeforces Round 967 (Div. 2), 21 month(s) ago
-9

.

I tried this multiple times but never got successful Attempt

You just used generator to generate worst case for s right?? But how did you figure out it'll give TLE..

How to practice for this?? I am very bad to figure out the time and space complexities

How to Hack someone's solution?? Shayan bro i think you should make a video on this topic!! I tried many times to hack someone.. but always ( Unsuccessful Attempt )

ohhhhhhhhh... i did'nt think 'bout it

thank's bro

i did'nt undersatnd why it gives WA when we use sqrt((x2-x1)^2 + (y2-y1)^2))...

but it got accepted when i removed sqrt

min(n,k)*min(m,k).....

input: 5 1 10000

output: 5*1=5

On SlavicGCodeforces Round 964 (Div. 4), 21 month(s) ago
0

in these cases Suneet loses the round , right? but only considers those cases in which suneet wins i.e; (a>c && b>d),(a>d && b>c),(b>d && a>c),(b>c && a>d)

On SlavicGCodeforces Round 964 (Div. 4), 21 month(s) ago
0

why i got wa in 2nd test case.. 101st "wrong answer 101st numbers differ — expected: '4', found: '2'"

here's my solution: My B solution

can anyone explain, please???

i thought it's

Spoiler
+2

Do you know that eating cheese can make you code faster than the running speed of a Tyrannosaurus REX?

is it some kinda hint or wot??

But where's the GOAT tourist ?

c825f6ed560288d59b75e853b3cbdc2e.png

why writers of this contest ain't listed

+2

and I solved First two Problems ....

+3

and the other three??

-46

.

-15

can a newbie solve first two problems???

0

Hopefully :)!!

-13

hopefully I'll Solve First two problems

On wuhudsmCodeforces Round 960 (Div. 2), 22 months ago
0

hopefully I'll solve the first Problem (500)

On vaavenCodeforces Round 953 (Div. 2), 23 months ago
+3

sounds like CodeForces Round 879 Div. 2

https://mirror.codeforces.com/contest/1834