question_id stringlengths 6 6 | content stringlengths 1 27.2k |
|---|---|
p01331 |
<h1><font color="#000">Problem K:</font> ワープホール</h1>
<p>20XX年、遠く離れた場所に対する効率的な物質転送方式が確立され、人類の宇宙への進出はますます加速されることになった。この転送方式は、より遠くに物質を転送しようとすると、原則的により大きな物質の転送が可能になる点で革新的であった。転送方式の詳細を次に記す。</p>
<p>まず転送対象となる物質は、スタート座標(1, 1)にて単位質量毎のパーティクルに分割される。各パーティクルには、各々異なる波動エネルギーが与えられなければならない。波動エネルギーは、<i>V</i>と<i>H</i>からなる任意の長さの文字列で表現さ... |
p01624 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script>
<!--
<h3><u>Ononokomachi's Edit War</u></h3>
-->
<!-- end en only -->
<!-- begin ja only -->
<h1><u>小野小町の編集合戦</u></h1>
<!-- end ja only -->
<!-- begin en only -->
<!--
<p>
English text is not available in this practice contest.
</p>
-->
<!-- end en only -->... |
p03619 | <span class="lang-en">
<p>Score : <var>900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>In the city of Nevermore, there are <var>10^8</var> streets and <var>10^8</var> avenues, both numbered from <var>0</var> to <var>10^8-1</var>.
All streets run straight from west to east, and all avenues... |
p00936 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
</script>
<h2>Problem B
Squeeze the Cylinder... |
p01274 |
<H1><font color="#000">Problem B:</font> Magic Slayer</H1>
<p>
You are in a fantasy monster-ridden world. You are a slayer fighting against the monsters with magic
spells.
</p>
<p>
The monsters have <i>hit points</i> for each, which represent their vitality. You can decrease their hit points
by your magic spells: ea... |
p03249 | <span class="lang-en">
<p>Score : <var>900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given a sequence <var>D_1, D_2, ..., D_N</var> of length <var>N</var>.
<strong>The values of <var>D_i</var> are all distinct.</strong>
Does a tree with <var>N</var> vertices that satisfies the f... |
p02008 | <h1>Problem E. Magic Triangles</h1>
<!--
Time Limit: 2 sec
Memory Limit: 512 MB
-->
<p>
Fallen angel Yohane plans to draw a magic symbol composed of triangles on the earth. By casting some magic spell on the symbol, she will obtain magic power; this is the purpose for which she will draw a magic symbol. The magic ... |
p00035 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>凸?</H1>
<p>
平面上の異なる 4 点 $A (x_a, y_a)$, $... |
p02458 | <h1>Multi-Set</h1>
<p>
For a set $S$ of integers, perform a sequence of the following operations. Note that <u>multiple elements can have equivalent values in $S$</u>.
</p>
<ul>
<li>insert($x$): Insert $x$ to $S$ and report the number of elements in $S$ after the operation.</li>
<li>find($x$): Report the numbe... |
p00465 |
<H1> 認証レベル </H1>
<h2>問題</h2>
<p>
あなたは Just Odd Inventions 社を知っているだろうか? この会社の業務は「ただ奇妙な発明 (just odd inventions)」をすることである.ここでは略して JOI 社と呼ぶ.
</p>
<p>
JOI 社には 2 つの事務所があり,それぞれ同じ大きさの正方形の部屋がマス目状に並んでできている.辺で接しているすべての部屋の間に,身分証による認証機能の付いた扉がある.JOI 社では様々なレベルの機密情報を扱っているため,部屋ごとに機密レベルという正の整数が設定されており,身分証の事務所ごとに定められた非負整数の認証レベルが,機密... |
p01960 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], skipTags: ["script","noscript","style","textarea","code"], processEscapes: true }});
</script>
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config... |
p00672 |
<h1>Problem D: Dimensional Analysis</h1>
<p>
量の次元とは、相異なる量の間の関係式から具体的数値を無視して量の種類とそのべき乗だけに着目した概念である。具体的には定数係数を無視した等式として、次元の関係式を表す。すなわち、量 q の次元を[ q ]と表せば、以下のようないくつかの次元の関係式が例示できる。</p>
<ul>
<li>[面積] = [長さ]<sup>2</sup></li>
<li>[体積] = [長さ]<sup>3</sup></li>
<li>[速さ] = [長さ][時間]<sup>-1</sup></li>
<li>[加速度] = [長さ][時間]<sup>-2</... |
p00388 | <h1>Design of a Mansion</h1>
<p>
Our master carpenter is designing a condominium called Bange Hills Mansion. The condominium is constructed by stacking up floors of the same height. The height of each floor is designed so that the total height of the stacked floors coincides with the predetermined height of the condo... |
p00222 |
<H1>四つ子素数</H1>
<p>
(<var>a, a+2, a+6, a+8</var>) のように並んだ 4 つの素数の組を四つ子素数といいます。四つ子素数を構成する四つの素数のうち、最大の数をその四つ子素数の大きさと呼びます。例えば、最も小さい大きさの四つ子素数は、(5, 7, 11, 13) の組であり、その大きさは 13 です。次に大きい四つ子素数は、(11, 13, 17, 19) の組で、その大きさは 19 です。
</p>
<p>
整数 <var>n</var> (13 ≤ <var>n</var> ≤ 10,000,000) を入力とし、大きさが <var>n</var> 以下にな... |
p01063 |
<h1>Rubik Dungeon</h1>
<h2>Problem</h2>
<p>
あなたは<var>n</var> × <var>n</var> × <var>n</var>の立方体のルービックキューブ型のダンジョンにやってきた。<br>
あなたは現在(<var>x<sub>1</sub></var>,<var>y<sub>1</sub></var>,<var>z<sub>1</sub></var>)の部屋にいる。<br>
目標の宝は(<var>x<sub>2</sub></var>,<var>y<sub>2</sub></var>,<var>z<sub>2</sub></var>)の部屋にある。<br>
あなたは隣接... |
p01599 |
<h2>Problem I: Train King</h2>
<p>Roland has been given a mission of dangerous material transfer by Train
King. The material is stored in the station A and subject to being transferred
to the station B. He will bring it by direct trains between A and B, one (or
zero) unit per ride.</p>
<p>Your task is to write a pro... |
p01433 |
<script type="text/javascript" src="./varmath.js" charset="UTF-8"></script>
<h2>問題文</h2>
<p>
人魚の魔女 KLARISSA はコンサートホールの中で在りし日の感動を夢見つづけている.彼女の運命の車輪は具現化し,コンサートホールの中で転がり続けている.
</p>
<p>
<i>佐倉杏子</i>はその運命の車輪が円ではなくカラフルな正方形であることに気がついた.運命の車輪はコンサートホールの西から東へ転がろうとしている.<i>佐倉杏子</i>は運命の車輪がある所まで転がったときにその上に飛び移ることにした.そこで飛び移るべき面の色を知り,飛び... |
p01126 |
<h1>Amida, the City of Miracle</h1>
<p>
奇跡の都市アミダ(Amida, the City of Miracle)の市長は他の市のように選挙で選ぶのではない.かつて長い政権闘争と天変地異により疲弊したこの都市は,候補者全員を公平に選び,かつ幸運の星の下に生まれた者を市長にするために,候補者全員の運命をくじにゆだねることにしたのである.後にあみだくじと呼ばれるくじである.
</p>
<p>
選挙は以下のように行われる.候補者数と同数の長い縦線が引かれ,さらにいくつかの横線がそこに引かれる.横線は隣接した縦線の途中同士を結ぶように引かれる.いずれかの縦線の下には「当選」と書かれている.どの縦... |
p01576 |
<H1><font color="#000">Problem F:</font> Exciting Bicycle</H1>
<p>
You happened to get a special bicycle. You can run with it incredibly fast because it has a turbo engine. You can't wait to try it off road to enjoy the power.
</p>
<p>
You planned to go straight. The ground is very rough with ups and downs, and can ... |
p03818 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke has decided to play a game using cards.
He has a deck consisting of <var>N</var> cards. On the <var>i</var>-th card from the top, an integer <var>A_i</var> is written.</p>
<p>He will perform the o... |
p01825 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
</script>
<h2>Problem H:
Laser Cutter
</h2>... |
p00737 |
<h1><font color="#000000">Problem D:</font> Twirling Robot </h1>
<!-- end en only -->
<!-- begin en only -->
<p>
Let's play a game using a robot on a rectangular board
covered with a square mesh (Figure D-1).
The robot is initially set at the start square in the northwest corner
facing the east direction.
The goal... |
p00367 | <!--<H1>Breakfast, Lunch and Supper</H1>-->
<h1>Three Meals</h1>
<p>
You are running a restaurant that serves dishes only three times a day. Each of your customer has his/her own separate time zones for eating breakfast, lunch and supper. Thus, your customer enjoys your dish only when he/she visits your restaurant to ... |
p03398 | <span class="lang-en">
<p>Score : <var>1600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Let <var>X = 10^{100}</var>. Inaba has <var>N</var> checker pieces on the number line, where the <var>i</var>-th checker piece is at coordinate <var>X^{i}</var> for all <var>1 \leq i \leq N</var>.</p>
... |
p03662 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Fennec and Snuke are playing a board game.</p>
<p>On the board, there are <var>N</var> cells numbered <var>1</var> through <var>N</var>, and <var>N-1</var> roads, each connecting two cells. Cell <var>a_... |
p02970 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> apple trees in a row. People say that one of them will bear golden apples.</p>
<p>We want to deploy some number of inspectors so that each of these trees will be inspected.</p>
<p... |
p03232 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> blocks arranged in a row, numbered <var>1</var> to <var>N</var> from left to right.
Each block has a weight, and the weight of Block <var>i</var> is <var>A_i</var>.
Snuke will per... |
p02589 | <span class="lang-en">
<p>Score : <var>700</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Limak can repeatedly remove one of the first two characters of a string,
for example <var>abcxyx \rightarrow acxyx \rightarrow cxyx \rightarrow cyx</var>.</p>
<p>You are given <var>N</var> different... |
p02073 | <style type="text/css">
blockquote {
font-family: Menlo, Monaco, "Courier New", monospace;
display: block;
margin: 10px 0 10px 30px;
font-size: 16px;
line-height: 18px;
white-space: pre;
white-space: pre-wrap;
word-break: break-all;
word-wrap: ... |
p02423 | <h1>Bit Operation I</h1>
<p>
Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely.
</p>
<ul>
<li>Inversion: change the state of each bit to the opposite state</li>
<li>Logical left shift: shift left by 1</... |
p02136 | <h1>Problem M: Manhattan Bomb</h1>
<h2>Problem</h2>
<p>
2次元平面上に$n$個の爆弾がある。爆弾にはそれぞれ1から$n$までの番号が割り振られており、$i$番目の爆弾は座標$(x_i,y_i)$に存在している。<br>
なお、どの爆弾も原点からのマンハッタン距離が等しいことが分かっている。<br>
$i$番目の爆弾が爆発したとき、座標$(x_i,y_i)$からのマンハッタン距離が$r_i$以内の座標に存在している爆弾も連鎖的に爆発する。<br>
$n$個の爆弾それぞれについて、その爆弾のみに着火した場合に、爆発せずに残る爆弾の個数を求めよ。
</p>
<h2... |
p02566 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given a string of length <var>N</var>. Calculate the number of distinct substrings of <var>S</var>.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 \leq N ... |
p03727 | <span class="lang-en">
<p>Score : <var>1400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a tree with <var>N</var> vertices numbered <var>1</var> through <var>N</var>.
The <var>i</var>-th of the <var>N-1</var> edges connects vertices <var>a_i</var> and <var>b_i</var>.</p>
<p>Initia... |
p02835 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Given are three integers <var>A_1</var>, <var>A_2</var>, and <var>A_3</var>.</p>
<p>If <var>A_1+A_2+A_3</var> is greater than or equal to <var>22</var>, print <code>bust</code>; otherwise, print <code>w... |
p00808 |
<H1><font color="#000">Problem F:</font> Young, Poor and Busy</H1>
<p>
Ken and Keiko are young, poor and busy. Short explanation: they are students, and ridden with part-time jobs. To make things worse, Ken lives in Hakodate and Keiko in Tokyo. They want to meet, but since they have neither time nor money, they have ... |
p03377 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are a total of <var>A + B</var> cats and dogs.
Among them, <var>A</var> are known to be cats, but the remaining <var>B</var> are not known to be either cats or dogs.</p>
<p>Determine if it is poss... |
p03459 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>AtCoDeer the deer is going on a trip in a two-dimensional plane.
In his plan, he will depart from point <var>(0, 0)</var> at time <var>0</var>, then for each <var>i</var> between <var>1</var> and <var>N... |
p01464 |
<H1>Sunny Graph</H1>
<p>
The Sun is a great heavenly body.
The Sun is worshiped by various religions.
Bob loves the Sun and loves any object that is similar to the Sun.
He noticed that he can find the shape of the Sun in certain graphs.
He calls such graphs "Sunny".
</p>
<p>
We define the property "Su... |
p03009 | <span class="lang-en">
<p>Score : <var>800</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> squares arranged in a row, numbered <var>1</var> to <var>N</var> from left to right. Takahashi will stack building blocks on these squares, on which there are no blocks yet.</p>
<... |
p01034 | <h1>Problem H: Yu-kun Likes a Directed Graph</h1>
<h2>Background</h2>
<p>
会津大学付属幼稚園はプログラミングが大好きな子供が集まる幼稚園である。園児の一人であるゆう君は、プログラミングと同じくらいお絵描きが大好きだ。
これまでゆう君は、丸と矢印で沢山絵を書いてきた。矢印は必ず丸と丸を結ぶようにして描いてある。ある日ゆう君はこれらの絵がグラフであることを知る。
</p>
<p>
丸は頂点と呼ばれ、矢印は辺と呼ばれているらしい。更にゆう君は、矢印を描く際に、必ずその上に1つ正の整数を書いていた。このように、辺に重みがあり有向な辺からなるグラフは重み付き有向グラフ... |
p00275 |
<H1>坊主めくりの結末</H1>
<p>
百人一首の札を使った遊戯の1つに、「坊主めくり」というものがあります。絵札だけを使う簡単な遊戯なので広く楽しまれています。きまりには様々な派生型がありますが、ここで考える坊主めくりはN人の参加者で、以下のようなルールで行います。
</p>
<ul>
<li> 64枚の「男」、15枚の「坊主」、21枚の「姫」、計100枚の札を使う。</li>
<li> 絵が見えないように札を裏がえしにしてよく混ぜ、「札山」をつくる。</li>
<li> 参加者の一人目から順番に1枚ずつ札山の札を引く。N人目の次は、また一人目から繰り返す。
<ul>
<li> 引いた札が男なら、引い... |
p02248 |
<H1>String Search</H1>
<p>
Find places where a string <var>P</var> is found within a text <var>T</var>.
Print all indices of <var>T</var> where <var>P</var> found. The indices of <var>T</var> start with 0.
</p>
<H2>Input</H2>
<p>
In the first line, a text <var>T</var> is given. In the second line, a string ... |
p01937 |
<!-- - - - - - begin nicebody - - - - - -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} });
</script>
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<h... |
p00625 |
<H1><font color="#000000">Problem E:</font> Frisbee Dogs</H1>
<p>
クレインは, 彼女の愛犬である Jack をフリスビードッグ大会に出場させようとしている. しかし, 彼女は Jack がよい成績を取れるか自信が無い. 彼女のために, 大会をシミュレートして Jack の成績を見積もるプログラムを作成してほしい.
</p>
<p>
この大会は, 2次元平面上にいる N 匹の犬によって行われる. 大会の開始時点において, <i>i</i> 番目の犬は (<i>D<sub>i</sub>x</i>, <i>D<sub>i</sub>y</i>) の位置にいる. <... |
p02618 | <span class="lang-en">
<div class="part">
<section>
<h3>Problem Statement</h3><p>AtCoder currently hosts three types of contests: ABC, ARC, and AGC. As the number of users has grown, in order to meet the needs of more users, AtCoder has decided to increase the number of contests to 26 types, from AAC to AZC. For conven... |
p00330 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>ワード</H1>
<p>
コンピュータで扱われるデータの最小単位をビット(bit... |
p01872 |
<h2>A: マイナンバー - My Number -</h2>
<h3>問題</h3>
<p>いっけなーい!遅刻遅刻!</p>
<p>あっ!私、今日から憧れのこの会社で働くことになったんだ!</p>
<p>それなのに、初日から寝坊だなんて…!?</p>
<p>今日は会社にマイナンバーを教えなければならない大切な日なのに…!</p>
<p>みんな知っていると思うけれど、一応マイナンバーの説明をするね!</p>
<p>マイナンバーは行政手続きにおける個人を識別するために用いられる <var>12</var> 桁からなる数字列 (<var>P_{11} P_{10} P_{9}</var> ... <var>P_{1... |
p00760 |
<h1>Millennium</h1>
<p>
A wise king declared a new calendar. "Tomorrow shall be the first day of the calendar, that is, the day 1 of the month 1 of the year 1. Each year consists of 10 months, from month 1 through month 10, and starts from a <i>big month</i>. A common year shall start with a big month, followed by... |
p01521 |
<h1>B - 簡易オセロ</h1>
<h2>問題文</h2>
<p>
B君はオセロが大好きである (オセロのルールについては<a href="http://ja.wikipedia.org/wiki/%E3%82%AA%E3%82%BB%E3%83%AD_(%E9%81%8A%E6%88%AF)">Wikipediaのオセロのページ</a>を参照せよ.「パス」についても Wikipedia に書かれているとおり,駒を打つことができない場合のみパスできるものとし,パスの回数に制限は無いものとする.)
B君は駒の初期配置によってゲームの結果がどのように変わるのかに興味がある.
しかしいきなり 2 次元の盤面で考えるのは難しい... |
p01171 |
<H1><font color="#000">Problem A:</font> Everlasting...?</H1>
<p>
Everlasting Sa-Ga, a new, hot and very popular role-playing game, is out on October 19, 2008.
Fans have been looking forward to a new title of Everlasting Sa-Ga.
</p>
<p>
Little Jimmy is in trouble. He is a seven-year-old boy, and he obtained the Everl... |
p02474 | <h2>Multiplication of Big Integers</h2>
<p>
Given two integers $A$ and $B$, compute the product, $A \times B$.
</p>
<h3>Input</h3>
<p>
Two integers $A$ and $B$ separated by a space character are given in a line.
</p>
<h3>Output</h3>
<p>
Print the product in a line.
</p>
<h3>Constraints</h3>
<ul>
<li>$-1 ... |
p00449 |
<H1>船旅 </H1>
<h2>問題</h2>
<p>
JOI国には,n 島の島があり,各島には 1 から n までの番号が付けられている.現在,JOI国では各島の間を結ぶ航路網の整備が進んでいる.
</p>
<p>
あなたは,船舶の切符を扱っているチケットセンターに勤務している.JOI国には船舶を使って,できる限り安価に,島と島の間を旅行したいと考えている人が沢山おり,彼らは,出発地と目的地を注文票に記入して,あなたのところに送ってくる.
</p>
<p>
あなたの仕事は,客から注文票を受け取ったらすぐに,いくつかの船舶を乗り継いで,出発地と目的地を結ぶ航路の中で,もっとも安価な運賃を計算し,客に伝えることである.
た... |
p02024 | <h2>J: 都 (City)</h2>
<p>サンタはある都にプレゼントを届けることにした。</p>
<p>この都は南北 $H$ 区画 × 東西 $W$ 区画に分けられた長方形の形をしており、各区画にプレゼントを届ける家が 1 つずつある。</p>
<p>北から数えて $X$ 番目、西から数えて $Y$ 番目の区画を $(X, Y)$ で表す。</p>
<p>サンタは次の条件で移動する。</p>
<ul>
<li>はじめに区画 $(S, T)$ に降り、この場所からスタートする。</li>
<li>1 回の移動で東西南北に隣り合う区画に移動でき、街の外には移動できない。</li>
<li>1 度訪ねた区画には、2 度と入ら... |
p00019 |
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a ... |
p01258 |
<H1><font color="#000">Problem I:</font> Memory Match</H1>
<p>
Memory match is a single-player game which employs a set of 2<i>M</i> cards. Each card is labeled with a
number between 1 and <i>M</i> on its face. For each number <i>i</i> (1 ≤ <i>i</i> ≤ <i>M</i>), there are exactly two cards which
have the number... |
p03265 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a square in the <var>xy</var>-plane. The coordinates of its four vertices are <var>(x_1,y_1),(x_2,y_2),(x_3,y_3)</var> and <var>(x_4,y_4)</var> in counter-clockwise order.
(Assume that the posi... |
p01608 |
<h2>1</h2>
<h2>Problem Statement</h2>
<p>長さ<var>n</var>のビット列がある.</p>
<p>左から<var>i</var>番目のビットが1のとき,スコアを<var>a_i</var>点得られる.<br />
左から<var>i</var>番目のビットを中心に距離<var>w</var>以内にある1の個数(<var>=|\{j \in \{1,...,n\}∩\{i-w,...,i+w\} | 左から</var>j<var>番目のビットが1\}|</var>)が奇数のとき,スコアを<var>b_i</var>点得られる.</p>
<p>スコアを最も多く得られるようなビット... |
p03635 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>In <em>K-city</em>, there are <var>n</var> streets running east-west, and <var>m</var> streets running north-south. Each street running east-west and each street running north-south cross each other. We... |
p02927 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Today is August <var>24</var>, one of the five Product Days in a year.</p>
<p>A date <var>m</var>-<var>d</var> (<var>m</var> is the month, <var>d</var> is the date) is called a Product Day when <var>d</... |
p03320 | <span class="lang-en">
<p>Score : <var>500</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Let <var>S(n)</var> denote the sum of the digits in the decimal notation of <var>n</var>.
For example, <var>S(123) = 1 + 2 + 3 = 6</var>.</p>
<p>We will call an integer <var>n</var> a <strong>Snuke numb... |
p03770 | <span class="lang-en">
<p>Score : <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke arranged <var>N</var> colorful balls in a row.
The <var>i</var>-th ball from the left has color <var>c_i</var> and weight <var>w_i</var>.</p>
<p>He can rearrange the balls by performing the follo... |
p02862 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a knight - the chess piece - at the origin <var>(0, 0)</var> of a two-dimensional grid.</p>
<p>When the knight is at the square <var>(i, j)</var>, it can be moved to either <var>(i+1,j+2)</var>... |
p02161 | <h1>Problem M: 1333</h1>
<h2>Problem</h2>
<p>
長さ$N$の文字列$S$が与えられる。
以下のクエリを$Q$回処理せよ。<br>
<br>クエリ<br>
$S[L: R]$を$S$の$L$文字目から$R$文字目まで(両端を含む)からなる文字列とする。<br>
$ S[L: R] $を適当な文字列$A,B,C,X$を用いて$AXBXCX(1 \leq |A|,|B|,|C|,|X|)$ と表すことを考え、そのような$X$の中で最長のものの長さを出力する。<br>
ただし、そのような$X$が存在しない場合は代わりに0を出力する。<br>
</p>
<h2>I... |
p00633 |
<H1><font color="#000000">Problem 07:</font> Crop Circle</H1>
<p>
アルゼンチンの広大な農地に突如ミステリーサークルが出没した。ミステリーサークルは重なっているもの、ポツンとあるもの、大きいもの、小さいものと合計 <i>n</i> 個確認された。
</p>
<p>
あるミステリーハンターが空中からミステリーサークルの全体像を撮影しようと試みたところ、各円の輪郭がはっきりしていなかったため、映像にその美しい模様を映し出すことが難しいことが分かった。
</p>
<p>
そこで、そのミステリーハンターは輪郭に沿って特殊素材の紐を設置し、輪郭を強調する提案をした。
<... |
p01921 |
<link rel="stylesheet" href="css/description.css" type="text/css" />
<script language="JavaScript" type="text/javascript" src="js/varmath2017.js" charset="UTF-8"></script>
<h2>F: 木を隠すのなら森の中</h2>
<h3>物語</h3>
<p>
「木はいいです」
喫茶店「タートルハウス」を経営するチコちゃんは、木に並々ならぬ愛情を持っている。なんでも、木の不動のあり方に心が洗われるらしい。。。そんなチコちゃんの木への愛情を確かめるため、同じ喫茶店で... |
p00263 |
<H1>金剛の型</H1>
<p>
以下のように、右から 7 ビット分が小数部、続く24 ビット分が整数部で、一番左の 1 ビット分を符号部とする 32 ビット実数型を考える(b<sub>1</sub>, ... , b<sub>32</sub> は 0 か1 を表す)。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_kongoType1" width="780">
</center><br/>
<p>
この形式を、人が理解しやすい 10 進数表現に直すときは、以下のように解釈する。<br/>
&n... |
p00799 |
<H1><font color="#000">Problem D:</font> Pump up Batteries</H1>
<p>
Bill is a boss of security guards. He has pride in that his men put on wearable computers on their
duty. At the same time, it is his headache that capacities of commercially available batteries are
far too small to support those computers all day lon... |
p01022 | <h1>Problem G: Yu-kun Likes Building Block</h1>
<h2>Background</h2>
<p>
会津大学付属幼稚園はプログラミングが大好きな子供が集まる幼稚園である。園児の一人であるゆう君はプログラミングと同じくらい長方形の積み木が大好きだ。
そんなゆう君は、最近積み木で山を作る遊びに熱中している。
</p>
<p>
今日もゆう君は山を作って遊んでいたのだが、持っている積み木で沢山の山を作る事は簡単なので、今日は全ての積み木を使って出来る山の数を最小化しようと考えた。
そこでゆう君は、実際に全ての積み木を使って山を作った後、本当にその山の数が最小になっているのかどうかを確かめるため... |
p01472 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], skipTags: ["script","noscript","style","textarea","code"], processEscapes: true }});
</script>
<script language="JavaScript" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?con... |
p01188 |
<H1><font color="#000">Problem H:</font> Slippy Floors</H1>
<p>
The princess of the Fancy Kingdom has been loved by many people for her lovely face. However the
witch of the Snow World has been jealous of the princess being loved. For her jealousy, the witch has
shut the princess into the Ice Tower built by the witch... |
p01167 |
<H1><font color="#000">Problem E:</font> Alice in Foxland</H1>
<p>
<i>
- The world is made of foxes; people with watchful eyes will find foxes in every
fragment of the world.
</i>
</p>
<p>
</i>Defoxyrenardnucleic Acids</i> (or DNAs for short) and <i>Renardnucleic Acids</i> (or RNAs) are similar
organic molecules con... |
p01537 |
<h1> Code Art Online</h1>
<h2> G: コードアートオンライン</h2>
<p>
コードアートオンライン(CAO)は,様々な問題をプログラミングによって解くことにより,冒険を進めて行くオンラインRPGである.
CAOは,世界初のバーチャルリアリティ空間を実現したゲームであったこともあり,大人気の内に完売し,ゲームを購入したユーザ達はこの世界を楽しむはずであった.
しかし,ゲームにダイブしたプレイヤー達は,ゲームマスターから恐るべき託宣を聞かされる.
</p>
<p>
「君たちプレイヤーの内の誰かが,ラストダンジョンのラストプロブレムを解かない限り,この仮想空間から抜け出すことはできない.そして,この世... |
p00776 |
<h3>Encryption System</h3>
<p>
A programmer developed a new encryption system.
However, his system has an issue that
two or more distinct strings are `encrypted' to the same string.
</p>
<p>
We have a string encrypted by his system.
To decode the original string, we want to enumerate all the candidates of the stri... |
p01864 |
<!--<script language="JavaScript" type="text/javascript" src="js/varmath.js" charset="UTF-8"></script>-->
<h2>G: 旅費支給 - Travel Support -</h2>
<h3>物語</h3>
<p>私,香坂穂乃果16歳!学生アイドルをやっています!!</p>
<p>学生アイドルの良さをみんなに伝えるためのライブをやろうと,たくさんの学生アイドルの人たちを呼んでアキバスタジアムでライブをします.</p>
<p>だけど,遠くから来るライブ参加者もいてとっても電車賃がかかるの.だからu’sのメンバーでバイトをして... |
p03859 | <span class="lang-en">
<p>Score : <var>900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a string <var>S</var> of length <var>N</var> consisting of characters <code>0</code> and <code>1</code>. You will perform the following operation for each <var>i = 1, 2, ..., m</var>:</p>
<ul>
... |
p00326 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>スケジューラ</H1>
<p>
あなたはユニークなオペレーティングシステム「ウン... |
p02931 | <span class="lang-en">
<p>Score : <var>800</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> cards placed on a grid with <var>H</var> rows and <var>W</var> columns of squares.</p>
<p>The <var>i</var>-th card has an integer <var>A_i</var> written on it, and it is placed on... |
p03623 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke lives at position <var>x</var> on a number line.
On this line, there are two stores <var>A</var> and <var>B</var>, respectively at position <var>a</var> and <var>b</var>, that offer food for deliv... |
p03789 | <span class="lang-en">
<p>Score : <var>1300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We will call a non-negative integer <em>increasing</em> if, for any two adjacent digits in its decimal representation, the digit to the right is greater than or equal to the digit to the left.
For exam... |
p03273 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a grid of squares with <var>H</var> horizontal rows and <var>W</var> vertical columns.
The square at the <var>i</var>-th row from the top and the <var>j</var>-th column from the left is represe... |
p02032 | <h2>C: 約数ゲーム / Divisor Game</h2>
<h3>問題</h3>
<p>tsutaj くんは約数ゲームで遊ぼうとしています。</p>
<p>約数ゲームでは、まず <var>2</var> 以上の自然数 <var>N</var> が与えられ、その後は以下の手順でゲームが進んでいきます。</p>
<ul>
<li> <var>N</var> 以外の <var>N</var> の約数の中から、整数を <var>1</var> つ宣言する。ただしこのとき、既に宣言したことがある整数の約数になるものは宣言できない。</li>
<li> 宣言できる整数がある限りこれを繰り返し、宣言できるものがなければゲームは終了す... |
p02198 | <h2>アルミ缶の上にあるミカン (Oranges on Cans)</h2>
<p>square1001 君は、テーブルにアルミ缶を $N$ 缶置きました。</p>
<p>E869120 君は、テーブル上のそれぞれのアルミ缶の上に $M$ 個ずつミカンを乗せました。</p>
<p>アルミ缶の上に乗っているミカンは全部で何個ありますか?</p>
<h3>入力</h3>
<p>入力は以下の形式で標準入力から与えられる。</p>
<pre>
$N$ $M$
</pre>
<h3>出力</h3>
<p>アルミ缶の上に乗っているミカンの数を 1 行で出力してください。</p>
<p>ただし、最後には改行を入れること。</p>
<h3>制約<... |
p02462 | <h1>Multi-Map</h1>
<p>
For a dictionary $M$ that stores elements formed by a pair of a string key and an integer value, perform a sequence of the following operations. Note that <u>multiple elements can have equivalent keys</u>.
</p>
<ul>
<li>insert($key$, $x$): Insert an element formed by a pair of $key$ and $x$ ... |
p02177 | <h1>C: 同値命題</h1>
<h2>問題</h2>
<p>
$N$ 個の命題があり, それぞれ $1, 2, \cdots,N$ という名前がついている. </br>
また, 命題に関する情報が $M$ 個与えられる. $i$ 番目の情報は「$a_i$ $b_i$」という形式で与えられ, これは $a_i$ ならば $b_i$ であることを表す.(「ならば」は論理包含であり、推移律が成り立つ)</br>
各命題 $i$ に対して $i$ と同値な命題を全て昇順に出力せよ.</br>
ただし命題 $i$ と命題 $i$ は常に同値である.</br>
命題 $X$ と命題 $Y$ が同値とは,「$X$ ... |
p00849 |
<H1><font color="#000">Problem E:</font> Manhattan Wiring</H1>
<p>
There is a rectangular area containing <i>n</i> × <i>m</i> cells. Two cells are marked with "2", and another two with "3". Some cells are occupied by obstacles. You should connect the two "2"s and also the two "3"s with non-intersecting lines. L... |
p02874 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p><var>10^9</var> contestants, numbered <var>1</var> to <var>10^9</var>, will compete in a competition.
There will be two contests in this competition.</p>
<p>The organizer prepared <var>N</var> problems,... |
p03766 | <span class="lang-en">
<p>Score : <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>How many infinite sequences <var>a_1, a_2, ...</var> consisting of {<var>{1, ... ,n}</var>} satisfy the following conditions?</p>
<ul>
<li>The <var>n</var>-th and subsequent elements are all equal. Tha... |
p03336 | <span class="lang-en">
<p>Score : <var>2400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi and Aoki love calculating things, so they will play with numbers now.</p>
<p>First, they came up with one positive integer each. Takahashi came up with <var>X</var>, and Aoki came up with <va... |
p01425 |
<H1>White Bird</H1>
<p>
Angry Birds is a mobile game of a big craze all over the world.
You were convinced that it was a waste of time to play the game, so you decided to create an automatic solver.
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE_2308-bird-3">
</center>
<p>
You are ... |
p03418 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi had a pair of two positive integers not exceeding <var>N</var>, <var>(a,b)</var>, which he has forgotten.
He remembers that the remainder of <var>a</var> divided by <var>b</var> was greater th... |
p01075 |
<h1>Problem D: One-Time Path</h1>
<h2>Problem</h2>
<p>
<var>N</var>個の島と<var>M</var>本の橋がある。
<var>N</var>個の島にはそれぞれ1から<var>N</var>までの番号が割り振られている。
<var>M</var>本の橋にもそれぞれ1から<var>M</var>までの番号が割り振られている。
</p>
<p>
がっちょ君は現在(時刻0の時点で)、1番目の島にいる。
がっちょ君は<var>i</var>番目の橋を利用することにより、<var>a<sub>i</sub></var>番目の島から<var>b<sub>i</sub></... |
p03048 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke has come to a store that sells boxes containing balls. The store sells the following three kinds of boxes:</p>
<ul>
<li>Red boxes, each containing <var>R</var> red balls</li>
<li>Green boxes, each... |
p02209 | <h2>カードはおやつに入りますか?(Are Cards Snacks?)</h2>
<p>square1001君は $N$ 枚のカードを持っています。</p>
<p>これらのカードにはそれぞれ整数が書かれており、$i$ 枚目のカードに書かれている整数は $A_i$ です。</p>
<p>square1001君の今日の乱数は $K$ です。square1001君はこれらの $N$ 枚のカードの中から何枚かのカードを選び、合計が $K$ となるようにしたいです。</p>
<p>この様子を見ていたE869120君は、これを阻止したいと考えました。</p>
<p>具体的には、事前に何枚かのカードを食べることで、square1001 君がど... |
p00234 |
<H1>会津の埋蔵金</H1>
<p>
会津には古くから伝わる埋蔵金の伝説があります。あなたは、遂に埋蔵金が埋まっている場所を突き止めました。埋蔵金が埋まっている深さ、掘り進める地層の状態が分かっているので、綿密に計画を立てれば最小費用で埋蔵金まで到達することができます。そこであなたは、地層の状態を読み取って埋蔵金の埋まっている深さまで最小費用で到達するルートを算出するプログラムを作成することにしました。
</p>
<p>地層の状態は 2 次元格子状に配置されたセルで表わされ、各セルの位置は座標 (x,y) で表されます。左上を (1,1) とし、x 座標は右に行くにつれて大きくなり、y 座標は下に深くなるにつれて大きく... |
p02659 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Compute <var>A \times B</var>, truncate its fractional part, and print the result as an integer.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>0 \leq A \leq 10^{15... |
p00664 |
<H1>Problem F: Cosmic Market</H1>
<p>
Cosmic market(コズミック・マーケット)、通称コズミケ、は全宇宙最大規模の同人即売会だ。
コズミケにはあらゆるジャンルの同人愛好家達が集う。
近年、コズミケへの来場者は増加傾向にある。
最初から全ての人が入場できると大変混雑して危険なので、開場直後は入場規制を行っている。
ある一定人数の人だけが開場と同時に入場することが出来るのだ。
それ以外の人たちはしばらく待ってからの入場となっている。
</p>
<p>
しかし先着順に会場に入ることにすると、徹夜で前日から並ぶ人が出てしまう。
コズミケの参加者には未成年も多く、治安上の問題もあるので先... |
p01976 | <h1>C: 一致</h1>
<h2>問題</h2>
<p>
長さ $N$ の数列 $a_i$ が与えられる。
次の条件を満たす整数 $K (1 \le K \le N)$ を全て出力せよ。
</p>
<p>
条件:
$a_1, \cdots, a_K$ をうまく並び替えると $a_{N-K+1}, \cdots, a_N$ と一致する。
</p>
<h2>制約</h2>
<ul>
<li>$1 \le N \le 10^5$</li>
<li>$1 \le a_i \le 10^9$</li>
<li>入力は全て整数</li>
</ul>
<h2>入力:</h2>
<p>
$N$<br>
$a_1 \cdots a_N$... |
p00371 | <H1>Lottery Box</H1>
<p>
A lottery is being held in a corner of the venue of the Aizu festival. Several types of balls are inside the lottery box and each type has its unique integer printed on the surfaces of the balls. An integer <var>T</var> is printed on the lottery box.
</p>
<p>
In the lottery, you first declare... |
p01999 | <h1>D: 遭難</h1>
<h2>問題</h2>
<p>
$H * W$ のグリッドで表される地図が与えられる。
各マスは '#' か '.' であり、前者は陸地であることを、後者は海であることを示している。
</p>
<p>
以下のように上下左右に隣接している陸地の集合を島と呼ぶ。
</p>
<pre>
.....
.###.
..##.
..#..
.....
</pre>
<p>陸地 $6$ マスの島。</p>
<pre>
......
.##.#.
....#.
......
</pre>
<p>陸地 $2$ マスの島が $2$ つ。</p>
<p>
与えられる地図は、以下の条件を満たす。
... |
p00721 |
<h1><font color="#000">Problem F:</font> Cleaning Robot</h1>
<p>
Here, we want to solve path planning for a mobile robot cleaning a
rectangular room floor with furniture.
</p>
<p>
Consider the room floor paved with square tiles whose size fits
the cleaning robot (1 × 1).
There are 'clean tiles' and 'dirty til... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.