随笔分类 -  ---杂题---

摘要:题目连接:http://codeforces.com/contest/676/problem/B 题意:给你一个N层的杯子堆成的金字塔,倒k个杯子的酒,问倒完后有多少个杯子的酒是满的 题解:由于数据不是很大,直接模拟就行了 1 #include<cstdio> 2 #include<cstring> 阅读全文
posted @ 2016-05-26 21:03 bin_gege 阅读(116) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5701 题意:不解释 1 #include<cstdio> 2 #define FFC(i,a,b) for(int i=a;i<=b;++i) 3 #define FFI(i,a,b) for(int 阅读全文
posted @ 2016-05-22 23:09 bin_gege 阅读(135) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5690 题意: Problem Description F(x, m)F(x,m) 代表一个全是由数字xx组成的mm位数字。请计算,以下式子是否成立: F(x,m)\ mod\ k\ \equiv \ c 阅读全文
posted @ 2016-05-21 17:06 bin_gege 阅读(148) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3067 题意:中文,不解释 题解:一看就知道是要找规律的题,都是有循环节的,看代码。 1 #include <cstdio> 2 3 int main(){ 4 int i,a,n,sum,ans; 5 阅读全文
posted @ 2016-05-19 23:54 bin_gege 阅读(145) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4651 题意:给你一个数n,让你输出将n拆分的方案数。 题解:公式题,不解释,当模版记住就行 1 #include <cstdio> 2 #include <cstring> 3 #define LL l 阅读全文
posted @ 2016-05-18 23:11 bin_gege 阅读(115) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5680 题意: 问题描述 输入描述 输出描述 输入样例 输出样例 Hint 题解: 乍一看,还有点吓人,其实就是输出最大值 1 #include<cstdio> 2 int main(){ 3 int t 阅读全文
posted @ 2016-05-14 22:27 bin_gege 阅读(297) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5683 题意: 问题描述 输入描述 输出描述 输入样例 输出样例 Hint 题解:在BC的终测 我居然TLE了,不科学,唐老师放宽了时限,和我写法差不多,常数也差不多的都过了,然而我没过,很是不爽,然而在 阅读全文
posted @ 2016-05-14 22:19 bin_gege 阅读(222) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4823 题意:中文题,很清楚,要注意的是乘起来会爆int 题解: 1 #include<cstdio> 2 int main(){ 3 long long t,n,m,v,k,ans,pre; 4 sca 阅读全文
posted @ 2016-05-09 15:49 bin_gege 阅读(133) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3063 题意:中文题,说的很清楚,不解释 题解:公式题,具体看代码 1 #include<stdio.h> 2 #include<string.h> 3 #define mod 4*9999 4 /* 5 阅读全文
posted @ 2016-05-09 00:07 bin_gege 阅读(161) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2111 题意:给你n个物品的单位体积价值和体积,求装满容量v的背包的最大价值。 题解:乍一看还以为是背包问题,结果给的是单位体积的价值,一个简单的贪心就能水过 1 #include<cstdio> 2 # 阅读全文
posted @ 2016-05-07 12:47 bin_gege 阅读(154) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5676 在这%一下安神,用了我没见过的黑科技next_permutation,至少我是今天才知道的 1 #include<cstdio> 2 #include<cstring> 3 #include<cm 阅读全文
posted @ 2016-04-30 23:25 bin_gege 阅读(142) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2608 反正我是没找出这个规律的,规律参考的别人的! 1 #include<cstdio> 2 #include<cmath> 3 int main(){ 4 int t,n; 5 scanf("%d", 阅读全文
posted @ 2016-04-30 16:59 bin_gege 阅读(284) 评论(0) 推荐(0)