From CG community
Jump to navigation Jump to search

Default avatar.png Raghu0214:

WINWINWIN: Any reason why the .�� diamond symbol is printed to stderr?

Default avatar.png Raghu0214: i have no idea

Default avatar.png BigBadOctopus_af5d: I have 2 problems about programing.Can someone help me?

Default avatar.png Raghu0214: what

Default avatar.png Raghu0214: can anyone allow me send messages in disord

Default avatar.png Raghu0214:

Default avatar.png Raghu0214: anyone can jion

Default avatar.png Raghu0214: i mean join

Default avatar.png manan_ali23: ok

Default avatar.png Raghu0214: then great

manan_ali23: I need team of 3 members to participate in it

Default avatar.png Raghu0214: i have none

Default avatar.png Raghu0214: what is harshad

Default avatar.png Raghu0214: help

manan_ali23: where you from ?

Default avatar.png Raghu0214: india

manan_ali23: Have u completed your graduation

Default avatar.png Raghu0214: no

Default avatar.png Raghu0214: i am 13

manan_ali23: 23

manan_ali23: are u a developer?

Default avatar.png Raghu0214: no

manan_ali23: You like programming then?

Default avatar.png Raghu0214: yes

manan_ali23: I have some programming problems for you

manan_ali23: Can you solve them?

Default avatar.png Raghu0214: yes

Default avatar.png Raghu0214: in C++

manan_ali23: yes

manan_ali23: But its a multinational interview question

manan_ali23: Your gmail??

DieuMQ: hello

manan_ali23: hello

Default avatar.png Raghu0214: no need

Default avatar.png imbadpython: they fixed clash of code :O

Default avatar.png imbadpython: it shows pending and submission results now! :D

Default avatar.png imbadpython: i think for shortest code it should hide the code size

Default avatar.png imbadpython: cuz then it fforces people to do as well as they can

Default avatar.png imbadpython: but

Default avatar.png imbadpython: n i cc e

Default avatar.png imbadpython: nice

demen: Ye

Default avatar.png rak1507: I disagree, it's nice to know what you're competing with in shortest

Default avatar.png rak1507: And it's funny to see people submit with like, 500

Default avatar.png Raghu0214: Hi

Default avatar.png Raghu0214: i am back

Default avatar.png imbadpython: ye like show it when you submit

Default avatar.png imbadpython: but like

Default avatar.png imbadpython: not in the round

Default avatar.png imbadpython: idk

Default avatar.png Raghu0214: what

Default avatar.png imbadpython: so like in the game rn you can still see

Default avatar.png rak1507: yeah I can see you got 180

Default avatar.png imbadpython: someone submitted and got a 100% 180char let's say

Default avatar.png imbadpython: ye

Default avatar.png imbadpython: you shouldn't be able to see that

Default avatar.png imbadpython: you should only see someone submitted and (perhaps) the score as well but not the char count

Default avatar.png imbadpython: so you try to optimise it as much as you can

Default avatar.png imbadpython: and not just "optimise till 179"

Default avatar.png imbadpython: yk

Default avatar.png rak1507: I fail 4 but pass the rest

Default avatar.png rak1507: damn

Default avatar.png rak1507: how does Do have a higher average than i

Default avatar.png rak1507: i is 105, Do is 89.5

LelouchVC2: i = 105. 105/1 = 105

LelouchVC2: D = 68. o = 111. 68+111 =

LelouchVC2: 179. 179/2 = 89.5

Default avatar.png imbadpython: ruby gay anyways

Default avatar.png rak1507: ruby is best golf lang

LelouchVC2: maybe you meant 'd' ?

LelouchVC2: do average is 105.5

Default avatar.png rak1507: making it lower case failed other cases

Default avatar.png rak1507: idk

LelouchVC2: Some CoC are broken

Default avatar.png Zerp: is there a way to view distance between factories in gitc?

Uljahn: they are given in inputs i guess

WINWINWIN: For distance between any 2 factories, google Floyd Warshall algorithm

Default avatar.png EvgenieTivaniuk: I am now trying "Test befiore validate". All testcases are successful, but on "submit" I fail a hidden case. I guess I'm missing something, but can't guest what. Is there way to check hidden testcases somehow? I can't fix if I don't know where the error is.

Default avatar.png Zerp: i just finished implementing it

Default avatar.png Zerp: but i'm trying to compare my output matrices with the actual distances

Uljahn: read the discussion page for the puzzle, EvgenieTivaniuk

