Chat:World/2022-03-06
eulerscheZahl: atcoder optim contest started https://atcoder.jp/contests/asprocon8
eulerscheZahl: after reading the task: i have to read it a few more times just to understand it
HarryYo: If it would have been confidential I would have asked help from my dad. Right now he is out of city and out of my reach too
HarryYo: Otherwise would have asked him for sure
5DN1L: I think we can't help you here.
HarryYo: ok thnks np
icecream17: with trolls vs castles, I wonder if there's a better ranking system
Justin_Lowry: that moment when you realize that u can only code lua well if its roblox api
NeelD31: is python golfer allowed or considered cheating?
Justin_Lowry: like for least lines id assume cheating
ycsvenom: the shortest mode is counting characters not bytes so not cheat and the goal is to make the code as short as possible
Justin_Lowry: i just spent 11 minutes working something out and then realized i can do a 3 line answer
Justin_Lowry: ayeee new fastest time for a solve
struct: eulerscheZahl are you up just for at coder?
paatt: scanf("%[^\n]" what does it mean anyone?
struct: scan everything until \n
struct: \n = new line
VizGhar: can i see the task without registering?
eulerscheZahl: https://cdn.discordapp.com/attachments/903337608606789755/949914965014364240/A_-_Automated_Painting_Line.pdf
VizGhar: :thumbsup:
VizGhar: huge memory limit for 2second task :)
eulerscheZahl: i'll wait a few days until topcoder starts
jacek: :upside_down:
VizGhar: I'd like to see next contest poster already :)
VizGhar: (art)
VizGhar: do we already know something about the contest already?
martinpapa69: it will be an ai contest
VizGhar: sounds good... I believe we know nothing more? :)
martinpapa69: nah, thats all I've heard
VizGhar: I can accept any format except the escape
Jerrasterix: any good sites for practising competitive coding ?? other than codeforces and leetcode
Thorcode: dunno i'm learning leetcode and codeforces
Hackkkkkkkkkkkkkkkkkkkk: hey guys what is the diference of normal list and enumerate list?
Hackkkkkkkkkkkkkkkkkkkk: i don't know why pp use enumerate?
Hackkkkkkkkkkkkkkkkkkkk: and for some puzzle here the enum can solve the puzzle but the normal list isn't
Ayza: If you mean in for loops
Ayza: enumerate gives you the value and the index
Hackkkkkkkkkkkkkkkkkkkk: yep I know
Hackkkkkkkkkkkkkkkkkkkk: what is the difference?
Ayza: depending on the puzzle the index might be an important part
Ayza: so that's why using enumerate wins over using a normal loop
Aimee.S: is leetcode for python3 programmers too?
Thorcode: yep
Thorcode: it for a lot of language programmers
Mortis_666: Nice https://imgur.com/a/DaX1l2b
eulerscheZahl: have fun Jerrasterix https://clist.by/resources/
abt8601: Wait, CodinGame's account number is just 44k?
Thorcode: yeah XD
abt8601: Or is it the number of accounts that have participated in a contest?
eulerscheZahl: contest players
eulerscheZahl: CG has less contests. so that number is understandably lower than codeforces with weekly events
eulerscheZahl: that clist site had a lot of statistics, really cool. it's created by "aropan" who's also active on codingame
JFB: eulerscheZahl said: "after reading the task: i have to read it a few more times just to understand it" - so maybe because it was just in kanji ? ;-)
ahozepha: for each input you take the count the number of words which start with the same letter
ahozepha: and you pick the shortest one
eulerscheZahl: they have an english version and also a visualizer to see the sample input+output
ahozepha: and order the word to output that word
eulerscheZahl: but i'd rather save my energy for topcoder
eulerscheZahl: tiny chance of still making it to the finals, but unlikely
ahozepha: is topcoder better than this one and how please?
ahozepha: i'd really like to know why please?
ahozepha: no judjement here, i myselft train though google kickstart and code jam
eulerscheZahl: i don't know the task yet. they have more and less interesting ones
eulerscheZahl: i'm talking about the marathon track. 1 optimization problem and 1 week to solve it
eulerscheZahl: i've played codejam the last 5 or 6 years with mediocre success. it's just completely different from marathons
ahozepha: okay then
ahozepha: i'll definitely try
eulerscheZahl: Illedan just confirmed that he'll play the atcoder one
Illedan: I trusted you
Illedan: But yeah
Illedan: xD
Jerrasterix: Thanks eulerscheZahl for the link :smile:
JFB: So no one will participate in https://www.gocoder.one/dashboard (bomberland)? Final is April 3th
JFB: My poor bot is 3th. And bot from 1st position probably will not improve :-(
struct: how long ago did it started?
eulerscheZahl: looked into it a bit. but when i want to code in c#, there's a lot to do just to get started
eulerscheZahl: and matches only once per week, so you can barely test anything
JFB: In December. But it is not many paricipants
nitekat: There's no any participants in the latest clash event, after 5 minutes since that clash should start. So I came in, wait for the 2 minutes count down, more people came in, then the clash start, and ..... 8 minutes later the clash is over :laughing: wth
eulerscheZahl: game itself seems ok, but those 2 points turn me off
JFB: eulerscheZahl - yes
eulerscheZahl: do you know what you won in the mid-terms already?
JFB: But it is starter kit in Python, Go and C++
JFB: I do not asked :-)
JFB: To be honest any cash from Australia will be bit tax problem for me :-)
JFB: *big tax problem
eulerscheZahl: at least you get the possibility to pay taxes
JFB: Now I have tax problem with payments from topcoder
eulerscheZahl: german customs just shipped my RAIC tshirt+hoodie back to Russia without even asking
JFB: Now any contact with Russia is a big problem, I understand
eulerscheZahl: tbh i have no idea who topcoder taxing works. won $50, received all of it except paypal fees (expected $35 after 30% US taxes)
eulerscheZahl: that RAIC was in January
eulerscheZahl: so do i have to pay taxes in germany?
Hackkkkkkkkkkkkkkkkkkkk: dunno
JFB: I do not know german taxes
struct: 30% paypal fees?
JFB: 30% US tax
struct: ah
eulerscheZahl: your reading comprehension can be improved ;)
eulerscheZahl: is your topcoder payment from the weather prediction or something else?
eulerscheZahl: i got rewarded for spam submitting. no joke
Hackkkkkkkkkkkkkkkkkkkk: can someone tell me why the -3vel is effective in search race and mad pod racing
eulerscheZahl: they drew random winners among submission of the week
JFB: Yes - from weather prediction
Hackkkkkkkkkkkkkkkkkkkk: really
JFB: Hackkkkkkkkkkkkkkkkkkkk - simply speaking - because it is ;-)
JFB: But seriously - it is special case of move general one.
Hackkkkkkkkkkkkkkkkkkkk: gonna change name
JFB: *more general
eulerscheZahl: i'm still on the edge whether or not to try bomberland
eulerscheZahl: looks like an easy top3 but the setup...
eulerscheZahl: i'm in this state for several weeks already
struct: how long will it take me to setup docker for c++?
martinpapa69: docker :dizzy_face:
eulerscheZahl: with the mid-terms stream i first saw the bots in action. replays aren't even public so it was hard to estimate the strength of the competition
eulerscheZahl: JFB was kind enough to create that C++ starter btw
JFB: 1st bot probably will not improve. Author is from Russia and just going abroad from the country so have other problems
struct: I probably wont try it, Im very bad on these types of games
JFB: 1st bot is mainly: pathfinding + avoid places in bomb range + go to the midle of the board as fast as possible
eulerscheZahl: JFB at #3 still dying to own bombs
JFB: Exactly :-)
eulerscheZahl: and randomly placing bombs. or like the guy on the stream called it: "map control"
JFB: Randomly but with weights ;-)
JFB: At least ;-)
eulerscheZahl: they also had someone on their server talking about neural networks. and then mentioned low sim as bottleneck. he uses the game engine via some process communication to simulate future turns
eulerscheZahl: this is so totally beatable if i could find some motivation
JFB: It is 2nd bot
JFB: From Germant by the way
JFB: *Germany
eulerscheZahl: i saw that
eulerscheZahl: but germany is big, i don't know the competitor
jacek: :scream:
JFB: :-) Really? :-)
eulerscheZahl: yes. we are at least 7 people in Germany. probably more
JFB: :-D
jacek: id say there are 10 people in germany
jacek: http://www.quickmeme.com/img/4e/4e08070b1f6b797a2519a49329915dc132b4e6608348452e5d63d66600f22b54.jpg
JFB: :-D
eulerscheZahl: https://www.youtube.com/watch?v=urYCUUgi7VQ
MSmits: hi guys
struct: hi
eulerscheZahl: welcome back
abt8601: hello
MSmits: yeah, havent had time for chat
JFB: hi
MSmits: been busy coding for cg anyways though. I got a working endgame book generator for nine mens morris now
MSmits: https://imgur.com/a/jVG2YRA
MSmits: it's on 8x7, should be at most a few days till it's done, then it becomes easy to solve
eulerscheZahl: that's a lot of bestand
eulerscheZahl: look at that Grootte
MSmits: nothing compared to my oware books
MSmits: lol :)
JFB: :-) When you prepare endgame book generatr for chess ? ;-)
MSmits: nah chess is too hard
MSmits: I could do a few pieces maybe, but dont see much point
eulerscheZahl: jacek your turn
MSmits: what do you mean his turn?
eulerscheZahl: somehow the word "hard" triggers him
MSmits: oh ok
MSmits: did anyone else solve nmm here? I found a DB online somewhere, but the source code was hungarian
MSmits: so i dont know how to index the file and get the results out
eulerscheZahl: i hate it when that happens
**eulerscheZahl codes in English
MSmits: well it was partially english, just all the comments were hungarian and you really need those
**eulerscheZahl comments in English
MSmits: the algorithms to index endgame books are difficult
eulerscheZahl: if /me comments at all
MSmits: yeah everything i do is english except when teaching
MSmits: also sometimes using your own language gets you past reserved keywords
MSmits: lijst = []
eulerscheZahl: right, you code in python now. maybe you want to play bomberland
MSmits: whats that?
eulerscheZahl: bot contest
eulerscheZahl: https://www.gocoder.one/docs/getting-started
eulerscheZahl: finals in 1 month
MSmits: is that like hypersonic?
eulerscheZahl: https://www.gocoder.one/bomberland there's the animation i was looking for
eulerscheZahl: 1 vs 1. but each player controls 3 units
MSmits: oh I see
MSmits: kinda like hypersonic
jacek: oh, i missed the hard part :(
MSmits: are you playing that?
MSmits: jacek how come, was it not working for a while? Should visit a doctor
eulerscheZahl: no. i have some objections to the website
eulerscheZahl: eulerscheZahl 03:33PM i'm still on the edge whether or not to try bomberland looks like an easy top3 but the setup... i'm in this state for several weeks already
jacek: also, have you seen https://48stones.com/challenge/ some oware like challenge
eulerscheZahl: is this the same oware as on CG or different variation?
MSmits: if it is the same, i can draw it probably
jacek: i think yes. maybe except few endgames edge cases
jacek: as i understand you compete against their database mostly
eulerscheZahl: using a website to manually play moves that your bot prints
eulerscheZahl: and they do the same with their database bot
MSmits: so I run my oware meta mcts and play the moves? Seems easy
eulerscheZahl: yes. you are the interface
jacek: playok aka kurnik.pl which hosts many games mostly card games online
jacek: and paper soccer
MSmits: I think my offline db is actually perfect for this as it does not use the endturn 200 from CG
eulerscheZahl: get them stuck in an infinite loop. and then win by clicking on the website faster than they do. so they lose by timeout
MSmits: haha, no, on loop the game ends afaik
MSmits: loops are not easy to get early game though
eulerscheZahl: does the website know this?
MSmits: yeah
MSmits: they equally distribute seeds on loop
MSmits: so basically net score added = 0
jacek: i think there is something on their rules
eulerscheZahl: but does kurnik.pl have a loop detection?
MSmits: it just records gamestates i guess
MSmits: if a repeat happens, it's a loop
jacek: As part of general game etiquette, players are asked, in the event of a loop during the endgame, to settle the game by distributing to the players the remaining seeds in play. This is to avoid excessively long games, waiting for the playok platform to recognise the loop (which on rare occasions may not settle the end result accurately, a known flaw in playok).
struct: etiquette?
struct: my bot doesnt know that word
eulerscheZahl: but you as a human interface do
MSmits: I can have the meta mcts running games while playing vs their bot
MSmits: so it explorers whatever gamestate it's on
MSmits: then when it's down to 36 seeds on the board, all moves would be perfect
MSmits: it's just the first 12 seeds that are uncertain, but i have like 50 million games played, i doubt it makes mistakes
struct: doesnt their bot have 48 seeds db?
MSmits: yeah but that means i can draw
jacek: i cant. my pictures are horrible
MSmits: my opening book is perfect against any opponent on the CG leaderboard already, it's just i havent trained a NN on the last 36 seed endgame book yet, so it makes mistakes when going below 37 seeds
MSmits: but offline, that is no issue
MSmits: so how does this work. I register and get contacted by this guy?
jacek: dunno. just posting random links :shrug:
eulerscheZahl: find out, for the honors of CG community
MSmits: well i registered, going to try and beat him.
struct: gl
struct: if you dont draw Ill ban you
MSmits: lol
eulerscheZahl: you have karma points left for unbanning darkhorse
MSmits: why was he banned?>
eulerscheZahl: :popcorn:
MSmits: uh oh
MSmits: seems like I missed some drama
eulerscheZahl: oh yeah
struct: Im not really sure, I just unbanned him
eulerscheZahl: complained about squidd sharing questionable links in discord status message
MSmits: and squid banned him?
eulerscheZahl: so squiddy used his mod powers to ban him. then some events that i don't know either. now squiddy is deleted from CG
MSmits: are we talking about the negated squid?
eulerscheZahl: yes
MSmits: wow
MSmits: he really went too far this time then
eulerscheZahl: https://www.codingame.com/profile/e9c83cc4767eb16667a33d90907479d08093402
eulerscheZahl: bots also gone
MSmits: I see
jacek: oh my
struct: Even His bots are gonne
struct: gone*
eulerscheZahl: but then who prints MUDA MUDA as a message?
eulerscheZahl: i never figured out what that even means
struct: "Something that happens when an anime character gets angry and punches things."
jacek: puta?
struct: o.o
MSmits: btw jacek, i think your bot may have a shot at drawing in that oware challenge also
MSmits: it often plays perfectly in the first 12 seeds anyways
MSmits: havent much checked deeper than that
jacek: and it can have more time
MSmits: yeah, just make sure you adapt it to let go of the 200 turn limit
MSmits: shouldnt have any problematic consequences i think, unless you made the turn index part of the input
MSmits: i dont think you did
jacek: nope
ycsvenom: Scrabble problem is really ambiguous or is it just me?
jacek: hm?
ycsvenom: sometimes it prefer length ,sometimes prefer score , sometimes prefer no-repetition
ycsvenom: https://www.codingame.com/ide/puzzle/scrabble
MAWAAW: prefer score
ycsvenom: sometimes it give false answer for that
eulerscheZahl: share your code if you want. just paste it in the chat
ycsvenom: it suddenly work :expressionless:
ycsvenom: but here it is
ycsvenom: http://chat.codingame.com/pastebin/9c17b87a-f1e1-425c-a472-d8b3d6281781
ycsvenom: i will clean code somethings before submitting
martinpapa69: bruhh, use code formatter
martinpapa69: (){ ) {
martinpapa69: im in tears
ycsvenom: i used it >_<
eulerscheZahl: that's what annoys you?
eulerscheZahl: for me it's wordScores.erase(wordScores.begin()+i--);
eulerscheZahl: the end in particular (pasted again because of linebreak above) wordScores.begin()+i--;
martinpapa69: im more annoyed about incosistent format
martinpapa69: for(int i=0;i<wordScores.size();i++){
if(!isValid(wordScores[i].first,letters)) wordScores.erase(wordScores.begin()+i--); }
VizGhar: for me its single line for block on separate line :P
VizGhar: (and without {} of course)
ycsvenom: guys i didn't know that my code is that shity >_<
martinpapa69: its not that bad, ive seen much worse
eulerscheZahl: i do that block of 1 statement without {} too sometimes
Aimee.S: better than me still..
eulerscheZahl: i just avoid i++ or i-- in combination with other math operations
ycsvenom: it's annoying for me to make a 1 block statement with {}
eulerscheZahl: a++ + ++b
ycsvenom: why?
ycsvenom: no i don't use it like
ycsvenom: that
martinpapa69: while(i-->0)
eulerscheZahl: classic
ycsvenom: never -_-
ycsvenom: i use it just for erasing things
martinpapa69: its fine to leave the {} imo
eulerscheZahl: btw you get rid of the fabulous putin avatar in time martinpapa69, well done
martinpapa69: but if you leave it, leave it for the whole block
martinpapa69: like for()if()if() do_something();
VizGhar: a+=++i*2
eulerscheZahl: when nesting for, if, ... i only leave out the {} on the inner-most place
ycsvenom: b+=i+++++j
VizGhar: :D
martinpapa69: putin avatar :joy:
eulerscheZahl: i remember that
eulerscheZahl: from when you were Csipcsirip
ycsvenom: i found you on codeforces euler
MAWAAW: http://chat.codingame.com/pastebin/628be599-92e4-4830-b8f9-a67636ad3260
ycsvenom: you are a candidate master
martinpapa69: that was not putin
eulerscheZahl: not too impressive but ok-ish. i rarely play on topcoder
eulerscheZahl: didn't you have the putin with naked upper body half on a horse?
martinpapa69: nah that was me
eulerscheZahl: "i'm so fabulous"
eulerscheZahl: s/topcoder/codeforces
eulerscheZahl: sometimes they have marathon rounds. but these are unrated
JFB: ycsvenom - for me this code is correct . Of course +i-- and one line if, for without {} is potentially asking for troble but it looks that you do not make mistake. I think that you can have performance issues: personally I will use const string& in instead of string in functions definitions
ycsvenom: http://chat.codingame.com/pastebin/6d2ca2a5-5949-4b5e-8bc1-b90607f6ac81
ycsvenom: check that
ycsvenom: i used already i was just testing
VizGhar: we are just making fun of you :) no stress if it works
ycsvenom: i learned it from theCherrno
ycsvenom: no problem
eulerscheZahl: different people have different styles
VizGhar: just don't sell this code
ycsvenom: LOOOOOL
eulerscheZahl: e.g. a prof of mine condemned
for (char c : "qz") scores[c] = 10;
eulerscheZahl: "use {} or place the assignment in the same line as the for"
VizGhar: we still didn't tell him why
MAWAAW: now ur ready for https://www.codingame.com/ide/puzzle/winamax-sponsored-contest
ycsvenom: my prof condemned me for using for statement :smiley:
eulerscheZahl: actually there's a famous bug that could have been avoided with that code style
eulerscheZahl: https://nakedsecurity.sophos.com/2014/02/24/anatomy-of-a-goto-fail-apples-ssl-bug-explained-plus-an-unofficial-patch/
eulerscheZahl: if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail; goto fail; /* MISTAKE! THIS LINE SHOULD NOT BE HERE */
VizGhar: goto :facepalm:
VizGhar: I know that this is not root of problem but still
ycsvenom: isn't "goto" a bad thing in code? because it make debugging harder
JFB: i-- make debugging harder :-)
eulerscheZahl: it's widely considered bad practice, creating spaghetti code
VizGhar: if you are not using blocks {} for if/for/while/anything body, you will -sooner or later- miss the bug euler pinpointed.
JFB: goto make code less readable (spagetti code as eulerscheZahl said) :-)
ycsvenom: depending on the place :smily_face:
ycsvenom: i mean i--
martinpapa69: rust doesnt even allow if/for... without {}. superior coding language
ycsvenom: i totally agree on goto thing
VizGhar: if (a) { thingone; thingtwo) }; will execute thingthwo only if a == true, but if(a) thingone; thingwto will execute thingtwo no matter what
ycsvenom: what's new :neutral_face:
VizGhar: not sure you got me :D maybe there is nothing new
eulerscheZahl: just use python, problem solved
VizGhar: I made same mistake in production some 7 years back
JFB: eulerscheZahl :-D
ycsvenom: i don't want a new line for "i--" so i have composed it with that statement
VizGhar: pyhton ftw
ycsvenom: @VizGhar counter+=txt[i] == ch; what do you think about that >-<
martinpapa69: after using python for like 4 years, i almost dont hate it anymore
ycsvenom: ALMOST
Hyperplane: ALMOOST*
martinpapa69: after all the tab-bullshit our relationship cant be fixed
JFB: By the way. You have cout << validWords.size() << " " << validScores.size() << endl;
5DN1L: martinpapa69 use spaces instead of tabs <solved>
ycsvenom: it would be better if it had "end" like lua
eulerscheZahl: Pascal also has begin, end as keywords yet i wouldn't recommend the language
ycsvenom: JFB i know i am debugging i still have bug
eulerscheZahl: doesn't even have generics. library has a stringlist for you. but a list of your own class? good luck
JFB: For debugin guse cerr instead cout
ycsvenom: :thumbsup:
JFB: ycsvenom - in description: a letter can only be used once
JFB: In your previous code you do not check duplicates
JFB: in last code your checking is wrong
eulerscheZahl: oh, somehow i thought he passes all testcases now and didn't check for correctness
JFB: rep/2 < 2 is true for rep = 1. rep == 1 is for one duplicat.
ycsvenom: yes i saw it just now :worried:
JFB: inply instead of rep += count > 1; use if (count>1) return false;
ycsvenom: i tried that but there is cases like "which"
ycsvenom: there is two 'h'
ycsvenom: so i am checking if there is more than one duplicate
eulerscheZahl: but why?
eulerscheZahl: you should check if you have more of a kind than in the letters given to you
ycsvenom: because of this "restaurateur" = 12 "satire" = 6 they prefer satire because there is no duplicate
ycsvenom: the test number 7
eulerscheZahl: now you make me open the puzzle again to prove you wrong
eulerscheZahl: aretsui that's the letters you have
ycsvenom: i just realized that the first one is more than length of letters in the first place :relaxed:
eulerscheZahl: how many r's do you have in "aretsui"?
eulerscheZahl: yeah, something doesn't work out
ycsvenom: thanks to you all
ycsvenom: i finished it :grimacing:
ycsvenom: http://chat.codingame.com/pastebin/db90fa1a-9b75-4967-9154-9f172654825f
ycsvenom: lvl15 :sunglasses:
MAWAAW: gg ^^
ycsvenom: i will translate it to other languages now :joy:
MAWAAW: validScores.push_back(word2score(wordScores[i]));
validWords.push_back(wordScores[i]);
MAWAAW: these lines was the key
ycsvenom: what do you mean? do you mean the key to win? or the key as in key:val?
MAWAAW: I mean the key to resolve the "restaurant" vs "aretsui" score problem
ycsvenom: yeah
MAWAAW: you have to remove back from letters u did it well done :)
ycsvenom: thanks any tips or notes on code?
MAWAAW: I'm not the c++ guy :D
eulerscheZahl: you can view solutions of other users now that you solved it
elderlybeginner: What's in 04 validator of CGFunge?
elderlybeginner: OK, it's 3
eulerscheZahl: you can see all validators on github
elderlybeginner: nah, I'm not going into validators tree
jacek: so validate
jacek: do you even validate, Automaton2000?
Automaton2000: yeah i had some issues with generators not counting correctly :)
jacek: what do you think of :notebook: :soccer:, Automaton2000
Automaton2000: jacek give me a hand?
jacek: oh my
struct: o.o
thecoder88: has anyone done a react
struct: not me
KalamariKing: react as in reactjs?
KalamariKing: hey did they change the boss code for the pod racing challenge? my code is as simple as it gets, and i havent touched it in months, but 8 days ago I beat the silver boss
thecoder88: was trying to prepare
thecoder88: looking for sites i can practice coding on
struct: no KalamariKing
struct: someone probably pushed you up
UZIHAMA: Hello world
struct: hi
UZIHAMA: antiwonto is sleeping i guess
Drakon1c: ok
KalamariKing: rip antiwonto
ycsvenom: why lua is very fast in term of "play all testcases" is it because it is an interpreted language?
Katespizer: probably yeah
Katespizer: but some languages on site are fast even when are compiled
Valdez001: Somebody to do a coop?
Kofi.eo: damn i know nothing about coding apparently
Madara-Uchiha: :taco: KalamariKing
Madara-Uchiha: yeah anti slept
Madara-Uchiha: it like that almost everyone slept too
Madara-Uchiha: no mod online XD