Chat:World/2021-10-09

From CG community
Jump to navigation Jump to search

eulerscheZahl: that one is so broken

PatrickMcGinnisII: it's more than 2 lines

PatrickMcGinnisII: I'll fall asleep

eulerscheZahl: the expected solution is wrong. if you solve it, your submit will fail

PatrickMcGinnisII: and drool on my kb

Wontonimo: well that sucks

eulerscheZahl: that's why it was taken down

Wontonimo: well that doesn't suck

eulerscheZahl: finished reading the huawei task. doesn't look as interesting to me as the last one but ok-ish. i think i'll play https://codeforces.com/contest/1576/problem/A

eulerscheZahl: oh, only 2s time limit, last time it was 10 or 15

Wontonimo: what was the name of that game where squares triangle and circles battle over three suns ?

Wontonimo: you entered it and won eth eulerscheZahl

eulerscheZahl: yare.io

eulerscheZahl: they are about to redesign their game a bit. playing with some ideas but nothing publicly available yet they intend another contest within approx 6 months

Westicles: huawei looks very boring but nice prizes

PatrickMcGinnisII: Long day, laying down, g'nite glhf

PatrickMcGinnisII: :sleeping:

eulerscheZahl: i've seen better than the current Huawei. probably wouldn't play without prizes

Wontonimo: g'nite

MiyamuraIzumi: pp

jacek: happy Caturday

Default avatar.png nickarts: yare.io, interesting

Default avatar.png GavinGuo: g

Thorcode: Write a function to calculate factorial for a given input. If input is below 0 or above 12 throw an exception of type ArgumentOutOfRangeException (C#) or IllegalArgumentException (Java) or RangeException (PHP) or throw a RangeError (JavaScript) or ValueError (Python) or return -1 (C).

Thorcode: could someone explain this for a stupid like me :)

eulerscheZahl: do you know what a factorial is?

eulerscheZahl: n! = 1*2*3*...*n

Thorcode: I solved that

Thorcode: but what is the execption my mind boom

eulerscheZahl: so in C#: http://chat.codingame.com/pastebin/d18e5bde-f028-4799-82ab-8e36440e7c27

eulerscheZahl: :/

Thorcode: nope I tried that too

TheBlueBias: How's your ICPC?

eulerscheZahl: it's meh

Thorcode: Should throw error

Thorcode: and this come out

TechnoBot: Who will 1v1 me

eulerscheZahl: i can kick you if you want

TheBlueBias: Meh?

eulerscheZahl: https://www.youtube.com/watch?v=LjJYYaeFNmQ

TheBlueBias: Why?

eulerscheZahl: not great, not horrible

TheBlueBias: Oh, subject you mean.

TechnoBot: bruh

Thorcode: https://imgur.com/a/AF04Vwm

Thorcode: what happend

TechnoBot: bruh

TechnoBot: man

TechnoBot: I wanna 1v1 someone

eulerscheZahl: now i really want to kick

TechnoBot: in hypixel

TheBlueBias: You don't throw exception Thorcode...

TheBlueBias: *error

TheBlueBias: return -1 is for C

Thorcode: oh ok

Thorcode: nothing changed

TheBlueBias: eulerscheZahl do we agree that flows are concurrent on the network?

Thorcode: that site is suck

eulerscheZahl: yes blaise

eulerscheZahl: i think your code sucks thor

TheBlueBias: What code did you try Thorcode

Thorcode: return "ValueError"

eulerscheZahl: facepalm

TheBlueBias: :D

Thorcode: ?

TheBlueBias: Learn about python exceptions Thorcode

Thorcode: yep that why i'm stupid

eulerscheZahl: google: "python valueerror"

Thorcode: thanks so much

TheBlueBias: euler: Seems logical, but wasn't really clear in the statement. Except if I missed something...

eulerscheZahl: statement has its flaws, especially in regards to groupid

TheBlueBias: Yeah, that too.

TheBlueBias: And no public test available?

Thorcode: <class 'ValueError'> oh this is why i'm stupid

Thorcode: thanks all

eulerscheZahl: learning how to look things up is an important skill for a programmer (and also in general)

Thorcode: I was struggling with it about 1 hour :9

TheBlueBias: You're not stupid because you don't know things, that's normal, you'll learn. But you're stupid to persist without recognizing you don't know and just go learn about what miss you...

Thorcode: use C is the easiest

Thorcode: just return -1

Default avatar.png ash15khng: hes too good hes never run into an error in his life

Default avatar.png daxigua: Hello,world!;:stuck_out_tongue:

Thorcode: hello

geppoz: hi

Thorcode: eulerscheZahl could you show me the kick button pls

eulerscheZahl: really?

Thorcode: yep i want to see that button in imgur

Thorcode: not kick me

eulerscheZahl: F5 to get back

Thorcode: wow that button is so powerful

