結果
問題 | No.2814 Block Game |
ユーザー |
|
提出日時 | 2024-07-19 22:46:30 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,239 bytes |
コンパイル時間 | 5,439 ms |
コンパイル使用メモリ | 311,180 KB |
実行使用メモリ | 11,728 KB |
最終ジャッジ日時 | 2024-07-19 22:46:42 |
合計ジャッジ時間 | 11,721 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 20 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using mint = atcoder::static_modint<998244353>;//using mint = atcoder::static_modint<1000000007>;using namespace std;using namespace atcoder;using ld = long double;using ll = long long;#define mp(a,b) make_pair(a,b)#define rep(i,s,n) for(int i=s; i<n; i++)const vector<int> dx{1,0,-1,0},dy{0,1,0,-1};template<typename T>void compress(vector<T>&a, bool is_unique=false){auto b=a;sort(b.begin(),b.end());if(is_unique){auto p=unique(b.begin(),b.end());b.erase(p,b.end());}for(auto&x:a)x=lower_bound(b.begin(),b.end(),x)-b.begin();}int main(){int T;cin >> T;vector<string> out;rep(t,0,T){ll n;cin >> n;string s;cin >> s;if(n==1){if(s=="Even")out.push_back("Bob");else out.push_back("Alice");}else if(n%4==0){out.push_back("Bob");}else if(n%4==1){out.push_back("Alice");}else if(n%4==2){if(s=="Even")out.push_back("Bob");else out.push_back("Alice");}else out.push_back("Alice");}for(auto x:out)cout << x << "\n";}