您的位置:首页 > 其它

ZOJ 3926 Parity Modulo P(XJB)

2016-03-08 19:25 260 查看
随机数啊 缘分过

#include<iostream>
#include<cstdio>
#include<cmath>
#include<functional>
#include<set>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include<cctype>
#include<sstream>
#include<vector>
#include <ctime>
using namespace std;
#define sp system("pause")
#define PI acos(-1.0)
typedef long long ll;
#define iin(x) scanf("%d",&x)
#define mst(x,y) memset(x,y,sizeof(x))

char ch[1300005];

int main()
{
int t;
cin >> t;
srand(time(NULL));
while(t--)
{
scanf("%s",ch);
string h = (string)ch;
if(h.size() < 909526)
{
cout << (h[h.size() - 1] - '0') % 2 << endl;
}
else
{
cout << rand() % 2 << endl;
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: