杭电ACM试题详细分类,杭电oj详细分类,hdu详细分类,详细,ACM.doc

合集下载

ACM题目分类总结及pku题目分类

ACM题目分类总结及pku题目分类

ACM题目分类总结及pku题目分类第一篇:ACM题目分类总结及pku题目分类ACM题目分类总结及pku题目分类ACM-题型分类的代码主流算法:1.搜索 //回溯 2. DP(动态规划)3.贪心4.图论 //Dijkstra、最小生成树、网络流 5.数论 //解模线性方程6.计算几何 //凸壳、同等安置矩形的并的面积与周长 7.组合数学 //Polya定理 8.模拟9.数据结构 //并查集、堆 10.博弈论1、排序, 1723, 1727, 1763, 1788, 1828, 1838, 1840, 2201, 2376, 2377, 2380, 1318, 1877, 1928, 1971, 1974, 1990, 2001, 2002, 2092, 2379,1002(需要字符处理,排序用快排即可)1007(稳定的排序)2159(题意较难懂)2231 2371(简单排序)2388(顺序统计算法)2418(二叉排序树)2、搜索、回溯、遍历1022 1111 1118 1129 1190 1562 1564 1573 1655 2184 2225 2243 2312 2362 2378 2386 1010 1011 1018 1020 1054 1062 1256 1321 1363 1501 1650 1659 1664 1753 2078 2083 2303 2310 2329 简单:1128, 1166, 1176, 1231, 1256, 1270, 1321, 1543, 1606, 1664, 1731, 1742, 1745, 1847, 1915, 1950, 2038, 2157, 2182, 2183, 2381, 2386, 2426不易:1024, 1054, 1117, 1167, 1708, 1746, 1775, 1878, 1903, 1966, 2046, 2197,2349 推荐:1011, 1190, 1191, 1416, 1579, 1632, 1639, 1659, 1680, 1683, 1691, 1709, 1714, 1753, 1771, 1826, 1855, 1856, 1890, 1924, 1935, 1948, 1979, 1980, 2170, 2288, 2331, 2339, 2340,1979(和迷宫类似)1980(对剪枝要求较高)3、历法1008 2080(这种题要小心)4、枚举1387,2363,2381,1054(剪枝要求较高),1650(小数的精度问题)5、数据结构的典型算法容易:1182, 1656, 2021, 2023, 2051, 2153, 2227, 2236, 2247, 2352, 2395, 不易:1145, 1177, 1195, 1227, 1661, 1834,推荐:1330, 1338, 1451, 1470, 1634, 1689, 1693, 1703, 1724, 1988, 2004, 2010, 2119, 2274, 1125(弗洛伊德算法),2421(图的最小生成树)6、动态规划1037 A decorative fence 1050 To the Max 1088 滑雪Stockbroker Grapevine 1141 Brackets Sequence 1159 Palindrome 1160 Post Office 1163 The Triangle 1458 Common Subsequence 1579 Function Run Fun 1887 Testing the CATCHER 1953 World Cup Noise 2386 Lake Counting7、贪心 , , 1230, 1323, 1477, 1716, 1784,1328 1755(或用单纯形方法),2054,1017,1328,1862, 1922, 2054,2209,2313,2325,23708、模拟容易:1006, 1008, 1013, 1016, 1017, 1169, 1298, 1326, 1350, 1363, 1676, 1786, 1791, 1835, 1970, 2317, 2325, 2390,不易:1012, 1082, 1099, 1114, 1642, 1677, 1684, 1886,1281 1928 2083 2141 20159、递归 166410、字符串处理1488, 1598, 1686, 1706, 1747, 1748, 1750, 1760, 1782, 1790, 1866, 1888, 1896, 1951, 2003, 2121, 2141, 2145, 2159, 2337, 2359, 2372, 2406, 2408, 1016 1051 1126 1318 1572 1917 1936 2039 2083 2136 2271 2317 2330,2121 240311、数论1014, 1023, 1061, 1152, 1183, 1730, 226212、几何有关的题目凸包:1113, 1228, 1794, 2007, 2187,1113 wall,2187 beauty contest 容易:1319, 1654, 1673, 1675, 1836, 2074, 2137, 2318, 不易:1685, 1687, 1696, 1873, 1901, 2172, 2333,13、任意精度运算、数字游戏、高精度计算1001 1023 1047 1060 1079 1131 1140 1142 1207 1220 1284 1289 1306 1316 1338 1405 1454 1503 1504 1519 1565 1650 1969 2000 2006 2081 2247 2262 2305 2316 2389 1001, 1220, 1405, 1503,1001(高精度乘法)2413(高精度加法,还有二分查找)14、概率统计 1037,105015、小费用最大流、最大流2195 going home2400 supervisor, supervisee 1087 a plug for UNIX 1149 PIGS 1273 drainage ditches 1274 the perfect stall 1325 machine schedule 1459 power network 2239 selecting courses16、压缩存储的DP1038 bugs integrated inc,1185 炮兵阵地,2430 lazy cow17、最长公共子串(LCS)1080 human gene functions,1159 palindrome,1458 common subsequence,2192 zipper18、图论及组合数学2421 Constructing Roads 2369 Permutations 2234 Matches Game 2243 Knight Moves 2249 Binomial Showdown 2255 Tree Recovery 2084 Game of Connections 1906 Three powers 1833 排列 1850 Code1562 Oil Deposits 1496 Word Index 1306 Combinations1125 Stockbroker Grapevine 1129 Channel Allocation 1146 ID Codes1095 Trees Made to Order找规律2247 Humble Numbers2309 BST2346 Lucky tickets 2370 Democracy in danger 2365 Rope2101 Honey and Milk Land 2028 When Can We Meet? 2084 Game of Connections 1915 Knight Moves 1922 Ride to School 1941 The Sierpinski Fractal 1953 World Cup Noise1958 Strange Towers of Hanoi 1969 Count on Canton 1806 Manhattan 2025 1809 Regetni 1844 Sum1870 Bee Breeding 1702 Eva‘s Balance 1728 A flea on a chessboard 1604 Just the Facts 1642 Stacking Cubes 1656 Counting Black1657 Distance on Chessboard 1662 CoIns 1663 Number Steps 1313 Booklet Printing 1316 Self Numbers 1320 Street Numbers 1323 Game Prediction 1338 Ugly Numbers 1244 Slots of Fun 1250 Tanning Salon 1102 LC-Display 1147 Binary codes 1013 Counterfeit Dollar19、博弈类1067 取石子游戏1740 A New Stone Game 2234 Matches Game 1082 Calendar Game 2348 Euclid‘s Game 2413 How many Fibs? 2419 Forest20、简单、模拟题1001 Exponentiation 1002 487-3279 1003 Hangover1701 Dissatisfying Lift 2301 Beat the Spread!2304 Combination Lock 2328 Guessing Game 2403 Hay Points 2406 Power Strings2339 Rock, Scissors, Paper 2350 Above Average2218 Does This Make Me Look Fat? 2260 Error Correction 2262 Goldbach‘s Conjecture 2272 Bullseye2136 Vertical Histogram 2174 Decoding Task 2183 Bovine Math Geniuses 2000 Gold Coins 2014 Flow Layout 2051 Argus 2081 Calendar 1918 Ranking List 1922 Ride to School 1970 The Game 1972 Dice Stacking 1974 The Happy Worm 1978 HanafudaShuffle 1979 Red and Black 1617 Crypto Columns 1666 Candy Sharing Game 1674 Sorting by Swapping 1503 Integer Inquiry 1504 Adding Reversed Numbers 1528 Perfection1546 Basically Speaking 1547 Clay Bully 1573 Robot Motion 1575 Easier Done Than Said? 1581 A Contesting Decision 1590 Palindromes1454 Factorial Frequencies 1363 Rails1218 THE DRUNK JAILER 1281 MANAGER 1132 Border1028 Web Navigation21、初等数学1003 Hangover 1045 Bode Plot1254 Hansel and Grethel 1269 Intersecting Lines 1401 Factorial 1410 Intersection 2363 Blocks 2365 Rope2242 The Circumference of the Circle 2291 Rotten Ropes 2295 A DP Problem2126 Factoring a Polynomial 2191 Mersenne Composite Numbers 2196 Specialized Four-Digit Numbers 1914 Cramer‘s Rule 1835 宇航员 1799 Yeehaa!1607 Deck1244 Slots of Fun 1269 Intersecting Lines 1299 Polar Explorer 1183 反正切函数的应用22、匹配1274, 1422, 1469, 1719, 2060, 2239,23、经典1011(搜索好题)1012(学会打表)10131019(它体现了很多此类问题的特点)1050(绝对经典的dp)1088(dp好题)1157(花店,经典的dp)1163(怎么经典的dp那么多呀)1328(贪心)1458(最长公共子序列)1647(很好的真题,考临场分析准确和下手迅速)1654(学会多边形面积的三角形求法)1655(一类无根树的dp问题)1804(逆序对)2084(经典组合数学问题)2187(用凸包求最远点对,求出凸包后应该有O(N)的求法,可我就是调不出来)2195(二分图的最佳匹配)2242(计算几何经典)2295(等式处理)2353(dp,但要记录最佳路径)2354(立体解析几何)2362(搜索好题)2410(读懂题是关键)2411(经典dp)24、趣味1067(很难的数学,但仔细研究,是一片广阔的领域)1147(有O(n)的算法,需要思考)1240(直到一棵树的先序和后序遍历,那么有几种中序遍历呢?dp)1426(是数论吗?错,是图论!)1648(别用计算几何,用整点这个特点绕过精度的障碍吧)1833(找规律)1844(貌似dp或是搜索,其实是道有趣的数学题)1922(贪心,哈哈)22312305(不需要高精度噢)2328(要仔细噢)2356(数论知识)2359(约瑟夫问题变种)2392(有趣的问题)25、很繁的题1001 10081087(构图很烦,还有二分图的最大匹配)1128(USACO)1245 13291550(考的是读题和理解能力)1649(dp)2200(字符串处理+枚举)2358(枚举和避免重复都很烦)2361(仔细仔细再仔细)26、难题1014(数学证明较难,但有那种想法更重要)1037(比较难的dp)1405(高精度算法也有等级,不断改进吧)2002(有没有比O(n^2*logn)更有的算法?)2054(极难,很强的思考能力)2085(组合数学)2414(dp,但要剪枝)2415(搜索)2423(计算几何+统计)27、多解题1002(可以用排序,也可以用统计的方法)1338(搜索和dp都可以)1664(搜索和dp都练一练吧)2082(这可是我讲的题噢)2352(桶排和二叉树都行)28、Note:1011: 很经典的剪支 1014: 难在数学上1017: 严格的数学证明貌似不容易1021: 有点繁,考察对图形进行各种旋转 1083: 巧妙的思考角度 1150: 分奇偶讨论,lg(n)算法1218: 三行就够,虽然简单,但也有优劣之别 1505: 二分加贪心1654: 做法也许很多,本人用有向面积做的 1674: 计算圈的个数(算是graph 吧)1700: 数学证明不容易 1742: O(m*n)的算法 1863: 要耐心地慢慢写…^_^ 1988: 并查集 2051: 堆2078: 不难,但剪支可以做到很好2082::O(n),你想到了吗?2084: 卡特兰数 2182: 线段树2195: 最小费用最大流 2234: 经典博弈算法 2236: 并查集 2299: 二分思想2395: Kruskal 最小生成树的拓展 2406: KMP2411: 用二进制串来表示状态第二篇:垃圾分类题目判断1.打印,墨盒属于有害垃圾(×,是可回收垃圾)2.PC塑料瓶可以制成衣服(×是PET塑料瓶)3.废胶卷及废相纸属于其他垃圾(错,应是有害垃圾)4.污染纸张属于其他垃圾(对)5.世界上最早对包装垃圾分类回收进行立法的是德国(对)6.餐厨废弃物资源化利用和无公害化处理试点城市启动至今,目前已有83个城市成为试点(错,应是100个)7.口红是干垃圾(对)8.烟头是有害垃圾(错)9.家里枯萎的水培植物和鲜花属于其他垃圾(错)10.消毒剂及其包装物属于可回收垃圾(错)单选11.城市垃圾分类处理的基本原则是(BC)A.合理利用,变废为宝B.全民动员,科学引导C.政府主导,社会参与D.统筹规划,综合布局12.可以燃烧的生活垃圾包括(AB)A.废旧木头B.废塑料橡胶C.不易回收的废纸D.玻璃13.没有泡过的干茶叶属于哪类垃圾(AC)A.厨余垃圾B.干垃圾C.湿垃圾D.可回收垃圾E.有害垃圾14.以下哪些不与生活垃圾混合投放(ABD)A.沙发B.油漆桶C.宠物饲料D.砖石混凝土15.危险性包装是指盛装具有对人体,动植物和生态环境有危害特性物资的包装物,包括下列哪些特性描述(BCD)A.易爆性B.易燃性C.腐蚀性D.感染性16.生活垃圾分类办法是根据什么来制定的(ABD)A.处理方式B.管理水平C.居民生活习惯D.垃圾特性17.有害生活垃圾单独收运和处理工作已引起社会高度重视,下列废弃物中哪个不是生活中的有害垃圾(AC)A.烟头B.温度计C.碱性电池D.过期药品E.含汞荧光灯18.垃圾分类的意义,在于实现了生活垃圾(BE)减量化,资源化,无害化A.减量化,整合化B.资源化,无害化C.减量化,分类化D.资源化,整合化E.无害化,减量化19.下列关于垃圾分类的语句正确的是(AD)A.红危危,绿厨厨,蓝宝宝,黄其其B.绿色回收又能卖,红色有毒又有害C.蓝色剩菜瓜果皮,黄灰桶里放其他D.湿纸巾再湿也是干垃圾20.白色垃圾的危害(ACD)A.不易降解,混在土壤里影响农作物吸收养分和水分,导致农作物减产B.混在生活垃圾中不会增加后续处理难度C.影响市容及景观D.焚烧过程中产生大量有毒气体多选21.生物垃圾通常指随着时间的推移可以得到化学分解有机物垃圾以及动物尸体,通常占总量的多少(B)A.30%B.40%C.50%D.60%22.回收1.5吨的废纸可以造好纸约(B)公斤(425+850=1275)A.1255B1275C.1295D.130023.一氧化碳可与人血红蛋白结合致人中毒死亡,排放一氧化碳量较多的汽车状态是(A)A.开着发动机停车等候时B.高速行驶C.超速行驶D.缓慢行驶24.那种垃圾可以重新提炼出有用的材料(B)A.厨余垃圾B.有害垃圾C.可回收垃圾D.其他垃圾25.下列不属于其他垃圾的是(C)A.灰土烟头B.废弃纸巾C.果皮D.宠物粪便26.羊毛衫,靠垫,牙签,筷子,旧手机分别属于什么垃圾(C)A.可回收垃圾,干垃圾,干垃圾,可回收垃圾,有害垃圾B.干垃圾,可回收垃圾,干垃圾,可回收垃圾,有害垃圾C.可回收垃圾,可回收垃圾,干垃圾,干垃圾,可回收垃圾D.干垃圾,干垃圾,可回收垃圾,可回收垃圾,有害垃圾27.薄型塑料袋,吃剩的罐头食品,用完的笔芯,受潮过期的瓜子分别属于什么垃圾(B)A.可回收垃圾,湿垃圾,干垃圾,干垃圾B.干垃圾,湿垃圾,干垃圾,湿垃圾C.可回收垃圾,湿垃圾,可回收垃圾,湿垃圾D.干垃圾,湿垃圾,可回收垃圾,干垃圾28.可回收垃圾是指回收后经过再加工,整理可以成为生产原料或再利用的物品,不包括(D)A.电子废弃品B.纸类C.塑料类D.杀虫剂29.黑色塑料袋,洗发水瓶,葡萄干,没用完的铅笔分别属于哪类垃圾(D)A.可回收垃圾,可回收垃圾,干垃圾,可回收垃圾B.干垃圾,可回收垃圾,干垃圾,干垃圾C.可回收垃圾,干垃圾,湿垃圾,可回收垃圾D.干垃圾,可回收垃圾,湿垃圾,干垃圾30.粉底液,大棒骨,鸡骨头,湿垃圾袋分别是什么垃圾(A)A.干垃圾,干垃圾,湿垃圾,干垃圾B.湿垃圾,干垃圾,湿垃圾,可回收垃圾C.干垃圾,湿垃圾,干垃圾,可回收垃圾D.湿垃圾,干垃圾,湿垃圾,干垃圾31.巧克力,菜刀,洗干净的化妆瓶,睫毛夹分别属于什么垃圾(B)A.干垃圾,有害垃圾,可回收垃圾,干垃圾B.湿垃圾,可回收垃圾,可回收垃圾,可回收垃圾C.湿垃圾,有害垃圾,干垃圾,可回收垃圾D.干垃圾,可回收垃圾,干垃圾,干垃圾32.椰壳,木梳,化妆棉,假花分别属于什么垃圾(D)A.干垃圾,有害垃圾,湿垃圾,可回收垃圾B.可回收垃圾,有害垃圾,干垃圾,干垃圾C.可回收垃圾,干垃圾,湿垃圾,干垃圾D.干垃圾,可回收垃圾,干垃圾,可回收垃圾33.新版《生活垃圾分类标志》标准于12月1日起正式实施,由原来的()大类改为现在的四大类,分别为可回收垃圾,有害垃圾,(),()。

杭州电子科技大学OJ题目分类

杭州电子科技大学OJ题目分类