jacek: oO

Thorcode: I will try to be better to have that button

eulerscheZahl: there's also a ban (it's not a button btw, you just write "/kick Thorcode"). Ban is permanent, I miss an option in between like kick for 24h

jacek: you can ban and unban 24h later

Thorcode: it like that you have more command than us

Thorcode: oh I get it

jacek: hes premium user

eulerscheZahl: i never understood how to use unban, works with some external chat clients. the webchat does not support it

Thorcode: what is the end of back to code?

Default avatar.png detastoa: is the whole game free?

Thorcode: oh I'm lack of read

Thorcode: yep

eulerscheZahl: codingame is entirely free for 2 exceptions: some escape rooms and the recruiting part. But both are not part of the main page

eulerscheZahl: the "fun page"

eulerscheZahl: (implying that escape is not fun :imp:)

Thorcode: yep escape cost money

Default avatar.png detastoa: r u guys professional coders?

eulerscheZahl: I code for a living, yes

Thorcode: no I'm just a noob

Default avatar.png detastoa: what language are u guys adept most

Thorcode: python?

Default avatar.png detastoa: cool

eulerscheZahl: C#, but I also code in others if needed

Default avatar.png detastoa: im beginner and i dont get why people r adept at many languages at the same time

Thorcode: to use in Clash of code

eulerscheZahl: sometimes you have to use a certain language for whatever reason

eulerscheZahl: e.g. if you want to upload your own games here on CodinGame (yes, you can do that), you have to use a language that compiles to JVM such as Java

eulerscheZahl: when I participated at the yare.io contest, JavaScript was best supported, so I used that

Thorcode: will you join this contest? eulerscheZahl

eulerscheZahl: at work I sometimes have to deal with a framework that's written in C++

eulerscheZahl: which contest?

Thorcode: fall contest :grin:

eulerscheZahl: oh, I don't consider this a contest

eulerscheZahl: no, won't play

Thorcode: yep escape with you is not fun :)

eulerscheZahl: not fun with me? how can you tell?

Thorcode: (implying that escape is not fun :imp:)

eulerscheZahl: ah right

Thorcode: or you need imgur?

Default avatar.png detastoa: should i learn languages all at once or only focus on one

TimothyAlexisVass: What am I doing wrong with this? tr A-Za-z `printf %s {Z..A} {z..a}`

Thorcode: depend on you

Thorcode: https://imgur.com/a/QPU90uF

Thorcode: here is the prove eulerscheZahl

Default avatar.png detastoa: u guys all are great. i admire those who good at coding. such a cool thing

jacek: focus on one or two. most languages have similar syntax

eulerscheZahl: yes, start with one. the rest comes over time

TimothyAlexisVass: I'm thinking this: http://chat.codingame.com/pastebin/b73743eb-9829-41d6-9e7b-ca61f4a665db

Default avatar.png detastoa: what age u all start coding?

Thorcode: 10

eulerscheZahl: mybe 15

jacek: on punchcards?

TheBlueBias: :p

TheBlueBias: First time I use Codeforces, is there really no available tests excepted the example euler? (Or any other participating to ICPC)

dreadylein: around 15 i would say , seriously at least

eulerscheZahl: yes blaise: only that one minimalistic set was a problem for me last time as well: i generated my own larger testcases and my improvements barely had any effect offline. submitted anyways and it had a huge impact on their testcases

TheBlueBias: Hmm.. OK. Blind mode, so...

jacek: fog of war

Manjius: i know a guy who started at 30 and is properly working

dreadylein: define properly :D

TheBlueBias: He makes good coffee.

dreadylein: fair ^^

jacek: java?

SNEEDSTER: Imagine still working (especially in a corpo) in your 30s, couldn't be me

jacek: crypto eh

SNEEDSTER: pretty much

DomiKo: question to 2048: how are you handling 65536 tile?

DomiKo: 5 bits per tile seems like a waste

YurkovAS: DomiKo uint32_t grid[4][4];

DomiKo: lol

YurkovAS: beam search + snake heuristic

DomiKo: i'm wondering if I could make simulation fast enough

YurkovAS: in result return not all moves: movesCount - 10

DomiKo: right now, my beam isn't really deep. I'm resetting it after 32 moves.

Westicles: as long as it is deterministic you can hardcode in spots to clear the big tiles

jacek: you can do it offline, speed problem solved

DomiKo: too many moves

eulerscheZahl: i was fully aware what I was doing and how it affects hardcoding when I created the testcases :imp:

