Chat:World/2022-05-21

From CG community
Jump to navigation Jump to search

Waffle3z: clash of code is an event now?

Mohamed_Kharrat: PatrickMcGinnisII thanks man, although I did end up solving it with recursion just like knapsack, I used a dictionary

Mohamed_Kharrat: turned out easier than i thought

PatrickMcGinnisII: of course u did. :clap:

Mohamed_Kharrat: :D

PatAPizza56: how do we invite redninja???

Mohamed_Kharrat: i invited both of u

Mohamed_Kharrat: 30 sec left

Mohamed_Kharrat: tick

Mohamed_Kharrat: tock

Mohamed_Kharrat: have to go get some sleep bye guys

Andy12: HEY.

Andy12: hi

Default avatar.png RandomSteve: hello there

Default avatar.png Redninja106: WHATS UP EVERYONE

Default avatar.png RandomSteve: not much, how you doing?

Default avatar.png RandomSteve: I'm working on the temperatures puzzle

Default avatar.png Redninja106: well thanks!

Default avatar.png Redninja106: im in COC right now!

Default avatar.png RandomSteve: cool

Default avatar.png RandomSteve: yay I solved it

Default avatar.png RandomSteve: :)

Default avatar.png RandomSteve: I kinda have a trauma becaus ein the puzzle shadows of the knight everytime I tought I had it I didn't have it but this time it actually worked

Default avatar.png RandomSteve: now I actually feel like I am learning and taht I have learned a lot

Default avatar.png RandomSteve: thanks to all those people that showed me support

PatAPizza56: hey everyone!

Default avatar.png Redninja106: https://www.codingame.com/clashofcode/clash/241452997be16b3e9adc2717a70e5b305eb250a

jacek: happy Caturday

jacek: oh my https://www.deepmind.com/publications/a-generalist-agent

DomiKo: published 2 days ago?

jacek: 12 may

DomiKo: ohh ok I see

MSmits: hey, I just had a really good idea about my local meta mcts

MSmits: I switched to a normal mcts (with book lookups) for my local and it only did 200-300 rollouts/second because it has to take the data from the drive

MSmits: So I made a shadow-dictionary that caches all the data on the drive that is being used with a capacity of around 1M. I do everything from that cache and flush it when it reaches 1M. It sped my program up a factor of 10!

jacek: now do it in GPU

MSmits: no way :P

jacek: i finally hunted down the bug, but i still dont know why it happens in the first place

MSmits: weren't you at that place already or is this a different bug?

jacek: i was, but it reappeared when i added another car

jacek: i learned some of the gdb

jacek: i assumed it was some null pointer

MSmits: oh ok

jacek: but it isnt, the pointer points to some deleted object

MSmits: weird

jacek: but i dont see at code why it would happen

jacek: and it still happens once in few hours

jacek: i was lucky i caught that while in gdb

jacek: $57 = {<Point> = {x = -1.0228604160514661e+263, y = 479.0564462702327}, _vptr.Unit = 0x7fffdc000, id = 0, vx = 132, vy = 100, beforeColvx = 132, beforeColvy = 100, radius = 100, mass = 1, friction = 0}

jacek: nice x

MSmits: oh yeah

MSmits: I think i know what happened

MSmits: the car went to a different universe with the same y coordinate

MSmits: but same x

MSmits: different x that is

MSmits: there's a wormhole in your code

eulerscheZahl: would be cool if you can somehow apply that concept in the real world

MSmits: Like pointing to something that doesn't exist and then you're teleported to a different universe?

MSmits: That's be fun

MSmits: 'd

RivalRickson: hi

rabee12: hi

jacek: finally i found it!

jacek: it was pointing to the beginning of vector. but if you add something to the vector, it will resize and copy and the address will be invalid

jacek: stupid c++ and its memory management

DaNinja: that auto resize can be extremely annoying. it breaks references as well as pointers

MSmits: ohh that is indeed annoying. I haven't had this problem because I use vectors as a cache with a large capacity at the start

MSmits: good to know that this can happen

Default avatar.png Teerach: heloooooooooooooooooo

Default avatar.png Teerach: helloooooooooooooo*

ben517: do private clash of code games affect your rank

bojgus: no

ben517: cool thanks

therealbeef: it's basic property of std::vector interface :-/

struct: jacek does that happen only if the vector gets empty and then add something?

therealbeef: "If the new size() is greater than capacity() then all iterators and references (including the past-the-end iterator) are invalidated. Otherwise only the past-the-end iterator is invalidated."

struct: so if I had vector<int> vec(1); int* p = &vec[0]; and then add more than 1 int, it will cause problems?

