Chat:World/2022-01-10

From CG community
Revision as of 05:29, 11 January 2022 by Chat Log (talk | contribs) (Created page with "File:Default_avatar.png kavishka: guys can you tell a middle level game that easy to do <img src=/a/19296690220841> KiwiTae: don't panic is easy File:Default_avatar...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Default avatar.png kavishka: guys can you tell a middle level game that easy to do

KiwiTae: don't panic is easy

Default avatar.png kavishka: thank you kiwitae

Ftyghi: hi

Ftyghi: :grin:

Default avatar.png LinhT.Nguyen: why cant i solve nintendo challenge

BlaiseEbuth: 'cause you're not plumber

Default avatar.png LinhT.Nguyen: :grimacing:

Default avatar.png LinhT.Nguyen: oi bro hows spring challenge you're tough one hahah

jacek: hm?

evanlin123: yo mortis_666

evanlin123: u play brawl stars? right?

evanlin123: i play it 2

evanlin123: im pro

evanlin123: :thumbsup:

Thorcode: ok pro bs

Fasader: :fearful:

5DN1L: Automaton2000, I don't play brawl stars, I code A* https://www.codingame.com/training/medium/a-star-exercise

Automaton2000: only if there are any

electrogiant: I play brawl stars

Vitto.gs: how many trophies do u guys have on clash royale

electrogiant: I have max earthquake

5DN1L: Please stick to coding-related topics here, thank you.

electrogiant: ok

Vitto.gs: oke ;)

Nachosauce: I love codingame. It's so fun. I found it when I was trying to get into programming as a career. Got the career and still having a blast here :) Really helps me practice types of problem solving I don't run into at work

5DN1L: :thumbsup:

Default avatar.png C26_1: Um, can I ask something

Default avatar.png C26_1: This is not a related-coding question

Default avatar.png C26_1: How can I write the skeletal structure for organic chemistry

Default avatar.png C26_1: Because of something called sigma bond

Default avatar.png C26_1: There are multiple way of writing the same molecule

Default avatar.png C26_1: I hate that when I have to try to imagine the spinning of a 3d molecule

Default avatar.png C26_1: Just to know that I know writing skeletal struct but those sigma bond hits me really painful

Default avatar.png C26_1: Any tips?

5DN1L: No, please don't ask here, thanks. C26_1

Default avatar.png C26_1: Oh ok, thank you for at least saying to me

Default avatar.png FORMS1: Can someone tell me why my first "if" statement wont initialize?

Default avatar.png FORMS1: http://chat.codingame.com/pastebin/2c3d5b98-1bb0-4b85-afa7-c1898a34d29b

5DN1L: Are your { and } correctly placed?

5DN1L: so chaotic :P

5DN1L: what do you mean by not initializing your "if" statement?

5DN1L: you mean for the last test case?

Default avatar.png C26_1: I see something sus in your C coe

Default avatar.png C26_1: code*

Default avatar.png C26_1: In the first if statement

Default avatar.png C26_1: @FORMS1

Default avatar.png C26_1: and... why do you assign a variable outside main function

Default avatar.png C26_1: that would probably caught an error right?

Default avatar.png FORMS1: doesn't make a difference if I move it

Default avatar.png FORMS1: Yeah the last test case

Default avatar.png FORMS1: It must be syntax but it looks correct to me

5DN1L: As I said

5DN1L: your code only fails the last test case

5DN1L: because there is nothing to read from after the number of temperatures

Default avatar.png FORMS1: wait is it 0c like the temperature

Default avatar.png FORMS1: or 0 inputs

5DN1L: first line is number of temperatures

5DN1L: second line contains the temperatures, if any

Default avatar.png FORMS1: does n = 1 or 0 in this

5DN1L: 0

Default avatar.png FORMS1: i tried that, i made n - 0 cout 0

5DN1L: so it won't go into the for loop at all

