結果

問題 No.305 鍵(2)
ユーザー 0w1
提出日時 2016-11-26 17:28:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 545 bytes
コンパイル時間 1,879 ms
コンパイル使用メモリ 168,744 KB
実行使用メモリ 25,476 KB
平均クエリ数 93.31
最終ジャッジ日時 2024-07-16 11:24:07
合計ジャッジ時間 4,910 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main(){
  int ans = 0;
  for( int i = ( int ) 1e9; i; i /= 10 ){
    vector< int > match( 10 );
    for( int j = 0; j < 10; ++j ){
      cout << setw( 10 ) << setfill( '0' ) << j * i << endl;
      int m; string r; cin >> m >> r;
      if( r == "unlocked" )
        exit( 0 );
      match[ j ] = m;
    }
    ans = ans * 10 + max_element( match.begin(), match.end() ) - match.begin();
  }
  cout << setw( 10 ) << setfill( '0' ) << ans << endl;
  int m; string r; cin >> m >> r;
  return 0;
}
0