Submission #1235962
Source Code Expand
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
typedef pair<ll,ll> pll;
const int mod=1000000000+7;
int addm(int& a,int b) {return (a+=b)<mod?a:a-=mod;}
template<class T,class U> bool smin(T& a,U b) {return a>b?(a=b,1):0;}
template<class T,class U> bool smax(T& a,U b) {return a<b?(a=b,1):0;}
int mex[20][20];
bool seen[100];
int Mex(int i,int j) {
int &r=mex[i][j];
if (r>=0) return r;
//fill(seen,seen+100,0);
bool seen[100]{};
for (int t=1;2*t<=i;t++) seen[Mex(i-2*t,j+t)]=1;
for (int t=1;2*t<=j;t++) seen[Mex(i+t,j-2*t)]=1;
r=0;
while (seen[r]) r++;
return r;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
/*fill(mex[0],mex[20],-1);
for (int i=0;i<10;i++) {
for (int j=0;j<10;j++) cout << Mex(i,j) << ' ';
cout << endl;
}*/
ll X,Y;
cin >> X >> Y;
if (abs(X-Y)<=1) cout << "Brown\n";
else cout << "Alice\n";
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - Alice&Brown |
| User | Whalanator |
| Language | C++14 (GCC 5.4.1) |
| Score | 500 |
| Code Size | 1059 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 256 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 500 / 500 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00-00.txt, 00-01.txt, 00-02.txt, 00-03.txt |
| All | 00-00.txt, 00-01.txt, 00-02.txt, 00-03.txt, 01-00.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, 01-17.txt, 01-18.txt, 01-19.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-00.txt | AC | 1 ms | 256 KiB |
| 00-01.txt | AC | 1 ms | 256 KiB |
| 00-02.txt | AC | 1 ms | 256 KiB |
| 00-03.txt | AC | 1 ms | 256 KiB |
| 01-00.txt | AC | 1 ms | 256 KiB |
| 01-01.txt | AC | 1 ms | 256 KiB |
| 01-02.txt | AC | 1 ms | 256 KiB |
| 01-03.txt | AC | 1 ms | 256 KiB |
| 01-04.txt | AC | 1 ms | 256 KiB |
| 01-05.txt | AC | 1 ms | 256 KiB |
| 01-06.txt | AC | 1 ms | 256 KiB |
| 01-07.txt | AC | 1 ms | 256 KiB |
| 01-08.txt | AC | 1 ms | 256 KiB |
| 01-09.txt | AC | 1 ms | 256 KiB |
| 01-10.txt | AC | 1 ms | 256 KiB |
| 01-11.txt | AC | 1 ms | 256 KiB |
| 01-12.txt | AC | 1 ms | 256 KiB |
| 01-13.txt | AC | 1 ms | 256 KiB |
| 01-14.txt | AC | 1 ms | 256 KiB |
| 01-15.txt | AC | 1 ms | 256 KiB |
| 01-16.txt | AC | 1 ms | 256 KiB |
| 01-17.txt | AC | 1 ms | 256 KiB |
| 01-18.txt | AC | 1 ms | 256 KiB |
| 01-19.txt | AC | 1 ms | 256 KiB |