摘要: 题目链接:http://www.zybbs.org/JudgeOnline/problem.php?id=1208不知到题意和不会思路的另搜吧...本文只是为了STL的set练手而已。这题查找的时候没用find(),而是用了pair和equal_range()。感觉这样写会比较方便,因为需要找最近的值。代码(不到30行^_^):View Code #include<cstdio>#include<cstdlib>#include<set>using namespace std;set<int>s;int x,y,n,kind,ans=0;int 阅读全文
posted @ 2012-03-24 11:03 Evan1004 阅读(203) 评论(0) 推荐(0)