题目链接:Salem and Sticks 题目原文 Salem gave you 𝑛n sticks with integer positive lengths 𝑎1,𝑎2,…,𝑎𝑛a1,a2,…,an. For every stick, you can change its lengt ...
分类:
其他好文 时间:
2019-01-27 21:33:58
阅读次数:
264
题目大意:有一堆小木棍,把它们接成相同长度的小木棍,问结果的小木棍的最小长度是多少,多组数据题解:$dfs$,各种剪枝。卡点:无C++ Code: ...
分类:
其他好文 时间:
2019-01-27 16:28:14
阅读次数:
168
A. Salem and Sticks 由于长度很小,所以直接暴力枚举最后的长度即可,取最小值即可。 #include<bits/stdc++.h> #define CLR(a,b) memset(a,b,sizeof(a)); using namespace std; typedef long l ...
分类:
其他好文 时间:
2019-01-27 14:42:58
阅读次数:
230
A. Salem and Sticks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Salem and Sticks t ...
分类:
编程语言 时间:
2019-01-22 10:48:23
阅读次数:
150
A. Salem and Sticks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Salem and Sticks t ...
分类:
其他好文 时间:
2019-01-20 23:31:59
阅读次数:
193
George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the origina ...
分类:
其他好文 时间:
2018-11-05 01:15:31
阅读次数:
144
题意: 就是无向图欧拉路 解析: 不能用map。。超时 在判断是否只有一个联通的时候,我比较喜欢用set,但也不能用set,会超时,反正不能用stl emm 用trie树来编号就好了 ...
分类:
其他好文 时间:
2018-10-09 18:09:10
阅读次数:
145
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) and cal ...
分类:
编程语言 时间:
2018-09-25 14:07:11
阅读次数:
186
http://acm.hdu.edu.cn/showproblem.php?pid=1051 Problem Description There is a pile of n wooden sticks. The length and weight of each stick are known i ...
分类:
其他好文 时间:
2018-09-25 12:37:35
阅读次数:
149
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25661 Accepted Submission(s): 10401 ...
分类:
其他好文 时间:
2018-09-24 16:53:08
阅读次数:
182