04 2019 档案

摘要:欧拉函数:在数论,对正整数n,欧拉函数是小于或等于n的数中与n互质的数的数目。 阅读全文
posted @ 2019-04-26 18:00 kaike 阅读(184) 评论(0) 推荐(0) 编辑
摘要:1 #include<iostream> 2 #include<cstdio> 3 #include<string> 4 #include<cstring> 5 #include<map> 6 #include<set> 7 #include<vector> 8 #include<queue> 9 阅读全文
posted @ 2019-04-25 14:30 kaike 阅读(440) 评论(0) 推荐(0) 编辑
摘要:E. Two Teams Description There are 𝑛n students standing in a row. Two coaches are forming two teams — the first coach chooses the first team and the 阅读全文
posted @ 2019-04-20 15:06 kaike 阅读(209) 评论(0) 推荐(0) 编辑
摘要:C. Serval and Parenthesis Sequence Description Serval soon said goodbye to Japari kindergarten, and began his life in Japari Primary School. In his fa 阅读全文
posted @ 2019-04-19 17:04 kaike 阅读(220) 评论(0) 推荐(0) 编辑
摘要:Thanks, TuSimple! Description As a manager of TuSimple, you are going to hold a dancing party for both the Development Department and the Marketing De 阅读全文
posted @ 2019-04-17 21:19 kaike 阅读(150) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round #550 (Div. 3) D. Equalize Them All Description You are given an array aa consisting of nn integers. You can perform the following ope 阅读全文
posted @ 2019-04-16 12:01 kaike 阅读(383) 评论(2) 推荐(0) 编辑
摘要:小 B 的题目 Description 小 B 给小 A 出了这样一道题: 给定一个长为 nn 的序列 AA 和一个长为 mm 的序列 BB,在 AA 和 BB 中各取一个数相加,可以得到 n\times mn×m 个数,他想知道把这些数从小到大排序,第 kk 个数是多少(下标从 11 开始)。 小 阅读全文
posted @ 2019-04-15 17:06 kaike 阅读(470) 评论(0) 推荐(0) 编辑
摘要:n 子棋 Description 小 A 和小 B 在玩 nn 子棋, nn 子棋游戏的规则是,两人在一个左上角是 (1,1)(1,1),右下角是 (n,n)(n,n) 的 n \times nn×n 棋盘中交替落子,只要有一方的 nn 个棋子在同一行或者同一列或者同一条对角线上,对方就输了。 游戏 阅读全文
posted @ 2019-04-13 18:28 kaike 阅读(575) 评论(0) 推荐(0) 编辑
摘要:Euclid's Game Description Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multipl 阅读全文
posted @ 2019-04-09 11:26 kaike 阅读(155) 评论(0) 推荐(0) 编辑
摘要:A Funny Game Description Alice and Bob decide to play a funny game. At the beginning of the game they pick n(1 <= n <= 106) coins in a circle, as Figu 阅读全文
posted @ 2019-04-09 10:41 kaike 阅读(120) 评论(0) 推荐(0) 编辑
摘要:Being a Good Boy in Spring Festival Description 下面是一个二人小游戏:桌子上有M堆扑克牌;每堆牌的数量分别为Ni(i=1…M);两人轮流进行;每走一步可以任意选择一堆并取走其中的任意张牌;桌子上的扑克全部取光,则游戏结束;最后一次取牌的人为胜者。现在我 阅读全文
posted @ 2019-04-06 15:24 kaike 阅读(237) 评论(0) 推荐(0) 编辑
摘要:Magic 12 Months Description 去掉一副扑克牌的大小王和四张K,把剩下的48张牌分成12摞,每摞四张,之后按如下步骤操作: 1.令p=1 2.把第p摞牌最上面一张翻开扔掉,p变成这张牌的点数 3.如果第p摞牌被拿完则结束,否则继续第2步 现在给出前n张被翻开扔掉的牌,问游戏结 阅读全文
posted @ 2019-04-06 14:30 kaike 阅读(430) 评论(0) 推荐(0) 编辑
摘要:L2-031 深入虎穴 (25 分) Description 著名的王牌间谍 007 需要执行一次任务,获取敌方的机密情报。已知情报藏在一个地下迷宫里,迷宫只有一个入口,里面有很多条通路,每条路通向一扇门。每一扇门背后或者是一个房间,或者又有很多条路,同样是每条路通向一扇门…… 他的手里有一张表格, 阅读全文
posted @ 2019-04-06 13:49 kaike 阅读(1277) 评论(0) 推荐(0) 编辑
摘要:从天体赛回来之后,发现好多字符串的题呀,字符串都是毒瘤题目。 再PTA上面,gets() 不能用,我用的是 导致这种用字符串string很好写的,硬生生给我弄成了毒瘤 #include<ctype.h> isalnum:测试字符是否为英文或数字;isalpha:测试字符是否为英文字母;isdigit 阅读全文
posted @ 2019-04-06 13:32 kaike 阅读(137) 评论(0) 推荐(0) 编辑
摘要:L2-029 特立独行的幸福 Description 对一个十进制数的各位数字做一次平方和,称作一次迭代。如果一个十进制数能通过若干次迭代得到 1,就称该数为幸福数。1 是一个幸福数。此外,例如 19 经过 1 次迭代得到 82,2 次迭代后得到 68,3 次迭代后得到 100,最后得到 1。则 1 阅读全文
posted @ 2019-04-03 12:02 kaike 阅读(545) 评论(0) 推荐(0) 编辑
摘要:巴什博弈: 只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜。 显然,如果n=m+1,那么由于一次最多只能取m个,所以,无论先取者拿走多少个,后取者都能够一次拿走剩余的物品,后者取胜。因此我们发现了如何取胜的法则:如果n=(m+1)r+s,(r为任意自然数 阅读全文
posted @ 2019-04-03 10:14 kaike 阅读(341) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示