随笔分类 -  大数

摘要:题目 平面上存在n(1e15)条直线。请问n条直线在平面上最多存在多少交点。 解法:分析可知数据范围会爆64位但又在128位以内,使用__int128。 __int128有定义但没有输入输出等操作,需要手写。 #include<bits/stdc++.h> #include <cstdio> #in 阅读全文
posted @ 2020-06-03 17:14 无名菜鸟1 阅读(387) 评论(0) 推荐(0)
摘要:I - If We Were a Child Again UVA - 10494 “Oooooooooooooooh! If I could do the easy mathematics like my school days!! I can guarantee, that I’d not mak 阅读全文
posted @ 2019-07-17 21:12 无名菜鸟1 阅读(504) 评论(0) 推荐(0)
摘要:H - Product The problem is to multiply two integers X, Y. (0<=X,Y<10250) Input The input will consist of a set of pairs of lines. Each line in pair co 阅读全文
posted @ 2019-07-17 20:53 无名菜鸟1 阅读(482) 评论(0) 推荐(0)
摘要:F - 大明A+B 话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。 现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。 Input本题目包含多组测试数据,请处 阅读全文
posted @ 2019-07-17 11:51 无名菜鸟1 阅读(231) 评论(0) 推荐(0)
摘要:1005 大数加法 给出2个大整数A,B,计算A+B的结果。 输入 第1行:大数A 第2行:大数B (A,B的长度 <= 10000 需注意:A B有可能为负数) 输出 输出A + B 输入样例 68932147586 468711654886 输出样例 537643802472 /* 1、首先ch 阅读全文
posted @ 2019-07-15 22:01 无名菜鸟1 阅读(341) 评论(0) 推荐(0)
摘要:hdu1002 题意:大数相加 #include<bits/stdc++.h> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <iostream> #include <strin 阅读全文
posted @ 2019-07-14 20:52 无名菜鸟1 阅读(196) 评论(0) 推荐(0)