結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-11-27 23:41:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 380 bytes |
| コンパイル時間 | 116 ms |
| コンパイル使用メモリ | 23,424 KB |
| 実行使用メモリ | 25,952 KB |
| 平均クエリ数 | 100.00 |
| 最終ジャッジ日時 | 2024-07-16 06:43:45 |
| 合計ジャッジ時間 | 3,117 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | scanf("%d%s",&x,res);
| ~~~~~^~~~~~~~~~~~~~~
main.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
22 | scanf("%d%s",&x,res);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
int main(){
int x;
char s[11]="aaaaaaaaaa",ans[11]={},res[11];
for(char i='0';i<'0'+10;i++){
for(int j=0;j<10;j++){
if(ans[j])continue;
s[j]=i;
printf("%s\n",s);
fflush(stdout);
scanf("%d%s",&x,res);
if(x==1){
ans[j]=i;
//return 0;
}
s[j]='a';
}
}
printf("%s\n",ans);
fflush(stdout);
scanf("%d%s",&x,res);
return 0;
}
184