Naseem17's blog

By Naseem17, history, 15 months ago, In English

Hello codeforces community!

I am happy to invite you to participate in the Aleppo Collegiate Programming Contest 2023 V.2 (V.2 because the first version of the contest was dismissed, so this is version 2) that was held at Damascus University on [contest_time:459931]. The online training will be on codeforces gyms and will start on Aug/29/2023 14:00 (Moscow time).

Thanks to Kaitokid, AboAbdoMC, Mahmoud_Haddad, Obada_Saleh, Mohanad_Nahhal, YazanAlattar, A.D., Helal_Salloum, Wael_Mchantaf and radi__07 for creating and preparing the contest. Special thanks to Majedh and Anas_Da who did most of the work.

Thanks to Baraa_Armoush and HeMoo for their contribution and constructive feedback.

Thanks to Vectors_Master, TripleM5da, IsaacMoris, BabaVoss, Abdelrahman_Etman, LastDance_NotLastOfMe and Assem_albitar for solo testing.

Thanks to the team testers:

Thanks to Damascus University for hosting the onsite contest.

Thanks to polygon for providing the amazing platform for creating and preparing the problems, and to codeforces for the hosting of the online training.

I hope you enjoy solving the problems. Any feedback will be appreciated.

Full text and comments »

  • Vote: I like it
  • +94
  • Vote: I do not like it

By Naseem17, history, 4 years ago, In English

Hello, Codeforces community!

I would like to thank all of you for supporting us and for all of your suggestions.

More than a month ago, I posted a blog to race khaled97ha to master. We decided that the one who loses dyes his hair purple and posts a photo of his hair in this blog (suggested by RedNextCentury and his comment had the most upvotes). We also decided that if we reached master in the same contest then it's a tie, and that's what happened.

Two days ago, we both reached master and had the same rating. I thought that this blog is boring to be posted, so here's a photo of me and Khaled when we were in a trip in some suburb returning to the city and the sun was so shiny that we had to borrow our friends' tank undershirts and pour cold water on it and put it on our heads so that out minds don't dissolve. Like most of you, I still can't understand why Khaled turned into a dog that day.

I hope this is a good alternative.

Full text and comments »

  • Vote: I like it
  • +330
  • Vote: I do not like it

By Naseem17, history, 4 years ago, In English

Hello, Codeforces community!

Since I reached candidate master on Codeforces, I and my friend khaled97ha (who reached CM two months before me) were talking about when will we reach master? and after nearly every contest the one who did better would not stop talking and showing off about it until the following contest.

Recently, I and Khaled got closer to master and the race got much more interesting that some of our friends in Syria started talking about it.

However, in the last contest, I did so bad and Khaled did very well. He got so confident that he'll win the race and I'm a useless candidate master who'll never be a true master, so we decided to take this race into a whole new level and post this blog to let the Codeforces community know about it when I win the race (I hope).

We were looking for something the loser should do when one of us wins but couldn't. Any suggestions will be welcomed.

Another blog will be posted when the race is won. Get ready for literelly nothing!

Full text and comments »

  • Vote: I like it
  • +340
  • Vote: I do not like it

By Naseem17, history, 5 years ago, In English

Hello Codeforces!

Is it necessary that the two players play in the same way when considering a Grundy numbers approach?

For example, in problems like this: E. Game With String, let's consider that $$$n \le 100$$$. Is the following approach correct?

Let's consider the subsegments that has only $$$.$$$ characters and their lengths. Take the second test as an example $$$X...X.X..X$$$, we have three subsegments with lengths $$$3,1$$$ and $$$2$$$.

If we considered $$$a=b$$$ then the following approach is correct:

We calculate the Grundy number for each subsegment. a player can split the subsegment with length $$$len$$$ into two subsegments with lengths $$$len1$$$ and $$$len2$$$ such that $$$len1+len2=len-a$$$, we can try each possible value for $$$len1$$$ and find the corresponding $$$len2$$$ and the value for the pair $$$len1$$$ and $$$len2$$$ is their X-OR (let's call it $$$x_i$$$) , the Grundy number for $$$len$$$ is the MEX of all $$$x_i$$$. Now if the X-OR of the Grundy numbers of all lengths of the subsegments equals to $$$0$$$ then the second player wins. The first one wins otherwise.

But what if $$$a \neq b$$$? Can I take calculate the Grundy number for each $$$len$$$ like this:

Calculate the Grundy number for each player. Let's call the Grundy number for $$$len$$$ for the first player $$$g_1[len]$$$ and for the second player $$$g_2[len]$$$. now $$$g_1[len]$$$ is equal to the MEX of all possible $$$g_2[len1] \mathbin{\oplus} g_2[len2]$$$ where $$$len1+len2=len-a$$$, and $$$g_2[len]$$$ is equal to the MEX of all possible $$$g_1[len1] \mathbin{\oplus} g_1[len2]$$$ where $$$len1+len2=len-b$$$.

Like this I calculated the Grundy number for each player. now if the X-OR of all $$$g_1[len]$$$ of all subsegments is $$$0$$$ then the second player wins, the first player wins otherwise.

Is this approach correct? And even if it's not, again, is it necessary that the two players play in the same way in all Grundy numbers approaches?

Full text and comments »

  • Vote: I like it
  • +21
  • Vote: I do not like it