ZOJ Problem Set - 3792 Romantic Valuehttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5300模板题,有两种统计边数的办法,一种是扩大边权flow*=mod,然后加flow+=1,最后的最小割就...
分类:
其他好文 时间:
2014-08-26 13:38:26
阅读次数:
483
Description
A square root of a number x is a number
r such that r2 = x. A discrete square root of a non-negative integer
x is a non-negative integer
r such that r2
x mod N , 0r <
N , where ...
分类:
其他好文 时间:
2014-08-25 21:10:04
阅读次数:
252
描述求关于x的同余方程ax ≡ 1 (mod b)的最小正整数解。格式输入格式输入只有一行,包含两个正整数a, b,用一个空格隔开。输出格式输出只有一行,包含一个正整数x0,即最小正整数解。输入数据保证一定有解。样例1样例输入1[复制]3 10样例输出1[复制]7限制每个测试点1s提示对于40%的数...
分类:
其他好文 时间:
2014-08-25 21:05:34
阅读次数:
231
Description
Given a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such tha...
分类:
编程语言 时间:
2014-08-25 19:20:04
阅读次数:
230
SELECT TIME(NOW()); -- 15:23:07SELECT CURTIME(NOW());-- 15:23:07SELECT ABS(-4); -- 4SELECT 5 MOD 3; -- 2SELECT CURDATE(); -- 2014-08-25SELECT ADDDATE(...
分类:
数据库 时间:
2014-08-25 16:48:34
阅读次数:
258
这是题目的答案#include#includeusing namespace std;int a[45002];int b[45002];int mod(int a, int b, int c){ int z = 1; while(b) { if(b%2) ...
分类:
其他好文 时间:
2014-08-25 13:20:14
阅读次数:
132
Problem X
Huge Mod
Input: standard input
Output: standard output
Time Limit: 1 second
The operator for exponentiation is different from the addition, subtraction, multiplication or division opera...
分类:
其他好文 时间:
2014-08-25 11:55:14
阅读次数:
249
数字三角形2从三角形顶端走到最下面一行所经过数字的和sum mod 100要最大一开始,我就想确定最后的值是最大的关键的地方在哪里,想老久也想不出,觉得这不可能的事情嘛,后来看了题解,原来这是类似于存在性验证的一类DP,即求出0...99哪个结果可能出现,然后取其中的最大值就是结果。设状态vis[i...
分类:
其他好文 时间:
2014-08-24 23:43:33
阅读次数:
211
第一题:题目大意:二进制数 n mod m 的结果是多少? n 的长度(二进制数的位数)<=200 000; m 的长度(二进制数的位数)<=20。解题过程:1.我的算法是直接高精度模拟,但是数据坑爹地有前导0,有前导0的4个点都WA了。。高精度除法的编程复杂度确实有点。2.标程算法要简单的多,考虑...
分类:
其他好文 时间:
2014-08-24 23:28:43
阅读次数:
323
以前项目中遇到的一个很诡异的问题,记录下来分享一下。一个很老的项目的生产环境是采用Apache httpd + Tomcat,使用mod_jk2的插件进行整合,其实这个插件早已停止更新了,反而是mod_jk(1.x)插件的生命周期还在维持。具体问题的现象是,项目中有一些耗时较多的处理页面,例如一个创...
分类:
其他好文 时间:
2014-08-24 11:28:42
阅读次数:
549