question_id stringlengths 6 6 | content stringlengths 1 27.2k |
|---|---|
p00365 | <H1>Age Difference</H1> <!-- Difference in ages-->
<p>
A trick of fate caused Hatsumi and Taku to come to know each other. To keep the encounter in memory, they decided to calculate the difference between their ages. But the difference in ages varies depending on the day it is calculated. While trying again and again,... |
p01124 | <!--<h2>Problem H</h2>-->
<!-- begin en only -->
<h3>Addition on Convex Polygons</h3>
<!-- end en only -->
<!-- begin en only -->
<p>
Mr. Convexman likes convex polygons very much.
During his study on convex polygons, he has come up with the following elegant addition on convex polygons.</p>
<!-- end en only -->
<!... |
p03119 | <span class="lang-en">
<p>Score : <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke participated in a magic show.</p>
<p>A magician prepared <var>N</var> identical-looking boxes.
He put a treasure in one of the boxes, closed the boxes, shuffled them, and numbered them <var>1</va... |
p01574 |
<H1><font color="#000">Problem D: </font> Dial Key</H1>
<p>
You are a secret agent from the Intelligence Center of Peacemaking Committee. You've just sneaked into a secret laboratory of an evil company, Automated Crime Machines.
</p>
<p>
Your mission is to get a confidential document kept in the laboratory. To reach... |
p03549 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is <code>YES</code> or <code>NO</code>.</p>
<p>When he checked the detailed status of the submissio... |
p01061 |
<h1>Community Integration</h1>
<!--
<p>å®åæŸèã
ãããã£ïŒçãŸãæ
é·ã®ãã®æãââåžã«å䜵ãããŠããã§ããïŒïŒ 20幎åã«ïŒïŒã</p>
-->
<h2>Problem</h2>
<p>
<var>N</var>åã®æããããããããã®æã«ã¯1ãã<var>N</var>ãŸã§ã®çªå·ãã€ããŠãããæšä»ã®å䜵ããŒã ã«ãããããã€ãã®æãå䜵ãããããšã«ãªã£ããå䜵ããã2ã€ä»¥äžã®æã¯æ°ãã1ã€ã®åžãšãªããã©ã®æãšãå䜵ãããªãæã¯æã®ãŸãŸã§ããã
</p>
<p>
ããªãã¯ããã2ã€ã®æãå䜵åŸã«åãåžã«ãªãããšããæ
å ±ãè€æ°äžããããããã®æ
å ±ã®çµã¿åããã«ãã£ãŠã3ã€ä»¥äžã®æã1ã€ã®... |
p01431 |
<script type="text/javascript" src="./varmath.js" charset="UTF-8"></script>
<h2>å顿</h2>
<p>
èœæžãã®é女 ALBERTINE 㯠<var>W</var> å <var>H</var> è¡ã®æ£æ¹åœ¢ã®ã»ã«ãããªãé·æ¹åœ¢ã®çµçã®å
¥ãå£ã«èœæžããããŠããïŒãã®äžçã§ã¯èœæžãã¯å¿
ãã»ã«ãçœè²ãé»è²ã§å¡ãããšã«ãã£ãŠæãç«ã€ïŒ
</p>
<p>
ãã§ã«äœ¿ãé ANJA ã®æã«ãã£ãŠèœæžãã®äžéšãæãããŠããã®ã ãïŒèœæžãã®éå¥³ã¯æ®ããã¹ãŠã®ã»ã«ãå¡ãèœæžãã宿ããããïŒèœæžãã®é女ã«ã¯ãããã ãããããïŒãã®ãã ãããšã¯æ¬¡ã®ãããªãã®ã§ããïŒ
... |
p00670 |
<h1>Problem B: Spellcasters</h1>
<p>
n 人ã®éæ³äœ¿ããããã圌ãã«ã¯ 1 ãã n ãŸã§ã®çªå·ããããi çªç®ã®éæ³äœ¿ãã¯éå r<sub>i</sub> ( 1 ≤ i ≤ n ) ãæã£ãŠãããããŸåœŒãã¯åŒ·åãªéæ³äœ¿ããšå¯Ÿå³ããŠããããã®æµã®éå㯠S ã§ãããn 人ã®éæ³äœ¿ãã¯ååããŠæŠãã®ãåŸæã§ãç¹ã« 2 人ã§ååããŠæŠãããšã奜ãã2 人ã®éæ³äœ¿ããååããå Žåãéåã¯åçŽã«ãã®åãšãªãã匷åãªéæ³ãªã©ãé§äœ¿ããŠããçšåºŠåŒ·ãæµã«ãåãŠãããã«ãªããããªãã®ä»äºã¯éå S ãæã€æµã«å¯ŸããŠåã€ããšãã§ããéæ³äœ¿ãã®ã㢠(i, j) ( i ≠ j ã〠1 &l... |
p01962 |
<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... |
p00220 |
<H1>å士ãæããïŒé²æ°</H1>
<p>
ãåã®éŽã®ãµã€ãºã¯ããã€ããã <br/>
<br/>
å察é¢ã®ç§ã«ããããªãå士ã¯å°ããŸããã<br/>
<br/>
ã 23.5 ã§ãã<br/>
ãã»ããå®ã«ããã®ããæ°åã ã2 ã® 4 ä¹ã« 2 ã® 2 ä¹ãš 2 ã® 1 ä¹ãš 2 ã® 0 ä¹ãš 2 ã® -1 ä¹ã å ããæ°ã ã<br/>
<br/>
ç¶ããŠå士ã¯å°ããŸããã<br/>
<br/>
ãåã身é·ã¯ããã€ããã<br/>
ãã¯ãã158.1 ã§ãã<br/>
<br/>
å士ã¯è
çµã¿ãããŠç®ãéããŸããããã°ããã®æ²é»ã®åŸãå£ãéããŸããã<br/>
<br/>
ãã... |
p00037 |
<H1>æ Œåäžã®çµè·¯</H1>
<p>
äžããèŠããšå³ 1 ã®ãããªåœ¢ã®æ Œåç¶ã®åºå ŽããããŸãããã®æ Œåã®å蟺ã«ãå£ããããããªããã 0 ãš 1 ã®äžŠã³ã§è¡šããŸããç¹ A ã«ç«ã£ãŠå£ã«å³æãã€ããå£ã«å³æãã€ãããŸãŸãç¢å°ã®æ¹åã«æ©ãç¶ããŠåã³ç¹ A ã«æ»ã£ãŠãããŸã§ã®çµè·¯ãåºåããããã°ã©ã ãäœæããŠãã ããã
</p>
<center>
<table>
<tr><th>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_pathOnGrid1">
</t></tr>
</table>
<table>
<tr><th>
å³1
</th></tr... |
p00467 |
<H1>ãããã</H2>
<h2> åé¡</h2>
<p>
JOI ããã¯äžäººã§ããããéã³ãããŠããïŒ
ãã®ããããã«ã¯äžçŽç·äžã« N åã®ãã¹ãããïŒããããç§»åã®æç€ºãæžãããŠããïŒã¹ã¿ãŒãå°ç¹ã¯ 1 ãã¹ç®ã§ããïŒãŽãŒã«ã¯Nãã¹ç®ã§ããïŒ
JOI ããã¯ãŽãŒã«ãããŸã§æ¬¡ãç¹°ãè¿ãïŒ
</p>
<p>
ãµã€ã³ããæ¯ã£ãŠåºãç®ã®æ°ã ãçŸåšã®ãã¹ããé²ã¿ïŒãã®ãã¹ã®æç€ºã«åŸãïŒ
æç€ºã«åŸã£ãŠç§»åããå
ã®ãã¹ã®æç€ºã«ã¯åŸããªãïŒ
</p>
<p>
ã¡ããã© N ãã¹ç®ã«æ¢ãŸãæã ãã§ãªãïŒç§»åå
ã N ãã¹ç®ãè¶
ããå ŽåããŽãŒã«ãšãªãïŒ
</p>
<p>
ããããã®ç€é¢ãšïŒ M ååã®ãµã€ã³ãã®åºãç®ãäžãããããšãïŒãµã€... |
p00934 |
<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 K:
$L_{\infty}$ Jumps
<... |
p02909 | <span class="lang-en">
<p>Score: <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>The weather in Takahashi's town changes day by day, in the following cycle: Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...</p>
<p>Given is a string <var>S</var> representing the weather in the town tod... |
p01626 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script>
<!--
<h3><u>Mirror Labyrinth</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 -->
<!-- begin j... |
p01276 |
<H1><font color="#000">Problem D:</font> Double Sorting</H1>
<p>
Here we describe a typical problem. There are <i>n</i> balls and <i>n</i> boxes. Each ball is labeled by a unique
number from 1 to <i>n</i>. Initially each box contains one of these balls. We can swap two balls in adjacent
boxes. We are to sort these ba... |
p00871 |
<H1><font color="#000">Problem H:</font> Top Spinning</H1>
<p>
Spinning tops are one of the most popular and the most traditional toys. Not only spinning
them, but also making oneâs own is a popular enjoyment.
</p>
<p>
One of the easiest way to make a top is to cut out a certain shape from a cardboard and pierce
an a... |
p01763 |
<h1>D : Chopsticks / 箞</h1>
<h1>Problem</h1>
<p>ã箞㯠2 æ¬ 1 ã»ãã(1 è³)ã§çšãããã®ã§ãããããããããšãäžäººæ®ããã®å€§åŠçã§ããããã¥åã¯ç®žç«ãŠã«å
¥ã£ãŠããã箞ã奿°æ¬ã§ããããšã«æ°ãã€ãããããã¯æããã«ããããããã€ã®éã«ãäœæ¬ãç¡ãããŠããŸã£ãã®ã§ããã
å°ã£ãããã¥åã¯ãä»åŸãã®ãããªããšãç¡ãããã«ç®žã®æ¬æ°ãæ¯æ¥èšé²ããããšã«ããã</p>
<p>ãšããããããã¥åãæ±ºããèšé²ã®æ¹æ³ã¯å°ãå€ãã£ãŠããã ããã¯ããŸã<em>M</em> åã®èªç¶æ° <em>A<sub>1</sub></em>, ... , <em>A<SUB>M</SUB></em> ... |
p01299 |
<H1><font color="#000">Problem G:</font>Neko's Treasure</H1>
<p>
Maki is a house cat. One day she fortunately came at a wonderful-looking dried fish. Since she
felt not hungry on that day, she put it up in her bed. However there was a problem; a rat was
living in her house, and he was watching for a chance to steal h... |
p01333 |
<h1><font color="#000">Problem A:</font> Summer of KMC</h1>
<h2>Description</h2>
<p>KMCã¯ã³ããã¯ããŒã±ãããšåŒã°ããå人å³å£²äŒã§æ¯å¹ŽCDã販売ããŠããã
ã³ããã¯ããŒã±ããã§CDã売ãããšã«ãªã£ãFã§ãã£ãããFã®äººæ°ã«ãããKMCã®å£²ãå Žã«ã¯äººã殺å°ãããé£ãã®èšç®ã远ãã€ããªãç¶æ
ãšãªã£ããããã§Fã¯éé¡ãå
¥åãããšå³åº§ã«ãé£ããåºåããããã°ã©ã ãæžãããšã«ããã</p>
<p>KMCãé£ãéãšããŠçšæããŠããã®ã¯ã100åçãš500åçãš1000åæã®ã¿ã§ããããããã®ç¡¬è²šã»æã¯ç¡éã«ãããã®ãšèããŠè¯ãããé£ãã¯ãç¡¬è²šã»æã®å... |
p00172 |
<H1>å士ã®ç 究宀</H1>
<p>
äŒæŽ¥å€§åŠã®é¶Žè³å士ã¯ãšãŠãç ç©¶ç±å¿ãªããšã§æåã§ãã圌ã®ç 究宀ã«ã¯è€æ°ã®åŠçãããŸãããåœŒã¯æ¯æ¥å€é
ããŸã§ç ç©¶ãããã®ã§å¿
ãæåŸã«åž°å®
ããŸãã圌ã®ç 究宀ã«ã¯ãã¢ã§ã€ãªãã£ãè€æ°ã®éšå±ããããæåŸã«ç 究宀ãåºã人ããã¹ãŠã®éšå±ã®æãããæ¶ããŠåž°å®
ããããšã«ãªã£ãŠããŸãã
</p>
<p>
æè¿ã倧åŠã§ã¯çãšãã«åãå
¥ããŠããããããã¹ãŠã®æãããæ¶ããŠãããå³ãããã§ãã¯ãããŸããå°ã£ãããšã«åœŒã¯èª°ããèªããæ¥µåºŠã®èç
è
ã§ãæããã®æ¶ããéšå±ã«ã¯æ±ºããŠå
¥ãããšãã§ããŸãããããã§ã圌ã¯ããéšå±ã®ç
§æã®ON/OFFãä»ã®éšå±ããæäœã§ããããã«ç 究宀ã®ç
§æèšåãæ¹é ããŸããã
</p>... |
p00488 |
<H1>ã©ã³ã (Lunch) </H1>
<h2>åé¡</h2>
<p>
JOI ãã¹ã¿åºã§ã¯ïŒã©ã³ãã®ãããããã¹ã¿ãšæŸãããŠãžã¥ãŒã¹ã®ã»ããã¡ãã¥ãŒã奜è©ã§ããïŒãã®ã»ããã¡ãã¥ãŒã泚æãããšãã¯ïŒãã®æ¥ã® 3 çš®é¡ã®ãã¹ã¿ãš 2 çš®é¡ã®ãžã¥ãŒã¹ãã 1 ã€ãã€éžã¶ïŒãã¹ã¿ãšãžã¥ãŒã¹ã®å€æ®µã®åèšãã 50 åãåŒããéé¡ã代éãšãªãïŒ
</p>
<p>
ããæ¥ã®ãã¹ã¿ãšãžã¥ãŒã¹ã®å€æ®µãäžãããããšãïŒãã®æ¥ã®ã»ããã¡ãã¥ãŒã®ä»£éã®æå°å€ãæ±ããããã°ã©ã ãäœæããïŒ
</p>
<h2> å
¥å</h2>
<p>
å
¥å㯠5 è¡ãããªãïŒ1 è¡ã« 1 ã€ãã€æ£ã®æŽæ°ãæžãããŠããïŒ<br>
1 è¡ç®ã®æŽæ°ã¯... |
p00522 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script language="JavaScript" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>
<H1> IOI é¥
é (IOI Manju)
</H1>
... |
p03027 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Consider the following arithmetic progression with <var>n</var> terms:</p>
<ul>
<li><var>x, x + d, x + 2d, \ldots, x + (n-1)d</var></li>
</ul>
<p>What is the product of all terms in this sequence?
Compu... |
p03477 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>A balance scale tips to the left if <var>L>R</var>, where <var>L</var> is the total weight of the masses on the left pan and <var>R</var> is the total weight of the masses on the right pan. Similarly... |
p02636 | <span class="lang-en">
<p>Score : <var>1100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Given is a string <var>S</var> consisting of <code>0</code> and <code>1</code>. Find the number of strings, modulo <var>998244353</var>, that can result from applying the following operation on <var>S<... |
p01919 |
<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>DïŒæªã¿ã®åœ - Country In Distortion -</h2>
<h3>ç©èª</h3>
<p>ã¢ãªã¹ã¯ãã£ããéå±ããŠããŸããããã€ãäžç·ã«éãã§ããçœãŠãµã®ãããã©ã³ãåãžåºãããŠããããã§ããïŒããŒãããããªããšãªãäžç·ã«åºãããã°ããã£ãããïŒãšã¢ãªã¹ã¯æã... |
p03924 | <span class="lang-en">
<p>Score : <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> towns in Takahashi Kingdom. They are conveniently numbered <var>1</var> through <var>N</var>.</p>
<p>Takahashi the king is planning to go on a tour of inspection for <var>M</var>... |
p02266 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script language="JavaScript" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>
<h2>Areas on the Cross-Section ... |
p02289 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script language="JavaScript" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>
<H1>Priority Queue</H1>
<p>
... |
p02773 | <span class="lang-en">
<p>Score: <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>We have <var>N</var> voting papers. The <var>i</var>-th vote <var>(1 \leq i \leq N)</var> has the string <var>S_i</var> written on it.</p>
<p>Print all strings that are written on the most number of vot... |
p03861 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given nonnegative integers <var>a</var> and <var>b</var> (<var>a †b</var>), and a positive integer <var>x</var>.
Among the integers between <var>a</var> and <var>b</var>, inclusive, how many ar... |
p02323 |
<H1>Traveling Salesman Problem </H1>
<br/>
<p>
For a given weighted directed graph <var>G(V, E)</var>, find the distance of the shortest route that meets the following criteria:
</p>
<ul>
<li>It is a closed cycle where it ends at the same point it starts.</li>
<li>It visits each vertex exactly once.</li>
</ul>
<H2>I... |
p03498 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke has an integer sequence, <var>a</var>, of length <var>N</var>. The <var>i</var>-th element of <var>a</var> (<var>1</var>-indexed) is <var>a_{i}</var>.</p>
<p>He can perform the following operation... |
p03162 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Taro's summer vacation starts tomorrow, and he has decided to make plans for it now.</p>
<p>The vacation consists of <var>N</var> days.
For each <var>i</var> (<var>1 \leq i \leq N</var>), Taro will choo... |
p03532 | <span class="lang-en">
<p>Score : <var>1900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Ringo has a tree with <var>N</var> vertices.
The <var>i</var>-th of the <var>N-1</var> edges in this tree connects Vertex <var>A_i</var> and Vertex <var>B_i</var> and has a weight of <var>C_i</var>.
Ad... |
p01221 |
<H1><font color="#000">Problem F:</font> Two-finger Programming</H1>
<p>
Franklin Jenkins is a programmer, but he isnât good at typing keyboards. So he always uses only âfâ
and âjâ (keys on the home positions of index fingers) for variable names. He insists two characters are
enough to write programs, but naturally h... |
p04023 | <span class="lang-en">
<p>Score : <var>1400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke got an integer sequence from his mother, as a birthday present. The sequence has <var>N</var> elements, and the <var>i</var>-th of them is <var>i</var>.
Snuke performs the following <var>Q</var> ... |
p00963 |
<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... |
p01671 |
<h2>E - Minimum Spanning Tree</h2>
<h3>Problem Statement</h3>
<p>
You are given an undirected weighted graph <var>G</var> with <var>n</var> nodes and <var>m</var> edges.
Each edge is numbered from <var>1</var> to <var>m</var>.
</p>
<p>
Let <var>G_i</var> be an graph that is made by erasing <var>i</var>-th edge from... |
p00430 |
<H1></H1>
<p>
åã倧ããã®æ£æ¹åœ¢ã®çŽã <i>n</i> æãã.ãããã®çŽã®äžéšãæ°Žå¹³ã«æããŠäœåãã«äžŠã¹ã.ãã ã,é£ãåãåã¯å·ŠåŽãå³åŽããäœããªããªãããã«äžŠã¹ãªããã°ãªããªã.äŸãã°, <i>n</i> = 5 ã®ãšãã¯,次ã®ãã㪠7 éãã®äžŠã¹æ¹ãå¯èœã§ãã.
</p>
<br>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_ioi2006ho3">
</center>
<br>
<p>
ãããã,ååã«äžŠãã æ£æ¹åœ¢ã®åæ°ã®åã§è¡šãããšã«ãã.äŸãã°, <i>n</i> = 5 ã®
ãšã... |
p00060 |
<H1>ã«ãŒãã²ãŒ ã </H1>
<p>
ã1ãããã10ããŸã§ã®æ°åãæžãããã«ãŒããå 1 æãå
šéšã§ 10 æãããŸãããã®ã«ãŒãã¯ã衚åŽã«ã¯æ°åãæžãããè£åŽã«ã¯äœãæžãããŠããŸããããã®ã«ãŒãã䜿ã£ãŠãããªããšçžæã® 2 åã§ä»¥äžã®ã«ãŒã«ã§ã²ãŒ ã ãè¡ããŸãã
</p>
<ol>
<li> ããªããšçžæã«ã¯ã衚ãäžã«ã㊠1 æãè£ãäžã«ã㊠1 æãèš 2 æã®ã«ãŒããé
ãããŠããŸããããªãã¯çžæã®è¡šã®ã«ãŒãã®æ°åãèŠãããšãã§ããŸãããè£ã®ã«ãŒãã®æ°åã¯èŠããŸããã
</li>
<li> é
ãããã«ãŒãã®æ°åã®åèšã 20 以äžã§ããã€çžæã®æ°åã®åèšãã倧ãããšãã«åã¡ãšãªããŸãã
äŸ... |
p00575 | <h1>ãœãŒã·ã£ã«ã²ãŒã (Social Game)</h1>
<!--ããæéå¶é : 2sec / ã¡ã¢ãªå¶é : 256MB-->
<h2> å顿</h2>
<p>
JOI åã¯ææ¥ããæ°ãã«ãœãŒã·ã£ã«ã²ãŒã ãå§ããããšã«ããïŒ
</p>
<p>
ãã®ãœãŒã·ã£ã«ã²ãŒã ã§ã¯ïŒ<var>1</var> æ¥ã«ã€ã <var>1</var> åãŸã§ãã°ã€ã³ããããšãã§ãïŒãã°ã€ã³ãããã³ã« <var>A</var> æã®ã³ã€ã³ãåŸãããïŒ
</p>
<p>
ãŸãïŒæææ¥ããæ¥ææ¥ãŸã§ <var>7</var> æ¥é£ç¶ã§ãã°ã€ã³ãããšïŒãã®ãã³ã«ïŒè¿œå ã§ <var>B</var> æã®ã³ã€ã³ãåŸãããïŒ
</p>
<p>
... |
p02548 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Given is a positive integer <var>N</var>.
How many tuples <var>(A,B,C)</var> of positive integers satisfy <var>A \times B + C = N</var>?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraint... |
p00125 |
<h1>æ¥æ°</h1>
<p>
2 ã€ã®æ¥ä»ãå
¥åãšãããã® 2 ã€ã®æ¥ä»ãã®éã®æ¥æ°ãåºåããããã°ã©ã ãäœæããŠãã ããã
</p>
<p>
æ¥ä» 1 (<var>y<sub>1</sub>, m<sub>1</sub>, d<sub>1</sub></var>) ã¯æ¥ä» 2 (<var>y<sub>2</sub>, m<sub>2</sub>, d<sub>2</sub></var>) ãšåããããããã¯ãã以åã®æ¥ä»ãšããŸããæ¥ä» 1 ã¯æ¥æ°ã«å«ããæ¥ä» 2 ã¯å«ããŸããããŸããããã幎ãèæ
®ã«ãããŠèšç®ããŠãã ããããããå¹Žã®æ¡ä»¶ã¯æ¬¡ã®ãšãããšããŸãã
</p>
<ul>
<li>西æŠå¹Žã 4 ã§å²ãåã... |
p02118 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script language="JavaScript" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>
<h1>Problem H: Sequence</h1>
... |
p03359 | <span class="lang-en">
<p>Score: <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the "year-month-day" order, or the "month-day" order without the year.<br/>
For example, May <var>3</var>, <var>2018</var> is wri... |
p01364 |
<H1><font color="#000">Problem F:</font> Two-Wheel Buggy</H1>
<p>
International Car Production Company (ICPC), one of the largest automobile manufacturers in
the world, is now developing a new vehicle called "Two-Wheel Buggy". As its name suggests,
the vehicle has only two wheels. Quite simply, "Two-Wheel Buggy" is m... |
p00826 |
<H1><font color="#000">Problem H:</font> Monster Trap</H1>
<p>
Once upon a time when people still believed in magic, there was a great wizard Aranyaka
Gondlir. After twenty years of hard training in a deep forest, he had finally mastered ultimate
magic, and decided to leave the forest for his home.
</p>
<p>
Arriving ... |
p03709 | <span class="lang-en">
<p>Score : <var>1200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi is an expert of Clone Jutsu, a secret art that creates copies of his body.</p>
<p>On a number line, there are <var>N</var> copies of Takahashi, numbered <var>1</var> through <var>N</var>.
The... |
p01734 |
<p>
Ayimok is a wizard.
</p>
<p>
His daily task is to arrange magical tiles in a line, and then cast a magic spell.
</p>
<p>
Magical tiles and their arrangement follow the rules below:
</p>
<ul>
<li> Each magical tile has the shape of a trapezoid with a height of 1.</li>
<li> Some magical tiles may overlap with... |
p02231 | UF with standard input (K = 100) |
p02661 | <span class="lang-en">
<p>Score : <var>500</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> integers <var>X_1, X_2, \cdots, X_N</var>, and we know that <var>A_i \leq X_i \leq B_i</var>.
Find the number of different values that the median of <var>X_1, X_2, \cdots, X_N</va... |
p03973 | <span class="lang-en">
<p>Score : <var>700</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p><var>N</var> people are waiting in a single line in front of the Takahashi Store. The cash on hand of the <var>i</var>-th person from the front of the line is a positive integer <var>A_i</var>.</p>
<p>M... |
p03420 | <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... |
p03070 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given <var>N</var> integers. The <var>i</var>-th integer is <var>a_i</var>.
Find the number, modulo <var>998244353</var>, of ways to paint each of the integers red, green or blue so that the fol... |
p01558 |
<h1>Substring</h1>
<p>é·ãnã®æåås=s<sub>1</sub>,s<sub>2</sub>,âŠ,s<sub>n</sub>ããã³måã®ã¯ãšãªãäžããããã
åã¯ãšãªq<sub>k</sub> (1 ≤ k ≤ m)ã¯ã"L++", "L--", "R++", "R--"ã®4çš®é¡ã®ããããã§ããã
kçªç®ã®ã¯ãšãªq<sub>k</sub>ã«å¯ŸããŠl[k]ãšr[k]ã以äžã§å®çŸ©ããã
</p>
<ul><li><p> L++ïŒl[k]=l[k-1]+1,r[k]=r[k-1]
</p></li><li><p> L--... |
p03565 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>E869120 found a chest which is likely to contain treasure.<br/>
However, the chest is locked. In order to open it, he needs to enter a string <var>S</var> consisting of lowercase English letters.<br/>
H... |
p01108 |
<h3><u>Equivalent Deformation</u></h3>
<p>
Two triangles <i>T</i><sub>1</sub> and <i>T</i><sub>2</sub> with the same area are on a plane.
Your task is to perform the following operation to <i>T</i><sub>1</sub> several times so that it is exactly superposed on <i>T</i><sub>2</sub>.
Here, vertices of <i>T</i><sub>1</su... |
p03135 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>In order to pass the entrance examination tomorrow, Taro has to study for <var>T</var> more hours.</p>
<p>Fortunately, he can <em>leap</em> to World B where time passes <var>X</var> times as fast as it ... |
p02374 | <H1>Range Query on a Tree</H1>
<p>
Write a program which manipulates a weighted rooted tree $T$ with the following operations:
</p>
<ul>
<li>$add(v,w)$: add $w$ to the edge which connects node $v$ and its parent<br>
<li>$getSum(u)$: report the sum of weights of all edges from the root to node $u$<br>
</ul>
<p>
... |
p00349 |
<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>
倧ããªãã§ã¹ç€äžã«ãããããïŒãã <var>N</v... |
p02724 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi loves gold coins. He gains <var>1000</var> <em>happiness points</em> for each <var>500</var>-yen coin he has and gains <var>5</var> happiness points for each <var>5</var>-yen coin he has. (Yen... |
p00719 |
<h1><font color="#000">Problem D:</font> Traveling by Stagecoach</h1>
<p>
Once upon a time, there was a traveler.
</p>
<p>
He plans to travel using stagecoaches (horse wagons).
His starting point and destination are fixed,
but he cannot determine his route.
Your job in this problem is to write a program
which determ... |
p03836 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Dolphin resides in two-dimensional Cartesian plane, with the positive <var>x</var>-axis pointing right and the positive <var>y</var>-axis pointing up.<br/>
Currently, he is located at the point <var>(sx... |
p00076 |
<H1>宿¢ã II</H1>
<p>
èµãçä»ããŠããããå
ç¥ã®å®ã®ããããžã®è¡ãæ¹ãèšãã倿æžãèŠã€ãããŸããããã®å€ææžã«ã¯ããããæ¬¡ã®ãããªäºãæžãããŠããŸããã
</p>
<pre class=exp>
1. ãŸããçºå€ãã®äºæžãããçæ±ã« 1m ã®å°ç¹ã«ç«ã¡ããŸã£ããäºæžã®æ¹åãåãã
2. å³åãã« 90 床åããå€ãã1m çŽé²ãããããŸã£ããäºæžã®æ¹åãåãã
3. å³åãã« 90 床åããå€ãã1m çŽé²ãããããŸã£ããäºæžã®æ¹åãåãã
4. ã
5. ã
6. ïŒ
</pre>
<p>
2... |
p00426 |
<H1></H1>
<p>
倧ãããç°ãªã n åã®ã³ãããš 3 ã€ã®ãã¬ã€ïŒãçïŒAïŒBïŒC ãããïŒãããã®ã³ãã㯠3 ã€ã®ãã¬ã€ã®äžã«ããããäœåããã€äžå±±ã«éããŠçœ®ãããŠããïŒãã ãïŒã©ã®ãã¬ã€ã«ãããŠãïŒãã®ãã¬ã€ã®äžã§äžçªå°ããã³ãããäžçªäžã«ïŒ 2 çªç®ã«å°ããã³ããããã®äžã«ïŒ 3 çªç®ã«å°ããã³ããããã®äžã«ãšïŒå°ããé ã«äŒããŠéããŠããïŒäŸãã°ïŒäžå³ã®å³åŽã¯ïŒ n = 5 åã®ã³ããããã¬ã€ AïŒBïŒC ã«ãããã 2 åïŒ0 åïŒ3 åéããŠçœ®ãããŠããç¶æ
ã瀺ããŠããïŒ
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/... |
p01667 |
<h2>A - Everlasting Zero</h2>
<h3>Problem Statement</h3>
<p>
You are very absorbed in a famous role-playing game (RPG), "Everlasting -Zero-". An RPG is a game in which players assume the roles of characters in a fictional setting. While you play the game, you can forget your "real life" and become a different person... |
p02948 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> one-off jobs available. If you take the <var>i</var>-th job and complete it, you will earn the reward of <var>B_i</var> after <var>A_i</var> days from the day you do it.</p>
<p>Yo... |
p00975 | <h2>Four-Coloring</h2>
<p>
You are given a planar embedding of a connected graph. Each vertex of the graph corresponds to a distinct point with integer coordinates. Each edge between two vertices corresponds to a straight line segment connecting the two points corresponding to the vertices. As the given embedding is p... |
p04035 | <span class="lang-en">
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p>
<p>At first, for each <var>i (1â€iâ€N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at... |
p01237 |
<H1><font color="#000">Problem D:</font> Life Game</H1>
<p>
You are working at a production plant of biological weapons. You are a maintainer of a terrible virus weapon
with very high reproductive power. The virus has a tendency to build up regular hexagonal colonies. So as a
whole, the virus weapon forms a hexagonal... |
p01722 |
<p>
ã€ã¯ã¿åã¯éãããã°ã©ã ã倧奜ãã§ãããæè¿ã¯ãé€ç®ã®ããã°ã©ã ãé«éã«ããããšããŠãããããããªããªãéããªããªãã®ã§ããåžžèçã«èããŠå
žåçããªå
¥åã«å¯ŸããŠã®ã¿é«éã«ããã°ãããšèãããã€ã¯ã¿åãè§£ãããšããŠããåé¡ã¯æ¬¡ã®ãããªãã®ã§ããã
</p>
<p>
äžããããéè² æŽæ°<var>n</var>ã«å¯Ÿãã10鲿³ã§<var>p(n) − 1</var>æ¡ã®æ£æŽæ°<var>11</var>...<var>1</var>ã<var>p(n)</var>ã§å²ã£ãããŸããæ±ããããã ã<var>p(n)</var>ã¯<var>2<sup>2<sup>{</sup> . . . <sup>2</sup><... |
p00830 |
<H1><font color="#000">Problem D:</font> Pathological Paths</H1>
<p>
Professor Pathfinder is a distinguished authority on the structure of hyperlinks in the World
Wide Web. For establishing his hypotheses, he has been developing software agents, which
automatically traverse hyperlinks and analyze the structure of the... |
p01372 |
<!-- begin en only -->
<!--<h3><U>6÷2(1+2)</U></h3>-->
<!-- end en only -->
<!-- begin ja only -->
<h3><U>6÷2(1+2)</U></h3>
<!-- end ja only -->
<div>
<!-- begin en only -->
<p>
English text is not available in this practice contest.
</p>
<!-- end en only -->
<!-- begin ja only -->
<p>
æ°åŠç§ã®åŠçã§ãããããŸãåã¯ïŒæ°åŠã¯ãšãŠãåŸæãªã®ã ãç®... |
p01688 |
<h2>B - Doctor Course Is Recommended / Dé²ã©ãã§ããïŒ</h2>
<h3>Story</h3>
<p>Dã®ã²ãšã¯Dé²ã決æããã®ã§ãåå£«åŸæèª²çšå
¥åŠè©Šéšãåããããšã«ãããçèšè©Šéšã¯ããŒã¯ã·ãŒã圢åŒã§ãã£ããèªèº«ã®å°éåéã®åé¡ã°ããã ã£ãã®ã§ãDã®ã²ãšã¯ããã«ãã¹ãŠã®æ£çãå°ãããšãã§ãããããããããã§å€§ããªåé¡ã«æ°ã¥ãããDã®ã²ãšã¯å®æäžã®çç±ãããè§£ççšçŽã«ã¯'D'ãšããæžãããšãã§ããªãã£ãã®ã ããŸãã'D'ãšæžãããã«ã¯å°åžžã§ã¯ãªãéäžåã䜿ãããïŒ'D'ãšæžãããšã®ã§ããåæ°ãæ±ºãŸã£ãŠãããDã®ã²ãšãæ¬åœã«Dé²ããããšãã§ããã調ã¹ããããè§£çã»é
ç¹ãèžãŸããäžèšã®æ¡ä»¶ã... |
p00133 |
<H1>ãã¿ãŒã³ã®å転</H1>
<p>
8 æå × 8 è¡ã®ãã¿ãŒã³ãå³åãã« 90 床ã180 床ã270 床å転ãããŠåºåããããã°ã©ã ãäœæããŠãã ããã
</p>
<H2>Input</H2>
<p>
8 æå × 8 è¡ãããªããã¿ãŒã³ãäžããããŸããæåã¯ãè±æ°åãåè§ã·ã£ãŒã '#' ãã¢ã¹ã¿ãªã¹ã¯ '*' ãããªããŸãã
</p>
<H2>Output</H2>
<p>
次ã®åœ¢åŒã§ãå転ããããã¿ãŒã³ãåºåããŠãã ããã
</p>
<pre>
90ïŒåè§æ°ååºå®ïŒ
90床å転ããããã¿ãŒã³
180ïŒåè§æ°ååºå®ïŒ
180床å転ããããã¿ãŒã³
270ïŒåè§æ°ååºå®ïŒ
27... |
p00563 |
<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>Rope</h1>
<p>
JOI is a baby playing with ... |
p00099 |
<H1>ã¯ã«ãµã®é£ãå€§äŒ 2</H1>
<p>
æ¡§åæ¹ã§ã¯ã«ãµã®é£ã倧äŒãè¡ãããŸãããä»åã¯ãã£ããïŒãªãªãŒã¹ãæšå¥šãããŠããããã§ãã
</p>
<p>
åå è
çªå·ãšé£ã£ã广°ãŸãã¯ãªãªãŒã¹ãã广°ãïŒã€ã®ã€ãã³ããšããŠé çªã«èªã¿èŸŒã¿ãåã€ãã³ãã®çŽåŸã«æãå€ãã®ã¯ã«ãµã®ãæå
ã«ç²åŸããŠããåå è
çªå·ãšå¹æ°ãåºåããããã°ã©ã ãäœæããŠãã ãããæãå€ãç²åŸããŠããåå è
ãè€æ°ããå ŽåïŒãããã¯å
šãŠã®åå è
ã 0 å¹ã®å ŽåïŒã¯ããã®äžã§åå è
çªå·ãæãå°ããäžäººãåºåããŠãã ããã
</p>
<H2>å
¥å</H2>
<p>
å
¥åã¯ä»¥äžã®åœ¢åŒã§äžããããã
</p>
<pre>
<var>n</var> <va... |
p03066 | <span class="lang-en">
<p>Score : <var>800</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Find the number, modulo <var>998244353</var>, of sequences of length <var>N</var> consisting of <var>0</var>, <var>1</var> and <var>2</var> such that none of their contiguous subsequences totals to <var... |
p03436 | <span class="lang-en">
<p>Score: <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem statement</h3>
<p>We have an <var>H \times W</var> grid whose squares are painted black or white. The square at the <var>i</var>-th row from the top and the <var>j</var>-th column from the left is denoted as <var>(i, j)<... |
p03965 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>AtCoDeer the deer and his friend TopCoDeer is playing a game.
The game consists of <var>N</var> turns.
In each turn, each player plays one of the two <em>gestures</em>, <em>Rock</em> and <em>Paper</em>,... |
p01958 |
<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... |
p02677 | <span class="lang-en">
<p>Score: <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>Consider an analog clock whose hour and minute hands are <var>A</var> and <var>B</var> centimeters long, respectively.</p>
<p>An endpoint of the hour hand and an endpoint of the minute hand are fixed at... |
p02227 | UnionFindïŒã©ã³ãã çæïŒ |
p03820 | <span class="lang-en">
<p>Score : <var>1200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke has decided to play with <var>N</var> cards and a deque (that is, a double-ended queue).
Each card shows an integer from <var>1</var> through <var>N</var>, and the deque is initially empty.</p>
<... |
p02732 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>We have <var>N</var> balls. The <var>i</var>-th ball has an integer <var>A_i</var> written on it.<br/>
For each <var>k=1, 2, ..., N</var>, solve the following problem and print the answer. </p>
<ul>
<... |
p02698 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a tree with <var>N</var> vertices, whose <var>i</var>-th edge connects Vertex <var>u_i</var> and Vertex <var>v_i</var>.
Vertex <var>i</var> has an integer <var>a_i</var> written on it.
For every... |
p02362 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script>
<H1>Single Source Shortest Path (Negative Edges)</H1>
<br/>
<H2>Input</H2>
<p>
An edge-weighted graph <var>G</var> (<var>V</var>, <var>E</var>) and the source <var>r</var>.
</p>
<pre>
|<var>V</var>| |<var>E</var>| <var>r</var>
<var>s<sub>0</sub></var> <var>t... |
p03123 | <span class="lang-en">
<p>Score : <var>2000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke has <var>R</var> red balls and <var>B</var> blue balls.
He distributes them into <var>K</var> boxes, so that no box is empty and no two boxes are identical.
Compute the maximum possible value of ... |
p03089 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke has an empty sequence <var>a</var>.</p>
<p>He will perform <var>N</var> operations on this sequence.</p>
<p>In the <var>i</var>-th operation, he chooses an integer <var>j</var> satisfying <var>1 \... |
p03573 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given three integers, <var>A</var>, <var>B</var> and <var>C</var>.<br/>
Among them, two are the same, but the remaining one is different from the rest.<br/>
For example, when <var>A=5,B=7,C=5</v... |
p01260 |
<H1><font color="#000">Problem A:</font> Girls' Party</H1>
<p>
Issac H. Ives hosted a party for girls. He had some nice goods and wanted to distribute them to the girls
as the presents. However, there were not enough number of presents and thus he needed to decide who
would take them. He held a game for that purpose.... |
p00888 |
<H1><font color="#000">Problem E:</font> The Two Men of the Japanese Alps</H1>
<p>
Two experienced climbers are planning a first-ever attempt: they start at two points of the equal altitudes on a mountain range, move back and forth on a single route keeping their altitudes equal, and finally meet with each other at a... |
p01630 |
<h1>Problem D: 2Dã¯Decision Diagramã®ç¥</h1>
<h2>Problem Statement</h2>
<p>
BDD(Binary Decision Diagram)ãšããããŒã¿æ§é ããåç¥ã ããããè¿å¹Žãçµã¿åããççºãå§ããã®åç»é¢é£ã§ã話é¡ã«ãªã£ãZDDã¯ãBDDãæŽŸçããããŒã¿æ§é ã§ããããã®åé¡ã¯ãBDDã®åºæ¬çãªå®è£
ãè¡ããã®ã§ããã
</p>
<p>
BDDãšã¯ãè«ç颿°ã衚çŸããéè·¯ã®ãªãã°ã©ã(DAG)ã§ãããäŸãã°ã衚1ã®ççå€è¡šã衚ããè«ç颿°ã¯ãå³1ã®BDDãšãªããBDDã¯ã0ãšããž(ç Žç·ç¢å°)ã1ãšããž(å®ç·ç¢å°)ã0çµç«¯ããŒã(0ã®åè§)ã1çµç«¯ããŒã(1... |
p00922 |
<H1><font color="#000">Problem I: </font>Hidden Tree</H1>
<p>
Consider a binary tree whose leaves are assigned integer weights. Such a tree is called <i>balanced</i> if, for every non-leaf node, the sum of the weights in its left subtree is equal to that in the right subtree. For instance, the tree in the following f... |
p00471 |
<H1>æ¹åé³çŽã®ããã«ã€</H1>
<h2> åé¡</h2>
<p>
ä»å¹Žã JOI çºã«ãµã³ã¿ã¯ããŒã¹ã空ãããã£ãŠããïŒJOI çºã«ããå
šãŠã®å®¶ã«ã¯åäŸãããã®ã§ïŒãã®ãµã³ã¿ã¯ããŒã¹ã¯ JOI çºã®å
šãŠã®å®¶ã«ãã¬ãŒã³ããé
ã£ãŠãŸãããªããã°ãªããªãïŒãããïŒä»å¹Žã¯é£ããŠããããã«ã€ãå°ã
æ¹åé³çŽã§ããïŒãŸã建ç©ã®äžä»¥å€ã«éããããšãã§ããªãããïŒå
šãŠã®å®¶ã«ãã¬ãŒã³ããé
ãããã«ã¯å°ã
éé ã工倫ããªããã°ãªããªãããã ïŒ
</p>
<p>
JOI çºã¯æ±è¥¿ååã«åºç»æŽçãããŠããïŒååºç»ã¯å®¶ïŒæäŒïŒç©ºãå°ã®ããããã§ããïŒJOI çºã«ã¯ 1 ã€ã ãæäŒãããïŒæ¬¡ã®ã«ãŒã«ã«åŸãïŒãµã³ã¿ã¯ããŒã¹ãšããã«ã€ã¯æäŒããåºçºãïŒ... |
p00021 |
<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>Parallelism</H1>
<p>
There are four points:... |
p00534 |
<h2>ã·ã«ã¯ããŒã (Silk Road)</h2>
<h2>åé¡</h2>
<p>
çŸåšã«ã¶ãã¹ã¿ã³ãããå°åã«ã¯ïŒå€ãã¯ãã·ã«ã¯ããŒãããšåŒã°ãã亀æè·¯ããã£ãïŒ
</p>
<p>
ã·ã«ã¯ããŒãäžã«ã¯ N + 1 åã®éœåžãããïŒè¥¿ããé ã«éœåž 0, éœåž 1, ... , éœåž N ãšçªå·ãã€ããããŠããïŒéœåž i - 1 ãšéœåž i ã®éã®è·é¢ (1 ≤ i ≤ N) 㯠D<sub>i</sub> ã§ããïŒ
</p>
<p>
貿æåã§ãã JOI åã¯ïŒéœåž 0 ããåºçºããŠïŒéœåžãé çªã«çµç±ãïŒéœåž N ãŸã§çµ¹ãéã¶ããšã«ãªã£ãïŒéœåž 0 ããéœåž N ãŸã§ M æ¥ä»¥å
ã«ç§»åããªããã°ãªããª... |
p02159 | <h1>Problem K: Encampment Game</h1>
<h2>Problem</h2>
<p>
$N$é ç¹ã®æšããããåé ç¹ã¯ãããã1ãã$N$ã®çªå·ãå²ãæ¯ãããŠããã<br>
Gachoåãšå·æåã¯ãã®æšã䜿ã£ãŠé£åãã²ãŒã ãããããšã«ããã<br>
ã²ãŒã ã¯Gachoåãšå·æåãç°ãªãé ç¹ã«ããç¶æ
ããã¹ã¿ãŒãããã<br>
Gachoåãã亀äºã«é ç¹ãç§»åããããšãç¹°ãè¿ããæåã«ç§»åã§ããªããªã£ãæ¹ãè² ãã§ããã<br>
<br>
ç§»åæ¹æ³:<br>
é ç¹$x$ã«ããæãé ç¹$x$ãšèŸºã§çŽæ¥çµã°ããŠãããŸã 誰ã蚪ããããšããªãé ç¹ã®ããããã«ç§»åããã<br>
ãã®ãã... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.