http://codeforces.com/contest/1075/problem/A

On a chessboard with a width of nn and a height of nn, rows are numbered from bottom to top from 11 to nn, columns are numbered from left to right from 11 to nn. Therefore, for each cell of the chessboard, you can assign the coordinates (r,c)(r,c), where rr is the number of the row, and cc is the number of the column.

The white king has been sitting in a cell with (1,1)(1,1) coordinates for a thousand years, while the black king has been sitting in a cell with (n,n)(n,n) coordinates. They would have sat like that further, but suddenly a beautiful coin fell on the cell with coordinates (x,y)(x,y)...

Each of the monarchs wanted to get it, so they decided to arrange a race according to slightly changed chess rules:

As in chess, the white king makes the first move, the black king makes the second one, the white king makes the third one, and so on. However, in this problem, kings can stand in adjacent cells or even in the same cell at the same time.

The player who reaches the coin first will win, that is to say, the player who reaches the cell with the coordinates (x,y)(x,y) first will win.

Let's recall that the king is such a chess piece that can move one cell in all directions, that is, if the king is in the (a,b)(a,b) cell, then in one move he can move from (a,b)(a,b) to the cells (a+1,b)(a+1,b), (a−1,b)(a−1,b), (a,b+1)(a,b+1), (a,b−1)(a,b−1), (a+1,b−1)(a+1,b−1), (a+1,b+1)(a+1,b+1), (a−1,b−1)(a−1,b−1), or (a−1,b+1)(a−1,b+1). Going outside of the field is prohibited.

Determine the color of the king, who will reach the cell with the coordinates (x,y)(x,y) first, if the white king moves first.

Input

The first line contains a single integer nn (2≤n≤10182≤n≤1018) — the length of the side of the chess field.

The second line contains two integers xx and yy (1≤x,y≤n1≤x,y≤n) — coordinates of the cell, where the coin fell.

Output

In a single line print the answer "White" (without quotes), if the white king will win, or "Black" (without quotes), if the black king will win.

You can print each letter in any case (upper or lower).

Examples
input

Copy
4
2 3
output

Copy
White
input

Copy
5
3 5
output

Copy
Black
input

Copy
2
2 2
output

Copy
Black

代码:

#include <bits/stdc++.h>
using namespace std; long long N;
long long x, y; int main() {
cin >> N;
cin >> x >> y;
long long step1 = 0, step2 = 0;
step1 = min(abs(x - 1), abs(y - 1)) + abs(x - y);
step2 = min(abs(x - N), abs(y - N)) + abs(x - y);
if(step1 <= step2)
printf("White\n");
else
printf("Black\n");
return 0;
}

  

AC 的第一道 Div.2 的题目 可能是本年度唯一一道吧 【微笑脸】

