//想问问这段代码哪错了
#include<iostream>
#include<algorithm>
using namespace std;
long long p[7];
void change(long long l, long long r)//转换
{
long long i;
for (i = l; i <= r; i++) p[i] = p[i] * 251 % 996 * 404 * 123;
}
void report(long long l, long long r)//找到出现次数最多
{
long long cnt = 1,i,maxc=1;
sort(p + l, p + r + 1);
for (i = l; i < r; i++)
{
if (p[i] != p[i + 1])
{
if (maxc < cnt)
{
maxc = cnt;
}
continue;
}
cnt++;
}
if (p[r] == p[r - 1])cout << maxc + 1 << endl;
else cout << maxc << endl;
}
int main()
{
long long n, m,j,i;
cin >> n >> m;
for (i = 1; i <= n; i++)cin >> p[i];
while (m--)
{
long long s, l, r;
cin >> s >> l >> r;
if (s == 1)change(l, r);
else if (s == 2)report(l, r);
}
return 0;
}
???