/********************************
* 日期:2011-2-7
* 作者:SJF
* 题号:杭电1014
* 题目:Uniform Generator
* 结果:AC
********************************/
#include <stdio.h>
int main()
{
long int STEP,MOD;
while(scanf("%ld%ld",&STEP,&MOD)!=EOF)
{
int k=1,count=1,M,N;
long int seed[100000];
seed[0]=0;
seed[k]=(seed[k-1]+STEP)%MOD;
while(seed[k]!=seed[0])
{
k++;
seed[k]=(seed[k-1]+STEP)%MOD;
count++;
}
if(count==MOD)
{
printf("%10ld%10ld Good Choice\n\n",STEP,MOD);
}
else
{
printf("%10ld%10ld Bad Choice\n\n",STEP,MOD);
}
}
return 0;
}
分享到:
相关推荐
python中uniform函数_Pythonuniform()函数使⽤⽅法⼊门 教程基础教程 Python uniform() 函数 描述 uniform() ⽅法将随机⽣成下⼀个实数,它在 [x, y) 范围内。 语法 以下是 uniform() ⽅法的语法: import random ...
针对鲁棒分块跟踪采用穷举的搜索策略以及对光照敏感等问题,提出了一种基于粒子群优化算法和Uniform LBP特征的分块跟踪方法。利用统一的局部二值模式(Uniform Local Binary Pattern)特征对光照的不变性以及计算...
Uniform_UBoot_S50-90
An Improved Uniform Identity Authentication Method.pdf
文档中详细的给出了 实现均匀设计的matlab代码,通过编写确认无误。
uniform.h,用于产生均匀分布的随机数。
发现网上对lbp降维的源码大多都是基于半径为1,采样点为8的尺度,本源码实现了不同尺度的降维工作,并提取了描述符,希望能给大家的科研工作带来便利。
在单样本人脸识别系统中,为了获得更好的人脸面部特征,提出了一种融合Uniform LBP特征和多流形判别分析(Discriminative Multi-Manifold Analysis,DMMA)的特征提取方法。对每幅人脸图像进行分块构成一个子集。...
matlab code for non uniform linear array phased array
Web表单是一个网站的重要方面,但theyrz在视觉方面往往被忽视。Uniforms可以帮助你增加一个华丽的外观和视觉效果。 例如单选按钮或选择下拉菜单,这些资源只能用简单的CSS,这通常是一件痛苦的事情。... 标签:Uniform
基于jQuery的表单美化插件:uniform
基于Uniform LBP和DMMA的单样本人脸识别.pdf
表单美化。很不错的效果。透明效果动态效果
Nonuniform sampling of nonbandlimited signals - IEEE
The main objective of this paper is to increase the complexity by novel schemes of mixing (reversible cellular automata) RCA and (non-uniform reversible cellular automata) NRCA. We apply set of ...
The purpose of this of IEC 61400 is to provide a uniform methodology that will ensure consistency and accuracy in the measurement and analysis of acoustical emissions by wind trubine generator systems...
统一资源定位符(URL,英语Uniform Resource Locator的缩写)也被称为网页地址,是因特网上标准的资源的地址。它最初是由蒂姆•伯纳斯-李发明用来作为万维网的地址的。现在它已经被万维网联盟编制为因特网标准RFC...
方开泰创立的均匀设计表程序,用来实现实验设计。
these are important file regarding Direction of arrival for Non uniform linear array.
本书围绕随机变量生成算法的预期复杂性展开。 它建立了一个理想的计算模型,引入了均匀有界期望复杂度的概念,并研究了计算复杂度的界线。