therealbeef: depends if capacity is also 1

struct: isnt vec(n) the capacity?

struct: or is it something else?

therealbeef: n is the size

TINOUAINANI: Top 50 or delete :grin:

TINOUAINANI: :joy:

therealbeef: capacity is the size of the reserved memory

struct: vector<int> vec(1); cout << vec.capacity() << endl; vector<int> vec2(2); cout << vec2.capacity() << endl;

struct: 1 2

therealbeef: most implementations apparently set the initial capacity to the initial size, but the standard doesn't specify anything

struct: ah ok

struct: thanks for explaining

therealbeef: a high-performance implementation could use a small initial stack array for example

jacek: struct it happened when i added 3rd ball to vector of capacity of 2

jacek: i never knew there could be 3 balls during collisions handling

jacek: this is what you get when copying code straight from java

TINOUAINANI: Ho did puzzel named "Bank Robbers" , i am stack in last test with slite differnece in the resulte ?

5DN1L: Probably because your solution is wrong?

TINOUAINANI: my be not , may be i lose some peregent becouse the resule is so close

jacek: oO

5DN1L: btw what language are you using? is that English? TINOUAINANI

TINOUAINANI: :joy:

TINOUAINANI: i am lezy to use tradiction sory hhh

jacek: :thinking:

5DN1L: that's a language puzzle

TINOUAINANI: Q : if you whant to find number of combination of password thats 3 first characters are digit and the last tow are from [a,b,c,d] ?

TINOUAINANI: the result is pow(10,3)*pow(4,2) wright ?

5DN1L: it took me a few seconds to interpret tow as two...

5DN1L: wright

5DN1L: i mean, right

TINOUAINANI: no percegent lose right ?

5DN1L: sorry, no idea about what you're asking

5DN1L: translate it for me

5DN1L: thank you

jacek: hm?

emyilmaz: holaaa

Husoski: TINOUAINANI That's correct, provided that repeated characters are allowed.

Husoski: With no repetitions, its C(10,3)*C(4,2)

Darleanow: Hello gello

Darleanow: 5DN1L

Darleanow: i need u bro

TINOUAINANI: ok thanks

Darleanow: i'm doing 1d fire bushes

Darleanow: i've made a regex

Darleanow: to split by 3 all the bushes and its working, almost

5DN1L: Don't ask me about regex :scream:

Darleanow: for some the quantity of bushes isnt dividable by 3 xD

Darleanow: https://www.codingame.com/ide/puzzle/1d-bush-fire

Darleanow: U SHOULD LEARN AT LEAST THE BASICS !!

5DN1L: :cry:

zakacat: Give :taco: 5DN1L

Ayza: still suffering darlean lol

5DN1L: what is the logic of your code, Darleanow?

Default avatar.png Tien118: taco?

Husoski: Darelanow This is a simple loop to write without regex. WIth regex you have the problem of a fire in a final string of length 1 or 2.

Ayza: someone did solve this puzzle with one line of regex

Ayza: but it's not necessary

Husoski: Sounds like someone has a golf complex.

Darleanow: Hello Ayza and Husoki !!

Darleanow: idk what you're talking about --'

Darleanow: 5DN1L it searches for f's in strings cutted in 3

Darleanow: but i just need to know like when u split a string

Darleanow: if like it has not a length of 3, how can i get the last part of this string

Husoski: I have an idea to try in the IDE...brb

Ayza: I didn't split the string for my solution

5DN1L: that regex solutions checks for end of word boundary

5DN1L: solution*

Ayza: didn't seem to work out easily

5DN1L: or rather, end of line boundary i think

zakacat: Is there a way that I can do only fastest claseh?

Darleanow: mmmh

zakacat: *clashes

5DN1L: Join clash event or do a private clash

zakacat: nice, thanks

Husoski: Okay, regex is pretty easy but probably wasteful, CPU-wise. The leftmost fire must be put out, no matter what, right? Think about what happens after that.

5DN1L: np :)

zakacat: Oh, I got it apparently anyways. whoop whoop

Darleanow: Husoki i didnt understood everything

Darleanow: like leftmost etc

Default avatar.png Gedela: taco

jacek: :upside_down:

jacek: Automaton2000 where is he?

Automaton2000: yeah but it's not the case

jacek: round and round https://streamable.com/op6fsl

TINOUAINANI: new puzzel "Calculator"

struct: now all you need is to avx the sim

ChrisKoehlerjr: can anyone help me with some puzzles

VirtualRealityRocks: I code C# too ChrisKoehlerjr , what do you need?

