Red John Game

本文深入探讨了游戏开发领域的核心技术,包括游戏引擎、Unity、Cocos2d等,以及AI音视频处理技术的应用,如视频分割、语义识别、语音识别等。通过分析实际案例,阐述了这些技术在提升游戏体验、实现智能交互方面的关键作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Time Limit: 2000ms, Special Time Limit:5000ms, Memory Limit:65536KB
Total submit users: 20, Accepted users: 15
Problem 12902 : No special judgement
Problem description

Red John has a chess table of infinite dimensions, and n * n pawns, arranged in an n x n square. The pawns can be moved horizontally or vertically, buy jumping over an (horizontally or vertically) adjacent pawn, and onto the next position, only if this position is unoccupied by another pawn. Also, when a valid move occurs, the jumped pawn is removed. Can you help Red John figure out if there is a sequence of moves which leaves only one pawn on the table ?

Below, such a sequence of moves is illustrated, for n = 2. Pawns are depicted by the letter P.


Input

The program input is from a text file. Each file contains a value for n, with 0 < n < 10^9.


Output

The output consists of 1 if there is a sequence of moves leaving only one pawn on the table, and 0 otherwise. There cannot be any whitespace and newline characters in the output.


Sample Input
3
4
Sample Output
0
1
//详求原理,有点模糊,L形相消,因为%3为1则为一个点,为2则可化为2个点,则不被3整除即可
//一堆规律题啊 
//1+3*k=n*n,不能让她往外走,要让她往内走 
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
	__int64 n; 
	while(scanf("%I64d",&n)!=EOF)
	{
		if(n%3==0)
		cout<<'0'<<endl;
		else
		cout<<'1'<<endl;
	}
	return 0;
} 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值