Default avatar.png EvgenieTivaniuk: @Uljahn Can I access it before I solve it 100%? I didn't find the link.

Uljahn: EvgenieTivaniuk: which puzzle are you on?

Default avatar.png Zerp: this is supposed to send troops to the nearest non-ally factory, i don't think it's using the optimal paths

Default avatar.png Zerp:

Default avatar.png EvgenieTivaniuk: Test before validate:!

Uljahn: EvgenieTivaniuk: i'll help you in pm, pls answer there

Default avatar.png EvgenieTivaniuk: Thank you!

Uljahn: yw

jrke: anybody on kaggle is present here now

jrke: i wanna know how to know the no. halite present on any cell

Default avatar.png DongZhuo: Damn this is amazing

Default avatar.png AggYz: guys is w3schools good for py or is it shite llike it is for everything else

MPSI_LIV_CronierDamiano: hi guys, do anyone code in ocaml here ?

Default avatar.png MPSI_LIV_AnthoandLoulou: me

MPSI_LIV_CronierDamiano: fuck u

Default avatar.png MPSI_LIV_AnthoandLoulou: do you want some help

dbdr: jacek: you found a way to make both of us go down? :D

jacek: i win to you and start losing to fox

dbdr: so was it fox or trictrac who paid you? ;)

IamthatIam: hello world

IamthatIam: I am new to this site

Hjax: hello

IamthatIam: @Hjax how are you?

Hjax: pretty good

struct: hi

Hjax: hi struct

Undaare: Is there a reason, why to not share your code when you are in 1st place of the Clash of Code? I play this game, to learn from others. If the code is not shared, this game is useles for me.

Hjax: maybe you arent proud of your code

Hjax: or you have secrets

Astrobytes: Some people may still wish to remain competitive

Default avatar.png tanmaycodernovice: @Aisenma hey bro

Aisenma: yo ?

Default avatar.png tanmaycodernovice: nvm solved it

Aisenma: :)

LeBaoHoang8A4: Whut?

pardouin: 95% of top 1 share their solution

pardouin: so it's no big deal if a few hide it

Uljahn: btw what esoteric techniques do you learn in clashes? :smirk:

pardouin: most of the time it's useless golf but sometimes there are nice regex solutions for example

Hjax: ever know you are tired and that theres something wrong with your code

Hjax: and you literally cant figure it out

Hjax: thats me right now

Hjax: its got to be so obvious, but my brain just cant

Astrobytes: Take a break

Hjax: its 10 am

Uljahn: just turn 360 and go away

Astrobytes: Go have some coffee, take a walk

Hjax: i wonder if i just dont understand how java handles bitwise operations

Astrobytes: It's a bit different to C/C++ iirc

Hjax: basically i have (a & b = a) when (a & b = b) is expected, but if i do the same math and print the result out on a separate line, i get (a & b = b)

WINWINWIN: When you print an array in C++, is it given like in python with the square brackets etc.?

WINWINWIN: like cout << arr << endl

WINWINWIN: ['elem1', 'elem2']

Hjax: dont think you can do that WINWINWIN

Astrobytes: No, you'll get a memory address

WINWINWIN: Not trying to print like that, trying to understand the debug prints from Othello

WINWINWIN: Fixed the minimax and ported over to C++ now it wont store the board properly -_-

Astrobytes: In what way?

WINWINWIN: I have a char board[8][8];

WINWINWIN: cerr << board[7 - i] << endl;

WINWINWIN: ........................

WINWINWIN: that is a set of 24 dots, dont get why 24?

Hjax: lmao i found it, i << i instead of 1 << i

Astrobytes: lol

Astrobytes: what are you trying to print exactly WINWINWIN

WINWINWIN: the board...

Astrobytes: duh

Astrobytes: The whole board?

WINWINWIN: I want to see the state and understand it

Hjax: oh it seems like two people in chat are struggling to print an othello board


Hjax: thats what my bitmath does too

WINWINWIN: I'm trying to get the board in inputs but for whatever reason its not working

WINWINWIN: so error prints give this, can't get why

struct: why 7 - i?

Astrobytes: yeah

WINWINWIN: I used the top left corner as (0, 0)


struct: does arr[0] even print the entire array in that row?

Astrobytes: woops I gave you the 1D version


WINWINWIN: Any idea why the 24 dots?

Astrobytes: Why aren't you just doing a double for loop to loop over the array?

RoboStac: c style arrays are just passed as pointers with no size information, so printing one to debug prints it as a c style string (keep printing until a null terminator)

