uva 10330 Power Transmission如果对最大流不熟悉的话可以先去看看这个题目大意:先来讲解一下INPUT。首先读入一个正整数N, 接下来N个数据是N个调节器的容量;然后读入一个正整数M, 接下来M组数据代表的是M条调节器与调解器之间的线路(调节器u, 调节器v, 容量);最后的一组数据先是两个正整数a和b, 接下来的a个数据代表的是初始的调节器,最后的b个数据代表的是终结的调节...
分类:
其他好文 时间:
2015-07-15 13:28:22
阅读次数:
112
Weekend Party
Time Limit: 2 Seconds Memory Limit: 65536 KB
As the only Oni (a kind of fabulous creature with incredible strength and power) living on the surface of Gensokyo, Ibuki Suika ...
分类:
其他好文 时间:
2015-07-15 11:15:27
阅读次数:
114
The 5-digit number, 16807=75, is also a fifth power. Similarly, the 9-digit number, 134217728=89, is a ninth power.
How many n-digit positive integers exist which are also an nth power?
这样的数字满...
分类:
其他好文 时间:
2015-07-14 17:58:13
阅读次数:
195
acm训练中碰到的 题目 HDU 2035 ,1097求 A^B 其实就是把B不断二分降次 得到 (A^2)^(B/2)若B%2==1 则要特殊处理 即 A*(A^2)^(B/2)下面给出 递归 和非递归代码 1 int power(int a,int b) 2 { 3 int res=...
分类:
其他好文 时间:
2015-07-14 17:52:44
阅读次数:
100
Dart Essentials
目录
1
Getting Started2
Practical Dart3
The Power of HTML5 with Dart4
Developing a Mobile App with Dart5
Web Components with polymer.dart6
AngularDart7
Ser...
分类:
其他好文 时间:
2015-07-13 16:23:53
阅读次数:
143
Given an integer, write a function to determine if it is a power of two.判断一个数是不是2的幂。思路,找出该数中二进制位1的个数 public boolean isPowerOfTwo(int n) { if...
分类:
其他好文 时间:
2015-07-12 17:10:52
阅读次数:
85
Windows Azure系列-- 配置Azure Power Shell...
Given an integer, write a function to determine if it is a power of two.//初始理解为把数字拆分为两个整数的乘积。。。英语差真操蛋C++:class Solution {public: bool isPowerOfTwo(...
分类:
其他好文 时间:
2015-07-12 14:07:19
阅读次数:
63
该题最简单的办法是迭代除2直到不能再除,看余数是否为1,更好的办法暂时没有想到。
class Solution {
public:
bool isPowerOfTwo(int n) {
if(n 1){
if(n % 2 == 1)
...
分类:
其他好文 时间:
2015-07-12 11:19:19
阅读次数:
80