You want to visit a strange country. There are n cities in the country. Cities are numbered from 1 to n. The unique way to travel in the country is taking planes. Strangely, in this strange country, for every two cities A and B, there is a flight fro…
Strange Country II Time Limit: 1 Second Memory Limit: 32768 KB Special Judge You want to visit a strange country. There are n cities in the country. Cities are numbered from 1 to n. The unique way to travel in the country is taking planes.…
B - Benny's Compiler Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Submit Status Practice ZOJ 2475 Description These days Benny has designed a new compiler for C programming language. His compilation system provides a com…
紫书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…
You want to visit a strange country. There are n cities in the country. Cities are numbered from 1 to n. The unique way to travel in the country is taking planes. Strangely, in this strange country, for every two cities A and B, there is a flight fro…