Default avatar.png FORMS1: still 500

5DN1L: hence c is untouched

5DN1L: You can see for yourself by debugging using cerr

Default avatar.png FORMS1: I just put this in above every thimg

Default avatar.png FORMS1: n = 1 in this, I'm sure it does

5DN1L: what do you mean

Default avatar.png FORMS1: the output says expecting 0 not expecting "nothing"

Default avatar.png FORMS1: If (n ==0) cout 0

Default avatar.png FORMS1: still puts out 500

5DN1L: because your code doesn't stop there

5DN1L: you use an else to enclose everywhere else

5DN1L: to stop that last line from execution

Default avatar.png FORMS1: http://chat.codingame.com/pastebin/4e70a41c-5c62-4f88-9030-99efc1f31a15

Default avatar.png FORMS1: http://chat.codingame.com/pastebin/b634b44f-170b-4cf3-88ff-521807fc8114

Default avatar.png FORMS1: the second one

Default avatar.png FORMS1: if what you

Default avatar.png FORMS1: I'm covering N=0 and temp = 0 here

Default avatar.png FORMS1: it's still putting out 500

5DN1L: think about the logic for a moment

5DN1L: if N = 0 -> no temperatures to read -> output 0

5DN1L: if N > 0 -> read temperature one by one -> output answer

5DN1L: if (N == 0) should belong to outside the read-temperature for loop

5DN1L: not inside

Default avatar.png FORMS1: ...

5DN1L: if (N == 0)

Default avatar.png FORMS1: May god he's right

5DN1L: {cout << "0" << endl;}

5DN1L: else {

5DN1L: for (xxxxx)

5DN1L: { yyyyy }

5DN1L: cout << answer << endl;}

Default avatar.png FORMS1: Thanks for taking the time to explain it to me

5DN1L: no problem!

Default avatar.png FORMS1: And that's puzzle 2.

Default avatar.png FORMS1: Look at Bill Jobs

Default avatar.png FORMS1: out*

Default avatar.png FORMS1: it's late..

Default avatar.png FORMS1: Thanks everyone! happy shvenyshvendydoo

Default avatar.png FORMS1: night

5DN1L: O....k

5DN1L: good night

FireCoderFL002: t

FireCoderFL002: guten morgen

Default avatar.png DroneArd: Morgen

5DN1L: English only, please

FireCoderFL002: sorry

Default avatar.png IceWrestler_6ce8: has someone solved the "A MOUNTAIN OF A MOLE HILL" puzzle? : https://www.codingame.com/training/easy/a-mountain-of-a-mole-hill

Default avatar.png IceWrestler_6ce8: need help

Schwase: so some advice for starters, try to define how to tell whether each coordinate in the map is in or outside of a fence

Schwase: i'll give you a hint, if a point in the garden is not in a fence and there is a fence to the left of that point, there must be an even number of fences crossed so that that point is not enclosed by a fence

Default avatar.png RobertoLeite: hey all. I've a question regarding the Mad Pod Racing Arena. Are we able to get the results of the simulations somehow? I saw those while inspecting the HTML, I'm just trying to avoid to scrape it if this is already available somehow... My idea is to using as a training set. All the best!

struct: you can download the replays

Default avatar.png RobertoLeite: really? how can we do that?

struct: https://www.codingame.com/playgrounds/53705/contest-tools-and-workflow/introduction

struct: login api changed though

struct: https://github.com/eulerscheZahl/NumberShifting/commit/bf07f4b389a5e3fa23488da3546701db56e7f23d

Default avatar.png RobertoLeite: thanks, I'll take a look at that.

Lynch[0]: (╯°□°)╯︵ ┻━┻

BlaiseEbuth: ┬─┬ノ( º _ ºノ)

MarcoThePhoenix: Hey, do you know some exercises to practise concurrency? Thanks!

bmacho: (╯°□°)╯︵ ┻━┻

5DN1L: (┛ಠ_ಠ)┛︵ ┻━┻ ︵└(՞▃՞ └)

BlaiseEbuth: (╯°□°)╯︵ ꞀƖNᗡϛ

5DN1L:    ┬─┬    ┻━┻ (╯°□°)╯

Wontonimo: cut it out or i'll glue down all the furniture. This is why we can't have nice things

5DN1L: How many more CG tables to flip

5DN1L: Is hot desking a thing for IT firms?

5DN1L: I visited a Microsoft office once

BlaiseEbuth: word or excel?

Husoski: Access, I'll bet.

Default avatar.png 21stCenturyPeon: It used to be, until covid meant every desk had to be disinfected between occupants

5DN1L: Ah I see

Default avatar.png 21stCenturyPeon: if you have fifty staff, but statistically, only forty are going to be onsite at any time, then you just saved yourself ten desks of office space

Husoski: Certainly would have saved me from working there... :)

Default avatar.png 21stCenturyPeon: it's a cunning ploy to get workers to turn up earlier, to get the primo desks without the wobbly foot, or the one near the kitchen, or whatever your jam happens to be.

Mrs.GloriaZindlebocker: wow, bomb got dropped on Alonehoc

Overbed: how to multiply every digit of a number in python

LordMoopCow: hot desking is sick it sucks when you sit beside lame people for months straight who creep you out

Husoski: Overbed: math.prod(map(int, str(number)) should work. Try it locally in interactive mode or Idle.

Default avatar.png Laki42: Hi I have a problem with first level of AI on quest map. I enter the level and follow instructions, but when I run code popup is still on my screen, does anyone know how to solve that.

Fasty_V-12_Engine: Hi people

5DN1L: Laki42 Are you able to solve your issue? Not sure whether you were referring to the tutorial popups, but I think you can skip those

Default avatar.png Sceptor: i have no idea what im doing

5DN1L: We don't have any idea what you're doing either. But if you want to ask a question, please feel free to do so

Wontonimo: vague questions get vague (or comical) answers

struct: hi

ninjadip: Line 2: a string sonarResult which gives you the result of the SONAR action: Y for yes, N for no. It is NA, if no sonar was used.

ninjadip: what is the range of this sonar? does anyone know

**5DN1L tried to search a puzzle with text "sonar" and failed

struct: sonar checks the sector

struct: the entire sector

ninjadip: ohh ok

5DN1L: what is that

5DN1L: bot programming?

struct: ocean of code

ninjadip: yes

5DN1L: ah i see

ninjadip: not sure why it couldnt say that

struct: its on the statement

ninjadip: not on mine

struct: which league?

ninjadip: do u get sonar in the begining?

struct: no

ninjadip: ok

ninjadip: then there we go :)

ninjadip: trying to get a plan on how to approach this

ninjadip: going to watch red october again

ninjadip: i know i have to do something with SEAN_CONNERY_GUILE=true

Default avatar.png zpopov: sadddd

Default avatar.png SupercraftD: im making a clash of code problem

Default avatar.png SupercraftD: and it says that the stub expected 3 variables but received 1

Default avatar.png SupercraftD: in my test cases

Default avatar.png SupercraftD: how do you seperate each variable

Default avatar.png SupercraftD: so there are 3 of them?

Default avatar.png SupercraftD: oh nvm i got it

Default avatar.png Robert_Campbell: i am trying to do the unary problem, and i have the string turned to binary, but i dont know how to go from binary to unary. any advice? i am attempting to turn the binary string into a char array and then iterate over it with an enhanced for lop, but im stuck on trying to figure out how to count each set of 1s and 0s and give the correct format of "0 0" for one 1 and "00 0000" of 4 0s and so on

5DN1L: you count until you encounter a different bit

5DN1L: you store the current bit in a variable, and when you look at the following bit, you compare it with the one you've stored

jacek: at first i read it as urinary problem

