QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#245913#2827. Autobiographynameless_story#Compile Error//C991.2kb2023-11-10 14:36:552023-11-10 14:36:55

Judging History

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

  • [2023-11-10 14:36:55]
  • 评测
  • [2023-11-10 14:36:55]
  • 提交

answer

#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
template<class T1,class T2> bool cmin(T1 &x,const T2 &y) { if (y<x) { x=y; return 1; }return 0; }
template<class T1,class T2> bool cmax(T1 &x,const T2 &y) { if (x<y) { x=y; return 1; }return 0; }
#define all(x) (x).begin(),(x).end()
const int N=5e5+5;
const ll inf=1e14;
vector<int> d[N];
int pool[N*2],*cnt=pool+N;
ll ksm(ll x,ll y)
{
	if (abs(x)>=2&&y>=40||pow(abs(x),y)>inf) return inf;
	ll r=1;
	while (y)
	{
		if (y&1) r*=x;
		x*=x; y>>=1;
	}
	return r;
}
int main()
{
	ios::sync_with_stdio(0); cin.tie(0);
	int n,m,q,i,j,a,b;
	for (i=1; i<N; i++) for (j=i; j<N; j+=i) d[j].push_back(i);
	while (cin>>n>>m>>q)
	{
		int ans=0;
		for (b=-m; b<=m; b++)
		{
			vector<int> cl;
			cerr<<"? "<<b<<endl;
			if (b==0)
			{
				for (int x=)
			}
			else for (int _:d[abs(b)])
			{
				for (int x:{_,-_})
				{
					ll A=ksm(x,n);
					if (A==inf) continue;
					A+=b;
					if (A%x) continue;
					A/=x;
					if (abs(A)<=m)
					{
						cl.push_back(A);
						++cnt[A];
					}
				}
			}
			sort(all(cl)); cl.resize(unique(all(cl))-cl.begin());
			for (int x:cl) ans+=cnt[x]==q,cnt[x]=0;
		}
		cout<<ans<<'\n';
	}
}

详细

answer.code:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include"bits/stdc++.h"
      |         ^~~~~~~~~~~~~~~
compilation terminated.