__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. git基本操作1

    1.创建版本库 在文件夹下,打开Git Bash Here ,然后执行git init,文件夹中会多出.git文件夹.(.git可能是隐藏的) 2.创建a.txt vim  a.txt ,并添加到版本 ...

  2. Java Annotation详解 理解和使用Annotation

    系统中用到了java注解: 查了一下如何使用注解,到底注解是什么: (1)创建方法:MsgTrace Java Class==> 在Create New Class中: name:输入MsgTr ...

  3. SSH的使用

    1.如何设置SSH的超时时间 使用SSH客户端软件登录linux服务器后,执行 echo $TMOUT可以查看SSH链接超时时间: 使用vim /etc/profile可以编辑配置页面 修改TMOUT ...

  4. matlab——sparse函数和full函数

    转载:http://www.cnblogs.com/lihuidashen/p/3435883.html matlab——sparse函数和full函数(稀疏矩阵和非稀疏矩阵转换)   函数功能:生成 ...

  5. jsp页面中 <%%> <%! %>, <%=%> <%-- --%>有什么区别

    <%%> 可添加java代码片段   <%! %>       可添加java方法   <%=%>       变量或表达式值输出到页面 <%-- --%&g ...

  6. Codeforces997C Sky Full of Stars 【FMT】【组合数】

    题目大意: 一个$n*n$的格子,每个格子由你填色,有三种允许填色的方法,问有一行或者一列相同的方案数. 题目分析: 标题的FMT是我吓人用的. 一行或一列的问题不好解决,转成它的反面,没有一行和一列 ...

  7. 洛谷P1119灾后重建

    题目 做一个替我们首先要明确一下数据范围,n<=200,说明n^3的算法是可以过得,而且这个题很明显是一个图论题, 所以我们很容易想到这个题可以用folyd, 但是我在做这个题的时候因为没有深刻 ...

  8. 使用 JavaScript, HTML 和 CSS 构建跨平台的桌面应用

    https://electronjs.org/ —— 官网 https://github.com/electron/electron-api-demos/releases —— 下载demo 下载安装 ...

  9. 字符串数据结构模板/题单(后缀数组,后缀自动机,LCP,后缀平衡树,回文自动机)

    模板 后缀数组 #include<bits/stdc++.h> #define R register int using namespace std; const int N=1e6+9; ...

  10. [复习]莫比乌斯反演,杜教筛,min_25筛

    [复习]莫比乌斯反演,杜教筛,min_25筛 莫比乌斯反演 做题的时候的常用形式: \[\begin{aligned}g(n)&=\sum_{n|d}f(d)\\f(n)&=\sum_ ...