??
Printer Queue
Time Limit: 1000MS
 
Memory Limit: 65536K
Total Submissions: 3679
 
Accepted: 1975
Description
The only printer in the computer science students' union is...
                            
                            
                                分类:
其他好文   时间:
2014-05-23 08:05:45   
                                阅读次数:
273
                             
                         
                    
                        
                            
                            
                                POJ 2318 TOYS
题目大意:
	第一行n,m,x1,x2,y1,y2,表示有个玩具收纳盒被n个线段分为n+1块,编号依次是0,1,2....n,这个收纳盒的左上角坐标是x1,y1,右下角是x2,y2,接下来n行u0,l0,是指给你这些线段的坐标,(u0,y1)与(l0,y2) ,紧接着是m行,表示玩具的坐标,问你每一块玩具的个数
解题思路:
	利用二分求出玩具所在哪一块,因为在左边或者在右边,满足单调性,利用叉积算出在左边还是右边。
解题代码:见文章...
                            
                            
                                分类:
其他好文   时间:
2014-05-23 07:51:28   
                                阅读次数:
322
                             
                         
                    
                        
                            
                            
                                Sunscreen
Time Limit: 1000MS
 
Memory Limit: 65536K
Total Submissions: 3317
 
Accepted: 1171
Description
To avoid unsightly burns while tanning, each of the C (1 ≤ C ≤ 25...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 12:10:39   
                                阅读次数:
261
                             
                         
                    
                        
                            
                            
                                知识点:
     最小公倍数(a,b)=a*b/最大公约数(a,b)
                                                    
Party
Description
The CEO of ACM (Association of Cryptographic Mavericks) organization has...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 11:41:33   
                                阅读次数:
354
                             
                         
                    
                        
                            
                            
                                题意:推箱子的题目,求最短的路径,如果推的最短一样的话,就算上走的最短
思路:首先我们记录状态:箱子的位置和人的位置,我们先BFS箱子的最短,然后我们可以通过推的方向得到人的位置,然后再BFS人是否能到这里的最短路#include 
#include 
#include 
#include 
#include 
using namespace std;
const int MAXN = 50;
...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 10:57:35   
                                阅读次数:
292
                             
                         
                    
                        
                            
                            
                                题目大意:
       给定一个区间范围[M,E],接下来有n行输入,每行输入三个数值:T1,T2,S,表示覆盖区间[T1,T2]
的代价为S,要求你求出覆盖区间[M,E]的最小代价,如果不能覆盖,则输出-1.
解题思路:
 
        先将区间按右端点进行排序,这样我们就能得到dp状态的定义和转移方程:
   
               dp[i...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 10:22:51   
                                阅读次数:
309
                             
                         
                    
                        
                            
                            
                                ??
Terrible Sets
Time Limit: 1000MS
 
Memory Limit: 30000K
Total Submissions: 2999
 
Accepted: 1549
Description
Let N be the set of all natural numbers {0 , 1 , 2 , . . . ...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 09:52:10   
                                阅读次数:
283
                             
                         
                    
                        
                            
                            
                                Nearest number - 2
Description
Input is the matrix A of N by N non-negative integers....
                            
                            
                                分类:
其他好文   时间:
2014-05-22 09:38:33   
                                阅读次数:
236
                             
                         
                    
                        
                            
                            
                                Primes
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3204
Accepted: 1245
Description
A pretty straight forward task, calculate the number of primes b...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 09:02:28   
                                阅读次数:
517
                             
                         
                    
                        
                            
                            
                                POJ 2773 Happy 2006
题目大意:
	给定m,k,问你第K个与m互质的数是多少?  其中  m (1 <= m <= 1000000), K (1 <= K <= 100000000).
解题思路:
	用位运算的容斥原理,计算 [1,x]与m互质的数的方法是:
    假设 m的质因数为 a,b,c ,那么与m不互斥的数个数为 f(a)+f(b)+f(c)-f(ab)-f(ac)-fa(bc)+f(abc),f(t)的含义是 (1,x)有多少个数与t不互质,很明显f(t)=x/t,那么与m互...
                            
                            
                                分类:
移动开发   时间:
2014-05-20 13:50:30   
                                阅读次数:
291