标签:二次 targe color else lan line argv ref number
二次联通门 : LibreOJ #6. Guess Number
/* LibreOJ #6. Guess Number 交互题初体验 用了二分判定 感觉不错 */ #include "interaction.h" #define Max 1000010 inline int solve(int i) { register int l = 0, r = Max, Mid; int res; for (; l <= r; ) { Mid = l + r >> 1; if (guess(i, Mid) >= 0) { res = Mid; r = Mid - 1; } else l = Mid + 1; } return res; } int Main () { int N = get_num(); std :: vector<int> a(N); for (int i = 0; i < N; i++) a[i] = solve(i); submit(a); } int ZlycerQan = Main (); int main (int argc, char *argv[]) {;}
标签:二次 targe color else lan line argv ref number
原文地址:http://www.cnblogs.com/ZlycerQan/p/7355092.html