jacek: :(

DomiKo: yeah :/

DomiKo: but still we can hardcode a lot

eulerscheZahl: i know

DomiKo: so for me welcome 128bits

jacek: we can make something like... opening book

eulerscheZahl: middle books

Shrimpster: So... Ive made a fairly descent MCTS for tictactoe got me to top 100 in gold, to beat the bot what do I need? more optimization to catch more moves, or is there some bug I havent figured out yet in my code?

YurkovAS: add bitboard

DomiKo: you know about Teclles?

struct: how many rollouts do you have Shrimpster?

struct: 10k?

Shrimpster: No, about 2k on the first rounds (except 1st)

Shrimpster: Whats teclles?

Shrimpster: Also yes, I use bitboard

DomiKo: http://chat.codingame.com/pastebin/2413364b-f6d2-43c1-bfc2-66247cea4cc4

jacek: also, try C exploration tuning. try using mate-in-one in tree and simulation turns. and try mcts solver

Shrimpster: ah instead of searching for all possible next moves just use one? DomiKo

DomiKo: yes

struct: with vanilla mcts you need 20k rollouts on 2nd turn

DomiKo: it's simple heuristic for early game

Shrimpster: Will do jacek :) thanks for the list

YurkovAS: oh, i'm never try #3 :thinking:

struct: me neither

jacek: ?

YurkovAS: 3) On random rollout also only consider this move when simulating

jacek: when i used teccles, i only used it as opening book. never in search

DomiKo: I tried #3 and my bot was better

darkhorse64: domiko: you can reach the 131k tile in some test cases, you need more bits

darkhorse64: at 2048

eulerscheZahl: btw saw you mentioning a random submit validator darkhorse64. i can assure you there isn't

eulerscheZahl: i know it says "random" on submit. CG had a bug. fixed now but not retroactive. it plays the correct cases but shows wrong names

eulerscheZahl: random is only a visible testcase for sharing replays without leaking any info. everything else is testcase+validator

darkhorse64: The random test case is not random ? :scream:

TheBlueBias: Nope. Your bot is just bad.

eulerscheZahl: no, the CG server monster got drunk

eulerscheZahl: the JBMs troll escaped

darkhorse64: My bot is a faithful one. It repeatedly gives me 56 M

eulerscheZahl: if you have a deterministic solution, you can submit it twice. you'll get the very same score

eulerscheZahl: clear indicator of no random

struct: referee checks for the code

DomiKo: darkhorse64 131K tile ohhh god

darkhorse64: It depends on the server speed. It may go deeper

darkhorse64: the 128 bit is enough

darkhorse64: @domiko

DomiKo: yeah I know. I'm converting my code from 64 to 128

TheBlueBias: No. Not you darkhorse64! The @Monster got you! Noooooo!!!! :scream:

darkhorse64: Depending on the test case, I change my search parameters. It won me 2M more. The bitboard monster totally owns me.

struct: whos bitboard monster?

eulerscheZahl: and in case you missed it: you can disable the replay if it gets laggy

eulerscheZahl: just print a "-" in your move sequence

darkhorse64: TheBlueBias has met him along with Cthulu

eulerscheZahl: or you collect your whole family, get some popcorn and watch it to the end

darkhorse64: Good point eulerscheZahl, it freezes my browser for every test during quite some time. No, there is no enough popcorn on earth for 60K moves replays

TheBlueBias: I was speaking of the @Monster, the one that makes you put @ in front of nicks...

darkhorse64: @TheBlueBias: I see you

TheBlueBias: :scream:

eulerscheZahl: 60k moves at a play speed of 500ms per frame (?) that's like 10 hours of entertainment

DomiKo: "Depending on the test case, I change my search parameters." That's my current plan. I want to use something like CMA-ES for getting best parameters for each testcase.

darkhorse64: "entertainment". I would not call it like that

eulerscheZahl: you weren't supposed to play it like that

**darkhorse64 feverishly googling CMA-ES

eulerscheZahl: i worked hard to squeeze the entire replay in 1MB, so you better enjoy it

DomiKo: I never print - to enjoy my bot

darkhorse64: Google search replied: wait for Domiko in the leaderboard before writing any code

DomiKo: nahhh

**struct waits for the boss

**TheBlueBias wait.

DomiKo: good results will require a lot of CPU time, so...

darkhorse64: chat or code

jacek: wait till you find that n-tuple for 2048 paper

TimothyAlexisVass: hi!

darkhorse64: CG 2048 is very different from true 2048 because of predictible random

jacek: its easier

darkhorse64: yeah, in the paper, people are in extasy when they get the 65k tile. Here, you fail if you do not get it everytime

darkhorse64: s/paper/papers

jacek: http://www.cs.put.poznan.pl/wjaskowski/pub/papers/Szubert2014_2048.pdf

jacek: they are happy getting 16k

jacek: though it is without tree search

TheBlueBias: Paid paper?

jacek: you dont dare to click my links?

TheBlueBias: You'ld be capable to create a redirection to a rickroll video.

jacek: :innocent:

cw477: I ain't clicking that $#!t

jacek: oO

Default avatar.png algobearcf: good luck in facebook hackercup, if anybody is participating

