E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
1061
POJ
1061
青蛙的约会
中文题啊中文题,每次看到都是很兴奋的~题目大意:自己看,全是中文~解题思路:对于题目可以列出:(x+m*s)-(y+n*s)=k*l; 整理得:(n-m)*s+k*l=x-ys,k为未知数。可以用扩展GCD来解。可以解的情况是当且仅当未知数系数的最大公因数可以去整除(x-y)的时候。下面是代码:#include #include #include #include #include #inclu
lin375691011
·
2014-08-08 15:00
数学
poj
刷题
POJ
1061
青蛙的约会(扩展GCD求模线性方程)
题目地址:POJ
1061
扩展GCD好难懂。。看了半天,终于把证明什么的都看明白了。。推荐一篇博客吧(戳这里),讲的真心不错。。
u013013910
·
2014-08-06 21:00
编程
算法
C语言
ACM
gcd
快速幂取模总结
intmod) { LLans=1; while(m>0) { if(m&1) ans=ans*n%mod; m>>=1; n=n*n%mod; } returnans; }练习题目:HDU
1061
hdu2035
u013013910
·
2014-08-06 10:00
编程
算法
C语言
ACM
快速幂取模
POJ——
1061
青蛙的约会
Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了
Guard_Mine
·
2014-08-05 10:00
POJ -
1061
青蛙的约会 (扩展欧几里得算法)
Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了
u011345136
·
2014-08-04 19:00
HDU -
1061
Rightmost Digit
DescriptionGivenapositiveintegerN,youshouldoutputthemostrightdigitofN^N. InputTheinputcontainsseveraltestcases.ThefirstlineoftheinputisasingleintegerTwhichisthenumberoftestcases.Ttestcasesfollow.Eacht
u011345136
·
2014-07-28 18:00
[ACM] POJ
1061
青蛙的约会(扩展欧几里得求模线性方程)
青蛙的约会TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 89206 Accepted: 15926Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见
sr19930829
·
2014-07-28 16:00
ACM
扩展欧几里得
1061
. Dating
#include #include usingnamespacestd; char*day[7]={"MON","TUE","WED","THU","FRI","SAT","SUN"}; boolishour(charc){returnc>='0'&&c='A'&&c='A'&&c='0'&&c<='9')?c-'0':c-'A'+10); break; } for(i=0;;++i) if(s[
u013827143
·
2014-07-12 20:00
poj 1085 Triangle War (状压+记忆化搜索)
TriangleWarTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 2685 Accepted:
1061
DescriptionTriangleWarisatwo-playergameplayedonthefollowingtriangulargrid
u010228612
·
2014-06-26 23:00
poj
1061
青蛙的约会(扩展欧几里得)
id=
1061
思路:设它们跳了t次相遇,那么有(x+t*m)-(y+t*n)=z*l(z是一个整数,表示它们路程差是l的z倍),变形得(n-m)*t+z*l=(x-y);令a=n-m;b=l;c=x-y
u013081425
·
2014-06-10 20:00
数学
扩展欧几里得
模线性方程
青蛙的约会
POJ
1061
青蛙的约会人生第二道ACM题,我都不知道该说神马了,中文题真不是好惹的,前几天一道递归和数组的中文题就花了我三天,这一题又花了我一个晚上的时间了!
sxb0841901116
·
2014-06-05 22:00
扩展
欧几里德算法
青蛙的约会
Win7系统启动网络共享时提示错误
1061
的原因分析
最近有朋友在windows7系统下启动网络共享的时候,无法正常启用共享访问,系统提示错误
1061
,即服务无法在此时接受控制信息,这是怎么回事呢?该怎么办呢?
佚名
·
2014-05-29 16:15
使用NDK编译的时候出现 undefined reference to
原文地址:http://blog.sina.com.cn/s/blog_5be
1061
c0100ykim.html最近一段时间在使用NDK进行编译的时候一直出现undefinedreferenceto的问题代码写的没有问题
whuancai
·
2014-05-27 12:00
NDK
Visual
Studio
nodejs出现events.js:72中抛出错误
_listen2(net.js:1039:14)atlisten(net.js:
1061
:10)atServer.listen
dqjyong
·
2014-05-25 16:57
PAT A
1061
. Dating (20)
题目SherlockHolmesreceivedanotewithsomestrangestrings:"Let'sdate! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm". Ittookhimonlyaminutetofigureoutthatthosestrangestringsareactuallyreferringtothec
xyzchenzd
·
2014-05-23 10:00
C++
pat
Pat(Advanced Level)Practice--
1061
(Dating)
Pat
1061
代码题目描述:SherlockHolmesreceivedanotewithsomestrangestrings:"Let'sdate!
u012736084
·
2014-05-06 23:00
pat
基础题
advance
扩展欧几里得定理
poj
1061
青蛙的约会中文题
u010123208
·
2014-05-01 21:00
算法
扩展
poj
HDOJ题目分类
hduoj题目分类基础题:1028、1029、1032、1037、1040、1048、1056、1058、
1061
、1070、1076、1089、1090、1091、1092、1093、1094、1095
u012846486
·
2014-04-27 15:00
poj
1061
扩展欧几里得求解同余方程
总结都写在了注释里。#include usingnamespacestd; longlongexgcd(longlonga,longlongb,longlong&k,longlong&t) { if(b==0) { k=1; t=0; returna; } else { longlongtp_gcd; tp_gcd=exgcd(b,a%b,k,t); longlongtemp; temp=k;
t1019256391
·
2014-04-23 01:00
快速幂取模
pid=
1061
求a^b的个位数字,即(a^b)mod10。int
u013081425
·
2014-04-22 10:00
数学
1061
N^N
#includeusingnamespacestd;intmain(){intn,m,s,t,i;cin>>n;while(n--) {s=1;cin>>m;// 2 4862t=(m-1)%4;//4个一循环 3 9713m=m%10; // 4 6464for(i=1;i<=t+1;i++)// 5 5555 t+
u014552756
·
2014-04-08 21:00
hdu 1097 A hard puzzle(水题,打表)
思路:思路和
1061
是一样的(点击看
1061
题解)。
ljd4305
·
2014-04-07 14:00
hdu
1061
Rightmost Digit(水题,打表)
小记:原来任意数对0取模是个RE。 思路:从0-9,每一位数字的N次方都会有一个循环节,找出这个循环节,制成表。然后输出一个就可直接输出一个了。因为只看最右边那个位的数,所以先取模保存个位,然后将输入的数对该个位数字的循环节取模,输出即可。代码:#include #include #include #include #include usingnamespacestd; #definemst(
ljd4305
·
2014-04-06 12:00
hdu poj 题目分类
/基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、
1061
ljd4305
·
2014-03-31 13:00
【BZOJ】【网络流】【刷题情况】
1001TLE
1061
AC1066AC1070AC1391None1412AC1433AC1475None1497AC1520None1532None15651585None1711None1741None1779None179718221834AC1877AC1927AC19301934AC1937203921272132216222292245AC2324AC2424AC2521None253
u012732945
·
2014-03-23 17:00
网络流
bzoj
FZU
1061
矩阵连乘 C++STL应用
Problem
1061
矩阵连乘 ProblemDescription给定n个矩阵{A1,A2,...,An},考察这n个矩阵的连乘积A1A2...An。
u013491262
·
2014-03-19 15:00
PAT (Advanced)
1061
. Dating (20)
#include #include usingnamespacestd; intmain() { strings1,s2,s3,s4; cin>>s1>>s2>>s3>>s4; intpos=0; while(!(s1[pos]==s2[pos]&&s1[pos]>='A'&&s1[pos]='A'&&s1[pos]='0'&&s1[pos]='0'&&s1[pos]='a'&&s3[pos]
hale1007
·
2014-03-04 14:00
【C++】PAT(advanced level)
1061
. Dating (20)
1061
.Dating(20)时间限制50ms内存限制32000kB代码长度限制16000B判题程序Standard作者CHEN,YueSherlockHolmesreceivedanotewithsomestrangestrings
artemisrj
·
2014-03-04 09:00
PAT
1061
. Dating
题目:http://pat.zju.edu.cn/contests/pat-a-practise/
1061
题解:代码:#include #include #include #include #include
ACM_Ted
·
2014-02-28 16:00
OCP试题疑问集-053
5.ExaminethesectionoftheHealthCheckreportgivenbelow:DBMS_HM.GET_RUN_REPORT('HM_RUN_
1061
')RunName:HM_RUN
chagaostu
·
2014-02-10 11:00
(Relax 数论1.6)POJ
1061
青蛙的约会(扩展的欧几里得公式)
/* *POJ_
1061
.cpp * *Createdon:2013年11月19日 *Author:Administrator */ #include #include usingnamespacestd
caihongshijie6
·
2013-12-10 22:00
【九度】排序整理
1007奥运排序问题1023EXCEL排序1054字符串内排序
1061
成绩排序1066字符串排序1099后缀子串排序1117整数奇偶排序1130日志排序1135字符串排序1167数组排序1185特殊排序
u013027996
·
2013-12-10 17:00
基于visual Studio2013解决C语言竞赛题之
1061
最大值和次最大值
题目解决代码及点评/* 功能:编写子函数,求一维整型数组M[10]的最大值及次最大值(次最大值可能不存在)。 主函数中输入10个整数,然后调用上述子函数,若次最大值存在,则输出最大值及次最大值, 否则输出最大值及'NO'(输出也在主程序中实现) 时间:8:552013/10/25 */ #include #include #defineN10 voidgetMaxFirst61
yincheng01
·
2013-12-10 00:00
【九度】题目
1061
:成绩排序
pid=
1061
题目描述: 有N个学生的数据,将学生数据按成绩高低排序,如果成绩相同则按姓名字符的字母序排序,如果姓名的字母序也相同则按照学生的年龄排序,并输出N个学生排序后的信息。
u013027996
·
2013-12-09 11:00
053-005
5.ExaminethesectionoftheHealthCheckreportgivenbelow: DBMS_HM.GET_RUN_REPORT('HM_RUN_
1061
') RunName:
bugbeta
·
2013-12-08 17:46
OCP
053
OCP-1Z0-053-V12.02-5题
5.ExaminethesectionoftheHealthCheckreportgivenbelow:DBMS_HM.GET_RUN_REPORT('HM_RUN_
1061
')RunName:HM_RUN
rlhua
·
2013-11-13 00:00
编译器错误C999 到 C4999查询详解(整理在此,方便以后查询)
错误 C1009错误 C1010错误 C1017错误 C1026错误 C1033错误 C1046错误 C1051错误 C1054错误 C1055错误 C1057错误 C1059错误 C1060错误 C
1061
bjtbjt
·
2013-11-06 12:00
POJ
1061
青蛙的约会
各大题解里说明了是求ax+by=c的解集使用拓展欧几里德算法可以求ax+by=gcd(a,b)的解集。设g=gcd(a,b)由于a、b、x、y均为整数,那么假如c|g则有解,否则无解可以求得a*x0+b*y0=g的一组特解x0,y0那么通过对等式两边同乘c/g可以得到a*x0*c/g+b*y0*c/g=c也就是说我们找到了一组原式的特解x=x0*c/g,y=y0*c/g。通过对原式稍加修改得到a*
zzxyyx_1
·
2013-11-04 15:00
拓展欧几里得
通解
POJ
1061
扩展欧几里德
这题纠结了好久,到现在才理解……由题意可得:(n-m)t+lp=x-y,令a=n-m,b=l,d=x-y,则得:at+bp=d,令c=gcd(a,b)即与扩展欧几里德就一样了,而一般算的是ax+by=gcd(a,b),即ax+by=c,这样据算法可以求出最小的x,(从而可以求出任意解)。而本题求的是:at+bp=d,那么可以等号两边同乘d/c(在d/c除后是整数的情况下,如果不整除那就无解),即:
u011466175
·
2013-11-02 10:00
欧几里德&扩展以及求解线性方程学习总结--附上poj
1061
解题报告
欧几里德算法:欧几里德就是辗转相除法,调用这个gcd(a,b)这个函数求解a,b的最大公约数公式:gcd(a,b)=gcd(b,a%b);并且gcd(a,b)=gcd(b,a)=gcd(-a,b)=gcd(|a|,|b|)代码:intgcd(inta,intb)//递归 { if(b==0) returna; return gcd(b,a%b); } intgcd(inta,intb)//递归简
ZYY173533832
·
2013-10-29 20:00
poj
1061
_扩展gcd
poj
1061
青蛙的约会http://acm.pku.edu.cn/JudgeOnline/problem?id=
1061
此题其实就是扩展欧几里德算法-求解不定方程,线性同余方程。
u010003835
·
2013-10-13 19:00
gcd
扩展gcd
poj
1061
(解线性同余方程)
poj
1061
(解线性同余方程)分类: 数论2013-10-1012:17 86人阅读 评论(0) 收藏 举报百度ACM编程算法数论思路:列出公式:设跳了a次后相遇,则(x+am)%L=(y+bn)%
pi9nc
·
2013-10-10 14:00
数论
poj
1061
(解线性同余方程)
思路:列出公式:设跳了a次后相遇,则(x+am)%L=(y+bn)%L(a(m-n))%L=(y-x)%L就是解同余方程a*c≡d(L);解线性同于方程:ax≡b(modn)的方程。此方程有解当且仅当b能够被a与n的最大公约数整除(记作gcd(a,n)|b)。在模n的完全剩余系{0,1,…,n-1}中,恰有d个解。对于线性同余方程ax≡b(modn) (1)若d=gcd(a,n),d 整除
aixiaoling1314
·
2013-10-10 12:00
编程
算法
数论
百度
ACM
Flex错误
1061
:调用可能未定义的方法 (通过 static 类型 Class 引用)
今天早上写了一个非常简单的FlexHelloWorld,有两个主要的文件,一个是SayHello.as文件,一个是SayHello.mxml文件,在mxml文件中调用as文件中的方法时就出现了这个错误。一直找不到原因,后来才发现是名称冲突了,我都把他们命名为SayHello,所以让编译器怎么知道哪个是哪个啊...我了个去..低级错误!把两个中的某个名称一改就ok了。
独鸣在彼岸
·
2013-10-02 08:00
Flex
调用可能未定义的方法
错误:1061
Flex项目
杭电
1061
RightmostDigitTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):26061 AcceptedSubmission(s):10018ProblemDescriptionGivenapositiveintegerN,youshouldoutput
doufei_ccst
·
2013-09-28 11:00
由缓存导致的一个java序列化问题
具体报错信息如下: [2013-09-22 17:30:53,653] - [pool-3-thread-3] - ERROR - Caught IOException decoding
1061
bytes
chenzhou123520
·
2013-09-24 22:00
java
由缓存导致的一个java序列化问题
具体报错信息如下:[2013-09-2217:30:53,653]-[pool-3-thread-3]-ERROR-CaughtIOExceptiondecoding
1061
bytesofdatajava.io.InvalidClassException
chenzhou123520
·
2013-09-24 22:00
java
由缓存导致的一个java序列化问题
具体报错信息如下: [2013-09-22 17:30:53,653] - [pool-3-thread-3] - ERROR - Caught IOException decoding
1061
bytes
chenzhou123520
·
2013-09-24 22:00
java
由缓存导致的一个java序列化问题
具体报错信息如下:[2013-09-2217:30:53,653]-[pool-3-thread-3]-ERROR-CaughtIOExceptiondecoding
1061
bytesofdatajava.io.InvalidClassException
chenzhou123520
·
2013-09-24 22:00
java
由缓存导致的一个java序列化问题
具体报错信息如下: [2013-09-22 17:30:53,653] - [pool-3-thread-3] - ERROR - Caught IOException decoding
1061
bytes
chenzhou123520
·
2013-09-24 22:00
java
上一页
14
15
16
17
18
19
20
21
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他