Chat:World/2021-02-27

From CG community
Jump to navigation Jump to search

MadKnight: who even watches streams when there's edited content on YT ?

Default avatar.png JayM9: hey guys

Default avatar.png JayM9: so i just did a class of code

Default avatar.png JayM9: it was the one of ranking soccer teams based on points, goal diffrence, and # goals. Where can I find that if I didn't finish

Default avatar.png milkbeforethecereal: i didnt get that one at all

creeperZnation4: @JayM9 I'm not sure if you can find the clash of code questions anywhere... They're shorter than the normal ones so I doubt they're among the normal problems

DaNinja: you can search for puzzles here https://eulerschezahl.herokuapp.com/codingame/puzzles/?q=soccer&category=ANY&title=on&statement=on&tests=on&comments=on&tags=on&author=on

Default avatar.png milkbeforethecereal: Today I learned

Default avatar.png milkbeforethecereal: python is better than everything else

Default avatar.png milkbeforethecereal: and lua is garbage

Default avatar.png milkbeforethecereal: this is definitely not a controversial statement

Le_Pancake: has the internet awarded you with the perfect statement award yet?

jacek: happy Caturday

MadKnight: jacek what caturday

jacek: happy

MadKnight: true

MadKnight: caturday = saturday okay

jacek: https://pics.me.me/and-it-is-written-that-every-day-shall-be-caturday-34071600.png

Default avatar.png OGWhisper: Python is so cracked for doing this fast lol

Default avatar.png Tiki69: you all are so good

Default avatar.png Tiki69: you all are gems

jacek: :blush:

geppoz: any Java expert can explain this:

geppoz: System.out.println( ( new SimpleDateFormat("dd/MM/yyyy").parse("2021/02/26") ) );

geppoz: outputs:

geppoz: Tue Aug 14 00:00:00 CET 31


geppoz: instead of raise a HUGE exception

geppoz: (and it is declared to throw ParseException...)

geppoz: sad story

jacek: oO

MSmits: :cry:

Default avatar.png Technove: hi guys

java_coffee_cup: @geppoz I think I cracked the mystery behind SimpleDateFormate.parse()

java_coffee_cup: when you use 26 to feed to yyyy, it interpreted as year 26 AD

java_coffee_cup: month is 2

java_coffee_cup: day is 2021, which overflows the days in a month. The extra days will be carried over to month and years. So 2021 days roughly is 5.5 years. The year value of 26 adds 5 becomes 31

Default avatar.png GiangHoGoVap: em ơi em sướng chưa ?

java_coffee_cup: if you print the date value of the incorrect parse result, you see the year is 31, month is Aug

AntiSquid: GiangHoGoVap Nếu tôi có thể sử dụng google dịch, bạn cũng vậy!

AntiSquid: #VN

AntiSquid: oh god it's dead and empty, nevermind, just stay here and try english

Default avatar.png Samo_AM: Hello

Default avatar.png GeorgiD: How do you turn this binary clock to normal clock: http://chat.codingame.com/pastebin/50f63abb-e25d-455a-93ae-e8bc73bb2b62

Default avatar.png GeorgiD: This was a bad problem with no good explanation of how it works

Default avatar.png Samo_AM: how work binary clock?

Default avatar.png GeorgiD: A reverse mode in which 123 returns 24 and 1234 returns 120?

Default avatar.png GeorgiD: Nvm

Default avatar.png GeorgiD: Its the product of every digit+1

geppoz: java_coffee_cup ty, I imagined that, but what's the point to specify a format, when it just guesses any numbers? "dd" means "day of month", not just a random days quantity... for me this is a bug

jacek: this is java

java_coffee_cup: it is a feature. Calendar days (its fields) allows + and - operations, so it also have carry over. When you add 1 to day 31, it becomes the next month's day 1. The year can change too when Dec 31 adds 1

Default avatar.png FalconX: OK

Default avatar.png Afranzio: Hy

Default avatar.png FalconX: hy

geppoz: java_coffee_cup I don't agree

geppoz: that is a feature when you add/subtract to Date object

geppoz: this is a "Format" class

geppoz: = it should be meant to parse following a specific format

geppoz: in the pattern specification "d" is "day in month" not "relative days quantity"

java_coffee_cup: It is a flexible parser more than a strict C's printf format. It allows parsing 31 by dd but it cannot immediately tell is 31 a valid day limit for that particular month and year. So when it allows reading 31 to Feb, it also allows reading 999 to any month. The dd should throw exception if you feed it with "abc"

