HDU 5045 5047 5050 5053 太菜了,名额差点没保住.吓尿..赶紧开刷树链抛分 5045:状压DP.压缩10个人.因为两个人不能差2以上,所以能够用01表示 5047:推推公式就可以,每次交线多4条 5050:求GCD.用java大叔就可以 5053:签到题 代码: 5045: #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int…
比赛的时候想的是把n个n个的题目进行状压 但这样不能讲究顺序,当时精神面貌也不好,真是挫死了 其实此题的另一个角度就是一个n个数的排列,如果我对n个人进行状压,外面套一个按题目循序渐进的大循环,那么,在当前做第i个题目,前i-1个题目已经做完,然后做完的人的状态为j, j可能是1110 1101 1011什么的(假设已经做了三道题),因为我这样就可以只管状态而不管顺序了,我只取这种状态下的最大值,他究竟是怎么个顺序排列我不用管 到此...好像问题就没有什么问题了,这种做法重复 m/n次最后把剩余…
Rhyme scheme Problem Describe A rhyme scheme is the pattern of rhymes at the end of each line of a poem or song. It is usually referred to by using letters to indicate which lines rhyme; lines designated with the same letter all rhyme with each other…
Flyer Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 386    Accepted Submission(s): 127 Problem Description The new semester begins! Different kinds of student societies are all trying to adver…
Mex Time Limit: 15000/5000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 623    Accepted Submission(s): 209 Problem Description Mex is a function on a set of integers, which is universally used for impartial game t…
G(x) Time Limit: 2000/500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 184    Accepted Submission(s): 44 Problem Description For a binary number x with n digits (AnAn-1An-2 ... A2A1), we encode it as Where ""…
题目链接 裸的结论题.百度 Ramsey定理.刚学过之后以为在哪也不会用到23333333333,没想到今天网络赛居然出了.顺利在题面更改前A掉~~~(我觉得要不是我开机慢+编译慢+中间暂时死机,我还能再早几分钟过掉它 #include<bits/stdc++.h> using namespace std; ][]; int n; void solve() { ; i<=n; i++) ; j<=n; j++) ; k<=n; k++) { if(g[i][j]==g[i][…
水 #include <stdio.h> #include <stdlib.h> #include<math.h> #include<iostream> #define LL long long using namespace std; int main() { int t; int a,b; int cas; LL sum; while(~scanf("%d",&t)) { ;i<=t;i++) { sum=; scanf…
the Sum of Cube Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 405    Accepted Submission(s): 224 Problem Description A range is given, the begin and the end are both integers. You should sum…
题目链接:hdu 5476 今天和队友们搞出3道水题后就一直卡在这儿了,唉,真惨啊……看着被一名一名地挤出晋级名次,确实很不好受,这道恶心的几何题被我们3个搞了3.4个小时,我想到一半时发现样例输出是 (√2) π / 2 + 1, 于是就各种 YY,无奈尝试了各种方法还是免不了 wa... 后来在网上发现,那段圆弧其实就和自己插身而过,真的可以说差一点就想到了,无奈到了最后我们几个都精疲力尽了,好像也想不出什么了.看下图:  就是三角形里的圆弧的长度,设为 Lc ,很容易得出 Lc = | O…