isaadi: AAAAAAAAAAAAAAAAAAAAAA

isaadi: mfw C

isaadi: pointers

TINOUAINANI: hhhhh pointres are great :joy:

TINOUAINANI: 1/a = 1/x1 + 1/x2

TINOUAINANI: is there a formola that faind all x1 and x2 that that fitting this eqution ???

TINOUAINANI: ps : x1 and x2 are unknown

j4at: http://chat.codingame.com/pastebin/f70e8513-9df6-4955-8e25-87c5643ccea7

j4at: Didn't test it, but even if i made a mistake the idea is there

j4at: TINOUAINANI

jacek: assuming x1, x2 != 0

j4at: well in our case its !=0 :3

j4at: Didn't bother write the prove

j4at: proof*

j4at: (forgot to remove x1=x2=0)

j4at: and a=[] lol

TINOUAINANI: i test your programme is,s working but what if x1 and x2 are great than a ?

TINOUAINANI: for ex your program

TINOUAINANI: 1/2 = 1/1 - 1/2

TINOUAINANI: but i whant those ?

TINOUAINANI: 1/2 = 1/6 + 1/3 1/2 = 1/4 + 1/4

TINOUAINANI: ist apuzzel named "Unit Fractions" that till this

j4at: ops made a mistake

TINOUAINANI: thi problem that they rich number big us 999999999 so thir is some thing with out for loop with i++

j4at: Well you can break if x2>2

j4at: incase of positive x1 and x2

j4at: http://chat.codingame.com/pastebin/0078f6c3-00aa-40be-9a91-a5465cce94ac

j4at: Didn't test it again

j4at: This works if x1>0

j4at: http://chat.codingame.com/pastebin/8a68c74a-2d2b-4ec7-9819-9a91dc9b41cc

j4at: if a > 0 then a small change will make it work on all cases

j4at: I helped enough you can guess the reset alone

j4at: TINOUAINANI

TINOUAINANI: thi big problem is in +1 every time you will get time out , thanks for your time

j4at: yeah it should be x2<2 lol

j4at: TINOUAINANI

j4at: nvm its correct :3

j4at: THis is what happens when you don't test :

jacek: oO

TKirishima: Automaton2000

Automaton2000: this time i did it

TKirishima: Nice

Default avatar.png aissvm: Nice

Remi.: Automaton2000 : turtle or not turtle ? that is the question

Automaton2000: i need to change the value

4kTre0912: Hola

Darleanow: j4at u online ?:)

Default avatar.png waterproofsodium: i lost 2 CP :O

Default avatar.png waterproofsodium: 2!!

Default avatar.png waterproofsodium: that's 1 more than 1

Default avatar.png mdfarhansadiq: hi

Default avatar.png mdfarhansadiq: :grin:

Default avatar.png waterproofsodium: hi

Default avatar.png waterproofsodium: "sadiq"

Default avatar.png waterproofsodium: I knew that was either indian or pakistan

Default avatar.png mdfarhansadiq: Bangladesh

Default avatar.png mdfarhansadiq: :D

Default avatar.png waterproofsodium: oh bangladesh is its own

Default avatar.png waterproofsodium: ignorant me

Default avatar.png mdfarhansadiq: oh...no problem

Default avatar.png waterproofsodium: is it still like

Default avatar.png waterproofsodium: 50 degrees celsius there?

Default avatar.png waterproofsodium: "in that region"

Default avatar.png mdfarhansadiq: no...now it's 30 degrees

Default avatar.png waterproofsodium: oh wow "lucky you"

Default avatar.png mdfarhansadiq: :D

Default avatar.png waterproofsodium: but it was like 40, wasn't it?

Default avatar.png mdfarhansadiq: yeah...kind of...but it's like 27

Default avatar.png mdfarhansadiq: now

Default avatar.png waterproofsodium: feels like too early in the year

Default avatar.png waterproofsodium: here it's already 30

Default avatar.png mdfarhansadiq: o

Default avatar.png waterproofsodium: but if we're lucky we stay below 35 most of the time

Default avatar.png mdfarhansadiq: wow

Default avatar.png waterproofsodium: anyways it gets crazy

Default avatar.png waterproofsodium: once you go above body temperature sweating does no more help the body

Default avatar.png mdfarhansadiq: exactly

Default avatar.png waterproofsodium: I wish we wouldn't depend on "climate change just playing out" as we currently do lol

Default avatar.png mdfarhansadiq: hahaha

Default avatar.png mdfarhansadiq: sounds interesting

Default avatar.png mdfarhansadiq: what's your real name?

