結果
| 問題 |
No.5018 Let's Make a Best-seller Book
|
| コンテスト | |
| ユーザー |
FplusFplusF
|
| 提出日時 | 2023-10-01 15:52:05 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 400 ms |
| コード長 | 1,239 bytes |
| コンパイル時間 | 2,180 ms |
| コンパイル使用メモリ | 201,380 KB |
| 実行使用メモリ | 24,420 KB |
| スコア | 3,754 |
| 平均クエリ数 | 52.00 |
| 最終ジャッジ日時 | 2023-10-01 15:52:15 |
| 合計ジャッジ時間 | 10,082 ms |
|
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 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 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 k=money/500;
cout << "1 ";
rep(i,n){
if(i==idx) cout << k << " ";
else cout << "0 ";
}
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