Codeforces Round #415 (Div. 2), problem: (D) Glad to see you! Solution In C/C++

By |2017-07-24T16:55:40+00:00July 24th, 2017|Categories: C/C++, Programming|Tags: , , , , , , |

#include <cstdio> using namespace std; #define ff fflush(stdout) #define mid (lef+rig>>1) int n, k, x, t1, t2; char s[5]; inline bool I(int a, int b){printf("1 %d %d\n",a,b), ff, scanf("%s",s); return s[0]=='T';} inline int Binary(int lef, int rig){if(lef>rig) return 0; for(; rig-lef > 1; I(mid,mid+1) [...]