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
HDU
1061
#include usingnamespacestd; intmain() { inta[10][4]={{0},{1},{6,2,4,8},{1,3,9,7},{6,4},{5},{6},{1,7,9,3},{6,8,4,2},{1,9}}; intb,n,num; //while( cin>>n; //{ while(n--) { cin>>num; b=num%10; if(b==0||b
xinwen1995
·
2015-05-08 11:00
ACdream
1061
(abs用法)
pid=
1061
主要是abs用法,看题目的数据longlong的最大值:9223372036854775807longlong的最小值:-9223372036854775808unsignedlonglong
chaiwenjun000
·
2015-05-06 22:00
Algorithm
测试
ACM
abs
POJ -
1061
青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 94857 Accepted: 17597 Description 两 只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止
·
2015-05-03 21:00
poj
[置顶] hdu题目分类
:基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、
1061
chaiwenjun000
·
2015-04-22 16:00
ACM
扩展欧几里得定理——POJ
1061
对应POJ题目:点击打开链接青蛙的约会TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 94409 Accepted: 17470Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问
u013351484
·
2015-04-11 22:00
POJ
1061
青蛙的约会(初遇扩展gcd--解最小正整数解)
青蛙的约会TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 94253 Accepted: 17425Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见
kalilili
·
2015-04-01 21:00
POJ -
1061
青蛙的约会
#include usingnamespacestd; #defineLL__int64 LLx0,y0; intgcd(LLa,LLb) { LLflag,r; if(b==0){ x0=1; y0=0; returna; } r=gcd(b,a%b); flag=x0; x0=y0; y0=flag-a/b*y0; returnr; } intmain() { LLx,y,m,n,l;
Ash_Zheng
·
2015-03-30 21:00
青蛙的约会(poj
1061
+欧几里德+同余方程)
**青蛙的约会**TimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:94174Accepted:17412Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的
u010579068
·
2015-03-27 19:00
欧几里德
同余方程
ACdream OJ -
1061
&& 1062 && 1098 && 1099
郭式树TimeLimit: 4000/2000MS(Java/Others)MemoryLimit: 256000/128000KB(Java/Others)SubmitStatisticNextProblemProblemDescription郭橐驼,不知始何名。病偻,隆然伏行,有类橐驼者,故乡人号之驼。驼闻之,曰:“甚善。名我固当。”因舍其名,亦自谓橐驼云。其乡曰丰乐乡,在长安西。驼业种树,凡
u014355480
·
2015-03-26 22:00
ACM
BZOJ 3265 志愿者招募加强版 单纯形
题目大意:同
1061
不过每类志愿者能工作的区间是多段这是卡网络流?
PoPoQQQ
·
2015-03-16 20:00
单纯形
bzoj
BZOJ3265
BZOJ
1061
Noi2008 志愿者招募 单纯形
题目大意:给定n天,第i天需要ai个志愿者,有m类志愿者,每类志愿者工作时间为[l,r],花费为ci,求最小花费裸单纯形。。。。。这里推荐一下wyfcyx的《线性规划与单纯形算法》http://wenku.baidu.com/view/ce5784754a7302768f99391d#include #include #include #include #include #defineINF1e1
PoPoQQQ
·
2015-03-16 19:00
单纯形
bzoj
BZOJ1061
poj
1061
青蛙的约会 【扩展欧几里得】
青蛙的约会TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 93841 Accepted: 17330Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见
u014427196
·
2015-03-10 18:00
PAT B1014或A
1061
福尔摩斯的约会
//ac了,这题有空再做一遍 //这题一开始的题意理解有问题 //哈希反向的求法 //%02d的使用 #include #include //#defineLOCAL charweek[7][5]={"MON","TUE","WED","THU","FRI","SAT","SUN"}; intmain(){ #ifdefLOCAL freopen("B1014data.in","r",stdin
daisyleedq
·
2015-02-24 09:00
C++
算法
pat
SDNU
1061
.采药3【二维费用背包】
pid=
1061
DescriptionXXX上山去采药。
a995549572
·
2015-02-08 19:00
动态规划
二维费用背包
1061
. Dating (20)
题目:SherlockHolmesreceivedanotewithsomestrangestrings:"Let'sdate!3485djDkxh4hhGE2984akDfkkkkggEdsbs&hgsfdkd&Hyscvnm".Ittookhimonlyaminutetofigureoutthatthosestrangestringsareactuallyreferringtothecoded
Yangsongtao1991
·
2015-02-02 22:00
考试
pat
浙江大学
【BZOJ
1061
】 [Noi2008]志愿者招募
1061
:[Noi2008]志愿者招募TimeLimit: 20Sec MemoryLimit: 162MBSubmit: 2066 Solved: 1282[Submit][Status]Description
Regina8023
·
2015-01-24 23:00
费用流
OI
bzoj
hdu oj
1061
Rightmost Digit (快速幂算法)
这里首先要讲解一下快速幂算法:快速幂取模算法在网站上一直没有找到有关于快速幂算法的一个详细的描述和解释,这里,我给出快速幂算法的完整解释,用的是C语言,不同语言的读者只好换个位啦,毕竟读C的人较多~所谓的快速幂,实际上是快速幂取模的缩写,简单的说,就是快速的求一个幂式的模(余)。在程序设计过程中,经常要去求一些大数对于某个数的余数,为了得到更快、计算范围更大的算法,产生了快速幂取模算法。[有读者反
u014253173
·
2015-01-17 10:00
算法
ACM
HDU
OJ
快速幂算法
【BZOJ
1061
】【NOI2008】志愿者招募 费用流神题、单纯形裸题(代码费用流)
题目模型出的真心神。需要好难才能推出来。本来打算写一篇好的题解,但是状态实在不好,没弄会这道题。只能先扒建边留个坑了。据说“单纯形算法”可以高速+裸建图水过此题(呃,或曰此题乃单纯形裸题是也。)留坑前先给个链接吧,应该是目前网上最好的此题题解:BYV大神的题解:www.byvoid.com/blog/noi-2008-employee/#more-916我的代码:#include #include
Vmurder
·
2015-01-07 18:00
费用流
单纯形
NOI2008
志愿者招募
BZOJ1061
HDU - 题目分类
基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、
1061
chenfs1992
·
2015-01-01 01:00
zoj
1061
Web Navigation (栈——基础练习)
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=61题意:模拟网站前进后退的功能。要有俩个栈——一个是back栈,一个是forward栈。BACK操作:如果(back栈为空)输出ignore。否则,把当前网页入forward栈,back栈首出栈,打印当前网页;FORWARD操作:如果(forward栈为空)输出ignore
f1024042400
·
2014-12-31 13:00
poj
1061
programp
1061
; varx,y,n,m,l,a,b,d,xx,yy:int64; functionexgcd(a,b:int64;varx,y:int64):int64; vart:int64
zz_ylolita
·
2014-12-27 12:00
杭电oj题库分类
基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、
1061
zwj1452267376
·
2014-12-23 21:00
POJ
1061
青蛙的约会 扩展欧几里得
id=
1061
分析:我们可以把经度线看成一个圆,假设两只青蛙跳了t步后相遇,那么此时青蛙A的坐标为x+mt,B是坐标为y+nt,并且满足:x+mt-y-nt=pL(其中p为正整数),整理一下得到:(n-m
AC_Gibson
·
2014-12-20 14:00
HDU -
1061
- Rightmost Digit (快速幂取模!)
RightmostDigitTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):34329 AcceptedSubmission(s):13091ProblemDescriptionGivenapositiveintegerN,youshouldoutput
u014355480
·
2014-12-14 09:00
Algorithm
C++
ACM
HDU
快速幂取模
hdu
1061
打表
背景:某水题。第一次感觉自己写的代码最优化了,毕竟hdu上0ms0k。学习:1.一看n可达1e10,显然不可硬来,乘法个位数,只和每次相乘的个位数有关,故直接把0~9打表。#include //¶Ô0~9£¬Ã¿¸öÊý×ֵĿÉÄܽá¹ûд³ö£¬µÚһλ±íʾӵÓнá¹ûÖÖÊý¡£ intstr[10][5]={{1,0},{1,1},{4,2,4,8,6,},{4,3,9,
jibancanyang
·
2014-12-11 20:00
简单
DigitalOcean的UnixBench跑分
/unixbench.sh这是我的DigitalOcean(CPU:1Core,RAM:512M)VPS跑分,居然有
1061
,非常不错。
tommyfok
·
2014-12-01 16:00
vps
DigitalOcean
Unixbench
跑分
poj
1061
青蛙的约会--扩展欧几里得
青蛙的约会TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 92405 Accepted: 16981Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见
u012866104
·
2014-11-25 17:00
POJ
1061
解题报告
这道题是ExtendedEuclideanAlgorithm的应用。可以看链接1(extendedeuclideanalgorithm):http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm链接2(Bezout'sIdentity):http://en.wikipedia.org/wiki/B%C3%A9zout%27s_identit
thestoryofsnow
·
2014-11-14 03:00
POJ
1061
青蛙的约会
青蛙的约会TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 82859 Accepted: 14426Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清
u012797220
·
2014-11-04 11:00
『转』扩展欧几里德算法求不定方程
例题是POJ
1061
青蛙的约会 题目大意是,一个周长为L的圆,A、B两只青蛙,分别位于x、y处,每次分别能跳跃m、n,问最少多少次能够相遇,如若不能输出“Impossible”此题其实就是扩展欧几里德算法
u012797220
·
2014-11-04 11:00
HDU -
1061
Rightmost Digit(数学)
题目大意:要你求出N^N结果的个位数。解析:找规律2^1=2,2^2=4,2^3=8,2^4=16,2^5=32,2^6=64......3^1=3,3^2=9,3^3=27,3^4=813^5=243......由上面可以得出一个规律,就是幂的个位数,是以4为周期的。所以要运算时要把n对4取余数,最后运算完再把结果对10取余数。注意:longlong要改为__int64#include #inc
HelloWorld10086
·
2014-11-02 15:00
HDU
digit
1061
Rightmost
HDU
1061
Rightmost Digit
分析:求n^n的个位数字首先:(a*b)%c=(a%c)*(b%c)%c,所以我们要计算:(n%10)*(n%10)*......*(n%10)%10;由于题中 n 较大一个一个算的话TLE利用分治法,每次求n^(n/2)%10,类似二分查找如:a^29=(a^14)^2*a;代码:#include #include #include #include usingnamespacestd; int
Houheshuai
·
2014-10-30 13:00
HDU-
1061
-Rightmost Digit
RightmostDigitTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):33177 AcceptedSubmission(s):12701ProblemDescriptionGivenapositiveintegerN,youshouldoutput
u014355480
·
2014-10-29 17:00
C++
C语言
水题
HDU1061
HDU
1061
_Rightmost Digit【快速幂取余】
RightmostDigitTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):33161 AcceptedSubmission(s):12696ProblemDescriptionGivenapositiveintegerN,youshouldoutputthem
u011676797
·
2014-10-28 22:00
Hduoj
1061
【数学】【快速幂取模】
/*RightmostDigit TimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others) TotalSubmission(s):32980AcceptedSubmission(s):12637 ProblemDescription GivenapositiveintegerN,youshouldoutput
u014641529
·
2014-10-21 17:00
c
NOI 2008 志愿者招募
id=
1061
神一般的建图方式。。。参考了byv大牛的博客。https://www.byvoid.com/blog/noi-2008-employee/这种建图方式让我大开眼界。。
CHCXCHC
·
2014-10-18 10:00
网络流
费用流
建图
POJ
1061
青蛙的约会 (扩展欧几里德)
本文出自:http://blog.csdn.net/svitter题意:青蛙绕圈跳,初始位置X,Y,速度M,N,方向相反,L为模。最后能否相遇?相遇时间是什么?本题目为扩展欧几里德,扩展欧几里德介绍:关于扩展欧几里德方程ax+by=c(1)可以用来求是否有解。即是否存在c满足这个方程。exgcd(a,b,x,y)是用来求ax+by=gcd(a,b)中x的值和y的值的。如果仅仅只是判断(1)是否有解
svtter
·
2014-10-17 23:00
C++
c
数论
动态规划
ACM
POJ
1061
青蛙的约会 (扩展欧几里德)
本文出自:http://blog.csdn.net/svitter题意:青蛙绕圈跳,初始位置X,Y,速度M,N,方向相反,L为模。最后能否相遇?相遇时间是什么?本题目为扩展欧几里德,扩展欧几里德介绍:关于扩展欧几里德方程ax+by=c(1)可以用来求是否有解。即是否存在c满足这个方程。exgcd(a,b,x,y)是用来求ax+by=gcd(a,b)中x的值和y的值的。如果仅仅只是判断(1)是否有解
svtter
·
2014-10-17 23:00
C++
c
数论
动态规划
ACM
hdu
1061
Rightmost Digit
RightmostDigitTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):29900 AcceptedSubmission(s):11382ProblemDescriptionGivenapositiveintegerN,youshouldoutput
svtter
·
2014-10-17 23:00
编程
C++
c
算法
编程语言
POJ
1061
青蛙的约会(扩展欧几里得)
青蛙的约会TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 91753 Accepted: 16849Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发
LYHVOYAGE
·
2014-10-17 19:00
数学
【BZOJ】
1061
[Noi2008]志愿者招募 最小费用最大流——预流&填坑
传送门:【BZOJ】
1061
[Noi2008]志愿者招募题目分析:设每个时间i都需要有至少Ai个志愿者,设每种志愿者i使用了xi个,那么我们对于每个时间点都可以列出一个不等式:x1+x2+x3+...
u013368721
·
2014-10-08 22:00
bzoj
(HDU
1061
||nefu783)&&nefu 66 求N^N的最右边和最左边的数
http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=783http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=66先说简单一点的:要求该数的最右边的一个数字我们可以发现它只和n的个位数有关,而且有一点的循环性,循环节肯定小于10,因此我们可以利用找循环节的
u013573047
·
2014-09-22 09:00
HDU
1061
Rightmost Digit
题目大意:求n^n最右位上的数字。#include#include#includeusingnamespacestd;intmain(){ intn2[4]={6,2,4,8}; intn3[4]={1,3,9,7}; intn4[2]={6,4}; intn7[4]={1,7,9,3}; intn8[4]={6,8,4,2}; intn9[2]={1,9}; intt; whi
AC_Gibson
·
2014-09-10 14:00
HDU1060 Leftmost Digit
题目大意:和
1061
看起来很相似,求n^n最左位上的数字。显然n的取值是1--1,000,000,000,直接求简直是作死。
AC_Gibson
·
2014-09-09 19:00
浙大PAT考试
1061
~1064(2013-8-30)
题目地址:http://pat.zju.edu.cn/contests/pat-a-practise
1061
:给四个字符串,前两个串第一个公共的大写字母A~G表示周一到周日,前两个串第二个公共字母0
opm777
·
2014-09-04 09:00
pat
HDU
1061
-Rightmost Digit(快速幂取模)
题目链接题意:求n^n的个位数的值。思路:快速幂求值代码:#include #include #include #include #include usingnamespacestd; typedef__int64ll; //typedeflonglongll; constintMOD=1000000000; lln; llpow_mod(llk){ if(k==1) returnn%M
u011345461
·
2014-08-29 22:00
hdu 分类
基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、
1061
u013076044
·
2014-08-27 15:00
1061
Dating
模拟题,注意审题#include #include #include #include #include using namespace std; char s1[60+5],s2[60+5],s3[60+5],s4[60+5]; vector week; int main(){ freopen("in.txt","r",stdin); week.push_back("MON"
kaneqi
·
2014-08-24 19:00
【王道九度OJ】
1061
日期差值
#include #defineisLeapYear(x)x%100!=0&&x%4==0||x%400==0?1:0//使用宏定义是否是闰年 //usingnamespacestd; intdayOfMonth[13][2]= { 0,0, 31,31, 28,29, 31,31, 30,30, 31,31, 30,30, 31,31, 31,31, 30,30, 31,31, 30,30, 3
hahawhyha
·
2014-08-24 18:00
【王道九度OJ】
1061
成绩排序
王道的第
1061
成绩排序题目#include #include #include//忘?记?写′这a句?话°了? usingnamespacestd; structstudent//为a什?
hahawhyha
·
2014-08-24 16:00
上一页
13
14
15
16
17
18
19
20
下一页
按字母分类:
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
其他