题目 :http://poj.org/problem?id=2718 给一组十进制数,从中选出若干数字组成一个多位数,剩下的数字组成另一个数字,要求找到最小的选取组合,使得这两个数字的绝对值差最小。 样例输入 : 1 0 1 2 4 6 7 样例输出 : 28 思路 : 因为最多只有10个数字可供选 ...
分类:
其他好文 时间:
2020-01-17 13:53:27
阅读次数:
59
#include"iostream" #include"stdio.h" #include"algorithm" #include"string.h" using namespace std; int num[15]; int used[15]; int cnt; int GetNum(int *a... ...
分类:
其他好文 时间:
2018-09-05 09:06:11
阅读次数:
117
POJ2718 Smallest Difference (暴力搜索+全排列)...
分类:
其他好文 时间:
2015-06-16 11:12:16
阅读次数:
143
Smallest Difference
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 4639
Accepted: 1290
Description
Given a number of distinct decimal digits, you can fo...
分类:
其他好文 时间:
2014-11-08 16:44:18
阅读次数:
284