結果
問題 | No.305 鍵(2) |
ユーザー |
![]() |
提出日時 | 2015-12-06 18:01:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,068 bytes |
コンパイル時間 | 640 ms |
コンパイル使用メモリ | 73,220 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 46.00 |
最終ジャッジ日時 | 2024-07-16 08:03:33 |
合計ジャッジ時間 | 1,980 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 1 |
ソースコード
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <cmath> #define FORR(i,b,e) for(int i=(b);i<(int)(e);++i) #define FOR(i,e) FORR(i,0,e) #define ALL(c) begin(c), end(c) #define dump(var) cerr << #var ": " << var << "\n" #define dumpc(con) for(auto& e: con) cerr << e << " "; cerr<<"\n" using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string ans, x, res; int fm; ans = "0000000000"; x = "0000000000"; cout << x << endl; cin >> fm; getline(cin, res); FOR(i, 10) { FORR(j, 1, 10) { int m; x[i] = '0' + j; cout << x << endl; cin >> m; getline(cin, res); if (m == 10) { return 0; } else if (fm < m) { ans[i] = x[i]; break; } else if (fm > m) { break; } } x[i] = '0'; } cout << ans << endl; getline(cin, res); return 0; }