hdu 5186(模拟)】的更多相关文章

zhx's submissions Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2293    Accepted Submission(s): 641 Problem Description As one of the most powerful brushes, zhx submits a lot of code on many o…
http://acm.hdu.edu.cn/showproblem.php?pid=5186 题意是分别对每一位做b进制加法,但是不要进位 模拟,注意:1 去掉前置0 2 当结果为0时输出0,而不是全部去掉 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn=101; const int maxm=201; int n,b; char…
http://acm.hdu.edu.cn/showproblem.php?pid=4891 给出一个文本,问说有多少种理解方式. 1. $$中间的,(s1+1) * (s2+1) * ...*(sn+1), si表示连续的空格数. 2.{}中间,即 | 的个数+1. 就是模拟 #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <…
http://acm.hdu.edu.cn/showproblem.php?pid=5012 模拟出骰子四种反转方式,bfs,最多不会走超过6步 #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <string> #include <queue> #include <vector> #include <i…
思路: 主要就是模拟这些操作,用链表果断超时.改用堆栈模拟就过了 #include<map> #include<set> #include<stack> #include<cmath> #include<queue> #include<cstdio> #include<vector> #include<string> #include<cstdlib> #include<cstring>…
The Donkey of Gui Zhou Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 389    Accepted Submission(s): 153 Problem Description There was no donkey in the province of Gui Zhou, China. A trouble m…
zhx's submissions Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 540    Accepted Submission(s): 146 Problem Description As one of the most powerful brushes, zhx submits a lot of code on many o…
题目链接 模拟题,直接看代码. £:分数的计算方法,要用double; #include <set> #include <map> #include <cmath> #include <queue> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef…
http://acm.hdu.edu.cn/showproblem.php?pid=5003 记得排序后输出 #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <vector> #include <set> #include <map> #include <algorithm> #include…
http://acm.hdu.edu.cn/showproblem.php?pid=5033 平面上有n个建筑,每个建筑由(xi,hi)表示,m组询问在某一个点能看到天空的视角范围大小. 维护一个凸包,据说可以用单调栈 #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <string> #include <set> #in…
Regroup Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1057    Accepted Submission(s): 297 Problem Description When ALPC42 got to a panzer brigade, He was asked to build software to help them r…
Instruction Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 991    Accepted Submission(s): 244 Problem Description Nowadays, Jim Green has produced a kind of computer called JG. In his computer,…
Bob and math problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1481    Accepted Submission(s): 552 Problem Description Recently, Bob has been thinking about a math problem.There are N Digi…
郑厂长系列故事——逃离迷宫 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1817    Accepted Submission(s): 840 Problem Description 郑厂长没变 还是那个假厂长真码农 改变的是业余爱好 他现在不研究象棋,改玩游戏了! 最近,郑厂长爱上了逃离迷宫这个游戏,他日日夜夜的玩,就是想达到自己的…
/* 模拟: 注意:实质上一次魔方的一半要变化 用c++超内存 用g++过了 */ #include<stdio.h> #include<string.h> #include<queue> #include<algorithm> using namespace std; struct node { int f0[4],f4[4],f6[4],f8[4],f16[4],f20[4]; int step; } s,next; int fnow[10000][6]…
考察英语的题 - -# 按条件模拟,一遍即可了,每一个聊天对象有其价值U.数组模拟队列过程即可,若存在Top标记,则和Top标记的人聊天,否则和队列的第一个人聊天 mark记录队尾,top记录Top操作,data[i].p记录U,data[i].x记录chat数.data[i].y记录该人是否被删除 Add U:在 队尾插入价值为U的人,须要特判U人已经存在 Close U::在整个队列中查找价值为U的人,将其删除.须要特判该人不存在 Chat x:当前聊天页面的人chat+=x,特判当前队列没…
题意:       给你一个串,问你有几种意思,有两个规则 (1) { }  答案乘以  ({}之间"|"的个数 + 1)  (2)  &&   答案乘以  (&&之间连续的' '的个数 + 1) 比如 {aa|dsd|}dasdaddda&   a  &的答案是      (2 + 1)    *  (3+1) *(2 + 1) = 36 思路:     直接模拟,结果我自己sb了wa了很多次,记得开INT64 ,为什么开,自己模拟下最…
Basic Data Structure Time Limit: 7000/3500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 78    Accepted Submission(s): 12 Problem Description Mr. Frog learned a basic data structure recently, which is called stack.…
九野的博客,转载请注明出处:http://blog.csdn.net/acmmmm/article/details/11711743 题意:驴和老虎在方格中跑,跑的方式:径直跑,若遇到边界或之前走过的点则转向,驴向右转,虎向左转,若转向后还不能跑则一直呆着不动, 问:他们是否会相遇,会输出相遇坐标,不会输出-1 #include <iostream> #include <algorithm> #include <cstdlib> #include <cstring…
给出五子棋残局,推断三步内能否分出胜负,玩家为当前该走旗子的颜色,下一步为白棋或黑棋不定. 依照顺序推断就可以: 1:推断棋盘是否合法,并确定玩家颜色 2:推断当前玩家颜色是否有一个必胜点,有玩家则在第一步胜 3:推断还有一方在当前是否有两个必胜点,若有,则玩家在第二步失败 4:BFS出玩家是否存在此方案:随意放置一个位置的前提下,还有一方没有必胜点,且玩家有两个必胜点,则玩家在第三步胜 5:否则3步内无法分出胜负 #include "stdio.h" #include "s…
连续最大积 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 699    Accepted Submission(s): 275 Problem Description 小明和他的好朋友小西在玩一个游戏,由电脑随机生成一个由-2,0,2三个数组成的数组,并且约定,谁先算出这个数组中某一段连续元素的积的最大值,就算谁赢! 比如我们有如下随…
题意是说给定一个 2*2 魔方的各个面的情况,问是否能转动不超过一次使得魔方复原. 思路是先在输入的时候统计一下已完成的面数,要想以最多一次的转动使得魔方复原,那么已完成的面数只能是 2 面或者 6 面,此处可剪枝. 若已完成 6 面,那么一定可以复原: 若已完成 2 面,则要用一次转动完成其他六面,开始这里打算用结构体去存,结果在判断的时候自己混乱了……最终直接定了 24 个变量,a,b,c……w,x, 手动做了个小正方体,太丢人……(但不得不说这种方法挺好的,易于理解,而且不会乱^_^) 代…
你的一系列得分 先降序排列 再按0.95^(i-1)*ai 这个公式计算你的每一个得分 最后求和 Sample Input12530 478Sample Output984.1000000000 # include <iostream> # include <cstdio> # include <algorithm> # include <map> # include <cmath> # define LL long long using nam…
An interesting mobile game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 255    Accepted Submission(s): 123 Problem Description XQ,one of the three Sailormoon girls,is usually playing mobile g…
给出有多少次操作 和MOD 初始值为1 操作1 y 表示乘上y操作2 y 表示除以第 y次操作乘的那个数 线段树的叶子结点i 表示 第i次操作乘的数 将1替换成y遇到操作2 就把第i个结点的值 替换成1利用线段树的性质,对整个1~n的区间进行维护,每次输出sum[1]的值即可 Sample Input110 10000000001 22 11 21 102 32 41 61 71 122 7 Sample OutputCase #1:2122010164250484 # include <ios…
Ugly Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 190    Accepted Submission(s): 74Special Judge Problem Description Everyone hates ugly problems. You are given a positive integer. Yo…
Problem Description As one of the most powerful brushes, zhx submits a lot of code on many oj and most of them got AC. One day, zhx wants to count how many submissions he made on n ojs. He knows that on the ith oj, he made ai submissions. And what yo…
Roll-call in Woop Woop High Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 188    Accepted Submission(s): 133 Problem Description The new principal of Woop Woop High is not satisfied with her p…
Avoiding a disaster Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 211    Accepted Submission(s): 101 Problem Description Percy likes to be punctual. So much so that he always keeps three watch…
Help him Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2500    Accepted Submission(s): 518 Problem Description As you know, when you want to hack someone's program, you must submit your test d…