WINWINWIN: It is a double loop

RoboStac: the easiest thing to do is print every cell individually

wlesavo: # To debug: print("Debug messages...", file=sys.stderr, flush=True) :scream: :scream:

Astrobytes: yeah they posted in the forum that they updated the python stub

wlesavo: gj

jrke: hey anybody on kaggle here


Astrobytes: thibpat has a discord channel for Halite 4 if you're doing it jrke

jrke: Oh thanks

Alshock: just a random question: If a floyd warshall is slower than N² floodfills, somethings really wrong with it, right?

Default avatar.png Scrimmy: hi, is there a way to toggle line comment on multiple lines?

Uljahn: yes

Uljahn: ctrl+/

Uljahn: Alshock: no why?

Uljahn: floodfill is one-to-many and F-W is many-to-many i guess

Uljahn: many==all

Default avatar.png Scrimmy: Uljan: ty

Scarfield: Floyd Warshall is O(n3) Alshock

Alshock: and N² floodfills should be O(n⁴), no?

Alshock: I think there was something wrong with my stuff, but I'll go the easy way and simply check it out later this week

Scarfield: floodfill is n2, if you do it from every cell, it will be n3, which i suppose Floyd Warshall is, havent used it, but it has been mentioned here before

Alshock: Oh that's because N here is the number of cells, not the width of the grid, right?

struct: yes

struct: N = number of cells

Scarfield: yup, n = width * height

Default avatar.png tanmaycodernovice: @elmarcho please share ur code dude

Default avatar.png imbadpython: hello

Default avatar.png imbadpython: floyd warshall is v^3

Default avatar.png imbadpython: are you guys talking about rgid

Default avatar.png imbadpython: and flood fill why you doing n^2 of them

Default avatar.png imbadpython: floodfill is n^2

Default avatar.png imbadpython: or |V| i guess

Default avatar.png elmarcho: @tanmaycodernovice just a few nasty tricks I saw from someone else

Default avatar.png imbadpython: still share it

Default avatar.png imbadpython: its common sense to share code in CoC right

Default avatar.png elmarcho: already dine done

Default avatar.png elmarcho: already done

Alshock: @imbadpython nope

Default avatar.png imbadpython: why

Default avatar.png imbadpython: wait nope for what

Alshock: Just let people do whatever they want to

Default avatar.png imbadpython: bruh okay

Alshock: it's a competition system, not a teaching one

Default avatar.png imbadpython: its fine i get number one anyways smh

Default avatar.png imbadpython: jk

**Hiro776 hello

**remi6 hello

**QossMean Hello

**QossMean hello

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

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

Default avatar.png Zerp: anyone know how you remove an element from an array knowing it's index in c#?

QossMean: RemoveAt

Default avatar.png gigicoco: :beers:

Hjax: Astrobytes you here?

Default avatar.png Zerp: i think that only works on lists

QossMean: But you can use ToList and ToArray

QossMean: To easily convert

Default avatar.png Zerp: ah okay

Astrobytes: Hjax wassup

Default avatar.png Zerp: shouldn't arr = arr.ToList().RemoveAt(index).ToArray() work?

QossMean: Yes, it should

Default avatar.png Zerp: it's complaining about the last dot

Default avatar.png Zerp: Operator '.' cannot be applied to operand of type 'void'csharp(CS0023)

QossMean: Oh yeah

Default avatar.png Zerp: aka the "dot" before ToArray()

QossMean: RemoveAt doesn't return the list

QossMean: It just applies the remove to it

QossMean: So you need to do it in two steps

pardouin: it's funny when the 2nd submited before you and didn't share his code and you share a code with half his number of chars XD

Default avatar.png Zerp: factoryArr.ToList().RemoveAt(minFactory);


QossMean: var l =factoryArr.ToList();

Default avatar.png Zerp: ?

Uljahn: can you see sharp, Automaton2000?

Automaton2000: if you keep track of how much you can do a bit more

Default avatar.png imbadpython: has anyone done Bulls and Cows 2 here

Default avatar.png imbadpython: and can give me a hint?

Default avatar.png imbadpython: it's so hard

Hjax: Astrobytes can i pm you about some othello stuff

Astrobytes: Go for it Hjax

Default avatar.png imbadpython: @dbdr you here

dbdr: yes

Default avatar.png imbadpython: can you give me any hint on bulls and cows 2

Default avatar.png imbadpython: the one where you guess the secret number

dbdr: did you do the puzzle?

