2014年3月14日
摘要: 原题链接思路:将每个区间段按照右端点从小到大排序,count赋值为n,从第一个开始以右端点为基准判断是否在接下来的区段中间,若在则--count。#include #include struct Node{ int x, y;};Node arr[101];int cmp(const void *a, const void *b){ return (*(Node *)a).y - (*(Node *)b).y;}int main(){ int n, i, j, count; while(scanf("%d", &n) == 1){ for(i = 0; i != n 阅读全文
posted @ 2014-03-14 23:46 长木Qiu 阅读(119) 评论(0) 推荐(0) 编辑