题解:根据字符个数制表如下:
3:1, 2 ,6 ,10
4:0, 4, 5 , 9
5:3, 7, 8, 40 ,50 ,60
6:11,12, 20, 30, 80 ,90
7:15 ,16 ,70
8:13, 14 ,18, 19 ,41 ,42 ,46 ,51 ,52 ,56 ,61 ,62 ,66
9:17 ,21 ,22 ,26 ,31 ,32 ,36 ,44 ,45 ,49 ,54 ,55 ,59 ,64 ,65 ,69 ,81 ,82 ,86 ,91 ,92 ,96
googol 级别特殊处理。OK!
代码:
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <map>
#include <string>
using namespace std;
#define MAXV 100010
#define MAX......
阅读全文