Default avatar.png GeorgiD: 3 1 3 5 2 4 -1 to the output 9 in reverse mode

Default avatar.png GeorgiD: How does it work?

Default avatar.png GeorgiD: Cuz the other test cases glitched out and won't show

Default avatar.png jtsimmons: multiply the columns and then add the results

Quidome: does anyone solved retainin water

Quidome: https://www.codingame.com/ide/puzzle/retaining-water

Quidome: In the comments they suggest this can be done without a floodfill

Quidome: I don't see it (without a floodfill)

geppoz: yes, it is possible, I'm not sure it is more efficient though

geppoz: you can just scan iteratively all grid and remove "blocks" of water, until you complete an iteration without removing anything

Quidome: hm, still not getting my head around it the borders seems relevant and you are suggesting some sort of reverse way of working

Quidome: Well, i think i go for the itterative floodfill

geppoz: just done

geppoz: this solution is really easy

geppoz: I think completely inefficient, but very easy to programming

Amsterism: Hi, I need an expert ! :) If someone can check this topic : https://www.codingame.com/forum/t/defibrillators/189524/1

KiwiTae: Amsterism just need to compute min distance to the tool no?

Amsterism: What do you mean ?

Amsterism: Am I doing the wrong thing ?

KiwiTae: Amsterism whats your approach ? hehe

KiwiTae: oh i didnt check your post let me read

DaNinja: you need to split DEFIB to get the lon/lat for each

KiwiTae: the code is gone thou hehe (u cannot share code in forum I think)

RedBreakfast_da01: @DaNinja that's what I did

KiwiTae: if you parse correctly

likki1811: hey

KiwiTae: maybe u feeding the wrong thing in the cosinus

likki1811: how do you solve temperatures gfame

KiwiTae: likki1811 you read the hints?

likki1811: game*

KiwiTae: whats your solution at ?

likki1811: yes i solved it to a part

KiwiTae: u just need to return the closest abs value to 0

likki1811: yes

KiwiTae: so which test are you fialing?

likki1811: shall i send the code

KiwiTae: yes copy paste here gonna make a link

likki1811: im failing at the case no temperature and also choose the right temperature

likki1811: heres the code

likki1811: V

likki1811: http://chat.codingame.com/pastebin/2abb1514-b975-494f-8ca3-dcb6e003ab64

KiwiTae: likki1811 if n = 0 return 0 smth like that

likki1811: ya once can you check the code

KiwiTae: set you lowest to 9999 in the init

KiwiTae: and remove whats before the loop lol

KiwiTae: you should compare abs(lowest) var with the new input in the loop

likki1811: yaaa

KiwiTae: if you dont compare the input to your current value not gonna work hehe

likki1811: actually i dont rally know abt strings so i used my own ideas

likki1811: I'm getting error whenever I include math functions (assuming you know abt that). so i made my own absolute of an integer by t*t-1

DaNinja: Amsterism try replacing the comma before parsing

DaNinja: latAStr = latAStr.Replace(',', '.');

RedBreakfast_da01: @DaNinja yes the problem was comming from the fact that trying to parse a string with a ',' doesnt return false

RedBreakfast_da01: It parse and remove completely the , Imagine parsing : 1,5 would return 15

RedBreakfast_da01: ...

Blai8: Golfing in c# is gonna kill me

KiwiTae: >< Blai8 then dont hehe

Shatranj: use ruby

KiwiTae: Amsterism just do DEFIB.Split(';'); then Double.Parse(str)

DaNinja: likki1811 you have a bug at if(t=0)

bigmazi: is it possible to switch back to the Silver League in Coders Strike Back?

LaZeta: You can use history to check the previous code

LaZeta: Would like to know if this exists

LaZeta: (switching back to lower leagues)

likki1811: @DaNinja can please discribe it I'm not able to get ir

likki1811: it*

Default avatar.png planck6: this is live chat

Default avatar.png planck6: ?

Default avatar.png rcvalerio: no

Default avatar.png planck6: really

likki1811: it is a live one

Blai8: It isnt live, your messages get sent to modder revision and will be sent in 48-72h

trictrac: AntiSquid ?

AntiSquid: ?

trictrac: I just wrote an explaination of your 0 score on first round

trictrac: @ the end of the game you have to memorize the remaining cards in your hand

AntiSquid: would prefer if the game would tell me the empty cards and id

trictrac: Ok sorry for that

AntiSquid: parsing isn't very friendly

AntiSquid: fixed all issues now i think

trictrac: 1 league will be a formality

