首页 > 其他分享 >The Super Powers UVA - 11752

The Super Powers UVA - 11752

时间:2023-04-17 20:35:38浏览次数:41  
标签:tmp begin 11752 int Powers back UVA include Super

 

求1~2^64 区间里, 有多少合法数X

合法数: X= a^b ,至少存在2个不同的a

 

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
const int N =65536+3;

 int b[int(1e6)];
 __int128_t MAX =1;
 
 void init(){
 	int i,j;
 	b[0]=b[1]=1;
 	for(i=0;i<64;i++) MAX<<=1; MAX-=1;
 	for(i=2;i<65536;i++)
 		if(b[i]==0){
 			for(j=i*2;j<65536;j+=i)
 				b[j]=1;
 		}
 }
 void sov(){
 	vector<__int128_t> v;
 	v.push_back(1);
 	for(int i=1;i<65536;i++){
 		__int128_t t = i;
		__int128_t tmp =t*t*t*t;
		for(int j = 4;j <= 64;j ++){
			if(tmp > MAX)break;
			if(b[j]){
				v.push_back(tmp);
			}
			tmp *= t;
		}	
 	}
 	sort(v.begin(),v.end());
	int m =unique(v.begin(),v.end())-v.begin();
	for(int i=0;i<m;i ++)
		printf("%llu\n",(unsigned long long)v[i]);
 }
 signed main(){
 	init(); 
 	sov();
 }
 
 
 

 

标签:tmp,begin,11752,int,Powers,back,UVA,include,Super
From: https://www.cnblogs.com/towboa/p/17327386.html

相关文章

  • 论文解读(PAWS)《Semi-Supervised Learning of Visual Features by Non-Parametrically
    论文信息论文标题:Semi-SupervisedLearningofVisualFeaturesbyNon-ParametricallyPredictingViewAssignmentswithSupportSamples论文作者:MahmoudAssran, MathildeCaron, IshanMisra, PiotrBojanowski, ArmandJoulin, NicolasBallas论文来源:NeurIPS2021论......
  • 【批处理】powershell RMDIR删除文件夹及文件报错,Remove-Item: A positional paramet
    1、场景  由于测试导致的缓存文件较多,需要删除,手动删除太慢,所以直接用命令删除 2、报错备注:没装powershell的电脑可以用的  3、处理方法cmd--%/cRMDIR/Q/SC:\Users\ADMINI~1\AppData\Local\Temp参数解释:--%,停止解析符号,告诉PowerShell停止解析其余参数,并......
  • Deeper Insights into Graph Convolutional Networks for Semi-Supervised Learning
    目录概符号说明Laplaciansmoothing代码LiQ.,HanZ.andWuX.Deeperinsightsintographconvolutionalnetworksforsemi-supervisedlearning.AAAI,2018.概本文分析了GCN的实际上就是一种Smoothing,但是如果层数过多就会导致over-smoothing.符号说明\(\mat......
  • 关键字:super
    关键字:super在Java类中使用super来调用父类中的指定操作:super可用于访问父类中定义的属性super可用于调用父类中定义的成员方法super可用于在子类构造器中调用父类的构造器注意:尤其当子父类出现同名成员时,可以用super表明调用的是父类中的成员super的追溯不仅限于直......
  • this与super
         对象实例化时,至少有一条从本类出发抵达Object的通路,而打通这条路的两个主要工兵就是this和super,逢山开路,遇水搭桥。但是this和super往往是默认无闻的,在很多情况下可以省略,比如: · 本类方法调用本类属性 · 本类方法调用另一个本类属性 · 子类构造方法......
  • powershell下哪个才能正确的安装exe文件?
    Start-Process-FilePath"D:\360Downloads\software\WPS-Office_11.1.0.13703.exe"-VerbrunAs-ArgumentList'/s','/v"/qn"'Start-Process-FilePath"D:\360Downloads\software\WPS-Office_11.1.0.13703.exe"......
  • 论文解读( FGSM)《Adversarial training methods for semi-supervised text classificat
    论文信息论文标题:Adversarialtrainingmethodsforsemi-supervisedtextclassification论文作者:TaekyungKim论文来源:ICLR2017论文地址:download 论文代码:download视屏讲解:click1 背景1.1 对抗性实例(Adversarialexamples)通过对输入进行小扰动创建的实例,可显著增加机器......
  • Linux VS Powershell by ChatGPT
    CommandLinuxExamplePowerShellExampledstatdstat-taGet-Counter'\Processor(_Total)%ProcessorTime'sarsar-u110Get-Counter'\Processor(_Total)%ProcessorTime'slurmsbatchscript.shStart-Processpowershell.exe-A......
  • 迁移学习()《Attract, Perturb, and Explore: Learning a Feature Alignment Network fo
    论文信息论文标题:Attract,Perturb,andExplore:LearningaFeatureAlignmentNetworkforSemi-supervisedDomainAdaptation论文作者:TaekyungKim论文来源:2020ECCV论文地址:download 论文代码:download视屏讲解:click1摘要提出了目标域内的域内差异问题。提......
  • 迁移学习《Cluster-Guided Semi-Supervised Domain Adaptation for Imbalanced Medica
    论文信息论文标题:Cluster-GuidedSemi-SupervisedDomainAdaptationforImbalancedMedicalImageClassification论文作者:S.Harada,RyomaBise,KengoAraki论文来源:ArXiv2March2023论文地址:download 论文代码:download视屏讲解:click1摘要一种半监督域自适应方法,......