add _static

This commit is contained in:
2026-04-27 09:44:16 +09:00
parent 695760da41
commit fe8128ab65
609 changed files with 107700 additions and 0 deletions

View File

@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BOJ 15889 - Offline</title>
<style>
:root {
--bg: #fafaf8;
--paper: #ffffff;
--ink: #1e1f24;
--muted: #6a6d75;
--line: #d8dce3;
--accent: #0d6e6e;
--code-bg: #f4f6fb;
}
* { box-sizing: border-box; }
body {
margin: 0;
background:
radial-gradient(circle at 15% 0%, #f0efe9 0%, transparent 42%),
radial-gradient(circle at 85% 20%, #e7f1f2 0%, transparent 38%),
var(--bg);
color: var(--ink);
font-family: "Noto Sans KR", "Pretendard", "Apple SD Gothic Neo", sans-serif;
line-height: 1.65;
}
main {
max-width: 980px;
margin: 0 auto;
padding: 24px 16px 56px;
}
.header {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 18px 20px;
margin-bottom: 18px;
}
.header h1 { margin: 0 0 6px; font-size: 1.5rem; }
.header p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.header a { color: var(--accent); text-decoration: none; }
.section {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 16px 18px;
margin-bottom: 14px;
overflow-x: auto;
}
h2 {
margin: 0 0 10px;
font-size: 1.05rem;
color: var(--accent);
border-bottom: 1px solid var(--line);
padding-bottom: 8px;
}
pre, code {
font-family: "JetBrains Mono", "Fira Code", monospace;
background: var(--code-bg);
}
pre {
padding: 12px;
border-radius: 10px;
border: 1px solid #e7ebf2;
overflow: auto;
}
blockquote {
margin: 14px 0;
padding: 16px 16px 14px 22px;
border-left: 4px solid var(--accent);
border-radius: 10px;
background: linear-gradient(90deg, #eef8f8 0%, #f9fdfd 100%);
color: #24313a;
font-weight: 600;
position: relative;
}
blockquote::before {
content: "“";
position: absolute;
left: 8px;
top: 2px;
font-size: 1.35rem;
line-height: 1;
color: #0b5f5f;
opacity: 0.7;
}
blockquote > :first-child { margin-top: 0; }
blockquote > :last-child { margin-bottom: 0; }
q {
color: #114f50;
font-weight: 700;
background: #edf8f8;
border-radius: 6px;
padding: 0 4px;
}
.math-inline math {
font-size: 1em;
vertical-align: middle;
}
.math-block {
margin: 10px 0;
padding: 8px 10px;
overflow-x: auto;
background: #f8fbff;
border: 1px solid #e2ecf8;
border-radius: 8px;
}
.math-block math {
font-size: 1.04em;
display: block;
}
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--line); padding: 6px 8px; }
img { max-width: 100%; height: auto; }
</style>
</head>
<body>
<main>
<header class="header">
<h1>호 안에 수류탄이야!!</h1>
</header>
<article class="section">
<h2>문제</h2>
<p>&ldquo;<strong>호 안에 수류탄!!</strong>&rdquo;</p>
<p>대한건아 욱제는 수류탄 투척 훈련을 받고 있다. 욱제를 필두로, 훈련장에는 욱제를 포함한 N명의 전우들이 일렬(1열 횡대 ㅎ)로 서있다. 군대에 끌려온 사실에 심술이 난 욱제는 수류탄의 안전핀을 뽑아 전우에게 던졌다. 마찬가지로 심술이 난 전우들도 욱제가 던진 수류탄을 받아 전우들에게 던지기 시작했다.&nbsp;</p>
<p>이제 수류탄은 뜨거운 감자처럼 욱제와 전우들 사이를 옮겨 다닌다. 전우들은 팔 힘이 모두 다르기 때문에 수류탄을 던질 수 있는 사거리도 모두 다르다. 욱제와 전우들이 가지고 노는 훈련용 수류탄은 바닥에 떨어지기 전에는 절대 터지지 않는 특수한 수류탄이다.</p>
<p>욱제와 전우들은 특급 전사이기 때문에 사거리 내에 있는&nbsp;누구에게나 정확히 수류탄을 던질 수 있고, 마찬가지로 정확히 날아오는 수류탄은 항상 받을 수 있다. 한 위치에 여러명의 전우가 서있다면 그 중 아무나 받아 다음 전우에게 던질 수 있다.</p>
<p>누군가의 팔 힘이 모자라 수류탄이 다음 전우에게 전달되지 못하고 바닥에 떨어지는 경우도 있을 수 있다. 이때는 &nbsp;수류탄에서 폭죽이 터지며 불꽃놀이가 시작되고, 동시에 욱제와 전우들의 영창 생활도 시작된다.</p>
<p>???: &ldquo;<strong>중대장은 오늘 너희에게 큰 실망을 했다</strong>&rdquo;</p>
<p>이 게임을 중대장님이 모르게 끝마치려면 마지막 전우(왼쪽에서부터 N번째 전우)가 수류탄을 받아 조용히 행사용 폭죽 더미에 섞어놓아야 한다. 욱제와 전우들은 항상 최선을 다해 최적의 방법으로 게임을 조용히 끝마칠 수 있도록 노력한다. 과연 영창을 건 이 게임의 끝은 어디일까?</p>
</article>
<article class="section">
<h2>입력</h2>
<p>첫째 줄에 욱제를 포함한 전우들의 인원 수 N이 주어진다. (1 &le; N &le; 30,000)</p>
<p>둘째 줄에 욱제를 포함한 N명 전우들의 좌표가 주어진다. 이는 수직선 위의 음이 아닌 정수로 표현되어 주어지며 욱제의 좌표는 항상 0이다. (0 &le; 좌표 &le; 1,000,000)</p>
<p>N이 1보다 크다면, 셋째 줄에 욱제를 포함하고 마지막 전우를 제외한 N-1명 전우들의 사거리가 욱제부터 순서대로 주어진다. N이 1이면 셋째 줄이 주어지지 않는다. (0 &le; 사거리 &le; 1,000,000)</p>
</article>
<article class="section">
<h2>출력</h2>
<p>게임이 조용히 마무리 될 수 있으면 &ldquo;<strong>권병장님, 중대장님이 찾으십니다</strong>&rdquo;를, 그렇지 않으면 &ldquo;<strong>엄마 나 전역 늦어질 것 같아</strong>&rdquo;을 출력한다.</p>
</article>
<article class="section">
<h2>예제 입력 1 복사</h2>
<pre class="sampledata" id="sample-input-1">5
0 5 10 15 100
10 5 6 100
</pre>
</article>
<article class="section">
<h2>예제 입력 2 복사</h2>
<pre class="sampledata" id="sample-input-2">5
0 5 10 15 100
10 5 6 0
</pre>
</article>
<article class="section">
<h2>예제 출력 1 복사</h2>
<pre class="sampledata" id="sample-output-1">권병장님, 중대장님이 찾으십니다
</pre>
</article>
<article class="section">
<h2>예제 출력 2 복사</h2>
<pre class="sampledata" id="sample-output-2">엄마 나 전역 늦어질 것 같아
</pre>
</article>
</main>
</body>
</html>