fork download
  1. // #pragma GCC optimize("O3", "unroll-loops")
  2. // #pragma GCC target("avx2", "bmi", "bmi2", "lzcnt", "popcnt")
  3.  
  4. #include <bits/stdc++.h>
  5. #define ldb long double
  6. //#define double ldb
  7. #define db double
  8. #define unomap unordered_map
  9. #define unoset unordered_set
  10. #define endl '\n'
  11. #define str string
  12. #define strstr stringstream
  13. #define sz(a) (int)a.size()
  14. #define ll long long
  15. // #define int ll
  16. #define pii pair <int, int>
  17. #define pll pair <ll, ll>
  18. #define Unique(a) a.resize(unique(all(a)) - a.begin())
  19. #define ull unsigned long long
  20. #define fir first
  21. #define sec second
  22. #define idc cin.ignore()
  23. #define lb lower_bound
  24. #define ub upper_bound
  25. #define all(s) s.begin(), s.end()
  26. #define rall(s) s.rbegin(), s.rend()
  27. #define rev reverse
  28. #define gcd __gcd
  29. #define pushb push_back
  30. #define popb pop_back
  31. #define pushf push_front
  32. #define popf pop_front
  33. #define emp emplace
  34. #define empb emplace_back
  35. #define empf emplace_front
  36. #define mul2x(a, x) a << x
  37. #define div2x(a, x) a >> x
  38. #define lcm(a, b) (a / __gcd(a, b) * b)
  39. #define log_base(x, base) log(x) / log(base)
  40. #define debug cerr<<"No errors!",exit(0);
  41. #define forw(i, a, b) for (int i = a; i <= b; ++i)
  42. #define forw2(i, a, b) for (ll i = a; i <= b; ++i)
  43. #define fors(i, a, b) for (int i = a; i >= b; --i)
  44. #define fors2(i, a, b) for (ll i = a; i >= b; --i)
  45. #define pqueue priority_queue
  46. #define sqrt sqrtl
  47. #define i128 __int128
  48. #define popcount __builtin_popcountll
  49. #define BIT(x, i) (((x) >> (i)) & 1)
  50. #define MASK(x) ((1LL) << (x))
  51. #define want_digit(x) cout << fixed << setprecision(x);
  52. #define excuting_time 1000.0 * clock() / CLOCKS_PER_SEC
  53. #define mapa make_pair
  54. using namespace std;
  55. const int MOD = 1e9 + 7; // 998244353
  56. const int inf = 1e9;
  57. const ll INF = 1e18; // MASK(63) - 1
  58. const int limN = 1e5 + 5;
  59.  
  60. mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
  61. inline ll random(const ll &L, const ll &R) {
  62. return uniform_int_distribution<ll> (L, R) (rng);
  63. }
  64.  
  65. /* -------~~~~~~===== END OF TEMPLATE =====~~~~~~------- */
  66.  
  67. template <class X, class Y>
  68. bool maximize(X &x, const Y &y) {
  69. return x < y ? x = y, true : false;
  70. }
  71.  
  72. int n, k, sum[limN][4], a[limN];
  73. void solve() {
  74. cin >> n >> k;
  75. forw (i, 1, n) {
  76. char c; cin >> c;
  77. if (c == 'a') a[i] = 0;
  78. else if (c == 'b') a[i] = 1;
  79. else if (c == 'c') a[i] = 2;
  80. else a[i] = 3;
  81. }
  82.  
  83. // sum[i][j] = số thao tác ít nhất cần thực hiện để đưa dãy 1 -> i thành j
  84. forw (i, 1, n) forw (j, 0, 3) {
  85. sum[i][j] = sum[i - 1][j];
  86. if (a[i] != j) ++sum[i][j];
  87. }
  88.  
  89. int ans = 0;
  90. forw (i, 1, n) forw (j, 0, 3) {
  91. int l = 1, r = i, res = -1;
  92. while (l <= r) {
  93. int mid = (l + r) >> 1;
  94. if (sum[i][j] - sum[mid - 1][j] <= k) {
  95. res = mid;
  96. r = mid - 1;
  97. }
  98. else l = mid + 1;
  99. }
  100. if (~res) maximize(ans, i - res + 1);
  101. }
  102. cout << ans << endl;
  103. }
  104.  
  105. signed main() {
  106. ios::sync_with_stdio(false), cin.tie(nullptr);
  107. srand(time(NULL));
  108. #define name "test"
  109. if (fopen(name".INP", "r")) {
  110. freopen(name".INP", "r", stdin);
  111. freopen(name".OUT", "w", stdout);
  112. }
  113. bool testCase = false;
  114. int numTest = 1;
  115. // cin >> numTest;
  116. forw (i, 1, numTest) {
  117. if (testCase) cout << "Case #" << i << ": ";
  118. solve();
  119. }
  120. return 0;
  121. }
  122.  
  123.  
  124. /*
  125. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣴⣦⣶⣤⣤⣀⣀⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  126. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⠿⠿⣶⣦⣄⡀⠀⢀⣠⣴⣶⠿⠿⠛⠋⠉⠉⠉⠉⠀⠀⠈⠉⠛⠋⠉⠉⠙⠻⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  127. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⠏⠀⣠⣄⡀⠈⠙⣿⡾⠟⠋⠁⢀⣀⡤⠶⠖⠛⠛⠲⠞⠋⠉⠛⠛⠒⠲⢿⣷⣦⣄⠀⠉⠻⣷⣶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  128. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣴⣶⡶⠾⠾⠿⠃⢀⣼⣿⣻⣿⡏⠀⠉⣀⣤⠶⠞⠉⢁⠠⠀⠄⡒⠀⠄⠂⠌⢀⠡⠐⠀⠀⠀⠈⠙⢿⣿⣦⣀⠀⠀⠈⠙⠻⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  129. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⡿⠟⠃⠀⣀⣀⡀⠀⠀⣼⡿⣧⣿⣿⠇⢀⡼⠛⠀⠀⡀⠘⢀⠀⠄⢠⠃⠠⢀⠘⠀⠄⠀⠄⡀⠀⠀⠀⠀⠀⠸⢿⣿⣧⡀⠛⢧⡀⠘⢿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  130. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⡿⠋⠀⡠⠞⠋⠀⠀⠀⢀⣾⣿⣽⣿⣿⡿⣿⠋⠀⠄⠂⢁⠠⠈⡀⠄⢈⡏⢀⠐⠠⠀⡁⠂⢁⠠⠀⠀⠀⠀⢀⠀⡀⠈⠹⣟⣿⣦⠀⢻⡄⠈⢿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  131. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⡟⠀⣠⠞⠀⡀⠀⠀⠀⠀⣾⣿⣳⣿⡿⢃⡾⠁⠀⠀⠂⢈⠀⢄⠞⠀⡐⣘⠀⠄⠂⠠⠁⡀⠌⠀⠀⠀⠀⠀⠀⠀⠁⠀⠐⡀⠙⣿⣿⠀⡀⢿⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  132. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⡟⠀⢰⢏⣾⣿⣶⣎⣠⣤⣼⣿⣿⣿⡿⠁⣼⠃⠀⠀⠀⠀⠀⣀⡞⠀⡐⠀⣷⠀⠀⢈⠀⠐⠀⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢂⠠⠀⠸⡟⢀⠐⣸⡇⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  133. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⠃⢀⣿⣾⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⢃⢰⡇⠀⠀⠀⠀⠀⠀⡼⠀⠀⠄⠂⣽⣄⠀⠀⠀⢀⠀⠙⠧⣄⠀⠠⠀⠄⢀⠠⠐⠀⡀⢧⡐⠀⢂⠰⢸⡇⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  134. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣄⣀⣼⡟⠀⣸⣟⣿⣽⣿⣟⠻⢿⣿⣼⣿⣿⣿⢊⣼⢡⠀⠀⠀⠀⠀⣸⠇⠀⠀⠐⢀⡇⠸⣦⡀⢈⠀⠀⠀⣇⠈⠛⣦⣐⠈⠀⠄⠂⡐⠀⡀⢧⠐⡀⢎⣹⠇⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  135. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⠿⡷⡟⠿⢋⠿⢿⡿⠛⠀⢀⣼⠟⢸⣿⣿⢥⡟⣿⠀⠀⠀⠀⣰⠏⠀⡀⠄⠀⣸⠁⠀⡼⣿⣦⡀⠡⠀⠹⡄⠀⠀⠽⢷⣌⠀⠂⠄⠂⡀⠘⡄⠸⣄⢻⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  136. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣧⣛⠴⣩⠝⡊⠅⠀⠀⠀⣠⣿⠟⠀⣼⣿⣿⡎⣽⣿⠀⠀⠠⣱⠏⠀⢂⢠⠀⢠⣿⣀⡀⠀⠜⣿⣷⣦⡐⠀⢻⡄⠀⠀⣹⣿⣷⣅⠐⠠⢀⠁⡸⢐⠬⣻⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  137. ⠀⠀⠀⠀⠀⢀⣠⣶⡿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠗⡌⠀⠀⠀⣠⣾⣿⠋⠀⢸⡇⠀⢸⣷⣾⣿⠇⠀⢡⡟⠀⠌⠀⡎⠀⣼⠋⠈⠉⠓⠲⢿⣿⣿⣿⣄⠈⣧⠀⠚⠁⠺⣹⢿⣷⡆⡄⢂⡘⡇⢎⣽⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  138. ⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣭⣛⢩⠁⠀⠀⠀⣠⣾⣿⡟⠁⠀⣰⣾⡇⠀⠈⣿⣿⣿⠁⢨⡿⠁⠐⠠⢁⡇⢐⣿⠀⠀⣄⠀⠀⠈⢻⣿⣿⣿⣇⢾⡇⠀⠀⣀⣼⣿⣿⣿⣷⢆⡜⣹⢂⣿⡄⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  139. ⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⢿⣿⣷⣄⠀⢀⣴⣿⡿⠋⠀⣰⣴⣿⣿⣻⡶⢤⣼⣿⡿⢀⣿⠃⢀⠁⠂⢸⣧⢨⣿⣿⣶⣦⣄⠀⠀⠀⠻⣿⣿⣿⣿⡇⢠⣾⣿⣿⡽⢿⣿⣿⣿⡜⣳⠐⣾⡇⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  140. ⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣟⣛⠻⢿⣷⣝⢿⣿⣧⣾⣿⠟⠁⠀⠀⣿⣿⣿⣋⣼⣷⡛⡟⠿⣿⣼⣟⠀⠤⠈⢀⣿⣿⣸⣿⣿⡟⣻⠝⢧⠀⠀⠀⠈⠻⣿⣿⢷⣿⣿⣿⣼⡇⠈⣿⣿⣿⣞⠱⠈⣾⡇⠀⢻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  141. ⢸⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣷⣤⠙⣿⣧⢿⣿⣿⠃⠀⡀⠀⠀⣿⡟⣿⣧⣿⣿⣿⣼⢲⡌⡽⣿⣤⠀⢂⢰⣿⣿⣿⠿⡿⠛⣿⠄⠀⠀⠀⠀⠀⠀⠈⠹⠎⢯⣙⠉⣸⠃⠸⢫⣿⣿⣯⠆⠁⢾⡇⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  142. ⢸⣿⣿⣿⣿⡏⣼⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣾⣿⡇⠀⠠⠆⣠⣼⣿⢀⣿⣿⣿⣿⣿⣿⣿⣼⠡⠎⠻⣿⣤⣼⡗⠻⠻⠦⣤⠴⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠛⠁⠀⠀⣾⠘⣿⠛⡇⢈⢚⡇⠀⢸⣯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  143. ⢸⣿⣿⣿⣿⡅⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣿⣿⣿⡇⠀⢸⣿⣿⢿⣧⣼⣿⣿⣿⣿⣿⣿⣿⣿⣧⠉⠋⠙⠙⢻⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⡁⠠⠁⠂⡸⣿⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  144. ⢸⣿⣿⡽⣿⣧⠹⣿⣿⣿⣿⣿⣿⣿⠏⣼⣿⣽⣿⡇⣰⠏⢸⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⡿⢛⠷⠈⠀⠀⠀⠀⠹⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⢤⣿⡇⠐⠀⡁⠄⢁⠰⣿⠀⠈⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  145. ⠘⢿⣿⣿⣿⣿⣷⣬⣙⡛⠿⣻⣿⣫⣾⣿⣏⣿⣿⡶⠋⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠃⠀⠀⠀⠀⠀⠀⢠⣿⣟⣳⣄⠀⠀⠀⠀⠀⠠⣴⣶⣶⣶⣾⠗⠀⠀⠀⣴⣿⣿⣿⠀⠂⠠⠐⢀⠐⣿⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  146. ⠀⠀⠻⣿⣼⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⢿⠏⠀⣴⢿⡝⠁⠈⠉⠙⢿⣿⣿⣿⣿⣟⠀⠀⠀⠀⠀⠀⠀⣀⣼⣯⣿⡟⠻⣷⣄⡀⠀⠀⠀⠈⠉⠉⠉⠁⠀⢀⣴⣾⣿⣿⣿⣿⡇⠀⡁⠐⡀⠂⣽⡇⠀⢿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  147. ⠀⠀⠐⣿⡧⣿⡿⢿⣻⣯⡿⣿⣯⣿⣾⢧⡟⠃⢠⣼⡟⡎⠀⠉⠉⠙⠛⠳⡞⣿⣿⣿⡇⠀⢀⣤⣤⣀⠀⣴⣿⡿⠟⠉⠙⢦⣽⣿⠿⢦⣤⣀⠀⠀⠀⠀⣰⠛⢻⣿⣿⣿⣿⣿⣿⣷⠀⠄⢁⠠⠐⡸⡇⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  148. ⠀⠀⠀⣿⣷⣉⣿⣿⣿⣿⣿⣶⡝⣷⢿⣾⠃⣠⣾⣿⢇⡟⢀⡀⠐⠀⠀⠀⣇⢸⣿⣿⠇⠐⠋⠀⠀⢘⣿⡿⠋⠀⣠⡆⠀⣾⡟⣿⣿⣾⣿⣿⣿⣷⣾⣿⢿⡇⢸⣿⣿⣿⣿⣿⣿⡿⠀⢈⠀⠄⠂⠱⣿⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  149. ⠀⠀⠀⣿⣿⣿⣟⣿⣿⣿⣿⣿⣿⢸⣿⣿⢠⣿⣿⣿⢸⣷⡸⢿⣦⣄⠀⣰⣇⣾⣿⣿⠂⠈⡀⠀⠀⣸⠋⠀⣠⣾⠟⠀⢠⡟⠻⠿⠛⠋⠀⠉⠉⠙⠿⠿⣦⡁⢿⣿⣿⣿⣿⣿⣿⡇⠀⢂⠀⠂⠌⠐⣿⠀⠘⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  150. ⠀⠀⠀⣽⣿⣿⣿⢹⣿⣿⣿⣿⡿⣸⣿⣏⣾⣿⣿⡯⣾⡿⠷⢮⣽⣿⣶⣿⠿⠻⡉⠟⣶⣀⠑⠤⠀⡿⠲⣶⡿⠋⠀⣀⠾⠁⠀⠀⠀⠀⠀⠀⠀⢰⡤⠴⠟⢧⡌⠻⢿⣿⣿⣿⣿⠃⠀⠌⠐⡀⠄⠐⣻⡀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  151. ⠀⠀⠠⣿⣿⣯⠻⣷⣍⣛⣛⢻⣴⣿⠟⣱⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠠⣅⣜⠠⠙⣿⣶⣄⣼⢧⡀⠈⠀⣀⣾⣟⣓⠂⠄⠀⠀⠀⠀⠀⠀⠘⠷⣤⣀⢨⡿⢷⣤⡈⠛⠛⠉⠋⠻⠶⣶⣦⣄⠂⢹⡇⠀⢿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  152. ⠀⠀⠀⢻⣿⣿⣷⣮⣙⡛⢛⢻⣻⣥⣿⣿⣿⣿⠟⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⣠⣿⣿⣿⣿⡄⠙⣄⠚⠉⠁⠀⠉⠙⣆⠈⠐⠠⠀⠀⠀⠀⠀⠈⢷⡄⠘⢦⡉⠉⠳⢦⡙⢦⠀⠀⠀⠉⠺⡛⢶⣿⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  153. ⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢁⠠⢠⠀⡄⢠⠀⠠⢀⠀⠀⠀⠀⠀⢀⡞⠙⣿⣿⣿⣿⡄⠹⡆⠀⠀⠀⠀⠀⢯⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡄⢀⠳⣤⠀⠀⠁⠈⠳⡀⠀⠀⠀⠈⢢⡻⡄⠸⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  154. ⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⢃⠦⣡⠒⠤⠘⠠⠀⠀⠀⠀⣀⣤⠟⠁⢸⣿⣿⣿⣿⣿⡀⢹⡄⠀⠀⠀⠀⠩⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣆⠀⡈⠳⣄⠀⠀⠀⠙⢦⡀⡀⠀⠀⠙⣇⠀⠈⢻⡿⢿⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  155. ⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠶⠿⠾⠷⠷⠶⠾⠟⠛⠉⠁⠀⡘⣿⣿⣿⣿⣿⣿⡇⠘⣧⠀⠀⠀⠀⢸⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣧⡀⠐⠘⢷⣄⠉⠦⠿⣇⠁⠀⠀⠀⠈⠳⢦⣀⣧⡀⠈⠻⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  156. ⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡼⢅⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣼⣿⣿⣿⣿⣿⣿⡿⢀⣿⠀⠀⠀⠀⢠⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡈⢀⠂⠙⢿⡶⠶⠿⠶⢦⡀⠀⠀⠀⠀⠀⠙⣿⣦⠀⠙⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  157. ⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣈⠰⢠⢂⠠⢀⡀⠀⠀⠀⠀⠀⢀⣡⣿⣿⣿⣿⣿⣿⣿⡇⢸⡇⠀⠀⠀⠀⢸⡇⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠠⠁⡈⠱⡆⠀⠀⠲⣕⡀⠀⠀⠀⠀⢀⡟⣿⣷⡀⠈⠻⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  158. ⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢦⡙⡆⢬⡑⢢⠠⣉⣄⣠⡴⠞⠋⣿⣿⣿⣿⣿⣿⣿⡟⠀⡾⠀⠀⠀⠀⠀⣼⠄⢰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⡀⠐⡀⠁⠹⡄⠀⠀⠘⢿⡄⠀⠀⣠⡾⢁⣿⣿⣿⣦⡀⠨⠻⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  159. ⠀⠀⠀⠀⠀⠀⠀⠈⣿⠛⣿⣿⣿⣿⡟⡟⠛⠛⠛⠿⠛⠿⠛⠛⠟⠛⠉⠁⠠⣄⣾⣿⣿⣿⣿⣿⣿⡟⠁⣼⠁⠀⠀⠀⠀⢸⡏⠀⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠠⢀⠁⠂⢿⠀⠀⠀⠀⣿⣦⡾⢋⣴⣿⣿⣿⣿⣿⣿⣦⡀⠈⠻⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀
  160. ⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⣘⣿⣿⣿⣿⡱⠡⠌⢂⣄⡀⠀⠄⢂⡀⠀⠀⠄⣱⣾⣿⣿⣿⣿⣿⡿⠋⣠⢾⡇⠀⠀⠀⠀⢠⣞⢁⣸⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠐⡀⠈⠄⡘⣇⠀⠀⠀⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠈⢻⣧⠀⠀⠀⠀⠀⠀⠀⠀
  161. ⠀⠀⠀⠀⠀⠀⠀⢸⡏⠀⢹⣿⣿⣿⣿⣇⠻⣌⠲⣌⠷⢬⠐⠠⢀⠂⣀⣴⣿⣿⣿⣿⠿⠛⢁⣤⠞⠁⠈⣿⣄⠀⠀⢀⣾⠇⣼⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠐⡀⠡⠀⠄⢿⠀⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠈⣿⡆⠀⠀⠀⠀⠀⠀⠀
  162. ⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⡿⠈⠻⣿⡿⢿⢷⣾⣿⣾⣽⣦⣭⣶⠟⠛⠛⠛⠛⢉⣉⣠⡴⠞⠋⠀⣠⣶⡀⠘⢿⣦⣶⡿⠋⠚⠛⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢨⡗⠠⠐⠀⠡⠀⢼⡆⠀⠀⢹⣿⡏⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⢰⣿⠁⠀⠀⠀⠀⠀⠀⠀
  163. ⠀⠀⠀⠀⠀⠀⢰⣿⠀⢰⡇⠠⢀⠀⢀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣾⠛⠛⠉⠁⣀⣤⣶⠿⠛⠻⣿⡀⠸⣿⡿⡖⠒⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⢀⠂⢁⠂⢁⠀⣧⠀⠀⠸⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⣼⡏⠀⠀⠀⠀⠀⠀⠀⠀
  164. ⠀⠀⠀⠀⠀⠀⣸⡏⠀⣸⠀⠠⠀⠌⠀⠠⠈⢀⠐⠀⠂⠀⠈⠉⢉⣿⣿⣿⠀⢰⣾⠿⠛⠉⠀⠀⠀⠀⢿⣧⠀⢸⣷⣷⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣇⠀⡐⠠⠐⠀⢂⢻⠀⠀⢸⣿⣿⣿⠟⣻⣿⣿⣿⣻⡟⣿⣿⡟⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀
  165. ⠀⠀⠀⠀⠀⠀⣿⡇⠀⣿⠀⡀⢁⠂⠈⠀⠄⠂⠀⠌⠀⠁⠀⠀⣾⣿⣿⣿⠀⠈⣿⠄⠀⠀⠀⠀⠀⠀⠩⣿⣆⠀⢻⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠠⠐⡀⠡⢀⢸⡆⠀⢸⣿⣿⣥⣿⣿⣿⣿⣿⣿⡿⠈⣿⠀⢠⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀
  166. ⠀⠀⠀⠀⠀⢀⣿⠀⢰⡇⠀⠄⡀⠂⢁⠀⠂⢀⠐⠀⣈⣤⣄⣾⣿⣿⣿⣿⡄⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠸⣿⡄⠈⢿⣧⠤⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠡⠐⢀⠐⡀⠈⣷⠀⢸⣿⣿⣿⣿⣿⣿⣿⡿⡿⠁⣰⠇⠀⣾⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  167. ⠀⠀⠀⠀⠀⣸⡟⠀⢸⠃⢀⠂⠠⠐⠀⡀⠌⠀⠀⠄⣾⣿⣿⣿⢿⣿⣿⣿⡇⠀⢻⡇⠀⠀⠀⠀⠀⠀⠀⠀⢻⣷⡀⠘⣿⣆⠀⢀⠠⠐⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡅⠂⢈⠠⠀⠄⡁⠸⡆⢸⣿⣿⣿⣿⣿⣿⡿⢱⣇⣀⡟⠀⣼⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  168. ⠀⠀⠀⠀⠀⣿⡇⠀⡿⠀⠠⠀⡁⢀⠂⠀⠠⠐⠈⠀⣿⣿⣿⣯⣿⣿⣿⣿⡇⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣧⠀⢹⣿⡄⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⢂⠠⠈⡀⠄⠁⢿⣻⣿⣿⣿⣿⣿⡿⢠⣟⣼⡿⠁⢰⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  169. ⠀⠀⠀⠀⢠⣿⠀⢰⡇⠀⡁⠠⠐⠀⠀⠀⠂⠀⠄⣠⣿⣿⣿⣟⣿⣿⣿⣿⣿⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡄⠀⢻⣧⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣻⣇⠈⡀⠄⠂⡀⠂⢁⠘⣿⣿⣿⣿⣿⣿⣥⡟⡴⣼⠃⢀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  170. ⠀⠀⠀⠀⢸⣿⠀⢸⡇⠀⡄⠐⢠⠀⠁⠀⡄⣴⣾⣿⣿⣿⣿⣿⢻⣿⣿⣿⣿⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⡄⠈⣿⡆⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⠀⡄⠂⠁⢠⠈⢠⠀⢹⣿⣿⣿⢻⣿⣾⢳⢳⡏⠀⣼⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  171. ⠀⠀⠀⢀⣾⡇⠀⣾⣄⣀⣄⣐⣀⣀⣀⣠⣾⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡀⢸⣿⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣧⠀⣹⣿⣤⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⣀⣀⣸⣿⣀⣠⣔⣈⣤⣐⣀⣈⣀⣈⣹⣿⣿⣾⣷⣏⣾⠁⣠⣿⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  172. ⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠈⠀⠈⠁⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠈⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  173. */
  174.  
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
0