結果

問題 No.305 鍵(2)
ユーザー naimonon77naimonon77
提出日時 2015-12-04 00:15:56
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 884 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 60,176 KB
実行使用メモリ 24,324 KB
平均クエリ数 52.15
最終ジャッジ日時 2023-09-23 22:14:59
合計ジャッジ時間 1,746 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
23,628 KB
testcase_01 AC 26 ms
24,216 KB
testcase_02 AC 25 ms
23,520 KB
testcase_03 AC 26 ms
23,532 KB
testcase_04 AC 27 ms
23,868 KB
testcase_05 AC 28 ms
24,024 KB
testcase_06 AC 25 ms
24,204 KB
testcase_07 AC 27 ms
24,324 KB
testcase_08 AC 26 ms
23,472 KB
testcase_09 AC 26 ms
23,364 KB
testcase_10 AC 27 ms
24,048 KB
testcase_11 AC 27 ms
23,664 KB
testcase_12 AC 27 ms
24,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstring>
#include <algorithm>
#include <limits.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/*  */

int int_pow(int x,int n) {
   int res = 1;
   while(n > 0) {
      if(n&1) res = res * x;
      x = x * x;
      n >>= 1;
   }
   return res;
}
int main(void)
{
  int test = 1;
  int i,j,k,l;
  int a,b,c,d;
  char s[] = "0000000000";
  char rep_s[15];
  for(i=0;;i++) {
    c = 0;
    cout << s << endl;
    cin >> a >> rep_s;
    if(rep_s[0] == 'u') exit(0);
    for(j=1;j<10;j++) {
      s[i]++;
      cout << s << endl;
      cin >> b >> rep_s;     
      if(rep_s[0] == 'u') exit(0);
      if(a < b) break;
      else if(a > b) {
        s[i] = '0';
        break;
      }
    }
  }
  
  return 0;
}
0