头文件、输入挂、随机数

#pragma comment(linker, "/STACK:102400000,102400000")
#include<cstdio>
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<list>
#include<deque>
#include<bitset>
#include<cstdlib>
#define LL long long
#define PI acos(-1)
#define eps 1e-8
#define lowbit(x) (x&-x)
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define MEM(a,x) memset(a,x,sizeof(a))
using namespace std;
头文件

void read(int &ans)
{
    ans = 0;
    int flag = 0,ch;
    if((ch = getchar()) == '-') flag = 1;
    else if(ch >= '0' && ch <= '9') ans = ch-'0';
    while((ch = getchar()) >= '0' && ch <= '9' )    ans = ans*10+ch-'0';
    if(flag)   ans *= -1;
}
输入挂

#include<random>
std::random_device rd;
rd();

std::mt19937 mt(rd());
mt();
随机数

 

posted @ 2017-09-02 01:56  zzzzzzzzhu  阅读(390)  评论(0编辑  收藏  举报