05 2018 档案
摘要:一. 巴什博奕(Bash Game): A和B一块报数,每人每次报最少1个,最多报4个,看谁先报到30。这应该是最古老的关于巴什博奕的游戏了吧。 其实如果知道原理,这游戏一点运气成分都没有,只和先手后手有关,比如第一次报数,A报k个数,那么B报5-k个数,那么B报数之后问题就变为,A和B一块报数,看
阅读全文
摘要:#include #include #include #include #include #include #include using namespace std; int main() { int t,i,j; scanf("%d",&t); while(t--) { string s1,s2,s3; cin>>s1; ...
阅读全文
摘要:解法不唯一,但是还是set好理解而且用着爽,代码注释应该够详细了
阅读全文
摘要:思维题,把n个卡片倒着放,然后每个卡片循环放到最底下i次,最后出来的结果就是要求的卡牌顺序
阅读全文
摘要:全排列函数解法#include #include #include #include #include #include #include using namespace std; typedef long long ll; char s[15]; int main() { int len; scanf("%s", s); len=strlen(s); ...
阅读全文
摘要:别琢磨中间过程,我也整不清楚,死记住模板吧
阅读全文
摘要:把所有时间加起来,最后从大到小排序,一定要把大的先减去。注意花费的时间都是1,这一秒用过就不能再用了,所有用到了并查集的部分知识
阅读全文
摘要:DP题自己实在想不出来,看大神代码才能勉强理解一下
阅读全文
摘要:#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const int A=1000001; long long n,m; long long f[10...
阅读全文
摘要:#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define mp make_pair #define pb push_back #define debug puts("debug"...
阅读全文
摘要:map打表存一下对应的密码 不会map感觉不好弄这题
阅读全文
摘要:XiaoMing likes mathematics, and heis just learning how to convert numbers between different bases , but he keeps making errorssince he is only 6 years
阅读全文
摘要:仔细看题想想就是个贪心题,两个sort就可以解决了
阅读全文
摘要:题意:给你三个字符串,让你计算1 2 串和3 串是否匹配,就是3串可以分解为 1 2 串,字母顺序必须是按照1 2 串的字母前后顺序。 DP代码太深奥 看不太透,这个代码比较好理解一点:
阅读全文

浙公网安备 33010602011771号