杭州电子科技大学OJ题目分类1001 整数求和水题1002 C语言实验题——两个数比较水题1003 1、2、3、4、5... 简单题1004 渊子赛马排序+贪心的方法归并1005 Hero In Maze 广度搜索1006 Redraiment猜想数论:容斥定理1007 童年生活二三事递推题1008 University 简单hash1009 目标柏林简单模拟题1010 Rails 模拟题(堆栈)1011 Box of Bricks 简单题1012 u Calculate e 简单数学计算1013 STAMPS 搜索or动态规划1014 Border 模拟题1015 Simple Arithmetics 高精度计算1016 Shoot-out 博弈+状态压缩DP1017 Tour Guide1018 Card Trick 简单题1019 Necklace Decomposition 贪心1020 Crashing Robots 模拟题1021 Electrical Outlets 简单题1022 Watchdog 简单题1023 Taxi Cab Scheme 图论:最小路径覆盖--->最大二分匹配1024 Pseudo-random Numbers 数论1025 Card Game Cheater 简单题1026 Investment 动态规划1027 Pipes1028 SETI 数学:高斯消元法1029 Minimax Triangulation 计算几何1030 Unequalled Consumption 母函数1031 Declaration of Content1032 Laserbox 搜索:DFS1033 Bowlstack1034 Pesky Heroes1035 Reduced ID Numbers 暴力1036 Tantrix1037 Guardian of Decency 图论:匈牙利算法求二分图的最大匹配1038 Up the Stairs 简单数学题1039 Sudoku 搜索:DFS1040 The SetStack Computer1041 Pie 二分法1042 Ticket to Ride 动态规划1043 The Bookcase 动态规划1044 Printer Queue 模拟题1045 Prime Path 搜索:BFS1046 Lineland's Airport1047 Leonardo's Notebook 数学题:群置换1048 简易版最长序列简单题1049 Jesse's problem 搜索:DFS1050 Error Correction 模拟题1051 A ×B problem 高精度计算1052 Redraiment的走法动态规划1053 Word Encoding 动态规划1054 Jesse's Code 组合数学:排列1055 简单密码破解水题1056 英文金曲大赛水题1057 有假币水题1058 寄居蟹与海葵水题1059 天仙配水题1060 鹊桥相会水题1061 杨辉三角水题1062 蟠桃记水题1063 养兔子水题1064 字符统计水题1065 完美数水题1066 亲和数水题1067 成绩评估水题1068 找零钱水题1069 漂亮菱形水题1070 Least Common Multiple 水题1071 第几天水题1072 编辑距离水题1073 支配值数目水题1074 等值数目水题1075 两数组最短距离水题1076 输入入门(1) 水题1077 输入入门(2) 水题1078 输入入门(3) 水题1079 输出入门水题1080 Counterfeit Dollar 组合数学1081 Dividing 动态规划1082 Sorting It All Out 图论:拓扑排序1083 False coin 暴力法1084 File Mapping1085 Color Me Less 简单题1086 Round and Round We Go 简单题1087 Microprocessor Simulation 简单题1088 求奇数的乘积水题1089 平方和与立方和水题1090 绝对值排序水题1091 JudgeOnline 水题1092 More Beautiful 水题1093 猴子分桃水题1094 C语言实验题——一元二次方程水题1095 C语言实验题——保留字母水题1096 C语言实验题——排列水题1097 C语言实验题——矩阵转置水题1098 C语言实验题——素数水题1099 Ambiguous permutations 简单题1100 Home Work 贪心法1101 Redraiment的遭遇数学题:找规律1102 Decorate the wall 搜索or动态规划1103 Economic phone calls 动态规划or贪心1104 Any fool can do it 记忆化搜索1105 Wine trading in Gergovia 贪心法1106 Homogeneous squares 随机算法1107 Automatic Correction of Misspellings 字符串处理:字典序1108 Black and white painting 简单数学题1109 Cylinder 计算几何:公式推导1110 Deli Deli 水题1111 Expressions 数据结构:树的遍历1112 Flavius Josephus Reloaded 数论:Pollard's Rho算法1113 Annoying painting tool 贪心法1114 Frequent values RMQ区间最值问题OR 线段树1115 Anagram Groups 字符串匹配1116 Let it Bead 组合数学->Polya定理1117 Simple Computers 简单题1118 Mondriaan's Dream 动态规划1119 Equidistance 计算几何1120 How many Fibs? 高精度计算1121 Hike on a Graph 搜索:BFS1122 ASCII Art1123 Billing Tables1124 Cellular Automaton 矩阵计算1125 Exchange1126 Fool's Game1127 Java vs C++ 字符串处理1128 Kickdown 字符串处理1129 Copying Books 贪心+二分法1130 Adding Reversed Numbers 简单题1131 Glass Beads 字符串的最小表示1132 The Circumference of the Circle 计算几何题1133 Knight Moves 搜索:BFS1134 Eeny Meeny Moo 变形的约瑟夫问题1135 Lotto 组合数学1136 Humble Numbers 动态规划1137 Average is not Fast Enough! 简单题1138 Etaoin Shrdlu 简单题1139 Hard to Believe, but True! 简单题1140 Code the Tree 简单题1141 Fiber Network 图论:全源最短路径,Floyd-Warshall算法1142 Global Roaming 3D几何题1143 All in All 字符串处理1144 The Sierpinski Fractal 递归1145 Assistance Required 简单题:预处理1146 Drink, on Ice 模拟题1147 All Discs Considered 搜索:BFS1148 In Danger 模拟题1149 Run Length Encoding 字符串处理1150 Bee Maja 模拟题1151 Friends 表达式求值1152 John 博弈论1153 Double Queue 最大堆与最小堆1154 ‘JBC’1155 Loan Scheduling 贪心+堆1156 Showstopper1157 Highway 贪心法1158 Computers 动态规划1159 The Stable Marriage Problem 组合数学1160 Arne Saknussemm 模拟题1161 Sum Problem 水题1162 Fire Net 搜索题1163 统计1到N之间数字1的个数推理题1164 最大公因子水题1165 C语言实验题——三个整数水题1166 C语言实验题——大小写转换水题1167 C语言实验题——分数序列水题1168 C语言实验题——最值水题1169 C语言实验题——保留整数水题1170 C语言实验题——矩阵下三角元素之和水题1171 C语言实验题——字符逆序水题1172 C语言实验题——打印菱形水题1173 C语言实验题——分割整数水题1174 C语言实验题——删除指定字符水题1175 C语言实验题——时间间隔水题1176 C语言实验题——数组逆序水题1177 C语言实验题——打印数字图形水题1178 C语言实验题——单词统计水题1179 C语言实验题——最小公倍数和最大公约数水题1180 Crashing Balloon 搜索题1181 念数字模拟题1182 A+B for Input-Output Practice(1) 水题1183 Anagrams by Stack 搜索:回溯1184 Elevator 数学:找规律1185 Substrings 字符串处理1186 Calling Extraterrestrial Intelligence Again 搜索:枚举法1187 Do the Untwist 简单数学题1188 数字对水题1189 A+B for Input-Output Practice (2) 水题1190 火星A+B 简单题1191 三齿轮问题:三个齿轮啮合简单数学题1192 A + B Problem II 高精度计算1193 The ones to remain 数学题1194 Chinese Chess 博弈论1195 Page Replacement 数据结构:队列or hash1196 RSA Signing 数论:Pollard's Rho算法1197 Number Guessing 搜索:穷举1198 求n的阶乘高精度计算1199 Area 计算几何1200 求两直线的夹角水题1201 三角形面积水题1202 Max Sum 动态规划1203 Number Sequence 大数问题1204 u Calculate e 水题1205 斐波那契数列高精度计算1206 Fibonacci Again 大数问题1207 Let the Balloon Rise 字符串处理1208 还是A+B 水题1209 A + B 水题1210 The area 简单计算几何1211 Ignatius's puzzle 简单数学问题1212 Computer Transformation 高精度计算1213 N! 高精度计算1217 Text Reverse 水题1220 填数字游戏搜索:DFS1221 Tempter of the Bone 搜索:DFS or BFS+剪枝1226 Last non-zero Digit in N! 数论1227 三角形递推求解1228 回文数猜想简单题1229 Factorial 简单题1230 Specialized Four-Digit Numbers 简单数学题1231 Lowest Bit 简单题1232 To and Fro 简单题1233 AC Me 简单题1234 Wolf and Rabbit 数论1235 最大连续子序列动态规划1236 开门人和关门人字符串处理1237 排名排序1238 统计难题字符串处理:字典树1239 Tick and Tick 数学题1240 Quoit Design 分治法1241 钱币兑换问题递推求解1242 求出前m大的数简单题1243 角谷猜想简单题1244 Reverse Number 简单题1245 寻找素数对简单题1246 ZJUTACM 简单题1247 Hat's Fibonacci 高精度计算1248 Encoding 简单题1249 四数相加高精度计算1250 两数相减高精度计算1251 Square Coins 母函数1252 Counting Triangles 递推求解1253 2^x mod n = 1 数论:费尔马小定理1254 Minimum Inversion Number 简单题1255 Surround the Trees 计算几何:凸包1256 Number Steps 简单题1257 Binary Numbers 简单题1258 Knight Moves 搜索:BFS1259 Lotto 组合数学1260 A Simple Task 简单题1261 The Drunk Jailer 数论1262 Hanoi Tower Troubles Again! 递推求解1263 IBM Minus One 水题1264 Definite Values 简单题1265 Box of Bricks 水题1266 Perfection 简单题1267 Reverse Text 水题1268 Inversion 模拟题1269 Prime Cuts 简单题1270 How Many Fibs? 高精度计算1271 Round and Round We Go 简单题1272 Red and Black 搜索:DFS1273 What Day Is It? 简单题1274 String Matching 字符串匹配1275 A Contesting Decision 简单题1276 Doubles 简单题1277 The Snail 简单题1278 Jungle Roads 图论:最小生成树1279 Prime Ring Problem 搜索:DFS1280 Big Number 大数问题1281 Least Common Multiple 简单题1283 简单排序水题1284 Gridland 简单题1285 An Easy Task 简单题1286 Calendar Game 模拟题1287 Human Gene Functions 动态规划1288 计算几何练习题——线段相交计算几何1289 计算几何练习题——线段相交II 计算几何1290 计算几何练习题——直线交点计算几何1291 Trees Made to Order 递归求解1292 排序简单题1293 18岁生日简单题1294 吃糖果递推求解1295 变种汉诺塔递推求解1296 洗牌递推求解1297 大数求余数论1298 圆桌会议递推求解1299 畅通工程并查集1300 还是畅通工程最小生成树1301 统计同成绩学生人数水题1302 简单计算器表达式求值:栈的应用1303 改进版计算器表达式求值:栈的应用1304 FatMouse' Trade 贪心法1305 Digital Roots 大数问题1306 Uniform Generator 数论1307 A Mathematical Curiosity 穷举法1308 Safecracker 穷举法1309 The 3n + 1 problem 简单题1310 分享糖果模拟题1311 宝物收集搜索:BFS1312 Climbing Worm 简单题1313 搬桌子贪心法1314 Humble Numbers 动态规划1315 Dividing 动态规划1316 Rightmost Digit 数学问题1317 Leftmost Digit 数学问题1318 Hangover 简单数学问题1319 Exponentiation 高精度计算1320 I Think I Need a Houseboat 简单题1321 Girls and Boys DFS+二分图1322 Monkey and Banana 动态规划1323 买牛奶简单题1324 Matrix Chain Multiplication 数据结构:栈的应用1325 计算成绩简单题1326 Holding Bin-Laden Captive! 母函数1327 You can Solve a Geometry Problem too 计算几何1328 Super Jumping! Jumping! Jumping! 动态规划1329 a^b 数论1330 计算GPA 水题1331 Give me an offer! 动态规划:0-1背包1332 田忌赛马贪心法1333 Asteroids! 搜索:BFS1334 Oil Deposits 搜索:DFS1335 营救天使搜索:BFS1336 小数化分数高精度计算1337 I Hate It 线段树1338 Strange Billboard 位运算+枚举1339 Frobenius 递推求解1340 奇怪的公式数学题1341 Fibonacci again and again 博弈论1342 A New Tetris Game 博弈论1343 Sum It Up 搜索:DFS1344 速算24点搜索1345 推箱子搜索:BFS1346 Pushing Boxes 搜索:BFS1347 The Worm Turns 搜索1348 Alfredo's Pizza Restaurant 简单题1349 Broken Keyboard 字符串处理1350 Convert Kilometers to Miles 简单题1351 单词数水题1352 仙人球的残影简单题1353 Family planning 简单题1354 Rout 66 简单题1355 LC-Display 模拟题1356 A == B ? 高精度计算1357 不容易系列之一递推求解1358 折线分割平面递推求解1359 find the nth digit 二分查找1360 奇数阶魔方(II) 简单题1361 Keep on Truckin' 简单题1362 Factstone Benchmark 简单题1363 Destroy the Well of Life 模拟题1365 Brave Game 博弈论1366 ASCII码排序水题1367 计算两点间的距离水题1368 计算球体积水题1369 求绝对值水题1370 数值统计水题1371 求数列的和水题1372 水仙花数水题1373 多项式求和水题1374 素数判定水题1375 偶数求和水题1376 母牛的故事水题1377 数列有序! 水题1378 发工资咯:)水题1379 C语言合法标识符水题1380 海选女主角水题1381 查找最大元素水题1382 首字母变大写水题1383 统计元音水题1384 Palindromes _easy version 水题1385 汉字统计水题1386 进制转换水题1387 人见人爱A+B 水题1388 人见人爱A-B 水题1389 人见人爱A^B 水题1390 改革春风吹满地计算几何1391 今年暑假不AC 动态规划1392 三角形水题1393 求平均成绩水题1394 不容易系列之二递推求解1395 密码水题1396 一只小蜜蜂... 递推求解1397 不容易系列之(3)——LELE的RPG难题递推求解1398 骨牌铺方格递推求解1399 阿牛的EOF牛肉串递推求解1400 神、上帝以及老天爷递推求解1401 不容易系列之(4)——考新郎递推求解1402 Bitset 简单题1403 Picture 简单模拟题1404 Switch Game 找规律1405 An easy problem 简单模拟题1406 A + B Again 简单题1407 The sum problem 简单数学题1408 龟兔赛跑动态规划1409 Snooker 简单数学题1410 Subset sequence 简单题1411 汉诺塔III 递推求解1412 "红色病毒"问题递推求解1413 小兔的棋盘递推求解1414 RPG的错排错排+排列组合1415 无限的路简单题1416 夹角有多大数学题1417 汉诺塔IV 递推求解1418 复习时间简单题1419 选课时间暴力求解1420 手机短号字符串处理1421 找单词母函数1422 简易版之最短距离数学题1423 数塔动态规划1424 核反应堆简单题1425 A1 = ? 公式推导1426 剪花布条字符串处理1427 不要62 数学题1428 空心三角形字符串处理1429 小明A+B 简单题1430 Sky数进制转换1431 整除的尾数简单题1432 分拆素数和数论1433 正整数解数学题1434 挂盐水模拟题1435 {A} + {B} 简单题1436 小数A+B 高精度计算1437 Zigzag 简单题1438 螺旋形简单题1439 行李寄存简单题1440 判断多边形凹凸计算几何1441 The centre of polygon 计算几何1442 最小正整数简单题1443 Elevator Stopping Plan 二分+贪心法1444 TOYS 计算几何1445 The Doors 计算几何1446 Polygon And Segment 计算几何1447 Fence 计算几何1448 两圆相交面积计算几何1449 Area of Circles 计算几何1450 Pipe 计算几何1451 zero sum 搜索:DFS1452 C语言实验题——Hello World 水题1453 C语言实验题——数日子水题1454 C语言实验题——三个数排序水题1455 C语言实验题——数字串求和水题1456 C语言实验题——拍皮球水题1457 C语言实验题——求一个3*3矩阵对角线元素之和水题1458 C语言实验题——数组逆序水题1459 C实验题——求最大值水题1460 C实验题——求绝对值最大值水题1461 C语言实验题——求平均值水题1462 C语言实验题——打印直角三角形水题1463 C语言实验题——相加和最大值水题1464 C语言实验题——简单编码水题1465 C语言实验题——某年某月的天数水题1466 C语言实验题——各位数字之和排序水题1467 C语言实验题——两个数最大水题1468 C语言实验题——求级数值水题1469 Pipe II 计算几何1470 Transmitters 计算几何1471 Wall 计算几何1472 C语言实验题——逆置正整数水题1473 C语言实验题——找中间数水题1474 C语言实验题——整数位水题1475 C语言实验题——一元二次方程II 水题1476 C语言实验题——圆周率水题1477 C语言实验题——余弦水题1478 C语言实验题——打印金字塔水题1479 C语言实验题——排序水题1480 C语言实验题——约瑟夫问题水题1481 C语言实验题——鞍点水题1482 C语言实验题——计算表达式水题1483 C语言实验题——汉诺塔水题1484 C语言实验题——字符串排序水题1485 C语言实验题——整除水题1486 Solitaire 搜索:(双向)BFS1487 Abbreviation 水题1488 C语言实验题——买糖果水题1489 C语言实验题——字符编码水题1490 C语言实验题——合法的C标识符水题1491 C语言实验题——三角形面积水题1492 C语言实验题——大小写转换水题1493 C语言实验题——圆柱体计算水题1494 C语言实验题——温度转换水题1495 C语言实验题——统计字串水题1496 C语言实验题——字符过滤水题1497 Coin Change 暴力求解1498 Beautiful Meadow 搜索题1499 C语言实验题——鸡兔同笼水题1500 Coins of Luck 数学题:数学期望1501 Friends 搜索:DFS1502 Find All M^N Please 数学题1503 Incredible Cows 搜索:二分+DFS1504 计算直线的交点数递推求解1505 Number Game 动态规划1506 Sort ZOJ7 字符串处理1507 Find 7 Faster Than John Von Neumann 高精度计算1508 免费馅饼动态规划1509 Worm 动态规划1510 Common Subsequence 动态规划1511 搬寝室动态规划1512 Daydream 字符串处理1513 Ballroom Lights1514 Drop the Triples1515 Finding Seats1516 He is offside!1517 Justice League1518 星星点点搜索1519 逆波兰表达式表达式求解:栈的应用1520 十六进制高精度计算1521 Palindromic sequence1522 Hotel 模拟题1523 Intersecting Lines 计算几何1524 Heap Construction 最短路径1525 Pizza Anyone?1526 Adam's Genes1527 Risk1528 Just the Facts 数论1529 Horse Shoe Scoring 计算几何1530 哥德巴赫猜想数论1531 爱的伟大意义简单题1532 校门外的树模拟题1533 最多约数问题数论1534 Quicksum 数学题1535 找规律填数字数学题1536 Accepted Necklace 搜索:DFS1537 除法表达式数论1538 A Walk Through the Forest 图论:最短路径1539 Accurately Say "CocaCola"! 简单题1540 Build The Electric System 图论:最小生成树1541 Colorful Rainbows 计算几何1542 Easy Task 数学题1543 Faster, Higher, Stronger 简单题1544 Give Me the Number 模拟题1545 Hurdles of 110m 动态规划1546 Just Pour the Water 矩阵计算1547 Kinds of Fuwas 穷举法1548 复数运算简单题1549 元素个数排序简单题1550 Fiber Communications1551 Power Hungry Cows 搜索:BFS1552 Cow Cycling 动态规划1553 Rebuilding Roads 树型DP1554 Triangular Pastures 动态规划1555 Chores 动态规划1556 Extra Krunch1557 BUY LOW, BUY LOWER 动态规划1558 Hypnotic Milk Improvement1559 Happy Cows1560 Unary Cow Counting1561 Dairy Route1562 Calf Numbers1563 Hide and Seek1564 Mountain Majesties1565 Secret Milk Pipes1566 Circus Tickets1567 Life Cycle1568 Wiggle Numbers1569 Superwords1570 Cow Brainiacs1571 Pasture Fences1572 New Years Party1573 Strolling Cows1574 Grazing Sets1575 Factorial Power1576 Friday the Thirteenth1577 Beef McNuggets1578 Calf Flac1579 Light Bulbs1580 Cow Math 图论1581 Cow Imposters 动态规划1582 Traffic Lights 递推求解1583 Farm Tour 图论:最短路径1584 Vertical Histogram 简单题1585 Cowties 动态规划1586 Travel Games 搜索:DFS1587 Best Cow Fences 二分法1588 Cornfields RMQ问题1589 Six Degrees of Cowvin Bacon 简单题1590 Herd Sums 简单题1591 Message Decoding 简单题1592 Mountain Walking 二分+flood fill1593 Millenium Leapcow 动态规划1594 Optimal Milking 最大流+二分法1595 Bale Figures 模拟+二分法1596 Jumping Cows 动态规划1597 Lost Cows SBT树1598 Bovine Math Geniuses 简单题1599 Dividing the Path 动态规划1600 Fence Obstacle Course 动态规划1601 Cow Ski Area 图论:flood fill1602 Cleaning Shifts 贪心法1603 Bad Cowtractors 最大生成树1604 Tree Cutting 树状动态规划1605 Navigation Nightmare 并查集1606 Cow Marathon 树状动态规划1607 Distance Queries LCA,tarjan算法1608 Distance Statistics 楼天成大牛“男人八题”中的一道1609 Moo University - Team Tryouts 排序+穷举法1610 Moo University - Emergency Pizza Order1611 Moo University - Financial Aid 最大堆、最小堆1612 Cube Stacking 并查集1613 The Cow Lineup 穷举法1614 MooFest 线段树1615 Turning in Homework 动态规划1616 Alignment of the Planets1617 Finding Bovine Roots1618 Cow Bowling1619 Cow Patterns 字符串匹配的扩展1620 Barn Expansion 二分查找1621 Layout 差分约束系统1622 Knights of Ni 搜索:BFS1623 Cleaning Shifts DP+Heap1624 Scales 搜索+剪枝1625 Secret Milking Machine 二分+网络流1626 Aggressive cows 二分法1627 Rigging the Bovine Election 穷举法1628 Feed Accounting 简单模拟题1629 Muddy Fields 穷举法1630 The Wedding Juicer 堆+flood fill1631 Naptime 动态规划1632 Sumsets 动态规划1633 Moo Volume 简单题1634 Ombrophobic Bovines Floyd-Warshall 1635 Space Elevator 动态规划1636 Yogurt factory 动态规划1637 Checking an Alibi 最短路径1638 Out of Hay1639 Satellite Photographs 搜索:BFS or DFS 1640 Asteroids 最大网络流1641 Grazing on the Run 动态规划1642 Walk the Talk 动态规划1643 City Skyline 栈的应用1644 Cow Acrobats 贪心法1645 Ant Counting 动态规划1646 Hopscotch 搜索:DFS1647 Securing the Barn 穷举法1648 Bovine Birthday 递推求解1649 Max Factor 简单题1650 Flying Right1651 Close Encounter1652 Allowance1653 Lazy Cows1654 Expedition1655 Around the world1656 Landscaping1657 Waves1658 Navigating the City1659 Disease Management1660 Muddy roads1661 Wormholes 最短路径1662 The Fewest Coins 动态规划1663 Milk Patterns 二分法or后缀树1664 Cow Picnic 搜索:BFS or DFS1665 Cow Roller Coaster 动态规划1666 River Hopscotch 二分法+贪心1667 The Moronic Cowmpouter 进制转换1668 DNA Assembly 穷举法1669 Cow Phrasebook 二分法1670 Cellphones 穷举法1671 Steady Cow Assignment 网络流1672 Treats for the Cows 动态规划1673 Backward Digit Sums 穷举法1674 Stump Removal 简单题1675 Finicky Grazers 动态规划1676 The Water Bowls 枚举二进制位1677 Redundant Paths 图论1678 Roping the Field 动态规划1679 Corral the Cows 二分法1680 The Cow Prom 图论1681 Dollar Dayz 动态规划1682 The Grove 最短路径1683 Fence Repair Huffman编码1684 Corn Fields 状态压缩DP1685 Roadblocks 图论:最短路径1686 Bad Hair Day 搜索1687 Big Square 穷举法1688 Round Numbers 枚举二进制位1689 Building A New Barn1690 Cow Sorting 置换群1691 Lilypad Pond 最短路径1692 The Cow Lexicon 动态规划1693 Silver Cow Party 最短路径1694 Problem Solving 动态规划1695 Cow School1696 Protecting the Flowers 贪心法1697 Tallest Cow 区间统计1698 Balanced Lineup RMQ问题1699 Gold Balanced Lineup RMQ问题1700 Ranking the Cows 搜索:DFS1701 Face The Right Way 穷举法1702 Cow Traffic 动态规划1703 Monthly Expense 贪心法1704 Cheapest Palindrome 动态规划1705 Dining 贪心+网络流1706 City Horizon 离散化+ 扫描1707 Catch That Cow 最短路径1708 Fliptile 枚举+位压缩1709 2-Dimensional Rubik's Cube 搜索:BFS 1710 Ball 计算几何1711 3D Camera 三维计算几何1712 Cipher 模拟题1713 Five in a Row 简单题1714 Pinhole Imaging 简单计算几何1715 URL 模拟题1716 Battle of Submarines 集合DP1717 WOJ 动态规划1718 钥匙计数之二递推求解1719 BrokenLED 模拟题1722 A+B again and again! 模拟题1723 Just calculate it! 数论1724 Guess how much I love you? 简单题1725 NBA Finals1726 Find Out an “E”1727 Judging ACM/ICPC1728 Cryptography of Alex1729 Rings of square grid1730 Fermat's Theorem1731 Cup 二分法1732 Find the Path DP+二分法1733 Five in a Row, Again 动态规划1734 Minimum Heap 递推求解1735 Name PK 模拟题1736 Pendant 动态规划1737 Radar 计算几何+搜索1738 Ring 多串模式匹配1739 Run 计算几何1740 Toxophily 简单题1741 通讯录编排简单题1742 超缘分ACM队伍简单题1743 集合运算简单题1744 矩阵计算简单题1745 Arbitrage 动态规划1746 The Tower of Babylon 动态规划1747 Binomial Showdown 组合数学1748 Dungeon Master 搜索:BFS1749 Equation Solver 表达式求值应用1750 Frogger 最短路径1751 Globetrotter 计算几何1752 Tree Recovery 数据结构:二叉树1753 Artificial Intelligence?1754 The Settlers of Catan 搜索1755 France '98 概率问题1756 Goldbach's Conjecture 数论1757 Heavy Cargo 最小生成树1758 Quadtree1759 From Dusk till Dawn or: Vladimir the Vampire 最短路径1760 Euro Cup 20001761 Quadtree II or: Florida Jones strikes back1762 HTML 简单题1763 Paths on a Grid 组合数学:T路问题1764 Balanced Food 动态规划1765 California Jones and the Gate to Freedom 组合数学1766 Diplomatic License 简单计算几何题1767 Polygon Programming with Ease 数学题1768 Hall of Fountains 搜索:BFS or DP1769 The Bottom of a Graph 图论:强连通分量1770 Edge1771 Fold1772 Largest Rectangle in a Histogram 动态规划1773 Boolean Logic1774 Code1775 In Danger 模拟题1776 Fractran1777 Huffman's Greed1778 Bullshit Bingo 字符串处理1779 A Song contest1780 Message1781 The skatepark's new ramps1782 Road1783 Warfare1784 Blackjack1785 Robintron1786 Diamond Dealer 计算几何:凸包1787 Best Compression Ever1788 Code Theft1789 Dinner1790 Event Planning1791 Getting Gold1792 Introspective Caching1793 Just A Few More Triangles!1794 Knights of the Round Table 图论:无向图的块判断奇圈1795 The Cow Doctor 穷举法1796 Wild West 线段树1797 Find the Clones1798 The Warehouse1799 Widget Factory 数论:同余方程组1800 Martian Mining 动态规划3301 字符串;AC自动机,动态规划;状态压缩3302 计算几何3303 数学;代数运算;高斯消元3304 图论;强连通分量;2-SAT3305 动态规划;凸单调性优化3306 枚举3307 贪心3308 数学;代数运算3309 最短路;佛洛伊德3310 动态规划3311 贪心3312 计数问题;递推,数状数组,二分查找3313 数论;欧拉定理,快速幂取模3314 计数问题,数状数组3315 博弈;Surreal数;Farey数列;3316 计数问题;递推,高精度3317 计数问题;容斥原理3318 递推;矩阵乘法3319 数学;概率3320 背包3321 动态规划3322 字符串;AC自动机3323 动态规划3324 博弈3325 搜索3326 贪心3327 最短路3328 数据结构(实现一种数据结构,支持要求的操作),数状数组3329 图论;二分图最大权匹配3330 数学;数论3331 递推;矩阵乘法3332 数学;数论,二分查找3333 计算几何3334 动态规划3335 字符串,后缀数组或拉宾卡普;动态规划3336 数据结构;并查集3337 计数问题,递推3338 二分查找,贪心3339 数学3340 计算几何;凸包,图论;佛洛伊德;最小环3341 动态规划3342 广搜3343 动态规划3344 计算几何3345 二分图最大匹配3346 树型DP3347 动态规划3348 数学;数论;进制3349 计数问题3350 贪心3351 数学;数论;进制3352 动态规划,数论,组合数学3353 数学;数论3354 计数;递推3355 图论;佛洛伊德3356 博弈3357 动态规划3358 数据结构;线段树,数状数组3359 计算几何,动态规划3360 博弈;SG函数3361 图论;最近公共祖先3362 图论;强连通分量;2-SAT 3363 计算几何3364 字符串;AC自动机,动态规划3365 搜索,舞蹈链3366 数学;数论3367 数学;代数运算;高斯消元3368 动态规划3369 计数问题;递推3370 网络流(错题)3371 树型DP3372 数学;高精度3373 数学;3374 RMQ3376 数学;进制3377 字符串;后缀数组3378 动态规划3379 计算几何3380 线段树3381 图论;欧拉路3382 简单题3383 字符串;AC自动机3384 广搜3385 计算几何,矩阵3386 语言处理3387 动态规划;状态压缩3388 图论;全局最小割3389 简单题3390 广搜3391 数学;Pell方程3392 背包3393 计算几何3394 广搜3395 搜索;迭代加深3396 数学;计数问题3397 数学;解方程3398 分析3399 模拟3400 数学;计数问题,数论6 热度。

