結果

問題 No.305 鍵(2)
ユーザー alpha_virginisalpha_virginis
提出日時 2015-11-27 22:37:12
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 485 bytes
コンパイル時間 2,636 ms
コンパイル使用メモリ 144,940 KB
実行使用メモリ 24,420 KB
平均クエリ数 86.69
最終ジャッジ日時 2023-09-23 20:54:40
合計ジャッジ時間 2,761 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
24,072 KB
testcase_01 AC 31 ms
24,360 KB
testcase_02 AC 29 ms
24,348 KB
testcase_03 AC 30 ms
24,408 KB
testcase_04 AC 29 ms
24,060 KB
testcase_05 AC 30 ms
23,400 KB
testcase_06 AC 26 ms
23,580 KB
testcase_07 AC 29 ms
24,096 KB
testcase_08 AC 29 ms
24,372 KB
testcase_09 AC 30 ms
23,568 KB
testcase_10 AC 29 ms
23,568 KB
testcase_11 AC 29 ms
24,420 KB
testcase_12 AC 30 ms
23,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int main() {
  std::string str;

  std::string res = "0000000000";
  for(int i = 0; i < 10; ++i) {
    int maxj = 0;
    int max = -1;
    int x;
    for(int j = 0; j < 10; ++j) {
      res[i] = (char)(j + '0');
      std::cout << res << std::endl;
      std::cin >> x >> str;
      if( max < x ) {
        max = x;
        maxj = j;
      }
      if( str == "unlocked" ) return 0;
    }
    res[i] = (char)(maxj + '0');      
  }
            

  return 0;
}
0