__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的更多相关文章

  1. 关于__int128

    定义 __int128 n,r,g,b,T; __int128 ans; __int128 f[][]; 取最大值函数 __int128 getmax(__int128 a,__int128 b){ ...

  2. 关于 __int128

    __int128 是 GCC 提供的扩展(extension),可以当作 128 位整数使用. 关于 __int128 和 __int128_t Normally, _t suffix means a ...

  3. hdu6222——佩尔方程&&大数__int128

    题意 给定一个整数 $N$($1 \leq N \leq 10^{30}$),求最小的整数 $t$,要求 $t \geq N$,使得边长为 $t-1, t, t+1$ 的三角形面积为整数. 分析 根据 ...

  4. __int128 输入输出模板

    #include <bits/stdc++.h> using namespace std; void scan(__int128 &x)//输入 { x = ; ; char ch ...

  5. iostream重载__int128

    Normal (Naive)写法,用 string(char* ) std::ostream& operator <<(std::ostream&out,const __i ...

  6. HDU6719 Strassen(__int128)

    HDU6719 Strassen 直接照题目模拟,数据范围最大不会超过__int128. 时间复杂度为 \(O(\log n)\) . #include<bits/stdc++.h> us ...

  7. __int128使用

    输入输出模板: __int128无法使用cin和cout进行输入输出,所以只能自己写一个输入输出的模板: #include <bits/stdc++.h> using namespace ...

  8. 详解__int128

    前言 如果遇到 long long 开不下的情况,可以使用 __int128 来博一把! note :__int128 仅 \(64\) 位 \(GCC G++\) 支持,不在 \(C++\) 标准中 ...

  9. __int128的实现

    #include<bitset> #include<algorithm> #include<iostream> #include<string> #in ...

随机推荐

  1. 记一次生产mysql数据误操作恢复过程

    提示:建议每次对数据库进行修改时都做下备份 注意:以下Mysql开启的是row格式的binlog日志,确定到误操作具体时间可能有些麻烦,默认的格式就能很快找出来.这里开启row的原因是还有一种更快的方 ...

  2. python 编码格式

    1. 字符编码简介 1.1. ASCII ASCII(American Standard Code for Information Interchange),是一种单字节的编码.计算机世界里一开始只有 ...

  3. 日历插件bootstrap-datetimepicker的使用感悟

    首先队长先综述一下插件的使用三步流程:即 1.引入插件  2.使用jquery选择器选择目标标签  3.对目标标签绑定插件函数来触发插件 雷同于python中的库的使用(安装库 导入库 引用库) 下面 ...

  4. 一、zipkin

    zipkin是Twitter基于google的分布式监控系统Dapper(论文)的开发源实现,zipkin用于跟踪分布式服务之间的应用数据链路(具体就是收集微服务之间的调用情况,然后处理调用之间数据延 ...

  5. js函数使用prototype和不适用prototype的区别

    js中类定义函数时用prototype与不用的区别 原创 2017年06月05日 12:25:41 标签: 函数 / prototype / class   首先来看一个实例: function Li ...

  6. MobX基础 ----- 类的静态属性和装饰器

    当我们使用MobX的时候,首先要声明一个store, 用来保存状态,它的最基本的语法 如下: class Todo { @observable title = ""; @obser ...

  7. hdu-1421(dp)

    解题思路:dp[i][j]表示前i个物品中取k对所要的最小花费: 首先得对物品进行处理,因为需要当前物品减前一个物品的平方和最小: 所以先排序,因为排序的相邻两个的差的平方一定最小: 然后转移方程:d ...

  8. 【C/C++】实现牛顿迭代

    #include<bits/stdc++.h> using namespace std; /*(x+2)^2 +1 -2(x-1)^2+7 */ double f(double x){ - ...

  9. Kibana-4.6.6 marvel插件license过期重新注册

    1.注册新的license,https://register.elastic.co/marvel_register,注册完毕邮箱收取下载地址,将新的license下载到本地 2.到license所在目 ...

  10. java http 伪造请求头

    import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import ...