杭电ACM题目

杭电ACM题目

A +B Problem<1000>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 151346 Accepted Submission(s): 47937Problem DescriptionCalculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample Output2Sum Problem<1001>Time Limit: 1000/500 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 114332 Accepted Submission(s): 26200Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.InputThe input will consist of a series of integers n, one integer per line.OutputFor each case, output SUM(n) in one line, followed by a blank line. Y ou may assume the result will be in the range of 32-bit signed integer.Sample Input1 100Sample Output1 5050A +B Problem II<1002>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 79807 Accepted Submission(s): 14884Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A and B. Notice that the integers are very large, that means you should not process them by using 32-bit integer. Y ou may assume the length of each integer will not exceed 1000.OutputFor each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line is the an equation "A + B = Sum", Sum means the result of A + B. Note there are some spaces int the equation. Output a blank line between two test cases.Sample Input2 1 2 112233445566778899 998877665544332211Sample OutputCase 1: 1 + 2 = 3 Case 2: 112233445566778899 + 998877665544332211 = 1111111111111111110Max Sum<1003>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 55141 Accepted Submission(s): 12401Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line starts with a number N(1<=N<=100000), then N integersfollowed(all the integers are between -1000 and 1000).OutputFor each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line contains three integers, the Max Sum in the sequence, the start position of the sub-sequence, the end position of the sub-sequence. If there are more than one result, output the first one. Output a blank line between two cases.Sample Input2 5 6 -1 5 4 -7 7 0 6 -1 1 -6 7 -5Sample OutputCase 1: 14 1 4 Case 2: 7 1 6Let the Balloon Rise<1004>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30799 Accepted Submission(s): 10110Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result.This year, they decide to leave this lovely job to you.InputInput contains multiple test cases. Each test case starts with a number N (0 < N <= 1000) -- the total number of balloons distributed. The next N lines contain one color each. The color of a balloon is a string of up to 15 lower-case letters.A test case with N = 0 terminates the input and this test case is not to be processed.OutputFor each case, print the color of balloon for the most popular problem on a single line. It is guaranteed that there is a unique solution for each test case.Sample Input5 green red blue red red 3 pink orange pink 0Sample Outputred pinkNumber Sequence<1005>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41359 Accepted Submission(s): 8887Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n).InputThe input consists of multiple test cases. Each test case contains 3 integers A, B and n on a single line (1 <= A, B <= 1000, 1 <= n <= 100,000,000). Three zeros signal the end of input and this test case is not to be processed.OutputFor each test case, print the value of f(n) on a single line.Sample Input1 1 3 12 10 0 0 0Sample Output2 5Tick and Tick<1006>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3278 Accepted Submission(s): 847Problem DescriptionThe three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this and each of them would like to stay away from the other two. A hand is happy if it is at least D degrees from any of the rest. Y ou are to calculate how much time in a day that all the hands are happy.InputThe input contains many test cases. Each of them has a single line with a real number D between 0 and 120, inclusively. The input is terminated with a D of -1.OutputFor each D, print in a single line the percentage of time in a day that all of the hands are happy, accurate up to 3 decimal places.Sample Input0 120 90 -1Sample Output100.000 0.000 6.251Quoit Design<1007>Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9148 Accepted Submission(s): 2204Problem DescriptionHave you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded.In the field of Cyberground, the position of each toy is fixed, and the ring is carefully designed so it can only encircle one toy at a time. On the other hand, to make the game look more attractive, the ring is designed to have the largest radius. Given a configuration of the field, you are supposed to find the radius of such a ring.Assume that all the toys are points on a plane. A point is encircled by the ring if the distanc e between the point and the center of the ring is strictly less than the radius of the ring. If two toys are placed at the same point, the radius of the ring is considered to be 0.InputThe input consists of several test cases. For each case, the first line contains an integer N (2 <= N <= 100,000), the total number of toys in the field. Then N lines follow, each contains a pair of (x, y) which are the coordinates of a toy. The input is terminated by N = 0.OutputFor each test case, print in one line the radius of the ring required by the Cyberground manager, accurate up to 2 decimal places.Sample Input2 0 0 1 1 2 1 1 1 13 -1.5 0 0 0 0 1.5 0Sample Output0.71 0.00 0.75Elevator<1008>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16637 Accepted Submission(s): 8841Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to move down one floor. The elevator will stay for 5 seconds at each stop.For a given request list, you are to compute the total time spent to fulfill the requests on the list. The elevator is on the 0th floor at the beginning and does not have to return to the ground floor when the requests are fulfilled.InputThere are multiple test cases. Each case contains a positive integer N, followed by N positive numbers. All the numbers in the input are less than 100. A test case with N = 0 denotes the end of input. This test case is not to be processed.OutputPrint the total time on a single line for each test case.Sample Input1 2 3 2 3 1 0Sample Output17 41FatMouse' Trade<1009>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16853 Accepted Submission(s): 5150Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i] pounds of JavaBeans and requires F[i] pounds of cat food. FatMouse does not have to trade for all the JavaBeans in the room, instead, he may get J[i]* a% pounds of JavaBeans if he pays F[i]* a% pounds of cat food. Here a is a real number. Now he is assigning this homework to you: tell him the maximum amount of JavaBeans he can obtain.InputThe input consists of multiple test cases. Each test case begins with a line containing twonon-negative integers M and N. Then N lines follow, each contains two non-negative integers J[i] and F[i] respectively. The last test case is followed by two -1's. All integers are not greater than 1000.OutputFor each test case, print in a single line a real number accurate up to 3 decimal places, which is the maximum amount of JavaBeans that FatMouse can obtain.Sample Input5 3 7 2 4 3 5 2 20 3 25 18 24 15 15 10 -1 -1Sample Output13.333 31.500Tempter of the Bone<1010>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24095 Accepted Submission(s): 6634Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately to get out of this maze.The maze was a rectangle with sizes N by M. There was a door in the maze. At the beginning, the door was closed and it would open at the T-th second for a short period of time (less than 1 second). Therefore the doggie had to arrive at the door on exactly the T-th second. In every second, he could move one block to one of the upper, lower, left and right neighboring blocks. Once he entered a block, the ground of this block would start to sink and disappear in the next second. He could not stay at one block for more than one second, nor could he move into a visited block. Can the poor doggie survive? Please help him.InputThe input consists of multiple test cases. The first line of each test case contains three integers N, M, and T (1 < N, M < 7; 0 < T < 50), which denote the sizes of the maze and the time at which the door will open, respectively. The next N lines give the maze layout, with each line containing M characters. A character is one of the following:'X': a block of wall, which the doggie cannot enter;'S': the start point of the doggie;'D': the Door; or'.': an empty block.The input is terminated with three 0's. This test case is not to be processed.OutputFor each test case, print in one line "YES" if the doggie can survive, or "NO" otherwise.Sample Input4 45 S.X. ..X. ..XD .... 3 4 5 S.X. ..X. ...D 0 0 0Sample OutputNO YESStarship Troopers<1011>Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2842 Accepted Submission(s): 704Problem DescriptionY ou, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge cavern, which consists of many rooms connected with tunnels. Each room is occupied by some bugs, and their brains hide in some of the rooms. Scientists have just developed a new weapon and want to experiment it on some brains. Y our task is to destroy the whole base, and capture as many brains as possible.To kill all the bugs is always easier than to capture their brains. A map is drawn for you, with all the rooms marked by the amount of bugs inside, and the possibility of containing a brain. The cavern's structure is like a tree in such a way that there is one unique path leading to each roomfrom the entrance. To finish the battle as soon as possible, you do not want to wait for the troopers to clear a room before advancing to the next one, instead you have to leave some troopers at each room passed to fight all the bugs inside. The troopers never re-enter a room where they have visited before.A starship trooper can fight against 20 bugs. Since you do not have enough troopers, you can only take some of the rooms and let the nerve gas do the rest of the job. At the mean time, you should maximize the possibility of capturing a brain. To simplify the problem, just maximize the sum of all the possibilities of containing brains for the taken rooms. Making such a plan is a difficult job. Y ou need the help of a computer.InputThe input contains several test cases. The first line of each test case contains tw o integers N (0 < N <= 100) and M (0 <= M <= 100), which are the number of rooms in the cavern and the number of starship troopers you have, respectively. The following N lines give the description of the rooms. Each line contains two non-negative integers -- the amount of bugs inside and the possibility of containing a brain, respectively. The next N - 1 lines give the description of tunnels. Each tunnel is described by two integers, which are the indices of the two rooms it connects. Rooms are numbered from 1 and room 1 is the entrance to the cavern.The last test case is followed by two -1's.OutputFor each test case, print on a single line the maximum sum of all the possibilities of containing brains for the taken rooms.Sample Input5 10 50 10 40 10 40 20 65 30 70 30 1 2 1 3 2 4 2 5 1 1 20 7 -1 -1 Sample Output50 7u Calculate e<1012>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12815 Accepted Submission(s): 5510Problem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.OutputOutput the approximations of e generated by the above formula for the values of n from 0 to 9. The beginning of your output should appear similar to that shown below.Sample Outputn e - ----------- 0 1 1 2 2 2.5 3 2.666666667 4 2.708333333 SourceGreater New Y ork 2000Digital Roots<1013>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20892 Accepted Submission(s): 6201Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summed and the process is repeated. This is continued as long as necessary to obtain a single digit.For example, consider the positive integer 24. Adding the 2 and the 4 yields a value of 6. Since 6 is a single digit, 6 is the digital root of 24. Now consider the positive integer 39. Adding the 3 and the 9 yields 12. Since 12 is not a single digit, the process must be repeated. Adding the 1 and the 2 yeilds 3, a single digit and also the digital root of 39.InputThe input file will contain a list of positive integers, one per line. The end of the input will be indicated by an integer value of zero.OutputFor each integer in the input, output its digital root on a separate line of the output.Sample Input24 39 0Sample Output6 3Uniform Generator<1014>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6236 Accepted Submission(s): 2485Problem DescriptionComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere '%' is the modulus operator.Such a function will generate pseudo-random numbers (seed) between 0 and MOD-1. One problem with functions of this form is that they will always generate the same pattern over and over. In order to minimize this effect, selecting the STEP and MOD values carefully can result in a uniform distribution of all values between (and including) 0 and MOD-1.For example, if STEP = 3 and MOD = 5, the function will generate the series of pseudo-random numbers 0, 3, 1, 4, 2 in a repeating cycle. In this example, all of the numbers between and including 0 and MOD-1 will be generated every MOD iterations of the function. Note that by the nature of the function to generate the same seed(x+1) every time seed(x) occurs means that if a function will generate all the numbers between 0 and MOD-1, it will generate pseudo-random numbers uniformly with every MOD iterations.If STEP = 15 and MOD = 20, the function generates the series 0, 15, 10, 5 (or any other repeating series if the initial seed is other than 0). This is a poor selection of STEP and MOD because no initial seed will generate all of the numbers from 0 and MOD-1.Y our program will determine if choices of STEP and MOD will generate a uniform distribution of pseudo-random numbers.InputEach line of input will contain a pair of integers for STEP and MOD in that order (1 <= STEP, MOD <= 100000).OutputFor each line of input, your program should print the STEP value right- justified in columns 1 through 10, the MOD value right-justified in columns 11 through 20 and either "Good Choice" or "Bad Choice" left-justified starting in column 25. The "Good Choice" message should be printed when the selection of STEP and MOD will generate all the numbers between and including 0 and MOD-1 when MOD numbers are generated. Otherwise, your program should print the message "Bad Choice". After each output test set, your program should print exactly one blank line. Sample Input3 5 15 20 63923 99999Sample Output3 5 Good Choice 15 20 Bad Choice 63923 99999 Good ChoiceSafecracker<1015>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2803 Accepted Submission(s): 1445Problem Description=== Op tech briefing, 2002/11/02 06:42 CST ==="The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in World War II. Fortunately old Brumbaugh from research knew Klein's secrets and wrote them down before he died. A Klein safe has two distinguishing features: a combination lock that uses letters instead of numbers, and an engraved quotation on the door. A Klein quotation always contains between five and twelve distinct uppercase letters, usually at the beginning of sentences, and mentions one or more numbers. Five of the uppercase letters form the combination that opens the safe. By combining the digits from all the numbers in the appropriate way you get a numeric target. (The details of constructing the target number are classified.) To find the combination you must select five letters v, w, x, y, and z that satisfy the following equation, where each letter is replaced by its ordinal position in the alphabet (A=1, B=2, ..., Z=26). The combination is then vwxyz. If there is more than one solution then the combination is the one that is lexicographically greatest, i.e., the one that would appear last in a dictionary."v - w^2 + x^3 - y^4 + z^5 = target"For example, given target 1 and letter set ABCDEFGHIJKL, one possible solution is FIECB, since 6 - 9^2 + 5^3 - 3^4 + 2^5 = 1. There are actually several solutions in this case, and the combination turns out to be LKEBA. Klein thought it was safe to encode the combination within the engraving, because it could take months of effort to try all the possibilities even if you knew the secret. But of course computers didn't exist then."=== Op tech directive, computer division, 2002/11/02 12:30 CST ==="Develop a program to find Klein combinations in preparation for field deployment. Use standard test methodology as per departmental regulations. Input consists of one or more lines c ontaining apositive integer target less than twelve million, a space, then at least five and at most twelve distinct uppercase letters. The last line will contain a target of zero and the letters END; this signals the end of the input. For each line output the Klein combination, break ties with lexicographic order, or 'no solution' if there is no correct combination. Use the exact format shown below."Sample Input1 ABCDEFGHIJKL 11700519 ZAYEXIWOVU 3072997 SOUGHT 1234567 THEQUICKFROG 0 ENDSample OutputLKEBA YOXUZ GHOST no solutionPrime Ring Problem<1016>Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8727 Accepted Submission(s): 3909Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.Note: the number of first circle should always be 1.Inputn (0 < n < 20).OutputThe output format is shown as sample below. Each row represents a series of circle numbers in the ring beginning from 1 clockwisely and anticlockwisely. The order of numbers must satisfy the above requirements. Print solutions in lexicographical order.Y ou are to write a program that completes above process.Print a blank line after each case.Sample Input6 8Sample OutputCase 1: 1 4 3 2 5 6 1 6 5 2 3 4 Case 2: 1 2 3 8 5 6 7 4 1 2 5 8 3 4 7 6 1 4 7 6 5 8 3 2 1 6 7 4 3 8 5 2A Mathematical Curiosity<1017>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10991 Accepted Submission(s): 3390Problem DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem contains multiple test cases!The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each input block is in the format indicated in the problem description. There is a blank line between input blocks.The output format consists of N output blocks. There is a blank line between output blocks. InputY ou will be given a number of cases in the input. Each case is specified by a line containing the integers n and m. The end of input is indicated by a case in which n = m = 0. Y ou may assume that 0 < n <= 100.OutputFor each case, print the case number as well as the number of pairs (a,b) satisfying the given property. Print the output for each case on one line in the format as shown below.Sample Input1 10 1 20 3 30 4 0 0Sample OutputCase 1: 2 Case 2: 4 Case 3: 5Big Number<1018>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10803 Accepted Submission(s): 4860Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, you have to determine the number of digits in the factorial of the number.InputInput consists of several lines of integer numbers. The first line contains an integer n, which is the number of cases to be tested, followed by n lines, one integer 1 ≤ n ≤ 107 on each line.OutputThe output contains the number of digits in the factorial of the integers appearing in the input.Sample Input2 10 20Sample Output7 19Least Common Multiple<1019>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11763 Accepted Submission(s): 4296Problem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 105.InputInput will consist of multiple problem instances. The first line of the input will contain a single integer indicating the number of problem instances. Each instance will consist of a single line of the form m n1 n2 n3 ... nm where m is the number of integers in the set and n1 ... nm are the integers. All integers will be positive and lie within the range of a 32-bit integer.OutputFor each problem instance, output a single line containing the corresponding LCM. All results will lie in the range of a 32-bit integer.Sample Input2 3 5 7 15 6 4 10296 936 1287 792 1Sample Output105 10296Encoding<1020>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11194 Accepted Submission(s): 4688Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub-string.2. If the length of the sub-string is 1, '1' should be ignored.InputThe first line contains an integer N (1 <= N <= 100) which indicates the number of test cases. The next N lines contain N strings. Each string consists of only 'A' - 'Z' and the length is less than 10000.OutputFor each test case, output the encoded string in a line.Sample Input2 ABC ABBCCCSample OutputABC A2B3CFibonacci Again<1021>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15018 Accepted Submission(s): 7023Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). InputInput consists of a sequence of lines, each containing an integer n. (n < 1,000,000).OutputPrint the word "yes" if 3 divide evenly into F(n).Print the word "no" if not.Sample Input0 1 2 3 4 5Sample Outputno no yes no no noTrain Problem I<1022>Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6557 Accepted Submission(s): 2391Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes a problem, there is only one railway where all the trains stop. So all the trains come in from one side and get out from the other side. For this problem, if train A gets into the railway first, and then train B gets into the railway before train A leaves, train A can't leave until train B leaves. The pictures below figure out the problem. Now the problem for you is, there are at most 9 trains in the station, all the trains has an ID(numbered from 1 to n), the trains get into the railway in an order O1, your task is to determine whether the trains can get out in an order O2.InputThe input contains several test cases. Each test case consists of an integer, the number of trains, and two strings, the order of the trains come in:O1, and the order of the trains leave:O2. The input is terminated by the end of file. More details in the Sample Input.OutputThe output contains a string "No." if you can't exchange O2 to O1, or you should output a line contains "Y es.", and then output your way in exchanging the order(you should output "in" for a train getting into the railway, and "out" for a train getting out of the railway). Print a line contains "FINISH" after each test case. More details in the Sample Output.Sample Input3 123 321 3 123 312Sample OutputYes. in in in out out out FINISH No. FINISHHintHint For the first Sample Input, we let train 1 get in, then train 2 and train 3. So now train 3 is at the top of the railway, so train 3 can leave first, then train 2 and train 1. In the second Sample input, we should let train 3 leave first, so we have to let train 1 get in, then train 2 and train 3. Now we can let train 3 leave. But after that we can't let train 1 leave before train 2, because train 2 is at the top of the railway at the moment. So we output "No.".。

