#include "testlib.h" #include #include #include const int MIN_N = 1; const int MAX_N = 100000; const int MIN_M = 1; const int MAX_M = 1000000000; const int MIN_A = 0; const int MAX_A = 998244353 - 1; int main(int argc, char** argv) { registerValidation(argc, argv); const int n = inf.readInt(MIN_N, MAX_N, "N"); inf.readSpace(); const int m = inf.readInt(MIN_M, MAX_M, "M"); inf.readEoln(); for (int i = 0; i < n; ++i) { inf.readInt(MIN_A, MAX_A, "A"); if (i + 1 < n) { inf.readSpace(); } } inf.readEoln(); const std::string s = inf.readToken(); assert((int)s.size() == m); for (const char c : s) { assert(c == 'a' || c == 's'); } inf.readEoln(); inf.readEof(); return 0; }