結果

問題 No.305 鍵(2)
ユーザー 0w10w1
提出日時 2016-11-26 17:28:56
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 545 bytes
コンパイル時間 1,516 ms
コンパイル使用メモリ 167,872 KB
実行使用メモリ 24,420 KB
平均クエリ数 93.31
最終ジャッジ日時 2023-09-23 11:49:09
合計ジャッジ時間 4,599 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 24 ms
23,676 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

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