【大一】【水题】
8306734
这个作者很懒,什么都没留下…
展开
-
HDU 2082 找单词【母函数】
Problem Description 假设有x1个字母A, x2个字母B,..... x26个字母Z,同时假设字母A的价值为1,字母B的价值为2,..... 字母Z的价值为26。那么,对于给定的字母,可以找到多少价值 Input 输入首先是一个整数N,代表测试实例的个数。 然后包括N行数据,每行包括26个 Output 对于每个测试实例,请输出能找到的总价原创 2014-11-15 12:42:55 · 352 阅读 · 0 评论 -
HDU 2054 A == B? 【字符串】
Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers A and B. Output for each case, if A is原创 2014-11-15 13:35:51 · 466 阅读 · 0 评论 -
POJ 1269 Intersecting Lines
Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel,原创 2014-12-19 16:49:58 · 253 阅读 · 0 评论 -
nyist 46 - 最少乘法次数
题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=46 描述: 给你一个非零整数,让你求这个数的n次方,每次相乘的结果可以在后面使用,求至少需要多少次乘。如24:2*2=22(第一次乘),22*22=24(第二次乘),所以最少共2次; 题目较为简单,考察二进制的思想。 考虑将同底数的乘法转换为幂的加法,即:k^a *原创 2014-12-04 12:04:05 · 337 阅读 · 0 评论 -
nyist - 阶乘因式分解(二) and 阶乘因式分解(一)
题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=56 (一)描述: 给定两个数m,n,其中m是一个素数。 将n(0 题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=70 (二)描述: 给定两个数n,m,其中m是一个素数。 将n(0 注:^为求幂符号。原创 2014-12-04 12:23:32 · 557 阅读 · 0 评论 -
nyist - 139 - 我排第几个【康托展开应用】
题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=139 描述: 现在有"abcdefghijkl”12个字符,将其所有的排列中按字典序排列,给出任意一种排列,说出这个排列在所有的排列中是第几小的? 此题较简单,为康托展开的应用。。 康托和逆康托展开:http://blog.csdn.net/qq_2298635原创 2014-12-05 14:31:03 · 360 阅读 · 0 评论 -
HDU 1709 The Balance【特殊母函数】
Problem Description Now you are asked to measure a dose of medicine with a balance and a number of weights. Certainly it is not always achievable. So you should find out the qualities which cannot be原创 2015-02-05 23:55:35 · 310 阅读 · 0 评论 -
POJ 3009 Curling 2.0【深度优先搜索】
Description On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a squa原创 2015-02-17 15:56:46 · 348 阅读 · 0 评论