
模拟
是三水不是泗水
只是个笔记本
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1033 To Fill or Not to Fill (25 分)
#include<bits/stdc++.h>using namespace std;struct Node{ double dis; double price;};bool cmp(Node a,Node b){ return a.dis<b.dis;}bool cmp1(Node a,Node b){ return a.price<b.price;...原创 2018-10-28 21:49:45 · 312 阅读 · 0 评论 -
1056 Mice and Rice
#include<bits/stdc++.h> using namespace std;const int MAXN=1003;struct Node{ int id; int weight; int rank; int flag;//用于辨别属于哪一级别}node[MAXN];bool cmp(Node a,Node b){ return a.weight>...原创 2018-10-25 21:48:47 · 214 阅读 · 0 评论 -
Cars on Campus
这个dp很头疼,参考了https://www.liuchuo.net/archives/2951大佬思路#include<bits/stdc++.h>using namespace std;struct Node{ string id; int timelen; int status;};bool cmp(Node a,Node b){ if(a.id!=b.i...原创 2018-10-21 21:47:49 · 373 阅读 · 0 评论 -
1014 Waiting in Line (30 分)
#include<bits/stdc++.h>using namespace std;const int INF=1000000000;struct Node{ int start; int time; int id;};struct Window{ int poptime; int endtime; queue<int> q;}windows[2...原创 2018-10-29 13:36:01 · 160 阅读 · 0 评论 -
1026 Table Tennis (30 分)
When a VIP table is open, the first VIP pair in the queue will have the priviledge to take it.当队列第一个是vip用户,并且空出来的桌子既有vip又有普通桌子的时候,优先占据vip桌子;第一种理解:如果有vip桌子空出来,即使vip用户排在后面,也可以跳过前面这些人占据这个桌子;即:如果一个v...原创 2018-10-29 22:25:51 · 493 阅读 · 1 评论 -
1080 Graduate Admission (30 分)
#include<iostream>#include<bits/stdc++.h>using namespace std;const int MAXN=40010;const int MAXM=101;struct stu{ int id; int ge; int gi; int gei; int a[5]; int rank; stu(){ ...原创 2018-10-27 22:52:30 · 304 阅读 · 0 评论