Kutevi
의견: 0
- round, 21. november 2009.
One day Mirko was cleaning up his room and found a straightedge and a
compass. He went to the school the next day and challenged his friend Slavko
to a geometric construction battle. Mirko knows how to construct some angles
using the straightedge and compass and knows how to subtract and add any
two angels he constructs. Slavko now shouts random angles and Mirko must
draw them as fast as possible.
You are observing this battle and would like to know if Mirko can construct the
angles Slavko shouts at all.
The first line of input contains two integers, \(N\) (\(1 \le N \le 10\)), number of angles Mirko knows how to construct initially and \(K\) (\(1 \le K \le 10\)), number of angles Slavko selected.
The second line of input contains \(N\) integers, all smaller than \(360\), the angles Mirko knows how to construct initially.
The third line contains \(K\) integers, all smaller than \(360\), the angles Slavko selected.
Output consist of \(K\) lines, one for each angle Slavko selected. The \(i\)-th line should contain YES if Mirko can construct the \(i\)-th angle, and NO otherwise.
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Test 1 | 10점 | None |
Test 2 | 10점 | None |
Test 3 | 10점 | None |
Test 4 | 10점 | None |
Test 5 | 10점 | None |
Test 6 | 10점 | None |
Test 7 | 10점 | None |
Test 8 | 10점 | None |
Test 9 | 10점 | None |
Test 10 | 10점 | None |
2 1
30 70
40YES1 1
100
60YES3 2
10 20 30
5 70NO
YES평가 및 의견
Kutevi
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Kutevi