acm各大OJ题目分类

acm各大OJ题目分类

id page section no title18 1.2.1例题1盒子里的气球148359 3.1.2例题2管道问题149387 3.3.1例题1篱笆问题150388 3.3.1例题2合金制造问题151401 3.3.4例题1点集的直径29 1.2.1例题2图书馆313 1.2.2例题1钓鱼1438 1.3.1引例小球钟——时间与运动1540 1.3.1引例笑脸1644 1.3.2引例猜猜我想说什么1750 1.3.3引例勇士Ilya的故事1852 1.3.3例题1蚂蚁和瓢虫413 1.2.2例题2照亮的山景515 1.2.2例题3镜子盒2468 1.3.5例题1电缆2569 1.3.5引例黑白按钮2670 1.3.5例题2煎饼2772 1.3.5引例傻瓜Ivanushka的故事619 1.2.3例题1折纸痕720 1.2.3例题2三色多边形820 1.2.3例题3聪明的学生923 1.2.3例题4丢失的数1028 1.2.4例题1月亮之眼1129 1.2.4例题2Yanghee的数表1231 1.2.4例题3原子链1336 1.3.1引例铁轨1438 1.3.1引例小球钟——时间与运动1540 1.3.1引例笑脸1644 1.3.2引例猜猜我想说什么1750 1.3.3引例勇士Ilya的故事1852 1.3.3例题1蚂蚁和瓢虫1954 1.3.3例题2隔三遍历2061 1.3.4引例拯救大兵瑞恩的故事2162 1.3.4引例英雄和公主的故事2264 1.3.4引例电气工程师2367 1.3.5引例爱丽丝和精灵的故事2468 1.3.5例题1电缆2569 1.3.5引例黑白按钮2670 1.3.5例题2煎饼2772 1.3.5引例傻瓜Ivanushka的故事2875 1.3.5例题3士兵排队2976 1.3.5例题4最小可靠交换3080 1.4.1例题1代码等式3181 1.4.1例题2团伙3281 1.4.1例题3银河英雄传说3382 1.4.1例题4可爱的猴子3483 1.4.1例题5蜗牛3589 1.4.2例题1积水3689 1.4.2例题2赛车3790 1.4.2例题3可怜的奶牛3891 1.4.2例题4最轻巧的语言3997 1.4.3例题1马尔可夫链4099 1.4.3例题2促销41102 1.4.3例题3采矿42108 1.4.4例题1火星地图43110 1.4.4例题2最长回文子串44113 1.5.1例题1括号序列45116 1.5.1例题2棋盘分割46117 1.5.1例题3决斗47117 1.5.1例题4“舞蹈家”怀特先生48119 1.5.1例题5积木游戏49123 1.5.2例题1方块消除50123 1.5.2例题2公路巡逻51125 1.5.2例题3并行期望值52126 1.5.2例题4高性能计算机53130 1.5.2例题5模板匹配54131 1.5.2例题6不可分解的编码55133 1.5.2例题7青蛙的烦恼56134 1.5.2例题8排列问题57135 1.5.2例题9最优排序二叉树58138 1.5.2例题10Bugs公司59139 1.5.2例题11迷宫统计60142 1.5.2例题12贪吃的九头龙61150 1.5.3问题1最长公共子序列问题62150 1.5.3例题1排列的LCS问题63151 1.5.3问题2最长上升子序列问题64151 1.5.3问题3最优二分检索树65152 1.5.3问题4任务调度问题66155 1.5.3例题2序列分割67160 1.6.2引例加密网格68162 1.6.2引例最优程序69164 1.6.2引例旋转的玩具70169 1.6.3引例编辑书稿71171 1.6.3引例埃及分数72175 1.6.4引例三角形大战73178 1.6.4例题1L游戏74180 1.6.5例题1带宽75181 1.6.5例题2小木棍76181 1.6.5例题3生日蛋糕77183 1.6.5例题4汽车问题78184 1.6.5例题5Betsy的旅行79189 1.6.6例题1外公的难题80193 1.6.7例题1篮球冠军赛81204 2.1例题1 “麻烦”子82204 2.1例题2沙漠83205 2.1例题3浪人苏比84206 2.1例题4好动的佳佳85207 2.1例题5细菌86208 2.1例题6X行星87220 2.2.1例题1佳佳的困惑88220 2.2.1例题2除法表达式89221 2.2.1例题3数字游戏90221 2.2.1例题4fibonacci质数91222 2.2.1例题5神秘数92225 2.2.2例题1自动取款机93226 2.2.2例题2人类学家的烦恼94226 2.2.2例题3征服者的军营95233 2.2.3例题1仓库问题96233 2.2.3例题2二进制Stirling数97234 2.2.3例题3荒岛野人98240 2.3.2例题1单色三角形99243 2.3.2引例互不攻击的象100245 2.3.3例题1传球游戏101247 2.3.3例题2无聊的排序102252 2.3.3例题3多边形103257 2.3.4例题1装饰栅栏104258 2.3.4例题2Pibonacci数105259 2.3.4例题3巧克力106274 2.4.2例题1绣花107275 2.4.2例题2漆门108275 2.4.2例题3原始基因109276 2.4.2例题4超级翻转110281 2.4.3例题1地图的五着色111282 2.4.3例题2滑雪112283 2.4.3例题3水平可见线段的三角形113287 2.4.4例题1往返路114287 2.4.4例题2连通图编号问题115287 2.4.4例题3跳舞蝇116289 2.4.4例题4参观洞穴117291 2.4.4例题5公主和英雄118293 2.4.4例题6通讯员119295 2.4.4例题7幼儿园小朋友分组120299 2.5.1引例岛国121300 2.5.1引例野餐计划122303 2.5.1引例地震123304 2.5.2引例罗密欧与朱丽叶124306 2.5.2引例出纳员的雇佣125308 2.5.2例题1瘦陀陀与胖陀陀126309 2.5.2例题2新桥127310 2.5.2例题3穿越沙漠128311 2.5.2例题4隐型石头129312 2.5.2例题5双调路径130315 2.5.3引例奶牛的新年晚会131317 2.5.3引例航天计划问题132318 2.5.3引例终极情报网133323 2.5.3例题1圆桌吃饭问题134324 2.5.3例题2数字游戏135324 2.5.3例题3混合图的欧拉回路136325 2.5.3例题4家园137326 2.5.3例题5道路扩容138329 2.5.4引例神奇的魔术师139331 2.5.4引例任务安排140332 2.5.4引例棋盘上的骑士141333 2.5.4引例丘比特的烦恼142333 2.5.4引例魔术球问题143334 2.5.4例题1皇家卫士144336 2.5.4例题2固定分区的内存管理145336 2.5.4例题3玩具兵146338 2.5.4例题4千年盛典147353 3.1.2例题1房间最短路问题148359 3.1.2例题2管道问题149387 3.3.1例题1篱笆问题150388 3.3.1例题2合金制造问题151401 3.3.4例题1点集的直径152402 3.3.4例题2最小外接矩形153404 3.3.4例题3点集分割154410 3.4.1例题1锡刀154410 3.4.2例题2锡刀154410 3.4.3例题3锡刀154410 3.4.4例题4锡刀154410 3.4.5例题5锡刀154410 3.4.6例题6锡刀154410 3.4.7例题7锡刀154410 3.4.8例题8锡刀154410 3.4.9例题9锡刀154410 3.4.10例题10锡刀154410 3.4.11例题11锡刀154410 3.4.12例题12锡刀problem sourceACM/ICPC World Finals 2002. Problem A. Balloons in a BoxACM/ICPC Regional Contest Central Europe 1995. Problem D. Pipe(Classic)(Classic)(Classic)ACM/ICPC Regional Contest Northeast Europe 2001. Problem G. Library. Author: Elena Kryuchkova, Roman Elizarov ACM/ICPC Regional Contest East Central North America 1999. Problem G. Gone FishingACM/ICPC World Finals 1995. Problem B. Tempus et mobilius Time and MotionInternet Problem Solving Contest 2001. Problem F. A Censored SmileIOI2002 Practice Session Problem 2. String from substringsUSU high school programming contest 2001. Problem G.Ilya Murumetz. Author: Katz O.E.Polish Olympiad in Informatics 2001. Stage II Problem 4. Ants and the ladybugCentral European Olympiad in Informatics 2000. Day 2 Problem 3. Enlightened LandscapeBaltic Olympiad in Informatics 2001. Day 1 Problem 3. MirrorACM/ICPC Regional Contest Northeast Europe 2001. Problem C. Cable Master. Author: Vladimir Pinaev, Roman Elizaro Internet Problem Solving Contest 2000. Problem F. PuzzleUniversity of Duke Programming Contest 1993. Problem C. Stacks of FlapjacksUSU high school programming contest 2001. Problem A. Gaby Ivanushka. Author: Shamgunov N.ACM/ICPC Regional Contest South Pacific 1992. Problem F. Paper FoldingThird USU personal programming contest, Ekaterinburg, Russia, February 16, 2002. Author:Dmitry Filimonenkov CTSC 2001. Day 1 Problem 3. Clever. Author: Li Zhang(Classic)Balkan Olympiad in Informatics 1998. Day 2 Problem 2. Evil EyesACM/ICPC Regional Contest Asia-Taejon 2000. Problem H. Lost ListsCentral European Olympiad in Informatics 2001. Day 1 Problem 1. ChainACM/ICPC Regional Contest Central European 1997. Problem A. RailsACM/ICPC World Finals 1995. Problem B. Tempus et mobilius Time and MotionInternet Problem Solving Contest 2001. Problem F. A Censored SmileIOI2002 Practice Session Problem 2. String from substringsUSU high school programming contest 2001. Problem G.Ilya Murumetz. Author: Katz O.E.Polish Olympiad in Informatics 2001. Stage II Problem 4. Ants and the ladybugPolish Olympiad in Informatics 1995. Stage III Problem 2. Step Traversing a TreeCTSC 1999. Day 2 Problem 3. RescueACM/ICPC Regional Contest Asia-Shanghai 1999. Problem I. Princess and HeroCentral European Olympiad in Informatics 1996. Day 2 Problem 3. ElectricianInternet Problem Solving Contest 2000. Problem C. TrollsACM/ICPC Regional Contest Northeast Europe 2001. Problem C. Cable Master. Author: Vladimir Pinaev, Roman Elizaro Internet Problem Solving Contest 2000. Problem F. PuzzleUniversity of Duke Programming Contest 1993. Problem C. Stacks of FlapjacksUSU high school programming contest 2001. Problem A. Gaby Ivanushka. Author: Shamgunov N.Central European Olympiad in Informatics 1998. Day 2 Problem 1. SolidersACM/ICPC Regional Contest Central European 2001. Problem E. ExchangesPolish Olympiad in Informatics 1998. Stage II Problem 2. Word EquationsBaltic Olympiad in Informatics 2003. Day 2 Problem 1. The GangsNOI2002 Day 1 Problem 1. Galaxy. Author: Ji LuoPolish Olympiad in Informatics 2003. Stage III Problem 1. Monkey(Classic)Polish Olympiad in Informatics 1999. Stage III Problem 6. WaterCentral European Olympiad in Informatics 2003. Day 1 Problem 3. The RaceOIBH Reminiscene Programming Contest. Problem E. Eat or Not to Eat. Author: Rujia LiuPolish Olympiad in Informatics 1998. Stage III Problem 4. The lightest languageCTSC 2001. Day 2 Problem 2. Markov. Author: Runting ShiPolish Olympiad in Informatics 2000. Stage III Problem 6. PromotionPolish Olympiad in Informatics 2001. Stage III Problem 5. GoldmineBaltic Olympiad in Informatics 2001. Day 2 Problem 2. Mars MapsACM/ICPC Regional Contest Asia-Kanpur 2001. Problem E. Viewer's Prize in F-TVACM/ICPC Regional Contest Northeast Europe 2001. Problem B. Bracket Sequence. Author: Andrew StankevichNOI99 Day 2 Problem 1. ChessPolish Olympiad in Informatics 1999. Stage I Problem 1. MusketeersACM/ICPC Regional Contest Asia-Shanghai 2000. Problem C. Dance Dance RevolutionNOI97 Day 2 Problem 2. GameIOI2003 National Training Team Originals. Author: Cailiang Liu. ModifiedCTSC2000. Day 1 Problem 3. Patrol. Author: Shenjie LiACM/ICPC Regional Contest Asia-Tehran 2001. Problem G. Parallel ExpectationIOI2001 National Training Team Winter Camp. Problem 2. HPC. Author: Xin QiCentral European Olympiad in Informatics 2001. Day 2 Problem 2. PatternsACM/ICPC World Finals 2002. Problem B. Undecodable Codes(Classic)(Classic)CTSC2001. Day 2 Problem 2. Tree. Author: Fan YangCentral European Olympiad in Informatics 2002. Day 1 Problem 1. BugsElite Problemsetters' First Contest. Problem A. Maze Statistics. Author: Derek KismanNOI2002 Day 1 Problem 3. Dragon. Modification of Internet Problem Solving Contest 2001. B. Author: Ziqing Mao (Classic)(Classic)(Classic)(Classic)IOI2002 Day 2 Problem 1. BatchBalkan Olympiad in Informatics 2003. Day 2 Problem 2. Euro. ModifiedCentral European Olympiad in Informatics 1996. Day 1 Problem 1. Encoding GridACM/ICPC Regional Contest Southwestern Europe 1996. Problem A. Optimal ProgramsACM/ICPC Regional Contest Southwestern Europe 1999. Problem E. Color HashACM/ICPC Regional Contest Asia-Kanpur 2001. Problem G. Editing a Book(Classic)ACM/ICPC Regional Contest East Central North America 1999. Problem A. Traingle WarBaltic Olympiad in Informatics 2002. Day 2 Problem 2. L game. Author: Jimmy MårdellNew Zealand Programming Contest 1991. Problem A. BandwidthACM/ICPC Regional Contest Central Europe 1995. Problem H. SticksNOI99 Day 1 Problem 3. CakeIOI94 Day 2 Problem 1. CarUSACO Computing Olympiad4th Shuguang Programming Contest. Author: Rujia LiuBaltic Olympiad in Informatics 1999. Day 1 Problem 3. BasketballUral Collegiate Programming Contest, April 2001, Perm English TourRomanian Open Contest, December 2001. Author: Mugurel Ionut AndreicaIOI99 National Training Team Originals. Author: Fangfang XiaIV Ural State University Collegiate Programming Contest. Problem G. Nikifor's Walk. Author: Dmitry Filimonenkov Internet Problem Solving Contest 2003. Problem H. Hordes of BacteriaCentral European Olympiad in Informatics 2000. Day 1 Problem 1. X-PlanetUSU Open Collegiate Programming Contest March'2001 Senior Session. Problem F. Nikifor. Author: Filimonenkov D. Baltic Olympiad in Informatics 2000. Day 2 Problem 1. DIVRandy Game. Problem D. Number Game. Author: Chong LongACM/ICPC World Finals Warm-up Contest(Oriental) 2002, Problem A. The Fibonacci Primes. Author: Shahriar Manzoor ACM/ICPC Regional Contest Southeastern European 2001. Problem C. Secret NumbersPolish Olympiad in Informatics 1998. Stage III Problem 2. ATM'sACM/ICPC Regional Contest Southwestern Europe 1999. Problem B. The Archeologists' DilemmaCentral European Olympiad in Informatics 2002. Day 1 Problem 2. ConquerTetrahedron Team Contest May 2001. Problem H. Warehouse Problem. Author: D. FilimonenkovACM/ICPC Regional Contest Central Europe 2001. Problem B. Binary Stirling Numbers.NOI2002. Day 2 Problem 1. Savages. Author: Rujia LiuPolish Olympiad in Informatics 1997. Stage III Problem 5. Monochromatic TrianglesACM/ICPC World Finals Warm-up Contest(Oriental) 2002, Problem B. Bishops. Author: Rezaul Alam ChowdhuryIOI2000 National Training Team Originals. Author: Yi GuoACM/ICPC World Finals 2002. Problem H. Silly Sort(Classic)Central European Olympiad in Informatics 2002. Day 1 Problem 3. FenceInternet Problem Solving Contest 2001. Problem G. FibonacciACM/ICPC Regional Contest Beijing 2002. Problem F. ChocolateUral Collegiate Programming Contest '99. Problem H. Cross-Stitch. Author: Zaletsky PIV Ural State University Collegiate Programming Contest. Problem F. Door Painting. Author: Magaz AsanovPolish Olympiad in Informatics 1999. Stage III Problem 5. PrimitivusIOI2003 National Training Team Originals. Author: Zhilei Xu.(Classic)Polish Olympiad in Informatics 2000. Stage I Problem 3. SkiersACM/ICPC Regional Contest Central Europe 2001. Problem H. Horizontally Visible SegmentsCentral European Olympiad in Informatics 2001. Day 1 Problem 3. Round Trip(Classic)Polish Olympiad in Informatics 2001. Stage III Problem 1. Wandering flees TrainersCentral European Olympiad in Informatics 1997. Day 1 Problem 1. CAVACM/ICPC Regional Contest Central Europe 2001. Problem A. Alice and BobPolish Olympiad in Informatics 1996. Stage I Problem 3. MessengersIV Ural State University Collegiate Programming Contest. Problem E. Partition into Groups. Author: Dmitry Filimonenko ACM/ICPC World Finals 2002. Problem E. IslandACM/ICPC Regional Contest East Central North America 2000. Problem A. PicnicUSACO Computing Olympiad US Open 2001. Problem 2. EarthquakeInternet Problem Solving Contest 1999. Problem H. Romeo and JulietACM/ICPC Regional Contest Asia-Tehran 2000. Problem G. Cashier EmploymentACM/ICPC World Finals Warm-up Contest(Occidental) 2002. Problem A. Asterix and Obelix. Author: Rezaul Alam Cho Balkan Olympiad in Informatics 2000. Day 2 Problem 1. BridgeACM/ICPC World Finals 2002. Problem C. Crossing the DesertACM/ICPC Regional Warm-up Contest 2002. Problem D. The Rock. Author: Jimmy MårdellBaltic Olympiad in Informatics 2002. Day 2 Problem 1. Bicriterial routingUSA Computing Olympiad Winter 2002. Problem 2. New Years Party. Author: Hal Burch(Classic)CTSC2001. Day 1 Problem 1. Agent. Authro: Li ZhangACM/ICPC World Finals Warm-up Contest(Occidental) 2002. Problem D. The Grand Dinner. Author: Rezaul Alam Chow UVA Monthly Contest. Problem H. The Eagles' Nest. Author: Monirul HasanACM/ICPC Regional Contest Northwestern Europe 2002. Problem G. Sightseeing tour. Author: Jimmy MårdellCTSC1999. Day 1 Problem 3. HomelandIOI2000 National Training Team Originals. Author: Li ZhangInternet Problem Solving Contest 2001. Problem H. MagicACM/ICPC Regional Contest Asia-Beijing 2002. Problem G. Machine ScheduleBaltic Olympiad in Informatics 2001. Day 2 Problem 1. KnightCTSC2000. Day 2 Problem 1. Cupid. Author: Fan YangOIBH Reminiscene Programming Contest. Problem H. Hanoi Tower Troubls Again! Author: Rujia LiuCentral European Olympiad in Informatics 2002. Day 2 Problem 2. GuardACM/ICPC World Finals 2001. Problem G. Fixed Partition Memory ManagementCTSC2002. Day 1 Problem 3. Toy. Author: Rujia LiuCTSC2003. Day 1 Problem 3. Ceremony. Author: Rujia LiuACM/ICPC Regional Contest Mid-Central North America 1996. Problem B. The doorACM/ICPC Regional Contest Central Europe 1995. Problem D. Pipe(Classic)(Classic)(Classic)ACM/ICPC Regioanl Warmup 2001. Problem F. Smallest Bounding Rectangle. Author: Rezaul Alam ChowdhuryACM/ICPC World Finals Warm-up Contest(Occidental) 2002. Problem K. The Great Divide. Author: Rezaul Alam Chow ACM/ICPC Regional Contest Central Europe 1996. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 1997. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 1998. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 1999. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2000. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2001. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2002. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2003. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2004. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2005. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2006. Problem A. Tin CutterACM/ICPC Regional Contest Central Europe 2007. Problem A. Tin Cutterdata submit how2submit n ny y uva303n nn nn ny y ural1188 y y uva757n y uva239y ny nn y ural1088 y nn ny ny y ural1184 y ny y uva120n y ural1082 y y uva177n y ural1181 y nn ny nn ny ny y uva514n y uva239y ny nn y ural1088 y ny ny nn y uva258n ny ny y ural1184 y ny y uva120n y ural1082 y ny y zju1388y ny ny ny nn ny ny ny y uva10273 y nn ny ny ny nn ny y ural1183y ny nn ny ny y uva10559y ny y zju1022y ny nn nn y ural1143n ny ny ny y uva10531y nn nn nn y uva10534(slightly modified) n y uva10304y ny nn ny y uva656n y uva704n ny ny y uva751y ny y uva140y y uva307y ny ny ny ny nn y ural1155n y ural1170y nn y ural1130y ny nn y ural1095y ny y uva10164n y uva10236y yy nn y uva701y nn y ural1107 n y zju1385 y y uva10413 y nn y uva10237 y nn nn ny ny ny y zju1363 n y ural1035 n y ural1129 y nn nn ny ny y zju1391 y nn ny ny ny y zju1384 y nn y ural1128 n ny yy ny ny y zju1420 n y uva10246 y nn nn y uva10381 y ny nn ny nn y uva10249 y y uva10546 y y zju1992 y ny ny ny y zju1364 y ny ny y uva10276 y nn ny y uva10418y ny y uva393 y y uva303 n nn nn nn y uva10173 n y uva10256 y y uva308 y y uva309 y y uva310 y y uva311 y y uva312 y y uva313 y y uva314 y y uva315 y y uva316 y y uva317 y y uva318 y y uva319。