Default avatar.png imbadpython: wait oh

Default avatar.png imbadpython: the 4 digit one?

Default avatar.png imbadpython: I haven't but i can solve it

Default avatar.png imbadpython: my current code currently gets 45% it's bruteforce and can solve up to 5 digit

Default avatar.png imbadpython: actually sorry i realise the puzzle is different, ill think about it first. sorry for bothering you

dbdr: have fun :)

Default avatar.png imbadpython: is there a smarter way other than bruteforce

dbdr: the puzzle is a bit out of my head at the moment

dbdr: what do you call bruteforce in this case?

Default avatar.png imbadpython: emm first generate the (10k?) possible 4 digits

Default avatar.png imbadpython: then eliminate the possible ones for each guess

Default avatar.png imbadpython: impossible

Default avatar.png imbadpython: *

wlesavo: that is the way, but you need to optimise it quite a bit to solve 10 digits

wlesavo: i think brute force with python for 10 digits is impossible

Default avatar.png imbadpython: yes

Default avatar.png imbadpython: definitely

wlesavo: i managed to solve only 7, further just some simple greedy algo

wlesavo: i.e. take a guess, mutate some digits to get another valid number if there are more bulls than in previous guess keep it

hanzhere: :heart_eyes:

Default avatar.png imbadpython: wdym for "i managed to solve only 7"

Default avatar.png somethingjustlikethis: help me

wlesavo: to brtuforce up to 7 digits

Default avatar.png imbadpython: :O

struct: Should i use fen notation if i ever port it?

Astrobytes: Works for me. Use Shredder FEN for 960.

Astrobytes: Or whatever works for everyone

Astrobytes: Wait, struct, do you mean as input?

struct: yes

Astrobytes: Oh I thought you meant as debug output or something. No I think just square notation will do

Default avatar.png Zerp: holy shit, i just spent an entire looking for a bug that caused a function to now work, just realized i never called it

Default avatar.png Zerp: not work*

Astrobytes: Or algebraic struct - I donno. Open to discussion I think. Regular square notation would be simplest but some folks might prefer algebraic

Astrobytes: lol Zerp, did the same just yesterday

Default avatar.png Zerp: i hate myself ._.

Astrobytes: meh, it happens

jacek: hmm puzzle of the week

jacek: i see familiar nick on top 2

struct: I wonder who it might be

jacek: so hot ~

dobroleks94: Hello everyone!

jrke: hello

jacek: ohai

bohuss: ){

trictrac: gg jacek on othello !!

Astrobytes: oh wow, I didn't see that!

Astrobytes: very gg indeed

jacek: you cant see that hight?

Astrobytes: Ha. Ha. :P

Astrobytes: Very impressive. Lucky submit or solid change?

jacek: we may never know

trictrac: we have all a new target

jacek: now lets see trick's response

jacek: its like unlocking new level

Astrobytes: :D

trictrac: nothing ready no danger

Astrobytes: Give trictrac an hour or 2 at least jacek ;)

Hjax: there goes my theory that tric always has a better bot waiting

codeing: hi.

codeing: i want to write trim() algorithmic.

codeing: but i find a little problem.

code_maniac: What's the problem ?

codeing: String test = " toto "; test.trim(E e)

codeing: test.trim(" ") return "toto"

codeing: we delete space before and after

