結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
kongarishisyamo
|
| 提出日時 | 2016-02-24 01:26:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 2,000 ms |
| コード長 | 496 bytes |
| コンパイル時間 | 587 ms |
| コンパイル使用メモリ | 55,592 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 466.08 |
| 最終ジャッジ日時 | 2024-07-16 22:57:14 |
| 合計ジャッジ時間 | 1,759 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;
int main(){
srand(1);
bool no[10][10];
string ins;
int ini;
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
no[i][j]=false;
}
}
while(1){
int r[10];
for(int i=0;i<10;i++){
while(1){
r[i]=rand()%10;
if(no[i][r[i]]==false) break;
}
cout<<r[i];
}
cout<<endl<<flush;
cin>>ini>>ins;
if(ini==10) break;
if(ini==0){
for(int i=0;i<10;i++){
no[i][r[i]]=true;
}
}
}
}
kongarishisyamo