Lyft Level 5 Challenge 2018 - Final Round (Open Div. 2) A. The King's Race的更多相关文章

  1. Lyft Level 5 Challenge 2018 - Final Round (Open Div. 2) (前三题题解)

    这场比赛好毒瘤哇,看第四题好像是中国人出的,怕不是dllxl出的. 第四道什么鬼,互动题不说,花了四十五分钟看懂题目,都想砸电脑了.然后发现不会,互动题从来没做过. 不过这次新号上蓝名了(我才不告诉你 ...

  2. Lyft Level 5 Challenge 2018 - Final Round (Open Div. 2) B 1075B (思维)

    B. Taxi drivers and Lyft time limit per test 1 second memory limit per test 256 megabytes input stan ...

  3. Lyft Level 5 Challenge 2018 - Final Round (Open Div. 2)---ABC

    A---The King's Race http://codeforces.com/contest/1075/problem/A 题意: 一个人在\((1,1)\), 一个人在\((n,n)\), 现 ...

  4. Lyft Level 5 Challenge 2018 - Final Round (Open Div. 2)

    A. The King's Race 签. #include <bits/stdc++.h> using namespace std; #define ll long long ll n, ...

  5. Lyft Level 5 Challenge 2018 - Final Round (Open Div. 2) C. The Tower is Going Home(思维+双指针)

    https://codeforces.com/contest/1075/problem/C 题意 一个宽为1e9*1e9的矩阵中的左下角,放置一个车(车可以移动到同一行或同一列),放置一些墙,竖的占据 ...

  6. Lyft Level 5 Challenge 2018 - Final Round Div. 1没翻车记

    夜晚使人着迷.没有猝死非常感动. A:显然对于水平线段,只有横坐标的左端点为1的时候才可能对答案产生影响:对于竖直直线,如果要删一定是删去一段前缀.枚举竖直直线删到哪一条,记一下需要删几条水平线段就可 ...

  7. [Lyft Level 5 Challenge 2018 - Elimination Round][Codeforces 1033D. Divisors]

    题目链接:1033D - Divisors 题目大意:给定\(n\)个数\(a_i\),每个数的约数个数为3到5个,求\(\prod_{i=1}^{n}a_i\)的约数个数.其中\(1 \leq n ...

  8. Lyft Level 5 Challenge 2018 - Elimination Round

    A. King Escape 签. #include <bits/stdc++.h> using namespace std; ], y[]; int f1(int X, int Y) { ...

  9. Lyft Level 5 Challenge 2018 - Elimination Round翻车记

    打猝死场感觉非常作死. A:判一下起点和终点是否在其两侧即可. #include<iostream> #include<cstdio> #include<cmath> ...

随机推荐

  1. 首次将项目从svn下载到eclipse

    1.点击 File --> Import,进入导入项目窗口 2.选择从SVN检出项目,点击Next 3.选择创建新的资源库位置,点击Next 4.在URL处输入SVN项目远程地址,点击Next ...

  2. linux python升级及全局环境变量设置

    1.下载pythonwget https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tgz 或者去官网下载压缩包 2.安装python3依赖yum ...

  3. jquery的uploadify插件实现的批量上传V3.2.1版

    你需要如下配置(包括引入文件)HTML: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat=&quo ...

  4. MySQL基础教程——创建数据库并插入数据

    本节将介绍 MySQL 新建数据库,新建表,插入数据以及基本数据类型的相关知识.本节实验将创建一个名为 mysql_shiyan 的数据库,其中有两张表 employee和 department. 1 ...

  5. gzip, gunzip, zcat - 压缩或展开文件

    总揽 gzip [ -acdfhlLnNrtvV19 ] [-S 后缀] [ 文件名 ... ] gunzip [ -acfhlLnNrtvV ] [-S 后缀] [ 文件名 ... ] zcat [ ...

  6. 【转】OS X 中快速调出终端

    作者:Frank Pu链接:https://www.zhihu.com/question/20692634/answer/37152883来源:知乎著作权归作者所有,转载请联系作者获得授权. 来至 M ...

  7. java基础—object类

    一.Object类介绍

  8. Java第7次作业:造人类(用private封装,用static关键字自己造重载输出方法)什么是面向对象程序设计?什么是类和对象?什么是无参有参构造方法 ?什么是封装?

    什么是面向对象程序设计? 我们称为OOP(Object  Oriented  Programming) 就是非结构化的程序设计 要使用类和对象的方法来进行编程 什么是类,什么是对象 类就是封装了属性和 ...

  9. 【Python学习之五】高级特性4(切片、迭代、列表生成器、生成器、迭代器)

    4.生成器(generator) 通过列表生成式,我们可以直接创建一个列表.但是,受到内存限制,列表容量肯定是有限的.如果列表元素可以按照某种算法推算出来,那我们是否可以在循环的过程中不断推算出后续的 ...

  10. Qt:实现子线程发送信号父线程切换图片

    mainwindow.h中代码 #ifndef MAINWINDOW_H#define MAINWINDOW_H #include <QMainWindow>#include " ...