http://poj.org/problem?id=1083
Description
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.
The floor has 200 rooms...
分类:
其他好文 时间:
2015-03-12 22:37:28
阅读次数:
167
Problem Description
Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that there is no stick on top of them. Stan has notic...
分类:
其他好文 时间:
2015-03-10 12:09:02
阅读次数:
166
bzoj 2301 莫比乌斯反演
题意:
给出a,b,c,d, 求符合条件a
限制:
1
思路:
这道题可以化为:求 1
这个问题可以用莫比乌斯反演解决。
设f(k)为gcd(x,y)=k的数对(x,y)的数目,
设F(k)为gcd(x,y)为k的倍数的数对(x,y)的数目,显然F(k)=floor(t1/k)*floor(t2/k),由于这道题case数比...
分类:
其他好文 时间:
2015-03-05 14:45:53
阅读次数:
114
java 中取整操作提供了四种方法:分别是:public static double ceil(double a)//向上取整public static double floor(double a)//向下取整public static long round(double a)//四舍五入取整pub...
分类:
编程语言 时间:
2015-03-05 12:53:34
阅读次数:
194
MATLAB取整函数(1)fix(x) : 截尾取整.>> fix( [3.12 -3.12])ans = 3 -3(2)floor(x):不超过x 的最大整数.(高斯取整)>> floor( [3.12 -3.12])ans = 3 -4(3)ceil(x) : 大于x 的最小整数>> c...
分类:
其他好文 时间:
2015-03-04 22:26:03
阅读次数:
157
hdu 1695 莫比乌斯反演
题意:
给出a,b,c,d,k, 求满足a
限制:
a=c=1; 0
思路:
其实是求满足1
莫比乌斯反演入门题
设f(k)为gcd(x,y)=k的数对(x,y)的对数,我们要求的是f(1)
设F(k)为gcd(x,y)为k的倍数的数对(x,y)的对数,可以想到F(k)=floor(b/k)*floor(d/k),
由莫比乌...
分类:
其他好文 时间:
2015-03-04 21:06:36
阅读次数:
142
我们经常用到的PHP取整函数,主要是:ceil,floor,round,intval。1、ceil -- 进一法取整说明float ceil ( float value )返回不小于 value 的下一个整数,value 如果有小数部分则进一位。ceil() 返回的类型仍然是 float,因为 fl...
分类:
Web程序 时间:
2015-03-04 14:23:11
阅读次数:
145
常用的类型: 1.数学: Math.ceil():天花板数 Math.floor():地板数 Math.round():四舍五入取整数 Math.random():生成0-1之间的随机数 2.日期时间: var s = new Date(); var s = new Date(1999,7,23);...
分类:
Web程序 时间:
2015-03-02 20:51:33
阅读次数:
250
#include
#include
typedef __int64 LL;
LL dp[10][1<<10];
int n, m;
int st, flag;
void dfs(int i, int s, int ns, int j, LL num)
{
if(j == m)
{
dp[i+1][ns] += num;
return;
}
if((s&(1<<j)) == 0)...
分类:
其他好文 时间:
2015-03-02 14:51:37
阅读次数:
115
%%% Vortex
%%% 漩涡效果
clc;
clear all;
close all;
addpath('E:\PhotoShop Algortihm\Image Processing\PS Algorithm');
I=imread('4.jpg');
Image=double(I);
[row, col,channel]=size(Image);
R=floor(max(row,...
分类:
其他好文 时间:
2015-03-02 13:07:33
阅读次数:
202