TLE in Fire Escape Route

pop(0) would do from first

2 Likes

Oh sry , Basically if u use pop(i) then it will pop the i’th element (i<n) , while simple pop function pop the last element .

Yeah. Pop default parameter is probably -1.

1 Like

Solved bro,
Thanks

1 Like

not probably , surely :stuck_out_tongue_winking_eye:

1 Like

I’m very new to Python now xD. So I type everything with a pinch of salt.

2 Likes

Python sucks so much

see in c++ lets say vector 1 is v1 and we make copy it to v2 ok , Now we change data in v2.
v1 and v2 are bth different right.
But in Python , Oh god , in second last contest of atcoder , in a question I used python like this-

ls1 = list
ls2 = ls1 
// manipulate data in ls2
print ls2

it showing wrong wrong nd wrong , after 1 hr struggle I m surprised +angry too , that ls2 have reference of ls1 means changes occur in both.

:sad Lyf :weary: :rofl:

1 Like

:joy::joy::joy: damn. Thanks for the heads up! I’ll keep this in mind when coding in Python.

2 Likes

one more , python has fking damn precision issues. :rofl:

1 Like

you should use this

ls2=list(ls1)

or

ls2=ls1.copy()

Yeah , after that shit I know .

1 Like

You need to learn python! It is a beautiful language.

3 Likes

LMAO , I Know 6 language but again as I always code in c++ , but yeah some basic code or at least "kaam chalau code " I will make.

1 Like

Not Related but which year are you in?

2020 pass out .

2 Likes

Okay! It is good to see you have a lot of passion for cp!

1 Like

Thanks, bro, I’m still trying to improve my self day by day.

User profile: chandanagrawal23 (Chandan Agrawal)

I m not improving that much, but yeah I hope may be after joining @everule1 's grp I will improve more.

1 Like

Is there any notification about the group, I also saw his blog on codeforces and filled the form too

1 Like

Thanks @aneee004