C - Point on Spira
    
            
摘要:Time Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 279ADescriptionValera the horse lives on a plane. The Cartesian coordinate system is defined on this plane. Also an infinite spiral is painted on the plane. The spiral consists of segments:[(0, 0), 
        
阅读全文
                posted @ 
2013-11-26 17:16 
straw_berry
        
阅读(212) 
         
        推荐(0)     
             
            
            
    The Same Game(模拟)
    
            
摘要:http://poj.org/problem?id=1027题意:给一个10*15的地图,里面填充R,G,B三种颜色,每次找到当前地图的同色最大区域M,并将其删除,删除M后,上面的小球自然下落,当有空列时,空列右边的小球同时向左移动一列, 当最后地图上同色最大区域的小球个数是1或0时,循环结束;注意输出格式,最后输出一个空行。思路:while(true){ 找到同色最大区域,包括其面积Maxsize,坐标,颜色(BFS,手写队列); if (Maxsize == 1 || Maxsize == 0) break; 删除该最大区域,即将map[i][j] 置为0,(BFS,手写队列)...
        
阅读全文
                posted @ 
2013-11-05 20:54 
straw_berry
        
阅读(238) 
         
        推荐(0)     
             
            
            
    Flesch Reading Ease(模拟)
    
            
摘要:http://poj.org/problem?id=3371终于遇到简单一点的模拟题了。不过本人真心没有耐心读题目。。。它的大致意思就是给一段合法的文章,求出这段文章的单词数,句子数,音节数,按照题目给出的公式带入就出结果。>因为输入是按空格作为字符串结束标志的,因此每输入一个字符串就是一个单词,>句子结束的标志是 . ? : ; !五种,每输入一个字符串只须判断其最后一个字符是否是. ? : ; !的一种,若是,句子数加1.>对于音节数,单词长度 2 #include 3 #include 4 #include 5 using namespace std; 6 7 bool
        
阅读全文
                posted @ 
2013-10-30 20:19 
straw_berry
        
阅读(830) 
         
        推荐(0)     
             
            
            
    Instant Complexity(模拟,递归)
    
            
摘要:Time Limit:1000MSMemory Limit:10000KTotal Submissions:1535Accepted:529DescriptionAnalyzing the run-time complexity of algorithms is an important tool for designing efficient programs that solve a problem. An algorithm that runs in linear time is usually much faster than an algorithm that takes quadr
        
阅读全文
                posted @ 
2013-10-29 21:39 
straw_berry
        
阅读(768) 
         
        推荐(0)     
             
            
            
    Lucky and Good Months by Gregorian Calendar(模拟)
    
            
摘要:http://poj.org/problem?id=3393好大的一道模拟题,直接当阅读理解看了。下面是大神写的题意,解释的好详细。定义:Goog month : 该月第一个工作日为星期一的月份Luckly month: 该月最后一个工作日为星期五的月份问: 给定一个Gregorian Calendar格里高公历的时间闭区间(就是包括端点的年月了)【开始年、月】~【结束年、月】 在这个时间区间内,有多少个Goog month,有多少个Luckly month文章要点:Gregorian Calendar格里高公历 就是现在广泛使用公历(西历),下面简称GCGC的起始日期为 1年1月1号,该日为
        
阅读全文
                posted @ 
2013-10-28 21:05 
straw_berry
        
阅读(338) 
         
        推荐(0)