math
文章平均质量分 50
CZWin32768
这个作者很懒,什么都没留下…
展开
-
CodeForces#round308C解题报告
题目描述:Vanya has a scales for weighing loads and weights of masses w0, w1, w2, ..., w100 grams where w is some integer not less than 2(exactly one weight of each nominal value). Vanya wonder原创 2015-06-20 01:00:27 · 607 阅读 · 0 评论 -
BestCoder 1st Anniversary 1003(HDU5312)
问题描述 BestCoder 1st Anniversary 1003(HDU5312) Soda习得了一个数列, 数列的第n(n≥1)项是3n(n-1)+1. 现在他想知道对于一个给定的整数m, 是否可以表示成若干项上述数列的和. 如果可以, 那么需要的最小项数是多少? 输出最小花费这道题很容易被当成贪心,然后就跪了。后来看了题解也理解了很久,是三角形数的题,构造很巧妙。 这个题原创 2015-08-01 18:36:57 · 535 阅读 · 0 评论 -
RGCDQ (HDU5317)
RGCDQ题目描述 Mr. Hdu is interested in Greatest Common Divisor (GCD). He wants to find more and more interesting things about GCD. Today He comes up with Range Greatest Common Divisor Query (RGCDQ). What原创 2015-08-26 21:52:46 · 610 阅读 · 2 评论 -
HDU4497 GCD and LCM
HDU4497 GCD and LCM题目描述 Given two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L? Note, gcd(x, y, z)原创 2015-08-17 22:47:32 · 763 阅读 · 0 评论 -
hdu5778 abs 简单数论
题目描述给定一个数x,求正整数y\geq 2y≥2,使得满足以下条件: 1.y-x的绝对值最小 2.y的质因数分解式中每个质因数均恰好出现2次。 对于每组数据,输出一行y-x的最小绝对值解法暴力向两边找,但是要注意要先开方!代码#include<bits/stdc++.h>using namespace std;typedef long long ll;bool sat(ll z) {原创 2016-08-10 13:59:39 · 514 阅读 · 0 评论