codetiger927's blog

By codetiger927, history, 2 years ago, In English

Participants can join our Discord server here

The LexMACS (Lexington Mathematical CS) club is proud to announce our third annual Lexington Informatics Tournament 2022! The contest window lasts from July 21 — July 25 EDT, and participants can begin their 3 hours window at any time. If you are interested, please visit our website at https://lit.lhsmathcs.org/. Once you register, you can see all the past problems on the contest page. Some of our problem-setters include codetiger927, eggag32, SuperJ6, and eyangch. Special thanks to testers Savior-of-Cross, Tlatoani, fishy15, fivefourthreeone as well!

LIT consists of two separate rounds: Standard and CTF. Teams may participate and win prizes in both. The Standard round is similar to USACO and CodeForces, where you are given 8 algorithm problems and 3 hours to solve, with difficulties ranging from Div3 to Div1. The CTF round will rely on contestants’ knowledge of computer security and general problem-solving skills to complete challenges and locate a "flag" for each.

Participants may form teams of up to 3 members! Everyone is welcome to participate in the contest regardless of nationality and age. While our prizes mainly target high school and middles school students (hundreds of dollars in cash!), we have a special award for post-HS teams as well this year <3!

Awards

Our current prize pool is worth more than $33,000 this year! In addition, ALL PARTICIPANTS will be able to win 1 month of Replit hacker, and the top 30 individuals will receive the Wolfram Award of 1 year of Wolfram|One Personal Edition and 1 year subscription to Wolfram|Alpha Pro (worth $375)

For more detailed and latest information, please join our Discord Server and visit our Website. Registration will remain open up until the end of the contest window.

If you have any more questions, please don't hesitate to DM the organizers in the Discord Server, or email us at [email protected].

Hope to see you soon!

Update: We have pushed back the opening ceremony by 5 hours to 4pm EST due to conflict with a CF round.

Update: Open ceremony starting soon at https://www.youtube.com/watch?v=5QCkheqOp3s&ab_channel=LexMACS!!! PLEASE JOIN US

Updated: STANDARD ROUND HAS OFFICIALLY STARTED! GOOD LUCK HAVE FUN AND MAY YOUR PERFORMANCE BE LIT!

LexMACS

Full text and comments »

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

By codetiger927, history, 3 years ago, In English

2/11/2023 Update: There had been a month-long hiatus due to the CF name change magic (and my own laziness oops), but everything has been fixed now :D! However, I know a lot of people have gone inactive due to the month-long market closure, so I am hoping to relaunch StonksCF in the near future with some new mechanisms (dividends, automatic algorithm trading, etc.). Let me know if you have any ideas! In the meantime, feel free to continue exploiting the way-over-inflated economy and embrace your inner capitalism >:D

Final Update: We now have our own DISCORD SERVER. Join us for the latest information and engage with the community at https://discord.gg/AeH2GTwkF5 All the announcements will be there instead of on this page

Greetings Fellow CodeForces users!

I am proud to introduce my latest project, CF Stonks (aka StonksCF), which is a virtual stock market based on your CodeForces rating.

Have you ever been thrilled by the ups and downs of CodeForces ratings? If so, you will love this project :D. On the website, you will automatically receive $$$200$$$ stocks of your own account (with the rest of the $$$800$$$ being sold on the market) and $$$10,000$$$ in cash upon registration. The price of each stock is based on your rating, so the higher the rating, the higher the price of a stock is. Furthermore, since crossing (or sometimes dropping) into a new division is so exhilarating, we aim to capture that excitement and give a $$$20$$$% boost between the ranks. The exact formula is $$$price = 1.2^{rank} \cdot rating$$$.

While the market is open (closed during contests), you can sell/buy other people's stock. Even though this is just a game, you can use the website as a source of motivation since people depend on you to not lose money 0_0.

So what are you waiting for? Try to become the wealthiest man on the website! More details on the game mechanics can be found on the about page

Steps to get started
Screenshot of the pages

