結果
問題 |
No.5017 Tool-assisted Shooting
|
ユーザー |
![]() |
提出日時 | 2023-07-16 15:13:32 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 1,144 bytes |
コンパイル時間 | 2,241 ms |
コンパイル使用メモリ | 203,720 KB |
実行使用メモリ | 24,408 KB |
スコア | 2,436 |
平均クエリ数 | 86.27 |
最終ジャッジ日時 | 2023-07-16 15:13:43 |
合計ジャッジ時間 | 10,489 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
純コード判定しない問題か言語 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 100 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll=long long; using ld= long double; using P=pair<ll,ll>; using V=vector<ll>; #define rep(i,n) for(ll i=0;i<n;i++) #define REP(i,n) for(ll i=1;i<=n;i++) int nh=60,nw=26; //int nh=6,nw=3; string s="SRSRSRSRSRSLSLSLSLSL"; int main(){ int now=12,l=100; ll score=0; vector<V> f(2000,V(nw)),f1(2000,V(nw)),f2(2000,V(nw)); rep(t,1000){ int n; cin >> n; if(n==-1) break; rep(i,n){ int h,p,x; cin >> h >> p >> x; f[nh-1+t][x]=f1[nh-1+t][x]=h; f2[nh-1+t][x]=p; } cout << s[t%20] << endl; int c=1; rep(i,nh) if(c==1&&f[i+t][now]>0){ c=0; f[i+t][now]-=l/100; if(f[i+t][now]<=0){ l+=f2[i+t][now]; score+=f1[i+t][now]; f[i+t][now]=f1[i+t][now]=f2[i+t][now]=0; } } /* for(int i=nh-1;0<=i;i--){ rep(j,nw) cerr << f[i+t][j] << " "; cerr << endl; } */ } //cerr << "score : " << score << endl; }