[ACM-ICPC][BOJ]
文章平均质量分 77
O0o王钰o0O
ACM爱好者
展开
-
[递归与分治算法][BOJ]1032-邮局选址问题
其实这个题和上一个输油管道问题是异曲同工,只不过这个题目要分别求出横坐标和纵坐标的中位数。#include#include#includeusing namespace std;const int MAX_SIZE = 10000 + 10;bool cmp(const int &a, const int &b){ if(a < b) return true; els原创 2013-04-23 23:56:03 · 3508 阅读 · 0 评论 -
[递归与分治算法][BOJ]1031-输油管道问题
这个题目其实很水。只需要求出所给坐标的纵坐标的中位数就解决了。没什么难度的说。#include #include #include using namespace std;const int MAX_SIZE = 10010;bool cmp(const int& a, const int& b){ if(a < b) return true; el原创 2013-04-23 23:54:55 · 2149 阅读 · 0 评论 -
[水题一枚][BOJ]1018-Campus Singing Contest
非常简单的题,输入之后统计一下就行。。。#include#includeusing namespace std;struct cand{ string name; int vote;}cand[110];int main(){ int n; while(cin >> n) { for(int i = 1; i <= n;原创 2013-04-24 13:13:48 · 946 阅读 · 0 评论 -
Oil Car
Oil CarTime Limit: 1000 MS Memory Limit: 65536 KbTotal Submission: 1492 Accepted: 361Description一辆汽车加满油后可行驶n公里。旅途中有若干个加油站。设计一个有效算法,指出应在哪些加油站停靠加油,使沿途加油次数最少。对于给定的n原创 2013-06-05 15:21:58 · 913 阅读 · 0 评论 -
Program storage
Program storageTime Limit: 1000 MS Memory Limit: 65536 KbTotal Submission: 701 Accepted: 298Description设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是 Li,程序存储问题要求确定这n 个程序在磁带上的一个存储方案,使得能够在磁带上存储尽可能多的程原创 2013-06-05 15:24:15 · 725 阅读 · 0 评论 -
Interval Intersections
Interval IntersectionsTime Limit: 1000 MS Memory Limit: 65536 KbTotal Submission: 484 Accepted: 178Description给定x 轴上n 个闭区间。去掉尽可能少的闭区间,使剩下的闭区间都不相交。给定n 个闭区间,编程计算去掉原创 2013-06-05 15:26:04 · 687 阅读 · 0 评论