Skip to content

Add AtCoder support #540

@osalbahr

Description

@osalbahr

Hi,

TLE is cool!

However, I ran out of ;vc +div4 so I want to do something like ;vp +abc (vp="Virtual Participation", abc="AtCoder Beginner Contest").

Would it be a good idea to incorporate AtCoder support in TLE, or is it out of scope?

Also, do you know of any existing solutions for this exact problem?

Currently, I have the following (semi-correct) script that I keep running until I get a valid contest:

#!/usr/bin/env python3

import random
import requests

nums = [f"{n:03}" for n in range(1, 1000)]

while True:
    idx = random.randint(0, len(nums) - 1)

    url = f"https://atcoder.jp/contests/abc{nums[idx]}"

    if response := requests.get(url):
        print(url)
        break
    
    print(f"Error requesting {url}:", response)
    ans = input("Re-run the script? (y/N) ").lower()

    if not ans or ans[0] != "y":
        break

It works fine for now, but it will get annoying at some point.

I also just want to practice solving a "real problem".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions