上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
摘要: 题意:输入一个数x 从小到大输出所有满足 (k*leny+y)*x=y*10+k 的k*leny+y思路:因为x 为浮点数 所以等式两边都要乘 1e4 将等式化为 k(leny*x-1)*1e4=y(1e5-x*1e4) 可以通过枚举 len k 来求出y是否存在 存在时位数又是否符合条... 阅读全文
posted @ 2015-04-05 02:48 sola94 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 题意:给出若干数字 如果能被6整除 输出BEER!! 否则输出 BOOM!!思路:用三维数组存下0到9 暴力出每个数的值 求出结果 (这题有点坑在于 1 数字可能不存在 2 数字的数量不确定)#include#include#include#includeusing namespace... 阅读全文
posted @ 2015-04-01 21:14 sola94 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题意:求出1^m+2^m+...n^m思路:直接套用模板#include#include#include#include#include#include#include#include#include#define LL long longusing namespace std;const LL m... 阅读全文
posted @ 2015-03-29 23:31 sola94 阅读(148) 评论(0) 推荐(0) 编辑
摘要: http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2071&pid=6题意:有一个由n个数组成的序列 要求出一个满足 max-min#include#include#include#include#include#include#include... 阅读全文
posted @ 2015-03-29 23:18 sola94 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题意:需要从(0,0) 点 到(x,y) 修一段路 其中有n条和y轴平行的河 修路的单位成本c1 修桥的单位成本c2 问最小总成本为多少思路:把所有河合并 再三分桥的长度 求出最小成本#include#include#include#include#include#in... 阅读全文
posted @ 2015-03-29 22:53 sola94 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 题意:说有1*x和2*x的长方形(1和2只能作为宽 ) 有一个2*m的空间 问如何组合才能使m的值最小思路:对2x的长方形不需要得讨论 对1x的长方形的记录总长度 并01背包 找到最接近sum/2 的值#include#include#include#include#... 阅读全文
posted @ 2015-03-29 21:22 sola94 阅读(129) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;const int MAXN=1000000+5;struct road{ int f,t; int w;};road vil[MAXN];int fa[1000+5];int target[... 阅读全文
posted @ 2015-03-26 21:18 sola94 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#include#include#include#define LL __int64using namespace std;const double EPS=1e-9;const int MAXN=100... 阅读全文
posted @ 2015-03-26 16:50 sola94 阅读(153) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#includeusing namespace std;char str[20];int main(){ int n; int len,ans; int s1,s2; int i,j,k; while(sc... 阅读全文
posted @ 2015-03-26 16:46 sola94 阅读(158) 评论(0) 推荐(0) 编辑
摘要: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1536题意: 输入n个只为 0或1 的数 形成一个排列 再输入m个数 每个数代表 目标排列 (样例 1 0 0 1 0 1 1 3 2 目标排列有可能为 1 ... 阅读全文
posted @ 2015-03-26 16:43 sola94 阅读(171) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页