Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A string-integer comparison trick
//g++ 5.4.0 #include <iostream> #include <string> bool operator==(const std::string& a, int b) { return a == std::to_string(b); } struct { int value = 2; operator std::string() { return std::to_string(++value); } } a; int main() { if (a == 3 && a == 4) std::cout << "Я тоже так могу\n"; }
run
|
edit
|
history
|
help
0
Bind Function
CodeForces Div 3 - D
Factorial Inv wip
Two pointer - MUST DO
FindKthElementDivideConquer
kap03_09
MeanSDVar
CodeChef P1 MATMIN1
simple use of namespace
scope new delete