C. Game with Chips time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has a rectangula ...
分类:
其他好文 时间:
2020-04-11 13:14:22
阅读次数:
62
In an n x n chessboard, Prince and Princess plays a game. The squares in the chessboard are numbered 1, 2, 3 ... n*n, as shown below:Prince stands in ...
分类:
其他好文 时间:
2020-04-09 12:37:11
阅读次数:
87
嘤嘤嘤,我又来了,刚A完就写,这个沙雕题有丶恶心 题目: In an n×n chessboard, Prince and Princess plays a game. The squares in the chessboard are numbered 1, 2, 3, . . . , n?n, ...
分类:
其他好文 时间:
2020-04-09 00:58:08
阅读次数:
300
GitHUB:https://github.com/daozhangXDZ/DZGameEngine 后续再把DZProgrameNote公开,正在批处理过程中。一堆markdown. MARKDOWN: ...
分类:
其他好文 时间:
2020-04-08 09:26:34
阅读次数:
58
主循环: while mRunning: for event in pygame.event.get(): if event.type == pygame.QUIT: mRunning=False pygame.quit()必须要写成event.type要不退不出去,不生效 ...
分类:
其他好文 时间:
2020-04-07 18:16:48
阅读次数:
62
https://leetcode-cn.com/problems/stone-game-iii/ 题意:有n个数,有两个人,轮流取数,每次可以取前1、2、3个数,取到最后,谁的和大谁赢。 思路:类似上一篇,把数的大小看作收益,自己收益为x,别人收益为y,纯收益x-y。 不同取法都会对后面造成影响,但 ...
分类:
其他好文 时间:
2020-04-06 23:44:10
阅读次数:
97
题意:一个全排列,alice可以从某一个数出发,从i走到j的条件是: a[j]>a[i],而且从i到j要符合|i-j|%a[i]=0,若alice在该数有必胜的策略,输出B,否则A 思路,拓扑排序+博弈论(这题让我做的太迷了刚刚) ,用邻接表连接该数与其他数的关联,如果一开始入度为0的,即alice ...
分类:
编程语言 时间:
2020-04-06 17:25:52
阅读次数:
73
一、使用函数。 import random:import语句将random模块导入程序中。 guessesTaken = 0:储存猜过的次数。 random.randint():调用random中的randint(x,y)函数,此函数创建一个随机数字。 for i in range(6):range ...
分类:
其他好文 时间:
2020-04-06 11:43:24
阅读次数:
74
题目链接:https://codeforces.com/contest/1221 A 2048 Game 随便搞搞。 B Knights 题意:在一个n\ n的棋盘中,每个格子放一个黑马或者白马。求一种放置方案使得互相攻击的异色马最多。 题解:奇偶染色。 C Perfect Team 题意:有c个代 ...
分类:
其他好文 时间:
2020-04-06 09:56:10
阅读次数:
53
题目传送门 题目描述 NEKO#ΦωΦ has just got a new maze game on her PC! The game's main puzzle is a maze, in the forms of a 2×n2×n rectangle grid. NEKO's task is ...
分类:
其他好文 时间:
2020-04-04 22:34:42
阅读次数:
81