結果

問題 No.304 鍵(1)
ユーザー むらためむらため
提出日時 2018-12-18 12:27:50
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 447 bytes
コンパイル時間 463 ms
コンパイル使用メモリ 60,536 KB
実行使用メモリ 24,180 KB
平均クエリ数 446.83
最終ジャッジ日時 2023-09-24 02:04:53
合計ジャッジ時間 1,506 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
23,388 KB
testcase_01 AC 51 ms
24,180 KB
testcase_02 AC 63 ms
23,388 KB
testcase_03 AC 42 ms
23,520 KB
testcase_04 AC 50 ms
24,000 KB
testcase_05 AC 27 ms
23,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int used[999] = {};
string str;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.fill('0');
  srand((unsigned)time(NULL));
  while (1) {
    int i = 0;
    while (used[i]) i = rand() % 1000;
    used[i] = 1;
    cout << setw(3) << i << endl;
    cin >> str;
    if (str[0] == 'u') return 0;
  }
}
0