TomDev's blog

By TomDev, history, 2 hours ago, In English

Since submitting on Codeforces or other OJs takes time when you need to locate the submit buttons and pasting your code and then finally hit submit, I've developed a userscript to do that in 1 shortcut.

Github repo: https://github.com/TomDevX/Fast-OJ-Submitter (check the README.md)

How to use

  • Ctrl/Cmd + S: submit clipboard (must be on problem page) — and must have the code in your clipboard
  • Alt/Opt + S: submit file (must be on problem page)

Currently support OJs: Codeforces, DMOJ forks, SPOJ, AtCoder, CSES, MarisaOJyou can still add OJ by yourself through the source code

Disclaimer: On firefox, if the userscript doesn't work or it shows a paste prompt/button. Go to about:config and change:

  • dom.events.asyncClipboard.readText = true
  • dom.events.testing.asyncClipboard = true

How to download

You need to download Tampermonkey or similiar tools to be able to use this script

There are 3 ways you can do:

  1. Go to source file and view it in raw mode. A Tampermonkey script installation request will be prompted
  2. Paste source file inside your tampermonkey
  3. Install from Greasy Fork

Please open an issue to the repo github if you have any problem or feature requests

Made by TomDev with <3


Special thanks to MikeMirzayanov and the Codeforces HQ for developing and maintaining this amazing platform!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By TomDev, history, 7 months ago, In English

I had checked on some websites and they said that when Dijkstra went through a node, it marked that node as optimized and never visit again. But now, I implement Dijkstra with priority queue and compare by checking if distance[v] > distance[u] + w. By that way, it will just get the most optimized way for a node without getting trouble with negative weights.

Here's an example of my Dijkstra code to attempt High Score problem on CSES. My code uses Dijkstra to find the optimal path to the final path and also using the SPFA's trick (count if node is visited more than n times).

My code got Accepted on most of the testcases (except the only one testcase that got Wrong Answer because it detects the wrong cycle — and I don't know why)

My attempt's verdict

Can someone help me explain this? I know that I'm wrong somewhere but I'm so confused. Thank you!

Full text and comments »

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

By TomDev, history, 7 months ago, In English

Today, I decided to share my repository of my source codes on OJs — where I store and arrange my solutions: CP-Archive.

Disclaimer: This is a personal progress tracker, not a formal encyclopedia. Read at your own risk!

Quick Links:

Repo preview

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it