随笔分类 -  解题报告

上一页 1 ··· 5 6 7 8 9
摘要:时间限制: 0.5 sec空间限制: 4096 KB描述 多米诺骨牌,一种用小的方的木块或其他材料,每个都被一些点在面上标记,这些木块通常被称为骨牌。每个骨牌的面都被一条线分成两个 方形,两边各有一定点数。 N个多米诺骨牌,每个骨牌左右两侧分别有一个0~6的整数(骨牌可以旋转以调换其左右两数),... 阅读全文
posted @ 2014-06-27 18:12 keambar 阅读(898) 评论(0) 推荐(0)
摘要:Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other. Of course, a... 阅读全文
posted @ 2014-05-24 01:00 keambar 阅读(220) 评论(0) 推荐(0)
摘要:DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn... 阅读全文
posted @ 2014-05-24 00:45 keambar 阅读(166) 评论(0) 推荐(0)
摘要:直接上分析:首先 弄清各种大写字母的操作的实质K 明显 是 and &A 是 or |N 是 not !C 由表格注意到 当 w#include #include #define Det 112using namespace std;int val[5];string st;stack inte;... 阅读全文
posted @ 2014-05-24 00:25 keambar 阅读(202) 评论(0) 推荐(0)
摘要:DescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. Al... 阅读全文
posted @ 2014-05-24 00:11 keambar 阅读(192) 评论(0) 推荐(0)
摘要:Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, ... 阅读全文
posted @ 2014-05-23 23:53 keambar 阅读(280) 评论(0) 推荐(0)
摘要:The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Special JudgeDescriptionThe game “The P... 阅读全文
posted @ 2014-05-23 23:40 keambar 阅读(218) 评论(0) 推荐(0)
摘要:Description There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and wants to earn as much money as possible in ... 阅读全文
posted @ 2014-04-29 14:42 keambar 阅读(357) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/keam37/p/3639294.html keam所有 转载请注明出处Problem DescriptionGive you two definitions tree and rooted tree. An undirected connected g... 阅读全文
posted @ 2014-04-01 21:49 keambar 阅读(677) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/keam37/p/3637717.html keam所有 转载请注明出处 Problem Description We can number binary trees using the following scheme: 我们用下面的规则来给一颗二叉树编号: The empty tree is numbered 0.... 阅读全文
posted @ 2014-04-01 10:30 keambar 阅读(509) 评论(0) 推荐(0)
摘要:数论题,考查了本原勾股数(PPT) 对一个三元组(a,b,c)两两互质 且满足 a2 + b2 = c2 首先有结论 a 和 b 奇偶性不同 c总是奇数(可用反证法证明,不赘述) 设 a为奇数 b为偶数 a,b,c互质 有 a2 = c2 – b2 =(c-b)(c+b) 由于c和b互质 且a为奇数 (c-b)与(c+b)也互质 令(c+b)=s2 (c-b)=t2 有 c=(s2+t2)/2 b=(s2-t2)/2 a=st 这时可以枚举s 和 t 保证 s t 互质 非本原勾股数只需乘上一个系数即可 1 #include 2 #include 3 #include 4 int ... 阅读全文
posted @ 2013-12-01 18:59 keambar 阅读(322) 评论(0) 推荐(0)
摘要:题目本身上手并不难,字符串处理+简单的排序。要注意的地方是浮点数的处理。 依据计算机中浮点数的表示原理,在实际编程的过程中即使用一个确定的整数(假设是1)给一个浮点变量赋值 在查看变量时会发现实际存储的值是0.99999…….可以注意到在使用原来的EPX*k时也有可能出现这样的情况,本来是准确值应该是100,浮点运算却会得到 99.999……由于k只有两位小数,因此一个整数乘上k,最多还是只有两位我们令 新的经验new_epx=epx*k+0.001当然可以用任何比0.01小的数,都能在不会影响正确结果的前提下修正错误结果。 1 #include 2 #include 3 #include . 阅读全文
posted @ 2013-11-05 22:10 keambar 阅读(371) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9