結果
| 問題 | No.5017 Tool-assisted Shooting |
| コンテスト | |
| ユーザー |
ゆい
|
| 提出日時 | 2023-07-16 14:30:23 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,025 bytes |
| コンパイル時間 | 2,076 ms |
| コンパイル使用メモリ | 204,960 KB |
| 実行使用メモリ | 35,028 KB |
| スコア | 77 |
| 平均クエリ数 | 1.19 |
| 最終ジャッジ日時 | 2023-07-16 14:30:29 |
| 合計ジャッジ時間 | 6,051 ms |
|
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 1 TLE * 1 -- * 98 |
ソースコード
#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 main(){
int now=12,l=100;
ll score=0;
vector<V> f(60,V(25)),f1(60,V(25)),f2(60,V(25));
while(true){
for(int i=59;0<i;i--){
f[i]=f[i-1];
f1[i]=f1[i-1];
f2[i]=f2[i-1];
}
int n;
cin >> n;
if(n==-1) return 0;
rep(i,n){
int h,p,x;
cin >> h >> p >> x;
x--;
f[59][x]=f1[59][x]=h;
f2[59][x]=p;
}
cout << "S" << endl;
int c=1;
rep(i,60) if(c==1&&f[i][now]>0){
c=0;
f[i][now]-=l/100;
if(f[i][now]<=0){
l+=f2[i][now];
score+=f1[i][now];
f[i][now]=f1[i][now]=f2[i][now]=0;
}
}
}
cout << "score : " << score << endl;
}
ゆい