摘要:
就是个标准的二分题,查找到应该插入的位置两边哪个数和这个数的差的绝对值最小即可//============================================================================// Name : 10487.cpp// Author : // Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style//======================================================= 阅读全文
摘要:
开始看错题了,以为是求第n个数为多少,实际应该是求第n位的数字是几,是一个0~9的数字,我用两个数组存,sum[i]为最大数为i时其前面有多少位数,f[i]表示最大为i时1~i共占了多少位//============================================================================// Name : 10706.cpp// Author : // Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style// 阅读全文