jacek: and thought of optimal urinal problem

5DN1L: we do have that here :smirk:

Default avatar.png myman1182: programming solutions to curing UTIs

struct: jacek i think you were right

struct: I think its possible to do something from 5th row instead of 6th

jacek: woah

Default avatar.png Robert_Campbell: http://chat.codingame.com/pastebin/d25d0a8e-7400-4c4c-a144-a2a4972d5edc

Default avatar.png Robert_Campbell: so this is what i had come up with, the idea is that the counters would count up if the character was a 1 or a 0, and if it changed, it would run through adding all the 0s for the count previously before the bit changed and then reset the counter for the next time it changed bits again but my output is a little weird, i see one thing i need to fix already

5DN1L: What is it? Maybe it's the same thing I'm thinking of

jacek: remember its 7 bits, not 8

Default avatar.png Robert_Campbell: what i mean by weird is that the input is 1000011 but the output is 0 00 00 00000 not 0 0 00 0000 0 00. i know i need to force it to add the last bits because it doesnt run through based on this BUT it counted the 0s 5 times instead of 4 like i expected it to

Default avatar.png Robert_Campbell: it also counted 1 twice in the front

Default avatar.png Robert_Campbell: i think i fixed that part, i was using a <= instead of the < like i should have, now i just need to run the last bits, which i think i can do by just having the if statements pushed one last time outside of the forloop

jacek: ifs :nauseated_face:

5DN1L: How do you get the initial 1 or 0 to convert to the first 0 or 00?

5DN1L: ah sorry

5DN1L: ignore the question

struct: lol jackbauer24

struct: jacek*

Default avatar.png Robert_Campbell: yeah, it worked for both the "C" and "CC" tests, but failed the "%" test, and im not sure why

5DN1L: 7-bit

5DN1L: did you get that part right?

Default avatar.png Robert_Campbell: yep, thats what it was

5DN1L: what's your output

Mrs.GloriaZindlebocker: that is just a lousy problem all around without the chuck norris

Default avatar.png Robert_Campbell: Message: % bin: 100101 0 0 00 00 0 0 00 0 0 0

5DN1L: should be 0100101

5DN1L: 7 bits

Default avatar.png Robert_Campbell: yeah, i failed the chuck norris one as well, and i have no idea where to start with fixing it

jacek: but unary == chuck norris

Mrs.GloriaZindlebocker: one of the test cases is still named chuck norris :rolling_eyes:

5DN1L: Robert_Campbell Maybe you'll pass both testcases of % and Chuck Norris if you fix the 7-bit issue

Default avatar.png Robert_Campbell: thats what im hoping

Mrs.GloriaZindlebocker: you seem smart enough, you'll get it

Mrs.GloriaZindlebocker: just print stuff out to error

MSmits: cerr << "stuff" << endl;

Default avatar.png Robert_Campbell: i was going to do an if statement where if the .length didnt equal 7 to insert 0s at the beginning of the array until it does, but that doesnt solve the chuck norris problem because it is longer than 7 bits

jacek: what does this puzzle have to do with chuck norris anyway

MSmits: because chuck norris doesn't need 1's

Default avatar.png Robert_Campbell: one of the test cases is a message from chuck norris

Mrs.GloriaZindlebocker: he bought the rights to the url

MSmits: jacek : http://codesqueeze.com/the-ultimate-top-25-chuck-norris-the-programmer-jokes/

MSmits: it's a meme

jacek: i know

MSmits: well the joke is he doesn't need 1's, i think that's it :P

Mrs.GloriaZindlebocker: He's make fun of CG for being afraid of getting sued by CN

Mrs.GloriaZindlebocker: Or CP I guess

Default avatar.png Robert_Campbell: Message: Chuck Norris' keyboard has 2 keys: 0 and white space.

Default avatar.png Robert_Campbell: thats the message

