So I was debugging this code and managed input/outputs in separate files. I ran the same code with same flags in codeblocks and WSL ubuntu 18.04, they gave me two different outputs.
https://paste.ubuntu.com/p/xGtTvzYMyT/
I included sample input-output in the code. I would appreciate it if someone gives me a proper explanation of this. Thanks.
Flags:
-DROBIN
-std=c++14
-O2