代码模板 常用部分

备份一哈

#include<bits/stdc++.h> 
#define reg register
#define ll long long
#define ull unsigned long long
#define iINF 0x3f3f3f3f
#define lINF (1ll << 60)
#define eps 1e-8
#define pi acos(-1.0)
#define e exp(1.0)
#define ios ios::sync_with_stdio(false)
#define rep(i,l,r) for(int i=l;i<r;i++)
#define per(i,r,l) for(int i=r;i>=l;i--)
using namespace std;
const int maxn = 2e6 + 7;
const int mod = 1e9 + 7;
template<class T>inline void read(T &res){
  char c;T flag = 1;
  while((c = getchar()) < '0' || c > '9')if(c == '-')flag = -1;res = c - '0';
  while((c = getchar()) >= '0' && c <= '9')res = res * 10 + c - '0'; res *= flag;
}
template<class T>inline void write(T x){
  if(x < 0) putchar('-'),x = -x;
  if(x > 9) write(x/10);
  putchar(x % 10 + '0');
}
ll MyPow(ll a, ll b){ ll sum = 1;while (b) {if (b & 1) {sum = (sum * a) % mod;b--;}b /= 2;a = a * a % mod;}return sum;}
ll gcd(ll a,ll b){ return b==0?a:gcd(b,a%b); }
ll isprime(ll n){if(n <= 1) return 0;if(n == 2) return 1;rep(i, 2, sqrt(n) + 1) if(n % i == 0) return 0;return 1;}
int main() {
 
  return 0;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值