题目链接: http://hihocoder.com/problemset/problem/1185# 题意: n个点,每个点有一个权值,m条有向边,从1出发,每走到一个点, 就吃掉这个点的草,当没有可以到达的草场或是能够到达的草场都已经被吃光了之后就要返回到1了。求最多可以吃掉多少草。 思路: 提 ...
分类:
移动开发 时间:
2017-06-07 11:15:00
阅读次数:
236
Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一 ...
分类:
其他好文 时间:
2017-06-05 23:45:08
阅读次数:
247
题意:平面上有 n (2 ≤ n ≤ 15) 个点,现用平行于坐标轴的矩形去覆盖所有点,每个矩形至少盖两个点,矩形面积不可为0,求这些矩形的最小面积。 析:先预处理所有的矩形,然后dp[s] 表示 状态 s 时,最少需要的面积是多少。 代码如下: ...
分类:
其他好文 时间:
2017-06-05 23:41:10
阅读次数:
213
/** * @overview A minimalistic wrapper around React Native's AsyncStorage. * @license MIT */import { AsyncStorage } from 'react-native';import merge f ...
分类:
其他好文 时间:
2017-06-05 18:58:56
阅读次数:
447
You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the w ...
分类:
其他好文 时间:
2017-06-04 10:42:11
阅读次数:
130
qwb与小数 Description qwb遇到了一个问题:将分数a/b化为小数后,小数点后第n位的数字是多少? 做了那么多题,我已经不指望你能够帮上他了。。。 qwb遇到了一个问题:将分数a/b化为小数后,小数点后第n位的数字是多少? 做了那么多题,我已经不指望你能够帮上他了。。。 Input 多 ...
分类:
其他好文 时间:
2017-06-03 15:18:17
阅读次数:
201
1. 应该n是偶数,就行吧。应该判断1个人,只能出现一次吧。 1 #include<bits/stdc++.h> 2 #define pb push_back 3 typedef long long ll; 4 using namespace std; 5 typedef pair<int, int ...
分类:
其他好文 时间:
2017-06-01 23:46:15
阅读次数:
458
一、服务器概况Galera Cluster需要至少三个节点,在此次实验过程中,三个节点IP地址:192.168.56.101192.168.56.102192.168.56.103OS为centos 7.2服务器配置:4G 内存,2核CPU,20G数据磁盘空间。 关闭防火墙: 关闭SELinux: ...
分类:
数据库 时间:
2017-06-01 21:42:38
阅读次数:
594
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main... ...
分类:
其他好文 时间:
2017-06-01 13:05:07
阅读次数:
137
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int maxn=100010; int t[maxn][2],f[maxn],s[maxn],lmax[maxn],lmin[maxn ...
分类:
其他好文 时间:
2017-05-31 23:05:50
阅读次数:
245