結果
| 問題 | No.5003 物理好きクリッカー | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-09-11 13:45:45 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 80 ms / 10,000 ms | 
| コード長 | 2,198 bytes | 
| コンパイル時間 | 5,484 ms | 
| コンパイル使用メモリ | 314,572 KB | 
| 実行使用メモリ | 24,396 KB | 
| スコア | 452,672 | 
| 平均クエリ数 | 10000.00 | 
| 最終ジャッジ日時 | 2023-09-11 13:45:56 | 
| 合計ジャッジ時間 | 10,446 ms | 
| ジャッジサーバーID (参考情報) | judge13 / judge12 | 
| 純コード判定しない問題か言語 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 32 | 
ソースコード
//諸々include、namespace設定(ACLも使用可能)
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace chrono;
using namespace atcoder;
using ll=long long;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
//0以上2^32-1以下の整数をランダムに生成(xorshift32)
//seed値を固定しているため、基本結果が上振れたり下振れたりしない
unsigned int randxor(){
    static unsigned int x=42;
    x=x^(x<<13);x=x^(x>>15);x=x^(x<<17);
    return x;
}
//l以上r以下の整数をランダムに生成
int randint(int l,int r){
    return l+randxor()%(r-l+1);
}
//l以上r以下の実数をランダムに生成
double uniform(double l,double r){
    return ((double)randxor()/UINT_MAX)*(r-l)+l;
}
//時間計測(ミリ秒)、秒に直す場合10^6で割ると得られる
auto startTime=system_clock::now();
int getTime(){
    return duration_cast<microseconds>(system_clock::now()-startTime).count();
}
//ゲームをプレイする
const vector<string> behavior={"click","buy","sell","reinforce","enhclick","nothing"};
const vector<string> facil={" hand"," lily"," factory"," casino"," grimoire",""};
const vector<int> price={150,2000,30000,600000,10000000};
const vector<int> prod={1,10,120,2000,250000};
int N;
string S;
struct game{
    //評価関数:Nターンclickのみ行った場合のクッキーの枚数
    ll cookie;
    int turn;
    ll clickprod;
    vector<int> pos_number;
    vector<ll> rein;
    queue<int> ans;
    
    game(){
        turn=0;
        cookie=0;
        clickprod=1;
        pos_number={0,0,0,0,0};
        rein={1,1,1,1,1};
    }
    
    void production(){
        rep(i,5){
            cookie+=prod[i]*pos_number[i]*rein[i];
        }
    }
    
    void click(){
        cookie+=clickprod;
        ans.push(5);
        production();
    }
    
    void print(){
        while(ans.size()>0){
            int action=ans.front();
            ans.pop();
            cout<<behavior[action/6]<<facil[action%6]<<endl;
            cin>>action;
        }
    }
};
//主要部分
int main(){
    cin>>N;
    cin>>S;
    game g;
    rep(i,N){
        g.click();
    }
    g.print();
    return 0;
}
            
            
            
        