AntiSquid: now i need to get to actual game of trying to guess when to risk playing a card

kovi: i blame the reviewers :)

kovi: i have also encountered this issue today

AntiSquid: ya they should get a beating until morale improves

AntiSquid: oh i think you meant those who approved the game

AntiSquid: hanabi is a fun game, i stand by my review, but i wouldn't have approved this

jacek: /me

samuel_wondimu: any one who found ajob from this site

AntiSquid: yes

AntiSquid: few and far between

darkhorse64: I would say that the interface is minimalist (which is a good thing because there is a lot to parse) but the missing parts (cards played) cab be easily deduced

Default avatar.png TheSilentBreakfast_f26a: is this discord?

jacek: no

jacek: this is celestia

Astrobytes: For me it became clear when I printed the output and checked it while reading through the statement. Made perfect sense after that.

Astrobytes: *clearer

Noy78: jj

AntiSquid: any changes wood 1 fireworks ?

AntiSquid: apart from "difficulty"

imrel: Automaton2000 still alive?

Automaton2000: i don't think that's right

trictrac: wood 1 have same rules

AntiSquid: :thumbsup:

kovi: nice one antisquid!

trictrac: gg AntrSquid, top 3 easily

AntiSquid: thanks, but this is just the bugfree version (i hope), didn't add my usual real-life heurisitics :P

jacek: curse you reCurse for making chess

kovi: hmm, fw 3-11 is pretty close (shuffle randomly)

Anon747: hi

Anon747: need help

Anon747: https://strawpoll.com/k56hee21j

Anon747: thx in advance

jacek: ?

jacek: still working on chess and i find more and more bizarre bugs

jacek: from starting position my pawns can only go 2 squares

darkhorse64: in the referee ?

jacek: mine

darkhorse64: do not forget to check en-passant, too

jacek: no en passant nor castling yet

darkhorse64: There is a big fight in fireworks now, join the party

jacek: oh?

darkhorse64: you have a random bot looking at your ranking. There is much left to do for you for a competitive bot.

RockNTroll: what's up nerds

AntiSquid: does your back itch ?

AntiSquid: Dublin has fireworks too

Astrobytes: Absolute madness.

Yasser: Hey guys I'm in Dublin.

Yasser: you need fireworks?

Astrobytes: In a way Yasser: https://www.codingame.com/multiplayer/bot-programming/fireworks

Astrobytes: Just don't throw them at anyone if you win :P

Yasser: Huhu I see now what you're talking about.. sounds long enough to be lazy about xD

Yasser: I didn't know puzzle of the week can be by leagues.. like this one

Astrobytes: You don't normally play multis Yasser?

Yasser: that comes once in a while, things are being changed in community puzzles, that's what I mean..

Astrobytes: Ah, I see from your profile you do. Yeah, community multis, if they have 2 or more leagues are eligible for puzzle of the week

Yasser: I'm an old condinGamer anyway that's why I'm not aware fully on what's new here xD

Astrobytes: Completion of it requires ascending to the next league iirc

Astrobytes: Yeah I know

Astrobytes: Or remember rather

Astrobytes: Yeah things are a little different around CG these days...

abrman: Hey! I'm doing CGX Formatter (https://www.codingame.com/ide/puzzle/cgx-formatter) and am stuck on 95% while I pass all tests in the IDE. Can anyone have a look at my code?


abrman: I'm doing it in javascript, 30 lines

abrman: Okay, I literally just wrapped all my code into a function (everything that doesn't have to do with reading the inputs), and it passed 100%?! O_o confused really..

pardouin: JS is confusing :)

pardouin: https://www.destroyallsoftware.com/talks/wat

pardouin: 1:22

tutubalin: yeah

tutubalin: if (x != x || x == !x) console.log('Relax, it's JS')

AntiSquid: what the hell is that link? i am not clicking that

AntiSquid: why no youtube or one of the relevant alternatives ?

struct: I think its safe :)

therealbeef: just the thing you'd say if it already took over your computer ;-)

AntiSquid: better paranoid and safe than sorry

AntiSquid: also it's not popular, therefore it's not where the cool folks are at

struct: I think it is known

struct: if you google ""WAT" JavaScript Talk "

Default avatar.png MemeAccount: ello

Default avatar.png Hlrm: Does anyone know how to print("\")?

Default avatar.png MemeAccount: \n?

Default avatar.png Hlrm: I mean "\" itself

Default avatar.png Hlrm: no "\n" or "\t"

DaNinja: printf("\\");

Default avatar.png Hlrm: many thanks @DaNinja