[NOIP2014]生活大爆炸版 石头剪刀布

发布于 2017-08-20  120 次阅读



题目(vijos)
这题就是个模拟......技巧什么的也没有......

#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
int n,na,nb;
int a[205],b[205];
int p[40005];
int sca,scb;
int main()
{
	scanf(
	for (int i=1;i<=na;++i)
		scanf(
	for (int i=1;i<=nb;++i)
		scanf(
	for (int i=na+1;i<=n;++i)
	{
		a[i]=a[i-na];
	}
	for (int i=nb+1;i<=n;++i)
	{
		b[i]=b[i-nb];
	}
	for (int i=1;i<=n;++i)
	{
		if (a[i]==b[i]) continue;
		if (a[i]==0)
		{
			if (b[i]==1) scb++;
			if (b[i]==2) sca++;
			if (b[i]==3) sca++;
			if (b[i]==4) scb++;
		}
		if (a[i]==1)
		{
			if (b[i]==0) sca++;
			if (b[i]==2) scb++;
			if (b[i]==3) sca++;
			if (b[i]==4) scb++;
		}
		if (a[i]==2)
		{
			if (b[i]==0) scb++;
			if (b[i]==1) sca++;
			if (b[i]==3) scb++;
			if (b[i]==4) sca++;
		}
		if (a[i]==3)
		{
			if (b[i]==0) scb++;
			if (b[i]==1) scb++;
			if (b[i]==2) sca++;
			if (b[i]==4) sca++;
		}
		if (a[i]==4)
		{
			if (b[i]==0) sca++;
			if (b[i]==1) sca++;
			if (b[i]==2) scb++;
			if (b[i]==3) scb++;
		}
	}
	printf(
	return 0;
}