結果
問題 |
No.624 Santa Claus and The Last Dungeon
|
ユーザー |
![]() |
提出日時 | 2017-12-13 20:46:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,176 bytes |
コンパイル時間 | 881 ms |
コンパイル使用メモリ | 71,980 KB |
実行使用メモリ | 25,916 KB |
平均クエリ数 | 606.36 |
最終ジャッジ日時 | 2024-07-16 14:56:48 |
合計ジャッジ時間 | 11,898 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 RE * 18 |
ソースコード
#include <iostream> #include <ctime> #include <string> #include <algorithm> using namespace std; int Q, a[109], b[109]; int main() { srand((unsigned)time(NULL)); cin >> Q; while (true) { for (int i = 0; i < 100; i++) { b[i] = rand() % 100; } for (int i = 0; i < 100; i++) { if (i)cout << " "; string V = to_string(b[i]); if (V.size() == 1)V = "0" + V; cout << V; } cout << endl; int V1, V2, V3; cin >> V1 >> V2 >> V3; if (V3 == 0)break; } for (int i = 0; i < 100; i++) { int L = 0, R = 100, M, minx = 10000; for (int j = 0; j < 7; j++) { M = (L + R) / 2; for (int k = 0; k <= M; k++) { if (k)cout << " "; string V = to_string(i); if (V.size() == 1)V = "0" + V; cout << V; } for (int k = M + 1; k < 100; k++) { if (k)cout << " "; string V = to_string(b[k]); if (V.size() == 1)V = "0" + V; cout << V; } cout << endl; int V1, V2, V3; cin >> V1 >> V2 >> V3; if (V3 == 1) { minx = min(minx, M); R = M; } else { L = M; } } a[minx] = i; } for (int i = 0; i < 100; i++) { if (i)cout << " "; string V = to_string(a[i]); if (V.size() == 1)V = "0" + V; cout << V; } cout << endl; return 0; }