結果

問題 No.305 鍵(2)
ユーザー 0w10w1
提出日時 2016-11-26 17:20:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 749 bytes
コンパイル時間 1,490 ms
コンパイル使用メモリ 167,832 KB
実行使用メモリ 24,396 KB
平均クエリ数 6882.69
最終ジャッジ日時 2023-09-23 11:48:44
合計ジャッジ時間 10,447 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
24,060 KB
testcase_01 AC 25 ms
23,532 KB
testcase_02 AC 28 ms
23,856 KB
testcase_03 AC 175 ms
24,048 KB
testcase_04 AC 301 ms
24,396 KB
testcase_05 AC 26 ms
23,856 KB
testcase_06 AC 25 ms
24,060 KB
testcase_07 AC 27 ms
23,640 KB
testcase_08 AC 216 ms
24,072 KB
testcase_09 AC 1,972 ms
24,300 KB
testcase_10 TLE -
testcase_11 TLE -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

signed main(){
  ios::sync_with_stdio( 0 );
  vector< int > match( 10 );
  for( int i = 0; i < 10; ++i ){
    string s;
    for( int j = 0; j < 10; ++j )
      s += ( char ) ( '0' + i );
    cout << s << endl;
    string reply;
    cin >> match[ i ] >> reply;
    if( match[ i ] == 10 )
      exit( 0 );
  }
  string s;
  for( int i = 0; i < 10; ++i )
    for( int j = 0; j < match[ i ]; ++j )
      s += ( char ) ( '0' + i );
  cout << "1234567890" << endl; int a; string b; cin >> a >> b; if( a == 10 ) exit( 0 );
  do{
    cout << s << endl;
    int m; string reply;
    cin >> m >> reply;
    if( reply == "unlocked" )
      break;
  } while( next_permutation( s.begin(), s.end() ) );
  return 0;
}
0