Mrs.GloriaZindlebocker: I wonder why the coderpants guys never hang out here?

Default avatar.png Robert_Campbell: so, i think i know what the problem is, but i have no idea how to fix it

Default avatar.png Robert_Campbell: http://chat.codingame.com/pastebin/7c86ca7f-4e86-41cb-bfc2-5d5950c7d849

Default avatar.png Robert_Campbell: i think the problem is here. specifically, not alpha characters arent being turned to 7 bits

5DN1L: For each character, convert as usual, pad to 7 bits, then add to your binary string

Default avatar.png Robert_Campbell: so my first thought on that is to check if the character is alpha, and if it isnt, it pushes a single 0 first, then does everything else

5DN1L: whether a character is alpha or not isn't relevant

Default avatar.png Robert_Campbell: except for "{ | } ~ DEL" the only characters that are 7 bits is alpha, the others are 6

5DN1L: are you sure?

Default avatar.png Robert_Campbell: https://www.rapidtables.com/convert/number/ascii-to-binary.html

5DN1L: i mean you still have to pass the validators

5DN1L: the code you have is fine

5DN1L: but instead of adding the bits directly to the variable bin

Default avatar.png Robert_Campbell: starting from SPACE, yes. the others before space would fail

5DN1L: use a separate variable to store the bits

5DN1L: and count the length as you add the bits

5DN1L: then you just add "7 minus length" zeroes in the front

5DN1L: and add that to the variable bin

5DN1L: then you don't have to care about whether the character is alpha or not

Default avatar.png Robert_Campbell: ok, now i see what you are saying

5DN1L: except for "{ | } ~ DEL" the only characters that are 7 bits is alpha, the others are 6 <- there are still a few more between "Z" and "a" :P

5DN1L: and "@" too

Default avatar.png Robert_Campbell: rip

Default avatar.png Robert_Campbell: missed that

5DN1L: :P

Default avatar.png Robert_Campbell: this is probably taking me way too long to solve

5DN1L: hopefully you've also picked up a few useful things during the process

Default avatar.png Robert_Campbell: using arrays and stringbuilder a bit more than i ever did before. so, still need more practice with it, but it is definitely helping

5DN1L: yup, with practice you'll do better

Default avatar.png Robert_Campbell: http://chat.codingame.com/pastebin/ee20c604-d3d1-4c96-8594-bad213256b95

Default avatar.png Robert_Campbell: modified it to try and do the count method, but it wont go into the for statement in the if statement and now for some strange reason the CC test fails, it does it 3 times instead of twice

Default avatar.png Robert_Campbell: http://chat.codingame.com/pastebin/16ede4cb-7c8b-44bd-88ba-00419b9ea6d2

Default avatar.png Robert_Campbell: output for %

Default avatar.png Robert_Campbell: output for CC

5DN1L: Empty the variable bit for every character?

Default avatar.png Robert_Campbell: yeah, that fixed the CC message

Default avatar.png Robert_Campbell: keep forgetting if i want it to be fresh for each loop, i need to instantiate it inside the loop

5DN1L: yup

Default avatar.png Robert_Campbell: still cant figure out why the if statement is called correctly but the for loop inside it doesnt do the buffer for the bit to make it 7 bits though

5DN1L: not i == 7

Default avatar.png Robert_Campbell: tried, i > 7, still didnt work

5DN1L: https://www.w3schools.com/java/java_for_loop.asp

Default avatar.png Robert_Campbell: i could kind of see why not i == 7, because as the test conditional, you want it to run at 7 to make it 7 bits long, but even at i > 7, which should still have it run at 7, it doesnt

Default avatar.png Robert_Campbell: ok, now its taunting me

5DN1L: You have to add a zero as long as the total is less than 7

5DN1L: not equal to

5DN1L: not greater than

Default avatar.png Robert_Campbell: i see what i did wrong for the for loop, but the concatenation is being a thing

