POJ 3856 deltree(模拟)】的更多相关文章

Description You have just run out of disk space and decided to delete some of your directories. Rationally, you will first have an exploration of what you have in your file system. And more rationally, you will do this exploration through a command l…
转载请注明出处:viewmode=contents">http://blog.csdn.net/u012860063? viewmode=contents 题目链接:http://poj.org/problem? id=3077 Description For a given number, if greater than ten, round it to the nearest ten, then (if that result is greater than 100) take the…
http://poj.org/problem?id=1068 #include<cstdio> #include <cstring> using namespace std; int ind[45]; bool used[45]; int r[21]; int l[21]; int len,n,llen; int w[21]; int main(){ int t; scanf("%d",&t); while(t--){ memset(used,0,siz…
水题,主要是思路清晰,判断明确. 记x为A站最前方的车,y表示下一列要进入B站的车厢,初识时,x=1;y=a1;C=[]; 在调度过程中: if(y==0)那么调度成功,退出模拟过程:否则 if(x==y)就是说接下来进站的正好是要出去的,那就直接让它A—>B 否则 if(C不空 && y=(最后进入C的火车)) 让车从C开出进入B  否则 if(x!=0)那么车 A—>C 否则  无解 #include<cstdio> #include<cstring>…
模拟小数幂 小数点位 pos 非零末位 e 长度 len 只有三种情况 pos > len pos < e e < pos < len #include <iostream> #include <cstring> using namespace std; ], b[], c[]; void Cal() { memset(c, , sizeof(c)); ; i < ; i++) ; j < ; j++) c[i+j] += a[i] * b[j]…
e.... 虽然这是一道灰常简单的模拟题.但是米做的时候没有读懂第二个日历的计时方法.然后捏.敲完之后华丽的WA了进一个点.坑点就在一年的最后一天你是该输出本年的.e ...但是我好想并没有..看discuss里好想被坑的人还不少.总天数能直接整除260的时候.年数要减1. 不喜欢做模拟.....5555.... 附代码: #include<stdio.h>#include<string.h>#include<iostream>#include<string>…
Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other. Of course, all warehouses are rectangular, and all robots occup…
Manhattan 2025 Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 1318   Accepted: 703 Description Background Manhattan in the year 2025 - it is so densely populated that its old two-dimensional grid of streets and avenues fails to provide…
题意:就是让你求出时间复杂度. 分析:由于指数最多为10次方,所以可以想到用一个数组保存各个指数的系数,具体看代码实现吧! 代码实现: #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; ][]; ]; int num; struct node{ ]; void init() { memset(sum,,sizeof(su…
进入每个' )  '多少前' (  ', 我们力求在每' ) '多少前' )  ', 我的方法是最原始的图还原出来,去寻找')'. 用. . #include<stdio.h> #include<string.h> int y[505],t[505]; char s[505]; int main() { int a,b,i,j,u; scanf("%d",&a); while(a--) { memset(y,0,sizeof(y)); memset(t,…