結果
| 問題 |
No.966 引き算をして門松列(その1)
|
| コンテスト | |
| ユーザー |
ate
|
| 提出日時 | 2020-07-08 22:37:27 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 647 ms |
| コンパイル使用メモリ | 70,428 KB |
| 最終ジャッジ日時 | 2025-01-11 17:04:47 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 5 |
ソースコード
#include<iostream>
#include<algorithm>
void solve();
signed main(){
int t;
std::cin>>t;
while(t--)solve();
}
void solve(){
int64_t a,b,c;
std::cin>>a>>b>>c;
if(std::max({a,b,c})==b||std::min({a,b,c})==b)std::cout<< 0 <<std::endl;
else std::cout<< std::min(std::max(a,c)+1-b,b-std::min(a,c)-1) <<std::endl;
}
ate