随笔分类 -  POJ

Frame Stacking ZOJ 1083,poj 1128
摘要:Frame StackingTime Limit:1000MSMemory Limit:10000KTotal Submissions:4034Accepted:1352DescriptionConsider the following 5 picture frames placed on an 9... 阅读全文

posted @ 2014-07-20 21:44 圣手摘星 阅读(418) 评论(0) 推荐(0)

poj 1094 / zoj 1060 Sorting It All Out
摘要:Sorting It All OutTime Limit:1000MSMemory Limit:10000KTotal Submissions:26876Accepted:9271DescriptionAn ascending sorted sequence of distinct values i... 阅读全文

posted @ 2014-07-18 19:30 圣手摘星 阅读(145) 评论(0) 推荐(0)

POJ 2935 Basic Wall Maze
摘要:http://poj.org/problem?id=2935Basic Wall MazeTime Limit:1000MSMemory Limit:65536KTotal Submissions:2794Accepted:1271Special JudgeDescriptionIn this pr... 阅读全文

posted @ 2014-07-15 22:32 圣手摘星 阅读(255) 评论(0) 推荐(0)

zoj 1119 / poj 1523 SPF (典型例题 求割点 Tarjan 算法)
摘要:poj :http://poj.org/problem?id=1523如果无向图中一个点 u 为割点 则u 或者是具有两个及以上子女的深度优先生成树的根,或者虽然不是一个根,但是它有一个子女 w, 使得low[w] >= dfn[u];其中low[u] 是指点 u 通过回边所能达到的 最小深度优先数,dfn[u]是指 点u 当前所处的 深度优先数;low[u] 是在递归回退时计算出来的,dfn[u] 是在递归时直接计算的。low[u] = min{ dfn[u]; min{ low[w] } // w是u的一个子女 min{ dfn[v] } // v与u邻接, 且(u,v)是一条回边. 阅读全文

posted @ 2013-09-12 19:16 圣手摘星 阅读(427) 评论(0) 推荐(0)

POJ 1002 487-3279
摘要:题目链接:http://poj.org/problem?id=1002&lang=zh-CN接替思路;先把字符串转换成数字或数字串,第一次写的代码是数字串,调用了stirng,和map 所以花时较长 1500ms,第二次用数字800ms!第一次代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 const int max_n = 1e5+3; 9 10 string str[max_n], str2, str3[max_n];11 map p_... 阅读全文

posted @ 2013-07-20 19:29 圣手摘星 阅读(161) 评论(0) 推荐(0)

POJ 2031 Building a Space Station
摘要:POJ 2031 Building a Space StationD -Building a Space StationTime Limit:1000MSMemory Limit:30000KB64bit IO Format:%I64d & %I64uPOJ 2031DescriptionYou are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a 阅读全文

posted @ 2013-04-23 13:08 圣手摘星 阅读(204) 评论(0) 推荐(0)

POJ 1258 Agri-Net 克鲁斯卡尔(Kruskal)算法&并查集
摘要:J -Agri-NetTime Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uPOJ 1258DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.Farmer John ordered a high speed 阅读全文

posted @ 2013-04-21 20:38 圣手摘星 阅读(208) 评论(0) 推荐(0)

POJ 2421 Constructing Roads 克鲁斯卡尔(Kruskal)算法
摘要:F -Constructing RoadsTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uPOJ 2421DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and 阅读全文

posted @ 2013-04-21 20:35 圣手摘星 阅读(257) 评论(0) 推荐(0)

最小生成树&并查集POJ 1287 Networking
摘要:最小生成树的简单运用E -NetworkingTime Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uPOJ 1287DescriptionYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connec 阅读全文

posted @ 2013-04-21 20:28 圣手摘星 阅读(152) 评论(0) 推荐(0)

最小生成树&并查集 POJ 1861 Network
摘要:B -NetworkTime Limit:1000MSMemory Limit:30000KB64bit IO Format:%I64d & %I64uPOJ 1861DescriptionAndrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since each wo 阅读全文

posted @ 2013-04-21 20:23 圣手摘星 阅读(178) 评论(0) 推荐(0)

POJ 1730 Perfect Pth Powers
摘要:M -Perfect Pth PowersTime Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionWe say that x is a perfect square if, for some integer b, x = b2. Similarly, x is a perfect cube if, for some integer b, x = b3. More generally, x is a perfect pth power if, for some int 阅读全文

posted @ 2013-04-03 21:31 圣手摘星 阅读(170) 评论(0) 推荐(0)

poj 3067 Japan
摘要:G -JapanTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <= 1000, N & 阅读全文

posted @ 2013-03-28 19:22 圣手摘星 阅读(187) 评论(0) 推荐(0)

导航