RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00344

Niko

Unrated 레이팅 미적용
난이도
1s
시간 제한
32MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

\(6^{th}\) round, February \(7^{th}\) 2015
It is the year 2018, Russia. History repeats itself and the n\(ot-so-yo\)ung football coach Niko is leading
the national team in a clash with Brazil.
Choosing a formation is the first step when it comes to preparing the strategy for a football game.
A formation can be represented with three integers \(O\), \(V\) and \(N\), where \(O\) denotes the number of
defensive players, \(V\) denotes the number of midfielders and \(N\) denotes the number of offensive players.
It is evident that it must hold \(O + V + N = 10\).
After choosing a formation, the coach needs to carefully choose the players because not every player
is a defensive wizard or a world class striker. The coach knows his players very well. He knows which
line suits each player. Setting a player in a line he doesn’t know how to play would be tactical suicide.
The coach and his team of expertise have put together a list of formations that can be taken into
consideration against Brazil, but in all their expertise they didn’t have time to determine the formations
which they have suitable players for. Help them!

제약
입력 형식

The first line of input contains the integer \(N\) (1 ⩽\(N\) ⩽10), the number of formations taken into
consideration.
Each of the following \(N\) lines contains the formation given as \(O-V -N\). The numbers \(O\), \(V\) i \(N\) are
positive integers and it holds \(O + V + N = 10\).
The following line contains the integer \(M\) (10 ⩽\(M\) ⩽22), the number of players who want to join the
national team.
The \(i\)^{th} of the following \(M\) lines contains the list of lines that the \(i\)^{th} player can play in. Letter ‘O’
denotes defense, letter ‘V’ midfield positions and letter ‘N’ offense.

출력 형식

Output exactly \(N\) lines. The \(i\)^{th} line of output should be “DA” if the coach has suitable players for the
\(i\)^{th} formation from the input, or “NE” if he doesn’t.
\(6^{th}\) round, February \(7^{th}\) 2015

예제 1
입력
2
4-4-2
10-0-0
10
O
O
O
O
O
O
O
O
ON
NO
3
4-4-2
3-5-2
4-3-3
11
OV
OV
OVN
OV
OV
V
V
N
O
O
O
출력
output
NE
DA
DA
DA
NE
설명

Clarification of the first example: We see that Niko has almost only defensive players at his service, so he
can only use the formation 10-0-0, the infamous “parking the bus”.
Clarification of the second example:
For formation 4-4-2, he can put players 1, 2, 9 and 10 as defense,
players 4, 5, 6 and 7 as midfielders, and players 3 and 8 as offense. For formation 3-5-2, he can put players 4, 9
and 10 as defense, players 1, 2, 5, 6 and 7 as midfielders, and players 3 and 8 as offense. Formation 4-3-3 can’t
be set up because the coach has only 2 offensive players.

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2014/2015 Contest 6

평가 및 의견

Niko

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Niko

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8