Codeforces Round #635 A. Ichihime and Triangle(水)

Ichihime is the current priestess of the Mahjong Soul Temple. She claims to be human, despite her cat ears.

These days the temple is holding a math contest. Usually, Ichihime lacks interest in these things, but this time the prize for the winner is her favorite — cookies. Ichihime decides to attend the contest. Now she is solving the following problem.

 

You are given four positive integers aa , bb , cc , dd , such that abcda≤b≤c≤d .

Your task is to find three integers xx , yy , zz , satisfying the following conditions:

  • axba≤x≤b .
  • bycb≤y≤c .
  • czdc≤z≤d .
  • There exists a triangle with a positive non-zero area and the lengths of its three sides are xx , yy , and zz .

Ichihime desires to get the cookie, but the problem seems too hard for her. Can you help her?

Input

The first line contains a single integer tt (1t10001≤t≤1000 )  — the number of test cases.

The next tt lines describe test cases. Each test case is given as four space-separated integers aa , bb , cc , dd (1abcd1091≤a≤b≤c≤d≤109 ).

Output

For each test case, print three integers xx , yy , zz  — the integers you found satisfying the conditions given in the statement.

It is guaranteed that the answer always exists. If there are multiple answers, print any.

Example
Input
Copy
4
1 3 5 7
1 5 5 7
100000 200000 300000 400000
1 1 977539810 977539810
Output
Copy
3 4 5
5 5 5
182690 214748 300999
1 977539810 977539810

It is guaranteed that the answer always exists.输出b c c即可
posted @   脂环  阅读(415)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示
主题色彩