question_id stringlengths 6 6 | content stringlengths 1 27.2k |
|---|---|
p01822 |
<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>
<h3>Problem E:
Enclose Points</h3... |
p00730 |
<h1><font color="#000">Problem C:</font> Cut the Cake</h1>
<!-- end en only -->
<p>
Today is the birthday of Mr. Bon Vivant, who is known as one of the greatest <i>pâtissiers</i> in the world.
Those who are invited to his birthday party are <i>gourmets</i> from around the world.
They are eager to see and eat h... |
p00360 | <H1>Swapping Characters</H1>
<p>
You are given a string and a number <var>k</var>. You are suggested to generate new strings by swapping any adjacent pair of characters in the string up to <var>k</var> times. Write a program to report the lexicographically smallest string among them.
</p>
<h2>Input</h2>
<p>
... |
p01988 | <h3>NINJA GAME</h3>
<!-- begin ja only -->
<p>æ°äœã²ãŒã "NIN<strong><em>JA G</em></strong>AME" ãã€ãã«çºå£²ãšãªã£ãïŒãã®ã²ãŒã ã§ã¯ãã¬ã€ã€ãŒã¯äºæ¬¡å
ãããäžã®å¿è
ãæäœããŠç§»åãè¡ãïŒäºæ¬¡å
ããã㯠<i>x</i> 軞ïŒãŸã㯠<i>y</i> 軞ã®ã©ã¡ããäžæ¹ã«å¹³è¡ãªèŸºã®ã¿ãããªãïŒèªå·±äº€å·®ã®ãªãå€è§åœ¢ã§è¡šãããïŒããŸïŒå€è§åœ¢ã®å
éšã«ååšããã¹ã¿ãŒãå°ç¹ãããŽãŒã«å°ç¹ãžãšç§»åããå¿
èŠãããïŒ</p>
<p>ç§»åã¯äžäžå·Šå³ãšæã45°ã®8æ¹åãå¯èœã§ïŒããããã®å¯Ÿå¿ããã³ãã³ããå
¥åãããšïŒæå®ããæ¹åã«èªåã§é²ã¿ç¶ããïŒãã®èªåç§»åã®æäž... |
p01121 | <!--<h2>Problem E</h2>-->
<!-- begin en only -->
<h3>Cube Surface Puzzle</h3>
<!-- end en only -->
<!-- begin en only -->
<p>
Given a set of six pieces, “Cube Surface Puzzle” is to construct a hollow cube with filled surface.
Pieces of a puzzle is made of a number of small unit cubes laid grid-aligned on... |
p01571 |
<H1><font color="#000">Problem A:</font> Adhoc Translation</H1>
<p>
One day, during daily web surfing, you encountered a web page which was written in a language you've never seen. The character set of the language was the same as your native language; moreover, the grammar and words seemed almost the same. Excitedly... |
p01766 |
<h1 id="a-soccer-ãµãã«ãŒ">A : Soccer / ãµãã«ãŒ</h1>
<h2 id="å顿">å顿</h2>
<p>AåœãšBåœã®éã§AIãµãã«ãŒã®è©Šåããããããªãã®æå
ã«ã¯ãããæå»ã«ããŒã«ãæã£ãŠããéžæãšãã®äœçœ®ãèšé²ãã衚ãããã衚㯠<var>N</var> è¡ãããªããäžãã <var>i</var> çªç®ã®è¡ã¯æ¬¡ã«ç€ºãèŠçŽ ãããªãã</p>
<ul>
<li>ãã¬ãŒã æ° <var>f_i</var></li>
<li>ããŒã«ãæã£ãŠããéžæã®èçªå· <var>a_i</var></li>
<li>ãã®éžæãå±ããããŒã <var>t_i</var></li>
<li>ãã®éžæã®äœçœ®ã衚ã... |
p02849 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi has come to an integer shop to buy an integer.</p>
<p>The shop sells the integers from <var>1</var> through <var>10^9</var>. The integer <var>N</var> is sold for <var>A \times N + B \times d(N... |
p00874 |
<H1><font color="#000">Problem A:</font> Cubist Artwork</H1>
<p>
<i>International Center for Picassonian Cubism</i> is a Spanish national museum of cubist artworks,
dedicated to Pablo Picasso. The center held a competition for an artwork that will be displayed
in front of the facade of the museum building. The artwor... |
p01336 |
<h1><font color="#000">Problem D:</font>THE BYDOLM@STER</h1>
<h2>Description</h2>
<!-- <div style="float:right"><img src="https://judgeapi.u-aizu.ac.jp/resources/images/uvcs_static_image_03D_2" alt="ããã±ã©ããã¹" width=400 height=260></div> -->
<p>THE BYDOLM@STER(ãã€ãã«ãã¹ã¿ãŒ)ãšã¯1rem瀟ãã2010/4/1ã«EXIDNAã§çºå£²ãäºå®ãããŠããè²æã·ãã¥ã¬ãŒã·ã§ã³ã²ãŒã ... |
p00177 |
<H1>ïŒéœåžéã®è·é¢</H1>
<p>
å°çäžã®2 éœåžã®åç·¯ãšæ±çµãå
¥åãšããå°è¡šè·é¢ãèšç®ããŠåºåããããã°ã©ã ãäœæããŠãã ããããã ããå°çã¯ååŸ 6,378.1 km ã®çãšãã2 ç¹éã®å°è¡šè·é¢ãšã¯ãã®çé¢ã«æ²¿ã£ãæçè·é¢ã§ãããŸããååçã§ãåç·¯ã¯çšããã«åç·¯ 0 ~ -90 床ãçšããã°ãªãããžååç·ã®è¥¿ã§ã西çµã¯çšããã«æ±çµ 180 ~ 360 床ãçšããããšãšããŸããå°è¡šè·é¢ã¯ km åäœã§æ±ããå°æ°ç¹ä»¥äžã¯åæšäºå
¥ããæŽæ°å€ãšããŠåºåããŠãã ããã
</p>
<p>
以äžã«äž»èŠéœåžã®åç·¯ãæ±çµã®äŸã瀺ããŸãã
</p>
<center>
<table>
<tr><th width="120">å°... |
p00527 |
<h2>IOI åè»ã§è¡ãã(Take the 'IOI' train)</h2>
<p>
IOI åœã§ã¯ãã®ãã³æ°ãã«ééãæ·èšããïŒIOI åœã®ééãèµ°ãåè»ã¯ããã€ãã®è»äž¡ãé£çµããããã®ã§ããïŒè»äž¡ã«ã¯ <span>I</span>, <span>O</span> ã® 2 çš®é¡ãããïŒè»äž¡ã¯ããããç°ãªãçš®é¡ã®è»äž¡ãšããé£çµã§ããªãïŒãŸãïŒåè»ã«é転åžãèšããé¢ä¿äžïŒåè»ã®äž¡ç«¯ã®è»äž¡ã¯çš®é¡ <span>I</span> ã§ãªããã°ãªããªãïŒåè»ã¯è»äž¡ã®çš®é¡ã衚ãæåãé ã«ã€ãªããæååã§è¡šããïŒåè»ã®é·ãã¯ãã®æååã®é·ãã§ãããšããïŒããšãã°ïŒ <span>IOIOI</span> ã®é ã«è»äž¡ãé£çµãããšé·ã ... |
p00032 |
<H1>ãã©ã¹ãã£ãã¯æ¿</H1>
<p>
æ©æ¢°ã«èŸºã»å¯Ÿè§ç·ã®é·ãã®ããŒã¿ãå
¥åãããã©ã¹ãã£ãã¯æ¿ã®åæããããŠããå·¥å ŽããããŸãããã®å·¥å Žã§ã¯ããµã€ãºã¯æ§ã
ã§ãããå¹³è¡å蟺圢ã®åã®ã¿ãåãåºããŠããŸããããªãã¯ãåãåºãããå¹³è¡å蟺圢ã®ãã¡ãé·æ¹åœ¢ãšã²ã圢ã®è£œé åæ°ãæ°ããããã«äžåžããåœããããŸããã
</p>
<p>
ãæ©æ¢°ã«å
¥åããããŒã¿ããèªã¿èŸŒãã§ãé·æ¹åœ¢ãšã²ã圢ã®è£œé åæ°ãåºåããããã°ã©ã ãäœæããŠãã ããã
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_plastic"></center>
<b... |
p00462 |
<H1>ãã¶ </H1>
<h2>åé¡</h2>
<p>
JOI ãã¶ã§ã¯,åžã®äžå¿éšãéãå
šé· <i>d</i> ã¡ãŒãã«ã®ç°ç¶ç·ã®æ²¿ç·äžã§ãã¶ã®å®
é
販
売ãè¡ã£ãŠãã.
</p>
<p>
JOI ãã¶ã¯,ç°ç¶ç·äžã« <i>n</i> åã®åºè <i>S</i><sub>1</sub>, ... , <i>S<sub>n</sub></i> ãæã€.æ¬åºã¯ <i>S</i><sub>1</sub> ã§ãã. <i>S</i><sub>1</sub> ãã <i>S<sub>i</sub></i> ãŸã§,æèšåãã«ç°ç¶ç·ãç§»åãããšãã®éã®ãã <i>d<sub>i</sub></i> ã¡ãŒãã«ãšãã. <... |
p00198 |
<h1>ç«æ¹äœã®äœå</h1>
<p>
èžè¡å®¶åå·ã¯ <var>n</var> ç¹ã®äœåãåºå±ããããã«äŸé ŒãããŸãããããã§ãç«æ¹äœã® 6 é¢ããã³ãã§è²ä»ããããã®ãäœåãšããŠåºå±ããããšã«ããŸãããäœåã¯ãRedãYellowãBlueãMagentaãGreenãCyan ã® 6 è²å
šãŠã䜿ãããŠããŠãåé¢ã¯ 1 è²ã§å¡ãã€ã¶ãããŠããŸããåå·ã¯åœ¢ãåãç«æ¹äœã®äœåã§ãè²ã®é
眮ã®ä»æ¹ãå€ããç°ãªãäœåãšã㊠<var>n</var> ç¹äœæããŸããã
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_shi... |
p01623 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script
<!--
<h3><u>Sinking islands</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... |
p00931 |
<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:
Cornering at Poles
<... |
p01273 |
<H1><font color="#000">Problem A:</font> Infected Computer</H1>
<p>
Adam Ivan is working as a system administrator at Soy Group, Inc. He is now facing at a big trouble:
a number of computers under his management have been infected by a computer virus. Unfortunately,
anti-virus system in his company failed to detect t... |
p01789 |
<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>J - Unfair Game</h2>
<h3>Probl... |
p03864 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> boxes arranged in a row.
Initially, the <var>i</var>-th box from the left contains <var>a_i</var> candies.</p>
<p>Snuke can perform the following operation any number of times:</p... |
p01859 |
<!--<script language="JavaScript" type="text/javascript" src="js/varmath.js" charset="UTF-8"></script>-->
<h2>B: äžå³¶ãããããããïŒ - Match Peas War -</h2>
<h3>åé¡</h3>
<p>äžå³¶ããã
ã£ã»ã»ã»ã</p>
<p>磯éãäžå³¶ïŒå€§äžå€«ãïŒã</p>
<p>äžå³¶ãã»ã»ã»ãªãã ãå«ãªå€¢ãèŠãŠããæ°ããããã</p>
<p>磯éãã©ããªå€¢ã ãïŒã</p>
<p>äžå³¶ãç¡éã«éã¶å€¢ã</p>
<p>磯éãæå³ããããïŒãŸããããïŒäžå³¶ïŒããããããïŒã</p>
<p>äžå³¶ããã... |
p02776 | <span class="lang-en">
<p>Score: <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>After being invaded by the Kingdom of AlDebaran, bombs are planted throughout our country, AtCoder Kingdom.</p>
<p>Fortunately, our military team called ABC has managed to obtain a device that is a part... |
p02326 |
<H1>Largest Square</H1>
<p>
Given a matrix (<var>H</var> × <var>W</var>) which contains only 1 and 0, find the area of the largest square matrix which only contains 0s.
</p>
<H2>Input</H2>
<pre>
<var>H</var> <var>W</var>
<var>c</var><sub>1,1</sub> <var>c</var><sub>1,2</sub> ... <var>c<sub>1,W</sub></var>
<v... |
p03167 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a grid with <var>H</var> horizontal rows and <var>W</var> vertical columns.
Let <var>(i, j)</var> denote the square at the <var>i</var>-th row from the top and the <var>j</var>-th column from t... |
p03537 | <span class="lang-en">
<p>Score : <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Ringo has a string <var>S</var>.</p>
<p>He can perform the following <var>N</var> kinds of operations any number of times in any order.</p>
<ul>
<li>Operation <var>i</var>: For each of the characters f... |
p03022 | <span class="lang-en">
<p>Score : <var>1600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke found a random number generator.
It generates an integer between <var>0</var> and <var>2^N-1</var> (inclusive).
An integer sequence <var>A_0, A_1, \cdots, A_{2^N-1}</var> represents the probabil... |
p03188 | <span class="lang-en">
<p>Score : <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>For an <var>n \times n</var> grid, let <var>(r, c)</var> denote the square at the <var>(r+1)</var>-th row from the top and the <var>(c+1)</var>-th column from the left.
A <em>good</em> coloring of this... |
p03472 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are going out for a walk, when you suddenly encounter a monster. Fortunately, you have <var>N</var> katana (swords), Katana <var>1</var>, Katana <var>2</var>, <var>âŠ</var>, Katana <var>N</var>, and ... |
p03921 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>On a planet far, far away, <var>M</var> languages are spoken. They are conveniently numbered <var>1</var> through <var>M</var>.</p>
<p>For <em>CODE FESTIVAL 20XX</em> held on this planet, <var>N</var> p... |
p02633 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer <var>K</var> such that Takahashi will be at the starting position again after he does the following acti... |
p02799 | <span class="lang-en">
<p>Score : <var>900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a connected undirected graph with <var>N</var> vertices and <var>M</var> edges.
Edge <var>i</var> in this graph (<var>1 \leq i \leq M</var>) connects Vertex <var>U_i</var> and Vertex <var>V_i</v... |
p02263 |
<p>
Reverse Polish notation is a notation where every operator follows all of its operands. For example, an expression (1+2)*(5+4) in the conventional Polish notation can be represented as 1 2 + 5 4 + * in the Reverse Polish notation. One of advantages of the Reverse Polish notation is that it is parenthesis-free.
</... |
p00570 | <h1>ã¹ããŒã(Stove)</h1>
<p>
JOI åã®éšå±ã«ã¯ã¹ããŒããããïŒJOI åèªèº«ã¯å¯ãã«åŒ·ãã®ã§ã²ãšãã§éšå±ã«ãããšãã¯ã¹ããŒããã€ããå¿
èŠã¯ãªããïŒæ¥å®¢ããããšãã¯ã¹ããŒããã€ããå¿
èŠãããïŒ
</p>
<p>
ãã®æ¥ïŒJOI åã®ããšã«ã¯<var>N</var> äººã®æ¥å®¢ãããïŒ<var>i</var> çªç®(<var>1 \leq i \leq N</var>) ã®æ¥å®¢ã¯æå»<var>T_i</var> ã«å°çãïŒæå»<var>T_i + 1</var>ã«éåºããïŒåæã«è€æ°äººã®æ¥å®¢ãããããšã¯ãªãïŒ
</p>
<p>
JOI åã¯ä»»æã®æå»ã«ã¹ããŒããã€ãããæ¶ãããã§ããïŒãã ãïŒã¹ã... |
p00120 |
<H1>ããã£ã·ãš</H1>
<p>
ã±ãŒãå±ãããããŸã¡ãŸã¡ãªå€§ããã®ããŒã«ã±ãŒããããããäœããŸãããããªãã¯ããã®ã±ãŒããç®±ã«äžŠã¹ãä»äºãä»»ãããŸããã
</p>
<p>
ããŒã«ã±ãŒãã¯ãšãŠããããããã®ã§ãä»ã®ããŒã«ã±ãŒããäžã«ä¹ããšã€ã¶ããŠããŸããŸããã§ããããå³(a) ã®ããã«å
šãŠã®ããŒã«ã±ãŒãã¯å¿
ãç®±ã®åºé¢ã«æ¥ããŠããããã«äžŠã¹ãªããã°ãªããŸãããäžŠã¹æ¿ãããšå¿
èŠãªå¹
ãå€ãããŸãã
</p>
<center>
<table>
<tr><td><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_patisserie1"></td>... |
p01361 |
<H1><font color="#000">Problem C:</font> Dungeon Quest II</H1>
<p>
The cave, called "Mass of Darkness", had been a agitating point of the evil, but the devil king
and all of his soldiers were destroyed by the hero and the peace is there now.
</p>
<p>
One day, however, the hero was worrying about the rebirth of the d... |
p00989 | <h2>Draw in Straight Lines</h2>
<P>
You plan to draw a black-and-white painting on a rectangular canvas. The painting will be a grid array of pixels, either black or white. You can paint black or white lines or dots on the initially white canvas.
</p>
<p>
You can apply a sequence of the following two operations in a... |
p01731 |
<p>Nathan O. Davis has been running an electronic bulletin board system named JAG-channel. He is now having hard time to add a new feature there --- threaded view.
</p>
<p>Like many other bulletin board systems, JAG-channel is thread-based. Here a thread (also called a topic) refers to a single conversation with a co... |
p00823 |
<H1><font color="#000">Problem E:</font> Molecular Formula</H1>
<p>
Your mission in this problem is to write a computer program that manipulates molecular for-
mulae in <i>virtual chemistry</i>. As in real chemistry, each molecular formula represents a molecule
consisting of one or more atoms. However, it may not hav... |
p04026 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Given a string <var>t</var>, we will call it <em>unbalanced</em> if and only if the length of <var>t</var> is at least <var>2</var>, and more than half of the letters in <var>t</var> are the same. For e... |
p01224 |
<h1><font color="#000">Problem B:</font> å®å
šæ°</h1>
<p>
ããæŽæ° <var>N</var> ã«å¯ŸãïŒãã®æ°èªèº«ãé€ãçŽæ°ã®åã <var>S</var>
ãšããïŒ
<var>N</var> = <var>S</var> ã®ãšã
<var>N</var> ã¯å®å
šæ° (perfect number)ïŒ
<var>N</var> > <var>S</var> ã®ãšã
<var>N</var> ã¯äžè¶³æ° (deficient number)ïŒ
<var>N</var> < <var>S</var> ã®ãšã
... |
p03219 | <span class="lang-en">
<p>Score: <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a train going from Station <var>A</var> to Station <var>B</var> that costs <var>X</var> yen (the currency of Japan).</p>
<p>Also, there is a bus going from Station <var>B</var> to Station <var>C... |
p01674 |
<h2>H - Rings</h2>
<h3>Problem Statement</h3>
<p>
There are two circles with radius 1 in 3D space. Please check two circles are connected as chained rings.
</p>
<h3>Input</h3>
<p>
The input is formatted as follows.
</p>
<pre>
<var>{c_x}_1</var> <var>{c_y}_1</var> <var>{c_z}_1</var>
<var>{v_x}_{1,1}</var> <var>{v_... |
p03649 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a sequence of length <var>N</var> consisting of non-negative integers. Consider performing the following operation on this sequence until the largest element in this sequence becomes <var>N-1</v... |
p00966 |
<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... |
p02408 | <H1>Finding Missing Cards</H1>
<p>
Taro is going to play a card game. However, now he has only <var>n</var> cards, even though there should be 52 cards (he has no Jokers).
</p>
<p>
The 52 cards include 13 ranks of each of the four suits: spade, heart, club and diamond.
</p>
<H2>Input</H2>
<p>
In the first line,... |
p00435 |
<H1>ã·ãŒã¶ãŒæå·</H1>
<h2>åé¡</h2>
<p>
ã¬ã€ãŠã¹ã»ãŠãªãŠã¹ã»ã«ãšãµã«ïŒGaius Julius Caesar)ïŒè±èªèªã¿ã§ãžã¥ãªã¢ã¹ã»ã·ãŒã¶ãŒïŒJulius CaesarïŒã¯ïŒå€ä»£ããŒãã®è»äººã§ããæ¿æ²»å®¶ã§ããïŒã«ãšãµã«ã¯ïŒç§å¯ã®æçŽãæžããšãã«ïŒ 'A' ã 'D' ã«ïŒ 'B' ã 'E' ã«ïŒ 'C' ã 'F' ã«ïŒãšããããã«3ã€ããããŠè¡šèšãããšããèšé²ãæ®ã£ãŠããïŒ
</p>
<p>
倧æåã®ã¢ã«ãã¡ããã26æåã ããããªãæååãïŒã«ãšãµã«ãããããã«3æåãã€ãããå€æãæœãåŸãããæååãããïŒãã®ãããªæååãå
ã®æååã«æ»ãããã°ã©ã ãäœæããïŒ
</p>
<p>
åæåã®å€... |
p02058 | <h2>G: Tree</h2>
<h3>åé¡</h3>
<p><var>N</var> é ç¹ãããªãæšãäžããããŸããæšã®åé ç¹ã«ã¯ <var>1</var> ãã <var>N</var> ã®çªå·ãå²ãæ¯ãããŠããŸãããŸãã<var>Nâ1</var> æ¬ã®èŸºã®ãã¡ã <var>i\ (= 1, 2, ..., N-1)</var> æ¬ç®ã®èŸºã¯é ç¹ <var>u_i</var> ãšé ç¹ <var>v_i</var> ãšãçµãã§ããŸãã</p>
<p>ãã®æšã® <var>K</var> åã®ç©ºã§ãªãéšåã°ã©ãã®çµã§ãã£ãŠãåéšåã°ã©ããããããé£çµã§ãã©ã®äºã€ã®çžç°ãªãéšåã°ã©ããé ç¹ãå
±æããªããã®ã®åæ°ãæ±ããããã°ã©ã ã... |
p00065 |
<H1>ååŒ</H1>
<p>
ååŒå
ã®é¡§å®¢çªå·ãšååŒæ¥ãæããšã«èšé²ããããŒã¿ããããŸãã仿ã®ããŒã¿ãšå
æã®ããŒã¿ãèªã¿èŸŒãã§ãå
æããïŒã¶æé£ç¶ã§ååŒã®ããäŒç€Ÿã®é¡§å®¢çªå·ãšååŒã®ãã£ãåæ°ãåºåããããã°ã©ã ãäœæããŠãã ããããã ããæã
ã®ååŒå
æ°ã¯ 1,000 瀟以å
ã§ãã
</p>
<H2>Input</H2>
<p>
仿ã®ããŒã¿ãšãå
æã®ããŒã¿ãïŒè¡ã®ç©ºè¡ã§åºåãããŠäžããããŸããããããã®ããŒã¿ã¯ä»¥äžã®ãããªåœ¢åŒã§äžããããŸãã
</p>
<pre>
<var>c<sub>1</sub></var>,<var>d<sub>1</sub></var>
<var>c<sub>2</sub></var>,<... |
p03560 | <span class="lang-en">
<p>Score : <var>700</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Find the smallest possible sum of the digits in the decimal notation of a positive multiple of <var>K</var>.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>2 \leq K... |
p03130 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are four towns, numbered <var>1,2,3</var> and <var>4</var>.
Also, there are three roads. The <var>i</var>-th road connects different towns <var>a_i</var> and <var>b_i</var> bidirectionally.
No two... |
p03999 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given a string <var>S</var> consisting of digits between <code>1</code> and <code>9</code>, inclusive.
You can insert the letter <code>+</code> into some of the positions (possibly none) between... |
p02371 |
<H1>Diameter of a Tree</H2>
<br/>
<p>
Given a tree <var>T</var> with non-negative weight, find the diameter of the tree.
</p>
<p>
The diameter of a tree is the maximum distance between two nodes in a tree.
</p>
<H2>Input</H2>
<pre>
<var>n</var>
<var>s<sub>1</sub></var> <var>t<sub>1</sub></var> <var>w<sub>1</sub></... |
p03833 | <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> barbecue restaurants along a street.
The restaurants are numbered <var>1</var> through <var>N</var> from west to east, and the distance between restaurant <var>i</var> and restau... |
p02721 | <span class="lang-en">
<p>Score : <var>500</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi has decided to work on <var>K</var> days of his choice from the <var>N</var> days starting with tomorrow.</p>
<p>You are given an integer <var>C</var> and a string <var>S</var>. Takahashi will... |
p00209 |
<H1>åçã«åã£ãŠããæ¯è²ã¯?</H1>
<p>
A åã¯äŒæŽ¥ã«èгå
ã«ãã£ãŠããŸããã宿æ³ããããã«ã®çªããã¯äŒæŽ¥çå°ãäžæã§ããŸããæ¯è²ãçºããŠãããšãåºã«åçã®åã端ãèœã¡ãŠããã®ã«æ°ãã€ããŸãããã©ãããçªããå€ã®æ¯è²ãæ®ã£ãããã§ãããã©ã®èŸºããæ®ã£ãã®ããªããšãA åã¯çªã®å€ã®æ¯è²ãšåçãåã倧ããã«ãªãããã«åçãããããŠãåçãšçªã®å€ã®æ¯è²ãäžèŽããå Žæãæ¢ãå§ããŸããã
</p>
<p>
ããã§ã¯ãA åããã£ãŠããããšãã³ã³ãã¥ãŒã¿ã§ãã£ãŠã¿ãŸããããçªã®å€ã®æ¯è²ã <var>n × n</var> ãã¹ã®æ£æ¹åœ¢ã«åå²ããŸã (<var>n</var> ãæ¯è²ã®å€§ãããšåŒã³ãŸã)ãåãã¹... |
p02234 |
<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>Matrix-chain Multiplication... |
p03976 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<blockquote>
<p>
Kyoto University Programming Contest is a programming contest voluntarily held by some Kyoto University students.
This contest is abbreviated as <b>K</... |
p00659 |
<H1>Problem A: Popularity Estimation</H1>
<p>
ããªãã¯ãšããã¢ãã¡ãŒã·ã§ã³å¶äœäŒç€Ÿã®äŒç»éšé·ã§ãããæšä»ã®ã¢ãã¡ãŒã·ã§ã³å¶äœäŒç€Ÿãå¶äœãããã®ã¯ãã¢ãã¡ãŒã·ã§ã³ãã®ãã®ã«ãšã©ãŸããªããé¢é£ååãäŸãã°ç»å Žãã£ã©ã¯ã¿ãŒã®ãã£ã®ã¥ã¢ããã£ã©ã¯ã¿ãŒãœã³ã°CDãªã©ããéèŠãªåçæºãªã®ã§ããããã®åçãã©ãã ã䌞ã°ãããã¯ãã²ãšãã«äŒç»éšé·ã®ããªãã«ããã£ãŠããã®ã§ãã£ãã
</p>
<p>
åœããåã®ããšã ãããããã£ãé¢é£ååã¯éé²ã«çºå£²ããã°ãããšãããã®ã§ã¯ãªããååã®éçºã«ã¯å€ãã®æéãšäºç®ãå¿
èŠãªããã ãã¢ãã¡ã®ç»å Žãã£ã©ã¯ã¿ãŒã®ãã£ã®ã¥ã¢ãçºå£²ããã«ããŠããå€ãã®å£²äžãèŠèŸŒãŸã... |
p02664 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>For a string <var>S</var> consisting of the uppercase English letters <code>P</code> and <code>D</code>, let the <em>doctoral and postdoctoral quotient</em> of <var>S</var> be the total number of occurr... |
p03425 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> people. The name of the <var>i</var>-th person is <var>S_i</var>.</p>
<p>We would like to choose three people so that the following conditions are met:</p>
<ul>
<li>The name of ev... |
p01418 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script>
<H1>Sleeping Time</H1>
<p>
Miki is a high school student.
She has a part time job, so she cannot take enough sleep on weekdays.
She wants to take good sleep on holidays, but she doesn't know the best length of sleeping time for her.
She is now trying t... |
p03075 | <span class="lang-en">
<p>Score: <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>In AtCoder city, there are five antennas standing in a straight line. They are called Antenna <var>A, B, C, D</var> and <var>E</var> from west to east, and their coordinates are <var>a, b, c, d</var> a... |
p01048 |
<h1>Divisor</h1>
<h2>Problem</h2>
<p>
12以äžã®èªç¶æ° <var>N</var> ãäžããããã®ã§ãçŽæ°ã®åæ°ãã¡ããã© <var>N</var> åã§ãããããªæå°ã®èªç¶æ°ãæ±ããã
</p>
<h2>Input</h2>
<p>
1ã€ã®èªç¶æ° <var>N</var> ã 1 è¡ã§äžããããã
</p>
<h2>Constraints</h2>
<ul>
<li>1 ≤ <var>N</var> ≤ 12</li>
</ul>
<h2>Output</h2>
<p>
çŽæ°ã®åæ°ãã¡ããã© <var>N</var> åã§ãããããªæå°ã®èªç¶æ°ã1è¡ã«åºåããã
</p... |
p00835 |
<H1><font color="#000">Problem I:</font> Crossing Prisms</H1>
<p>
Prof. Bocchan is a mathematician and a sculptor. He likes to create sculptures with mathematics.
</p>
<p>
His style to make sculptures is very unique. He uses two identical prisms. Crossing them at right
angles, he makes a polyhedron that is their inte... |
p02808 | <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> children, numbered <var>1,2,\ldots,N</var>.
In the next <var>K</var> days, we will give them some cookies.
In the <var>i</var>-th day, we will choose <var>a_i</var> children amon... |
p01727 |
<p>ããã°ã©ãã³ã°ã³ã³ãã¹ãã®å宿ã§åºãåé¡ã®ã¢ã€ãã£ã¢ãåºãã«å°ã£ãŠããã€ã¯ã¿åã¯ãããæ¥å人ã«çžè«ããã
</p>
<p>ã€ã¯ã¿åãããããã¢ã«ãŽãªãºã ã䜿ããªããšè§£ããªããããªåé¡ãåºããããã§ããã©ããªã«ããããŸããããïŒã
</p>
<p>å人ãããã§ã¯ãããããã®ãèãããããããããªãã§ããã
</p>
<p>ãã®ããã«ããŠãã®å人ã¯ä»¥äžã®ãããªåé¡ã®åæ¡ãšãªãã¢ã€ãã¢ãèããŠãããã
</p>
<p>2鲿°<var>A,B</var>ãäžããããæã以äžã®æ§ãªã¯ãšãªãåŠçããã
<ul>
<li> åºåã¯ãšãª: max{<var>x</var> ã2鲿°ã§è¡šãããšãã®ã1ã®æ° | <var>A &l... |
p01377 |
<div>
<h1 class="title">åé¡ B : (iwi)</h1>
<p>20XX 幎ã®ä»ïŒGââgle 瀟ã®äžççãªæ¯é
ã«ããïŒäººã
ã®ã³ãã¥ãã±ãŒã·ã§ã³ã¯éãããŠããïŒ
äŸãã°ïŒèªç±ã«äººãšæ
å ±ããããšãããããšã¯åºæ¬çã«èš±ãããŠããªãïŒ
ç¹ã«ïŒéå»ã«ããã°ã©ãã³ã°ã³ã³ãã¹ãã§åã銳ãã匷豪ãã¡ã¯ïŒå±éºãšå€æããïŒ
ãäºããã©ãã©ã«ããïŒå¯ãã«æ³šææ·±ãç£èŠãããŠãããšããïŒ</p>
<p>èªåãïŒãããªäžäººã§ãã£ãïŒãããªæ°ãããïŒ
ãããå®ã¯ïŒèªåã¯èšæ¶ã倱ã£ãŠããŸã£ãŠããã®ã ïŒ
èªåãäœãšåä¹ã£ãŠãããïŒãããããæãåºããªãïŒ
'i' ãšã 'w' ãšãæ¬åŒ§ãšãã䜿ã£ãŠããæ°ããããïŒ
ããã£ãœããã®ãæž... |
p00136 |
<H1>床æ°ååž</H1>
<p>
å¥åº·èšºæã§çåŸã®èº«é·ãèšæž¬ããŸããã身é·ã®ããŒã¿ãå
¥åãšãã床æ°ååžãäœæããŠåºåããããã°ã©ã ãäœæããŠãã ããã床æ°ååžã®éçŽã¯ 5 cm å»ã¿ã® 6 ã€ã®éçŽãšãã床æ°ã¯äººæ°ã *ïŒåè§ã¢ã¹ã¿ãªã¹ã¯ïŒã§è¡šç€ºããŸãããã ãããã®éçŽã®åºŠæ°ïŒäººæ°ïŒã 0 ã®å ŽåãéçŽã®èŠåºãã®ã¿ãåºåããŠãã ããã
</p>
<H2>Input</H2>
<p>
å
¥åã¯ä»¥äžã®åœ¢åŒã§äžããããŸãã
</p>
<pre>
<var>n</var>
<var>h<sub>1</sub></var>
<var>h<sub>2</sub></var>
:
<var>h<sub>n</sub></var>
<... |
p00566 | <h1>å¹¹ç·éè·¯ (Trunk Road)</h1>
<h2>å顿</h2>
<p>
JOI åžã¯ïŒæ±è¥¿æ¹åã«ãŸã£ããã«äŒžã³ã <var>H</var> æ¬ã®éè·¯ãšïŒååæ¹åã«ãŸã£ããã«äŒžã³ã <var>W</var> æ¬ã®éè·¯ã«ãã£ãŠïŒç¢ç€ã®ç®ã®åœ¢ã«åºåããããŠããïŒéè·¯ãšéè·¯ã®éé㯠<var>1</var> ã§ããïŒJOI åžã§ã¯ïŒããã <var>H+W</var> æ¬ã®éè·¯ããïŒæ±è¥¿æ¹åã« <var>1</var> æ¬ïŒååæ¹åã« <var>1</var> æ¬ïŒåèš <var>2</var> æ¬ã®éè·¯ãå¹¹ç·éè·¯ãšããŠéžã¶ããšã«ãªã£ãïŒ</p>
<p>
åãã <var>i</var> æ¬ç® (<var>1âŠiâŠH</... |
p00073 |
<H1>åè§ããã®è¡šé¢ç©</H1>
<p>
1 蟺ã <var>x</var> ã®æ£æ¹åœ¢ãåºé¢ãšãããé«ã <var>h</var> ã®åè§ããã®è¡šé¢ç© <var>S</var> ãåºåããããã°ã©ã ãäœæããŠäžããããã ããé ç¹ãšåºé¢ã®äžå¿ãçµã¶ç·åã¯åºé¢ãšçŽäº€ããŠãããšããŸãããŸãã <var>x</var>ã<var>h</var> 㯠100 以äžã®æ£ã®æŽæ°ãšããŸãã
</p>
<H3 class="bar">Input</H3>
<p>
è€æ°ã®ããŒã¿ã»ãããäžããããŸããåããŒã¿ã»ããã¯ä»¥äžã®åœ¢åŒã§äžããããŸãã
</p>
<pre>
<var>x</var>
<var>h</var>
</pre>
<p... |
p00589 |
<!--
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>problem</title>
</head>
<body bgcolor="#FFFFFF">
<link rel="stylesheet" href="../problem_e.css" type="text/css" />
-->
<H1>Extraordinary Girl (II)</H1>
<p>
She loves e-mail so much! She sends e-mails by her cellular phone t... |
p00423 |
<H1><!-- Card Game--></H1>
<p>
A ãš B ã® 2 人ã®ãã¬ãŒã€ãŒãïŒ 0 ãã 9 ãŸã§ã®æ°åãæžãããã«ãŒãã䜿ã£ãŠã²ãŒã ãè¡ãïŒæåã«ïŒ 2 人ã¯äžãããã n æãã€ã®ã«ãŒããïŒè£åãã«ããŠæšªäžåã«äžŠã¹ãïŒãã®åŸïŒ 2 人ã¯åèªã®å·Šãã 1 æãã€ã«ãŒãã衚åãã«ããŠããïŒæžãããæ°åã倧ããæ¹ã®ã«ãŒãã®æã¡äž»ãïŒãã® 2 æã®ã«ãŒããåãïŒãã®ãšãïŒãã® 2 æã®ã«ãŒãã«æžãããæ°åã®åèšãïŒã«ãŒããåã£ããã¬ãŒã€ãŒã®åŸç¹ãšãªããã®ãšããïŒãã ãïŒéãã 2 æã®ã«ãŒãã«åãæ°åãæžãããŠãããšãã«ã¯ïŒåŒãåããšãïŒåãã¬ãŒã€ãŒãèªåã®ã«ãŒãã 1 æãã€åããã®ãšããïŒ
</p>
... |
p00970 | <h2>Emergency Evacuation</h2>
<p>
The Japanese government plans to increase the number of inbound tourists to forty million in the year 2020, and sixty million in 2030. Not only increasing touristic appeal but also developing tourism infrastructure further is indispensable to accomplish such numbers.
</p>
<p>
One... |
p01662 |
<h2>G - èªç±ç ç©¶</h2>
<p>
ãã€ãã®æ¬¡éã¯å€äŒã¿ã®èªç±ç ç©¶ã§<em>æå€§ç¬ç«éååé¡</em>ã®ã¢ã«ãŽãªãºã ãèããŠããïŒ
æå€§ç¬ç«éååé¡ã§ã¯ïŒå
¥åãšããŠç¡åã°ã©ã <var>G=(V,E)</var> ãäžããããïŒ
<var>G</var> ã®åé ç¹ãçœãŸãã¯é»ã§å¡ãããŠããïŒã©ã®èŸºã®ç«¯ç¹ãå°ãªããšãäžæ¹ãçœãå¡ãããŠãããšãïŒé»ãé ç¹éåã®ããšã<em>ç¬ç«éå</em>ãšåŒã¶ïŒ
äŸãã°äžå³ã«ãããŠïŒå³ã®å·Šéšã®ãããªã°ã©ããäžããããæïŒå³ã®äžå€®éšã®ããã«è²ãå¡ããšé»ãé ç¹éåã¯ç¬ç«éåã«ãªã£ãŠãããïŒäžæ¹ã§å³ã®å³éšã®ããã«è²ãå¡ã£ãå Žåã¯é»ãé ç¹éåã¯ç¬ç«éåã«ãªã£ãŠããªãïŒ
åé¡ã®ç®çã¯ïŒèŠçŽ æ°ã... |
p01398 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script>
<h2>
Problem A: ã¹ã¯ããæå·
</h2>
<p>
R倧åŠã®ãšãã2D奜ããªåœŒã¯ã人ã«èŠããããšèµ€é¢ãããããªæ¥ããããæç« ãæ¥é ããããæžããŠããã
ãã®ããã第äžè
ã«èªåã®æžããŠããæç« ãèŠãããªãããã«ã圌ãç¬èªã«èãåºããã¹ã¯ããæå·ãšããææ³ã«ããæç« ãæå·åããŠããã
ã¹ã¯ããæå·ã§ã¯ã次ã®ãããªã¹ãããã<i>N</i>åç¹°ãè¿ããæå·åãè¡ãã
</p>
<ol>
<li>
æååã®<i>a<sub>i</sub></i>çªç®ãš<i>b<sub>i</sub></i>çªç®ãå
¥ã... |
p01232 |
<h1><font color="#000">Problem J:</font> ãã«ããã®æ°åŒ</h1>
<p>
ããªãã®å人ã®èå€åŠè
ãéºè·¡ãçºæããŠããïŒ
ããæ¥ïŒåœŒã¯æªãããªèšå·ã®çŸ
åãå»ãŸããŠããç³ç€ã倧éã«çºèŠããïŒ
圌ã¯ãã®å€§çºèŠã«å€§åã³ãïŒããããŸç³ç€ã«å»ãŸããŠããèšå·ã®è§£èªãå§ããïŒ
äœé±éã«ãããã圌ã®è§£èªã®åªåã®çµæïŒ
ã©ããããããã®ç³ç€ã«ã¯å€æ°ã»æŒç®åã»ã«ãã³ã®çµã¿åããã§æãç«ã£ãŠãã
æ°åŒã®ãããªãã®ãå»ãŸããŠããããšãããã£ãïŒ
çºæããç³ç€ãšéºè·¡ã«é¢ããæç®ã調ã¹ãŠãããã¡ã«åœŒã¯ããã«ïŒ
ããããã®ç³ç€ã§æŒç®åã®çµåèŠåãç°ãª... |
p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... |
p02737 | <span class="lang-en">
<p>Score : <var>900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Given are simple undirected graphs <var>X</var>, <var>Y</var>, <var>Z</var>, with <var>N</var> vertices each and <var>M_1</var>, <var>M_2</var>, <var>M_3</var> edges, respectively.
The vertices in <var>... |
p01818 |
<h2>Leapfrog</h2>
<h3>Problem Statement</h3>
<p><var>N</var> åã®ãã¹ãåç¶ã«äžŠãã§ããããã¹ã¯æèšåãã« <var>1,\ 2,\ </var> ... <var>,\ N</var> ãšçªå·ãæ¯ãããŠãããå <var>i</var> (<var>1 ≤ i ≤ N−1</var>) ã«ã€ããŠã<var>i</var> çªç®ã®ãã¹ãš <var>i+1</var> çªç®ã®ãã¹ã¯é£ãåãããŸãã<var>N</var> çªç®ã®ãã¹ãš <var>1</var> çªç®ã®ãã¹ã¯é£ãåãã</p>
<p>ãããã®ãã¡ <var>M</var> å... |
p03825 | <span class="lang-en">
<p>Score : <var>1600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> zeros and <var>M</var> ones written on a blackboard.
Starting from this state, we will repeat the following operation: select <var>K</var> of the rational numbers written on the ... |
p02367 |
<H1>Bridges</H1>
<p>
Find bridges of an undirected graph <var>G(V, E)</var>.
</p>
<p>
A bridge (also known as a cut-edge) is an edge whose deletion increase the number of connected components.
</p>
<H2>Input</H2>
<pre>
<var>|V|</var> <var>|E|</var>
<var>s<sub>0</sub></var> <var>t<sub>0</sub></var>
<var>s<sub>1</su... |
p03126 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Katsusando loves omelette rice.</p>
<p>Besides, he loves crÚme brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone.</p>
<p>To prove that hypothesis, he conducted ... |
p03576 | <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> points in a two-dimensional plane.<br/>
The coordinates of the <var>i</var>-th point <var>(1 \leq i \leq N)</var> are <var>(x_i,y_i)</var>.<br/>
Let us consider a rectangle whose si... |
p03599 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is making sugar water in a beaker.
Initially, the beaker is empty. Snuke can perform the following four types of operations any number of times. He may choose not to perform some types of operatio... |
p03063 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There are <var>N</var> stones arranged in a row. Every stone is painted white or black.
A string <var>S</var> represents the color of the stones. The <var>i</var>-th stone from the left is white if the ... |
p03433 | <span class="lang-en">
<p>Score: <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>E869120 has <var>A</var> <var>1</var>-yen coins and infinitely many <var>500</var>-yen coins.<br/>
Determine if he can pay exactly <var>N</var> yen using only these coins.</p>
</section>
</div>
<div cla... |
p02388 |
<H1>X Cubic</H1>
<p>
Write a program which calculates the cube of a given integer <var>x</var>.
</p>
<H2>Input</H2>
<p>
An integer <var>x</var> is given in a line.
</p>
<H2>Output</H2>
<p>
Print the cube of <var>x</var> in a line.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ <var>x</var> ≤ 100</li>
</ul>
<... |
p02672 | <span class="lang-en">
<p>Score : <var>1100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p><strong>This is an interactive task.</strong></p>
<p>You have to guess a secret password <var>S</var>.
A password is a nonempty string whose length is at most <var>L</var>.
The characters of a passwo... |
p03960 | <span class="lang-en">
<p>Score : <var>800</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Mr. Takahashi has in his room an art object with <var>H</var> rows and <var>W</var> columns, made up of <var>H \times W</var> blocks.
Each block has a color represented by a lowercase English letter (<c... |
p02222 | <span class="lang">
<span class="lang-ja">
<h1>L: æšã®åœ©è²</h1>
<div class="part">
<section>
<h3>å顿</h3><p>ã¢ãã¥ãŒãããã¯æšã®çµµãæãã®ããšãŠãããŸãã§ãã</p>
<p>ã¢ãã¥ãŒãããã¯é·ã幎æããããŠé ç¹ã $N$ åã§ããæšã®çµµãæžããŸããã
ãã®æšã®é ç¹ã«ã¯ $1$ ãã $N$ ãŸã§ã®çªå·ãã€ããŠãããé ç¹ $a_i$ ãš $b_i$ $(1 \leq i \leq N-1)$ ã¯çŽæ¥èŸºã§ã€ãªãããŠããŸãã
ãã¹ãŠã®é ç¹ã«ã¯è²ããŸã å¡ãããŠããŸããã</p>
<p>ã¢ãã¥ãŒããããæžãããã®æšã®çµµã¯ããããã®äººãæåãã... |
p00531 |
<h2>æ°Žéæé (Water Rate)</h2>
<h2> åé¡</h2>
<p>
JOI åãäœãã§ããå°åã«ã¯æ°ŽéäŒç€Ÿã X 瀟㚠Y 瀟㮠2 ã€ããïŒ2 ã€ã®äŒç€Ÿã® 1 ã¶æã®æ°Žéæéã¯ïŒ1 ã¶æã®æ°Žéã®äœ¿çšéã«å¿ããŠæ¬¡ã®ããã«æ±ºãŸãïŒ
</p>
<ul>
<li>X ç€ŸïŒ 1 ãªããã« ããã A åãããïŒ</li>
<li>Y ç€ŸïŒ åºæ¬æé㯠B åã§ããïŒäœ¿çšéã C ãªããã«ä»¥äžãªãã°ïŒæéã¯åºæ¬æé B åã®ã¿ããããïŒäœ¿çšéã C ãªããã«ãè¶
ãããšåºæ¬æé B åã«å ããŠè¿œå æéããããïŒè¿œå æéã¯äœ¿çšéã C ãªããã«ã 1 ãªããã«è¶
ããããšã« D åã§ããïŒ</li>
</ul>
<... |
p00161 |
<H1>äœè²ç¥Sport Meet</H1>
<p>
ç§ã®äœè²ç¥ãè¡ãããŸããçš®ç®ã¯åŸç«¶èµ°ãããŒã«éã³ãé害ç©ç«¶èµ°ããªã¬ãŒã®4çš®ç®ã§ããåå ããŒã 㯠<var>n</var> ããŒã ã§ããã®4çš®ç®ã®åèšã¿ã€ã ãæãå°ããããŒã ããåªåããæ¬¡ã«å°ããããŒã ããæºåªåãããããŠãæäžäœãã2çªç®ã®ããŒã ããããŒããŒè³ããšããŠè¡šåœ°ããããšæããŸãã
</p>
<p>
åããŒã ã®æçžŸãå
¥åãšããŠããåªåãããæºåªåãããããŒããŒè³ãã®ããŒã ãåºåããããã°ã©ã ãäœæããŠãã ããã
ãã ããããŒã ã«ã¯ãããã 1 ãã <var>n</var> ã®ããŒã çªå·ãå²ãåœãŠãããŠããŸãã
</p>
<H2>Input</H2>
<p... |
p01320 |
<h1><font color="#000">Problem G:</font> Magical Island 2</h1>
<!--
<h3><U>鿳島ç©èª2</U></h3>
-->
<p>ãŸã éæ³ãããããŸãã®ããã«ååšããæä»£ã§ããïŒããéå°å£«ã®äžæã¯ïŒéåã«ãã£ãŠäœãããæ£æ¹åœ¢ã®åœ¢ã®å³¶ã«äœãã§ããïŒ</p>
<p>ããæïŒãã®å³¶ã«å±æ©ã蚪ããïŒåžåœã倧éžé匟ééå°ããµã€ã«ãéçºãïŒãã®å³¶ãç
§æºã«åãããŠããã®ã§ããïŒãã®äžçã®éæ³ã¯å°å±æ§ïŒæ°Žå±æ§ïŒç«å±æ§ïŒé¢šå±æ§ãªã©ã«åé¡ã§ãïŒéå°ããµã€ã«ããã®åã€ã®å±æ§ã®ããããã«å±ããŠããïŒå³¶ã®åé
ã«ã¯ããããå°ã®æ°Žæ¶ïŒæ°Žã®æ°Žæ¶ïŒç«ã®æ°Žæ¶ïŒé¢šã®æ°Žæ¶ãé
眮ãããŠããŠïŒæ°Žæ¶ã«... |
p00862 |
<H1><font color="#000">Problem I:</font> Most Distant Point from the Sea</H1>
<p>
The main land of Japan called Honshu is an island surrounded by the sea. In such an island, it
is natural to ask a question: "Where is the most distant point from the sea?" The answer to
this question for Honshu was found in 1996. The m... |
p01770 |
<h1 id="arojams-mask-ã ãžã¥ã©ã®ä»®é¢">E : Arojam's Mask / ä»®é¢</h1>
<h2 id="å顿">å顿</h2>
<p>ããªãã¯åè
ã§ãããåè
ãæ
ãããŠããäžç㯠<var>N</var> åã®è¡ãšãç°ãªãè¡å士ãçµã¶ <var>M</var> æ¬ã®éãããªããé <var>i</var> ã¯è¡ <var>a_i</var> ãšè¡ <var>b_i</var> ãçµã³ãåæ¹åã«ç§»åå¯èœã§ããã</p>
<p>è¡ <var>S</var> ããåºçºããè¡ <var>T</var> ã«ç§»åããããšãåè
ã®ç®çã§ããã <var>S,T</var> ã¯ç°ãªãè¡ã§ãããåè
㯠<... |
p03258 | <span class="lang-en">
<p>Score : <var>1300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>There is a string <var>s</var> consisting of <code>a</code> and <code>b</code>.
Snuke can perform the following two kinds of operation any number of times in any order:</p>
<ul>
<li>Choose an occurrenc... |
p01265 |
<H1><font color="#000">Problem F:</font> Ninja Legend</H1>
<p>
Ninjas are professional spies in the Middle Age of Japan. They have been popular in movies and games
as they have been described with extraordinary physical abilities and unrealistic abilities.
</p>
<p>
You are absorbed in one of ninja games, <i>Ninja Leg... |
p00927 |
<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 D:
Space Golf
</h2>
<p... |
p03608 | <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> towns in the State of Atcoder, connected by <var>M</var> bidirectional roads.</p>
<p>The <var>i</var>-th road connects Town <var>A_i</var> and <var>B_i</var> and has a length of <... |
p01635 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: { inlineMath: [['\\(','\\)']] }
});
</script>
<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<h1 class="ndoc-heading1">Problem B: Time Complexity</h1>
<p class="ndo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.