QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#646286#43. Geneticsmaspy100 ✓218ms34792kbC++2316.5kb2024-10-16 22:03:552024-10-16 22:03:56

Judging History

你现在查看的是最新测评结果

  • [2024-10-16 22:03:56]
  • 评测
  • 测评结果:100
  • 用时:218ms
  • 内存:34792kb
  • [2024-10-16 22:03:55]
  • 提交

answer

#line 1 "/home/maspy/compro/library/my_template.hpp"
#if defined(LOCAL)
#include <my_template_compiled.hpp>
#else

// https://codeforces.com/blog/entry/96344
#pragma GCC optimize("Ofast,unroll-loops")
// いまの CF だとこれ入れると動かない?
// #pragma GCC target("avx2,popcnt")

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using i128 = __int128;
using u128 = unsigned __int128;
using f128 = __float128;

template <class T>
constexpr T infty = 0;
template <>
constexpr int infty<int> = 1'010'000'000;
template <>
constexpr ll infty<ll> = 2'020'000'000'000'000'000;
template <>
constexpr u32 infty<u32> = infty<int>;
template <>
constexpr u64 infty<u64> = infty<ll>;
template <>
constexpr i128 infty<i128> = i128(infty<ll>) * 2'000'000'000'000'000'000;
template <>
constexpr double infty<double> = infty<ll>;
template <>
constexpr long double infty<long double> = infty<ll>;

using pi = pair<ll, ll>;
using vi = vector<ll>;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vector<vc<T>>;
template <class T>
using vvvc = vector<vvc<T>>;
template <class T>
using vvvvc = vector<vvvc<T>>;
template <class T>
using vvvvvc = vector<vvvvc<T>>;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;

#define vv(type, name, h, ...) vector<vector<type>> name(h, vector<type>(__VA_ARGS__))
#define vvv(type, name, h, w, ...) vector<vector<vector<type>>> name(h, vector<vector<type>>(w, vector<type>(__VA_ARGS__)))
#define vvvv(type, name, a, b, c, ...) \
  vector<vector<vector<vector<type>>>> name(a, vector<vector<vector<type>>>(b, vector<vector<type>>(c, vector<type>(__VA_ARGS__))))

// https://trap.jp/post/1224/
#define FOR1(a) for (ll _ = 0; _ < ll(a); ++_)
#define FOR2(i, a) for (ll i = 0; i < ll(a); ++i)
#define FOR3(i, a, b) for (ll i = a; i < ll(b); ++i)
#define FOR4(i, a, b, c) for (ll i = a; i < ll(b); i += (c))
#define FOR1_R(a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR2_R(i, a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR3_R(i, a, b) for (ll i = (b)-1; i >= ll(a); --i)
#define overload4(a, b, c, d, e, ...) e
#define overload3(a, b, c, d, ...) d
#define FOR(...) overload4(__VA_ARGS__, FOR4, FOR3, FOR2, FOR1)(__VA_ARGS__)
#define FOR_R(...) overload3(__VA_ARGS__, FOR3_R, FOR2_R, FOR1_R)(__VA_ARGS__)

#define FOR_subset(t, s) for (ll t = (s); t >= 0; t = (t == 0 ? -1 : (t - 1) & (s)))
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define elif else if

#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second

#define stoi stoll

