HDU 3682 水模拟】的更多相关文章

n*n*n的图形,m条线,每条线上的方格被删除.问一共删除了多少个方格 ans=m*n .然后推断一下直线相交的交点.去重就可以 #include "stdio.h" #include "string.h" int xy[1010][1010],xz[1010][1010],yz[1010][1010],hash[1010]; struct node { int x,y,z; } mark[1010]; int main() { int Case,n,m,i,j,c…
C - To Be an Dream Architect Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 3682 Appoint description:  System Crawler  (2014-11-09) Description The “dream architect” is the key role in a team o…
C - To Be an Dream Architect Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 3682 Appoint description:  System Crawler  (2014-11-05) Description The “dream architect” is the key role in a team o…
CodeForces.158A Next Round (水模拟) 题意分析 校赛水题的英文版,坑点就是要求为正数. 代码总览 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <sstream> #include <set> #include <map> #include <queue>…
CodeForces71A. Way Too Long Words (水模拟) 题意分析 题怎么说你怎么做 没有坑点 代码总览 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <sstream> #include <set> #include <map> #include <queue>…
N! Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 64256    Accepted Submission(s): 18286 Problem Description Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!   Input One N in…
A. Broken Clock time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format…
Xiangqi Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4121 Description Xiangqi is one of the most popular two-player board games in China. The game represents a battle between two armies with the goal of captu…
题目链接:hdu 5071 Chat 题目大意:模拟题. .. 注意最后说bye的时候仅仅要和讲过话的妹子说再见. 解题思路:用一个map记录每一个等级的妹子讲过多少话以及是否有这个等级的妹子.数组A和N记录等级的顺序,添加 删除等操作全然能够同过数组上的模拟,时间足够. T和flag标记是否有置顶窗体. #include <cstdio> #include <cstring> #include <map> #include <vector> #includ…
题意: 给出老虎的起始点.方向和驴的起始点.方向.. 规定老虎和驴都不会走自己走过的方格,并且当没路走的时候,驴会右转,老虎会左转.. 当转了一次还没路走就会停下来.. 问他们有没有可能在某一格相遇.. 思路: 模拟,深搜.. 用类似时间戳的东西给方格标记上,表示某一秒正好走到该方格.. 最后遍历一下驴在某一格方格标记时间是否和老虎在该格标记的时间一样,一样代表正好做过这里了.. 还有一种情况就是老虎或驴一直停在那里,那就算不相等,也是可以的.. Tips: 我一直忘了老虎或驴停下来的情况,这样…
http://acm.hdu.edu.cn/showproblem.php?pid=4464 现场赛总会有水题,这就是最水的一道,预计也就是能当高校的上机题,保研用,呵呵~~~ #include <cstdio> #include <cstring> #include <iostream> using namespace std; #define ll long long const int MAXN= 100+20; char s[MAXN]; int main()…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2568 关键思想:傻傻地模拟 代码如下: #include<iostream> using namespace std; int main() { long long int C,num; cin >> C; while (C--) { cin >> num; int total = 0; while (1) { if (num == 0) { cout << t…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3682 题意: 有一个n*n*n的立方体,左下角坐标为(1,1,1),接下来进行m次操作. 每个操作形如这样:"axis_1=a,axis_2=b". 例如:"x=3,y=1",意思是消去所有x=3,y=1的方块. RT: 题解: 问题的唯一矛盾在于:一个位置的方块可能被多次消去. 所以... (1)由于每一个坐标(x,y,z)在实数中有唯一映射:x*n*n+y*n+z,…
http://acm.hdu.edu.cn/showproblem.php?pid=5099 比较两个安卓手机型号,水题 注意点:A is actually implicit and usually omitted for brevity.输入字符长度可能为5,这时候individual version的值为A #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #…
http://acm.hdu.edu.cn/showproblem.php?pid=4964 给定语句,按照语法翻译html并输出. 就是恶心的模拟,递归搞就行了 处理id和class时,在一个'>'内,先把遇到的id和class都push到一个容器中,然后再输出即可.优先输出id,然后是class 递归过程即为分解成head+context+end的样子 #include <iostream> #include <cmath> #include <iomanip>…
A. Combination Lock time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Scrooge McDuck keeps his most treasured savings in a home safe with a combination lock. Each time he wants to put there…
A. Neverending competitions time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output There are literally dozens of snooker competitions held each year, and team Jinotega tries to attend them all (f…
Encoding Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 39047    Accepted Submission(s): 17279 Problem Description Given a string containing only 'A' - 'Z', we could encode it using the followi…
题意:有一壶水, 体积在 LLL 和 RRR 之间, 有两个杯子, 你要把水倒到两个杯子里面, 使得杯子水体积几乎相同(体积的差值小于等于1), 并且使得壶里剩下水体积不大于1. 你无法测量壶里剩下水的体积, 问最小需要倒水的次数. 析:考虑倒水的大致过程,不妨设 L > 0.首先向一个杯子倒 L/2 ​2​​L​​ 升水,再往另一个杯子倒 L/2+1​2​​L​​+1 升水.接下来就来回往两个杯子里倒 2 升, 直到倒空为止.这样就很容易分析出需要倒水的次数.唯一注意的是最后壶里面可以剩下 1…
Fighting the Landlords Problem Description Fighting the Landlords is a card game which has been a heat for years in China. The game goes with the 54 poker cards for 3 players, where the “Landlord” has 20 cards and the other two (the “Farmers”) have 1…
BZOJ水一道~ 枚举前两个位置是否放雷,模拟向下推.能够则ans++ #include "stdio.h" #include "string.h" int a[10010],b[10010],n; int judge() { int i; for (i=3;i<=n;i++) { b[i]=a[i-1]-b[i-1]-b[i-2]; if (b[i]<0) return 0; if (b[i]>1) return 0; } if (b[n-1]+…
http://acm.hdu.edu.cn/showproblem.php?pid=4431 不能说是水题了,具体实现还是很恶心的...几乎优化到哭但是DFS(还加了几个剪枝)还是不行...搜索一直T到死...贪心构造解就行算是长见识了 首先还是要枚举所有34张牌...然后再枚举将牌(2个的)...之后就是判断这副牌有没有胡牌了...肯定是要特判国士无双和七对的...再就是平胡的情况 平胡只要对每张牌优先刻子,再直接贪心向下构造顺子就行了...... /*********************…
E - 5 Time Limit:1500MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5391 Description Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows…
题意:       给你两个矩阵,问你两个矩阵的最大相同元素个数(位置也要求相同),矩阵可以90旋转多次. 思路:       水题,直接模拟就行了,方法很多,可以直接写坐标关系,或者一层一层处理,就是一层一层往里拿出来,比较就行了,两个都写了. 直接交换 #include<stdio.h> int A[32][32] ,B[32][32] ,C[32][32]; void swap(int n) {    for(int i = 1 ;i <= n ;i ++)    for(int…
ccpc合肥站的重现...一看就觉得是dp 然后强行搞出来一个转移方程 即 根据第i-1列的需求和i-1 i-2列的枚举摆放 可以得出i列摆放的种类..加了n多if语句...最后感觉怎么都能过了..然而不是t就是wa..最后看别人的题解 我的dp转移是9*O(n)的 常数要t.. 别人的题解居然都是用模拟的..根据枚举第一列可以得出第二列的摆放姿势 由这两个摆放和第二列的需求可以求出来第三列..以此类推 最后check一下最后两个.. 叉姐的题解里面写了一个dp转移方程..然而并不能看懂..放牛…
题意:给出汇编指令,解释出编码或者给出编码,解释出汇编指令. 解法:简单模拟,按照给出的规则一步一步来就好了,主要是注意“SET”的情况,还有要输出的东西最好放到最后一起输出,中间如果一旦不对就可以及时跳出去. 其他也没什么了,只要细心点,多测几组样例就好了. 代码: #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath&g…
Spring-outing Decision Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 676    Accepted Submission(s): 220 Problem Description Now is spring ! The sunshine is warm , the flowers is coming out . H…
Sequence I Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1013    Accepted Submission(s): 393 Problem Description Mr. Frog has two sequences a1,a2,⋯,an and b1,b2,⋯,bm and a number p. He wants t…
A. The New Year: Meeting Friends time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are three friend living on the straight line Ox in Lineland. The first friend lives at the point x1, t…
A. One-dimensional Japanese Crossword time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a tabl…