Roliygu and Yilan

题目描述
Roliygu is famous because he likes to play games. Today he puts a chessboard in the desktop,and plays a game with Yilan. The size of the chessboard is n by n. A stone is placed in a corner square. They play alternatively with Roliygu having the first move. Each time,player is allowed to move the stone to an unvisited neighbor square horizontally or vertically. The one who can’t make a move will lose the game. If both play perfectly, who will win the game?

输入描述
The input is a sequence of positive integers each in a separate line. The integers are between 1 and 10 000,inclusive,indicating the size of the chessboard. The end of the input is indicated by a zero.

输出描述
Output the winner(“Roliygu” or “Yilan”) for each input line except the last zero. No other characters should be inserted in the output.

样例输入
2
0
样例输出
Roliygu
提示
染色问题

示例代码

#include<iostream>
using namespace std;
int main() {
	int n;
	while(cin>>n&&n!=0) {
		if((n*n)%2!=0) {
			cout<<"Yilan"<<endl;
		} else {
		  	cout<<"Roliygu"<<endl;
		}
	}
	return 0;
}
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要实现flex垂直布局充满,可以使用以下代码: ```css .container2 { display: flex; flex-direction: column; height: 100vh; /* 设置容器高度为整个视窗的高度 */ } .autoFullWidth { flex: 1; /* 设置该项目的flex属性为1,使其自动填充剩余空间 */ } ``` 在上述代码中,我们通过设置容器的`display`属性为`flex`,并将`flex-direction`属性设置为`column`来实现垂直布局。此外,设置容器的高度为整个视窗的高度,即`height: 100vh`。然后,我们通过设置项目的`flex`属性为`1`,使其自动填充剩余空间。这样就可以实现flex垂直布局充满整个容器。 引用内容中提供了完整的代码和样式,可以根据需求进行调整和使用。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [微信小程序-flex布局:垂直、水平方向-自动填充满剩余空间](https://blog.csdn.net/l_yilan/article/details/124755200)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [flex弹性布局的理解。](https://download.csdn.net/download/malingshu99/12524097)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值