04 2016 档案
摘要:ZOJ Problem Set - 3939 The Lucky Week Time Limit: 2 Seconds Memory Limit: 65536 KBEdward, the headmaster of the Marjar University, is ve...
阅读全文
摘要:Highway Project Time Limit: 2 Seconds Memory Limit: 65536 KBEdward, the emperor of the Marjar Empire, wants to build some bidirectional ...
阅读全文
摘要:Problem Description There is a string S.S only contain lower case English character.(10≤length(S)≤1,000,000) How many substrings there are that co...
阅读全文
摘要:题目: Figure A Sample Input of Radar Installations 题意: 在x轴上某些位置装雷达,问怎么才能使海岛p被信号覆盖,有n个海岛,雷达覆盖范围是d。 分析: 考虑一个海岛p,对于覆盖它的雷达放的最优的位置是它在圆圈的边缘上,因为这样这个雷达就可以...
阅读全文
摘要:Sequence Accepts: 59 Submissions: 650 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 \ \ \ \...
阅读全文
摘要:题意: 给你n个区间,问第i个区间有多少个子区间? 分析: 跟poj2481那题差不多,把区间看成是一个点,那么一个区间的子区间一定在它的右下方,即x比他的大,y比他的小的点。然后用树状数组搞下就好,因为题目范围是( - 1e9≤ li #include#include#inclu...
阅读全文
摘要:题意: 给n个区间,问第i个区间是多少个区间的子区间。分析: 可以吧每一个线段看成是一个点,这样的话就等价于问一个点的左上方有多少个点?这样就和Stars那题一样了。 因为是求左上方有多少个点,那么把所有点按照y从大到小排列,这样就可以按照顺序求出0~x之间有多少个点,就是它左上方...
阅读全文
摘要:题目大意: 在坐标上有n个星星,如果某个星星坐标为(x, y), 它的左下位置为:(x0,y0),x0#include#includeusing namespace std;const int N=32005;int c[N],level[N];int lowbit(int x){...
阅读全文
摘要:C. Foe Pairstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation ...
阅读全文
摘要:题意: 有n行n列的小黑点,还有m条边连接这些小黑点,统计这些线段连接成几个正方形。 分析: 枚举每个点,看看以这个点为右下角的正方形是否可以,然后枚举边长,控制正方形的大小,判断是否可以构成正方形使用map记录边,然后查询就可以。#include#include#include#...
阅读全文
摘要:Description In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tiling of a 2x17 rectangle. Input Input is a s...
阅读全文
摘要:题目:http://poj.org/problem?id=1131 题意: 给出一个0-1之间的八进制小数,要求转换成10进制小数。 分析: 因为There is no limit on k,所以要用高精度了。import java.io.*;import java.math.*;...
阅读全文
摘要:看了一天的数论了,整个人都要疯了,逆元部分我是看的这篇博客:点击打开链接 先做一道题目吧,受不了了QAQ 题目:http://www.lydsy.com/JudgeOnline/problem.php?id=2186 题意:求中互质的数的个数,其中。 分析: 先我们看到题目要求的是1...
阅读全文
摘要:题目: http://www.lydsy.com/JudgeOnline/problem.php?id=2818 题意: Description给定整数N,求1= x, 当y = x时,有且只有y = x = 1互质,当y > x时,确定y以后符合条件的个数x就是phiy 所以有序...
阅读全文
摘要:Problem Description CA is a fine comrade who loves the party and people; inevitably she loves GCD (greatest common divisor) too. Now, there a...
阅读全文
摘要:题目: In an attempt to escape the Mischievous Mess Makers’ antics, Farmer John has abandoned his farm and is traveling to the other side of Bov...
阅读全文

浙公网安备 33010602011771号