Jaehyun has two lists of integers, namely a1, . . . , aN and b1, . . . , bM. Jeffrey wants to know what these
numbers are, but Jaehyun won’t tell him the numbers directly. So, Jeffrey asks Jaehyun a series of questions
of the form “How big is ai + bj?” Jaehyun won’t even tell him that, though; instead, he answers either
“It’s at least c,” or “It’s at most c.” (Right, Jaehyun simply doesn’t want to give his numbers for whatever
reason.) After getting Jaehyun’s responses, Jeffrey tries to guess the numbers, but he cannot figure them out
no matter how hard he tries. He starts to wonder if Jaehyun has lied while answering some of the questions.
Write a program to help Jeffrey.
G.1 Input
The input consists of multiple test cases. Each test case begins wit
numbers are, but Jaehyun won’t tell him the numbers directly. So, Jeffrey asks Jaehyun a series of questions
of the form “How big is ai + bj?” Jaehyun won’t even tell him that, though; instead, he answers either
“It’s at least c,” or “It’s at most c.” (Right, Jaehyun simply doesn’t want to give his numbers for whatever
reason.) After getting Jaehyun’s responses, Jeffrey tries to guess the numbers, but he cannot figure them out
no matter how hard he tries. He starts to wonder if Jaehyun has lied while answering some of the questions.
Write a program to help Jeffrey.
G.1 Input
The input consists of multiple test cases. Each test case begins wit
本文介绍了一种名为'Hunnu 11127 Gaussing Game'的数学游戏,它涉及到差分约束系统的应用。通过分析输入和输出结构,文章探讨了如何利用编程语言C来解决这类问题,从而帮助玩家更好地理解和解决数学挑战。
订阅专栏 解锁全文
823

被折叠的 条评论
为什么被折叠?



