rt,这道题我写了一个暴力+一个不对的规律但是A了,能申请交吗
Code
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n, l, r;
int main()
{
cin >> n >> l >> r;
if (r - l <= 2e8)
{
int res = -0x3f3f3f3f;
for (int i = l; i <= r; i ++ ) res = max(res, i % n);
cout << res;
return 0;
}
cout << r % n;
return 0;
}