1301. The Trip】的更多相关文章

A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indianapolis, Phoenix, Nashville, Philadelphia, San Jose, and Atlanta. This spring they are planning a trip to Eindhove…
Text I have just received a letter from my brother,Tim. He is in Australia. He has been there for six months. Tim is an engineer. He is working for a big firm and he has already visited a great number of different places in Australia. He has just bou…
Road Trip Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KB Total submit users: 29, Accepted users: 29 Problem 12882 : No special judgement Problem description You are planning a road trip to visit your friends, each of whom live in…
http://poj.org/problem?id=1041 (题目链接) 题意 给出一张无向图,求字典序最小欧拉回路. Solution 这鬼畜的输入是什么心态啊mdzz,这里用vector储存边,便于边的排序.瞬间变成STL常数boy →_→. 细节 数组大小把握好. 代码 // poj1041 #include<algorithm> #include<iostream> #include<cstdlib> #include<cstring> #incl…
Texas Trip Problem's Link:   http://poj.org/problem?id=3301 Mean: 给定n(n <= 30)个点,求出包含这些点的面积最小的正方形的面积. analyse: 首先要确定的是旋转的角度在0到180度之间即可,超过180度是和前面的相同的. 坐标轴旋转后,坐标变换为: X’ = x * cosa - y * sina; y’ = y * cosa + x * sina; Time complexity: O(n) Source code…
9852303 2013-12-18 11:47:01 Accepted 1301 0MS 264K 1117 B C++ 泽泽 Jungle Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3835    Accepted Submission(s): 2797 Problem Description The Head E…
Problem C: The Trip Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 19  Solved: 3[Submit][Status][Web Board] Description The Trip A group of students are members of a club that travels annually to different locations. Their destinations in the past hav…
Ant Trip Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description Ant Country consist of N towns.There are M roads connecting the towns. Ant Tony,together with his friends,wants to go through every part…
Sightseeing Trip Time limit: 0.5 secondMemory limit: 64 MB There is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sightseeing the town. To earn as much as possible from this a…
Mishka and trip 题意: 有n个城市,第i个城市与第i+1个城市相连,他们边的权值等于i的美丽度*i+1的美丽度,有k个首都城市,一个首都城市与每个城市都相连,求所有边的权值. 题解: 先把n个城市存下来,之后开一个标记数组,来标记k个首都(这题这块很巧妙,正因为开了标记首都的数组,所以才把O(N^2)的算法降到了O(N)) 把所有城市的美丽值都加起来,遍历首都,每次遍历完就sum-首都,这样,最后求环的剩下的边就好了,环的剩下的边就是i不是首都,i+1也不是首都,那么就i*i+1…