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
Exponentiation
Matlab - 基础使用
基础运算a=1/2;//0.5b=1-2;//-1c=2*pi;//6.2832d=2^3;//8常见数学函数exp:
exponentiation
(e^)abs:absolutevaluecos,sin
艾克里斯伦
·
2018-03-06 17:04
POJ 1001:
Exponentiation
这道题是鄙人试图接触竞赛圈的第一个小小的尝试(POJ1000就不算了哈),所以还是比较有纪念意义的!虽然A了很久,但在自己漫长的一点一点调试的过程中还是总结出了些许心得。思路非常简单(其实一开始没查题解的时候理解还是不对的,看来还得好好学英语),扼要概括一下就是计算机中自带的浮点类型并不能满足我们这道题对于精度的高要求,这道题需要我们输出的就是实打实的手算结果,所以我们需要做的无非就是把竖式乘法计
harry_H
·
2018-02-13 15:43
HD-ACM算法专攻系列(11)——
Exponentiation
问题描述:源码:考察对大数的计算,需要注意去除前导0与后导0.importjava.math.BigDecimal;importjava.util.*;publicclassMain{//主函数publicstaticvoidmain(String[]args){BigDecimalr;intn;Stringstr;Scannercin=newScanner(System.in);while(ci
forcheng
·
2017-10-07 15:00
ACM篇:POJ1001
Exponentiation
总结
思路:高精度浮点数乘法直接模拟。保存小数部分长度,输出时判断。作死处:天真地以为样例误少了一个0,结果是故意的。代码#include#include#includeusingnamespacestd;constintMAXL=1024;constintL=1024;intabs(intx){return(x>=0)?x:-x;}structBignum{intlen;intlf;inta[MAXL
Ace_is_my_name
·
2016-11-03 19:38
acm
poj
高精度
acm
POJ1001
Exponentiation
【高精度乘方】
题目:DescriptionProblemsinvolvingthecomputationofexactvaluesofverylargemagnitudeandprecisionarecommon.Forexample,thecomputationofthenationaldebtisataxingexperienceformanycomputersystems. Thisproblemrequ
huanghanqian
·
2016-05-30 11:00
[POJ] #1001#
Exponentiation
: 大数乘法
一. 题目ExponentiationTimeLimit:500MS MemoryLimit:10000KTotalSubmissions:156373 Accepted:38086DescriptionProblemsinvolvingthecomputationofexactvaluesofverylargemagnitudeandprecisionarecommon.Forexample,t
zhongyuansh
·
2016-05-17 19:00
POJ 1001
Exponentiation
(大数幂,还是Java大发好!需调用多个方法)
ExponentiationTimeLimit: 500MS MemoryLimit: 10000KTotalSubmissions: 156303 Accepted: 38063DescriptionProblemsinvolvingthecomputationofexactvaluesofverylargemagnitudeandprecisionarecommon.Forexample,th
hurmishine
·
2016-05-14 01:00
java
BigDecimal
POJ1001
Exponentiation
POJ1001:
Exponentiation
TimeLimit:500msMemoryLimit:10000KDescriptionProblemsinvolvingthecomputationofexactvaluesofverylargemagnitudeandprecisionarecommon.Forexample,thecomputationofthenationaldebtisataxingexperienceformanyco
utimes
·
2016-05-10 08:00
Modular
exponentiation
1.递归实现:unsignedlonglongmodular_pow_recursive(unsignedlonglongbase,intexponent,intmodulus){if(modulus==1){return0;}if(exponent==0){return1;}if(exponent&1==1){returnbase*modular_pow_recursive(base,expon
caspiansea
·
2016-04-15 00:10
Modular
exponentiation
1.递归实现:unsignedlonglongmodular_pow_recursive(unsignedlonglongbase,intexponent,intmodulus) { if(modulus==1) { return0; } if(exponent==0) { return1; } if(exponent&1==1) { returnbase*modular_pow_recursi
CaspianSea
·
2016-04-15 00:00
Fast modular
exponentiation
HowcanwecalculateA^BmodCquicklyifBisapowerof2?Usingmodularmultiplicationrules:i.e.A^2modC=(A*A)modC=((AmodC)*(AmodC))modCWecanusethistocalculate7^256mod13quickly7^1mod13=77^2mod13=(7^1*7^1)mod13=(7^1m
CaspianSea
·
2016-04-14 00:00
poj 1001
Exponentiation
(大数)
ExponentiationTimeLimit: 500MS MemoryLimit: 10000KTotalSubmissions: 154884 Accepted: 37736DescriptionProblemsinvolvingthecomputationofexactvaluesofverylargemagnitudeandprecisionarecommon.Forexample,th
liangzhaoyang1
·
2016-03-31 22:00
java
poj
Exponentiation
Exponentiation
ExponentiationTime Limit: 500MSMemory Limit: 10000K DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the
watchfree
·
2016-03-23 23:00
Modular_
exponentiation
模幂运算
https://en.wikipedia.org/wiki/Modular_
exponentiation
蒙哥马利(Montgomery)幂模运算是快速计算a^b%k的一种算法,是RSA加密算法的核心之一
ChuckLu
·
2016-03-23 00:00
hdu 1063
Exponentiation
/poj 1001
求高精度小数的n次幂。并要求结果,省去前导0,和省去小数点前0.toPlainString()转换成朴素字符串表示,防止toSting变成科学计数法。importjava.util.*; importjava.math.*; importjava.io.*; publicclasshdu_1063{ publicstaticvoidmain(String[]args){ Scannercin=n
yexiaohhjk
·
2016-02-28 22:00
HDU-1063
Exponentiation
ProblemDescriptionProblemsinvolvingthecomputationofexactvaluesofverylargemagnitudeandprecisionarecommon.Forexample,thecomputationofthenationaldebtisataxingexperienceformanycomputersystems. Thisproblem
hrr397117313
·
2016-02-03 13:00
poj_1001
Exponentiation
高精度乘法
Exponentiation
这一题的实质:考察高精度乘法。注意的点:细心!1.输入结束的判断;2.整数和小数部分的输出。下面附上代码,注释已经比较详细了。
薄帷清风
·
2016-01-24 18:07
高精度
poj_1001
Exponentiation
高精度乘法
Exponentiation
这一题的实质:考察高精度乘法。注意的点:细心!1.输入结束的判断;2.整数和小数部分的输出。下面附上代码,注释已经比较详细了。
cleopard66
·
2016-01-24 18:00
算法
pku
NOI
高精度乘法
算法之路 level 01 problem set
BProblem1214.8400001002487-32791070.6030001004FinancialManagement880.1920001003Hangover792.7620001001
Exponentiation
752.4860001006Biorhythms705.9020001005IThinkINeedaHouseboat686.54000
冯煜博
·
2016-01-21 14:00
POJ前面的题目算法思路【转】
1000A+BProblem送分题49%2005-5-71001
Exponentiation
高精度85%2005-5-71002487-3279n/a90%2005-5-71003Hangover送分题
thudaliangrx
·
2016-01-08 22:00
算法
poj
POJ 1001
Exponentiation
(高精度/大数乘法)
题目点我点我点我思路:首先处理输入的输入数中的小数点,先把小数点去掉,把原来的数存储在整型数组中,记录小数点的位置,然后再开一个整型数组存储中间结果。接下来比较简单,设数组a和数组b一开始存储输入的数,数组rec是中间数组,每次由数组rec来保存数组a和数组b的相乘结果,然后把数组rec复制到数组a,要注意每次都要对rec清零。得出结果后就是计算小数点的位置,这个由原来的位置先倒序(因为数组记录也
L954688947
·
2015-11-22 23:00
poj 1001
Exponentiation
Time Limit: 500MS Memory Limit: 10000K Total Submissions: 71191 Accepted: 16721 本题总的来说并不是很难,但是却很麻烦,我在北大上做题时wrong了n次,最终总算通过了,我不知道大牛们是怎么做的,但是我的做法的确是很麻烦
·
2015-11-13 17:01
exp
hdu 1063
Exponentiation
http://acm.hdu.edu.cn/showproblem.php?pid=1063 1 import java.math.BigDecimal; 2 import java.util.*; 3 public class Main { 4 public static void main(String []args) 5 { 6
·
2015-11-13 07:46
exp
poj 1001
Exponentiation
高精度
//这题用高精度乘法算 #include <iostream> #include <cstring> using namespace std; #define X 140 void multiply(int num[],int a[],int m) //高精度乘法运算 { &n
·
2015-11-13 03:09
exp
POJ 1001
Exponentiation
import java.math.BigDecimal; import java.util.Scanner; public class Main { public static void main(String[] args) { int n; BigDecimal a; Scanner in = new Scanner(
·
2015-11-13 02:44
exp
HDU 1063
Exponentiation
http://acm.hdu.edu.cn/showproblem.php?pid=1063 依然是高精度,和上一题很像,不过用上一题的方法一直超时?颇为费解。 查了几个函数的用法,直接用函数操作就不超时了?这题mark一下以后还要再看,对超时表示不太理解。 stripTrailingZeros()是去掉后缀0,toPlainString()是转成非指数型的字符串(上一题要知
·
2015-11-13 00:18
exp
北大ACM1001题-
Exponentiation
(求高精度幂)
从昨天开始训练ACM题目,每题尽量用C++和java编写,为了熟悉算法和java语言。 题目是这样的: 求高精度幂 Time Limit: 500MS Memory Limit: 10000K Total Submissions: 44697 Accepted: 10245 Description 对数值很大、精度很高的数进行高精度计算是一类十分常见的问题。比如,对国债进行计算
·
2015-11-12 20:15
ACM
HDU 1063
Exponentiation
JAVA水过(注:转载) import java.math.BigDecimal; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main();
·
2015-11-12 20:48
exp
hdu 1063
Exponentiation
(高精度幂)
poj这题数据很水很容易过,然而hdu的这题可能是因为case太多O(125*125*n)的复杂度TLE,最后用了快速幂的方法优化到O(125*125*logn)过了。 140MS。 View Code 1 /* 2 Author:Zhaofa Fang 3 Lang:C++ 4 */ 5 #include <cstdio> 6 #inc
·
2015-11-12 16:48
exp
HDOJ 1063
Exponentiation
简单解题报告
额,不是很喜欢这道题。。。失败了好几次,因为考虑的不详细。高进度乘法倒是没什么,吧前面的0和后面的0处理好即可。 下面是笔者的AC代码,比较难看,见谅。笔者自己也不想改了。。。==||。附带网上找到的测试数据。 #include <iostream> using namespace std; const int MA
·
2015-11-12 15:45
exp
UVA 748 -
Exponentiation
取幂运算:本题考查了浮点数高精度取幂运算,题目很简单,我的思路是浮点数作积运算小数点的位数很重要,而积的小数点的位数等于因子的小数点的位数之和,知道这一点就确定了小数点的位置了,之后再进行前后去零处理(题目要求),即可。 代码如下(有待优化): #include<stdio.h>#include<string.h>#define MAXN 20000char a[7]
·
2015-11-12 15:29
exp
杭电 1063
Exponentiation
import java.io.*; import java.util.*; import java.math.*; public class Main { public static void main(String args[]) { Scanner cin=new Scanner(System.in); int n;
·
2015-11-12 11:42
exp
poj 1001
Exponentiation
1 #include<stdio.h> 2 #include<string.h> 3 4 int n, p, len, flag; 5 char a[10],s[10], sum[200], sum2[200]; 6 7 void solve() 8 { 9 memset(sum2,0,sizeof(sum2)); 10
·
2015-11-12 10:22
exp
POJ 1251
Exponentiation
(kruskal 最小生成树)
Exponentiation
Time Limit:1000MS Memory Limit:10000KB  
·
2015-11-12 10:32
最小生成树
uva 748
Exponentiation
浮点数乘方运算 高精度水题
输入的前六位数表示一个小数,然后输入一个数表示几次方。要求用高精度算出结果。 高精度水题,主要注意处理小数点,先在输入时把小数点提取出来并记录位置,用普通乘法计算出结果后由后向前计算位置添加小数点。 代码: #include <cstdio> #include <cstring> const int maxn = 300; void Mu
·
2015-11-11 18:37
exp
1001_
exponentiation
详解1: 原创
> 总体思路: >> 先去掉小数点,输出结果时再把小数点加上 >> 大数乘法利用数组,先相乘相加再从低位开始向高位进位 > 大数乘法思路 >> 以99 * 99 为例: 9 &n
·
2015-11-11 13:40
exp
POJ 1001
Exponentiation
已经找到错误:10 100 330 这样10的倍数转换的不对 # include <stdio.h># include <string.h>int main(){ int d, n, e, ans[150]; int i, j, tmp, c; char b[6];// freopen("in.txt", "r&q
·
2015-11-11 12:35
exp
uva 748
Exponentiation
import java.util.Scanner; import java.math.BigDecimal; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); BigDecimal a; int n; while(in.h
·
2015-11-11 11:59
exp
HDU 1063
Exponentiation
(高精度)
题目链接 此题和UVA上一模一样,可是数据不一样,都很变态,UVA上是一定有小数点,而杭电上不一定,UVA上在结果为0时,输出“.”而杭电上输出0。注意这个就能AC。 UVA上AC代码这里。 1 #include<stdio.h> 2 #include<string.h> 3 int k1[201],k2[201],o1[10]; 4 int
·
2015-11-11 10:02
exp
poj1001
Exponentiation
Description Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many
·
2015-11-11 07:47
exp
HDOJ 1063 HDU 1063
Exponentiation
JAVA 编写 ACM 1063 IN HDU
pid=1063 题目描述:
Exponentiation
Time Limit: 1000/500 MS (Java/Others)&nb
·
2015-11-11 07:56
java
hdu 1063
Exponentiation
(高精度小数乘法)
//大数继续,额,要吐了。 Problem Description Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxin
·
2015-11-11 02:33
exp
POJ的题目分类(两个版本)
版本一: 简单题 1000A+B Problem 1001
Exponentiation
1003 Hangover 1004
·
2015-11-11 01:09
poj
[POJ 1001]
Exponentiation
C++解题报告 JAVA解题报告
Exponentiation
Time Limit: 500MS Memory Limit: 10000K Total Submissions
·
2015-11-11 01:31
java
Poj 1001 / OpenJudge 2951
Exponentiation
id=1001 http://bailian.openjudge.cn/practice/2951 2.题目:
Exponentiation
Time Limit: 500MS
·
2015-11-10 22:31
open
joj1483
Exponentiation
1483:
Exponentiation
Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 3s 8192K
·
2015-11-09 11:52
exp
C# 高精度求幂 poj1001
高精度求幂 public static char[]
exponentiation
(string a,int r) { char[] aa = new char
·
2015-11-08 17:55
poj
POJ 1001 解题报告 高精度大整数乘法模版
题目是POJ1001
Exponentiation
虽然是小数的幂 最终还是转化为大整数的乘法 这道题要考虑的边界情况比较多 做这道题的时候,我分析了 网上的两个解题报告
·
2015-11-08 10:16
poj
hdu 1063
Exponentiation
求实数的幂,这个用C++写的话有点长,但是用Java写就非常方便了…… import java.io.*;import java.math.*;import java.util.*;import java.text.*;public class Main{ public static void main(String arg[]){ &n
·
2015-11-07 14:56
exp
poj 1001
Exponentiation
Time Limit: 500MS Memory Limit: 10000K Total Submissions: 118340  
·
2015-11-07 14:41
poj
上一页
1
2
3
4
5
下一页
按字母分类:
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
其他