ACM计算几何题目总结及分类

ACM计算几何题目总结及分类

COJ/oj/prepare.do?fun=viewProblem&pid=1011/oj/prepare.do?fun=viewProblem&pid=1024/oj/prepare.do?fun=viewProblem&pid=1034/oj/prepare.do?fun=viewProblem&pid=1035/oj/prepare.do?fun=viewProblem&pid=1036/oj/prepare.do?fun=viewProblem&pid=1037/oj/prepare.do?fun=viewProblem&pid=1038/oj/prepare.do?fun=viewProblem&pid=1078/oj/prepare.do?fun=viewProblem&pid=1137/oj/prepare.do?fun=viewProblem&pid=1172/oj/prepare.do?fun=viewProblem&pid=1190/oj/prepare.do?fun=viewProblem&pid=1211/oj/prepare.do?fun=viewProblem&pid=1230/oj/prepare.do?fun=viewProblem&pid=1231/oj/prepare.do?fun=viewProblem&pid=1249:8080/COJ/prepare.do?fun=viewProblem&pid=1257:8080/COJ/prepare.do?fun=viewProblem&pid=1260FOJHotter Colder/problem.php?pid=1014求线段的中位线,线段相交求交点,求凸多边形的面积,无归之室/problem.php?pid=1016本题精度要求非常高,用三角函数的话,很容易就wa..Reflections/problem.php?pid=1035求一条射线遇到圆后的反射光,即圆和直线求交点,求点关于交点法线的对称点。

杭电ACM试题详细分类,杭电oj详细分类,hdu详细分类,详细,ACM

杭电ACM试题详细分类,杭电oj详细分类,hdu详细分类,详细,ACM
数论
1164 1211 1215 1222 1286 1299
计算几何
1086 1115 1147
贪心
1009 1052 1055 1232 1272
线段树,离散化
1199 1255
图论 最短路相关的问题
1142 1162 1217 1301
二分图问题
1054 1068 1150 1151 1281
杭电ACM试题分类 枚举
1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 1084 1088 1106 1107 1113 1117 1119 1128 1129 1144 1148 1157 1161 1170 1172 1177 1197 1200 1201 1202 1205 1209 1212(大数取模) 1216(链表)1218 1219 1225 1228 1229 1230 1234 1235 1236 1237 1239 1250 1256 1259 1262 1263 1265 1266 1276 1279 1282 1283 1287 1296 1302 1303 1304 1305 1306 1309 1311 1314
2549、2550、2551、2552、2555、2560、2561、2562、2566、2567、 2568、2700、2710、
DP:1003、10240、1029、1069、1074、1087、1114、1159、1160、
1171、1176、1203、1231、1257、1260、1284、1421、1789、1978、 2059、2084、2159、2191、2544、2571、2602、2709、

杭电acm部分题目及答案答案

杭电acm部分题目及答案答案

自己刷的题这是我在杭电做题的记录,希望我的分享对你有帮助!!!1001 Sum Problem***********************************************************1 1089 A+B for Input-Output Practice (I)********************************21090 A+B for Input-Output Practice (II)********************************51091A+B for Input-Output Practice (III)****************************************7 1092A+B for Input-Output Practice (IV)********************************81093 A+B for Input-Output Practice (V)********************************101094 A+B for Input-Output Practice (VI)***************************************12 1095A+B for Input-Output Practice (VII)*******************************131096 A+B for Input-Output Practice (VIII)******************************15How to Type***************************************************************161001 Sum ProblemProblem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.InputThe input will consist of a series of integers n, one integer per line.OutputFor each case, output SUM(n) in one line, followed by a blank line. You may assume the result will be in the range of 32-bit signed integer.Sample Input1100Sample Output15050AuthorDOOM III解答:#include<stdio.h>main(){int n,i,sum;sum=0;while((scanf("%d",&n)!=-1)){sum=0;for(i=0;i<=n;i++)sum+=i;printf("%d\n\n",sum);}}1089 A+B for Input-Output Practice(I)Problem DescriptionYour task is to Calculate a + b.Too easy?! Of course! I specially designed the problem for acm beginners.You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.OutputFor each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.Sample Input1 510 20Sample Output630AuthorlcyRecommendJGShining解答:#include<stdio.h>main(){int a,b;while(scanf("%d%d",&a,&b)!=EOF)printf("%d\n",a+b);}1090 A+B for Input-Output Practice(II)Problem DescriptionYour task is to Calculate a + b.InputInput contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a space, one pair of integers per line.OutputFor each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.Sample Input21 510 20Sample Output630AuthorlcyRecommendJGShining解答:#include<stdio.h>#define M 1000void main(){int a ,b,n,j[M],i;//printf("please input n:\n"); scanf("%d",&n);for(i=0;i<n;i++){scanf("%d%d",&a,&b);//printf("%d %d",a,b);j[i]=a+b;}i=0;while(i<n){printf("%d",j[i]);i++;printf("\n");}}1091A+B for Input-Output Practice(III)Problem DescriptionYour task is to Calculate a + b.InputInput contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case containing 0 0 terminates the input and this test case is not to be processed.OutputFor each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.Sample Input1 510 200 0Sample Output630AuthorlcyRecommendJGShining解答:#include<stdio.h>main(){int a,b;scanf("%d %d",&a,&b);while(!(a==0&&b==0)){printf("%d\n",a+b);scanf("%d %d",&a,&b);}}1092A+B for Input-Output Practice(IV)Problem DescriptionYour task is to Calculate the sum of some integers.InputInput contains multiple test cases. Each test case contains a integer N, and then N integers followin the same line. A test case starting with 0 terminates the input and this test case is not to be processed.OutputFor each group of input integers you should output their sum in one line, and with one line of output for each line in input.Sample Input4 1 2 3 45 1 2 3 4 5Sample Output1015AuthorlcyRecommendJGShining解答:#include <stdio.h>int main(){int n,sum,i,t;while(scanf("%d",&n)!=EOF&&n!=0) {sum=0;for(i=0;i<n;i++){scanf("%d",&t);sum=sum+t;}printf("%d\n",sum);}}1093 A+B for Input-Output Practice(V)Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M integers follow in the same line.OutputFor each group of input integers you should output their sum in one line, and with one line of output for each line in input.Sample Input24 1 2 3 45 1 2 3 4 5Sample Output1015Authorlcy解答:#include<stdio.h>main(){int n,a,b,i,j,sum;sum=0;while(scanf("%d\n",&n)!=-1) {for(i=0;i<n;i++){scanf("%d",&b);for(j=0;j<b;j++){scanf("%d",&a);sum+=a;}printf("%d\n",sum); sum=0;}}}1094 A+B for Input-Output Practice (VI) Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers follow in the same line.OutputFor each test case you should output the sum of N integers in one line, and with one line of output for each line in input.Sample Input4 1 2 3 45 1 2 3 4 5Sample Output1015AuthorlcyRecommendJGShining解答:#include<stdio.h>main(){int n,a,b,i,j,sum;sum=0;while(scanf("%d\n",&n)!=-1){for(j=0;j<n;j++){scanf("%d",&a);sum+=a;}printf("%d\n",sum);sum=0;}}[ Copy to Clipboard ][ Save to File]1095A+B for Input-Output Practice (VII) Problem DescriptionYour task is to Calculate a + b.InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. OutputFor each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.Sample Input1 510 20Sample Output630AuthorlcyRecommendJGShining解答:#include<stdio.h>main(){int a,b;while(scanf("%d%d",&a,&b)!=EOF)printf("%d\n\n",a+b);}1096 A+B for Input-Output Practice (VIII) Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M integers follow in the same line.OutputFor each group of input integers you should output their sum in one line, and you must note that there is a blank line between outputs.Sample Input34 1 2 3 45 1 2 3 4 53 1 2 3Sample Output10156AuthorlcyRecommendJGShining解答:int main(){int a,b,i,j,l[1000],k;scanf("%d",&i);getchar();for(j=1;j<=i;j++)l[j]=0;for(j=1;j<=i;j++){scanf("%d",&a);getchar();for(k=1;k<=a;k++){scanf("%d",&b);getchar();l[j]+=b;}}for(j=1;j<=i-1;j++)printf("%d\n\n",l[j]);printf("%d\n",l[i]);}How to TypeProblem DescriptionPirates have finished developing the typing software. He called Cathy to test his typing software. She is good at thinking. After testing for several days, she finds that if she types a string by some ways, she will type the key at least. But she has a bad habit that if the caps lock is on, she must turn off it, after she finishes typing. Now she wants to know the smallest times of typing the key to finish typing a string.InputThe first line is an integer t (t<=100), which is the number of test case in the input file. For each test case, there is only one string which consists of lowercase letter and upper case letter. The length of the string is at most 100.OutputFor each test case, you must output the smallest times of typing the key to finish typing this string.Sample Input 3Pirates HDUacm HDUACM Sample Output 888#include <stdio.h>#include <string.h>#define MAX 200int arr[MAX][4];char str[MAX];int letter(char ch){if(ch>='A'&&ch<='Z') return 1;return 0;}void proc(){int i;int tmp,min;int len=strlen(str);for(i=0;i<len;i++){if(i==0){if(letter(str[i])) { arr[i][1]=2; arr[i][2]=2; }else { arr[i][0]=1; arr[i][3]=3; }}else{if(letter(str[i])==letter(str[i-1])){if(arr[i-1][0]){ arr[i][0]=arr[i-1][0]+1;arr[i][3]=arr[i-1][0]+3;}if(arr[i-1][1]) { arr[i][1]=arr[i-1][1]+2; arr[i][2]=arr[i-1][1]+2;}if(arr[i-1][2]){if(arr[i][0]>arr[i-1][2]+1||!arr[i][0]) arr[i][0]=arr[i-1][2]+1;if(arr[i][3]>arr[i-1][2]+3||!arr[i][3]) arr[i][3]=arr[i-1][2]+3;}if(arr[i-1][3]){if(arr[i][1]>arr[i-1][3]+2||!arr[i][1]) arr[i][1]=arr[i-1][3]+2;if(arr[i][2]>arr[i-1][3]+2||!arr[i][2]) arr[i][2]=arr[i-1][3]+2;}}else{if(arr[i-1][0]){ arr[i][1]=arr[i-1][0]+2; arr[i][2]=arr[i-1][0]+2;}if(arr[i-1][1]){ arr[i][0]=arr[i-1][1]+1; arr[i][3]=arr[i-1][1]+3;}if(arr[i-1][2]){if(arr[i][1]>arr[i-1][2]+2||!arr[i][1]) arr[i][1]=arr[i-1][2]+2;if(arr[i][2]>arr[i-1][2]+2||!arr[i][2]) arr[i][2]=arr[i-1][2]+2;}if(arr[i-1][3]){if(arr[i][0]>arr[i-1][3]+1||!arr[i][0]) arr[i][0]=arr[i-1][3]+1;if(arr[i][3]>arr[i-1][3]+3||!arr[i][3]) arr[i][3]=arr[i-1][3]+3;}}}}min=3*MAX;if(letter(str[len-1])){if(arr[len-1][0]){ tmp=arr[len-1][0]+1; if(tmp<min) min=tmp;}if(arr[len-1][1]){ tmp=arr[len-1][1]; if(tmp<min) min=tmp; }if(arr[len-1][2]){ tmp=arr[len-1][2]+1; if(tmp<min) min=tmp;}if(arr[len-1][3]){ tmp=arr[len-1][3]; if(tmp<min) min=tmp; } }else{if(arr[len-1][0]) { tmp=arr[len-1][0]; if(tmp<min) min=tmp; }if(arr[len-1][1]) { tmp=arr[len-1][1]+1; if(tmp<min) min=tmp;}if(arr[len-1][2]) { tmp=arr[len-1][2]; if(tmp<min) min=tmp; }if(arr[len-1][3]) { tmp=arr[len-1][3]+1; if(tmp<min) min=tmp;} }printf("%d\n",min);}//Caps Shift:0-00;1-01;2-10;3-11int main(){int num;scanf("%d",&num);while(num--){scanf("%s",str);memset(arr,0,strlen(str)*4*sizeof(int));proc();}return 0;}。

杭电acm练习题100例(删减版)

杭电acm练习题100例(删减版)

杭电acm练习题100例(删减版)【程序1】题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。

组成所有的排列后再去掉不满足条件的排列。

#include "stdio.h"#include "conio.h"main(){ int i,j,k;printf("\n");for(i=1;i<5;i++) /*以下为三重循环*/for(j=1;j<5;j++)for (k=1;k<5;k++){ if (i!=k&&i!=j&&j!=k) /*确保i、j、k三位互不相同*/printf("%d,%d,%d\n",i,j,k); }getch(); }==============================================================【程序2】题目:企业发放的奖金根据利润提成。

利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%;20万到40万之间时,高于20万元的部分,可提成5%;40万到60万之间时高于40万元的部分,可提成3%;60万到100万之间时,高于60万元的部分,可提成1.5%,高于100万元时,超过100万元的部分按1%提成,从键盘输入当月利润I,求应发放奖金总数?#include "stdio.h" #include "conio.h"main(){ long int i;int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;scanf("%ld",&i);bonus1=100000*0. 1;bonus2=bonus1+100000*0.75;bonus4=bonus2+200000*0.5;bonus6=bonus4+200000*0.3;bonus10=bonus6+400000*0.15;if(i<=100000)bonus=i*0.1;else if(i<=200000)bonus=bonus1+(i-100000)*0.075;else if(i<=400000)bonus=bonus2+(i-200000)*0.05;else if(i<=600000)bonus=bonus4+(i-400000)*0.03;else if(i<=1000000)bonus=bonus6+(i-600000)*0.015;elsebonus=bonus10+(i-1000000)*0.01;printf("bonus=%d",bonus);getch(); }====================================== ========================【程序3】题目:一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?#include "math.h"#include "stdio.h"#include "conio.h"main(){ long int i,x,y,z;for (i=1;i<100000;i++){ x=sqrt(i+100); /*x为加上100后开方后的结果*/y=sqrt(i+268); /*y为再加上168后开方后的结果*/if(x*x==i+100&&y*y==i+268)printf("\n%ld\n",i); }getch(); }====================================== ========================【程序4】题目:输入某年某月某日,判断这一天是这一年的第几天?#include "stdio.h" #include "conio.h"main(){ int day,month,year,sum,leap;printf("\nplease input year,month,day\n");scanf("%d,%d,%d",&year,&month,&day);switch(month) /*先计算某月以前月份的总天数*/{ case 1:sum=0;break;case 2:sum=31;break;case 3:sum=59;break;case 4:sum=90;break;case 5:sum=120;break;case 6:sum=151;break;case 7:sum=181;break;case 8:sum=212;break;case 9:sum=243;break;case 10:sum=273;break;case 11:sum=304;break;case 12:sum=334;break;default:printf("data error");break; }sum=sum+day; /*再加上某天的天数*/if(year%400==0||(year%4==0&&year%100!=0)) /*判断是不是闰年*/leap=1;elseleap=0;if(leap==1&&month>2) /*如果是闰年且月份大于2,总天数应该加一天*/sum++;printf("It is the %dth day.",sum);getch(); }====================================== ======================== 【程序5】题目:输入三个整数x,y,z,请把这三个数由小到大输出。

杭州电子科技大学acm习题集锦

杭州电子科技大学acm习题集锦

目录1、数塔问题 (2)2、并查集类问题 (4)3、递推类问题 (9)4、动态规划系列 (10)5、概率类题型 (13)6、组合数学类题型 (15)7、贪心策略 (16)8、几何问题 (19)数塔类问题数塔Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的高度,接下来用N行数字表示数塔,其中第i行有个i个整数,且所有的整数均在区间[0,99]内。

Output对于每个测试实例,输出可能得到的最大和,每个实例的输出占一行。

Sample Input1573 88 1 02 7 4 44 5 2 6 5Sample Output 30#include<stdio.h>#include<string.h>#define MAX 101int arr[MAX][MAX][2];void res(){int n; int i,j;memset(arr,0,MAX*MAX*sizeof(int));scanf("%d",&n);for(i=0;i<n;i++) //输入数塔for(j=0;j<=i;j++) { scanf("%d",&arr[i][j][0]); arr[i][j][1]=arr[i][j][0]; }for(i=n-2;i>=0;i--){for(j=0;j<=i;j++){if(arr[i+1][j][1]>arr[i+1][j+1][1]) arr[i][j][1]+=arr[i+1][j][1];else arr[i][j][1]+=arr[i+1][j+1][1];}}printf("%d\n",arr[0][0][1]);}int main(){int num;scanf("%d",&num);while(num--) { res(); }return 0;}免费馅饼Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。

