题意:给一个n*m的矩阵,你只能选择一个格子把这个格子的数换成p(也可以一个都不换),问最大子矩阵和最小可能是多少? 思路: 思路就是上面这个思路,这里简单讲一下怎么n^3求最大子矩阵和:枚举两行(或者两列),然后把每一列之和看做一个数字,这样二维就变成了一维,我们可以直接求最大子串和的方法。初始一 ...
分类:
其他好文 时间:
2019-01-22 01:20:57
阅读次数:
180
成绩:(CF) rank2112 AC2/5 Score1694 rating1594( 27) 题目: "Codeforces Round 533 (Div. 2)" 错题题解: "B. Zuhair and Strings" "D. Kilani and the Game" "E. Helpin ...
分类:
其他好文 时间:
2019-01-21 15:55:02
阅读次数:
143
题目链接:https://codeforces.com/contest/1105/problem/D 题意:p 个人在 n * m 的地图上扩展自己的城堡范围,每次最多走 a_i 步(曼哈顿距离),按 1 ~ p 的顺序,问最后每个人占领的点的数量。 题解:用一个队列维护当前起点,用另一个队列模拟当 ...
分类:
其他好文 时间:
2019-01-21 01:12:05
阅读次数:
218
游戏的虚拟世界中,最让人happy的一个因素就是主角挂了,而且重来,只要restart就行了,不象现实中人的生命只有1次。回顾上节的效果,如果方块向下落时,挡板没接住,整个游戏就跪了: 如果我们希望方块挂了之后,可以重新来过,可以这样做,修改Game类的update方法: 效果如下: 可以看到,方块 ...
分类:
其他好文 时间:
2019-01-20 23:37:24
阅读次数:
464
接上回继续,方块不断向上跳动的过程中,从视觉上看,整个背景屏幕应该不断向下滚动,而且上方要不断出现新档板(否则就没办法继续向上跳了),这节我们将来实现这种效果,感觉好象很复杂,但实现起来其实很简单,只要对main.py略做调整: Game类的update方法改成下面这样 要点: 1. 如果方块跳到了 ...
分类:
其他好文 时间:
2019-01-20 22:55:01
阅读次数:
186
https://vjudge.net/problem/2135718/origin You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of t ...
分类:
其他好文 时间:
2019-01-20 14:57:42
阅读次数:
138
题目: http://acm.hdu.edu.cn/showproblem.php?pid=1054 关于匈牙利算法的博客讲解 https://www.cnblogs.com/shenben/p/5573788.html https://blog.csdn.net/qq_40938077/artic ...
分类:
编程语言 时间:
2019-01-20 13:44:32
阅读次数:
219
整理人:贺振原 A - Generous Kefa (1) 马鸿儒 (2) 朱远迪 B - Godsend (1) 马鸿儒 (2) 朱远迪 C - Leha and Function D - Leha and another game about graph E - New Year and Anc ...
分类:
其他好文 时间:
2019-01-20 12:09:08
阅读次数:
179
Problem Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he i ...
分类:
其他好文 时间:
2019-01-20 11:50:29
阅读次数:
168
Petya loves computer games. Finally a game that he's been waiting for so long came out! The main character of this game has n different skills, each o ...
分类:
其他好文 时间:
2019-01-20 00:54:18
阅读次数:
145