QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#121305#6188. Elliptic Curve ProblemCrysflyTL 2864ms3356kbC++17967b2023-07-07 21:41:002023-07-07 21:41:04

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-07 21:41:04]
  • 评测
  • 测评结果:TL
  • 用时:2864ms
  • 内存:3356kb
  • [2023-07-07 21:41:00]
  • 提交

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

output:


result: