#include using namespace std; typedef long long ll; typedef string str; #define INF_LL ((1LL<<63)-1) #define MOD 998244353 int main() { const ll MAX_K = 9, MAX_A = 5, MAX_B = 34; ll nonX_freq_table[MAX_A][MAX_B] = {{}}; ll X_freq_table[MAX_A] = {}; for(ll a=0; a> nonX_freq_table[a][b]; } } for(ll a=0; a> X_freq_table[a]; else{ ll ignored; cin >> ignored; } } } for(ll a=0; a=0; k--){ for(ll a=0; a