ACM题目分类

ACM题目分类
三.数据结构.
(1)串 (poj1035,poj3080,poj1936)
(2)排序(快排、归并排(与逆序数有关)、堆排) (poj2388,poj2299)
(3)简单并查集的应用.
(4)哈希表和二分查找等高效查找法(数的Hash,串的Hash)
(3)点集最小圆覆盖.
(4)对踵点(poj2079)
八.综合题.
(poj3109,poj1478,poj1462,poj2729,poj2048,poj3336,poj3315,poj2148,poj1263)
同时由于个人练习的时候可能有些偏向性,可能上面的总结不是很全,还请大家提出和指正,而且由于ACM的题目中专门针对某个算法的题目可能比较少出现,所以上面的分类中的题有可能有多种解法或者是一些算法的综合,这都不会影响大家做题,希望练习的同学能够认真,扎实地训练,做到真正的理解算法,掌握算法. 同时在论坛上还有许多前辈的分类,总结,大家也可以按自己的情况采用.注意FTP上有很多的资料,希望大家好好地利用.
目的). (poj2823)
(4)左偏树(可合并堆).
(5)后缀树(非常有用的数据结构,也是赛区考题的热点).
(poj3415,poj3294)
四.搜索
(1)较麻烦的搜索题目训练(poj1069,poj3322,poj1475,poj1924,poj2049,poj3426)
(5)杂题.
(poj1870,poj3296,poj3286,poj1095)
七.计算几何学.
(1)坐标离散化.
(2)扫描线算法(例如求矩形的面积和周长并,常和线段树或堆一起使用).
(poj1765,poj1177,poj1151,poj3277,poj2280,poj3004)

acm程序设计大赛题目

acm程序设计大赛题目

The Mailboxes Manufacturers ProblemTime Limit:1000MS Memory Limit:65536KTotal Submit:299 Accepted:227DescriptionIn the good old days when Swedish children were still allowed to blowup their fingers with fire-crackers, gangs of excited kids would plague certain smaller cities during Easter time, with only one thing in mind: To blow things up. Small boxes were easyto blow up, and thus mailboxes became a popular target. Now, a small mailbox manufacturer is interested in how many fire-crackers his new mailbox prototype can withstand without exploding and has hired you to help him. He will provide you with k(1 ≤ k≤ 10) identical mailbox prototypes each fitting up to m(1 ≤ m≤ 100) crackers. However, he is not sure of how many firecrackers he needs to provide you with in order for you to be able to solve his problem, so he asks you. You think for a while and then say, “Well,if I blow up a mailbox I can’t use it again, so if you would provide me with only k = 1 mailboxes, I would have to start testing with 1 cracker, then 2 crackers, and so on until it finally exploded. In the worst case, that is if it does not blow up ev en when filled with m crackers, I would need 1 + 2 + 3 + … + m = m ×(m+ 1) ⁄ 2 crackers. If m = 100 that would mean more than 5000 fire-crackers!” “That’s too many,” he replies. “What if I give you more than k = 1 mailboxes? Can you find a strategy that requires less crackers?”Can you? And what is the minimum number of crackers that you should ask him to provide you with?You may assume the following:1.If a mailbox can withstand x fire-crackers, it can also withstand x− 1fire-crackers.2.Upon an explosion, a mailbox is either totally destroyed (blown up) orunharmed, which means that it can be reused in another test explosion.Note: If the mailbox can withstand a full load of m fire-crackers, then the manufacturer will of course be satisfied with that answer. But otherwise he is looking for the maximum number of crackers that his mailboxes can withstand.InputThe input starts with a single integer N(1 ≤ N≤ 10) indicating the number of test cases to follow. Each test case is described by a line containing two integers: k and m, separated by a single space.OutputFor each test case print one line with a single integer indicating the minimum number of fire-crackers that is needed, in the worst case, in order to figure out how many crackers the mailbox prototype can withstand.Sample Input41 101 1003 735 100Sample Output555050382495SourceSvenskt Mästerskap i Programmering/Norgesmesterskapet 2002 #include <iostream>using namespace std;const int INF = 1 << 28;int d[11][101][101];int sum(int i, int j) {int ret = 0, k;for (k=i; k<=j; k++) ret += k;return ret;}int max(int a, int b) {return a > b ? a : b;}int main() {int caseTime;int i, j, k, t, K, M, l;scanf("%d", &caseTime);while (caseTime--) {scanf("%d%d", &K, &M);for (i=1; i<=M; i++) {for (j=i; j<=M; j++) {d[1][i][j] = sum(i, j);}}for (k=2; k<=K; k++) {for (l=0; l<M; l++) {for (i=1; i+l<=M; i++) {j = i + l;if (i == j) {d[k][i][j] = i;continue;}d[k][i][j] = INF;for (t=i; t<=j; t++) {int tmp;if (t == i) tmp = d[k][i+1][j];else if (t == j) tmp = d[k-1][i][j-1];else tmp = max(d[k-1][i][t-1], d[k-1][t+1][j]); tmp = max(d[k-1][i][t-1], d[k][t+1][j]);if (d[k][i][j] > t + tmp) d[k][i][j] = t + tmp; }}}}printf("%d\n", d[K][1][M]);}return 0;}Bugs Integrated, Inc.Time Limit:15000MS MemoryLimit:30000KTotal Submit:1180 Accepted:309 Case Time Limit:5000MSDescriptionBugs Integrated, Inc. is a major manufacturer of advanced memory chips. They are launching production of a new six terabyte Q-RAM chip. Each chip consists of six unit squares arranged in a form of a 2*3 rectangle. The way Q-RAM chips are made is such that one takes a rectangular plate of silicon divided into N*M unit squares. Then all squares are tested carefully and the bad ones are marked with a black marker.Finally, the plate of silicon is cut into memory chips. Each chip consists of 2*3 (or 3*2) unit squares. Of course, no chip can contain any bad (marked) squares. It might not be possible to cut the plate so that every good unit square is a part ofsome memory chip. The corporation wants to waste as little good squares as possible. Therefore they would like to know how to cut the plate to make the maximum number of chips possible.TaskYou are given the dimensions of several silicon plates and a list of all bad unit squares for each plate. Your task is to write a program that computes for each plate the maximum number of chips that can be cut out of the plate.InputThe first line of the input file consists of a single integer D (1 <= D <= 5), denoting the number of silicon plates. D blocks follow, each describing one silicon plate. The first line of each block contains three integers N (1 <= N <= 150), M (1 <= M <= 10), K (0 <= K <= MN) separated by single spaces. N is the length of the plate, M is its height and K is the number of bad squares in the plate. The following K lines contain a list of bad squares. Each line consists of two integers x and y (1 <= x <= N, 1 <= y <= M) ?coordinates of one bad square (the upper left square has coordinates [1, 1], the bottom right is [N,M]).OutputFor each plate in the input file output a single line containing the maximum number of memory chips that can be cut out of the plate.Sample Input26 6 51 44 62 23 66 46 5 43 36 16 26 4Sample Output34SourceCEOI 2002CODE:#include <iostream>using namespace std;int g[150][10], blk[10];int d[4][60000];int e[11] = {1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049};int n, m, kn;int can1, can2, b[10][60000];int *l0, *l1, *l2, *l3, *bit0, *bit1, *bit2;void build() {int i, j, tmp;for (i=0; i<e[10]; i++) {j = 0; tmp = i;while (tmp > 0) {b[j][i] = tmp % 3;tmp /= 3;j++;}}}inline int maxt(int a, int b) {return a > b ? a : b;}void solve() {int i, j, k, x, y, a1, a2, p, c;scanf("%d%d%d", &n, &m, &kn);memset(g, 0, sizeof(g));memset(d, 0, sizeof(d));for (i=0; i<kn; i++) {scanf("%d%d", &x, &y);g[x-1][y-1] = 1;}for (i=0; i<m; i++) blk[i] = 1 - g[0][i];for (i=1, c=2; i<n; i++) {for (j=0; j<m; j++) {if (g[i][j]) blk[j] = 0;else blk[j]++;c = (c+1)%4;can1 = (j>0 && blk[j]>2 && blk[j-1]>2);can2 = (j>1 && blk[j]>1 && blk[j-1]>1 && blk[j-2]>1);a1 = 2*e[j]+2*e[j-1];a2 = e[j]+e[j-1]+e[j-2];l0 = d[c]; l1 = d[(c+3)%4]; l2 = d[(c+2)%4]; l3 = d[(c+1)%4];bit0 = b[j];if (j>0) bit1 = b[j-1];if (j>1) bit2 = b[j-2];for (p=0; p<e[m]; p++) {if (bit0[p]) {l0[p] = l1[p-e[j]];} else {l0[p] = l1[p];if (j>0 && !bit1[p]) {if (can1) l0[p] = maxt(l0[p],l2[p+a1]+1);if (can2 && !bit2[p]) l0[p] = maxt(l0[p], l3[p+a2]+1); }}}}}printf("%d\n", d[c][0]);}int main() {build();int caseTime;scanf("%d", &caseTime);while (caseTime--) {solve();}return 0;}Silver Cow PartyTime Limit:2000MS MemoryLimit:65536KTotal Submit:1112 Accepted:326 DescriptionOne cow from each of N farms (1 ≤ N≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X(1 ≤ X≤ N). A total of M (1 ≤ M≤ 100,000) unidirectional (one-way roads connects pairs of farms; road i requires T i(1 ≤ T i≤ 100) units of time to traverse.Each cow must walk to the party and, when the party is over, return to her farm. Each cow is lazy and thus picks an optimal route with the shortest time. A cow's return route might be different from her original route to the party since roads are one-way.Of all the cows, what is the longest amount of time a cow must spend walking to the party and back?Line 1: Three space-separated integers, respectively: N, M, and XLines 2..M+1: Line i+1 describes road i with three space-separated integers: A i, B i, and T i. The described road runs from farm A i to farm B i, requiring T i time units to traverse.OutputLine 1: One integer: the maximum of time any one cow must walk.Sample Input4 8 21 2 41 3 21 4 72 1 12 3 53 1 23 4 44 2 3Sample Output10HintCow 4 proceeds directly to the party (3 units) and returns via farms 1 and 3 (7 units), for a total of 10 time units.USACO 2007 February Silver#include <iostream>using namespace std;const int INF = 1 << 28;int adj[1001][1001], adjw[1001][1001], na[1001];int n, m, x;//heap sink,swim,getmin,insert参数均为外部编号,wt为其权值int heap[100001], id[100001], hsize;int *key;void init(int s, int *wt) {int i;hsize = s;key = wt;for (i=1; i<=hsize; i++) {heap[i] = i;id[i] = i;}}void swim(int u) {int p = id[u], q = p >> 1, ku = key[u];while (q && ku < key[heap[q]]) {id[heap[q]] = p;heap[p] = heap[q];p = q;q = p >> 1;}id[u] = p;heap[p] = u;}void sink(int u) {int p = id[u],q = p << 1, ku = key[u];while (q <= hsize) {if (q < hsize && key[heap[q+1]] < key[heap[q]]) q++;if (key[heap[q]] >= ku) break;id[heap[q]] = p;heap[p] = heap[q];p = q;q = p << 1;}id[u] = p;heap[p] = u;}int getmin() {int ret = heap[1];id[ret] = -1;id[heap[hsize]] = 1;heap[1] = heap[hsize];hsize--;sink(heap[1]);return ret;}void insert(int u) {heap[++hsize] = u;id[u] = hsize;swim(u);}void build() {int i;for (i=hsize/2; i>0; i--) sink(heap[i]); }bool isEmpty() {return hsize == 0;}int dijkstraHeap(int beg, int end=-1) {int i, j, k, u, v, w;int dist[1001], chk[1001];for (i=1; i<=n; i++) {dist[i] = INF;chk[i] = 0;}init(n, dist);dist[beg] = 0; swim(beg);while (!isEmpty()) {u = getmin();if (u == end) break;chk[u] = 1;for (i=0; i<na[u]; i++) {v = adj[u][i];w = adjw[u][i];if (dist[v] > dist[u] + w) { dist[v] = dist[u] + w;swim(v);}}}if (end == -1) return dist[n];return dist[end];}int main() {int i, j, k, u, v, w;int val[1001];scanf("%d%d%d", &n, &m, &x);for (i=0; i<m; i++) {scanf("%d%d%d", &u, &v, &w);adj[u][na[u]] = v;adjw[u][na[u]] = w;na[u]++;}dijkstraHeap(x);memcpy(val, key, sizeof(val));int ans = 0;for (i=1; i<=n; i++) {int tmp = dijkstraHeap(i,x);if (tmp+val[i] > ans) ans = tmp + val[i]; }printf("%d\n", ans);return 0;}。

杭电ACM博弈题合集

杭电ACM博弈题合集

杭电ACM博弈题合集hdu博弈,这些题都不难。

属于博弈简单题。

hdu1846巴什博弈,n%(m+1)==0先手必败。

#include#include#include#include#includeusing namespace std;int main(){int n,a,b;scanf("%d",&n);while(n--){scanf("%d%d",&a,&b);if(a%(b+1)==0)printf("second\n");else printf("first\n");}return 0;}hdu1847只要留下两类都是2的指数幂,就是必输状态,然后找规律,发现这两类的和为3的倍数。

即有下面的结论。

#include#include#includeusing namespace std;int main(){int n;while(scanf("%d",&n)!=EOF) {if(n%3==0)printf("Cici\n");else printf("Kiki\n");}return 0;}hdu1848#include#include#include#includeusing namespace std;#define N 1005int f[N];int sg[N];void fun(){int i;f[0]=1;f[1]=1;f[2]=2;for(i=3;;i++){f[i]=f[i-1]+f[i-2];if(f[i]>1000)break;}}int dfs(int v){int i;if(sg[v]!=-1)return sg[v];bool visit[N]={0};for(i=1;i<16;i++){if(v>=f[i]){int temp=dfs(v-f[i]);visit[temp]=1;}}for(i=0;visit[i];i++);return sg[v]=i;}int main(){fun();int m,n,p;while(scanf("%d%d%d",&m,&n,&p),m||n||p) { memset(sg,-1,sizeof(sg));int ans;ans=dfs(m)^dfs(n)^dfs(p);if(ans)printf("Fibo\n");else printf("Nacci\n");}return 0;}hdu1849裸的NIM博弈,直接异或即可。

浙江大学ACM题解分类

