結果
| 問題 | No.5018 Let's Make a Best-seller Book |
| コンテスト | |
| ユーザー |
FplusFplusF
|
| 提出日時 | 2023-10-01 15:39:07 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,751 bytes |
| 記録 | |
| コンパイル時間 | 2,805 ms |
| コンパイル使用メモリ | 246,404 KB |
| 実行使用メモリ | 24,492 KB |
| スコア | 0 |
| 平均クエリ数 | 52.00 |
| 最終ジャッジ日時 | 2023-10-01 15:39:18 |
| 合計ジャッジ時間 | 10,387 ms |
|
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 100 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll,ll>;
using ld=long double;
const ll INF=(1ll<<60);
#define rep(i,n) for (ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(),v.end()
template<class T> void chmin(T &a,T b){
if(a>b){
a=b;
}
}
template<class T> void chmax(T &a,T b){
if(a<b){
a=b;
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll t,n,money;
cin >> t >> n >> money;
vector<ll> s(n),p(n),r(n);
rep(c,3){
ll mx=0;
for(ll i=1;i<=5;i++){
if(500000*(1<<(i-1))<=money) mx=i;
}
if(mx!=0){
cout << "2 " << mx << "\n";
cout.flush();
}else{
ll k=money/(500*n);
cout << "1 ";
rep(i,n) cout << k << " ";
cout << "\n";
cout.flush();
cin >> money;
rep(i,n) cin >> s[i];
rep(i,n) cin >> p[i];
rep(i,n) cin >> r[i];
}
}
ll idx=0,mn=INF;
rep(i,n){
if(r[i]<mn){
r[i]=mn;
idx=i;
}
}
t-=3;
while(t--){
ll mx=0;
for(ll i=1;i<=5;i++){
if(500000*(1<<(i-1))<=money) mx=i;
}
if(mx!=0){
cout << "2 " << mx << "\n";
cout.flush();
}else{
ll k=money/500;
cout << "1 ";
rep(i,n){
if(i==idx) cout << "0 ";
else cout << k << " ";
}
cout << "\n";
cout.flush();
cin >> money;
rep(i,n) cin >> s[i];
rep(i,n) cin >> p[i];
rep(i,n) cin >> r[i];
}
}
}
FplusFplusF