Submission #2873928
Source Code Expand
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; const ll MAX=30; const ll INF=0x3f3f3f3f3f3f3f; ll p,q,mux[MAX][MAX],tmp[MAX]; ll find_mux(ll a,ll b){ int tmp[MAX]; if(mux[a][b]==-1){ mux[a][b]=0; for(ll i=0;i<MAX;i++) tmp[i]=0; for(ll i=2;i<=a;i+=2) tmp[find_mux(a-i,b+i/2)]=1; for(ll i=2;i<=b;i+=2) tmp[find_mux(a+i/2,b-i)]=1; for(ll i=0;i<MAX;i++){ if(!tmp[i]) break; mux[a][b]++; } } return mux[a][b]; } int main(){ scanf("%lld%lld",&p,&q); if(abs(p-q)<=1) printf("Brown\n"); else printf("Alice\n"); }
Submission Info
Submission Time | |
---|---|
Task | D - Alice&Brown |
User | x0000ai |
Language | C++14 (GCC 5.4.1) |
Score | 500 |
Code Size | 709 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:26:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lld%lld",&p,&q); ^
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 KB |
00-01.txt | AC | 1 ms | 256 KB |
00-02.txt | AC | 1 ms | 256 KB |
00-03.txt | AC | 1 ms | 256 KB |
01-00.txt | AC | 1 ms | 256 KB |
01-01.txt | AC | 1 ms | 256 KB |
01-02.txt | AC | 1 ms | 256 KB |
01-03.txt | AC | 1 ms | 256 KB |
01-04.txt | AC | 1 ms | 256 KB |
01-05.txt | AC | 1 ms | 256 KB |
01-06.txt | AC | 1 ms | 256 KB |
01-07.txt | AC | 1 ms | 256 KB |
01-08.txt | AC | 1 ms | 256 KB |
01-09.txt | AC | 1 ms | 256 KB |
01-10.txt | AC | 1 ms | 256 KB |
01-11.txt | AC | 1 ms | 256 KB |
01-12.txt | AC | 1 ms | 256 KB |
01-13.txt | AC | 1 ms | 256 KB |
01-14.txt | AC | 1 ms | 256 KB |
01-15.txt | AC | 1 ms | 256 KB |
01-16.txt | AC | 1 ms | 256 KB |
01-17.txt | AC | 1 ms | 256 KB |
01-18.txt | AC | 1 ms | 256 KB |
01-19.txt | AC | 1 ms | 256 KB |