Default avatar.png mdfarhansadiq: :grin:

Default avatar.png waterproofsodium: but what can you expect in an age where it's still ok for countries to attack other countries to acquire territory

Default avatar.png waterproofsodium: oh I don't say my real name in here sorry

Default avatar.png mdfarhansadiq: it's ok

Default avatar.png mdfarhansadiq: i think if a matter can be solved by discussion then why do war

Default avatar.png waterproofsodium: in this situation because the psychological disorders some people have can't be solved by discussion :p

Default avatar.png mdfarhansadiq: yeah...maybe

Default avatar.png mdfarhansadiq: we need a world where people are friendly and live peacefully

Default avatar.png mdfarhansadiq: there is no arrogance, ego, hatred, fight

Default avatar.png mdfarhansadiq: :relaxed:

Default avatar.png weptdog: Im completely new to coding where should I start??

Default avatar.png mdfarhansadiq: i think you can start from practice

Default avatar.png mdfarhansadiq: by using practice option

Default avatar.png mdfarhansadiq: https://www.codingame.com/training

Lisa-Has-Ideas: Welcome weptdog... careful, its addictive. :wink:

Lisa-Has-Ideas: Question for anyone: Why does the Clash of Code get referred to as "5 minute coding battles" but they really are 15 minutes ??

Ayza: probably because you are supposed to solve it in 5 minutes or so

Default avatar.png waterproofsodium: Lisa-Has-Ideas

Default avatar.png waterproofsodium: marketing

Default avatar.png RandomSteve: it should theorically be posible to solve them in 5 minutes

Default avatar.png RandomSteve: but you are given 15 to solve them

Default avatar.png RandomSteve: but yes, it is a 15 minute battle

Default avatar.png waterproofsodium: it's theoretically possible to solve each and everyone of them in < 1 min ig

Default avatar.png RandomSteve: I highly doubt that

Default avatar.png RandomSteve: some are very hard

Default avatar.png waterproofsodium: i mean

Default avatar.png waterproofsodium: "theoretically possible"

Default avatar.png waterproofsodium: just taking you by your words

Default avatar.png RandomSteve: All right my phrase was a bit open for interpretation but you know what I mean

Default avatar.png waterproofsodium: a reasonable constraint for a theoretical limit might be typing speed of the world champion

Default avatar.png RandomSteve: true

Default avatar.png waterproofsodium: meaning you could theoretically solve most of them in 20 sec ;)

Default avatar.png RandomSteve: a lot of them are solvable in that amount of time yes

Default avatar.png waterproofsodium: I would go by what a experienced clasher does

Default avatar.png waterproofsodium: and yeah most of them may be even solvable in 3 min

Lisa-Has-Ideas: ha, okay

Lisa-Has-Ideas: ha, okay

Lisa-Has-Ideas: ha, okay

Default avatar.png RandomSteve: xd

Lisa-Has-Ideas: ha, okay

Default avatar.png RandomSteve: all right you might wanna stop doing that I mean a mod might get mad

Default avatar.png waterproofsodium: once is an accident

Default avatar.png waterproofsodium: maybe 2

Lisa-Has-Ideas: Sorry... it was my computer. I thought it wasn't taking it. (Sorry)

Default avatar.png waterproofsodium: three?

Default avatar.png waterproofsodium: no that's a pattern :P

Lisa-Has-Ideas: Yeah, I'm dumb

Default avatar.png waterproofsodium: (fav movie quote)

Default avatar.png RandomSteve: I'm sure you're very smart Lisa

Default avatar.png waterproofsodium: finding out it's not a movie quote

Lisa-Has-Ideas: (I didn't see all these wonderful responses to my question earlier either. Thank Ya!!)

Default avatar.png RandomSteve: my pleasure

Default avatar.png RandomSteve: No, I am your father

Lisa-Has-Ideas: It varies depending on what movie I just watched, but this is a good one: “This is the day you will always remember as the day you almost caught Captain Jack Sparrow”

Default avatar.png RandomSteve: yeah that is a nice one

Default avatar.png briankings: I have no idea what im doing

Default avatar.png xiaoping: share code

Default avatar.png xiaoping: i want to see

Default avatar.png RandomSteve: me too

Default avatar.png RandomSteve: How am I top 5% in this website if I started programming about two months ago? do 95% of people quit after two months?

Default avatar.png RandomSteve: actually top 4% now!

Default avatar.png LeJordy: maybe you just do it more often

Default avatar.png RandomSteve: I guess it's something like that

Default avatar.png RandomSteve: I am really happy with the progress I am making so far