浙江大学ACM题解分类
1222 Just the Facts 经典题,据说可能有O(logn)的做法,但我没想到:(
1475 Ranklist 没有完美解决,不知道您有没有好方法……
1572 Bracelet 题义不明,感觉可能是判定欧拉回路的存在性,但是过不去
动态规划:
1011 NTA 简单题
1013 Great Equipment 简单题
1024 Calendar Game 简单题
1027 Human Gene Functions 简单题
1239 Hanoi Tower Troubles Again! SRbGa的经典题……
字符串处理:
1050 Start Up the Startup 简单题
1315 Excuses, Excuses! 简单题
1350 The Drunk Jailer 简单题
1352 Number Base Conversion 简单题
1353 Unimodal Palindromic Decompositions 规模不大,所以是简单题……
1037 Gridland 简单题
1052 Algernon s Noxious Emissions 简单题
1409 Communication System 简单题,但是很容易看错~~~
1425 Crossed Matchings 简单题
1078 Palindrom Numbers 简单题
1086 Octal Fractions 简单题
1199 Point of Intersection 简单题
1104 Leaps Tall Buildings 简单题
1110 Dick and Jane 简单题

杭电oj说明

杭电oj说明

HDU 网址:1.注册以及做题流程登录网站,我们会看到下面这个界面:点击红线画出的Register ID,即可进入登录界面Veify Code:验证码Author Name:用户名Password:密码Confirm Psw:重复密码Email:电子邮箱Nick Name:昵称Sex:性别(其中Male为男,Famale为女)Birthday:生日Location:学校Motto:格言Submit:提交Reset:重置其中后面没打星号的可以不输输入完成后即可点提交如果提交后出现说明你的账号已被人注册,请换个账号当账号注册完成后,我们可以在右上角的填入账号密码,然后点sign in登录然后点下图中用红笔圈出来的地方来进入题目列表然后我们会看到这个界面其中上面那排数字表示的是第几页,下面每一个题号都代表一道题目,可以点题目名称就可进入题目界面题目的格式一般是这样的:其中上面那排绿色的字说明了本题的时间限制,空间限制,以及通过率,这是以后难度较大的题目需要考虑的东西,我们这里就不说了。

(提示一个经验:1s 一般可以执行10^7 次操作)Problem Description:问题描述Input:问题的输入格式Output:问题的输出格式Sample Input:样例输入Sample Output:样例输出(提示:除了题目要求输入输出的,请不要输入输出多余的东西。

比如我们要输入两个数a 和b,我们就不要在输入之前输出“请输入两个数”之类的话,这个请格外注意!!!)我们一般是在自己的电脑的c++编辑器上面编完代码,运行样例输入,看到输出跟跟样例输出一样,然后提交代码。

提交代码点这里的Submit。

然后我们会看到下面这个界面:Problem ID 就是你这道题的题号,一般是不会有问题的。

Language:是你使用的语言一般有上面这么几种语言,我们一般使用C 和C++。

(建议用C写的也用C++ 提交,这样比较保险)然后那一大片蓝色的空白就是给大家粘帖代码的。

(完整word版)杭电ACM试题答案

(完整word版)杭电ACM试题答案

【杭电ACM1000】A +B ProblemProblem DescriptionCalculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample Output2# include <stdio.h>int main(){int a, b;while(scanf("%d%d", &a, &b)!=EOF)printf("%d\n", a+b);return 0;}【杭电ACM1001】Sum ProblemProblem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.InputThe input will consist of a series of integers n, one integer per line.OutputFor each case, output SUM(n) in one line, followed by a blank line. You may assume the result will be in the range of 32-bit signed integer.Sample Input1 100Sample Output1 5050# include <stdio.h>int main(){int n, i, sum = 0;while(scanf("%d", &n)!=EOF){for(i=1; i<=n; ++i)sum = sum + i;printf("%d\n\n", sum);sum = 0;}return 0;}【杭电ACM1002】A +B Problem IIProblem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A and B. Notice that the integers are very large, that means you should not process them by using 32-bit integer. You may assume the length of each integer will not exceed 1000.OutputFor each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line is the an equation "A + B = Sum", Sum means the result of A + B. Note there are some spaces int the equation. Output a blank line between two test cases.Sample Input2 1 2 112233445566778899 998877665544332211Sample OutputCase 1: 1 + 2 = 3 Case 2: 112233445566778899 + 998877665544332211 = 1111111111111111110#include<stdio.h>#include<string.h>int shu(char a){return (a-'0');}int main(){char a[1000],b[1000];int num[1001];int n,i,j=1,al,bl,k,t;scanf("%d",&n);while(n--){getchar();if(j!=1)printf("\n");scanf("%s",a);al=strlen(a);scanf("%s",b);bl=strlen(b);k=(al>bl)?al:bl;for(i=0;i<=k;i++)num[i]=0;t=k;for(k;al>0&&bl>0;k--){num[k]+=shu(a[--al])+shu(b[--bl]);if(num[k]/10){num[k-1]++;num[k]%=10;}}while(al>0){num[k--]+=shu(a[--al]);if(num[k+1]/10){num[k]++;num[k+1]%=10;}}while(bl>0){num[k--]+=shu(b[--bl]);if(num[k+1]/10){num[k]++;num[k+1]%=10;}}printf("Case %d:\n",j++);printf("%s + %s = ",a,b);for(i=0;i<=t;i++){if(i==0&&num[i]==0)i++;printf("%d",num[i]);}printf("\n");}return 0;}。

杭州电子科技大学OJ题目分类

杭州电子科技大学OJ题目分类

杭州电子科技大学OJ题目分类1001 整数求和水题1002 C语言实验题——两个数比较水题1003 1、2、3、4、5... 简单题1004 渊子赛马排序+贪心的方法归并1005 Hero In Maze 广度搜索1006 Redraiment猜想数论:容斥定理1007 童年生活二三事递推题1008 University 简单hash1009 目标柏林简单模拟题1010 Rails 模拟题(堆栈)1011 Box of Bricks 简单题1012 u Calculate e 简单数学计算1013 STAMPS 搜索or动态规划1014 Border 模拟题1015 Simple Arithmetics 高精度计算1016 Shoot-out 博弈+状态压缩DP1017 Tour Guide1018 Card Trick 简单题1019 Necklace Decomposition 贪心1020 Crashing Robots 模拟题1021 Electrical Outlets 简单题1022 Watchdog 简单题1023 Taxi Cab Scheme 图论:最小路径覆盖--->最大二分匹配1024 Pseudo-random Numbers 数论1025 Card Game Cheater 简单题1026 Investment 动态规划1027 Pipes1028 SETI 数学:高斯消元法1029 Minimax Triangulation 计算几何1030 Unequalled Consumption 母函数1031 Declaration of Content1032 Laserbox 搜索:DFS1033 Bowlstack1034 Pesky Heroes1035 Reduced ID Numbers 暴力1036 Tantrix1037 Guardian of Decency 图论:匈牙利算法求二分图的最大匹配1038 Up the Stairs 简单数学题1039 Sudoku 搜索:DFS1040 The SetStack Computer1041 Pie 二分法1042 Ticket to Ride 动态规划1043 The Bookcase 动态规划1044 Printer Queue 模拟题1045 Prime Path 搜索:BFS1046 Lineland's Airport1047 Leonardo's Notebook 数学题:群置换1048 简易版最长序列简单题1049 Jesse's problem 搜索:DFS1050 Error Correction 模拟题1051 A ×B problem 高精度计算1052 Redraiment的走法动态规划1053 Word Encoding 动态规划1054 Jesse's Code 组合数学:排列1055 简单密码破解水题1056 英文金曲大赛水题1057 有假币水题1058 寄居蟹与海葵水题1059 天仙配水题1060 鹊桥相会水题1061 杨辉三角水题1062 蟠桃记水题1063 养兔子水题1064 字符统计水题1065 完美数水题1066 亲和数水题1067 成绩评估水题1068 找零钱水题1069 漂亮菱形水题1070 Least Common Multiple 水题1071 第几天水题1072 编辑距离水题1073 支配值数目水题1074 等值数目水题1075 两数组最短距离水题1076 输入入门(1) 水题1077 输入入门(2) 水题1078 输入入门(3) 水题1079 输出入门水题1080 Counterfeit Dollar 组合数学1081 Dividing 动态规划1082 Sorting It All Out 图论:拓扑排序1083 False coin 暴力法1084 File Mapping1085 Color Me Less 简单题1086 Round and Round We Go 简单题1087 Microprocessor Simulation 简单题1088 求奇数的乘积水题1089 平方和与立方和水题1090 绝对值排序水题1091 JudgeOnline 水题1092 More Beautiful 水题1093 猴子分桃水题1094 C语言实验题——一元二次方程水题1095 C语言实验题——保留字母水题1096 C语言实验题——排列水题1097 C语言实验题——矩阵转置水题1098 C语言实验题——素数水题1099 Ambiguous permutations 简单题1100 Home Work 贪心法1101 Redraiment的遭遇数学题:找规律1102 Decorate the wall 搜索or动态规划1103 Economic phone calls 动态规划or贪心1104 Any fool can do it 记忆化搜索1105 Wine trading in Gergovia 贪心法1106 Homogeneous squares 随机算法1107 Automatic Correction of Misspellings 字符串处理:字典序1108 Black and white painting 简单数学题1109 Cylinder 计算几何:公式推导1110 Deli Deli 水题1111 Expressions 数据结构:树的遍历1112 Flavius Josephus Reloaded 数论:Pollard's Rho算法1113 Annoying painting tool 贪心法1114 Frequent values RMQ区间最值问题OR 线段树1115 Anagram Groups 字符串匹配1116 Let it Bead 组合数学->Polya定理1117 Simple Computers 简单题1118 Mondriaan's Dream 动态规划1119 Equidistance 计算几何1120 How many Fibs? 高精度计算1121 Hike on a Graph 搜索:BFS1122 ASCII Art1123 Billing Tables1124 Cellular Automaton 矩阵计算1125 Exchange1126 Fool's Game1127 Java vs C++ 字符串处理1128 Kickdown 字符串处理1129 Copying Books 贪心+二分法1130 Adding Reversed Numbers 简单题1131 Glass Beads 字符串的最小表示1132 The Circumference of the Circle 计算几何题1133 Knight Moves 搜索:BFS1134 Eeny Meeny Moo 变形的约瑟夫问题1135 Lotto 组合数学1136 Humble Numbers 动态规划1137 Average is not Fast Enough! 简单题1138 Etaoin Shrdlu 简单题1139 Hard to Believe, but True! 简单题1140 Code the Tree 简单题1141 Fiber Network 图论:全源最短路径,Floyd-Warshall算法1142 Global Roaming 3D几何题1143 All in All 字符串处理1144 The Sierpinski Fractal 递归1145 Assistance Required 简单题:预处理1146 Drink, on Ice 模拟题1147 All Discs Considered 搜索:BFS1148 In Danger 模拟题1149 Run Length Encoding 字符串处理1150 Bee Maja 模拟题1151 Friends 表达式求值1152 John 博弈论1153 Double Queue 最大堆与最小堆1154 ‘JBC’1155 Loan Scheduling 贪心+堆1156 Showstopper1157 Highway 贪心法1158 Computers 动态规划1159 The Stable Marriage Problem 组合数学1160 Arne Saknussemm 模拟题1161 Sum Problem 水题1162 Fire Net 搜索题1163 统计1到N之间数字1的个数推理题1164 最大公因子水题1165 C语言实验题——三个整数水题1166 C语言实验题——大小写转换水题1167 C语言实验题——分数序列水题1168 C语言实验题——最值水题1169 C语言实验题——保留整数水题1170 C语言实验题——矩阵下三角元素之和水题1171 C语言实验题——字符逆序水题1172 C语言实验题——打印菱形水题1173 C语言实验题——分割整数水题1174 C语言实验题——删除指定字符水题1175 C语言实验题——时间间隔水题1176 C语言实验题——数组逆序水题1177 C语言实验题——打印数字图形水题1178 C语言实验题——单词统计水题1179 C语言实验题——最小公倍数和最大公约数水题1180 Crashing Balloon 搜索题1181 念数字模拟题1182 A+B for Input-Output Practice(1) 水题1183 Anagrams by Stack 搜索:回溯1184 Elevator 数学:找规律1185 Substrings 字符串处理1186 Calling Extraterrestrial Intelligence Again 搜索:枚举法1187 Do the Untwist 简单数学题1188 数字对水题1189 A+B for Input-Output Practice (2) 水题1190 火星A+B 简单题1191 三齿轮问题:三个齿轮啮合简单数学题1192 A + B Problem II 高精度计算1193 The ones to remain 数学题1194 Chinese Chess 博弈论1195 Page Replacement 数据结构:队列or hash1196 RSA Signing 数论:Pollard's Rho算法1197 Number Guessing 搜索:穷举1198 求n的阶乘高精度计算1199 Area 计算几何1200 求两直线的夹角水题1201 三角形面积水题1202 Max Sum 动态规划1203 Number Sequence 大数问题1204 u Calculate e 水题1205 斐波那契数列高精度计算1206 Fibonacci Again 大数问题1207 Let the Balloon Rise 字符串处理1208 还是A+B 水题1209 A + B 水题1210 The area 简单计算几何1211 Ignatius's puzzle 简单数学问题1212 Computer Transformation 高精度计算1213 N! 高精度计算1217 Text Reverse 水题1220 填数字游戏搜索:DFS1221 Tempter of the Bone 搜索:DFS or BFS+剪枝1226 Last non-zero Digit in N! 数论1227 三角形递推求解1228 回文数猜想简单题1229 Factorial 简单题1230 Specialized Four-Digit Numbers 简单数学题1231 Lowest Bit 简单题1232 To and Fro 简单题1233 AC Me 简单题1234 Wolf and Rabbit 数论1235 最大连续子序列动态规划1236 开门人和关门人字符串处理1237 排名排序1238 统计难题字符串处理:字典树1239 Tick and Tick 数学题1240 Quoit Design 分治法1241 钱币兑换问题递推求解1242 求出前m大的数简单题1243 角谷猜想简单题1244 Reverse Number 简单题1245 寻找素数对简单题1246 ZJUTACM 简单题1247 Hat's Fibonacci 高精度计算1248 Encoding 简单题1249 四数相加高精度计算1250 两数相减高精度计算1251 Square Coins 母函数1252 Counting Triangles 递推求解1253 2^x mod n = 1 数论:费尔马小定理1254 Minimum Inversion Number 简单题1255 Surround the Trees 计算几何:凸包1256 Number Steps 简单题1257 Binary Numbers 简单题1258 Knight Moves 搜索:BFS1259 Lotto 组合数学1260 A Simple Task 简单题1261 The Drunk Jailer 数论1262 Hanoi Tower Troubles Again! 递推求解1263 IBM Minus One 水题1264 Definite Values 简单题1265 Box of Bricks 水题1266 Perfection 简单题1267 Reverse Text 水题1268 Inversion 模拟题1269 Prime Cuts 简单题1270 How Many Fibs? 高精度计算1271 Round and Round We Go 简单题1272 Red and Black 搜索:DFS1273 What Day Is It? 简单题1274 String Matching 字符串匹配1275 A Contesting Decision 简单题1276 Doubles 简单题1277 The Snail 简单题1278 Jungle Roads 图论:最小生成树1279 Prime Ring Problem 搜索:DFS1280 Big Number 大数问题1281 Least Common Multiple 简单题1283 简单排序水题1284 Gridland 简单题1285 An Easy Task 简单题1286 Calendar Game 模拟题1287 Human Gene Functions 动态规划1288 计算几何练习题——线段相交计算几何1289 计算几何练习题——线段相交II 计算几何1290 计算几何练习题——直线交点计算几何1291 Trees Made to Order 递归求解1292 排序简单题1293 18岁生日简单题1294 吃糖果递推求解1295 变种汉诺塔递推求解1296 洗牌递推求解1297 大数求余数论1298 圆桌会议递推求解1299 畅通工程并查集1300 还是畅通工程最小生成树1301 统计同成绩学生人数水题1302 简单计算器表达式求值:栈的应用1303 改进版计算器表达式求值:栈的应用1304 FatMouse' Trade 贪心法1305 Digital Roots 大数问题1306 Uniform Generator 数论1307 A Mathematical Curiosity 穷举法1308 Safecracker 穷举法1309 The 3n + 1 problem 简单题1310 分享糖果模拟题1311 宝物收集搜索:BFS1312 Climbing Worm 简单题1313 搬桌子贪心法1314 Humble Numbers 动态规划1315 Dividing 动态规划1316 Rightmost Digit 数学问题1317 Leftmost Digit 数学问题1318 Hangover 简单数学问题1319 Exponentiation 高精度计算1320 I Think I Need a Houseboat 简单题1321 Girls and Boys DFS+二分图1322 Monkey and Banana 动态规划1323 买牛奶简单题1324 Matrix Chain Multiplication 数据结构:栈的应用1325 计算成绩简单题1326 Holding Bin-Laden Captive! 母函数1327 You can Solve a Geometry Problem too 计算几何1328 Super Jumping! Jumping! Jumping! 动态规划1329 a^b 数论1330 计算GPA 水题1331 Give me an offer! 动态规划:0-1背包1332 田忌赛马贪心法1333 Asteroids! 搜索:BFS1334 Oil Deposits 搜索:DFS1335 营救天使搜索:BFS1336 小数化分数高精度计算1337 I Hate It 线段树1338 Strange Billboard 位运算+枚举1339 Frobenius 递推求解1340 奇怪的公式数学题1341 Fibonacci again and again 博弈论1342 A New Tetris Game 博弈论1343 Sum It Up 搜索:DFS1344 速算24点搜索1345 推箱子搜索:BFS1346 Pushing Boxes 搜索:BFS1347 The Worm Turns 搜索1348 Alfredo's Pizza Restaurant 简单题1349 Broken Keyboard 字符串处理1350 Convert Kilometers to Miles 简单题1351 单词数水题1352 仙人球的残影简单题1353 Family planning 简单题1354 Rout 66 简单题1355 LC-Display 模拟题1356 A == B ? 高精度计算1357 不容易系列之一递推求解1358 折线分割平面递推求解1359 find the nth digit 二分查找1360 奇数阶魔方(II) 简单题1361 Keep on Truckin' 简单题1362 Factstone Benchmark 简单题1363 Destroy the Well of Life 模拟题1365 Brave Game 博弈论1366 ASCII码排序水题1367 计算两点间的距离水题1368 计算球体积水题1369 求绝对值水题1370 数值统计水题1371 求数列的和水题1372 水仙花数水题1373 多项式求和水题1374 素数判定水题1375 偶数求和水题1376 母牛的故事水题1377 数列有序! 水题1378 发工资咯:)水题1379 C语言合法标识符水题1380 海选女主角水题1381 查找最大元素水题1382 首字母变大写水题1383 统计元音水题1384 Palindromes _easy version 水题1385 汉字统计水题1386 进制转换水题1387 人见人爱A+B 水题1388 人见人爱A-B 水题1389 人见人爱A^B 水题1390 改革春风吹满地计算几何1391 今年暑假不AC 动态规划1392 三角形水题1393 求平均成绩水题1394 不容易系列之二递推求解1395 密码水题1396 一只小蜜蜂... 递推求解1397 不容易系列之(3)——LELE的RPG难题递推求解1398 骨牌铺方格递推求解1399 阿牛的EOF牛肉串递推求解1400 神、上帝以及老天爷递推求解1401 不容易系列之(4)——考新郎递推求解1402 Bitset 简单题1403 Picture 简单模拟题1404 Switch Game 找规律1405 An easy problem 简单模拟题1406 A + B Again 简单题1407 The sum problem 简单数学题1408 龟兔赛跑动态规划1409 Snooker 简单数学题1410 Subset sequence 简单题1411 汉诺塔III 递推求解1412 "红色病毒"问题递推求解1413 小兔的棋盘递推求解1414 RPG的错排错排+排列组合1415 无限的路简单题1416 夹角有多大数学题1417 汉诺塔IV 递推求解1418 复习时间简单题1419 选课时间暴力求解1420 手机短号字符串处理1421 找单词母函数1422 简易版之最短距离数学题1423 数塔动态规划1424 核反应堆简单题1425 A1 = ? 公式推导1426 剪花布条字符串处理1427 不要62 数学题1428 空心三角形字符串处理1429 小明A+B 简单题1430 Sky数进制转换1431 整除的尾数简单题1432 分拆素数和数论1433 正整数解数学题1434 挂盐水模拟题1435 {A} + {B} 简单题1436 小数A+B 高精度计算1437 Zigzag 简单题1438 螺旋形简单题1439 行李寄存简单题1440 判断多边形凹凸计算几何1441 The centre of polygon 计算几何1442 最小正整数简单题1443 Elevator Stopping Plan 二分+贪心法1444 TOYS 计算几何1445 The Doors 计算几何1446 Polygon And Segment 计算几何1447 Fence 计算几何1448 两圆相交面积计算几何1449 Area of Circles 计算几何1450 Pipe 计算几何1451 zero sum 搜索:DFS1452 C语言实验题——Hello World 水题1453 C语言实验题——数日子水题1454 C语言实验题——三个数排序水题1455 C语言实验题——数字串求和水题1456 C语言实验题——拍皮球水题1457 C语言实验题——求一个3*3矩阵对角线元素之和水题1458 C语言实验题——数组逆序水题1459 C实验题——求最大值水题1460 C实验题——求绝对值最大值水题1461 C语言实验题——求平均值水题1462 C语言实验题——打印直角三角形水题1463 C语言实验题——相加和最大值水题1464 C语言实验题——简单编码水题1465 C语言实验题——某年某月的天数水题1466 C语言实验题——各位数字之和排序水题1467 C语言实验题——两个数最大水题1468 C语言实验题——求级数值水题1469 Pipe II 计算几何1470 Transmitters 计算几何1471 Wall 计算几何1472 C语言实验题——逆置正整数水题1473 C语言实验题——找中间数水题1474 C语言实验题——整数位水题1475 C语言实验题——一元二次方程II 水题1476 C语言实验题——圆周率水题1477 C语言实验题——余弦水题1478 C语言实验题——打印金字塔水题1479 C语言实验题——排序水题1480 C语言实验题——约瑟夫问题水题1481 C语言实验题——鞍点水题1482 C语言实验题——计算表达式水题1483 C语言实验题——汉诺塔水题1484 C语言实验题——字符串排序水题1485 C语言实验题——整除水题1486 Solitaire 搜索:(双向)BFS1487 Abbreviation 水题1488 C语言实验题——买糖果水题1489 C语言实验题——字符编码水题1490 C语言实验题——合法的C标识符水题1491 C语言实验题——三角形面积水题1492 C语言实验题——大小写转换水题1493 C语言实验题——圆柱体计算水题1494 C语言实验题——温度转换水题1495 C语言实验题——统计字串水题1496 C语言实验题——字符过滤水题1497 Coin Change 暴力求解1498 Beautiful Meadow 搜索题1499 C语言实验题——鸡兔同笼水题1500 Coins of Luck 数学题:数学期望1501 Friends 搜索:DFS1502 Find All M^N Please 数学题1503 Incredible Cows 搜索:二分+DFS1504 计算直线的交点数递推求解1505 Number Game 动态规划1506 Sort ZOJ7 字符串处理1507 Find 7 Faster Than John Von Neumann 高精度计算1508 免费馅饼动态规划1509 Worm 动态规划1510 Common Subsequence 动态规划1511 搬寝室动态规划1512 Daydream 字符串处理1513 Ballroom Lights1514 Drop the Triples1515 Finding Seats1516 He is offside!1517 Justice League1518 星星点点搜索1519 逆波兰表达式表达式求解:栈的应用1520 十六进制高精度计算1521 Palindromic sequence1522 Hotel 模拟题1523 Intersecting Lines 计算几何1524 Heap Construction 最短路径1525 Pizza Anyone?1526 Adam's Genes1527 Risk1528 Just the Facts 数论1529 Horse Shoe Scoring 计算几何1530 哥德巴赫猜想数论1531 爱的伟大意义简单题1532 校门外的树模拟题1533 最多约数问题数论1534 Quicksum 数学题1535 找规律填数字数学题1536 Accepted Necklace 搜索:DFS1537 除法表达式数论1538 A Walk Through the Forest 图论:最短路径1539 Accurately Say "CocaCola"! 简单题1540 Build The Electric System 图论:最小生成树1541 Colorful Rainbows 计算几何1542 Easy Task 数学题1543 Faster, Higher, Stronger 简单题1544 Give Me the Number 模拟题1545 Hurdles of 110m 动态规划1546 Just Pour the Water 矩阵计算1547 Kinds of Fuwas 穷举法1548 复数运算简单题1549 元素个数排序简单题1550 Fiber Communications1551 Power Hungry Cows 搜索:BFS1552 Cow Cycling 动态规划1553 Rebuilding Roads 树型DP1554 Triangular Pastures 动态规划1555 Chores 动态规划1556 Extra Krunch1557 BUY LOW, BUY LOWER 动态规划1558 Hypnotic Milk Improvement1559 Happy Cows1560 Unary Cow Counting1561 Dairy Route1562 Calf Numbers1563 Hide and Seek1564 Mountain Majesties1565 Secret Milk Pipes1566 Circus Tickets1567 Life Cycle1568 Wiggle Numbers1569 Superwords1570 Cow Brainiacs1571 Pasture Fences1572 New Years Party1573 Strolling Cows1574 Grazing Sets1575 Factorial Power1576 Friday the Thirteenth1577 Beef McNuggets1578 Calf Flac1579 Light Bulbs1580 Cow Math 图论1581 Cow Imposters 动态规划1582 Traffic Lights 递推求解1583 Farm Tour 图论:最短路径1584 Vertical Histogram 简单题1585 Cowties 动态规划1586 Travel Games 搜索:DFS1587 Best Cow Fences 二分法1588 Cornfields RMQ问题1589 Six Degrees of Cowvin Bacon 简单题1590 Herd Sums 简单题1591 Message Decoding 简单题1592 Mountain Walking 二分+flood fill1593 Millenium Leapcow 动态规划1594 Optimal Milking 最大流+二分法1595 Bale Figures 模拟+二分法1596 Jumping Cows 动态规划1597 Lost Cows SBT树1598 Bovine Math Geniuses 简单题1599 Dividing the Path 动态规划1600 Fence Obstacle Course 动态规划1601 Cow Ski Area 图论:flood fill1602 Cleaning Shifts 贪心法1603 Bad Cowtractors 最大生成树1604 Tree Cutting 树状动态规划1605 Navigation Nightmare 并查集1606 Cow Marathon 树状动态规划1607 Distance Queries LCA,tarjan算法1608 Distance Statistics 楼天成大牛“男人八题”中的一道1609 Moo University - Team Tryouts 排序+穷举法1610 Moo University - Emergency Pizza Order1611 Moo University - Financial Aid 最大堆、最小堆1612 Cube Stacking 并查集1613 The Cow Lineup 穷举法1614 MooFest 线段树1615 Turning in Homework 动态规划1616 Alignment of the Planets1617 Finding Bovine Roots1618 Cow Bowling1619 Cow Patterns 字符串匹配的扩展1620 Barn Expansion 二分查找1621 Layout 差分约束系统1622 Knights of Ni 搜索:BFS1623 Cleaning Shifts DP+Heap1624 Scales 搜索+剪枝1625 Secret Milking Machine 二分+网络流1626 Aggressive cows 二分法1627 Rigging the Bovine Election 穷举法1628 Feed Accounting 简单模拟题1629 Muddy Fields 穷举法1630 The Wedding Juicer 堆+flood fill1631 Naptime 动态规划1632 Sumsets 动态规划1633 Moo Volume 简单题1634 Ombrophobic Bovines Floyd-Warshall 1635 Space Elevator 动态规划1636 Yogurt factory 动态规划1637 Checking an Alibi 最短路径1638 Out of Hay1639 Satellite Photographs 搜索:BFS or DFS 1640 Asteroids 最大网络流1641 Grazing on the Run 动态规划1642 Walk the Talk 动态规划1643 City Skyline 栈的应用1644 Cow Acrobats 贪心法1645 Ant Counting 动态规划1646 Hopscotch 搜索:DFS1647 Securing the Barn 穷举法1648 Bovine Birthday 递推求解1649 Max Factor 简单题1650 Flying Right1651 Close Encounter1652 Allowance1653 Lazy Cows1654 Expedition1655 Around the world1656 Landscaping1657 Waves1658 Navigating the City1659 Disease Management1660 Muddy roads1661 Wormholes 最短路径1662 The Fewest Coins 动态规划1663 Milk Patterns 二分法or后缀树1664 Cow Picnic 搜索:BFS or DFS1665 Cow Roller Coaster 动态规划1666 River Hopscotch 二分法+贪心1667 The Moronic Cowmpouter 进制转换1668 DNA Assembly 穷举法1669 Cow Phrasebook 二分法1670 Cellphones 穷举法1671 Steady Cow Assignment 网络流1672 Treats for the Cows 动态规划1673 Backward Digit Sums 穷举法1674 Stump Removal 简单题1675 Finicky Grazers 动态规划1676 The Water Bowls 枚举二进制位1677 Redundant Paths 图论1678 Roping the Field 动态规划1679 Corral the Cows 二分法1680 The Cow Prom 图论1681 Dollar Dayz 动态规划1682 The Grove 最短路径1683 Fence Repair Huffman编码1684 Corn Fields 状态压缩DP1685 Roadblocks 图论:最短路径1686 Bad Hair Day 搜索1687 Big Square 穷举法1688 Round Numbers 枚举二进制位1689 Building A New Barn1690 Cow Sorting 置换群1691 Lilypad Pond 最短路径1692 The Cow Lexicon 动态规划1693 Silver Cow Party 最短路径1694 Problem Solving 动态规划1695 Cow School1696 Protecting the Flowers 贪心法1697 Tallest Cow 区间统计1698 Balanced Lineup RMQ问题1699 Gold Balanced Lineup RMQ问题1700 Ranking the Cows 搜索:DFS1701 Face The Right Way 穷举法1702 Cow Traffic 动态规划1703 Monthly Expense 贪心法1704 Cheapest Palindrome 动态规划1705 Dining 贪心+网络流1706 City Horizon 离散化+ 扫描1707 Catch That Cow 最短路径1708 Fliptile 枚举+位压缩1709 2-Dimensional Rubik's Cube 搜索:BFS 1710 Ball 计算几何1711 3D Camera 三维计算几何1712 Cipher 模拟题1713 Five in a Row 简单题1714 Pinhole Imaging 简单计算几何1715 URL 模拟题1716 Battle of Submarines 集合DP1717 WOJ 动态规划1718 钥匙计数之二递推求解1719 BrokenLED 模拟题1722 A+B again and again! 模拟题1723 Just calculate it! 数论1724 Guess how much I love you? 简单题1725 NBA Finals1726 Find Out an “E”1727 Judging ACM/ICPC1728 Cryptography of Alex1729 Rings of square grid1730 Fermat's Theorem1731 Cup 二分法1732 Find the Path DP+二分法1733 Five in a Row, Again 动态规划1734 Minimum Heap 递推求解1735 Name PK 模拟题1736 Pendant 动态规划1737 Radar 计算几何+搜索1738 Ring 多串模式匹配1739 Run 计算几何1740 Toxophily 简单题1741 通讯录编排简单题1742 超缘分ACM队伍简单题1743 集合运算简单题1744 矩阵计算简单题1745 Arbitrage 动态规划1746 The Tower of Babylon 动态规划1747 Binomial Showdown 组合数学1748 Dungeon Master 搜索:BFS1749 Equation Solver 表达式求值应用1750 Frogger 最短路径1751 Globetrotter 计算几何1752 Tree Recovery 数据结构:二叉树1753 Artificial Intelligence?1754 The Settlers of Catan 搜索1755 France '98 概率问题1756 Goldbach's Conjecture 数论1757 Heavy Cargo 最小生成树1758 Quadtree1759 From Dusk till Dawn or: Vladimir the Vampire 最短路径1760 Euro Cup 20001761 Quadtree II or: Florida Jones strikes back1762 HTML 简单题1763 Paths on a Grid 组合数学:T路问题1764 Balanced Food 动态规划1765 California Jones and the Gate to Freedom 组合数学1766 Diplomatic License 简单计算几何题1767 Polygon Programming with Ease 数学题1768 Hall of Fountains 搜索:BFS or DP1769 The Bottom of a Graph 图论:强连通分量1770 Edge1771 Fold1772 Largest Rectangle in a Histogram 动态规划1773 Boolean Logic1774 Code1775 In Danger 模拟题1776 Fractran1777 Huffman's Greed1778 Bullshit Bingo 字符串处理1779 A Song contest1780 Message1781 The skatepark's new ramps1782 Road1783 Warfare1784 Blackjack1785 Robintron1786 Diamond Dealer 计算几何:凸包1787 Best Compression Ever1788 Code Theft1789 Dinner1790 Event Planning1791 Getting Gold1792 Introspective Caching1793 Just A Few More Triangles!1794 Knights of the Round Table 图论:无向图的块判断奇圈1795 The Cow Doctor 穷举法1796 Wild West 线段树1797 Find the Clones1798 The Warehouse1799 Widget Factory 数论:同余方程组1800 Martian Mining 动态规划3301 字符串;AC自动机,动态规划;状态压缩3302 计算几何3303 数学;代数运算;高斯消元3304 图论;强连通分量;2-SAT3305 动态规划;凸单调性优化3306 枚举3307 贪心3308 数学;代数运算3309 最短路;佛洛伊德3310 动态规划3311 贪心3312 计数问题;递推,数状数组,二分查找3313 数论;欧拉定理,快速幂取模3314 计数问题,数状数组3315 博弈;Surreal数;Farey数列;3316 计数问题;递推,高精度3317 计数问题;容斥原理3318 递推;矩阵乘法3319 数学;概率3320 背包3321 动态规划3322 字符串;AC自动机3323 动态规划3324 博弈3325 搜索3326 贪心3327 最短路3328 数据结构(实现一种数据结构,支持要求的操作),数状数组3329 图论;二分图最大权匹配3330 数学;数论3331 递推;矩阵乘法3332 数学;数论,二分查找3333 计算几何3334 动态规划3335 字符串,后缀数组或拉宾卡普;动态规划3336 数据结构;并查集3337 计数问题,递推3338 二分查找,贪心3339 数学3340 计算几何;凸包,图论;佛洛伊德;最小环3341 动态规划3342 广搜3343 动态规划3344 计算几何3345 二分图最大匹配3346 树型DP3347 动态规划3348 数学;数论;进制3349 计数问题3350 贪心3351 数学;数论;进制3352 动态规划,数论,组合数学3353 数学;数论3354 计数;递推3355 图论;佛洛伊德3356 博弈3357 动态规划3358 数据结构;线段树,数状数组3359 计算几何,动态规划3360 博弈;SG函数3361 图论;最近公共祖先3362 图论;强连通分量;2-SAT 3363 计算几何3364 字符串;AC自动机,动态规划3365 搜索,舞蹈链3366 数学;数论3367 数学;代数运算;高斯消元3368 动态规划3369 计数问题;递推3370 网络流(错题)3371 树型DP3372 数学;高精度3373 数学;3374 RMQ3376 数学;进制3377 字符串;后缀数组3378 动态规划3379 计算几何3380 线段树3381 图论;欧拉路3382 简单题3383 字符串;AC自动机3384 广搜3385 计算几何,矩阵3386 语言处理3387 动态规划;状态压缩3388 图论;全局最小割3389 简单题3390 广搜3391 数学;Pell方程3392 背包3393 计算几何3394 广搜3395 搜索;迭代加深3396 数学;计数问题3397 数学;解方程3398 分析3399 模拟3400 数学;计数问题,数论6 热度。

From [cout]Bing 杭电题目分类排序列表 仅供参考 (1)

From [cout]Bing 杭电题目分类排序列表  仅供参考 (1)

163 167 167 174 175 190 195 204 216 222 224
235
294 303 309 311 340 358 360 363 367 413 414 443 480 494 576 660 740 856 941 1001 1004
1157 AC AC AC 2059 1421 2602 1864 1024 1466 AC AC AC AC 1058 1087 2037 1003 1402 3177 1055 3348 AC 4070 1789 1051 1052 AC 1050 1512 1538 1006 1007 1381 AC 4148 1572 1242 3699 1105 1111 1112 1511
48.41% 36.03% 30.60% 35.02% 24.16% 32.56% 43.92% 41.61% 39.40% 50.28% 21.66% 13.21% 34.55% 33.50% 25.51% 57.24% 58.71% 39.03% 26.27% 33.66% 47.49% 45.45% 23.50% 23.00% 49.39% 71.83% 26.34% 37.21% 100.00% 30.00% 4.76% 52.00% 35.48%
跑跑卡丁车 Free DIY Tour Advanced Fruits Frog 武林 Mondriaan's Dream Greatest Common Increasing Subsequence Pascal's Travels White Rectangles Max Sum Plus Plus Plus WHUgirls Tree Construction Fast Food Beans How many ways Coins Palindrome Chopsticks 命运 City Game Human Gene Functions Function Run Fun Eddy's research II Doing Homework Employment Planning FatMouse and Cheese Largest Rectangle in a Histogram Zipper Piggy-Bank Monkey and Banana 悼念512汶川大地震遇难同胞——珍惜现在,感恩 生活 Constructing Roads In JGShining's Kingdom FatMouse's Speed

杭电ACM博弈题合集

杭电ACM博弈题合集

hdu博弈,这些题都不难。

属于博弈简单题。

hdu1846巴什博弈,n%(m+1)==0先手必败。

#include <iostream>#include<cstdio>#include<cstring>#include<cstdlib>#include<cmath>using namespace std;int main(){int n,a,b;scanf("%d",&n);while(n--){scanf("%d%d",&a,&b);if(a%(b+1)==0)printf("second\n");else printf("first\n");}return 0;}hdu1847只要留下两类都是2的指数幂,就是必输状态,然后找规律,发现这两类的和为3的倍数。

即有下面的结论。

#include <iostream>#include<cstdio>#include<cmath>using namespace std;int main(){int n;while(scanf("%d",&n)!=EOF){if(n%3==0)printf("Cici\n");else printf("Kiki\n");}return 0;}hdu1848#include <iostream>#include<cstdio>#include<cmath>#include<cstring>using namespace std;#define N 1005int f[N];int sg[N];void fun(){int i;f[0]=1;f[1]=1;f[2]=2;for(i=3;;i++){f[i]=f[i-1]+f[i-2];if(f[i]>1000)break;}}int dfs(int v){int i;if(sg[v]!=-1)return sg[v];bool visit[N]={0};for(i=1;i<16;i++){if(v>=f[i]){int temp=dfs(v-f[i]);visit[temp]=1;}}for(i=0;visit[i];i++);return sg[v]=i;}int main(){fun();int m,n,p;while(scanf("%d%d%d",&m,&n,&p),m||n||p) {memset(sg,-1,sizeof(sg));int ans;ans=dfs(m)^dfs(n)^dfs(p);if(ans)printf("Fibo\n");else printf("Nacci\n");}return 0;}hdu1849裸的NIM博弈,直接异或即可。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

杭电ACM试题分类枚举1002 10041013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 10391042 10471048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 10841088 11061107 1113 1117 1119 1128 1129 1144 1148 1157 1161 1170 1172 117711971200 1201 1202 1205 1209 1212(大数取模)1216 (链表)1218 1219 12251228 12291230 1234 1235 1236 1237 1239 1250 1256 1259 1262 1263 1265 12661276 1279 1282 1283 1287 1296 1302 1303 1304 1305 1306 1309 1311 1314搜索,递归求解1010 1016 1026 1043(双广)1044 (BFS+DFS) 1045 1067 1072 1104 1175 1180 11951208 1226 1238 1240 1241 1242 1258 1271 1312 1317动态规划1003 1024 1025 1028 1051 1058 1059 1069 1074 1078 1080 1081 1085 1087 1114 1158 1159 1160 1171 1176 1181 1203 1224 1227 1231 1244 1248 1253 1254 1283 1300数学,递推,规律1005 1006 1012 1014 1018 1019 1021 1023 1027 1030 1032 1038 1041 1046 1059 1060 1061 1065 1066 1071(微积分)1097 1098 1099 1100 1108 1110 1112 1124 1130 1131 1132 1134 1141 1143 1152 1155(物理题)1163 1165 1178 1194 1196(lowbit) 1210 1214 1200 1221 1223 1249 1261 1267 1273 1290 1291 1292 1294 1297 1313 1316数论1164 1211 1215 1222 1286 1299计算几何1086 1115 1147贪心1009 1052 1055 1257 并查集11981213 1232 1272线段树,离散化11991255图论最短路相关的问题1142 1162 1217 1301二分图问题1054 1068 1150 1151 1281其他1053 (huffman) 1102(MST) 1116 (欧拉回路)1233(MST) 1269 (强连通)数据结构1103 (堆+模拟)1166 (数状树组)1247 1251 1285 (Topol) 1298以下是详细介绍1002简单的大数1003 DP经典问题,最大连续子段和1004简单题1005找规律(循环点)1007经典问题,最近点对问题,用分治1008简单题1010搜索题,剪枝很关1009贪心1012简单题1013简单题(有个小陷阱)1014简单题1015可以看作搜索题吧1016经典的搜索1017简单数学题1018简单数学题1019简单数学题1020简单的字符串处理找规律的数学题数据结构的题(栈的应用)特殊的数(Catalan Number)经典DP,最大M 子段和经典DP,最长递增子序列(要用NLogN的方法过)搜索数学题(或用STL)经典问题,整数拆分,用母函数做简单题(一般方法容易超时)简单题,可用模拟过简单题简单题模拟题Candy Sharing Game模拟题简单题简单题,不是一般的简单简单题字符串处理简单题,排序简单题,用大数大数经典搜索题,八数码问题稍微有点麻烦的搜索题搜索题,可用匹配做简单题简单的大数简单字符串处理简单题贪心经典贪心,也可以用DP贪心贪心,关于Huffman编码二分匹配二分匹配简单题模拟题经典问题,丑数,DP经典问题,可以用母函数或DP (不针对题目优化都会超时)数学题数学题简单字符串处理模拟大数简单题1065简单题1066数学题,找规律1068经典二分匹配1069经典DP1070简单题1071简单数学题1072搜索1073字符串处理1074 DP1075字典树1076简单题1078DP1079博弈(DP)1080DP 1081经典DP1082简单题1083二分匹配1084简单题1085母函数1086简单几何题1087简单DP1088字符串处理1089~1096 (练习输入输出的8个题目)1097简单数学题1098数学题,注意找规律1099数学HrH1500DP1501DP1502DP or记忆化1503DP1504模拟1505DP1506DP15072分匹配1508记忆化容易点1509模拟1510 DP1511搜索可以过1512左偏树1513DP1514DP1515DFS1516DP1517博奕搜索DP (不确定)树状DP 数学题稳定婚姻DP 博弈博弈Maxflow博弈2分匹配简单题最大团差分约束Maxflow入门题KM Or > 小费用流差分约束差分约束博弈模拟加置换群的理论CODE可以短些,其实没必要。

很有意思的题目。

据说是Microsoft亚洲总裁面试的题目搜索线段树树状数组离散,线段树线段树简单的DP搜索模拟模拟2分答案简单技巧。

数学搜索并查+线段判交DP减支+搜索树状DP暴力between 1000 and 9999简单博弈。

状态DP数学1567模拟1568大数1569最小割1570数学1571最段路1572搜索1573数学1574DP15752 分1576数论1577模拟,处理精度1579记忆化1580 DP1582搜索1583模拟1584搜索1587简单题目1591模拟1592简单1593数学1594数学1595图论1596图论1597图论1598图论1599图论基础题:100(k 100K 1004. 1005. 1008. 1012. 1013. 1014. 1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、1061、1070、1076、1089、1090、1091、1092、1093、1094、1095、1096、1097、1098、1106、1108、1157、1163、1164、1170、1194、1196、1197、1201、1202、1205、1219、1234、1235、1236、1248、1266、1279、1282、1283、1302、1303、1323、1326、1330、1334、1335、1339、1390、1391、1393、1395、1397、1405、1406、1407、1408、1412、⑷8、1420、1465、1491、1555、1562、1563、1570、1587、1673、1678、1708、1718、1720、1785、1799、1859、1862、1877、1898、1976、1977、1985、1994、2000、2001、2002、2003、2004、2005、2006、2007、2008、2009、2010、2011、2012、2013、2014、2015、2016、2017、2018、2019、2020、2021、2022、2023、2024、2025、2026、2027、2028、2029、2030、2031、2032、2033、2034、2035、2039、2040、2042、2043、2048、2049、2051、2053、2055、2056、2057、2060、2061、2071、2073、2075、2076、2078、2081、2083、2088、2090、2092、2093、2095、2096、2097、2098、2099、2101、2103、2106、2107、2109、2113、2114、2115、2123、2131、2132、2133、2135、2136、2137、2138、2139、2143、2148、2153、2156、2161、2162、2164、2178、2186、2192、2200、2201、2212、2304、2309、2317、2401、2500、2502、2503、2504、2519、2520、2521、2523、2524、2535、2537、2539、2547、2548、2549、2550、2551、2552、2555、2560、2561、2562、2566、2567、2568、2700、2710、DP:1003、10240、1029、1069、1074、1087、1114、1159、1160、1171、1176、1203、1231、1257、1260、1284、1421、1789、1978、2059、2084、2159、2191、2544、2571、2602、2709、搜索:1010、1015 、1016 、1026、1072、,1075、1175、1180、1181、1238、1239、1240、1241、1242、1253、1254、1312、1372、1548、1597、1671、1677、1728、1800、1983、2102、2141、2553、2563、2605、2612、2614、1616>,2717贪心:1009、1045、1049 、1050、1051、,1052、1257、1800、2037、2111、2124、2187、2391、2570数学题:1018、1065、1071、1115、1141、1162、1212、1220、]1492、:1593、1701、1722、1798、1840、1999、2036、2080、2086、2089、2105、2108、2134、2303、2393、2438、2529、2547、2548、2552、2554、2601、2603、.2701递推:1133、1143 、1207 、1249 、1267、.1284、1290、1297、1396、1992、1995、1996、2013、2014、2044、2045、2046、2047、2050、2064、2065、2067、2068、2070、2077、2085、2151、2154、2160、2190、2501、2512、2563、2569、2709、2716、字符串:1020、1039、:1043、:1062、:1073、1075、1088、1113、1161、1200、1251、1256、1288、1321、1328、1379、1804、1860、1982、1984、2017、2024、2025、2026、2027、2043、2052、2054、2072、2074、2087、2131、2137、2140、2163、2203、2206、2352、2500、2549、2564、2565、2567、2572、2609、2607、2707、2708、2719、2721、2723、大数:1002、1042、1133、1250、1297、1715、1753、1865、2100.胡搞 :1022 、1027、 1030、 1035、 、1128、 1165、 1209、 1210、 1215、 1222、 1228、 1229、 1230、 1237、 1259、 1276、 1286. 1337、1342、 1361、 1370、 1506、 1577、 1597、 1702、 1716、 1727、 1868、 1870、 1896、 1981、 1986、 1987、 1988、 1997、 1998、 1999、 2058、 2062、 2089、 2090、 2094、 2104、 2116、2117、 2135、 2175、 2183、 2184、 2197、 2303、 2368、 2370、 2374、 2511、 2522、 2527、 2600、 2615、 2703、 2711、 2714、 2715、 2725、博弈 :1077 、1404 、1517 、1524、 、1525、 1527、1536、 1564、 1729、 1730、 1846、 1847、 1848、 1849、 1850、 2147、 2149、 2176、 2177、 2188母函数: 1085、 1171、 1398、 2079、 2082、 2110、 2152、2189、 2566、 hash : 1264、1280、1425、1496、1800、2522、2600、。

相关文档
最新文档