二分时间+2sat
边加多了....RE了好久......
Now
or later
Time Limit: 9000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
[Submit] [Go Back] [Status]
D...
题目链接:11782 - Optimal Cut
题意:按前序遍历给定一棵满二叉树,现在有k次,可以选k个节点,获得他们的权值,有两个条件:
1、一个节点被选了,他的子节点就不能选了。
2、最终选完后,根到所有叶子的路径上,都要有一个被选的节点。
思路:树形dp,dp[u][k]代表在结点u,可以选k个节点,那么就分两种情况
选u节点,dp[u][k] = node[u];
选子节点之...
ACM 巴什博弈 kiki's game hdu2147 PN表格构建...
.h
#include "cocos2d.h"
#include "cocos-ext.h"
#include "ui/CocosGUI.h"
#include "cocostudio/CocoStudio.h"
USING_NS_CC;
USING_NS_CC_EXT;
using namespace ui;
void selectedItemEvent(Ref *pSender, ...
小明系列问题——小明序列
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 1567 Accepted Submission(s): 463
Problem Description
大家都知道小明最喜欢研究...
Problem I
Automatic Poetry
Input: standard input
Output: standard output
Time Limit: 2 seconds
Memory Limit: 32 MB
“Oh God”, Lara Croft exclaims, “it’s one of these dumb rid...
Artificial Intelligence?
Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and underst...
Excuses, Excuses!
Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time requi...
【题目】
Your boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is written on them...
【题目】
Problem E
Open Credit System
Input: Standard Input
Output: Standard Output
In an open credit system, the students can choose any course they like, but there is a problem. Some of the stude...
.h
#include "cocos2d.h"
#include "cocos-ext.h"
#include "ui/CocosGUI.h"
#include "cocostudio/CocoStudio.h"
USING_NS_CC;
USING_NS_CC_EXT;
using namespace ui;
RichText* _richText;
Text...
很早之前,就听说过三层结构了。当时只知道 三层结构 是把 系统的 界面 跟 数据库操作等不相关的程序分别开来。原来这么简单的实现,确实传说中的 三层结构啊。
首先,先来看一下是哪三层。表示层(UI,User Interface),业务逻辑层(BLL BusinessLogicLayer),数据访问层(DAL Data Access Layer)。三层的划分是物理上的划分。
表示层(UI),这...
题意:给出一串字符串,求出需要至少插入多少个字符使得这个字符串变成会问粗...
hdu 1063 Exponentiation 高精度数 模拟乘法...
也是有趣的题目,操作机器人,要求写一个指令序列。
不过本题对指令序列并没有太严格的要求,所以,基本上可以满足条件 - 放满钱币就可以了,对指令顺序没有要求。
下面是一种程序的写法,循环扫描,还有很多种写法的。...
Sudoku
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 13023
Accepted: 6455
Special Judge
Description
Sudoku is a very simple task. A square table with 9...
Sudoku
Time Limit: 10000MS
Memory Limit: 65536K
Total Submissions: 4203
Accepted: 2051
Description
A Sudoku grid is a 16x16 grid of cells grouped in sixteen 4x4 squares...