Special thanks to the Nimbus bot developed by gamesterrex and caoash , which serves as my primary inspiration behind this project.

Furthermore, all of the source code is public and available on GitHub here, so if you would like to contribute or give suggestions, please open an issue/pull request.

Good luck and have fun playing :D

Edit: The market has been closed for the Div 3 contest. Good luck to anyone taking!

Edit: Market has been reopened, marking the end of our first trading cycle and the beginning of the second! Have fun trading everyone

Edit: After 14 days of chaos due to New Years name change, the website has been fully fixed and updated! :D Happy trading

Full text and comments »

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

By codetiger927, history, 3 years ago, In English

If a hamster was born in aquarium, does it become a fish? — Rotavirus 2021

When the hour hand is way past twelve and the sky is dark, I often find myself pondering about this question, alone.

Of course, a hamster is a hamster, and it cannot just become a fish right? But then again, if its mother gave birth to it inside an aquarium, then who's to say the hamsters didn't acquire a critical mutation that gifted them the ability to breathe underwater, transforming them into fish?

I would be awake at 3 am in the morning, frustrated and defeated by this cruel dilemma that I cannot seem to solve. But, Rotavirus must know, right? After all, he was the person that proposed this rhetorical question, so he must have the answer to his own question! If I could just ask him, maybe, just maybe...

Yet fate cheated me once again: Codeforces has permanently banned Rotavirus — I can no longer ask him. All I have left are only pieces of clues and hints scattered around his comments. If only I could somehow rebuild him out of his words, I could just ask him and he would tell me. The answer feels so close but also just far enough to be out of my reach.

On August 4th, 2021, 11:08 PM edt, I did the impossible: I trained an LSTM recurrent neural network on all of Rotavirus' previous comments and resurrected him (well ... kinda? :clown:) But before we get to the juicy parts, we must first rewind to 8 hours earlier.

I first wrote a simple python scraper to get all of rotavirus' comments. It's just a simple script with a xhtml parser:

import requests
import re
import io
import html
import re
from html.parser import HTMLParser

f = open("comments.txt", "ab")

class scraper(HTMLParser):
	commentMode = False;
	def handle_starttag(self,tag,attrs):
		if(tag == "div" and len(attrs) > 0 and attrs[0][1] == 'ttypography'):
			self.commentMode = True;
	def handle_endtag(self,tag):
		if(tag == "div"):
			self.commentMode = False;
	def handle_data(self,data):
		if(self.commentMode):
			if(data.rstrip() != ""):
				f.write((data + "\n").encode("utf-8"));
page_number = 1
url = "https://codeforces.net/comments/with/rotavirus/page/{}".format(page_number);

s = requests.Session();
parser = scraper()
r = s.get(url);
parser.feed(r.text)
# print(html.unescape(r.text));

However, there were still a lot of emojis and Russian characters that the network can't recognize, so I wrote a cleaner script that only accepts ASCII characters.

f = open('comments.txt','rb');
fout = open('comments_cleaned.txt','w');
lines = f.readlines();
for line in lines:
	fout.write('"{}"\n'.format(line.strip().decode().encode("ascii", "ignore").decode()));

Finally, I plugged everything into my ML senpai Andrej Karpathy <3's neural network, char-rnn. And after 7 hours of excruciating waiting time, I got this

Finally, let's get to the juicy text generation part :p. Unfortunately due to the extremely small sample size, 12k comments, the generation wasn't as good as I had hoped D:, but I still found a couple of comments I found funny that at least somewhat resembles rotavirus:

===================================================================================

"is it rated?"

"I hate mike"

"cheaters are noob"

"segment tree is very indian" (interesting take O_o, talk about the importance of being careful with training data to avoid AI racism)

"Greendians retarned." (okay this is a bit too dangerous :sweat:, just reminder that I did 0 subjective modification on the model or the dataset, so I have 0 endorsements on any of these comments)

