题目链接 题意: n个节点,给定每一个节点的子树(包含自己)的节点个数。每一个节点假设有子节点必定大于等于2。求这种数是否存在 n (1?≤?n?≤?24). 分析: 用类似DP的思路,从已知開始。这题的已知显然是叶子,那么从叶子開始考虑。如今给一个节点,子树节点数为x。那么从叶子中找x-1个就可以 ...
分类:
其他好文 时间:
2017-05-24 19:18:45
阅读次数:
224
0 small games: number guess: import random answer = random.randint(1,10) guess = int(input('please input your guess: ' )) i = 2 while i : if guess != ...
分类:
编程语言 时间:
2017-05-23 00:26:45
阅读次数:
210
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron ...
分类:
编程语言 时间:
2017-05-16 10:54:52
阅读次数:
160
出处:https://askubuntu.com/questions/253632/how-do-i-get-a-ralink-rt3290-wireless-card-working 解决为问题:Linux下rt3290驱动原为rt2800pci.ko导致网络不稳定,网速慢等问题。更新为rt329 ...
分类:
系统相关 时间:
2017-05-14 14:22:08
阅读次数:
1795
在Fedora 13 系统上编译busybox(非交叉编译)产生错误 root@localhost # make ... gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wularations -Wde ...
分类:
其他好文 时间:
2017-05-13 14:23:46
阅读次数:
165
// // main.m // 猜数 // #import <Foundation/Foundation.h> #import "Guess.h" int main(int argc, const char * argv[]) { Guess * number = [[Guess alloc]ini ...
分类:
移动开发 时间:
2017-05-02 13:45:36
阅读次数:
231
Guess the number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 160000/160000 K (Java/Others)Total Submission(s): 163 Accepted Submission(s): 60 ...
分类:
其他好文 时间:
2017-05-02 09:57:45
阅读次数:
216
package com.lovo.homework; import java.util.Scanner; public class GuessGame { private int[] backNum = new int[4]; private int[] inputNum = new int[4]; ...
分类:
其他好文 时间:
2017-04-29 15:12:43
阅读次数:
140
cd boost_1_64_0/tools/build ./bootstrap.sh --with-toolset=gcc 输出: -n Bootstrapping the build engine with toolset gcc... engine/bin.macosxx86_64/b2 Boo ...
分类:
系统相关 时间:
2017-04-26 23:48:23
阅读次数:
442
一、如何实现输入密码时不可见? import getpass pwd= getpass.getpass(“请输入密码:") (pycharm内可能不可用) 二、if.....else age=25 guess_age = int(input('你猜我多少岁?')) #python3.X 中input ...
分类:
其他好文 时间:
2017-04-23 18:05:10
阅读次数:
140