p417.cpp 991 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #include <algorithm>
  2. #include <array>
  3. #include <iostream>
  4. #include <map>
  5. #include <utility>
  6. #include <vector>
  7. #include <iomanip>
  8. #include <sstream>
  9. #include <climits>
  10. #include <queue>
  11. #include <list>
  12. using namespace std;
  13. typedef unsigned int nat;
  14. void rec(map<string, nat> &dict, string str, nat i, nat pos)
  15. {
  16. if(str[i] < 'z')
  17. {
  18. di
  19. str[pos]++;
  20. }
  21. else
  22. {
  23. if(str)
  24. }
  25. }
  26. void generate()
  27. {
  28. map<string, nat> tal;
  29. char o = 'a'-1;
  30. string str = {o,o,o,o,'a'};
  31. for(nat i = 1; i <= 83681; ++i)
  32. {
  33. if(str[4] < 'z')
  34. {
  35. ++str[4];
  36. tal[str] = i;
  37. }
  38. else
  39. {
  40. if(str[3] < 'z')
  41. str[4] = str[3]+1; // Kolla z?
  42. else
  43. break;
  44. if(str[3] < 'z')
  45. {
  46. ++str[3];
  47. }
  48. else
  49. {
  50. ....
  51. }
  52. }
  53. }
  54. }
  55. int main()
  56. {
  57. return 0;
  58. }