Sawtooth Puzzle
Time Limit: 10 Seconds Memory Limit: 65536 KB
Recently, you found an interesting game called Sawtooth Puzzle. This is a single-player game played on a grid with 3 x 3 cells....
分类:
其他好文 时间:
2014-09-11 09:42:44
阅读次数:
248
将边权拆成两半加到它所关联的两个点的点权中即可。因为当两个人分别选择不同的点时,这一权值将互相抵消。然后排序从最优开始取。
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
using namespace std;
const int maxn=...
分类:
其他好文 时间:
2014-09-10 22:32:11
阅读次数:
226
分析多个文件组成的源代码,最好使用辅助工具。
我试过Source Navigator 和 Source Insight,感觉后者功能多些,比较好用。
一、程序的组成模块等文件
这个挖地雷游戏,主要由2种文件组成:
1、程序模块
主程序main.py:负责主窗口物件,按钮和菜单的设置、事件处理、程序初始化、结束等等。
游戏逻辑模块game_scene.py:负责游戏规则、棋盘显示、胜负裁...
分类:
其他好文 时间:
2014-09-10 22:31:31
阅读次数:
261
【题意简述】:就是猜数,我想大家一定会在电视上看过这样类似的节目。
【分析】:WA到死,本来就应该是一道简单的水题,但是由于我本人也很水,在控制字符的输入上有了点小问题,所以做了很久!想的也有点杂,有点多!还是题做得少。
这个是我WA到死的代码!!
// WA 代码!!
#include
#include
using namespace std;
int main()
{
int a...
分类:
其他好文 时间:
2014-09-10 21:11:21
阅读次数:
191
dead space 2 game reviewBut the case, where Stop Shop and Pyramid Contractors were named as plaintiffs, is certain to raise serious questions about co...
分类:
其他好文 时间:
2014-09-10 19:17:30
阅读次数:
319
这两天有空翻了翻大神写的《innodb存储引擎》,手痒亲身实践。由于此书出版了有段时日,没有用其推荐的python工具,通过点滴推敲,略微发现其中冰山一角的奥秘。对于今后对于一些问题查证或数据迁移可能会有帮助。话不多说,开码。·大结构innodb数据文件按照 :【segment,extent,pag...
分类:
数据库 时间:
2014-09-10 13:57:40
阅读次数:
269
Jump Game II
Total Accepted: 16242 Total
Submissions: 65802My Submissions
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each elem...
分类:
其他好文 时间:
2014-09-10 01:38:59
阅读次数:
227
Description
10-20-30
A simple solitaire card game called 10-20-30 uses a standard deck of 52 playing cards in which suit is irrelevant. The value of a face card (king, queen,...
分类:
其他好文 时间:
2014-09-09 20:08:59
阅读次数:
327
import traceback
import random
import pygame
from pygame.locals import *
pygame.display.init()
pygame.font.init()
sizes = {
"screen" : ( 300, 480 )
}
colors = {
"font" : ( 138, 69, 252 ),
...
分类:
其他好文 时间:
2014-09-09 18:19:59
阅读次数:
350
想学会PyQt。按习惯做法,从分析学习编程实例着手。
从网上找了个“挖地雷”的源码,大卸八块,仔细解剖,力图学到些东西。
原程序中有bug,如:“棋盘”没有下边界线;挖出全部地雷后,程序没反应,不认定获胜。
我已将其铲掉,可以正常运行了。
程序源码可在此下载
所做修改,都在game_scene.py。共有2处:
一是在函数checkWin()中,原文是:
if ((self.mine...
分类:
其他好文 时间:
2014-09-09 12:51:09
阅读次数:
279