经典简约
清爽简洁,回归本真
液态水晶
毛玻璃+霓虹光带
赛博朋克
霓虹故障艺术风
🚫
违规操作检测
禁止使用右键菜单
⚠️ 此操作已被系统记录
1

Educational journey

📝 题解 🔵 仅限 C++
题目描述
<p>The University of Calgary team qualified for the 28th ACM International Collegiate Programming Contest World Finals in Prague, Czech Republic. Just by using the initials of team members they got a very cunning team name: <b>ACM</b> (<b>A</b>lecs, <b>C</b>elly and <b>M</b>onny). In order to prepare for the contest, they have decided to travel to Edmonton to learn the tricks of trade from <b>D</b>ilbert, Alberta-wide famous top-coder.</p> <p>Due to a horrible miscommunication which is as welcome as a plague among such teams, <b>A</b>, <b>C</b> and <b>M</b> drive from Calgary to Edmonton in separate cars. To make things worse, there was also a miscommunication with <b>D</b>, who being always so helpful, decides to go to Calgary in order to save the team a trip to the far, freezing North. All this happens on the same day and each car travels at a constant (but not necessarily the same) speed on the famous Alberta #2.</p> <p><b>A</b> passed <b>C</b> and <b>M</b> at time <em>t1</em> and <em>t2</em>, respectively, and met D at time <em>t3</em>. <b>D</b> met <b>C</b> and <b>M</b> at times <em>t4</em> and <em>t5</em>, respectively. The question is: at what time time did <b>C</b> pass <b>M</b>?</p> <p>The input is a sequence of lines, each containing times <em>t1</em>, <em>t2</em>, <em>t3</em>, <em>t4</em> and <em>t5</em>, separated by white space. All times are distinct and given in increasing order. Each time is given in the hh:mm:ss format on the 24-hour clock. A line containing -1 terminates the input.</p> <p>For each line of input produce one line of output giving the time when <b>C</b> passed <b>M</b> in the same format as input, rounding the seconds in the standard way.</p> <p>&nbsp;</p> <h3>&nbsp;</h3>
输入格式
输出格式
样例
样例输入 1
10:00:00 11:00:00 12:00:00 13:00:00 14:00:00 10:20:00 10:58:00 14:32:00 14:59:00 16:00:00 10:20:00 12:58:00 14:32:00 14:59:00 16:00:00 08:00:00 09:00:00 10:00:00 12:00:00 14:00:00 -1
样例输出 1
12:00:00 11:16:54 13:37:32 10:40:00
提交代码
请先登录后提交

🤖 AI 解题助手

DeepSeek
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这道题,可以帮你分析思路、提供代码示例。
⚠️ 请先登录后使用