传送门 1199 - Partitioning Game PDF (English) Statistics Forum Time Limit: 4 second(s) Memory Limit: 32 MB Alice and Bob are playing a strange game. The ...
分类:
其他好文 时间:
2017-08-14 21:30:57
阅读次数:
187
https://vjudge.net/problem/LightOJ-1074 首先吐槽一个单词,directional是有方向的,undirectional是无向的,这个unidirectional是tm单向的。。。。好吧我又学会一个单词。 由于有负边权,用spfa好啦,判断负环时不要遇见就ret ...
分类:
其他好文 时间:
2017-08-14 20:06:12
阅读次数:
126
描述 Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course the ...
分类:
其他好文 时间:
2017-08-14 16:25:51
阅读次数:
296
描述 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度, ...
分类:
其他好文 时间:
2017-08-14 12:47:10
阅读次数:
139
题目描述 由乃正在做她的OJ。现在她在处理OJ上的用户排名问题。OJ上注册了n个用户,编号为1~",一开始他们按照编号 排名。由乃会按照心情对这些用户做以下四种操作,修改用户的排名和编号:然而由乃心情非常不好,因为Deus天 天问她题。。。因为Deus天天问由乃OI题,所以由乃去学习了一下OI,由于 ...
分类:
其他好文 时间:
2017-08-14 10:08:21
阅读次数:
195
You are given a 2D board where in some cells there are gold. You want to fill the board with 2 x 1 dominoes such that all gold are covered. You may us ...
分类:
其他好文 时间:
2017-08-13 15:10:36
阅读次数:
141
You run a marriage media. You take some profiles for men and women, and your task is to arrange as much marriages as you can. But after reading their ...
分类:
其他好文 时间:
2017-08-13 14:14:29
阅读次数:
206
OJ题号: BZOJ1856、洛谷1641 思路: 总方案数为$\binom{n+m}{m}$,非法方案数为$\binom{n+m}{m-1}$。 则合法方案数为$(n-m+1)\frac{(n+2)(n+3)...(n+m)}{m!}$。 其中除以$m!$可以用乘以逆元实现,边乘边模。 因为要求出 ...
分类:
其他好文 时间:
2017-08-13 14:13:13
阅读次数:
101
001题目描述 计算字符串最后一个单词的长度,单词以空格隔开。 输入描述: 一行字符串,非空,长度小于5000。 输出描述: 整数N,最后一个单词的长度。 示例1 输入 hello world 输出 5思路::遍历一遍找到空格个数,在遍历一遍定位最后一个空格 然后总长度减去定位 就是最后一个字母的长 ...
分类:
其他好文 时间:
2017-08-12 21:21:45
阅读次数:
201
题目要求: 输入代码: #include<iostream> using namespace std; int main() { int i,j,n,k; int num[7]= {1, 5,10,50,100,500,1000}; //罗马数字转换模板 char str[7]= {'I','V', ...
分类:
其他好文 时间:
2017-08-12 17:13:08
阅读次数:
168