結果
| 問題 |
No.2493 K-th in L2 with L1
|
| ユーザー |
|
| 提出日時 | 2023-10-06 21:35:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 376 bytes |
| コンパイル時間 | 1,659 ms |
| コンパイル使用メモリ | 191,512 KB |
| 最終ジャッジ日時 | 2025-02-17 04:53:30 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 3 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void solve() {
int D, K;
cin >> D >> K;
int n = 0;
for (int x = (D + 1) / 2; x <= D; x ++) {
int y = D - x;
int m = n + 8;
if (x == y || x == D) m -= 4;
if (n < K && K <= m) {
cout << "Yes\n" << x << " " << y << endl;
return;
}
n = m;
}
puts("No");
}
int main() {
int Q;
cin >> Q;
while (Q--) solve();
}