zzuli 2266: number 大致题意:   给定n,问有多少数对<x, y>满足: x, y∈[1, n], x < y            x, y中出现的[0, 9]的数码种类相同 输入 一个整数n (n <= 107) 输出 输出一个数即答案 样例输入           30  样例输出           3 大致思路: N的值其实也不是很大,可以考虑跑一次循环把每个值全部分离一次,然后将用二进制上的第0-第9位的‘1’来表示数码0-9,并且要用数组进行标记防…
原题:http://acm.zzuli.edu.cn/problem.php?cid=1099&pid=9 [描述] [输入] [输出] Sample Input 3 1 10 3 10 5 3 1 2 1 3 5 1 2 3 4 5 3 1 2 1 2 4 2 5 Sample Output Yes No Yes   [代码] 转自:http://www.cnblogs.com/chenchengxun/p/4443560.html #include<stdio.h> #includ…
[题目链接:J-堆] 1734: 堆 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 239  Solved: 113 SubmitStatusWeb Board Description…
http://acm.zznu.edu.cn/problem.php?id=1967 这套题的有毒   我交了好多遍才对 坑:机关要按照顺序走 并且在走这个机关之前不能走这个机关  但是能穿过这个机关   所以不能把机关刚开始设成墙 要设成其他符号 #include <iostream> #include <cstring> #include <algorithm> #include <queue> #include <cstdio> #incl…
http://acm.zznu.edu.cn/problem.php?id=1964 题目描述 输入 输出 样例输入 2 2 1 0 1 1 0 3 1 0 1 1 1 0 1 1 1 0 样例输出 0.500 1.125 提示 之前想了一个公式  就是0.5*pow(0.5,k)*C(k,n); k是至少认识k个人   n是认识n个人 后来队友都把所有的东西都写出来了我才去验证第二个测试数据  发现是错的  当时真的想自己从五楼上跳下来 正确的公式应该是 for(i=k;i<=n;i++) {…
Phone Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 12345, after pressing 123, we call A, and not…
Biggest Number 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描述 You have a maze with obstacles and non-zero digits in it: You can start from any square, walk in the maze, and finally stop at some square. Each step, you may only walk into one of the four neighb…
题目描述 We define Shuaishuai-Number as a number which is the sum of a prime square(平方), prime cube(立方), and prime fourth power(四次方). The first four Shuaishuai numbers are: How many Shuaishuai numbers in [1,n]? (1<=n<=50 000 000) 输入描述: The input will co…
Petr stands in line of n people, but he doesn't know exactly which position he occupies. He can say that there are no less than a people standing in front of him and no more than b people standing behind him. Find the number of different positions Pe…
题目链接; http://acm.zzuli.edu.cn/problem.php?id=2618 题目描述 玩了这么多游戏,V决定还是去做几道ACM题练练手,于是翻到了一道201X年ACM/ICPC亚洲区域赛某站的现场赛签到试题,但是由于多年不刷题,已经忘了怎么做了作为将来的ACM校队扛把子的你,请帮助他解决一下吧.现场赛题目如下:Jenny likes balls. He has some balls and he wants to arrange them in a row on the…