TheBlueBias: Facebook hackercup? That's a challenge in which you have to try to protect your data from facebook? :p

jacek: fantastic bits hackercup?

TheBlueBias: Well I guess that's the sequel of the twitch's hackercup...

Titruc: helllo

jacek: ohai

Default avatar.png algobearcf: Привет

jacek: :scream:

DomiKo: Does someone remember what current c++ compiler is?

struct: gcc

jacek: https://www.codingame.com/playgrounds/40701/help-center/languages-versions

DomiKo: because I'm surprised that there is build in hash for uint128

TheBlueBias: Oh ?

DomiKo: yeah hash<__uint128_t> is already implemented

jacek: oO

BobLob: the results of gcc --version is gcc (Debian 10.2.1-6) 10.2.1 20210110

DomiKo: and it's weird, because I have 11.1.0 and I have to implement it myself

jacek: march=native?

DomiKo: same flags for local and CG version

DomiKo: and yes, I have march=native

DomiKo: could it be this? because of diffrent CPU?

jacek: what cpu do you have

TheBlueBias: "__int128 is supported for targets which have an integer mode wide enough to hold 128 bits"

DomiKo: I have Intel i7 8 gen

jacek: potato edition?

DomiKo: so I guess i have newer CPU than CG

DomiKo: potato edition?

jacek: dunno why you wouldnt have hash yourslef but yes on cg

Default avatar.png TheForgottenMutant_ee85: :confused:

BobLob: Here its Intel Core Processor (Haswell, no TSX)... i6

jacek: am i the only amd guy around here

TheBlueBias: Amd...

jacek: 16 cores! good for my multi threading stuff i do all the time

struct: i6?

TheBlueBias: Well, I have gcc 10.3 and __uint128_t works.

struct: what do you want me try DomiKo?

struct: I have similar cpu to cg

struct: same architecture

DomiKo: http://chat.codingame.com/pastebin/7b3e09bd-3bf3-4f8e-9ffe-aa4df2f02cf1

DomiKo: does it compile or not?

struct: one sec

DomiKo: because on CG it doesn't

struct: I have wsl disabled need to restart

struct: 1 sec

struct: nope

DomiKo: O.o

struct: this exact code compiles for you?

DomiKo: because of redefinition?

DomiKo: yes it compile

struct: yes

DomiKo: how strange

struct: http://chat.codingame.com/pastebin/dbdbd85a-5616-4b67-99bd-019f22e5f111

YurkovAS: same error in gcc 9.3.0, ubuntu 20.04, intel xeon v3 haswell

DomiKo: you have G++ 9.0.0?

TheBlueBias: About uint128 not-working on your pc, are you sure to use at least cpp11?

DomiKo: so G++ 9.X.X have it, and G++ 11.X.X don't have it LOL

struct: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

struct: g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

DomiKo: where is my backward compatibility

DomiKo: c++ where it is

TheBlueBias: Well there's no mention of any change about __uint128_t in the doc...

jacek: uint128_t is so last week

DomiKo: what was last week?

jacek: we dont mention last week here

TheBlueBias: There's no such thing.

eulerscheZahl: last week, hmm your tutor announced an unofficial contest?

DomiKo: but what does this have to do with uint128?

eulerscheZahl: oh, those sentences were related

jacek: nothing :v

Default avatar.png MHzzz: Hi

TimothyAlexisVass: 🎤

Default avatar.png richardM72: New tot he site and figuring out you can't call Console.ReadLine() more then once per "turn" really slowed me down

jacek: hm?

Default avatar.png richardM72: I was using Console.ReadLine() in an if statement and then assigning Console.ReadLine inside the if statement. I didnt know each call to Console.ReadLine() gave new data

Porsuk: now you know

Default avatar.png richardM72: Not a big deal it just stalled me out for a bit lol

jacek: also beware of printing prematurely, or forgetting about new line

Default avatar.png richardM72: Thanks, so far the site seems pretty good at laying out the ground rules

Default avatar.png Lowkais: .

TimothyAlexisVass: Times are tough when you need to win every single clash to advance... 8 wins, and one 3rd place... -2 positions

jacek: aww

**TheBlueBias patpat TimothyAlexisVass.

TimothyAlexisVass: :hugging:

Default avatar.png MarcMarcMarcMarc: in ghost in the cell, is there a way to get an id for things ? Example the bombs, is there a way to track them by a unique identifier ?

jacek: you get the id for every entity

TheBlueBias: RTFS

Uljahn: ^

jacek: :o

jacek: i think you a mod position would suit you. do you want to apply?

TheBlueBias: Naaa.

Default avatar.png MHzzz: HI

jacek: HELLO

Astrobytes: GOODBYE

