結果
問題 | No.2493 K-th in L2 with L1 |
ユーザー |
![]() |
提出日時 | 2023-10-15 23:29:15 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 549 ms |
コンパイル使用メモリ | 68,388 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-16 22:07:58 |
合計ジャッジ時間 | 1,278 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 3 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
testcase_04 | WA | - |
ソースコード
#include<iostream> int main(void){ int q;std::cin>>q; while(q--){ int d,k; std::cin>>d>>k; int x = d/2,y = d-x; while(true){ if(x*2==d || x==0){ k -= 4; } else { k -= 8; } if(k<=0){ break; } x-=1;y+=1; } if(x<0||y>d){ std::cout << "No" << std::endl; } else{ std::cout << "Yes\n" << x << " " << y << std::endl; } } }