포럼
문제 ICPC00385

H. Headline Heat

설명

The German ICPC scene is widely considered one of the most competitive. At least, that's what we tell our students. Countless rivalries form a complex web of envy, despair, glory, and triumph woven around and manifested in the unrelenting echoes of two scoreboards – Winter Contest and GCPC. While generations of participants tend to forget the grudges of their predecessors, we coaches, acting as timeless beacons of continuity, preserve these petty conflicts between long forgotten teams. Striving for perfect balance, we express our dedication to our coaching duties in a furious outcry on social media against every unfair news article. That is, a coach gets mad if a news article is published that contains a rival university name more often than their own.

To smoothen the waves of conflict in this ocean of rage, a newly appointed authority is tasked with proofreading media coverage of GCPC and Winter Contest to prevent uneven coverage.

제약
입력 형식

The input consists of:
- One line with the number of universities \(n\), rivalries \(m\), and articles \(k\).

(\(1\leq n,m,k\leq 10^5\))
- \(n\) lines containing the name of a university \(p_i\).
- \(m\) lines containing two integers \(u,v\), meaning that universities \(u\) and \(v\) are rivals.

(\(1\leq u,v \leq n, u\neq v\))
- \(k\) lines containing a news article \(t_i\).

If a university \(u\) is a rival of university \(v\), then \(v\) is also a rival of \(u\). Moreover, there are no duplicate rivalries.

Names and articles are strings of lowercase Latin letters and spaces. The first and last character of a name or article are never a space. Names can overlap and be contained in other names.

The summed length of all names and articles is at most \(10^6\), i.e. \(\sum_{i=1}^{n} |p_i| + \sum_{i=1}^{k} |t_i| \leq 10^6\).

출력 형식

For each article, output "no" if it will draw the wrath of at least one coach and "yes" otherwise.

예제 1
입력
3 1 4
hpi
fau
kit
1 3
kit destroys hpi at wintercontest
gcpc is great
team moshpit from hpi beats kit teams
whats the abbreviation for university of erlangen nuremberg
출력
yes
yes
no
yes
예제 2
입력
6 3 5
uds
cu
tum
rwth
uni ulm
uni
4 1
2 5
1 3
last gcpc rwth had a team in top ten two places behind tum
who is team debuilding from constructor university bremen
top ten teams last year are from kit cu uds hpi tum and rwth
uni ulm cu uni ulm
sunday alright lets go
출력
no
yes
no
no
yes
문제 정보

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

출처 ICPC GCPC 2024

평가 및 의견

H. Headline Heat

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

Log in to rate problems.

개별 의견

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

풀이 제출

H. Headline Heat

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