結果

問題 No.3279 Dhole vs Monster
コンテスト
ユーザー yh_0202
提出日時 2026-09-18 22:14:58
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 426µs
コード長 5,569 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,865 ms
コンパイル使用メモリ 393,156 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2026-09-18 22:15:06
合計ジャッジ時間 6,320 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <atcoder/all>

using namespace std;
using namespace atcoder;

using ll = long long;
using ld = long double;
typedef pair<int, int> Pii;
typedef pair<ll,ll> Pll;
#define endl "\n"
const ll mod = 998244353;
//const ll mod = 1000000007;
const ll inf = 4000000000000000000ll;
static const ld PI=3.1415926535897932384626433832795028841971;

template<typename T> using vc = vector<T>;
template<typename T> using vv = vc<vc<T>>;

template<class T>void vcin(vector<T> &n){for(int i=0;i<int(n.size());i++) cin>>n[i];}
template<class T,class K>void vcin(vector<T> &n,vector<K> &m){for(int i=0;i<int(n.size());i++) cin>>n[i]>>m[i];}
template<class T>void vcout(vector<T> &n){for(int i=0;i<int(n.size());i++){cout<<n[i]<<" ";}cout<<endl;}
template<class T>void vcin(vector<vector<T>> &n){for(int i=0;i<int(n.size());i++){for(int j=0;j<int(n[i].size());j++){cin>>n[i][j];}}}
template<class T>void vcout(vector<vector<T>> &n){for(int i=0;i<int(n.size());i++){for(int j=0;j<int(n[i].size());j++){cout<<n[i][j]<<" ";}cout<<endl;}cout<<endl;}

#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define REP(i,a,b) for(ll i=a;i<=b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;i--)

template<class T,class U>bool chmax(T &a,const U b) { if (a<b) { a=b; return 1; } return 0;}
template<class T,class U>bool chmin(T &a,const U b) { if (b<a) { a=b; return 1; } return 0;}
ll fastgcd(ll u,ll v){ll shl=0;while(u&&v&&u!=v){bool eu=!(u&1);bool ev=!(v&1);if(eu&&ev){++shl;u>>=1;v>>=1;}else if(eu&&!ev){u>>=1;}else if(!eu&&ev){v>>=1;}else if(u>=v){u=(u-v)>>1;}else{ll tmp=u;u=(v-u)>>1;v=tmp;}}return !u?v<<shl:u<<shl;}
ll modPow(ll a, ll n, ll mod) { if(mod==1) return 0;ll ret = 1; ll p = a % mod; while (n) { if (n & 1) ret = ret * p % mod; p = p * p % mod; n >>= 1; } return ret; }
ll pop(ll x){return __builtin_popcountll(x);}
vector<long long> calc_divisor(long long n) {
    vector<long long> res;
    for (long long i = 1LL; i*i <= n; ++i) {
        if (n % i == 0) {
            res.push_back(i);
            long long j = n / i;
            if (j != i) res.push_back(j);
        }
    }
    sort(res.begin(), res.end());
    return res;
}
vector<pair<long long, long long> > prime_factorize(long long n) {
    vector<pair<long long, long long> > res;
    for (long long p = 2; p * p <= n; ++p) {
        if (n % p != 0) continue;
        int num = 0;
        while (n % p == 0) { ++num; n /= p; }
        res.push_back(make_pair(p, num));
    }
    if (n != 1) res.push_back(make_pair(n, 1));
    return res;
}

bool is_prime(long long n) {
    if (n <= 1) return false;
    for (long long p = 2; p * p <= n; ++p) {
        if (n % p == 0) return false;
    }
    return true;
}

#define Euclid_dis(x,y) ((x)*(x)+(y)*(y))
#define OUT(x) cout << fixed << setprecision(15) << x << endl
#define BIT(n) (1LL << (n))
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
#define PQminll priority_queue<ll, vector<ll>, greater<ll>>
#define PQmaxll priority_queue<ll,vector<ll>,less<ll>>
#define PQminP priority_queue<Pll, vector<Pll>, greater<Pll>>
#define PQmaxP priority_queue<Pll,vector<Pll>,less<Pll>>
#define NP next_permutation


long long floor_div(long long a, long long b) {
    assert(b != 0);
    long long q = a / b;
    long long r = a % b;
    if (r != 0 && ((r > 0) != (b > 0))) q--;
    return q;
}

long long ceil_div(long long a, long long b) {
    assert(b != 0);
    long long q = a / b;
    long long r = a % b;
    if (r != 0 && ((r > 0) == (b > 0))) q++;
    return q;
}

//乱択 mt19937_64 rng(58); 
uint64_t get_rand_range(uint64_t min_val, uint64_t max_val) {
    // 乱数生成器
    static std::mt19937_64 mt64(0);

    // [min_val, max_val] の一様分布整数 (int) の分布生成器
    std::uniform_int_distribution<uint64_t> get_rand_uni_int(min_val, max_val);

    // 乱数を生成
    return get_rand_uni_int(mt64);
}
//UDLR
vc<int> dh = {-1,1,0,0,1,1,-1,-1}, dw = {0,0,-1,1,1,-1,1,-1};
using mint = modint998244353;

//using mint = modint1000000007;

constexpr ll sum_op(ll a, ll b) { return a + b; }
constexpr ll prod_op(ll a, ll b) { return a * b; }
string concat_op(string a, string b) { return a + b; }
constexpr ll min_op(ll a, ll b) { return min(a, b); }
constexpr ll max_op(ll a, ll b) { return max(a, b); }
constexpr ll lcm_op(ll a, ll b) { return lcm(a, b); }
constexpr ll gcd_op(ll a, ll b) { return gcd(a, b); }
constexpr ll xor_op(ll a, ll b) { return a ^ b; }


constexpr ll sum_e() { return 0; }
constexpr ll prod_e() { return 1; }
string concat_e() { return ""; }
constexpr ll min_e() { return inf; } 
constexpr ll max_e() { return -inf; } 
constexpr ll lcm_e() { return 1; }
constexpr ll gcd_e() { return 0; }
constexpr ll xor_e() { return 0; }

using sumtree   = segtree<ll, sum_op, sum_e>;
using prodtree  = segtree<ll, prod_op, prod_e>;
using concattree= segtree<string, concat_op, concat_e>;
using mintree   = segtree<ll, min_op, min_e>;
using maxtree   = segtree<ll, max_op, max_e>;
using lcmtree   = segtree<ll, lcm_op, lcm_e>;
using gcdtree   = segtree<ll, gcd_op, gcd_e>;
using xortree   = segtree<ll, xor_op, xor_e>;


void solve(){
    ll l;
    string s;
    cin >> l >> s;

    vc<ll> ans={390,429,468,507,546};

    if(s=="Beat"){
        l++;
    }
    l--;
    cout << ans[l] << endl;
    return;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll t = 1;
    //cin >> t;
    while(t--){
        solve();
    }
    return 0;
}
0