Default avatar.png Robert_Campbell: http://chat.codingame.com/pastebin/83380ea0-6d45-4ed9-9041-4ac275476591

Default avatar.png Robert_Campbell: nvm

Default avatar.png Robert_Campbell: i know what i need to do

5DN1L: :thumbsup:

Default avatar.png Robert_Campbell: i have it being backwards when creating the bit variable, so i feed it to a reverse method and so the buffer is being put at the end instead of the beginning like it needs to be

5DN1L: ah

5DN1L: System.err.println helps you

5DN1L: i do a lot of debug print when debugging my code

Default avatar.png Robert_Campbell: yeah, i have that in there which is why i thought it was taunting me at first

Default avatar.png Robert_Campbell: i might just take the incomplete at this point, got the % working finally and now the check norris message is not happy

5DN1L: if you want, just take a break and come back to it later

Default avatar.png Robert_Campbell: i have been at this for nearly 3 hours, and new glasses are giving me a headache

5DN1L: i see

Default avatar.png Robert_Campbell: can i submit this then work on it later again?

5DN1L: just play any testcase

5DN1L: then your code is stored

5DN1L: you don't have to submit

Default avatar.png Robert_Campbell: ok

Default avatar.png Robert_Campbell: thank you for the help

5DN1L: You're welcome :)

Rebollo: Hi folks.. Is it possible to check if a c++ array (a[]) is empty? Is it possible to clear/delete all arrays elements?

C_breeze: a[3]={0} perhaps?

Katespizer: can you guys recommend some good music?

Rebollo: good music? The Skatalites

Katespizer: thanks

Rebollo: For example:

Lets say I want to clear the following Array:

Rebollo: I have created a "empty" object, and adding it to each position so I know it is "EMPTY"

Rebollo: I created a function in order to do that

Rebollo: Do I have to return the "EMPTY" array and assign to my varible

Rebollo: or once I passa it as a reference

Rebollo: The array will be filled with EMPTY objects?

Rebollo: http://chat.codingame.com/pastebin/7fe667f4-0c03-4f83-87b7-1abac8a9fe18

Rebollo: or simply void will work as well?

Default avatar.png C26_1: Can I use a random wheel to make random input or should I think it of?

Default avatar.png C26_1: Cuz I'm making a contribution right now and lacks of input

Default avatar.png C26_1: http://chat.codingame.com/pastebin/daa1fad1-5e8c-4804-a623-6a50c6413eb1

Default avatar.png C26_1: This is an example of random input

Thorcode: https://www.codingame.com/clashofcode/clash/2165213bd72b46aa68be4a9cefcd1638fe31093 can I solo wit homeone?

Default avatar.png C26_1: Hmmmmm

Default avatar.png C26_1: I don't know if compiler can handle float numbers

Default avatar.png henrylang: what's going on guys

Thorcode: I duno

Default avatar.png C26_1: Um, after some tests then I confirm that compiler can handle it

Default avatar.png C26_1: wait

Default avatar.png C26_1: why does 0.1+0.2==0.3 return to False

Default avatar.png C26_1: There must be something here

Thorcode: oO

nitekat: https://0.30000000000000004.com/

Default avatar.png C26_1: So I have learned that computer sucks at floating number, so don't try to make a puzzle that are related to float type

Default avatar.png C26_1: Especially if calculating something related to floating number

Default avatar.png C26_1: @nitekat, can I ask something again

Dren: only if you plan to round

Default avatar.png C26_1: Can we use an online random wheel to generate random input?

Dren: with python importing Decimal is a pretty good option but even that won't give you 0.1 + 0.2 == 0.3

Default avatar.png C26_1: Cuz I'm not good at generate input in my head

Thorcode: up to you C26

Thorcode: it is your puzzle

Default avatar.png C26_1: ok

Mrs.GloriaZindlebocker: real programmers never use floats

therealbeef: real programmers write their own float operations