Category : console-application

I’m trying to solve this problem by running this code; however, online judge says I had a timeout on only one of the tests, in which big numbers are used. How to make this code more efficient such as not to get a timeout? #include <iostream> using namespace std; int main() { int n,c=0; cin ..

Read more

I’m making a text-based console game. The Chinese input method is annoying as it blocks normal key input. I tried to send NULL to ImmAssociateContext but it doesn’t work. #include<Windows.h> #include <imm.h> #include <atlstr.h> #include<handleapi.h> #include<iostream> #pragma comment ( lib,"imm32.lib" ) using namespace std; int main(int argc, char* argv[]) { SetConsoleTitle(TEXT("test")); char ch; ImmAssociateContext(FindWindow(NULL, TEXT("test")), ..

Read more