"http://codeforces.net/blog/entry/408po-" (:O it seemed to pick up on how to generate codeforces blog links as well, albeit a nonexistent one)

"I believe that means stupid must complain about the segment tree." (The AI seemed to really pick up on Rotavirus' obsession with segment tree XD)

I generated 10,000 characters worth of AI generated text, so If you want to see the uncherrypicked version, here it is

===================================================================================

Finally, time for the ultimate question that we've all been waiting for :eyes:, I primed the AI with the pretext, "If a hamster was born in aquarium, does it become a fish? The answer"

THE RESPONSE IS [drumrolls please]: If a hamster was born in aquarium, does it become a fish? The answer is NO

THANK YOU GOOD NIGHT ✿✿ヽ(゚▽゚)ノ✿

Overall, I believe the disappointing results are caused by the small datasize. The github repository recommends a minimum of 1mb, whereas the data I collected is only 93kb, more than 10 times smaller.

BUT, I actually did find a new source to retrieve a lot more of Rotavirus' comments in the famous AC Discord Server :O

Part 2? To Be Continued...

Note that everything in this post is completely for comedic purposes. Please don't take anything here seriously >.< GOOD NIGHT FOR REALSIES

If you like this post, please consider checking out my blog https://codetiger.me/ :p

Full text and comments »

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

By codetiger927, history, 3 years ago, In English

Participants can join our Discord server here

The LexMACS (Lexington Mathematical CS) club is proud to announce our second annual Lexington Informatics Tournament! The contest window lasts from July 15 — July 19 EDT, and participants can begin their 3 hours window at any time. If you are interested, please visit our website at https://lit.lhsmathcs.org/. Once you register, you can see all the past problems on the contest page. Some of our problem-setters include codetiger927, eggag32, SuperJ6, and eyangch. Special thanks to testers Savior-of-Cross and plourde27 as well!

LIT consists of two separate rounds: Standard and CTF. Teams may participate and win prizes in both. The Standard round is similar to USACO and CodeForces, where you are given 8 algorithm problems and 3 hours to solve, with difficulties ranging from D3 to D1. The CTF round will rely on contestants’ knowledge of computer security and general problem-solving skills to complete challenges and locate a "flag" for each.

Participants may form teams of up to 3 members! Everyone is welcome to participate in the contest regardless of nationality and age. However, only those currently in middle school or high school are eligible for winning prizes.

Awards

While we currently do not have the complete list of prizes yet, our current prize pool is worth more than $6000! In addition, all top 50 participants will be able to receive a Wolfram|Alpha Notebook Edition, each valued at $72.

For more detailed and latest information, please join our Discord Server and visit our Website. Registration will remain open up until the end of the contest window.

If you have any more questions, please don't hesitate to DM the organizers in the Discord Server, or email us at [email protected].

Hope to see you soon!

LexMACS

Full text and comments »

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

By codetiger927, history, 3 years ago, In English

Hi everyone, hope you’re having a good day~

You might have heard about USACO(USA Computing Olympiads) before. While it has many great problems, it's kinda hard to practice on USACO because there are few ways to estimate a problem's difficulty. As a USACO participant, I know the pain of attempting a question and only realizing after reading the editorial that it’s either too easy or too hard, wasting a precious problem.

Therefore, I bring to you USACO Rating! USACO Rating is a web application tool for estimating USACO problems’ difficulties in terms of CF ratings. There is also a quality metrics, so you can practice on only the most worthy problems, and avoid low-quality ones. The website is here: https://codetiger.me/project/usaco/

We are also currently looking for more volunteers to better adjust the estimations through voting. If you’re interested, please check out https://codetiger.me/project/usaco/frontend/contribute.html

The project is also open source at https://github.com/CodeTiger927/USACO-Rating. So even if you don't really use USACO, you can freely modify this project and create a similar system for your country's CP olympiad :D! It is under the MIT License.

Hope you find it useful! And please contact me if you have any feedbacks <3

Full text and comments »

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