QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#121305 | #6188. Elliptic Curve Problem | Crysfly | TL | 2864ms | 3356kb | C++17 | 967b | 2023-07-07 21:41:00 | 2023-07-07 21:41:04 |
Judging History
answer
// what is matter? never mind.
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
#define int long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
if(f)x=-x;return x;
}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 200005
#define inf 0x3f3f3f3f
int p,l,r;
int brute(){
int res=0;
For(i,1,(p-1)/2)
res+=(i*i-l+p)/p-(i*i-r-1+p)/p;
return res;
}
signed main()
{
p=read(),l=read(),r=read();
cout<<brute();
return 0;
}
/*
1 2 3 4
*/
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3356kb
input:
11 3 8
output:
3
result:
ok 1 number(s): "3"
Test #2:
score: 0
Accepted
time: 2864ms
memory: 3336kb
input:
998244353 11451400 919810000
output:
454174074
result:
ok 1 number(s): "454174074"
Test #3:
score: -100
Time Limit Exceeded
input:
96311898227 25437319919 55129361817