
HDU
文章平均质量分 51
QQN1996
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 1004 Let the Balloon Rise(map的使用1)
#include #include using namespace std; mapballoon; int main() { string co,maxco; int n,m; while(cin>>n && n) { balloon.clear(); while(n--) { cin>>原创 2016-07-29 12:54:24 · 171 阅读 · 0 评论 -
hdu 1263 水果(map的使用2)
因为要按字母顺序排列,用结构会比较麻烦,而map会自动排序,用map写会方便很多 #include #include using namespace std; map >a; int main() { int T; cin>>T; while(T--) { a.clear(); int m; cin>>m;原创 2016-07-30 10:40:01 · 233 阅读 · 0 评论 -
hdu 5762 Teacher Bo(vector的使用1)
曼哈顿距离,两个点在标准坐标系上的绝对轴距总和。 #include #include #include #include using namespace std; typedef pair PII; //pair将一对值组合成一个值,这一对值可以具有不同的数据类型(T1和T2),两个值可以分别用pair的两个公有函数first和second访问。 const int maxn = 100原创 2016-07-27 11:46:06 · 219 阅读 · 0 评论 -
hdu 5742 It's All In The Mind
#include using namespace std; int gcb(int a,int b) { int c; while(b) { c=b; b=a%b; a=c; } return a; } int main() { int T; cin>>T; while(T--)原创 2016-07-22 10:46:25 · 182 阅读 · 0 评论 -
hdu 5744 Keep On Movin
题意理解了好久,最后还是理解错了。。 “He also wants to maximize the length of the shortest palindromic string.” 应该是要使一组里的最小回文子串尽量大的情况下,输出那组的最小回文子串的长度 比如例1,应该是在cdadc,dbd时,输出3 所以就是把可以构成回文的字母(偶数的字母)平均分配给那些只有单个的字母原创 2016-07-22 10:50:37 · 193 阅读 · 0 评论