2016ACM/ICPC亚洲区沈阳站-重现赛】的更多相关文章

今天做的沈阳站重现赛,自己还是太水,只做出两道签到题,另外两道看懂题意了,但是也没能做出来. 1. Thickest Burger Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0 Problem Description ACM ICPC is launching a thic…
C.Recursive sequence 求ans(x),ans(1)=a,ans(2)=b,ans(n)=ans(n-2)*2+ans(n-1)+n^4 如果直接就去解...很难,毕竟不是那种可以直接化成矩阵的格式,我们也因为这个被卡很长时间 事实上可以把这道式子化成几个基本元素的格式,然后就容易组合了,比如ans(n-2)*2+ans(n-1)+(n-1)^4+4*(n-1)^3+6*(n-1)^2+4*(n-1)^1+1 包含了所有的基本组成形式,化绝对为相对,并且除了一个n-2其他都是n…
Rabbits Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1193    Accepted Submission(s): 628 Problem Description Here N (N ≥ 3) rabbits are playing by the river. They are playing on a number li…
整理代码... Little Boxes Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2304    Accepted Submission(s): 818 Problem Description Little boxes on the hillside.Little boxes made of ticky-tacky.Littl…
题目链接:http://acm.hdu.edu.cn/search.php?field=problem&key=2016ACM%2FICPC%D1%C7%D6%DE%C7%F8%B4%F3%C1%AC%D5%BE-%D6%D8%CF%D6%C8%FC%A3%A8%B8%D0%D0%BB%B4%F3%C1%AC%BA%A3%CA%C2%B4%F3%D1%A7%A3%A9&source=1&searchmode=source A.染色乱搞. #include <bits/stdc…
1001题意:n个人,给m对敌对关系,X个好人,Y个坏人.现在问你是否每个人都是要么是好人,要么是坏人. 先看看与X,Y个人有联通的人是否有矛盾,没有矛盾的话咋就继续遍历那些不确定的人关系,随便取一个数3,与其相连的就是4,间隔就要相同,dfs搜过去就可以判断了 #include<bits/stdc++.h> using namespace std; #pragma comment(linker, "/STACK:102400000,102400000") #define…
废话: 这道题很是花了我一番功夫.首先,我不会kmp算法,还专门学了一下这个算法.其次,即使会用kmp,但是如果暴力枚举的话,还是毫无疑问会爆掉.因此在dfs的基础上加上两次剪枝解决了这道题. 题意: 我没有读题,只是队友给我解释了题意,然后我根据题意写的题. 大概意思是给n个字符串,从上到下依次标记为1——n,寻找一个标记最大的串,要求这个串满足:标记比它小的串中至少有一个不是它的子串. 输入: 第一行输入一个整型t,表示共有t组数据. 每组数据首行一个整型n,表示有n个串. 接下来n行,每行…
HDU 6222 Heron and His Triangle 链接:http://acm.hdu.edu.cn/showproblem.php?pid=6222 思路: 打表找规律+大数运算 首先我们可以打个表暴力跑出前几个满足题意的T 打表代码: #include<bits/stdc++.h> using namespace std; bool fun(double n) { if(abs(round(n) - n) < 0.000000000000001) ; ; } int ma…
Little Boxes Problem Description Little boxes on the hillside.Little boxes made of ticky-tacky.Little boxes.Little boxes.Little boxes all the same.There are a green boxes, and b pink boxes.And c blue boxes and d yellow boxes.And they are all made out…
n pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 1 to n. However, only two of them (labelled aand b, where 1≤a≠b≤n) withstood the test of time. Two monks, Yuwgna and Iaka, decide to make…