int popcnt(int x) { return __builtin_popcount(x); }
int popcnt(u32 x) { return __builtin_popcount(x); }
int popcnt(ll x) { return __builtin_popcountll(x); }
int popcnt(u64 x) { return __builtin_popcountll(x); }
int popcnt_mod_2(int x) { return __builtin_parity(x); }
int popcnt_mod_2(u32 x) { return __builtin_parity(x); }
int popcnt_mod_2(ll x) { return __builtin_parityll(x); }
int popcnt_mod_2(u64 x) { return __builtin_parityll(x); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 1, 2)
int topbit(int x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(u32 x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(ll x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
int topbit(u64 x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 0, 2)
int lowbit(int x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(u32 x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(ll x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
int lowbit(u64 x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }

template <typename T>
T floor(T a, T b) {
  return a / b - (a % b && (a ^ b) < 0);
}
template <typename T>
T ceil(T x, T y) {
  return floor(x + y - 1, y);
}
template <typename T>
T bmod(T x, T y) {
  return x - y * floor(x, y);
}
template <typename T>
pair<T, T> divmod(T x, T y) {
  T q = floor(x, y);
  return {q, x - q * y};
}

template <typename T, typename U>
T SUM(const vector<U> &A) {
  T sm = 0;
  for (auto &&a: A) sm += a;
  return sm;
}

#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define LB(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define UB(c, x) distance((c).begin(), upper_bound(all(c), (x)))
#define UNIQUE(x) sort(all(x)), x.erase(unique(all(x)), x.end()), x.shrink_to_fit()

template <typename T>
T POP(deque<T> &que) {
  T a = que.front();
  que.pop_front();
  return a;
}
template <typename T>
T POP(pq<T> &que) {
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(pqg<T> &que) {
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(vc<T> &que) {
  T a = que.back();
  que.pop_back();
  return a;
}

template <typename F>
ll binary_search(F check, ll ok, ll ng, bool check_ok = true) {
  if (check_ok) assert(check(ok));
  while (abs(ok - ng) > 1) {
    auto x = (ng + ok) / 2;
    (check(x) ? ok : ng) = x;
  }
  return ok;
}
template <typename F>
double binary_search_real(F check, double ok, double ng, int iter = 100) {
  FOR(iter) {
    double x = (ok + ng) / 2;
    (check(x) ? ok : ng) = x;
  }
  return (ok + ng) / 2;
}

template <class T, class S>
inline bool chmax(T &a, const S &b) {
  return (a < b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chmin(T &a, const S &b) {
  return (a > b ? a = b, 1 : 0);
}

// ? は -1
vc<int> s_to_vi(const string &S, char first_char) {
  vc<int> A(S.size());
  FOR(i, S.size()) { A[i] = (S[i] != '?' ? S[i] - first_char : -1); }
  return A;
}

template <typename T, typename U>
vector<T> cumsum(vector<U> &A, int off = 1) {
  int N = A.size();
  vector<T> B(N + 1);
  FOR(i, N) { B[i + 1] = B[i] + A[i]; }
  if (off == 0) B.erase(B.begin());
  return B;
}

// stable sort
template <typename T>
vector<int> argsort(const vector<T> &A) {
  vector<int> ids(len(A));
  iota(all(ids), 0);
  sort(all(ids), [&](int i, int j) { return (A[i] == A[j] ? i < j : A[i] < A[j]); });
  return ids;
}

// A[I[0]], A[I[1]], ...
template <typename T>
vc<T> rearrange(const vc<T> &A, const vc<int> &I) {
  vc<T> B(len(I));
  FOR(i, len(I)) B[i] = A[I[i]];
  return B;
}

template <typename T, typename... Vectors>
void concat(vc<T> &first, const Vectors &... others) {
  vc<T> &res = first;
  (res.insert(res.end(), others.begin(), others.end()), ...);
}
#endif
#line 1 "/home/maspy/compro/library/other/io.hpp"
#define FASTIO
#include <unistd.h>

// https://judge.yosupo.jp/submission/21623
namespace fastio {
static constexpr uint32_t SZ = 1 << 17;
char ibuf[SZ];
char obuf[SZ];
char out[100];
// pointer of ibuf, obuf
uint32_t pil = 0, pir = 0, por = 0;

struct Pre {
  char num[10000][4];
  constexpr Pre() : num() {
    for (int i = 0; i < 10000; i++) {
      int n = i;
      for (int j = 3; j >= 0; j--) {
        num[i][j] = n % 10 | '0';
        n /= 10;
      }
    }
  }
} constexpr pre;

inline void load() {
  memcpy(ibuf, ibuf + pil, pir - pil);
  pir = pir - pil + fread(ibuf + pir - pil, 1, SZ - pir + pil, stdin);
  pil = 0;
  if (pir < SZ) ibuf[pir++] = '\n';
}

inline void flush() {
  fwrite(obuf, 1, por, stdout);
  por = 0;
}

void rd(char &c) {
  do {
    if (pil + 1 > pir) load();
    c = ibuf[pil++];
  } while (isspace(c));
}

void rd(string &x) {
  x.clear();
  char c;
  do {
    if (pil + 1 > pir) load();
    c = ibuf[pil++];
  } while (isspace(c));
  do {
    x += c;
    if (pil == pir) load();
    c = ibuf[pil++];
  } while (!isspace(c));
}

template <typename T>
void rd_real(T &x) {
  string s;
  rd(s);
  x = stod(s);
}

template <typename T>
void rd_integer(T &x) {
  if (pil + 100 > pir) load();
  char c;
  do
    c = ibuf[pil++];
  while (c < '-');
  bool minus = 0;
  if constexpr (is_signed<T>::value || is_same_v<T, i128>) {
    if (c == '-') { minus = 1, c = ibuf[pil++]; }
  }
  x = 0;
  while ('0' <= c) { x = x * 10 + (c & 15), c = ibuf[pil++]; }
  if constexpr (is_signed<T>::value || is_same_v<T, i128>) {
    if (minus) x = -x;
  }
}

void rd(int &x) { rd_integer(x); }
void rd(ll &x) { rd_integer(x); }
void rd(i128 &x) { rd_integer(x); }
void rd(u32 &x) { rd_integer(x); }
void rd(u64 &x) { rd_integer(x); }
void rd(u128 &x) { rd_integer(x); }
void rd(double &x) { rd_real(x); }
void rd(long double &x) { rd_real(x); }
void rd(f128 &x) { rd_real(x); }

template <class T, class U>
void rd(pair<T, U> &p) {
  return rd(p.first), rd(p.second);
}
template <size_t N = 0, typename T>
void rd_tuple(T &t) {
  if constexpr (N < std::tuple_size<T>::value) {
    auto &x = std::get<N>(t);
    rd(x);
    rd_tuple<N + 1>(t);
  }
}
template <class... T>
void rd(tuple<T...> &tpl) {
  rd_tuple(tpl);
}

template <size_t N = 0, typename T>
void rd(array<T, N> &x) {
  for (auto &d: x) rd(d);
}
template <class T>
void rd(vc<T> &x) {
  for (auto &d: x) rd(d);
}

void read() {}
template <class H, class... T>
void read(H &h, T &... t) {
  rd(h), read(t...);
}

void wt(const char c) {
  if (por == SZ) flush();
  obuf[por++] = c;
}
void wt(const string s) {
  for (char c: s) wt(c);
}
void wt(const char *s) {
  size_t len = strlen(s);
  for (size_t i = 0; i < len; i++) wt(s[i]);
}

template <typename T>
void wt_integer(T x) {
  if (por > SZ - 100) flush();
  if (x < 0) { obuf[por++] = '-', x = -x; }
  int outi;
  for (outi = 96; x >= 10000; outi -= 4) {
    memcpy(out + outi, pre.num[x % 10000], 4);
    x /= 10000;
  }
  if (x >= 1000) {
    memcpy(obuf + por, pre.num[x], 4);
    por += 4;
  } else if (x >= 100) {
    memcpy(obuf + por, pre.num[x] + 1, 3);
    por += 3;
  } else if (x >= 10) {
    int q = (x * 103) >> 10;
    obuf[por] = q | '0';
    obuf[por + 1] = (x - q * 10) | '0';
    por += 2;
  } else
    obuf[por++] = x | '0';
  memcpy(obuf + por, out + outi + 4, 96 - outi);
  por += 96 - outi;
}

template <typename T>
void wt_real(T x) {
  ostringstream oss;
  oss << fixed << setprecision(15) << double(x);
  string s = oss.str();
  wt(s);
}

void wt(int x) { wt_integer(x); }
void wt(ll x) { wt_integer(x); }
void wt(i128 x) { wt_integer(x); }
void wt(u32 x) { wt_integer(x); }
void wt(u64 x) { wt_integer(x); }
void wt(u128 x) { wt_integer(x); }
void wt(double x) { wt_real(x); }
void wt(long double x) { wt_real(x); }
void wt(f128 x) { wt_real(x); }

template <class T, class U>
void wt(const pair<T, U> val) {
  wt(val.first);
  wt(' ');
  wt(val.second);
}
template <size_t N = 0, typename T>
void wt_tuple(const T t) {
  if constexpr (N < std::tuple_size<T>::value) {
    if constexpr (N > 0) { wt(' '); }
    const auto x = std::get<N>(t);
    wt(x);
    wt_tuple<N + 1>(t);
  }
}
template <class... T>
void wt(tuple<T...> tpl) {
  wt_tuple(tpl);
}
template <class T, size_t S>
void wt(const array<T, S> val) {
  auto n = val.size();
  for (size_t i = 0; i < n; i++) {
    if (i) wt(' ');
    wt(val[i]);
  }
}
template <class T>
void wt(const vector<T> val) {
  auto n = val.size();
  for (size_t i = 0; i < n; i++) {
    if (i) wt(' ');
    wt(val[i]);
  }
}

void print() { wt('\n'); }
template <class Head, class... Tail>
void print(Head &&head, Tail &&... tail) {
  wt(head);
  if (sizeof...(Tail)) wt(' ');
  print(forward<Tail>(tail)...);
}

// gcc expansion. called automaticall after main.
void __attribute__((destructor)) _d() { flush(); }
} // namespace fastio
using fastio::read;
using fastio::print;
using fastio::flush;

#if defined(LOCAL)
#define SHOW(...) SHOW_IMPL(__VA_ARGS__, SHOW6, SHOW5, SHOW4, SHOW3, SHOW2, SHOW1)(__VA_ARGS__)
#define SHOW_IMPL(_1, _2, _3, _4, _5, _6, NAME, ...) NAME
#define SHOW1(x) print(#x, "=", (x)), flush()
#define SHOW2(x, y) print(#x, "=", (x), #y, "=", (y)), flush()
#define SHOW3(x, y, z) print(#x, "=", (x), #y, "=", (y), #z, "=", (z)), flush()
#define SHOW4(x, y, z, w) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w)), flush()
#define SHOW5(x, y, z, w, v) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w), #v, "=", (v)), flush()
#define SHOW6(x, y, z, w, v, u) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w), #v, "=", (v), #u, "=", (u)), flush()
#else
#define SHOW(...)
#endif

#define INT(...)   \
  int __VA_ARGS__; \
  read(__VA_ARGS__)
#define LL(...)   \
  ll __VA_ARGS__; \
  read(__VA_ARGS__)
#define U32(...)   \
  u32 __VA_ARGS__; \
  read(__VA_ARGS__)
#define U64(...)   \
  u64 __VA_ARGS__; \
  read(__VA_ARGS__)
#define STR(...)      \
  string __VA_ARGS__; \
  read(__VA_ARGS__)
#define CHAR(...)   \
  char __VA_ARGS__; \
  read(__VA_ARGS__)
#define DBL(...)      \
  double __VA_ARGS__; \
  read(__VA_ARGS__)

#define VEC(type, name, size) \
  vector<type> name(size);    \
  read(name)
#define VV(type, name, h, w)                     \
  vector<vector<type>> name(h, vector<type>(w)); \
  read(name)

void YES(bool t = 1) { print(t ? "YES" : "NO"); }
void NO(bool t = 1) { YES(!t); }
void Yes(bool t = 1) { print(t ? "Yes" : "No"); }
void No(bool t = 1) { Yes(!t); }
void yes(bool t = 1) { print(t ? "yes" : "no"); }
void no(bool t = 1) { yes(!t); }
#line 3 "main.cpp"

#line 2 "/home/maspy/compro/library/random/base.hpp"

u64 RNG_64() {
  static uint64_t x_
      = uint64_t(chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count()) * 10150724397891781847ULL;
  x_ ^= x_ << 7;
  return x_ ^= x_ >> 9;
}

u64 RNG(u64 lim) { return RNG_64() % lim; }

ll RNG(ll l, ll r) { return l + RNG_64() % (r - l); }
#line 2 "/home/maspy/compro/library/mod/modint61.hpp"

struct modint61 {
  static constexpr u64 mod = (1ULL << 61) - 1;
  u64 val;
  constexpr modint61() : val(0ULL) {}
  constexpr modint61(u32 x) : val(x) {}
  constexpr modint61(u64 x) : val(x % mod) {}
  constexpr modint61(int x) : val((x < 0) ? (x + static_cast<ll>(mod)) : x) {}
  constexpr modint61(ll x) : val(((x %= static_cast<ll>(mod)) < 0) ? (x + static_cast<ll>(mod)) : x) {}
  static constexpr u64 get_mod() { return mod; }

  modint61 &operator+=(const modint61 &a) {
    val = ((val += a.val) >= mod) ? (val - mod) : val;
    return *this;
  }
  modint61 &operator-=(const modint61 &a) {
    val = ((val -= a.val) >= mod) ? (val + mod) : val;
    return *this;
  }
  modint61 &operator*=(const modint61 &a) {
    const unsigned __int128 y = static_cast<unsigned __int128>(val) * a.val;
    val = (y >> 61) + (y & mod);
    val = (val >= mod) ? (val - mod) : val;
    return *this;
  }
  modint61 operator-() const { return modint61(val ? mod - val : u64(0)); }
  modint61 &operator/=(const modint61 &a) { return (*this *= a.inverse()); }
  modint61 operator+(const modint61 &p) const { return modint61(*this) += p; }
  modint61 operator-(const modint61 &p) const { return modint61(*this) -= p; }
  modint61 operator*(const modint61 &p) const { return modint61(*this) *= p; }
  modint61 operator/(const modint61 &p) const { return modint61(*this) /= p; }
  bool operator<(const modint61 &other) const { return val < other.val; }
  bool operator==(const modint61 &p) const { return val == p.val; }
  bool operator!=(const modint61 &p) const { return val != p.val; }
  modint61 inverse() const {
    ll a = val, b = mod, u = 1, v = 0, t;
    while (b > 0) {
      t = a / b;
      swap(a -= t * b, b), swap(u -= t * v, v);
    }
    return modint61(u);
  }
  modint61 pow(ll n) const {
    assert(n >= 0);
    modint61 ret(1), mul(val);
    while (n > 0) {
      if (n & 1) ret *= mul;
      mul *= mul, n >>= 1;
    }
    return ret;
  }
};

#ifdef FASTIO
void rd(modint61 &x) {
  fastio::rd(x.val);
  assert(0 <= x.val && x.val < modint61::mod);
}

void wt(modint61 x) { fastio::wt(x.val); }
#endif
#line 6 "main.cpp"

/*
重み w[i]
f(n) = sum_i w[i]count(S[i]!=S[n]) = K sum w[i]
*/

using mint = modint61;

void solve() {
  LL(N, M, K);
  vc<mint> W(N);
  FOR(i, N) W[i] = RNG_64();
  mint WS = SUM<mint>(W);
  VEC(string, S, N);
  vv(mint, dat, 4, M);
  vc<int> ctoi(256);
  ctoi['A'] = 0;
  ctoi['C'] = 1;
  ctoi['G'] = 2;
  ctoi['T'] = 3;
  FOR(i, N) FOR(j, M) { dat[ctoi[S[i][j]]][j] += W[i]; }

  FOR(i, N) {
    mint sm = 0;
    FOR(j, M) {
      FOR(c, 4) {
        if (c == ctoi[S[i][j]]) continue;
        sm += dat[c][j];
      }
    }
    mint god = WS - W[i];
    god *= K;
    if (sm == god) return print(1 + i);
  }
}

signed main() { solve(); }

详细

Subtask #1:

score: 27
Accepted

Test #1:

score: 27
Accepted
time: 1ms
memory: 3700kb

input:

85 96 48
AACAAACCACACCAACCCACACCACCCAAAACCACCCAACCCAACCAAACCCACACAAAACCAAACACACCCACAAAACCAACAAACCAAAACAAC
AAAACACAAACCCAAAAAACCCCAACCACCCCACAAACACAACAACAACCACACCCACCCACCCACCCCACAACCACACAACCCACAACCAAAACC
AAACCAAAACCCAACCCAAACAAAAACAACACAACACACCACCAACCCAACACACCCCCACAAACCCACACCCCAAAAACAACCAAAACACCACAC
...

output:

10

result:

ok single line: '10'

Test #2:

score: 27
Accepted
time: 0ms
memory: 3704kb

input:

99 100 2
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGCTCCTGGCAGTTTCCAGCACTGTTCGGGCCCCGCATACACTA
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGGTCCTGGCAGTTACCAGCACTGTTCGGGCCCCGCATACACTA
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGCTCCAGGCAGTTACCAGCACTGTTCGGGCCC...

output:

2

result:

ok single line: '2'

Test #3:

score: 27
Accepted
time: 1ms
memory: 3848kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #4:

score: 27
Accepted
time: 0ms
memory: 3632kb

input:

73 81 54
GACGACGCCACACGCGAACGAAGGGCCGCAAGCCGACACAACGGGCCAACCCAGGACACAGCCGGCAGCGCGGAGGCGGCG
AAGCACCCCCGGCGGACGCCACCACGACAACGAGCCAAACGGGCAGCGACAGGAACCCAGGAGAGGAGCCCGAACCCCACC
AAACGCAAGACAAGACGGACGAGGGCAGCAGAGCAGGAGCCGGAACAGCGAAGAAAGCCCCACAGAACAAGGACGCGGCGG
GACGGAAGGCAGAGCGGCCGACAACCGCCCGCACCCCGCGCCACC...

output:

69

result:

ok single line: '69'

Test #5:

score: 27
Accepted
time: 1ms
memory: 3576kb

input:

95 48 24
CCAAGTCTATACATCTTTCCTCGCCCGTTAAAGAACGGAACCCCGCTA
CCCATGAGATCCCTATTTAATAGCAATTGCCCTAAAGTAAACCAGCTC
CAAAGGAGAGACATAGGTCCGAGACATGGCAAGAACGTCCAAAAGCGA
CACCGGAGATAACGCTGTAATCGCCAGGGCAAGCCAGGCCCCCCGAGC
AACAGGCTAGCCATCGTTCAGAGCACGGGACCGACATGCCAACCGATC
CACATGCGAGACCGCTGGACGCGACCTTTACCTACATGCAACACGC...

output:

81

result:

ok single line: '81'

Test #6:

score: 27
Accepted
time: 0ms
memory: 3640kb

input:

95 100 24
ACAACCCCCAACCCAAACAAAACCCAACACCCCAAACCACACCCCACACAAAAAACCACAAAAAACCCACCAACAACCCAACAACCCCCCCACCCAAAAA
CCACCCACACCCCCAAACCAACCCCACAAACCCAACCCACACAACAAAACAAAAACCACAAAAAACCCACCAACCACCACACCAACCCCACACACAAAAA
CCCACCACCAACCAAAACCAACCCCAACAACCCCACCCACACAACACACCAAAAACCACAAAAAAACCCCCAACACCCCAAACAAACA...

output:

90

result:

ok single line: '90'

Test #7:

score: 27
Accepted
time: 1ms
memory: 3696kb

input:

47 100 14
GCCAGGCAAGCGAAAGAGCGGAGGCCACACGAGGGCAGGAACAGAGAGCACAGAAGAAAGCCAAGCGACAGCAACAAAGGCGAGCGAAACGAAAGACCCC
GCCAGGGAGGCGAAACAGAGGAAGCAACACGAGGGCAGGGACAAAGAGCCCAGAAGAAAGCCAAACCACAGCACCAAAGGCGGGCGAAACGAAAGACCCG
GCCAGGCAAACCAAACAGAAGAGGCAACACGAGGGCAGGGACAGAGAGCACAGCAGAAGGGCAAACGACAGCACCAAAGGCGGGCGAA...

output:

41

result:

ok single line: '41'

Test #8:

score: 27
Accepted
time: 0ms
memory: 3872kb

input:

4 4 2
CAAC
AAAA
CCCC
CCCC

output:

1

result:

ok single line: '1'

Test #9:

score: 27
Accepted
time: 0ms
memory: 3644kb

input:

64 64 48
CAAAGACAGCATGAGTGCGAACGTAGATGCAGGCTGCGATGGCGTGATCGCACCGATGTTACAA
AAGCGTACTGGTTGTGGGCATGCGATCTACGTCCCATTGCAGTGGGGAAAGAGCCTAGTCTAGT
CCCCCATAGGCGCGTCCCAGGCGTTCGCGACCATTCCTCCCGCGGTTCTCAAACCCACCCCGGT
ATTCGGTGCGGCGTCTTCTGTACTTCCTGACTAGCTGAAGAGATTGATGCGTCTGGGAGCCTAG
CATCCGGCCGCCTAATTATCGGGCGGGCCGA...

output:

57

result:

ok single line: '57'

Test #10:

score: 27
Accepted
time: 1ms
memory: 3700kb

input:

96 96 48
GGTCGTCTTTTGGACCGTGCGATCGACTCCGATATTTGATGTTCCTTAAGAAGTACGAAAAGTGTAGTCCTGCCAATACAGACTCAGAGCATTATT
GGTATTCTTGGTGAACTTGAGATCTCATCATAGAGGGGAGGTGCATGCCTCCGTCAGCCAATTGTAGGCCTTACACTCCCTACGACGATACGGCGT
TGTAGGATTGGGGCAATGGCTCGAGCAGACGCTATGGGATGGGCAGTACTAATTACTCCACTTGTCTTCCGGACACTCAAGCCGCCGAGAATGAGG
...

output:

36

result:

ok single line: '36'

Test #11:

score: 27
Accepted
time: 1ms
memory: 3704kb

input:

83 96 48
CAAACCAAACACCCAACCACAAACAACCCAACCACCCCCCCACCAACAACAAACACCAAAAACAAAAAAACCACAACCCCCACAACACACACCAAC
CCCACCCCCACCCCACCAACCACCAACAACCCCCACCAAAAACAACACACAAAAAAACACCACAAAACCACAACCCCCACCCACAAAAAAAAACCA
CACAAAACAACAACCAACCCCCCCCCAACCCCAACACAACACCAACCAAACCCCACAACAAACCAAAAACCCCACACCACACCAACAAAAAACCCA
...

output:

61

result:

ok single line: '61'

Test #12:

score: 27
Accepted
time: 0ms
memory: 3648kb

input:

97 96 48
CGTCGTCAGAAATTAGCGCTGATGAATGACTGTGGCTGACGGCTTTTTAGTAGATCGTTGGCCGAACGGACCATAGATTTGTTCCGAGCCTCTAGT
CTGAGGAATAACGTATCGATTCTGACGTAATTTGGATGAAGTAGTTTTCTGCGAGATTTGGCAGCACGTCACCGAGAGTGGGGCCGCTAATAGCTT
CGGAGTAAGACATTAGCGATTCGTCCTTCCGGTTGCGGCCTTATTGTGATGAGAGCGGTTTCAGAACGTCAACTCGCGGGTGTAAGAGCAGCGCGG
...

output:

96

result:

ok single line: '96'

Test #13:

score: 27
Accepted
time: 1ms
memory: 3900kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #14:

score: 27
Accepted
time: 1ms
memory: 3676kb

input:

100 100 2
GGCAAGCCAGAAACGCAACAGCCCACCGAACAGCCGCGAGGAGAGAGACCACCCACAGAAGACGCACCACACACGAGGCGGGCAGCCAAGCCCAGAGAGG
GGCAAGCCAGAAACGCAACAGCCCACCGAACAGCCACGAGGAGAGAGACCACCCACAAAAGACGCACAACACACGAGGCGGGCAGCCAAGCCCAGAGAGA
GACAAGCCAGAAACGCAACAACCCACCGAACAGCCACGAGGAGAGAGACCACCCACAGAAGACGCACCACACACGAGGCGGGCAGCCA...

output:

47

result:

ok single line: '47'

Test #15:

score: 27
Accepted
time: 1ms
memory: 3744kb

input:

100 100 60
ACCCAAAGACGAGCTATCCAACAAAGTTTTCCGGCGCAATTGGCGCCGTCTTCCCTCACCGCTAGGGAGCAACGGTCCTGGAGCTCGCCGCGATTAGCAA
GTGACCCACGCATCGGTACGGAATCAAATAGGCGTTCTGCTGCGCAATGACGTGCGGTGCCCTCACTCACCTCTGATTAGACATCCAGGGTGGATTACTG
TTACAATGCACGCTCGTACTGGGTTAACTGAAGCCGTCCAGTTGCACTGCACTCCCGAAAGGTACCTGGCGAGAGTACTAGCGTTCC...

output:

86

result:

ok single line: '86'

Test #16:

score: 27
Accepted
time: 0ms
memory: 3880kb

input:

100 10 5
GGGGGAGACA
AAGGGCCCAG
AGCAAGCCGC
GGCGGAGGCC
GCCGGGACAC
AGAGAGCCGG
GGGGACGAGC
AGCGCAAACG
AAGGCGGCGG
AACCCAACCC
GGGGACGGGC
AGACCGGCGC
AGAGGGGAGG
AGGCCGCAGC
CAAGAAAAGC
AGAGCAAGAA
AGAGGAGACG
CGGACAGCGG
CGCCGGACGA
ACGCGAGCCG
AACGCAAGCC
ACGGCAAACG
CGAGCGAAGC
ACGGCACGCC
AGAAAAGGGC
CCGGGACAAC
AGCGG...

output:

68

result:

ok single line: '68'

Test #17:

score: 27
Accepted
time: 0ms
memory: 3676kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'

Subtask #2:

score: 19
Accepted

Test #18:

score: 19
Accepted
time: 31ms
memory: 6812kb

input:

1513 1728 864
AAACCCCCCACAACAACACAACCAACAACAAACCCAAACCCACCACACAAACACAAACAAAAACCCACACACCACAAACCACACCCCCCCCAAACCACCCAACACACAACCAAACACCCACCAACAAACCAACACCAACAAACAAACCACAAAACCACACAACAACAAAAACACAAAAAACAACCACAAACCACCAACACACCACCAACAAAAACCACCACCCCAAAAAACACACACCCCACACCCCCACCCCACAACCCAACAACCAAACCCCAAACAACACAAA...

output:

1448

result:

ok single line: '1448'

Test #19:

score: 19
Accepted
time: 20ms
memory: 7380kb

input:

1799 1800 2
AACACCCACCCCACCCACAAACAAAAAAAAAACCACACCCACACCACCACACCACACAACCACCACCACCAAACCACCCCCCAAACACAACCAACCCCACAACCACCCAAACCAACACCAACCACACCCCAACACCAACACCAAACACAACAAAAAACACACCAACCCACAACCACAAACCCCCACACCACCAAAACACACCAACCAACACCACCAAACCACCCACACACACCACCCAACCACAACCACAAAACACAAACAACCCCCCACCAAACCCCCCCCCCCCCC...

output:

1245

result:

ok single line: '1245'

Test #20:

score: 19
Accepted
time: 37ms
memory: 7168kb

input:

1718 1800 864
ACCCAACCACAACCCAACACACAACACACAAAAAAAAAAAAACAACAACCCACCACACACCACCCACACCACAACCCAACACCACCAACCCCCCACCCCAAAAAACAAACACACCACACCACAACCAAACCCCAACCACCAACAAACCACAAAACCAACCAAAACCCCACAAACCAAACCACACAAACAAAACCACAAACACCCCAACACCCAACCCACCCACACCCACAAAACCCCAAACCACCCCCAAACCAAAAAAACCAACCCCACAACAACCCACCAACCC...

output:

1709

result:

ok single line: '1709'

Test #21:

score: 19
Accepted
time: 8ms
memory: 5008kb

input:

1151 576 288
AACAAAACCAACCAACCACCAAAAAACAAAACAAAACCCCAAAAAACAAAACACCAACCCAACAACAAACCCCAAAAAACCAAACCCAACACCACCCAACCCCCACACAACACCCCCCACAAACAACAACCCCCCCCACACCCCACAACCCCCACAACCACAACAACACCCAACAAAACAACAACAAAAAAACACCCCCACCCCAAACCAAACAAACACCCCCCCACCCCACAAAAAAAACACAACAAACAACCCCAAAACACCACAAAAACAAAACACACACCAAC...

output:

1007

result:

ok single line: '1007'

Test #22:

score: 19
Accepted
time: 12ms
memory: 7612kb

input:

1799 1800 512
AAACCAACCCCCCAACCACCACCAAACCCACCACCAACCACCAACACCCACAACCAACCACCACACACCCACCCACACCACCCAACAACCAAAACCACCACCAAACCCCACCAACCAACCAACCACCACACCCCACCCCCACACCAAAACCAACACCCAAAAACCAACCAACACAACCCCCAAAAACCAACAAAAAAACAAAACCAAAACCCACCAACACAAAAAACAAACCAAAAACACCCCCCAACAAACCCCAACAACACAAACCCAACCACACAAACACAAC...

output:

172

result:

ok single line: '172'

Test #23:

score: 19
Accepted
time: 22ms
memory: 7428kb

input:

1799 1800 512
CCCCAACACCCCACCAACCACAAACCCAAAAAAAAAAACCAACCCACCCACAAACCCCCCAACCCAAAACCCCCCCCCCACACACACAAACACCAACAAACCAAAACCAACACACAAAAACAACCACAACAACAAAAAAAACAACACCACCAACAAACACAACAACACAACCCACAAACCAAACCAACAAACAAACACAACACCCACAACACACACACCACACCCCCCCCCCAACCAACCCAAAACAACAACAAACCACAAACAAACACCACACACAAAACAACAA...

output:

646

result:

ok single line: '646'

Test #24:

score: 19
Accepted
time: 15ms
memory: 5432kb

input:

767 1800 704
CACAAACCCACACACCCCCCCACACAAACCACAACCACCCCCACCCACACCCAACACCAAACCCACCACAACCCAAAAACACCCACCCAACCCCCACAAAAACAACAAAACCACAAAACCAAACCAAACCCAAACAACCCAAAAAACCAACAAAAAAACCACAACCACACCACACAACAACACCACACACAACAACCAACCAAAACCACCACACCCCACAAAACCCCACCCACACAAAAACCAAAAACCACAAAACCAACAACACCCACCAAAACAACCCACCCCCA...

output:

698

result:

ok single line: '698'

Test #25:

score: 19
Accepted
time: 13ms
memory: 5388kb

input:

767 1800 194
AACAAAACCCACCACAAACCCCACCCAACACCCCACACACAACAAAAACAACAAAAACAAAAAACCCCAAACAACCCAAACACCACCACCCCAAAACAAACCCACACCACAAAACAACCCCAAACACACAAACAACCCAACCAAACACCCCAACACCCCACACAAACACCCCCAAAAACACACACCACCAAAAACCAACCCACAAAAAACACAACAAAACAACAACAACCCCACCCAAAAACAACCACCCACAAACCAACAAAAACAAAAACCAAACAACCAAACAA...

output:

610

result:

ok single line: '610'

Test #26:

score: 19
Accepted
time: 13ms
memory: 7436kb

input:

1728 1728 864
ACACCCACCACCAACCCACACCCCCCACACACCCACCAACCCCCCCCAAACCCCCAAACAACCACCAAAACAAACCCAACAACACCCCCACACAAAACAAAAACCCCCCACCACAACAAAACAAAACAAACCCCACCACCCAACCAACAAACAAACACCAAAAAACAAAACCACCAACCAAACCCACACCACACCAAACCACACAACAAACCCAACAACCACAAAAACCCACCCCACAACCACCCACCAACACCAAAAACACCCACCCCCACAAAACACCAACCAA...

output:

39

result:

ok single line: '39'

Test #27:

score: 19
Accepted
time: 26ms
memory: 7248kb

input:

1728 1728 864
CCCACCCAAACAAACCCCCACCCCCAACACACCCCCCCAACACCCCCAACACCAACCCAAACCACACCACAAACCACAAAACCAAACCCCCAACCCCCAACAACCCCCACAAACAAAAAACCACCAACAAACACCACCCAACACCCCCAACAAACCAACAACAACCACAAAAACCACCACCCCCAAAAACCACACCAACACCAACCACAACCCACACACCCCCCCACAACCACAAACCACAAACCCCAAACCCACCAACCAACACAAACCCACAAACCACCACACC...

output:

1277

result:

ok single line: '1277'

Test #28:

score: 19
Accepted
time: 23ms
memory: 6836kb

input:

1513 1728 864
ACCCAAAACCACCACCCACCCAACACAAACAAACAACAAAAACCAACCACAACCACCAACCACCCAACAACAAACACAACCCAACAAAACAACCCACCCACACAACCCCAAACAAAAAAAACACACACCAACAAAAAAACCACCACCACACACCAACAAACCAAACAACAAAAAAACACCAAAACACAACCCAAAACCCCACACACAACAAACCAACCACACAAAACCCAACCCCCAACACCCAACAAACACACCCAAACAACCCACCAAACCCCCCCCCCAACAA...

output:

887

result:

ok single line: '887'

Test #29:

score: 19
Accepted
time: 12ms
memory: 6688kb

input:

1521 1728 864
AAACCACCAACCCAACAAACAAAACCCACACCACCAAAAAACCCAACACCCCACACAAAACCCCCAAAACACACCCAAAAAACCAACCACCACCCAACCCAACACCCACACAACAAACAAACCCACACCAACCCACAACAACACACACCACAAAACCACCACAAAACAACCCACCAACACCAACCAAAAAAAACAACCAAAACCACCACACCACAACAACCCAACACAAAACCAAAAAACAACCCCACAACAACAACCCCACAAACCCAACAACCACACACCACAA...

output:

86

result:

ok single line: '86'

Test #30:

score: 19
Accepted
time: 16ms
memory: 6764kb

input:

1513 1728 864
CCACAAACCCACACACCCCACACCCACACCAACCCACACCCACACCACCACCAAAAAACCCACACCCCACAAAACACAAAACCACAAACAACCCACACCAAACAACACCAAACACAAACACACCCCCAACAAAAAAACCCCACAACAAAAACCCAAAACACCCAAACAACAAACAAAACCCCAAAACCCAACACCACACCACAAAAACCAAACAACACCCCACCACCAAACAACACCAAAACCAAAACACCAAACAAAAACCCCCCCCACAAACAAAAACAACAAC...

output:

388

result:

ok single line: '388'

Test #31:

score: 19
Accepted
time: 26ms
memory: 6612kb

input:

1297 1728 864
CACCAACACCCACAAACCAACAACAACCCACAAACCACCACACAACACCACCACACCCAACAAACCCACCCCCCAAACACACCCACACACCCACCAACACCCCCACCCAACACCCCAAACCCAAACCCCACCACACCACAACAAAAACAACACCCCCCAACCCAAAAACAACACCACAACAAACAACCACCAAACAACCCACCAAAAAACACAAACACCAAACCCCAACCACCCACAACAAACCCACCCCCACCACCAAAACCCCACAACACCAAAACCAAAACAA...

output:

1200

result:

ok single line: '1200'

Test #32:

score: 19
Accepted
time: 13ms
memory: 6448kb

input:

1313 1728 864
ACCACCAAAAAACCCAACAACACAAACAAACCAACAAACCAACAACCCAACCCCACACCCCCACCAACCCCCCAACCACCACCCCACCACAACAACAAAACACACACCAACCCAACACCCAACCCAACAAAACCCCAACACACAACCCAACCCAAAACCCCCCACCCAAAACCCCCACAACCCCCACACACACAACCAACAACACACCCCACACCAAACCACCACCACCACAAACACAACAAACCAAACACAAAAAAAAAACCCAAAACACCCACCCACCACCCAC...

output:

246

result:

ok single line: '246'

Test #33:

score: 19
Accepted
time: 16ms
memory: 6744kb

input:

1471 1536 768
CAACAACCACCCCCAAAACCCACACAACAACCACCCCAACCCAAAAACCCACCCCACAAACCAAAACCCCCACACCACAACCCACACCAACACACAAAACACCAACCCCCACAAAAAAAAACAAACCCCCCCAAACAACAAAAACCCCAACAACACACAAAACCAAACCCACACCCACAAACCCCACACACAAAACCCCAACCCAAAAAAACCAACCAAACAAAACACCCCCAAACAACACCAAACCACCACAAAAACCCAACCACAACAACCCCCACAAAAACAA...

output:

449

result:

ok single line: '449'

Test #34:

score: 19
Accepted
time: 27ms
memory: 7192kb

input:

1722 1800 864
ACCAACCCCCCACCCCCCCCAAACACAAAACCACCCCAAAACACACCCACCCACCAACACCCAACACCAAAACCAACCCCCCAACCCCCCCCCAAAAAACAACACCCAACCCCACACACACACCACCAACCCACCCAACCACCACCCAAACAACACCCACCACCCCCCACACAACACCCCAAACCAAAACCAAACCCAACAACCACAACAAAACCCACAAAAACCCCCCAACCAAAAAAAAACAACCAACCCCCCACACCAAAACCCAACCCCCAAAAACAAAAAA...

output:

1309

result:

ok single line: '1309'

Test #35:

score: 19
Accepted
time: 4ms
memory: 7176kb

input:

1709 1800 864
AAAAACCCCCACCCACACCCAACCAAAAAACCAACCCCACAAACCCAAACAAAACCACCCCAACAACCACAACCACCAACAAAACAACAAACACCCCACAACCCCACACACCAAAAAAACAAAACACAAAAACCCAAAACCCACCCACCAACAAAAAACCCCAACAAACCCACCCCAACCACCACCCAAACAAAACACCCCCCAACCCCCAAACCAACAAAAACAACCCCCCCCAACCAACCACCACAACACCCCCCACCCACACACACCCACAACCAAACACACC...

output:

47

result:

ok single line: '47'

Test #36:

score: 19
Accepted
time: 26ms
memory: 7128kb

input:

1724 1800 864
CAACACAACCACACCCCCAACAACCAAAACCAAACAACAACCAACAACCACCCAACAAACCCACCAACACCACAACCACAAACAAAAACCACCACCACCCAAACCAACCACCACCAAAAACAAACACCACCAAACCCAAACCACAACACACACACCAACAACCAAACCACCCACAACAAAACACACCAAACCACCACCCCCACAACCCAAAACAACAAAACACACCCCAAAAACCCAACACACACACCACACCAACCCCAACCCACCAACCCCCAAACAAAACACA...

output:

1141

result:

ok single line: '1141'

Test #37:

score: 19
Accepted
time: 14ms
memory: 7196kb

input:

1700 1800 864
CCAACCCAAAAACCCAAAAAAAAAAACCACAAAACAAACCACAAACAACACAAAACCAAACCCCAACACACACACCCAACCCCACCAACCCAAACCCCACCAACACCCCCCAACACCCACCCCCCCACAAAACAACAAAAACCAAAAACACAAAAACCACCCCAAACACACCCAAACCCCCACAACACACACAAACAACCCACCCAACCCACAACCAAACAAAAAAACACCACCCACACCCCACAACACCCCAACCAAACAAAAACAACCAAACAAACAACAAACA...

output:

318

result:

ok single line: '318'

Test #38:

score: 19
Accepted
time: 28ms
memory: 7204kb

input:

1719 1800 864
CCACCACCCAACCACCACAAACCCAACCACCCACCAAACACCACCACAAAACCACCCCACCACCAACAACCCCACCAAACACCCCCACCACACAACAAACCAAACAACACACCACCCCCAACACCCCAACAACAAACAACACCCCACAAAACAAAAAACACCCACCCAACCCCACAACACCAAAACACAACACACCCAACACCCCCACAAACAAACAAACCACCCAACACCCCAACCACAAAACCACCAACAAACCAAACAAAAACAACCAACAACCACACACACA...

output:

1101

result:

ok single line: '1101'

Test #39:

score: 19
Accepted
time: 35ms
memory: 7140kb

input:

1707 1798 864
CACAAACAAACACCCAAACACCCCCACCCCAAACACCAAAAAAACCCCCACAAAACCCACCCACAAACAACAACACCCCCCCAAAACAAACCACCAACCCACAACAAAACAACACAAACCCCCCCAACCAACCCCCCACCAAAAAACCCAACAACAAACACACAACCCAACAAAAAAACCAAACCCAACCAAAAACCACACCAACCCAAAACAAACCCCCCAACCCACCAACAACAACCAAAAACCCAAAACAACCAACAAAACCCACAACACCAACCAAAACACC...

output:

1612

result:

ok single line: '1612'

Test #40:

score: 19
Accepted
time: 33ms
memory: 7220kb

input:

1714 1800 864
AAACCCAAACCACACACAAAAACCCAACACCAAAACCCCCAACAAACCAAACAAAACCAACCCCCCACCACAAACACCCACAACACCCCCAACCCCACACCCAAAACAAACCACCCCACCAAAAAAACACCAACAACCACCCCCACCACACACAACACAAACAACCACCAAAAACAACAACCAACCCCACCACCACCACACACACCACCCAACACCCACCAACAAAAACCACACAAACCCCCAAAACCCCACAAAACAAAACCCCACCAAAACCCCACCACACCCA...

output:

1696

result:

ok single line: '1696'

Test #41:

score: 19
Accepted
time: 36ms
memory: 7448kb

input:

1713 1800 864
AAAAACAAACCACAAAAAAAACAAAAACAACCCACCAACCACAAACCCCACCCAACCCCAAACCCCCCCCAACACCACAAAACCAACACCACACCAAAAAACCCACAAAACCACCCACAAAAAACCCCACCCCACCCACAAACAAAACCAAAAAAACCCACCCAACCACCCCAACACACCAAACCACAACCAACACCCCCCCACCAAACAAACCCCACAACAACCCCAACACCCAACAAACCAAACCCAAACACCCAAAAACAACCCCCCACAACCAACACCCCAA...

output:

1632

result:

ok single line: '1632'

Test #42:

score: 19
Accepted
time: 18ms
memory: 7232kb

input:

1701 1800 864
AAAAAACACCAAACCACACCACACCCACCAACAAAACACCACACCCCAAAACACCCCACCCAAACCAACCCACCCCCAACACACACACAACAACCACCCCCAACAAACACCACCACCCCCCAAACCCCAACCCCCACCACCACAACACCAACAACAAACCCCAACACAAACCCAACACCAAACCCCCACCAACCACAAAAAACCCACCAACACCACAACCCCCCCCACCCAACACACCCCCAAACACAAACACAAAAACCCCAAACACCACCCCACAACACACCCC...

output:

382

result:

ok single line: '382'

Test #43:

score: 19
Accepted
time: 19ms
memory: 7260kb

input:

1715 1800 864
AACAACCACCCAAAAACACCCCAAACCACACAACCACCAACACCACACACCCCCCCCCAAAACAACAACAAACCCCCCACCAAACACACCCCAAAAAAAACACCAAAAACCCCCAACCAAACAAAACACACCAAACCAAAAAACAAACCCCACAAAAAACCAACCCAAACAAAAAACACCCCACCCCCAACAAAACCCCCCAAACAACCAAACCAACCAAAAAACCACACACACCCCAACCACACCCCCCAAAAAACACAACACCAACACAACAAACAACACCCCC...

output:

750

result:

ok single line: '750'

Test #44:

score: 19
Accepted
time: 22ms
memory: 7424kb

input:

1704 1800 864
ACACCAAACCAAACACCACACCCCACCCACACAACCCCCACCACCCACAAACCCACCCACCCAAAACCACACCCCACACCAAAAACCCACCCCAAAAAAACCCAAACCACACCAACACCACCCAACCCCCCCACCCACCCAAAAACACCAAAAAAAAAAACCCAACAACCACACCCACCAACACACACCCCAACAACACCAACACCCAAAACACACACCACCAAACCCAAAAAAACCAACCCACCCCCCAAAACAACACAAAAAAACAAACAACAACCACCACAAA...

output:

658

result:

ok single line: '658'

Test #45:

score: 19
Accepted
time: 22ms
memory: 7200kb

input:

1703 1800 864
CCCCCCACACAAAAACCACACCAAACCACAACACCCACACACCAACCACACCACAAAAACCAAACACACCCCCACCCACAAACACCAAACCCCCCACACACAACACCCAACCCACAAAAACACAAAACCAAAACCCAACCAAACCAACCACCCCCCCAAAACAAAAAAACCAACCCACACAAACAAACACCCACCCAAAAACACCCACAAAACACACCCCCCAACACCCCCCCAAACACACAAAAAACACAACAAAAAAACCAACCAACCAACACCAAACCCCCAA...

output:

633

result:

ok single line: '633'

Test #46:

score: 19
Accepted
time: 30ms
memory: 7456kb

input:

1714 1800 864
CACCCACCAACCACCAACCCAACACACCCACCCAACCCAAACCACCAACCCCCAAAAAAACAAACCCACACACCCCAAAACACCAACCACACACCAAACCCCACAACCCAACACACAACACCACCACCCCCCCAACCAAAAAACCCCAACAAACACCACAAACAAACCAAACCCCCAACCCACCCACAAAAAACCCACACAAAAACCCCCCACCCAACACCCCACACACCAACAACCCACAAAAAACACCAAAAACACCAACCCCCCCAACCCAAAAAAACACACA...

output:

1246

result:

ok single line: '1246'

Test #47:

score: 19
Accepted
time: 12ms
memory: 7608kb

input:

1800 1800 1
CCCCCACCCACACAAACCACCACCAACACAAACCCACCACAACACACACCACACAAAACCCCACAACAAACACCCACAACCAAAACACCACAACAAACCAAACAAAACACCAACACCCAACCCAACCCCACACAACACAAAAACCCAAAACAACACCCACCCCCAAAAACCCCAACCCCCACAACACAACCACCCCACAAACCAACCCACCAACCACAAAAAAAACCACAACACCACAACACAAACAAACAAAAAAAAACCAACAAACCACCCCAACCACCCACCCAA...

output:

335

result:

ok single line: '335'

Test #48:

score: 19
Accepted
time: 19ms
memory: 7324kb

input:

1800 1799 10
CCAAACCCAAAAACACCACCCACAACCCCCACAACCCCAACCCACCCAAAAAAAACCCCCCCAAAACCCAAACCAACACACCAACCACACCAACAAACACACACCCAAACCCCCACAAACCCAACACCAACACAACCAACACCCCCACCCCCCCCCAAAACACAACCAACCACCAAACACAAAAAACACACAAAACAACCACCAAAAACAAAACAACACAAAACCCCAAACCACCACCCAAAACCCACCCAAACAAACCCAAAACACCACCACAACCAACCCCAAAC...

output:

1017

result:

ok single line: '1017'

Test #49:

score: 19
Accepted
time: 20ms
memory: 7424kb

input:

1799 1800 1000
CACACCCCCACAACCACCAACCAAACACAACCACCACACACAAAAAAACACAACCCACACCAAACCAAACCAAACAACCCCAAAAACCCCCAACACACAAAACAACAAACCCCAAACAAACACACCACAAACAAAACCACACAAAAAACAACCAACACACAAAACCAAAAACCCAACAACACCCACAAAACACCCACAACCAACCCCCACACACACCCACCACACACCCCAAAAAAACCCACCCACAACAAACCACCACCAAACACCCAACCACCCAAACACCCA...

output:

478

result:

ok single line: '478'

Test #50:

score: 19
Accepted
time: 0ms
memory: 3720kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #51:

score: 19
Accepted
time: 1ms
memory: 3936kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #52:

score: 19
Accepted
time: 0ms
memory: 3620kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'

Subtask #3:

score: 28
Accepted

Dependency #2:

100%
Accepted

Test #53:

score: 28
Accepted
time: 106ms
memory: 30796kb

input:

3585 4096 2048
AAAACCACCCAAAACCCACACACCACAACAAACACCACCAACAAACCAACCAAAACAAAAAAACAAAACCCCACAAACACCAAAAACCCCAACCACACCAACACCCCCCCACAAACAAAACACAACCACCCACACCACAAACCCCCCCACAACACCACCCCCCCCCCCCCAACAACACACCCCACCCACACCCAACCCACAAACCCCCACCCCCCCAAAACAACAACCACCACCCCCCACCAAAAAAACACCAAACAAACCAACCAACCAACAAAAAAACACCAC...

output:

1755

result:

ok single line: '1755'

Test #54:

score: 28
Accepted
time: 89ms
memory: 34792kb

input:

4099 4100 2
CAACAACCCAAACACAACCCACCAACCACACAAACACCAACAAACAAAAAACCCACACACAAACCACCACACACACAACAAAACCAAAAACCACAACCAACAACCACACAACAAAACCCCCACCACACCACCAACCCCACCACCCAAAAACCAACCCCAAACACACACCCCCCCACACCCACAAACAACAACCCACACACACAAACAAAACCACCCAACCCCAAACCACAACACCACAACCAACAACCAACAACAAACCCACACCAACCCACCCCACACAACCACACC...

output:

1356

result:

ok single line: '1356'

Test #55:

score: 28
Accepted
time: 184ms
memory: 33900kb

input:

4001 4096 2048
CCCACCAAAACACCACACAACAAACACACCAAAAACAACCCCACCCAAAAAACAAAACCCCACACACCAAACCCACAAACAACCCCACAACCAAAAACAACCCAAAACCACACAACCAACCCCAACCACCAAACAACAAAAAACCACAAAACCCCCCCCACACACAACCACCACACAACAACACCAACCCCCACAAAAACCCCCCCCAAAACACCAAAAAACCCCACCAACCCCCAACACCAACCAAACCCACCCCACACCCCCCCAAACACCCCCACACCCACC...

output:

3856

result:

ok single line: '3856'

Test #56:

score: 28
Accepted
time: 44ms
memory: 10504kb

input:

3455 1728 864
CCAAAACCCACCACCAACCCCCACAACCACACCCACAAACACAAACCACCAACAAACAACACCAAACCACAACCAACCCCCCCCCCCAAACCCAACCCCAACCAAACCCCCCCAACCACACACCCCCACCCCACAACCAACACAAAAAAAACCAAAAAACAAAACCACACAACACAACACCCCAAAACCCCCCACACCAACCAAAAACCAACACCCACCACACCAACCAACCCAACACAAACACAACCCAACACAACAAAAACCAAACACCCCCACCCCAACCAAA...

output:

1432

result:

ok single line: '1432'

Test #57:

score: 28
Accepted
time: 143ms
memory: 34460kb

input:

4095 4100 1024
CCAACAACCAAAACACACCCCAAACCCCCCAAACCACAAAACCAACACAACCCACCCCCCACACCCAAAAACACCAACAACAACAAACCCACACAAACCCCAACAAAACAACCACAACCCAACACAACCCCAAACAACCACCACCACAACACCCCCACCCACACACCCCCCAACCACCAAACCCAACACCACCACCAAACACAACCACCCACCCACACACAACCCCCACAAACACACACAACCAAACCACCCACAACAACCCAACCACAACCCCACACAACCACA...

output:

2404

result:

ok single line: '2404'

Test #58:

score: 28
Accepted
time: 78ms
memory: 19084kb

input:

2047 4100 1536
AAACACCACCAACCAAACACCAAACAACACCCAAAAAAAAACACACAAACCAAAAAAACACCACACACCAAACACCACCACAACAACACACACACAACACCCCAACCACAACCACCAACAAACCACCCCAACACCCACCAACCAACAAACAACACAACAACCAAAAACCCACCACCACAACCCACAAAACACAAACACACCCCAAAACCAAACCCACCACAAACACCCAACAAACCACACCACAACCCCAAACCACACACCACACCACACACCCAACCCAACACA...

output:

1340

result:

ok single line: '1340'

Test #59:

score: 28
Accepted
time: 63ms
memory: 19136kb

input:

2047 4100 514
CCAACCCCCACCAACACCACCCCAACCACCCAAAAACCAAACCACACCAAACCACCAAAAAAACAAAACCCCCCCCCAACAACCCCACCACCAAAACACAAACAACCACAACCCAACAACCACCACCCACCCAAAACAAACCACAACAACCACACAACACCAAACCAACCCACCACAACCCCCACCAACCAACCAAACACCAAACACCCCCCAAACCAACCCAACAACCACAAAAACCAAAAAACCCACACACCAAACCAAACAACCCCCCACAACACACAACACA...

output:

779

result:

ok single line: '779'

Test #60:

score: 28
Accepted
time: 80ms
memory: 16756kb

input:

3456 3456 1728
CAAACAACCCCCAAACAAAACCCAACCACCCCACAAAACACACCCACCAACCAAACACCCCCAAAACAAAACCCCCACCACCAAACACCCCACAAAACAAAAACACACCCAAACCAACCCCCCCAAACCACCACAAAAACCACCCAAACACAAAACCACCACCCCAAACCAAACACACAACAAAAACCACCAAAACCCACCCCCAAAACCCCCCCCCAAACACCACAACCCCAACCCCCAACCCAAAACCACACAAAAACCAAAACCAACACCCACCAAAAAACC...

output:

749

result:

ok single line: '749'

Test #61:

score: 28
Accepted
time: 69ms
memory: 34564kb

input:

4096 4096 2048
AACCACCAACCAACAACCCCCAAAACAAACCCAACAAACACACACACCCACAACCCAACCCCCCAAACAAAACCCCCAAACCAAAAACAAAACCCACCACCCACCAACACCCCCACACAACACACAAAAAAAACAACACAAAACAAAAAAACCAACCCCCAACAAACAACAAACACCCAAACACAAAAAACCCACAACCCCAAAACCACACCCAAACAAAACCCAACACCCCAACCAACCAAAAAACACCCCCCCCAACCAAACAACAAACCCCAAACCCCCCAC...

output:

398

result:

ok single line: '398'

Test #62:

score: 28
Accepted
time: 148ms
memory: 34612kb

input:

4096 4096 2048
ACACACCCCCCCCCCCAACCACAAACAAACCAACCCCACACCAAACCACACACCCCAAACCAACAAACACCAACCAACCACCACCAAACAAACCCACACACACAACACACCCAACCACAACACCCAACAAAACCACCCAACCCCACACACAAAACCCACACCACACAAAAACAACCCCAAACACCAACACCACAACCCCACACAAAACCAACAACCCAACAACCACAACCCCAACCACCCAAAACAACCCCAAAAAACCAACAAACCAAAAACACAACCCACAAC...

output:

2535

result:

ok single line: '2535'

Test #63:

score: 28
Accepted
time: 68ms
memory: 34708kb

input:

4096 4096 2048
AAAAAACCCAACACCAACACACCACAAACCAAAACACCCAAAACAAACAACACCCACACCACCCCACCACACACAAAAAACCCAAACAAAAAAAAACACCAACACACAACACAAAACAACAAAAACAAACCCACACACCACCCACAACCACCACCACCCAACAACACACACAAACCCACACAACACCACCACAAACACACACAAACACCCCACCCCCAAACACAAAACAAACACCCCACCACCACCCAAAAAACACAAAAAACACCCCCCACAACCACCCCCCAC...

output:

276

result:

ok single line: '276'

Test #64:

score: 28
Accepted
time: 121ms
memory: 30688kb

input:

3585 4096 2048
CCACACCACACAAAACACCAAACCCACAACCAAACCCCCCACCCACCCCCCCCCACACAAACCACCAACACAACACCCAACAACCAACAACAAAAACCAAACCAAACAACACAACACCAACCAAACAACAAAAAACAACCACACCCCACCCCAACCCACCCCACCAACCCCCACCAAACAACCACCAACCCCCCAACCCAACCACACCCACCACCCACCACCAAAACACCCACCCCAAACACCACCCAAACAAACAAAAACAAAAAACCCCCAACCCCAAACAAA...

output:

2005

result:

ok single line: '2005'

Test #65:

score: 28
Accepted
time: 148ms
memory: 30748kb

input:

3585 4096 2048
CCACAAAACAACAAACAACAAAACCAAAAAAACACCAAAAAACCACCCACACACCAAAAACAAACACCAAACCCACACCACACCACAACCCCAACAACAACACCAACACACAACCCCCACACCAAACCAACACCCCCACAAAACAACACCACCACCACAAACAAAAAACCACACCCCCCACCACACCCAACCCACCCCACACACCACACAACACAACCCACCAAAACACAAAAAAACAAACACACCCCAACCCAACCACACACACCCCACACAAACACAACCACC...

output:

3003

result:

ok single line: '3003'

Test #66:

score: 28
Accepted
time: 60ms
memory: 26884kb

input:

3073 4096 2048
CCCCACAACCACCCAACACAAACCAACAACCCCACCCCAAAAAAAACACCCACACAAACCACCCAACCCAACCCCCCACACCCCAAAACACCACAACCCAAAAACAAACCCAAACCCAAAACCCCAACACCCCACACACACACACACACCACCCCAACACACCAAACCACCAAAACAAACAACCAACCACCAAAACAACACCCACACACCACACACACACCCCACAACCCAACCACCACCCCCCCAACCACCAACCAAACACACAACAAAACCCCCAAAACCCCC...

output:

475

result:

ok single line: '475'

Test #67:

score: 28
Accepted
time: 120ms
memory: 26872kb

input:

3073 4096 2048
ACCCACACACCCACACCACCCACCAAACCCCCCAAACACACACCACCACAACCCCACAACAACACCAACCCAAAACCAAACAAAACAACAACCCAAAACAAAAAACACACCCACCCAACAACACCACAAAAACCCAAACCACCAACCAACCCACCCCCCACAACCCCCCACACCACCAACCACCCCCCCACCCCACACACACCACCCCAACAACAACCCCCACCACCACAACCCACAACACCACACCAACCCCCCCCCAACCCACAAACACCAACCCCAACAACA...

output:

2438

result:

ok single line: '2438'

Test #68:

score: 28
Accepted
time: 130ms
memory: 29768kb

input:

3457 4100 1728
AACCCACACCCACAAAACACCCAAAAAAAACAACCCCACCCAACACACACAAACCAACCACAAACCCAAACACCCAACACCCAACCCACCCAACACCCCACCCAACCCACCACCCCAACCACCCCACAAAACACACACCCAACACCCAAACACCCCCACAAAAAACCCAAACCAACCCCAACCAAACAAACACCCAACCCACCAACCCAACCCAACAAACAACACCCCAAACCCCCCAAAACCAACAAACACACCAACAAACCAACAAAACCCCCCACCACCAAA...

output:

2249

result:

ok single line: '2249'

Test #69:

score: 28
Accepted
time: 161ms
memory: 33932kb

input:

3994 4096 2048
AACAAAACCACCAACCACAACAACAAACACCACCCACACACACAACCAACCCACCAACAACCACCAACACACAAAACCCAACCAAACACACCAACAAAACCCACCCACCACAACACAAACCAAACCACCACAAACCCCACACAACACCCACACCCCCCCAACAACCAAAACACACCAAACACACCCCCACCAAACAAACAACCCACAAAACCAACCCCCACCCCCACACAAAAACAACCCCCAACACCCCCACACCAAACCCAACCCCCCCACCACCCAAAAACC...

output:

3180

result:

ok single line: '3180'

Test #70:

score: 28
Accepted
time: 172ms
memory: 33688kb

input:

3993 4096 2048
CCACCAAAACAACACCCCAACCAAACAACAAAAAACCCCACCAACCACACAAAAAACCAAAACCCAACACAAACACACAAAAACAACCCCACACACCAACCCAAAACCAAACAACCACCCACCCCAAAAAACCACCCCAACCAAACACACCAAACACACCAACAACCAAAACAAACACCACAACCAACAAACAACCAACCAAAACCCCAACAAACAACCCAACAAACACCCAAAAACAACCCAACAACCACCCACCAACCACACCCCCAACCCCAAAAACCAAAA...

output:

3371

result:

ok single line: '3371'

Test #71:

score: 28
Accepted
time: 57ms
memory: 33960kb

input:

4000 4000 1
CCCAACACAAAAAACAAAAACAAACCACCAAAACACACAACCCACAACCAAACAAACAACCACAAACCCCCCACCACACAACCCCCACACACAACACCCAACACCCCACACAAAACAACAACACAAACCAACAACCCAACCCCCACCCACACAAACACAACAACACAAAAACACCCCCAAAACACAAACAACCAAACCACCACAAACACAACCCAAACAACCCACCACACCAACCCACCCCCCACACACAACCCACCCAAAAACCACCCACAACCACAACCACAACCC...

output:

540

result:

ok single line: '540'

Test #72:

score: 28
Accepted
time: 134ms
memory: 33920kb

input:

4000 4000 10
AACAACAACCCAACCCCCACAAAACCACCAAAACAACACACACAAAAAACCAAACCCCACCACAACCAAACACACACAACCAAAAACAACCAACACCCCCAAACCCCAAAACACCACCCCCACCCACACAAACACCACCACCAAAACACACAACAACCCCAACCCCACAAAAAACACACAAACCACACACACACACCCCAACAAAACCAAAACCACAAACACAAACAACCACCACCCAACCCAAAACCCCCAAACCCCCCAAACAACACACACAACCACAAAACACC...

output:

3090

result:

ok single line: '3090'

Test #73:

score: 28
Accepted
time: 79ms
memory: 33920kb

input:

4000 4000 1000
ACACCCCAAAAAAAACCAACAACCCCCAAAACAACCAAACACCCCCCAAACAAACCACCCAAACACACACAACCACCAACACACCCCAACAAAACACCAAACAACCCAACCCACCACACACCCCCAACACCACAACACCAACACCCACAACAACCAACCAACCACCAACCACCACAACAACCAAAAACCCACAAACCACACAAACAAACAACACCCCACCCCCCCCAAACCCCCCCAACAACCAACACCCCCACACACCACCACCAACAAAAAAACCCAACCAAA...

output:

489

result:

ok single line: '489'

Test #74:

score: 28
Accepted
time: 184ms
memory: 33848kb

input:

4007 4096 2048
CCCCCCCCCCAAAACACCAACCCACAAACCCCCCCCCACACACCACAACAAAAAAAACACACCACCCCCCCCACACAACCACCCCACACCCCCAACAAACCAAAAAACACCAACCCACCCACCAACCCCCCACCCCCAAAAAACACCAAACCAACCCCACCACCCAACAACAACCCACCACCCAACACACCCAAACAACCAACCAACAACCAACCACCCAAACACACAAACCCAACAAAAACCCACAACCCAACACACACCCCCACAAACAAAAACAACCACCAC...

output:

3921

result:

ok single line: '3921'

Test #75:

score: 28
Accepted
time: 127ms
memory: 33940kb

input:

4007 4096 2048
CCACCCCCAAACAAACACAACACACCCAAACAAACAACAACACAAACCCAACCAACCAAACAACCCCCCCACAACACACCCAAAACCACAACAACCCAACACCCCACAACCAAAACACCACCACCACCAAACCCAAACAACCACACACCAACCCCACAACCCAACACAAACACAAAACCACCAAACAACACAAACAAAACCACCCAACACCAAAAAAACACACACCAACACCCCCAAAACACCACACCCCACCAAACAAAAAAACCACACCAAAAACACAAAACA...

output:

1940

result:

ok single line: '1940'

Test #76:

score: 28
Accepted
time: 91ms
memory: 33712kb

input:

3985 4096 2048
CCACAAACAAACCCAACACACAACCCCACACACCCAAAACAACAACCCAACCAAAAAACAACAACACAACCACACCCCCCAACAAAACACAACACCCAAAAAACCCCCACCAACCCACAACAACAAACACCCACAACAAACACCAAAACACAACCCAAACCACAACCAAACCCACCACAACCAAACAACAACACAAAAACAAACCCACACACAAAAACAACCCCCACCCAACCCAACAACACCCCCCAAACCAAACCAACAAACCCCCCCACCACAAACAACACA...

output:

1039

result:

ok single line: '1039'

Test #77:

score: 28
Accepted
time: 77ms
memory: 34000kb

input:

4011 4096 2048
CACCACCCAAACCAACCACCCCACCCACCCAACACAAAAAAAAACAAACCAACCCCCCCACCACACCACCACAAACACCACACCCCACCACCACCAACCCACCACACAACAACACACACCCCCCACCAACACAACACCCACAAACCACCACACCAAACCCAACACAACCCCCCCCCAAACAACCCACACAAACCACAAACCCAAACCAACCCCAACCACAACCAACAAACCAACCACACAACACAACCACCACAAACAAAACACCCACCCCAACAACAACAACAA...

output:

824

result:

ok single line: '824'

Test #78:

score: 28
Accepted
time: 87ms
memory: 33708kb

input:

3986 4096 2048
CACAACCACAACCACAAAAACAAAACAACACCCAAAACACAAACAACCCACACACCAACAAACCCCACCCACAACCACCCCCAAACAAACCCAAACACCACACCCCACCAACAACCAACAACAACACACCCACAACAAACACCCCAAAAAAACACACAAACAACAACCACAACCAAAACAACAAACCCACACACAACAAACACAACCCCAACACAACACACCACCCAACACAAACCCCCAACCCCCACCAACAAACCAAAACCACCACACCCAAAAACACCCAAA...

output:

1031

result:

ok single line: '1031'

Test #79:

score: 28
Accepted
time: 81ms
memory: 33588kb

input:

3969 4096 2048
AAAAACCAAACCAAACAACACCCCCCAAACCCCACAACCAACACAACCACACCCACCCAACCCAAACCACACACAAACACCCCCCACACCACCCCACAACCACCAACACACCCAACACCACACAAAAAACCCCCCCACACACAAACCCCACCCACACAAACACACCCCCAACAACACCACCCCCCACACCCCACCCCCCCCACACCCCACCACCACACCAACACACCACCACCAACACAAAAAAAAACACAACAACACCCACAACCCACCCCAACACCACCCCAA...

output:

644

result:

ok single line: '644'

Test #80:

score: 28
Accepted
time: 77ms
memory: 33908kb

input:

4005 4096 2048
CAAAACAAAACAACAAAAACCCCACCAACAACACCACCAAAACAACACCCCCAACAACCCCCCCACCACACACAACCCCCCCAAACACAAACCACACAAACAAACCAACAAAAACCCACCCCACCAAAACCAAACAAACAAACACACCAAACCACCCACCCACAACACCACAAACACAACACCCACCACACCCAACACCCACACCCACACAAAAACCCCACAAAACACACACCAAACCCCACCCACCAACAACCCCCACCACACAAACACCAAACACACAAACCC...

output:

330

result:

ok single line: '330'

Test #81:

score: 28
Accepted
time: 80ms
memory: 33744kb

input:

4002 4096 2048
AACAACAACACCAACCCCCCCCCAACAACAACCCCCAAACCCAACCACACCCCCCAAAAAAACCCCAAAACCAAACAACCAACACAAAACCACACACCACAACAAACCCACCCACACCCCCCCCCACCCCACAAACAAACAACCCCCCACCCACCAAACAACCCAAAACCAACACACACCACCACCAAACACCAAAACACCCCCCCCACAACACACAAAACCACCCACCCACCCCCCCAAACACACACCAAAACACACAACCCACACACACAACAAAAACAAAAA...

output:

715

result:

ok single line: '715'

Test #82:

score: 28
Accepted
time: 159ms
memory: 33828kb

input:

3990 4096 2048
AACCACAAAAAACAAACCCAACACCCCCACCACACAACCCACACCACAACCCCAAACCACAAACACAACAAACCACCCAACAACAACCACACACACCCACACACAAACACCCACCAACACACAACAAACACCAACAACCCAAACAACACCAACCAACAAACCCCAAAAAAAAACCCCACCAAAAACCACAAACCCACCCCCACCAAAACCACCACCAACAAACACACAACCACCCACAAAACAAAAACCAAAACACACCCCCCCCACCACACACAAACCACACCA...

output:

3170

result:

ok single line: '3170'

Test #83:

score: 28
Accepted
time: 158ms
memory: 33740kb

input:

3994 4096 2048
CACACAACAACCCACCACCCACAAAACAAACACAACAAAACCCCAACCCACCCAAACACACCCAACAAACCCAAAACCACAACCCCAACAACACAAACCCAACACAAACCACCAAAACCACCCCCACACCCAAACACCCACACCAACCACCCCACACACAACCACCAACCACCCCACCCACCCACCCCAAAACAAAAAACCACACCACCCCACCAAACCCAAACCCCCCAAACCCACCACACCCCCACAACCAAACAAACCCAAACACACAAACCACCAACAACA...

output:

2818

result:

ok single line: '2818'

Test #84:

score: 28
Accepted
time: 144ms
memory: 33988kb

input:

4009 4096 2048
ACACACCAAACCACCACCCAAAACACCCCCAACACAACACCACAAACCCCACAAACAACCCCACAAACCCCACCCCCCAACAAACACCAAAACAAACCCAAAAACCACCCAAACACCCACCAAACCCACCCAAACCAAAAAACCCACACCCCCAAAACAACCAACAAAACCAAACACCAACCAACCAAACCACCAACACAAACAACCCAACCACACCAAACCCACCAAACAAAAAACAACCCCCCACCCCACCCACCAAACAACCACACCCCACAAACAACACCA...

output:

2744

result:

ok single line: '2744'

Test #85:

score: 28
Accepted
time: 121ms
memory: 33796kb

input:

4007 4096 2048
ACAAAACCCAAAACAACCACACCACAAACAACAACACCACAAAAAAAAACAACAAAACCACCAAACCACAAAACCCACCAACAACCCACCACACACAACAACAACCCCCCACCCCACCCAACCCACCCACACACAACCCCACAACACAACACACACACCACACCCAACCCCCCCCCCAAACAAAAACAACCCAAACCACCACCAACAACACCCCAACAACCCAAAACCCCAAAAACCCCACAACAAAAAAAACAACACCACAAAACACAACACAAACACCACCCA...

output:

1760

result:

ok single line: '1760'

Test #86:

score: 28
Accepted
time: 58ms
memory: 33880kb

input:

3987 4096 2048
ACAACCCAACCCCAAAAACACACAACAAACCAACACAACAAACAACACCCAAACAAAAACCACAACCCAACCCCCACCAACCCCACACCCCAAAACCACCAAACAACACCACCCACCCAAACCCCAAACACACCCCACAAAACACAAAAAACCCCACACCCCCACCAAACACCAACAACACCACAAACAAAAACCCCACAAAAAACCCCAACCCCAACCAACCAACCCCCCCCCACCCACACACACCACACCACCCCCCAAAACCCCCACACCCACAACCACCAA...

output:

154

result:

ok single line: '154'

Test #87:

score: 28
Accepted
time: 148ms
memory: 33884kb

input:

4002 4096 2048
AACACCACCACAAACCCCACCAAAACACACCCAACAACAAAACCCACCACACCAACCAACACACAAAAAACACACCCCAACCAAAAACCCCCCCACACCCACCCACCACCACCACAAAAACAAACCCCAACAACCACACAACAACCACCCCAACAACCCAAAACCCCCAAAACAAACCACCAAAACAACACCCAACCAACCCAACCACACCAAAACAACCCCAAAACAAACACAAAAACCAAACACCACACAAACCCCACCACCCCCCACACAACACCCAAAAAC...

output:

2751

result:

ok single line: '2751'

Test #88:

score: 28
Accepted
time: 126ms
memory: 33904kb

input:

3985 4096 2048
CCCAACAACCAACACACACCCAAACAACCAACCCACACCCACCCCCACACAACAAACCAAAACACAACACCACAACCAAACAAACACCACAAAAACCACACACCAAAAAAAACCACCCCCACCCCAACACAACCCACCACAACAAACCCCAAACAACCACCCACCCAACCAACACCCCCAACAAAAAACAACCCCCACCCCCCACCACAACCACACAACCCACAACCACCAACCCCACACCAACACACCCACCAACCAAACCACCCCCCAACAAAAACACACAAC...

output:

1667

result:

ok single line: '1667'

Test #89:

score: 28
Accepted
time: 130ms
memory: 34032kb

input:

4017 4096 2048
CCCCACACACCCAAACAACAAACCAAAAACACCAAAAAACCAACCAACCCAACACCACCACAAACCACACCACACAACAACACACCAAACAAAACAACAACAACCAAAAACACACCCAACCCAAAAAAACAACACCCAACACACCAAACCACCCAACAAACCACACCAAAACCCAAAACCAACCAAACCCACACCCCAAAACAACCAAACACCACCACCCACAAAACACCCAAACAACCCCAACAAACCCCAACCCCCAAAACACACCACCACAACCCACCCCAC...

output:

1931

result:

ok single line: '1931'

Test #90:

score: 28
Accepted
time: 139ms
memory: 33744kb

input:

3990 4096 2048
CAAAAAAACCAACCACCCACAAACACCCCCAACCCACCCCCCAACCCACACCCACAAAAACCAACACCACCACCCACACCACACCCCACACCCAACAAAACACCCACCAAAACCACCCCACCCAACCCCACACCAACACACAACAAACAACCCAACAAAAACAAACCCACCAACCCCAAACCAACACACAAAACCAACCCACCACACACCAAAACACAAACCACCCAACCAAAAAAACCCACCACCACACCAACAACAACACAAACACCACCACACCACAAACAA...

output:

2555

result:

ok single line: '2555'

Test #91:

score: 28
Accepted
time: 0ms
memory: 3616kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #92:

score: 28
Accepted
time: 0ms
memory: 3904kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #93:

score: 28
Accepted
time: 0ms
memory: 3564kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'

Subtask #4:

score: 26
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #94:

score: 26
Accepted
time: 60ms
memory: 33008kb

input:

3878 4096 3072
CGGTTTGTAGCGGTCCGAGCCGTACGACACGCACATGTGCGACACCGGGCCAGCCATCGCAGCGCCGGGGCATTGGATATTCCTTGGGACCGTATGGTCTGTAGCATCCAATCCCCGGTAGTCTCCGTAGCGACAGTCATCCGATATCGGCACATTCAAGAGCACCGGCTGAACGGGTGAGCGGAGCAACCCACTGAGACGAAACACTGGCCGAGTCAGACTGTTATCAGTTTGGAGCCAGCATTTGACCATAGGTCTAAGCAGTAGAACCTAGAGCACTGTGAG...

output:

89

result:

ok single line: '89'

Test #95:

score: 26
Accepted
time: 98ms
memory: 34540kb

input:

4099 4100 2
TCAACATTCGTTCCCCGGTAACGGTCTTTTCTGCTATTCTTCGCAAGCTTGTTGGAATGAAGAGGGGTCACGATGCATCTGATTGCGAACGGCTGCGGGACCAATAAGCTCGGTGAAATTCACGGGGCAAATTAAAGTAACCGTATTATTTCCCATTCGAGCACCTCCTAACGCGGAGGAGGTAACCTTTAACACCGATCGGACGAGTATTTTCTTTGTACTAGATAATACAACAGGTCGATGATTAAGTAATTGGGTAGGATGCCGATAATCCATCCATCAAGTTGA...

output:

2282

result:

ok single line: '2282'

Test #96:

score: 26
Accepted
time: 212ms
memory: 34168kb

input:

4027 4096 3072
ATCATAAAATAGAAGTGTCATGGCCCGCTCCAATTCATACCACCAATTGAATTTCTAATGTTTCGGAGAATTCACAATTGTTAATTTCTGGTGCTAACGGCACGAGTTCCCCGGATTTTCGCAGTAGACACCTAGTGTTCAGTTAATGTATTTTGGCATGTGACCGAGGATCGCTAGCACAAGTCTACCCTACGTTACTGCTATGACGGTGTGGCGCTAAACGGTAGGTCTAATTCGACGATATTATCAACGAACAGACTACTCGCACCGTCTCGCGATAATCAT...

output:

4020

result:

ok single line: '4020'

Test #97:

score: 26
Accepted
time: 110ms
memory: 20184kb

input:

2188 4100 1458
CGTAAGTATGTCATCCACCCAAATCAGAACAGTCGCGGATGTACTGTCACTAGAGCAAACGGAGAGACAGGCTTAGGGATTACCATTATCTGCTAGGGATATGGCGGACAGCTCCGACGATAGGTATAAGCCCCTTAGGATTGGTAACTTGGGGGGCTCATATGGTCACTCTCCCCTGACCGGATGCGCGATGGTACGTGCGCTTAATATAGCTGTTACTGAACCACTTGCACTCCCCAAACACCTGCATACATCAACCCTTTTTTTCACGAGCAGGAACCTCCT...

output:

2133

result:

ok single line: '2133'

Test #98:

score: 26
Accepted
time: 49ms
memory: 10512kb

input:

3455 1728 864
CGCGGCCAGGAGAACGAGAGAAAAAAGACGCGGCGAAGAAGCAGCGCACCGGAAGCGAGGCAGCCAGACCCCGCGGAGCACCCGGAGGGAAGCCAGCCAGAAAACCCACCGGCCAAGGCCAGGCCGCAAGGAAACACCGACAACAAAGGGCAGGGAGGCGGCGGCGGGGGCACCAAACACGCGAAGAGCCGGCGCACAAGCACCCGCAGCAGAGCCCGCAAGAAAAGGGCACAAAGGAACAAACGCGACCGCAGCGCGCAAGGGGCCCACCCAAGACCAGGAGAGG...

output:

2057

result:

ok single line: '2057'

Test #99:

score: 26
Accepted
time: 147ms
memory: 34464kb

input:

4095 4100 1024
CAACACAAAACAAAAACACACACAAAACCCCAACCCACAACCCCCAACACCACAACACCCCAACCAACACACACCAACAACCCAACAACAACCCAACACAAAACCCCCCACCCAAACAACCCAAAACCACCAACACAACCACCCCCCACAAACAACACACACCAAAACACACCCAACCACAAACAACAAAAAACCCCACAACACCAAACCCCACAAAAAACCAAACCCACACACAAACCAAACACAAAAACAAAAACCCAACCCACCCAAACCCCACAACCAACA...

output:

2971

result:

ok single line: '2971'

Test #100:

score: 26
Accepted
time: 76ms
memory: 18976kb

input:

2047 4100 1536
GTGAATCATCGGGCCCGTCATGCAGCATTAGGGATTGTCCTCACAATACGGCCGTAGCGACTTACCGGAGCACCACTCCACGGTTGTCTAGCCCTTCAGGATTCCACATAGACTTTAGCACCTCTTTATCCAACCTCGGCACATACCAAATACATCTACAAAGGAGGCCTTTTGCTGACGCCTGCGGCCAGTTGAGATTGCGTGAGCTCTTCATGTGTCGTCGCTAAGGGCCTACCCGTAGTTATTCTCCGTGTTCCACTGAGGAGTTTGTGGCGGACTTCCTAT...

output:

1270

result:

ok single line: '1270'

Test #101:

score: 26
Accepted
time: 54ms
memory: 19164kb

input:

2047 4100 770
AGCCAGCCGCATCACGCAATACTACTTCCGCACAGGACTGCGTCCGCACAGTTGTACTATGATTGGCATCGCGCGAAACAAATGAAGACACTAGCTGCAAACTCCTCTCTAACATCCATCTCTCTTAGCAGAGTAATGAGTTGTAGAACGGTTATGATGACGTAAGTTTCCGCCCGAGGAATCGGCCGTCCGCTGGTCAAGACGTGCCCTTTGGTAGTTACGTAAGTCAGTCCTATATTATTCCCCGGTACCCAAGTCTGAAAGCTATGGCCAAATAGTCACAGAG...

output:

738

result:

ok single line: '738'

Test #102:

score: 26
Accepted
time: 66ms
memory: 16744kb

input:

3456 3456 1728
GGTCACCCTCCATGCAAGACTCAAAGAGGGTGGGCGTCACTTGCCAGGTGCATCGGATGCTTGATGAACCTGGGAGTGTTCTCAAGCAGCTAGTGAAGGCGCAAGACTTGGATGTTGTCCGTGCATGGTACATCGTGATTAAGTAAATCTAGCCCGTCCATATAGGCACTACAGCCAGCGACAGTACAGCGCTGAGTTATGCCTCCAACCACTATAGAGACCAAATTTTGTACGGCCTGACGGTTATTTATTGCAGAATTCATCATATGAGGTTGGAGCTAATTT...

output:

503

result:

ok single line: '503'

Test #103:

score: 26
Accepted
time: 103ms
memory: 34636kb

input:

4096 4096 2048
CAACACACAACACCCCACAAACCACAACCCACCACCAAAACCCACACCCCCCAAAAACCACACAACAAACCACAACCACCCCCCACCACACAAAACCCAACAAACCCAACCCCAACAACACCAAAACACCAACAACAAACACCAAACACCACAACAAAAAACAACCACACCAAACAAACCAAAAAACCCCCCAAAACCCAAAAAACAAACACACACCCCCCACCACCACAACCCAAACACCACCCCACACCAACAAACACCACCACACCCCCCACACCCACCCCC...

output:

1385

result:

ok single line: '1385'

Test #104:

score: 26
Accepted
time: 167ms
memory: 34600kb

input:

4096 4096 3072
AGACTAGAAATCGAGTTATATCTGGCGTATAACGCAGTGGTTATCTGTGAACCCTCTCTACTCTTTTCTTATTTAGGGGCAACTGAAGGTACATCGCCGCGCACGCATTCCCTAGTGAAAAGATCCTTTTAACAGTGTAGGCACGTCCGTGACCACGTCAGGTTTGTTAGCTCGCTGCACATGCAGGGGCTCGATGAACGTTAATACGCCCCCCCAGCTCTCGCCCTTAGGAGGAACCGATCCAAGTGGTTTCAATGCCTTGTTTAAGTCGGTTGCCTTTTGGCT...

output:

2891

result:

ok single line: '2891'

Test #105:

score: 26
Accepted
time: 218ms
memory: 34460kb

input:

4096 4096 3072
GATGAAGAATACTAGGATTTGACCACGCTCGCAGGGATATGGGTGCCAACCGCTACGACGCGGCATTACTAACGCTCACTCTAGTGACGATCGCTATGTGGGGTGGGTGAAAGGAGGTAAAGGCTTGTGACGCGTTAATGCACCCGACCCGAGAGGTGCCGACTTGTGACGCGTAGCCCGTCCGATCACCTAGGAGGATCAGAGCGCTCCACGCCCAATTAGTGGGGGCTGATACGCTGCATCACCGCAGTGCCCGGCTCGTTGCTCCCGCTGTCCCACTACGTC...

output:

3949

result:

ok single line: '3949'

Test #106:

score: 26
Accepted
time: 168ms
memory: 33104kb

input:

3890 4096 3072
TGTTTGCCAAATACTTAACCTGTTGGCTTATATGGTCAAGTCCGTATGATTAATTTGTGCCATGCGTCCTGGGTTTCTCCTAGAATAGGCGTACTAAGTAGAGCCAAACATTGTCGCGGACTGCCTAAAGTCATCGACAGAATCCAGCTAGTACGTCACGCACGCCCCAACAAGCGCCACTTCAACTGCGGCTATCTTCTGACTGATACAGAAGTGAGCCATTAGACACGAAAATTCACCTGACCATAGTCGAATCCGCGTCGACTCAGGCCCTCAGGGCCGGCT...

output:

3145

result:

ok single line: '3145'

Test #107:

score: 26
Accepted
time: 83ms
memory: 30824kb

input:

3585 4096 2048
CCAAACCAAACCCAACAACAACACCAACACCCCACCCCAACCCCCAACACCACAAACCCCCAACCCCCAAAACACACCCACCCCCAAAAAACCCAAAAACACAAAAAAAAACCCCACAACCAACCACCAACCACCCCCACCACACCACCCCCACAACCCACACACCCAACCCCCCAACACACCAAAAAAAAACCCCAAAAAAAAACACCAAACCCAACAAAACAAAACACACAAAAACCCAACACCCCCAAACCCACACACACCCCCAACCACAACCCAAAAACC...

output:

772

result:

ok single line: '772'

Test #108:

score: 26
Accepted
time: 109ms
memory: 26916kb

input:

3073 4096 2048
ACAAAAAAAACACACCCACCAAACACCACCACACACACCAACACACCCAAAACCAAACCCAACAACAACACACACAACCAAAAACAAACACAACACCCACAACCAACACACCCACACCAAAACAACAAAAACCACACAAAAACAAACCACCCCCAACCCCACCAAAAAAACCCCAACCAAAAAACAAACAACACCACCCAAACCACACCAAACCACAAAAAACACACCCCAACCCCCACCAACAAAACACCAACCACCCCAAACACCCCCAAAACACAACACCCA...

output:

1922

result:

ok single line: '1922'

Test #109:

score: 26
Accepted
time: 116ms
memory: 30344kb

input:

3532 4096 3072
TTATGTGCGGATCCAGCTCATTAATCTTGGATGCCAGTGCGCAGCCATGGAATCGCGTACTTGGCAGTGTACTTCAAGCGAAGTAGTGTTCTGAACATTTTTGTGCCAGTTGTCGTGGCGCAAGGAACAAATTCAGTTCTCCTATGCGGAGAACCGAAAGACCCGGCAACTCCCTCGTGTGCGAGTTCGGTCGAGGCATCGTTTACGCTACTAGACCGATCGCCGTCACCACGTGCGACCCTCGGATGTGACGGTGTAGAGCGCGCCGGAGGCCGACGGTACAGT...

output:

1866

result:

ok single line: '1866'

Test #110:

score: 26
Accepted
time: 164ms
memory: 29804kb

input:

3457 4000 1728
ACACCCGTTGATAAAGGATGGCAAGCGGCACTACGTTCGTAGACCCCAGGGAAAATCGATTGACGACTCCATAGCTACTGGATAGGTATAGTTACGACGTGTTGGGGTTATTTCGAAGCACCGTACTTTAAAATATGGGACGTTCGAACGGTTTATGCCAGTAGTGTCCGCCACAACAGTGTATAGATGTGTGCCCGCTGACAACCTGTTAGATACCGGCGTGCTCGAGCCTACCTTTCCTGGTGGAGAACGTCAATGTTCTACTCTCAATAAACGAAGTCGTAA...

output:

2977

result:

ok single line: '2977'

Test #111:

score: 26
Accepted
time: 92ms
memory: 34600kb

input:

4097 4096 2048
CGCCAAGAGCACGGGCCACGCAAACCCAGAAAACGACAGGCAGAACGCCACGCCAAGAAAACCAACGAAACGGGGGCAGAGACCGCAGCAAGAACCCAGCCCACAACCGACACGGACGCAGAGACAGGGCGCGGCGGGCGCAGAGCCCGGCCACAGGACCACCAGGGCGCCGAACCACGGCCCCGGCGACCAACCAAAGCGGCCGGGACGGACCGCCCACCCAAGCCGAACAACAAGAGAACAGAACAACGCGCAACCGACGGAGGAAAACAGGGACACGACGCA...

output:

660

result:

ok single line: '660'

Test #112:

score: 26
Accepted
time: 151ms
memory: 34200kb

input:

4044 4096 3072
TCTAGCGACAGTATTAGGCATCATGGGCTAGGAATTACAGTACTGTAAACGAGGGTAGCATAGAGGAATCTACCTACACTGGGCTTCTTCTTAGGCAACCCCTTGTAAGGGAGCGGAAATATGTGGCCCGAGTGCATGGGTGAGACACAATGTCTAAAGTACTCTCATTAATGCCGCCCCTTAAGGGAACCGTGAGTTCCTGGTTAAGCCGGCTAATCATTGATAACACGTCGATCACAAGGGCAATGTCGGGGTGTGGGGCCAGGAAGCTAAACCGCGCCAGGG...

output:

2358

result:

ok single line: '2358'

Test #113:

score: 26
Accepted
time: 105ms
memory: 33956kb

input:

4000 4000 1
GTTCCGGGGATGTGCGCGCCTCGATCTAAACGAATGGCACGATCGCTTACATGGACATGAATGCAGTGTAAGAATGCTGGATGTCGCGGTTTTGCTACGACGGCGGAACGTGGCGTATGGTCGTTTTACCCGATATGCTTATGGAACAAATACGTCGGGTTTCATGTCTTCTGTCGATTATTACCATTGCGGAAGAGCCGAGCGGGCGCCTCATGGAGCGTACACTAACGGGCTCTGTCAAACCAATAGCTGCAGTATTGGGCTCGGAGAAGCGTCGTGCAGTCTGCT...

output:

3308

result:

ok single line: '3308'

Test #114:

score: 26
Accepted
time: 60ms
memory: 33888kb

input:

4000 4000 10
AAAACACACACAACCCCCACCAAACACCCAAACAACACCAACAACAAACCACAACCCCCAACACCCAAAAACACCCAACCCCACAACCAACAAAACCAAACCACACAAAAACACCAAACACCACAACACCACACACACACCACAAAAACAAACCAACCACCCACAACCACACACACAACCAACACCACCAAACAACCCCCCCCACCCCACAACACCACACACCCCACCCACCACCCACACACAACCCCCACCCACCAAAACAAACACACACACCCACCAACCCCAAA...

output:

363

result:

ok single line: '363'

Test #115:

score: 26
Accepted
time: 169ms
memory: 33708kb

input:

4000 4000 1000
TTCGGTCCCCAATTACGTACTGCCATACAAGATATCTTGAGAATGCGAACATACCTACCACATAGGTATCTAAAGCTGTATTTTCATATGGCTAGTGATGCAGGGATGCTCATCAAGCGGCCTATAGGAGCGCGCATCTGACGTTTTGCGTCTTAGAGGGCGTATCAATGGTTTCTGCCATCCTGCGCAAGCGGCCGCCAATATGCGATACTCGTTAGCGGTTACGCCAGTGCTAACTGAAGACCTCTGGGGGGATCGAGCATGTTTATAGTCCAACTATCAACG...

output:

2947

result:

ok single line: '2947'

Test #116:

score: 26
Accepted
time: 176ms
memory: 34188kb

input:

4040 4096 3072
AACGAGCGGCGAGAGTTCTACCTCACGACCGTCTCTTGGCATTTCTCCATCATATCACCAAACAGCGAGTACGGCCACAAAAGAAACTCACATACACAGTAGCGTGCATGCTACTTTCACGATTTATACTACTGTCTAAGGAAAACCTCTAGCGTCCTCTGGTTACAAGTTTGGTGCTAGACCGTTGAAATATCCAGGGGGCTTGTACAACAGTAGGACCAGGTAGCGGTACGCACATGCCCGAAGATTCGGCCCATTATATTCCGTGTTAGTCCGCACCTGGGA...

output:

3038

result:

ok single line: '3038'

Test #117:

score: 26
Accepted
time: 166ms
memory: 34120kb

input:

4051 4096 3072
GGTGGAGCAACGCCGTGTTATATGCTCGGGAAAATATATAAAGAACCTCGTCGCTAATACGTGCTTTCTTGAGAAAGTGTGCCCGCAGAACAGTTGGATGCTGGACGTCATTAGTCCTATGTCTGGCAGGTAACCAACCATTCATGTCGTAAAGCAATTCGAGCGGAGATTCGCCCCACAAATGCTCGCAACTCTTCGGAATGCCAATCTCGAACATTTAGATGCTTTGGAGGAAGTGTTGCTCTCACGCTCGTGGATCCACGTCGCTGGGAGTGTCGGATGCAG...

output:

2672

result:

ok single line: '2672'

Test #118:

score: 26
Accepted
time: 143ms
memory: 34356kb

input:

4046 4096 3072
CGGGTCGTCGGTTCCACGCTTCCTGCCTAACCAGCAGGCGATCCACATTACAGGGCTAACATTATTTAACATAAACTCTTCGAGCACCCCGCTCGCGCACCCCTGGGCTTGGGGAAGGAGTATAACTCGTGTGATTATGGGTACTGTCGTACGATGAGAGAAAGGCATCGGCTAGCCTTGGAGCGTTGTATCATAGGGATGAAAACTTGTTTGCGACGGTCTTGAGGCACATCATGAGAATAGAATGCTTATTCTTACCCTATACCCATACCCCCTCGCAAGTAA...

output:

2366

result:

ok single line: '2366'

Test #119:

score: 26
Accepted
time: 107ms
memory: 34164kb

input:

4032 4096 3072
TTTATCTCCTTACTGGTACTGTTTCCGTTTACCTTTTGTGTGGAGTGGGAGCTACGTCTGTACGTTCCGTTGAAATCTGGGGCAACAGTGAGCTGGAGTTGTACCGCGCCTTAGATCAGTAGCTGCCGGGAAGGATACGTGCAAAGGTCATCACCCTCCCTGCATCTAACCCTGCACATGCTACCCGCTGGGAACCTTAGTGTCGTCCAGAGAGGACAAAATAATCCTGCCTCCTTCCCACGATGACTTGCAATCGGTTCGTTCTTCGGAAGGAGCATACCGATC...

output:

1603

result:

ok single line: '1603'

Test #120:

score: 26
Accepted
time: 173ms
memory: 34368kb

input:

4047 4096 3072
TTATTAGCGGTCGCTACTGATGTACATCGAAGATTCCGTATATGTCCCGGTATTTCTAACTGCCAGCGAAGCGATCGGGCAATGCCGGAATTGACGAAATGGTGGACGATAGGCGAGGTTTACACCAGGCCCACAAATCACTGGGCTCTGATCTTGCGCGCAGACCTCAGACCGATAGCAAGTACTACTAGTGCTCTCATTCTGTTTAGTCTTTGCAACATTGGCGGAAACTAATTATGTGTAGGTATTGGTGACAGCGAGAGAAGACCGGGGCGTATTCATATA...

output:

2854

result:

ok single line: '2854'

Test #121:

score: 26
Accepted
time: 106ms
memory: 30880kb

input:

3585 4096 2048
AAAACCACCCAAAACCCACACACCACAACAAACACCACCAACAAACCAACCAAAACAAAAAAACAAAACCCCACAAACACCAAAAACCCCAACCACACCAACACCCCCCCACAAACAAAACACAACCACCCACACCACAAACCCCCCCACAACACCACCCCCCCCCCCCCAACAACACACCCCACCCACACCCAACCCACAAACCCCCACCCCCCCAAAACAACAACCACCACCCCCCACCAAAAAAACACCAAACAAACCAACCAACCAACAAAAAAACACCAC...

output:

1755

result:

ok single line: '1755'

Test #122:

score: 26
Accepted
time: 81ms
memory: 34588kb

input:

4099 4100 2
CAACAACCCAAACACAACCCACCAACCACACAAACACCAACAAACAAAAAACCCACACACAAACCACCACACACACAACAAAACCAAAAACCACAACCAACAACCACACAACAAAACCCCCACCACACCACCAACCCCACCACCCAAAAACCAACCCCAAACACACACCCCCCCACACCCACAAACAACAACCCACACACACAAACAAAACCACCCAACCCCAAACCACAACACCACAACCAACAACCAACAACAAACCCACACCAACCCACCCCACACAACCACACC...

output:

1356

result:

ok single line: '1356'

Test #123:

score: 26
Accepted
time: 187ms
memory: 33892kb

input:

4001 4096 2048
CCCACCAAAACACCACACAACAAACACACCAAAAACAACCCCACCCAAAAAACAAAACCCCACACACCAAACCCACAAACAACCCCACAACCAAAAACAACCCAAAACCACACAACCAACCCCAACCACCAAACAACAAAAAACCACAAAACCCCCCCCACACACAACCACCACACAACAACACCAACCCCCACAAAAACCCCCCCCAAAACACCAAAAAACCCCACCAACCCCCAACACCAACCAAACCCACCCCACACCCCCCCAAACACCCCCACACCCACC...

output:

3856

result:

ok single line: '3856'

Test #124:

score: 26
Accepted
time: 0ms
memory: 3928kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #125:

score: 26
Accepted
time: 0ms
memory: 3704kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #126:

score: 26
Accepted
time: 0ms
memory: 3912kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'