1023 - Discovering Permutations PDF (English) Statistics Forum Time Limit: 0.5 second(s) Memory Limit: 32 MB In this problem you have to find the permutations using the first N English capital letters. Since there can be many permutations, you hav…
lightoj 1020 A Childhood Game 链接:http://lightoj.com/volume_showproblem.php?problem=1020 题意:一堆石子有 m 个,Alice和Bob可以从中取1个或者2个,如果Alice先取,最后取的人败:如果Bob先取,最后取的人胜.问胜利者. 思路:枚举前几个石子的情况,很容易找出每种情况的必败点,找规律.如果Alice先取,Alice的必败点为mod 3 == 1,如果Bob先取,Bob必败点在 mod 3 == 0处…
#include <iostream> #include <cstdio> #include <cmath> using namespace std; const int maxN = 100005; int a[maxN]; int t, tt; int n, q, x, y; int Bsearch_lower_bound(int x) { int l = 0, r = n - 1, mid = 0; while (l <= r) { mid = (l + r…