dobroleks94: function trim() doesn`t take any argument, does it?

codeing: yes. but how you write it ?

dobroleks94: do you want to write your own trim function?

dobroleks94: try to use RegEx

dobroleks94: (\\s+)(.*)(\\s) - something like this

dobroleks94: and return second group

dobroleks94: i.g (.*)

dobroleks94: *ie

dobroleks94: ))

dobroleks94: this one is suitable:

dobroleks94: (\s+)([A-Za-z0-9].*[A-Za-z0-9])(\s+)

AntiSquid: ah regex black magic

AntiSquid: alright, going to the shop to buy myself something nice, any suggestions?

AntiSquid: Automaton2000 ?

Automaton2000: does anyone else have this problem?

code_maniac: You need to use anchors as well

code_maniac: ^(\s+)([A-Za-z0-9].*[A-Za-z0-9])(\s+)$

jacek: you give the guy how cant trim the solution of regex?

jacek: now he has 2 problems!

Voidsway: I would just use replace...

wlesavo: how many rollouts considered to be ok in oware for raw mcts?

Astrobytes: Donno. Wouldn't advise it though

wlesavo: too late, already implemented

Astrobytes: Switch to EPT variant and work on eval

wlesavo: well its not exactly raw, i have e-greedy rollouts

Astrobytes: oh ok

Astrobytes: How many are you getting?

wlesavo: only around 1k for turn 2

Astrobytes: You can definitely do better than that. Depth?

struct: I have beaten the french

wlesavo: i stop around round 50 from the current time

wlesavo: yeah, thats probably it

wlesavo: and also im not hashing anything

struct: Whats EPT?

Astrobytes: early playout termination

Astrobytes: High depth doesn't work well in Oware wlesavo

wlesavo: hm, ok, thx

Astrobytes: "I have beaten the french " struct, clashing again?

struct: it was just 1 clash :(

Astrobytes: Hey I'm not judging

Astrobytes: How's Project X coming along?

struct: taking a bit of time

Astrobytes: Still in JS module hell?

struct: yea

Snef: anyone know the memory limit ? i thought it was 750 MB Has it changed ?

struct: Dont think so why?

Snef: i just tried to allocate 2GB of node and it works

struct: yeah, but try storing stuff on them

Astrobytes: ^

Snef: on all of them ?

Snef: just tried to change one value on the 65500001 th and it didn't timeout

tim-kt: hey

struct: did you try reading it aswell?

Default avatar.png Zerp: this is weird, in gitc i tried implementing a method account for troops being sent to factory, but it seems to make the bot worse :d

Snef: struct yes

Default avatar.png Zerp: not sure if its a bad idea in general or just bad implementation

struct: I can't remember but I asked the same question when I did uttt

struct: And someone told me to try something that instantly broke the bot

Default avatar.png Zerp: do you play gitc too?

struct: No, I was talking about node allocation on UTTT

Default avatar.png Zerp: oh mb

Snef: i did that maybe it's not enough to break my bot struct


SituatedDust: Hey, im trying to learn python, which wouldnt seem so hard but i am running into a problem with the defibrilators easy puzzle, does someone feel like helping out?

struct: I have solved it, but not on python

struct: can still see the code though

struct: or answer any doubt

SituatedDust: how do i send this pastebin kind of message

struct: just paste the code


SituatedDust: ah okii

SituatedDust: it passes the first 2 cases but then gets the wrong one to be closest, i'm really not sure where i went wrong here

struct: checking

struct: give me a sec

SituatedDust: sure :)

SituatedDust: also my apologies for using defib and Defib, i didnt mean for anybody to read this code:grimacing:

SoLiDwAtEr: Do you guys find yourself actually getting better over time with these puzzles? or not really?

struct: I have the same formula and it gives me different number :/

Uljahn: with puzzles and contests, and multi - yes

struct: :thinking:

SituatedDust: @struct thats interesting...

SoLiDwAtEr: okay i'll continue with them then, thanks.

Iboss15: hi

Uljahn: SituatedDust: where is to radians conversion?

SituatedDust: ah... i should convert lat and long to radians still.... yh ofcourse

SituatedDust: yh it works now, thanks

Uljahn: :thumbsup:

Default avatar.png Rackel: hey everyone!

LelouchVC2: I hate formula coding puzzles

freeman42x: hey everyone

Kshh: hey

Default avatar.png Irene_iylr: anyone playing checkers here?

TheSpiffiest: Yep for checkers

TheSpiffiest: Just started. It finds simple moves and picks ones at random. Ranked about 40ish in wood league

TheSpiffiest: I just realized I always assume I'm the black ones so that explains a lot. :)

Default avatar.png Irene_iylr: I assumed m the red one..but I was wrong

TheSpiffiest: first line of input is your color

Default avatar.png Irene_iylr: yes

TheSpiffiest: huh, now that I'm debugging it I get "w" as the color, not r/b like I expected

Default avatar.png Irene_iylr: I started with codingame just about yesterday did some easy ones and today I'm feeling m dumb

TheSpiffiest: Ha, same. I'm on day 3 I think

Default avatar.png Irene_iylr: can check out the forum its mentioned there ..maybe its a bug or something

TheSpiffiest: I've got the basic moves, then basic offense, next is detecting when you're vulnerable, and after picking the best move

TheSpiffiest: the rule that you have to jump if you are able can be used to set traps

WINWINWIN: I guess that w means you are the one to move first

twitlydoof: mangekyou sharingan

TheSpiffiest: yep, and the direction changes. My logic is all built around trying to get to row 7.

TheSpiffiest: Kinda fails when you start in row 5 :)

twitlydoof: shortmode is a horrible idea