notwatermango's blog

By notwatermango, history, 2 years ago, In English

This is a dark theme userscript for vjudge

Today I was looking for one but can't find any so I decided to make one, inspired by sigma_g's Codeforces dark theme (link to blog here).

This is the bare minimum of dark theme. Anyone is welcome to use and contribute.

There will be updates and improvements later.

Screenshots

Problem Statement
Dynamic Rank

Installation

Source Code

Btw, I will be solving 1600-1900 CF Edu problems in the near future. If anyone interested to join me in vjudge let me know!

Full text and comments »

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

By notwatermango, history, 3 years ago, In English

Hi everyone,

I write this blog because I encountered a rather weird issue, maybe anyone here has the same issue or even has solved this?

I was participating in a contest earlier when I tried to compile & run for problem B and my code doesn't run >︿<

My case:

This code below compiles and run, I can see Hello printed in my terminal

#include <bits/stdc++.h>
using namespace std;

int main() {
  vector<int> v;
  cout << "Hello";
  // v.push_back(2);
  return 0;
}

However when I uncomment v.push_back(2) it compiles but doesn't run! (I don't see Hello in terminal)

Commands I used: g++ main.cpp -Wall -o main .\main.exe

There's no warning or error message.

I have tried compiling with MSYS64 (my main) and MSVC x64, same results.

Yesterday it was working fine, so maybe something broke my c++ runtime today.

Here's a list of what I did today before running to this problem:

  • installed Anaconda,
  • installed git,
  • installed Visual Studio and C/C++ build toolchain (for rust),
  • installed rust

Similar problem: https://stackoverflow.com/questions/70809283/c-program-does-not-run-if-a-vector-has-any-contents https://stackoverflow.com/questions/70994977/c-code-wont-run-if-a-vector-contains-value

I'd love to participate in that post's comment section however I don't have enough karma.

Someone mentioned this, tho I haven't tried.

Spoiler

Then I tried Visual Studio IDE and it works! Sadly VS complains when I do int arr[n]; saying array size should be static.

I'm considering IDEs since text editor has this issue (I implied IDE is OK because Visual Studio is OK), maybe I'll go with DevC++ or farmanager, or even code in Rust.

I'll share some update if this blog doesn't get >10 downvotes

Full text and comments »

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

By notwatermango, history, 3 years ago, In English

https://codeforces.me/contest/1598/submission/131464090

They knowingly hacked their own code...

I suppose this hack is illegal? Will codeforces detect this automatically or someone has to report this?

Edit

 if(n == 3 && a[0] == 228 && a[1] == 1337 && a[2] == 228){
        cout << "HACKED LOL" << endl;
        return;
 }

for those who doesn't bother reading the submission

Full text and comments »

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