__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. myisam和innodb的区别对比

    1.MyISAM:默认表类型,它是基于传统的ISAM类型,ISAM是Indexed Sequential Access Method (有索引的顺序访问方法) 的缩写,它是存储记录和文件的标准方法.不 ...

  2. Python OpenCV人脸识别案例

    ■环境 Python 3.6.0 Pycharm 2017.1.3 ■库.库的版本 OpenCV 3.4.1 (cp36) ■haarcascades下载 https://github.com/ope ...

  3. react & youtube

    react & youtube https://www.npmjs.com/package/react-youtube https://developers.google.com/youtub ...

  4. 有时候做JQ动画,鼠标经过,它会不停自己抖动不停,解决方法(此处,是兼容IE ,当鼠标经过,遮罩层从下移到上边的JQ动画效果)

    <style> .x_sdbb { margin: 60px 0 40px 0; } .x_title2{ background: url(../images/hdb_img17.png) ...

  5. python设计模式第五天【单例模式】

    1. 定义 一个类只有一个实例,提供访问该实例的全局方法 2.应用场景 (1)多线程之间共享对象资源 (2)整个程序空间中的全局变量,共享资源 (3)大规模程序的节省创建对象的时间 3.代码实现(使用 ...

  6. shiro使用ajax登陆实现,success但页面无法跳转的问题

    首先:简述一下登陆的后台流程 页面提交——>对应controller中的方法——>对应Realm认证——>controller返回 json 这样,无论成功与否,都有返回值,可以用 ...

  7. java 中 Math类

    package cn.liuliu.com; import java.math.BigDecimal; import java.math.BigInteger; /* * 一.Math类? * * 1 ...

  8. PLSQL 错误问题:Datebase character set (AL32UTF-8) and Client character set (ZHS16GBK) are different.

    (解决不了,网上用的是Orecal,我用的只是客户端.) 网上找到解决方法 打开注册表(ctr+R,输入regedit),根据报错提示找到注册表位置,但本机是win10 64位系统,根据以上路径找不到 ...

  9. 由 POST 400 错误拔出来的萝卜

    缘起 前段时间遇到扫描问题,好不容易拿到了扫描出来的数据,结果调用接口时弹了个 400(Bad request) 给我,匆匆找了点资料修补上线后,忐忑的心也可以安分点.然后,顺着这个 400 的萝卜, ...

  10. How to sign app

    codesign --display --verbose=4 /applications/qq.app codesign --display --entitlements - /application ...