紫书195 题目大意:给一个困难的串,困难的串的定义就是里面没有重复的串. 思路:不需要重新对之前的串进行判重,只需要对当前的加入的字符进行改变即可. 因为是判断字典序第k个的字符串,所以要多一个全局变量cnt来记录目前是第几次循环到了. #include<bits/stdc++.h> using namespace std; + ; int n, L; int s[maxn]; int cnt; bool dfs(int cur){ //printf("cur = %d\n&quo…
Roman Numerals The original system of writing numbers used by the early Romans was simple but cumbersome. Various letters were used to represent important numbers, and these were then strung together to represent other numbers with the values decr…