jacek: :(

jacek: cats are rude today

Astrobytes: Meh. Happy Caturday.

TheBlueBias: Catrudeday

TimothyAlexisVass: 🎤

**TheBlueBias drops the mic.

TimothyAlexisVass: /me

jacek: 1 2 7 3 DOWN TO ROCKEFELLER STREET

Default avatar.png hermes3: I am so bad at this

Default avatar.png hermes3: :(((((((

TimothyAlexisVass: Wy?

TimothyAlexisVass: Why?

TimothyAlexisVass: You are improving!

Default avatar.png richardM72: ASCII ART has me confused. What is the format of WriteLine? It keeps saying Expected: ###

Default avatar.png richardM72: Oh nevermind, it's feeding me ASCII art that I need to access programtically.

jacek: yes

Default avatar.png richardM72: Do I have to build a switch case in a loop with 27 cases? Seems like a lot of work for a level 1 puzzle

struct: which puzzle?

Default avatar.png richardM72: Its called ASCII ART

struct: I dont think switch case is needed

Default avatar.png richardM72: The way I'm thinking about it, there are 27 letters being fed to me in 5 line. I loop through the individual letters of the word I'm given and select the correct 4 indices for that letter (0 to 3 is A, 4 to 7 is B, etc).

Default avatar.png richardM72: characters not letters

Default avatar.png richardM72: I need the switch to select the right positions for each line based on the letter I'm on

struct: or everytime you get a row

struct: you can loop the string that was given to you

Default avatar.png richardM72: Sure but the program needs to know what part of that row contains the "E" row for example. Won't I need to tell it where to find E? (And every other possible character)

struct: you get the first row

struct: you print the top of every character you were given

struct: then you go in the second

struct: you do the same

struct: should work

Default avatar.png richardM72: "you print the top of every character you were given" Doesn't this require the program to know what the E looks like for each row (for example)

struct: if you have the entire row

struct: you know how it looks for every char

Default avatar.png richardM72: But what you print changes in each test case so the program must know to

Default avatar.png richardM72: I can do it but 27 cases sounds tedious

struct: if this was given

struct: # ## ## ## ### ### ## # # ### ## # # # # # ### # ## # ## ## ### # # # # # # # # # # ### ###


struct: ok it didnt create a pastebin

struct: http://chat.codingame.com/pastebin/ee73cfd4-8e7e-410d-a626-c56390c3d6d3

struct: thats an entire row for the 26 chars

struct: now you loop the string

struct: and you can find which part you need for each character

struct: if you do this for every row you solved the puzzle

Default avatar.png richardM72: I get that part, now keep in mind I must print "E" in the first test case and "Manhattan" in the second, how does the program select the right indices without 26 cases or ifelse explaining what the letters look like in that row?

struct: you get the charValue

struct: int charVal = T.charAt(j) - 'A';

struct: then you substring from the row to get the chars you want

Default avatar.png richardM72: T does not contain a definition for charValue

struct: Which language?

Default avatar.png richardM72: C# charAt() I mean

Default avatar.png richardM72: also splitting the word into letters isnt the issue

Default avatar.png richardM72: I just use .Split()

Default avatar.png richardM72: elaborate on "and you can find which part you need for each character" from earlier. How do you find which part you need without 26 switch cases?

struct: you know that A == 0

struct: B == 1

struct: and so on

struct: so you do

struct: You get the index start of the substring of row

struct: and the end

struct: like

struct: row.substring(charVal * L, charVal * L + L);

struct: L is the length of each ascii art letter

Default avatar.png richardM72: Exactly, so I need 27 cases to cover all possibilities switch(letter) case A: if(row == 0) Console.WriteLine("###"); etc.

struct: that wont work

struct: Because you will get this sometimes as input

struct: http://chat.codingame.com/pastebin/c3c2a1cd-6fe9-430a-bdc1-6beeb4c810d3

struct: It would not work for this solution

Default avatar.png richardM72: it builds the string row by row so it works for multiple letters

Default avatar.png richardM72: nested for loop

Default avatar.png richardM72: Im trying to figure out how to avoid writing all of that. i might not be clear. Give me a second to explaina little better

Default avatar.png richardM72: I'm given row 0 which contains the top row of all characters out of 5 rows. I want to print just the E portion. I know its position in the row but I cant hard code it because next case will ask me to print something else. How do I show the program where to find each and every character without 27 conditional statements

Default avatar.png FBF_Luis: richard, you can get the order of the character with an ascii table

Default avatar.png FBF_Luis: like struct is saying, a=0, b=1,...

Default avatar.png richardM72: then offset by the width?

Default avatar.png richardM72: for the entire range

Default avatar.png FBF_Luis: if you have the order, you also have the indexes you need for each letter

Default avatar.png FBF_Luis: and the indexes are always the same for every row

Default avatar.png FBF_Luis: for A you always print from 0 to L

Default avatar.png richardM72: do I need to manually assign the value for each letter? ex. A= 0, B= 1 like you said

Default avatar.png FBF_Luis: for B you always print from L to 2L

Default avatar.png FBF_Luis: no, there is a command

Default avatar.png FBF_Luis: c#, right?

Default avatar.png richardM72: Yes

Default avatar.png richardM72: The command isn't explained in the the goal or rules, what command returns 0 for A?

Default avatar.png richardM72: That seems to be what i'm missing.

Default avatar.png FBF_Luis: try int('A')

Default avatar.png FBF_Luis: should be 65 if I'm not mistaken

Default avatar.png richardM72: dang, Typecasting and parsing both fail

Default avatar.png FBF_Luis: and (int)'A' ?

Default avatar.png richardM72: Ok that worked, was using a string and not a char

Default avatar.png FBF_Luis: yeah, the are important

Default avatar.png richardM72: That should solve most of my issues, thanks

Default avatar.png FBF_Luis: np

Default avatar.png FBF_Luis: look for an ascii table to know how much you should offset

Default avatar.png richardM72: Strangely it wants an @ symbol for the 4th test but doesn't give me that in the row

Default avatar.png richardM72: Unless what the row feeds me changes which each test (which would also break this solution since order matters)

Default avatar.png FBF_Luis: in case the "letter" is not a letter, you should print the question mark

Default avatar.png richardM72: Lol thanks, that is such a dumb rule but thats doable haha

Default avatar.png FBF_Luis: there is an option next to test cases where you can see the inputs and expected outputs :)

Default avatar.png richardM72: Ok I hate to do this but one more question. I'm offsetting based on the ASCII number. Now I need to check each number to make sure it is within the range of usable characters or print ? right?

Default avatar.png FBF_Luis: you're overcomplicating it

Default avatar.png FBF_Luis: you are offsetting by 65, right?

Default avatar.png richardM72: yes, 65 to 90 for all Letters

Default avatar.png FBF_Luis: yeah, but you do int('letter') and you get a value from 0 to 25, correct?

Default avatar.png FBF_Luis: sorry, int(´letter´)-65

Default avatar.png richardM72: Tracking so far

Default avatar.png FBF_Luis: so if you do not get a number between 0 and 25, it means it wasn't a letter

Default avatar.png FBF_Luis: and you should print the ?

Default avatar.png richardM72: Gotcha, thank you for putting up with my insanity

jacek: :tada:

Default avatar.png FBF_Luis: don't worry about that, it's how we improve

Default avatar.png FBF_Luis: I nag other people all the time xD

Default avatar.png richardM72: I might need to take a short break, been on this site for awhile lol

Default avatar.png FBF_Luis: probably, take a break and get back in a while

Default avatar.png FBF_Luis: and good luck for the puzzle :)

Default avatar.png richardM72: lol ty

Default avatar.png DJZombieStopwatch_6dec: Could use some help with Sum of Spiral's Diagonals. I have passed all but one of the test cases, which is the fourth one. Has anyone here completed the program in Java?

TheBlueBias: :hotsprings:

jacek: is it timeout?

Arridian: So, If I have an array of objects, and every object has a variable in it? How can I find the object with the most of that variable?

Arridian: In the array

Arridian: Probably can be phrased better, lol

struct: javascript?

Arridian: Python, but if you have a way in JS I coudl probably figure out how to do it in python

Arridian: The only way I can think about is using a for loop, and just going through

Arridian: And being like "if bigger than biggest, make biggest"

TheBlueBias: I guess that if your object has a < comparator, you can just use max() on the array, or something;

struct: https://stackoverflow.com/questions/13067615/getting-the-max-value-of-attributes-from-a-list-of-objects

Arridian: okay, ty

struct: The answers are kinda old though

Arridian: How would I apply that in my case? With objects and classes?

struct: maybe this answer?

struct: https://stackoverflow.com/a/59110176

Arridian: Oh, awesome, thanks.

Arridian: That looks perfect

Arridian: Oh, that just returns whatever one of their sizes is biggest.

Arridian: I need to find the actual object so I can use it later

Arridian: I can use a for loop I guess to to use that then.

struct: I would go with the for loop yeah

Arridian: Yeah, that worked.

Arridian: Still didn't beat wood 2 boss, :) but it worked, lol

struct: which game?

Arridian: Oh, ghost in the cell.

Arridian: My bot only makes one turn a move anyway, so that is why he beat me

Arridian: I haven't coded the multi move yet.

Arridian: Honestly, I'm not sure how to program multiple moves in one turn.

struct: on first league its only 1 move per turn

struct: I think

Arridian: It says I can do multiple now.

struct: ah

Arridian: Would it work if I did print without new line?

struct: MOVE from to ammount; MOVE from to ammount;

struct: I think it needs to be like that

Arridian: I know, i'm not sure how to code that in python tho

struct: so if you have multiple actions in a list

struct: you can then do

struct: join(";")

Arridian: Oh, Okay

Arridian: Thanks!

Arridian: Could someone look at my code for the factory game, it is working find up till the end, because when it beats the enemy it breaks, and says list index out of range.

Arridian: I can't figure out why

Uljahn: you can use debug print

RoboStac: that usually means you aren't handling the enemy having 0 factories and waiting for the final units to fight

Arridian: Okay, thanks robo stac!

Arridian: That helped a lot

Arridian: It still happens sometime. For some reason. But it happens less now? idk why

Arridian: It only happens like 1 every ten times

Arridian: before it was every time

Arridian: Fixed!

Arridian: Okay, now it works great, thanks guys!

Uljahn: :tada:

Arridian: The boss still beats me, lol

Arridian: But at least no bugs

Default avatar.png XxShruthikxX: lol

Default avatar.png fnflover123: hi could someone look at my code

Default avatar.png fnflover123: plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

Default avatar.png fnflover123: :sob:

struct: anyone here doing icpc challenge?

struct: I have a question regarding the statement

Wontonimo: fnflover123, what code? I just logged in. If you are still around ping me

TechnoBot: bruh

Wontonimo: double bruh

Wontonimo: oh, sorry: "ɥnɹq"

Wontonimo: hey struct, have you tried https://www.codingame.com/training/medium/escaping-the-cat

struct: nope

struct: hi

Wontonimo: hey hey

Wontonimo: are you doing the icpc challenge?

struct: not yet

struct: i was reading the statement

Wontonimo: is that the satellite problem?

struct: ye

Wontonimo: does it seem interesting to you?

struct: not my style

struct: But I might give it a try

struct: euler seems to be 12th

TechnoBot: bruh

TechnoBot: #double

Wontonimo: (╯°□°)╯︵ ɥnɹq

Arridian: I was in a clash and I had no clue what it was or how to do it, it was a reverse but it just made no sense. The tests were just random numbers.

Arridian: It was like 130 = 9 131 = 10 2424212 = 142

Wontonimo: first digit * 2^0 + second digit * 2^1 + third digit * 2^2 +

Wontonimo: etc

Wontonimo: nope, that's not it

struct: Wontonimo did you read the icpc challenge statement?

Wontonimo: nope

struct: I cant understand one part

struct: "Nodes also have their internal structure. As shown below, some edges inside a node cannot communicate with each other because these edges (constrained edge pair) are not fully connected. For example, edge 5 and edge 7 inside node 2 cannot communicate with each other, and therefore flows cannot pass through node 2 by traversing the two unconnected edges."

struct: https://espresso.codeforces.com/454bec55b222afb86814623cc1e85f23247361d0.png

Wontonimo: it means that node 2 isn't a "real" node, but just a physical thing. In that physical thing it connects 5 and 6, and connects 5 and 11. and connect 11 and 7

Wontonimo: but does not connect 6 to 11 or 7

Wontonimo: and does not connect 7 to 5 or 6

Wontonimo: etc

Wontonimo: so, i'd represent 2 as a physical device, and then inside create 'connections' of 5-6 , 5-11, 7-11

Wontonimo: and the fact that 5 and 7 both connect to 11 does not allow them to talk to eachother

Wontonimo: i think

struct: I see

struct: tyvm

Wontonimo: np

struct: i was reading inputs now

struct: and it makes sensse

struct: The next ConstrainedCount lines contain information about the edge pairs that are not connected in the specified nodes of the network. All other edges are connected to each other by default. Each line contains three integers: NodeID, EdgeID1, and EdgeID2.

struct: exactly what you described :)

struct: 2 5 7 2 6 7 2 6 11

Wontonimo: :)

TechnoBot: bruh

TechnoBot: #Bruhx5

TechnoBot: :smiling_imp:

TechnoBot: /me

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

mgt2k7788: haloo everyone

mgt2k7788: solo leagues of legend???

MASTER123: 3:)

MASTER123: :imp:

Arridian: I just found out the hard way that you can only use one side of a dictionary in python

Arridian: rip my 25 letter long dictionary

Arridian: Is there a way to grab from the other side?

Wontonimo: you can use the other side

Wontonimo: what were you trying to do?

Arridian: Convert letters to their corresponding word

Arridian: aka, A=0 B=1, so on

Arridian: I made a whole program already, lol

Wontonimo: >>> a = {'b':7, 'c':8} >>> list(a.values()) [7, 8]

Arridian: Thats not what I meant.

Arridian: I wanted to find "b" if I know "8"

Wontonimo: >>> z = dict([ (v,k) for k,v in a.items() ]) >>> z {7: 'b', 8: 'c'}

Arridian: okay, ty

Wontonimo: make a reverse dict like that

Arridian: Okay, that works

Arridian: My code was just broken anyway, I didn't understand the prompt.

Wontonimo: it only works if the values were unique in the original dict

NamKL: lo cc

NamKL: lo cais cc nha chung may

Arridian: I am so bad at clashes, lol, half the prompts don't make any sense to me.

NamKL: fuck you

Wontonimo: ban please

NamKL: you so stupid

Wontonimo: struct SeebOmega ?

NamKL: ??

NamKL: f u c k

struct: done

Westicles: wont, you should ask to be a mod

Wontonimo: tanks

Westicles: need someone in NA

Westicles: er, if you would like that, of course

Wontonimo: cool

Wontonimo: as long as there isn't a quota of hours or something

struct: lol

Wontonimo: did you give up on escaping the cat Westicles, or just lost interest for a bit?

Wontonimo: a community success rate of 21% is kinda brutal for "medium"

Westicles: as Blaise so eloquently said, the worst they can do is say "You don't deserve to work for us voluntarily anymore!"

Wontonimo: haha!

Arridian: Who is Blaise?

Westicles: I having tried it yet... saving it for a rainy day

Wontonimo: yeah, i hear that

Wontonimo: Blaise is someone who has been on CG for a long time and is good at multis

Arridian: Oh, cool.

Wontonimo: he is also on the FR channels

Westicles: well, technically was on CG...

Wontonimo: ah

struct: being a mod with so few commands is painful

Westicles: can you really not unban, or is that just said so people leave you alone?

struct: I cant

Wontonimo: wow

Wontonimo: that is painful

Wontonimo: that makes ban pretty bad

struct: yeap

miszu: what are the expectations to be a mod?

struct: https://www.codingame.com/playgrounds/40701/help-center/moderation

Wontonimo: i forgot everyone can report people

Wontonimo: oh, and some people can "impersonate" another user. hmm... that sounds sus

struct: i dont have that option

**TechnoBot slaps Wontonimo around a bit with a large fishbot

TechnoBot: /me

Wontonimo: what are you working on these days TechnoBot ?

Default avatar.png ChickenCoder123: hey guys what challenges do you recommend me doing

Wontonimo: are you open to something not involving chickens?

Default avatar.png ChickenCoder123: maybe

Wontonimo: i see you tried the pod racing game. Did you want something else, or more help with that?

Default avatar.png ChickenCoder123: yea i was kinda frustrated wit that

Wontonimo: like maybe something like connect 4, or a space battle

Wontonimo: what was frustrating?

Default avatar.png ChickenCoder123: i tried connect four for a while but failed miserably

Wontonimo: ah

Wontonimo: what was it about the pod racing that frustrated you?

Default avatar.png ChickenCoder123: i didnt really know what logic i should use

Wontonimo: what did you try?

Default avatar.png ChickenCoder123: i had no idea what to try

Wontonimo: oh, you got to bronze. that's pretty good

Default avatar.png ChickenCoder123: in which one

Wontonimo: in the pod racing game

Default avatar.png ChickenCoder123: youve done it as well right>

Default avatar.png ChickenCoder123: ?


Wontonimo: yeah, i've done the pod racing game

Default avatar.png ChickenCoder123: whr did you get

Wontonimo: i'm in legend

Default avatar.png ChickenCoder123: ...

Default avatar.png ChickenCoder123: damn

Default avatar.png ChickenCoder123: training bots to play games isnt really my thing

Wontonimo: oh. how about a puzzle then? have you tried any of the easy puzzles?

Wontonimo: (easy puzzle here are kinda hard)

Default avatar.png ChickenCoder123: like which one

Wontonimo: i made one :D

Default avatar.png ChickenCoder123: oooh

Default avatar.png ChickenCoder123: lemme try

Wontonimo: https://www.codingame.com/training/easy/fax-machine

Default avatar.png ChickenCoder123: it doesnt seem to hard

Wontonimo: yeah, I got some similar feedback elsewhere :rolling_eyes:

Westicles: There is a list of all puzzles. You can sort by success ratio to judge difficulty

Westicles: https://chadok.info/codingame/puzzles_list.html

Default avatar.png ChickenCoder123: oh thanks

Wontonimo: today i learnt a new link

Wontonimo: thanks Westicles

Default avatar.png RC0D3: hi

Wontonimo: :wave:

Default avatar.png ChickenCoder123: btw wontomino, if u use \n, is it the same as using another print

Default avatar.png ChickenCoder123: for example, is using print("hello \n poop") the same as print("hello), print("poop")

Wontonimo: yes

Default avatar.png ChickenCoder123: god i finally finished

Default avatar.png ChickenCoder123: i made it way more complicated than it had to be lmao

eulerscheZahl: "(easy puzzle here are kinda hard)" that's new to me. I always had the opposite impression: a hard puzzle here would be considered medium on codeforces or hackerrank