結果
問題 | No.355 数当てゲーム(2) |
ユーザー |
![]() |
提出日時 | 2020-04-05 22:38:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 896 bytes |
コンパイル時間 | 1,897 ms |
コンパイル使用メモリ | 194,160 KB |
最終ジャッジ日時 | 2025-01-09 14:25:54 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 52 |
ソースコード
#include<bits/stdc++.h> #define ALL(v) std::begin(v),std::end(v) using lint=long long; using lubl=long double; lint perf,good; void query(std::vector<lint>const&a){ for(lint i=0;i<4;i++){ std::cout<<(i?" ":"")<<a.at(i); } std::cout<<std::endl; std::cin>>perf>>good; if(perf==4&&good==0)exit(0); } int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint dammy=0; for(;;dammy++){ query(std::vector<lint>(4,dammy)); if(!good)break; } std::vector<lint>basic(4,dammy); std::vector<lint>ans(4); for(lint i=0;i<4;i++){ for(lint j=0;j<10;j++){ basic.at(i)=j; query(basic); if(i<perf){ ans.at(i)=j; break; } basic.at(i)=dammy; } } }