__int128
__int128 __uint128 __int128_t __uint128_t
大小:16字节 2^128(sizeof())
2^128 39位 340282366920938463463374607431768211456
Codeblocks 无法使用,Dev C++ 可以使用,有时候比赛能用
Problem:A+B
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <time.h>
#include <string>
#include <set>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <ext/rope>
#include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
#define minv 1e-6
#define inf 1e9
#define pi 3.1415926536
#define E 2.7182818284
const ll mod=1e9+;//
const int maxn=1e2+; inline void read(__int128 &x)
{
bool f=;
char ch;
if ((ch=getchar())==EOF)
exit();
while (ch<'' || ch>'')
f|=ch=='-',ch=getchar();
x=;
while (ch>='' && ch<='')
x=(x<<)+(x<<)+ch-'',ch=getchar();
if (f)
x=-x;
} void write(__int128 &x)
{
int a[],w=,i;
bool f=;
if (x<)
f=,x=-x;
while (x)
{
a[++w]=x%;
x/=;
}
///putchar:faster
if (f)
putchar('-');
for (i=w;i>=;i--)
putchar(a[i]+'');
if (w==)
putchar('');
putchar('\n');
} int main()
{
__int128 x,y;
while ()
{
read(x);
read(y);
x+=y;
write(x);
}
return ;
}
__int128的更多相关文章
- 关于__int128
定义 __int128 n,r,g,b,T; __int128 ans; __int128 f[][]; 取最大值函数 __int128 getmax(__int128 a,__int128 b){ ...
- 关于 __int128
__int128 是 GCC 提供的扩展(extension),可以当作 128 位整数使用. 关于 __int128 和 __int128_t Normally, _t suffix means a ...
- hdu6222——佩尔方程&&大数__int128
题意 给定一个整数 $N$($1 \leq N \leq 10^{30}$),求最小的整数 $t$,要求 $t \geq N$,使得边长为 $t-1, t, t+1$ 的三角形面积为整数. 分析 根据 ...
- __int128 输入输出模板
#include <bits/stdc++.h> using namespace std; void scan(__int128 &x)//输入 { x = ; ; char ch ...
- iostream重载__int128
Normal (Naive)写法,用 string(char* ) std::ostream& operator <<(std::ostream&out,const __i ...
- HDU6719 Strassen(__int128)
HDU6719 Strassen 直接照题目模拟,数据范围最大不会超过__int128. 时间复杂度为 \(O(\log n)\) . #include<bits/stdc++.h> us ...
- __int128使用
输入输出模板: __int128无法使用cin和cout进行输入输出,所以只能自己写一个输入输出的模板: #include <bits/stdc++.h> using namespace ...
- 详解__int128
前言 如果遇到 long long 开不下的情况,可以使用 __int128 来博一把! note :__int128 仅 \(64\) 位 \(GCC G++\) 支持,不在 \(C++\) 标准中 ...
- __int128的实现
#include<bitset> #include<algorithm> #include<iostream> #include<string> #in ...
随机推荐
- valgrind 检查内存泄露
https://www.oschina.net/translate/valgrind-memcheck
- ES6 & Map & hashMap
ES6 & Map & hashMap 01 two-sum https://leetcode.com/submissions/detail/141732589/ hashMap ht ...
- React Native & Android & iOS
React Native & Android & iOS React Native & Android & iOS https://facebook.github.io ...
- crontab 从nano 转换为 vim
crontab默认编辑器为nano,不方便使用. 修改crontab默认编辑器为vi或者其他的编辑器. export EDITOR="/usr/bin/vim" ; cront ...
- LODOP安装参数 及静默安装
在cmd命令里里静默安装lodop(c-lodop不能静默安装),本人的安装文件放在D:\lodopdownload\3060\Lodop6.224_Clodop3.060,如下所示: lodop静默 ...
- JavaScript简单简介
JavaScript,男,web页面的一种脚本编程语言,1955年诞生,妻子为HTML,魔法能力是将静态页面(经过与用户交互与相应)转变为动态页面. 刚进入浏览器市场(魔界)的时候,也就是js1.0岁 ...
- Jenkins+PowerShell持续集成环境搭建(三)Web项目
1. 新建一个名字为HelloWorld.Web的Freesyle项目: 2. 配置源码管理: 3. 编译配置: 版本:选择MSBuild4 文件:D:\CI\Config\HelloWorld.We ...
- gauss——seidel迭代
转载:https://blog.csdn.net/wangxiaojun911/article/details/6890282 Gauss–Seidelmethod 对应于形如Ax = b的方程(A为 ...
- 错误代码 0x800700b7 配置错误定义了重复的“system.web.extensions/scripting/scriptResourceHandler”节
如果是运行VS时就报错,改个端口号就可以解决问题,改完以下两个地方重新运行
- maven+Spring+SpringMVC+Hibernate快速搭建
目录结构: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&qu ...