
--------------模拟--------------
yphacker
心之所动,且就随缘去吧
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 494 A. Treasure && Codeforces Round #282 (Div. 1)
题目链接:http://codeforces.com/problemset/problem/494/A 解题思路:Codeforces官方题解: Consider a string consisting of '(' and ')' characters. Let's build the following sequence from this string: a原创 2014-12-14 11:00:13 · 721 阅读 · 0 评论 -
HDU 5705 Clock(模拟)
Clock 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5705 解题思路: 给你一个时间,让你找出这个时间之后的一个时间使得时针与分针所成角度为题目所给定的。 我们假设一圈度数为360*120,则时针一小时走3600度。分针一分钟走720度。 设当前时间为h,m分 则时针的角度为h*3600+m*60.分针的角度为720*m;原创 2016-06-02 20:25:41 · 1136 阅读 · 0 评论 -
Codeforces 488 C. Fight the Monster(模拟)
题目链接:http://codeforces.com/problemset/problem/488/A 解题思路:Codeforces官方题解:原创 2014-11-25 09:45:58 · 710 阅读 · 0 评论 -
POJ1068 Parencodings(模拟)
题目链接:http://poj.org/problem?id=1068 解题思路:原创 2014-11-25 09:01:22 · 441 阅读 · 0 评论 -
HDU5095 Linearization of the kernel functions in SVM(模拟)
题目链接: 解题思路:BestCoder官方题解:原创 2014-11-24 21:44:00 · 410 阅读 · 0 评论 -
hdu 3626 For(模拟)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3626 解题思路: 暴力模拟即可。。。 AC代码: #include #include #include using namespace std; const int INF = 0x3f3f3f3f; struct node{ int x,y; }no[1005];原创 2015-09-11 16:23:26 · 434 阅读 · 0 评论 -
hdu 4272 LianLianKan(模拟dfs+map)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4272 解题思路: 题目大意: 给你一个栈,每次只能出栈顶和离栈顶五步以内(含五步)的元素,要求这个元素必须和栈顶相同。可以使栈成为空栈,就输出1,否则输出0. 算法思想: 这道题的数据很水,所以有些错误的思想也能过,在此只给出正确的算法思想: 题目说:for each top el原创 2015-08-27 22:11:29 · 464 阅读 · 0 评论 -
hdu 4278 Faulty Odometer(进制转换,找规律)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4278 解题思路: 8进制转10进制,如果是9,实际上是7.如果是4-7实际上是3-6。 AC代码(进制转换): #include #include using namespace std; int main(){ int res[15],n; while(sc原创 2015-09-08 22:05:19 · 388 阅读 · 0 评论 -
hdu 5386 Cover(逆向思维+模拟)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5386 解题思路: 题目大意: 给你n×n的初始图形,和目标图形,还有m个操作,操作和一把一行或一列变成一种颜色,现在问你使初始图形变成目标图形的操作的顺序。每个操作都要用上,且一定有解。 算法思想: 初始图形没有用。直接从目标图形开始进行操作。对于一个操作,判断该原创 2015-08-29 08:26:16 · 444 阅读 · 0 评论 -
hdu 5402 Travelling Salesman Problem(构造+棋盘黑白染色)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5402 解题思路: 官方题解: 首先如果nn为奇数或者mm为奇数,那么显然可以遍历整个棋盘。 如果n,mn,m都为偶数,那么讲棋盘黑白染色,假设(1,1)(1,1)和(n,m)(n,m)都为黑色,那么这条路径中黑格个数比白格个数多11,而棋盘中黑白格子个数相同,所以必然有一个原创 2015-08-27 09:54:31 · 1159 阅读 · 0 评论 -
Codeforces 495 B. Modular Equations && Codeforces Round #282 (Div. 2)
题目链接:http://codeforces.com/problemset/problem/495/B 解题思路:Codeforces官方题解: If a b then there is no answer since . If a = b then x can be any integer larger than a. so there are infinite n原创 2014-12-14 10:53:24 · 1055 阅读 · 0 评论 -
Codeforces 570C Replacement
题目链接: http://codeforces.com/problemset/problem/570/C 解题思路: Lets find how replacements occur. If we have segment of points with length l,we need l-1 operations and stop replacements for this s原创 2015-08-14 08:57:57 · 767 阅读 · 0 评论