Can you find it?

Problem Description
Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X.

Input
There are many cases. Every data case is described as followed: In the first line there are three integers L, N, M, in the second line there are L integers represent the sequence A, in the third line there are N integers represent the sequences B, in the forth line there are M integers represent the sequence C. In the fifth line there is an integer S represents there are S integers X to be calculated. 1<=L, N, M<=500, 1<=S<=1000. all the integers are 32-integers.

Output
For each case, firstly you have to print the case number as the form "Case d:", then for the S queries, you calculate if the formula can be satisfied or not. If satisfied, you print "YES", otherwise print "NO".

Sample Input
3 3 3
1 2 3
1 2 3
1 2 3
3
1
4
10

Sample Output
Case 1:
NO
YES
NO

1个回答

Can you find it? C语言
-
The Biggest Convex Hall 代码的编写
-
Find A Way 寻找道路
-
Tiles of Tetris, NOT! 怎么可以实现的
-
Catch The Heart 的程序的设计
-

-
Calculate the expression 表达式问题
-

-
Hyperspace Travel 编程的问题
-

-
-
How Many People Can Survive 程序的计算
-
C语言数字的游戏，A number game
-
A number game 数字游戏的计算
-
Harmony Forever 怎么来实现的代码呢
-
Dig The Wells 水井挖掘
-

-
Find A Way，用C语言程序怎么编写
-

GitHub开源的10个超棒后台管理面板

Git 天天用 但是 Git 原理你了解吗？
Git 原理 做技术一定要知其然知其所以然，意思就是：知道它是这样的，更知道它为什么是这样的。我主要通过4块内容来简单介绍 Git 是原理是什么样的。这4块内容如下： Git 存储目录结构介绍 Git 是如何存储的 Git 的对象 Git引用 当然 Git 原理不仅仅包含这些，想要更深入了解请查看官方教程 https://git-scm.com/book/zh/v2/。 本文内容是我在 Git...
100 个网络基础知识普及，看完成半个网络高手

C语言实现推箱子游戏

Java 的每个基本类型都对应了一个包装类型，比如说 int 的包装类型为 Integer，double 的包装类型为 Double。基本类型和包装类型的区别主要有以下 4 点。

8000字干货：那些很厉害的人是怎么构建知识体系的

Android完整知识体系路线(菜鸟-资深-大牛必进之路)