Код: Выделить всё
#include
using namespace std;
#define MOD 998244353
#define ll long long
int main() {
vector pre(100002);
pre[0] = 1;
for(int i=1; i> t;
while(t--) {
int n; cin>>n;
vector a(n), b(n);
for(int i=0; i>a[i];
for(int i=0; i>b[i];
ll maxa = a[0], maxb = b[0], idxa = 0, idxb = 0;
ll ans = (pre[maxa]+pre[maxb])%MOD;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79647163/its-a-question-from-codeforces-round-1028-div2-b-i-dont-know-what-error-am[/url]
Мобильная версия