
ACM.模拟
文章平均质量分 51
slowlight93
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu-4782
注意多个空格,tab,原创 2014-06-04 13:20:07 · 1053 阅读 · 0 评论 -
hdu 2542 补兵(二分,模拟)
题意: 就是补兵。。原创 2014-11-13 17:03:20 · 1056 阅读 · 0 评论 -
hdu 2835 Operating system (模拟)
题意:模拟OPT(最优页面置换算法),就是贪心。当需要换出页面的时候,选择cache中下一次访问时间最晚的页面换掉。 可以使用 set 存储在cache中的页面,对每一个页号维护一个访问时间队列。 #include #include #include #include #include #include #include #include #include #include using nam原创 2014-11-30 17:34:18 · 869 阅读 · 0 评论 -
LeetCode Minimum Window Substring(two pointer)
题意: https://oj.leetcode.com/problems/minimum-window-substring/ 思路: sliding window,two pointer,尺取法。。#include<bits/stdc++.h>using namespace std;#define SPEED_UP iostream::sync_with_stdio(false); #defi原创 2015-02-13 20:13:49 · 543 阅读 · 0 评论 -
codeforces 46D Parking Lot(线段树模拟区间管理 or set模拟)
题意: 可以看成是 poj Hotel 那道题的加强版。 这里是找车位,还要考虑与前后车之间的距离。。 不过这里n只有100,用set,就成了水题啊。。。思路: 1) 线段树 比起 Hotel 也就是多讨论几种情况吧。。const int N = 100000 + 5;struct Node { int len, l, r, m, tag; // 0 - no tag, 1 - f原创 2015-08-28 01:47:39 · 408 阅读 · 0 评论