question_id stringlengths 6 6 | content stringlengths 1 27.2k |
|---|---|
p03548 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a long seat of width <var>X</var> centimeters.
There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length <var>Y</var> centimeters.</p>
<p... |
p01575 |
<H1><font color="#000">Problem E:</font> Dungeon Master</H1>
<p>
Once upon a time, in a fantasy world far, far away, monsters dug caves and dungeons for adventurers. They put some obstacles in their caves so it becomes more difficult and more exciting for the adventurers to reach the goal.
</p>
<p>
One day, Emils, o... |
p01060 |
<h1>Product Sale Lines</h1>
<h2>Problem</h2>
<p>
ãŠãã¯ã坿ãããšç®é»åããã¯SEARIGHT LIVE FESã®ç©è²©ã«æ¥ãŠãããäžå³ã®ããã«ãç©è²©åã¯äºåãããªããæšªã«<var>W</var>人ã瞊ã«<var>H</var>人䞊ã¹ã倧ããã§ã³ã®åã®åœ¢ãããŠãããåã®å
é ã®äººã¯è²·ãç©ãããåŸã«åããã¯ããåãåã®åŸãã®äººã
ã¯ããããäžäººåãã€åãè©°ããã
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE3_UAPC2016Spring_B1" alt="picture o... |
p01430 |
<script type="text/javascript" src="./varmath.js" charset="UTF-8"></script>
<h2>å顿</h2>
<p>ãã³ã®é女 H.N.ELLY ã¯ãšããåç»ãµã€ãã®ç±ççãªãã¡ã³ã§ããïŒãã³ã®é女ã®åŒ·ãã¯ãã®æã
ã®ãã®åç»ãµã€ãããã®è»¢éé床ã«å¿ããŠå€åããã®ã§ã¯ãªãããš<i>çŸæš¹ããã</i>ã¯èããïŒããã§åç»ãµã€ããããã³ã®éå¥³ã®æã€ã³ã³ãã¥ãŒã¿ãŸã§ã®éå»ã®è»¢éé床 (=åäœæéãããã®ããŒã¿ã®è»¢éé) ã調ã¹ããïŒ</p>
<p>åæã®ã€ã³ã¿ãŒãããã®ãããã¯ãŒã¯ã®æ§é ãšãã以éã®ãããã¯ãŒã¯ã®æ§é ã®å€åã衚ãã¯ãšãªãäžããããã®ã§ïŒåå€åã«ã€ããŠå€å... |
p00671 |
<h1>Problem C: Live Schedule</h1>
<p>
YOKARI TAMURAã¯å
šåœçã«æåãªã¢ãŒãã£ã¹ãã§ããã仿YOKARI㯠D æ¥éã«ããã£ãŠã©ã€ããã¢ãŒãè¡ãããã¢ãŒã®ã¹ã±ãžã¥ãŒã«ã®æ±ºå®ã«ãããŠãã®åœã C çš®é¡ã®å°åã§ããããYOKARIãããå°åã§ã©ã€ããè¡ãããšã«ããå©çãåŸãããããã¯æ£ã®æŽæ°ã§è¡šããããYOKARIã¯ååãšã㊠1 æ¥ã«æå€§ 1 ã€ãŸã§ã©ã€ããè¡ãããã ããããå°åã§ã©ã€ããè¡ã£ãåŸã飿¥ããå°åã§ã©ã€ããè¡ããå Žåã¯ãã®å°åã§åãæ¥ã«åã³ã©ã€ããè¡ãããšãã§ããããã®æ¡ä»¶ãæºããéããå°åãç§»åããªããäœåºŠãã©ã€ããè¡ãããšãã§ããããŸããåãæ¥ã«åãå°åã§ã©ã€ãã... |
p01963 |
<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... |
p00221 |
<H1>FizzBuzz</H1>
<p>
ãFizz Buzzããšèšãããæ°åã䜿ã£ãã²ãŒã ããããŸãããã®ã²ãŒã ã¯è€æ°ã®ãã¬ã€ã€ãŒã§æ°åã1 ããé ã«ã²ãšã€ãã€æ°ãäžããŠãããã®ã§ãåãã¬ã€ã€ãŒã¯çŽåã®ãã¬ã€ã€ãŒãçºèšããæ¬¡ã®æ°åãã²ãšã€ã ãçºèšããŸãããã®æã3 ã§å²ãåããå Žå㯠ãFizzã, 5 ã§å²ãåããå Žå㯠ãBuzzããäž¡è
ã§å²ãåããå Žåã¯ãFizzBuzzããšæ°ã®ä»£ããã«çºèšããªããã°ãªããŸãããäŸãã°ãæåã® 16 ãŸã§ã®çºèšã¯ä»¥äžã®ããã«ãªããŸãã
</p>
<p>
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14... |
p02836 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>Takahashi loves palindromes. Non-palindromic strings are unacceptable to him. Each time he hugs a string, he can change one of its characters to any character of his choice.</p>
<p>Given is a string <v... |
p01719 |
<p>é·å¹Žã®ç ç©¶ã®æ«ãã€ã¯ã¿åã¯æªæ¥äºç¥èœåãæã«å
¥ããïŒã圌ããã®ç ç©¶ã«è²»ãããæéãééã¯è«å€§ãªãã®ã§ãã£ãããã€ãã«å ±ãããæããã£ãŠããã®ã ãæå§ãã«ééãåãæ»ããããã€ã¯ã¿åã¯æ ªåŒæè³ãå§ããããšã«ããã
</p>
<p>
ã€ã¯ã¿åã¯çŸåšæ ªåŒã¯å
šãä¿æããŠãããã <var>x</var> åãææããŠããã圌ãæè³å¯Ÿè±¡ã«å®ããæ ªåŒã¯ <var>n</var> çš®é¡ã§ããããã«ã€ããŠä»æ¥ãã <var>d</var> æ¥åã®æ ªäŸ¡ãäºç¥ããããšã«æåããããã®çµæãé©ãã¹ãããšã«ä»æ¥ãã <var>d</var> æ¥éã¯æ¥äžã®æ ªäŸ¡å€åãå
šããªãããšã倿ãããã€ãŸãã仿¥ã1æ¥ç®ãšãããšãã® <var>i </va... |
p03724 | <span class="lang-en">
<p>Score : <var>500</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi is not good at problems about trees in programming contests, and Aoki is helping him practice.</p>
<p>First, Takahashi created a tree with <var>N</var> vertices numbered <var>1</var> through <... |
p01349 |
<H1>Problem A: Ennichi</H1>
<p>
çžæ¥ã«æ¥ããããã, ããåºåºã®ã²ãŒã ã®æ¯åããã£ãããã±ãŒãã§ããã®ãèŠã€ãã. ãã®ã²ãŒã ã®ã«ãŒã«ã¯ä»¥äžã®éãã§ãã.
</p>
<p>
瞊h ãã¹× 暪w ãã¹ã®æ Œåç¶ã®ãã£ãŒã«ãããã, åãã¹ã«ã€ãé«ã
1 åã®ãããã¯ã眮ããã. åãããã¯ã«ã¯ã¢ã«ãã¡ããã倧æå(âAâ - âZâ) ã®ããããã§è¡šãããè²ãã€ããŠãã. åè²ã®ãããã¯ã瞊ãŸãã¯æšªã«äžçŽç·äžã«n å以äžé£ç¶ããŠäžŠã¶ãš, ãããã®ãããã¯ã¯æ¶æ»
ãã.
</p>
<p>
åå è
ã¯æšªã«é£ãåã2 ã€ã®ãã¹ãéžãã§, ãããã®ç¶æ
ãäºãã«å
¥ãæ¿ããæäœãã§ãã. ãããã¯ã®å
¥... |
p03374 | <span class="lang-en">
<p>Score : <var>500</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>"Teishi-zushi", a Japanese restaurant, is a plain restaurant with only one round counter. The outer circumference of the counter is <var>C</var> meters. Customers cannot go inside the counter.</p>
<p>Na... |
p02135 | <h1>Problem L: Tree Fragments</h1>
<h2>Problem</h2>
<p>ããã¡ããã¯ã$N$åã®é ç¹ãš$N-1$æ¬ã®èŸºãããªãæš$T$ãæã£ãŠãããåé ç¹ã«ã¯$1$ãã$N$ãŸã§ã®çªå·ãšãæ£ã®æŽæ°ã®éã¿ãã€ããŠããã</p>
<p>次ã®$Q$åã®ã¯ãšãªã«é ã«çããã</p>
<p>
<ul>
<li>$1 \le a_i,b_i \le N$($a_i \ne b_i$)ãäžããããã®ã§ã$T$ã®$a_i$-$b_i$ãã¹äžã®é ç¹ãšããã«æ¥ç¶ãã蟺ãåãé€ããŠã§ãããããã€ãã®é£çµæåã®äžã§ãéã¿ãæå€§ãšãªãé£çµæåã®éã¿ãåºåããããã®ãããªé£çµæåã1ã€ããªãå Žåã0ãšåºåããã<... |
p00108 |
<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>
æéæ°åã®å€ææäœã«åºçŸé »åºŠæäœãšãããã®ããããŸ... |
p02565 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Consider placing <var>N</var> flags on a line. Flags are numbered through <var>1</var> to <var>N</var>.</p>
<p>Flag <var>i</var> can be placed on the coordinate <var>X_i</var> or <var>Y_i</var>.
For any... |
p00558 |
<h1>ããã® JOI å (Snake JOI)</h1>
<h2>åé¡</h2>
<p>
ããã® JOI åã¯ïŒãã倧ããªå±æ·ã«è¿·ã蟌ãã§ããŸã£ãïŒå±æ·ã®äœäººã«èŠã€ããåã«ïŒå±æ·ãè±åºããªããã°ãªããªãïŒ
</p>
<p>
ãã®å±æ·ã«ã¯éšå±ã N åããïŒ1, 2, ..., N ã®çªå·ãä»ããããŠããïŒãŸãïŒå»äžã M æ¬ããïŒi æ¬ç®ã®å»äž (1 ⊠i ⊠M) ã¯éšå± A<sub>i</sub> ãšéšå± B<sub>i</sub> ãçµãã§ããïŒJOI åã¯ãããã®å»äžãã©ã¡ãã®åãã«ãéãããšãã§ãïŒå»äž i ãéãã®ã«ã¯ D<sub>i</sub> åãããïŒéšå±ãšéšå±ã®éãå»äžãéã以å€ã®ææ®µã§ç§»åãã... |
p02070 | <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: ... |
p02420 | <H1>Shuffle</H1><br>
<p>
Your task is to shuffle a deck of <var>n</var> cards, each of which is marked by a alphabetical letter.
</p>
<p>
A single shuffle action takes out <var>h</var> cards from the bottom of the deck and moves them to the top of the deck.
</p>
<p>
The deck of cards is represented by a string... |
p02973 | <span class="lang-en">
<p>Score : <var>500</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given a sequence with <var>N</var> integers: <var>A = \{ A_1, A_2, \cdots, A_N \}</var>.
For each of these <var>N</var> integers, we will choose a color and paint the integer with that color. He... |
p03661 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke and Raccoon have a heap of <var>N</var> cards. The <var>i</var>-th card from the top has the integer <var>a_i</var> written on it.</p>
<p>They will share these cards.
First, Snuke will take some n... |
p03231 | <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> of length <var>N</var> and another string <var>T</var> of length <var>M</var>.
These strings consist of lowercase English letters.</p>
<p>A string <var>X</var> is cal... |
p01522 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script>
<h1>C - ãœãŒã·ã£ã«</h1>
<h2>å顿</h2>
<p>
ãããã <var>N</var> å¹ããïŒããŒãã䜿ã£ãŠå·ãæž¡ãããšããŠããïŒããŒã㯠<var>K</var> åããïŒèª°ãã©ã®ããŒãã«ä¹ãããé©åœã«æ±ºããŠä¹ãããšã«ããïŒ
</p>
<p>
ãšããã§ããããšããã®ã¯äºãã®ä»²ã®è¯ãæªãã«ææã§ããïŒçã空éã«ä»²ã®æªãããããšäžç·ã«éã蟌ãããããšæ°åãæªãããŠããŸãïŒ
ãã® <var>N</var> å¹ã®ãããã«ã€ããŠãäœçµãã®ãããã¯ä»²ãæªããšããããšãåãã£ãŠããïŒä»ã®å²ãåœãŠ... |
p01172 |
<H1><font color="#000">Problem B:</font> Headstrong Student</H1>
<p>
You are a teacher at a cram school for elementary school pupils.
</p>
<p>
One day, you showed your students how to calculate division of fraction in a class of mathematics.
Your lesson was kind and fluent, and it seemed everything was going so well ... |
p01488 |
<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 C:
TransferTrain
</h2... |
p00333 |
<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>
äŒæŽ¥çã§ã¯äººå£å¢å ã®ããã«ãã¥ãŒã¿ãŠã³ãäœãããš... |
p00763 |
<h1>Railway Connection</h1>
<!-- end en only -->
<!-- begin en only -->
<p>
Tokyo has a very complex railway system.
For example, there exists a partial map of lines and stations
as shown in Figure D-1.
</p>
<!-- end en only -->
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_1182_1" align... |
p01871 |
<!-- - - - - - 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>
<h1>G: å¡ãã ã... |
p00299 |
<h1>åŠé£</h1>
<p>
仿¥ã¯ïŒºå€§åŠã®ãªãŒãã³ãã£ã³ãã¹ã§ããæ¯å¹Žãã®æ¥ã®æŒäŒã¿ã«ã¯ã倧å¢ã®é«æ ¡çãã¡ãåŠé£ã«åãã€ãããŸããããã§ïŒºå€§åŠã®äºåå±ã¯ãè¡åã®é·ããæå€§ã§ã©ã®ãããã®è·é¢ã«ãªãããäºæž¬ããããšã«ããŸãããäºå調æ»ã®çµæã§ã以äžã®ããšãåãã£ãŠããŸãã
</p>
<ul>
<li> è¡åã«ã¯ãããã 1 ãã <var>N</var> ãŸã§ã®çªå·ãæ¯ããã <var>N</var> 人ã䞊ã³ãŸãã</li>
<li> <var>C</var> åã®é«æ ¡çã®ã㢠(<var>a<sub>i</sub></var>, <var>b<sub>i</sub></var>) ããããã«ã€ããŠã以äžã®ïŒçš®é¡ã®å¶çŽã... |
p00276 |
<H1>é£åœ¢</H1>
<p>
ããã°ã©ããŒé€ææ ¡ã§ããã¢ã«ã髿 ¡ã§ã¯ãããŒã æŠã®ç«¶æããã°ã©ããŒã®åœ¹å²ã以äžã®ïŒã¿ã€ãã«åããŠããŸãã<br>
<table style="margin-left:24px">
<tr>
<td>ïŒ</td>
<td>ã³ãŒããŒ</td>
<td>èšèªãçç¥ããŠãããã³ãŒãã£ã³ã°ãè¡ãã</td>
</tr>
<tr>
<td>ïŒ</td>
<td>ã¢ã«ãŽãªãºããŒ</td>
<td>è«ççæèãåŸæã§ãããã¢ã«ãŽãªãºã ãèããã</td>
</tr>
<tr>
<td>ïŒ</td>
<td>ããã²ãŒã¿ãŒ</td>
<td>èªè§£åã«é·ããŠãããåé¡ã®åæã»ãããã°ãããã</... |
p00626 |
<H1><font color="#000000">Problem F:</font> Chocolate with Heart Marks</H1>
<p>
倪éåã¯ãã§ã³ã¬ãŒãã倧奜ãã§, åŠæ ¡ããåž°ããšããŒãããŒã¯ãæããããæ°ã«å
¥ãã®æ¿ãã§ã³ãé£ã¹ãŸã, æè¿ã®æ¥œãã¿ã¯, ãã¹ãŠã®ããŒãããŒã¯ã®ãããã¯ãæåŸãŸã§æ®ãããã«é£ã¹ãããšã§ã. 倪éåã¯, ãã¹ãŠã®ããŒãããŒã¯ã®ãããã¯ãã€ãªãã£ããŸãŸ, ã§ããã ãå€ãã®ããŒãããŒã¯ã®ãªããããã¯ãé£ã¹ãããšããŸã.
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1... |
p03909 | <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> rows and <var>W</var> columns.</p>
<p>The square at the <var>i</var>-th row and <var>j</var>-th column contains a string <var>S_{i,j}</var> of length <var>5</var>.</p>
... |
p01934 |
<!-- - - - - - 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>
<h1>D: 次å
æ
è¡</h1>
<h... |
p01467 |
<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... |
p01037 |
<h1>Problem A: A White Wall</h1>
<h2>Background</h2>
<p>
ãšããéœåžã«äœãæ°ã®å®¶ã®æ·å°ã¯ãçã£çœãªå£ã«å²ãŸããŠãããå£ã«ç©è¶³ããªããæããæ°ã¯ãè¿æã®åäŸãã¡ãåŒãã§ãå£ãèªç±ã«å¡ã£ãŠãããããšã«ãããåäŸéã«ã¯ããããå£ã®å¥œããªåºéãéžãã§è²ãå¡ã£ãŠãããã ããŠãå£ã¯ã©ã®ããã«å¡ãããã ãããã
</p>
<h2>Problem</h2>
<p>
0ã<var>N</var>-1ã®åºç»ã§æ§æããã以äžã®ãããªååã®çœãå£ãããã
</p>
<br>
<left>
<img width="480" src="https://judgeapi.u-aizu.... |
p02162 | <h1>Problem A: AOJ50M</h1>
<h2>Problem</h2>
<p>
AliceãšBobã50mèµ°ã§åè² ããŠããŸãã<br>
ãããããã®äžçã«ãããŠã¯AOJã®ã¬ãŒããé«ãæ¹ãåãã®ã§ãAOJã®ã¬ãŒããé«ãæ¹ãåã¡ãŸãã<br>
ã©ã¡ããäžæ¹ã§ãAOJã®ã¬ãŒããç¡ãå Žåã¯æ¯ã¹ãããç¡ãã®ã§ã仿¹ãªã50mèµ°ã®ã¿ã€ã ã§åè² ããŸãããã®å Žåã¯ã¿ã€ã ãçãæ¹ãåã¡ãšããŸãã<br>
AOJã®ã¬ãŒããåãå Žåã¯åŒãåãã50mèµ°ã®ã¿ã€ã ã§åè² ããªããã°ãªããªãå Žåã¯ã¿ã€ã ãåããªãåŒãåãã§ãã<br>
</p>
<h2>Input</h2>
<p>å
¥åã¯ä»¥äžã®åœ¢åŒã§äžããããã</p>
<p... |
p03323 | <span class="lang-en">
<p>Score: <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>E869120's and square1001's <var>16</var>-th birthday is coming soon.<br/>
Takahashi from AtCoder Kingdom gave them a round cake cut into <var>16</var> equal fan-shaped pieces.</p>
<p>E869120 and square1... |
p03289 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given a string <var>S</var>. Each character of <var>S</var> is uppercase or lowercase English letter.
Determine if <var>S</var> satisfies all of the following conditions:</p>
<ul>
<li>The initia... |
p02861 | <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> towns in a coordinate plane. Town <var>i</var> is located at coordinates (<var>x_i</var>, <var>y_i</var>). The distance between Town <var>i</var> and Town <var>j</var> is <var>\sq... |
p03773 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Dolphin loves programming contests. Today, he will take part in a contest in AtCoder.<br/>
In this country, 24-hour clock is used. For example, <var>9:00</var> p.m. is referred to as "<var>21</var> o'cl... |
p03266 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given integers <var>N</var> and <var>K</var>. Find the number of triples <var>(a,b,c)</var> of positive integers not greater than <var>N</var> such that <var>a+b,b+c</var> and <var>c+a</var> are... |
p02924 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>For an integer <var>N</var>, we will choose a permutation <var>\{P_1, P_2, ..., P_N\}</var> of <var>\{1, 2, ..., N\}</var>.</p>
<p>Then, for each <var>i=1,2,...,N</var>, let <var>M_i</var> be the remain... |
p00919 |
<H1><font color="#000">Problem F: </font>Directional Resemblance</H1>
<p>
Vectors have their directions and two vectors make an angle between them. Given a set of three-dimensional vectors, your task is to find the pair among them that makes the smallest angle.
</p>
<H2>Input</H2>
<p>
The input is a sequence of dat... |
p03636 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>The word <code>internationalization</code> is sometimes abbreviated to <code>i18n</code>.
This comes from the fact that there are <var>18</var> letters between the first <code>i</code> and the last <cod... |
p02477 | <h2>Multiplication of Big Integers II</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>$... |
p02027 | <h2>M: ãã¬ãŒã³ã (Presents)</h2>
<p>çœçŸœããã¯ããšããæªéã«ãµãã©ã€ãºãã¬ãŒã³ããšããŠæ¬¡ã®ãããªéåãçšæããã</p>
<ul>
<li>$N$ 以äžã®ç°ãªã $K$ åã®èªç¶æ°ãããªã</li>
<li>ã©ã® 2 ã€ã®å€ã®çµãéåããéžãã§ããçæ¹ã®æ°ãããçæ¹ã®æ°ã§å²ãåãã</li>
</ul>
<p>å®ã¯ãã®ãããªéåã«ã¯æªéã®åãå¥ªãæ§è³ªãããããã®ãŸãŸã ãšåã倱ã£ãŠããŸãã</p>
<p>æªéãå©ããããã«ããã®ãããªéåãããã€ãããèšç®ããã</p>
<h3>å
¥å</h3>
<p>2 ã€ã®æŽæ° $N, K$ ã空çœåºåãã§äžããããã</p>
<h3>åºå</h3>... |
p01867 |
<!-- - - - - - 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>
<h1>C: è¶³ã... |
p02748 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>You are visiting a large electronics store to buy a refrigerator and a microwave.</p>
<p>The store sells <var>A</var> kinds of refrigerators and <var>B</var> kinds of microwaves. The <var>i</var>-th re... |
p00775 |
<h3>Vampire</h3>
<p>
Mr. C is a vampire. If he is exposed to the sunlight directly, he turns
into ash.
Nevertheless, last night, he attended to the meeting of Immortal and
Corpse Programmers
Circle, and he has to go home in the near dawn.
Fortunately, there are many tall buildings around Mr. C's home, and
while th... |
p02318 |
<H1>Edit Distance (Levenshtein Distance)</H1>
<br/>
<p>
Find the edit distance between given two words <var>s1</var> and <var>s2</var>.
</p>
<p>
The disntace is the minimum number of single-character edits required to change one word into the other. The edits including the following operations:
</p>
<ul>
<li><strong... |
p00325 |
<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>
çããã¯ãèŠåŽããŠäœã£ãããã°ã©ã ãå®è¡ã... |
p01164 |
<H1><font color="#000">Problem B:</font> Sort the Panels</H1>
<p>
There was an explorer Henry Nelson traveling all over the world. One day he reached an ancient
building. He decided to enter this building for his interest, but its entrance seemed to be locked
by a strange security system.
</p>
<p>
There were some bla... |
p03159 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>The server in company A has a structure where <var>N</var> devices numbered <var>1, 2, ..., N</var> are connected with <var>N - 1</var> cables.
The <var>i</var>-th cable connects Device <var>U_i</var> a... |
p01534 |
<h1> Anipero 2012</h1>
<h2> D: ã¢ããã2012</h2>
<p>
ã¢ããããµããŒã©ã€ãïŒéç§°ã¢ãããã¯ïŒããŸããŸãªã¢ãã¡ãœã³ã°ã¢ãŒãã£ã¹ããã¡ãéçµããïŒæ¥æ¬åœå
æå€§ã®ã¢ãã¡ãœã³ã°ã©ã€ãã€ãã³ãã§ããïŒã¢ããœã³ã倧奜ããª2Dåã¯ïŒæšå¹Žã«åŒãç¶ãïŒä»å¹Žãã¢ãããã«è¡ãããšã«ããïŒ
</p>
<p>
圌ã¯ïŒã¢ããããæ¥œããããã«ïŒãã§ã«ãµã€ãªãŠã ã<i>m</i>æ¬è³Œå
¥ããŠããïŒãµã€ãªãŠã ãšã¯ïŒæããšååŠåå¿ã§å
ãã¹ãã£ãã¯ã§ããïŒãªãºã ã«åãããŠãµã€ãªãŠã ãæ¯ãããšã§ïŒã©ã€ããçãäžããããšãã§ãïŒèªåã®æºè¶³åºŠãäžæããïŒä»åïŒåœŒã賌å
¥ããå
šãŠã®ãµã€ãªãŠã ã¯ïŒæ¬¡ã®ãããªæ§è³ªãæã€ïŒ
</p>
<ul... |
p03509 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Ringo Kingdom Congress is voting on a bill.</p>
<p><var>N</var> members are present, and the <var>i</var>-th member <var>(1 †i †N)</var> has <var>w_i</var> white ballots and <var>b_i</var> blue ballot... |
p01021 |
<h1>Problem F: Remainder Zero</h1>
<h2>Problem</h2>
<p>
æŽæ°ã®éåA,Bã«ã€ããŠ,æ¬¡ã®æ¡ä»¶ãæºããæŽæ° <var>x</var>ãããã€ååšãããçããã
</p>
<p>
<var>A<sub>i</sub></var> mod <var>x</var> = 0 ã〠<var>x</var> mod <var>B<sub>j</sub></var> = 0 ããã¹ãŠã® <var>i</var> (1 ≤ <var>i</var> ≤ N), <var>j</var> (1 ≤ <var>j</var> ≤ M) ã«ã€ããŠæãç«ã€ã
</p>... |
p01471 |
<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?conf... |
p01922 |
<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>G: æã®ãžã¥ã³ã¬ãRun!Run!Run! - Love Permutation, Run run run! -</h2>
<h3>ç©èª</h3>
<p>
ããããªãžã¥ã³ã¬ã ããããããã§ã¶ãŒâª
Hello, æç©ºèã«ãïŒ
奜ããªããŒã¿æ§é 㯠Starry Sky Tre... |
p00630 |
<H1><font color="#000000">Problem P04:</font> CamelCase</H1>
<p>
ããã°ã©ãã³ã°ã«ãããèå¥åïŒå€æ°ã颿°ïŒã®åœåã§ã¯ã
åèªãé£çµããè€åèªã䜿ãããã
ãããããã®ãŸãŸé£çµãããšåèªã®åºåããããããªããªãããã
äžè¬çã«ä»¥äžã®åœåèŠåã®äžããçµ±äžãããã®ãéžã³é©çšããïŒ
</p>
<ul>
<li>Upper CamelCaseãã«ãã<br>
åèªãçŽæ¥é£çµãè€åèªãšããååèªã®å
é æåã®ã¿ã倧æåã«ããã<br>
äŸïŒ GetUserName
</li>
<li>Lower CamelCaseãã«ãã<br>
åèªãçŽæ¥é£çµãè€åèªãšããååèªã®... |
p00260 |
<H1>ãããŸã£ããã</H1>
<p>
ãããšããã«ãé«ãå¡ã«å²ãŸãã倧ããªã屿·ããããŸããããã®ã屿·ã®äž»äººã¯ç«ããšãŠã倧奜ãã§ãææãã£ãŠããç«ãã¡ã®ããã«ããã€ããããããã¯ããçšæããŠããŸããããè
¹ã空ãããç«ãã¡ã¯ãé«ãå¡ãã²ãããšé£ã³è¶ããã屿·ã®è³ãæã«çœ®ããŠãããã¯ãã«ãŸã£ãããã«é§ãå¯ãã®ã§ããã
</p>
<p>
ããæ¥äž»äººã¯ã屿·ã®äžã§äœå¹ãã®ç«ãåããŠããã®ãèŠã€ããŸãããç«ãã¡ã¯ãã¯ããæ¢ããŠå±æ·ã®äžã瞊暪ç¡å°œã«èµ°ãåã£ãã®ã§ãã¶ã€ãã£ãã転ãã ãããŠããŸã£ãã®ã§ãã䞻人ã¯ç«ãã¡ã®å®å
šãèããŠããã¯ãã®çœ®ãå Žæã工倫ããããšã«ããŸããã
</p>
<center>
<img src="htt... |
p01888 |
<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>Multisect</h2>
<p>
We are dev... |
p03765 | <span class="lang-en">
<p>Score : <var>600</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Let us consider the following operations on a string consisting of <code>A</code> and <code>B</code>:</p>
<ol>
<li>Select a character in a string. If it is <code>A</code>, replace it with <code>BB</code... |
p01758 |
<p>
éè·¯ã®ãªãé£çµãªæåã°ã©ããäžããããïŒ(æåã°ã©ããé£çµã§ãããšã¯ïŒãããç¡åã°ã©ããšããæã«é£çµã§ãããšããäºã§ããïŒ)
</p>
<p>
ãã®ã°ã©ãã«å¯ŸããŠäžã€ã®é ç¹ãéžãã§éŠéœ <var>s</var> ãå®ãããïŒ
</p>
<p>
<var>T(v) =</var> "<var>v</var> ããå
šãŠã®ç¹ãå°éå¯èœã«ããããã«å¿
èŠãªã蟺ã®å転ãæäœã®åæ°ã®æå°å€"ãšããïŒ
</p>
<p>
ãã ãïŒã蟺ã®å転ããšã¯ïŒé ç¹ <var>v, u</var> ã«é¢ã㊠<var>(v, u)</var> ã«åŒµãããŠããæå蟺ãåé€ã㊠<var>(u, v)</var> ã«åŒµãçŽãããšã§ããïŒ
</p>... |
p02877 | <span class="lang-en">
<p>Score : <var>1400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke has a sequence of <var>N</var> integers <var>x_1,x_2,\cdots,x_N</var>.
Initially, all the elements are <var>0</var>.</p>
<p>He can do the following two kinds of operations any number of times in ... |
p03335 | <span class="lang-en">
<p>Score : <var>1500</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi loves walking on a tree.
The tree where Takahashi walks has <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 Vertex <... |
p01308 |
<h1><font color="#000">Problem F:</font> 倩䜿ã®é段</h1>
<p>
ãªã€ãã®äœãã§ããè¡ã®äžã«æµ®ããã§ããé²ã«ã¯ã倩䜿ãäœãã§ããããã®å€©äœ¿ã¯ãªã€ããšåãããã奜ãã§ããã°ãã°ãããšéã³ã«å°äžã«éããŠãããå°äžã«éããããã«ã倩䜿ã¯é²ããå°äžãžç¹ããé·ãé·ãéæ®µãäœã£ããããããæ¯åæ¯åãã éããŠããã ãã§ã¯ã€ãŸããªããšæã£ã倩䜿ã¯ãéæ®µã«çް工ãããŠã段ãèžããšé³ãåºãããã«ãããããã䜿ã£ãŠã鳿¥œãå¥ã§ãªããéããŠããã®ã ã
</p>
<p>
鳿¥œã¯12çš®é¡ã®é³ã䜿ã£ãŠå¥ã§ããã®ã§ãããä»åãé³ã®ãªã¯ã¿ãŒãã¯ç¡èŠããããšã«ããŠã C, C#, D, D#, E, F, F#, G... |
p00149 |
<H1>èŠåæ€æ»</H1>
<p>
èŠåæ€æ»ã®æ€æ»çµæããŒã¿ãå
¥åãšããäžèšã®èŠåå€å®è¡šã«åºã¥ããŠåå€å®ã«åœãŠã¯ãŸã人æ°ããå·Šå³ã®èŠåå¥ã«åºåããããã°ã©ã ãäœæããŠãã ããã
</p>
<center>
<table>
<tr><td width="80">å€å®</td><td>èŠå</td></tr>
<tr><td>A</td><td>1.1 以äž</td></tr>
<tr><td>B</td><td>0.6 ä»¥äž 1.1 æªæº</td></tr>
<tr><td>C</td><td>0.2 ä»¥äž 0.6 æªæº</td></tr>
<tr><td>D</td><td>0.2 æªæº</td></tr>
</table... |
p02174 |
<h1>Problem M: Power Subsequences</h1>
<h2>Problem</h2>
<p>
æ·»åã $1$ ããå§ãŸããé·ããæéã®æ°åãåŒæ°ãšãã颿° $f$ ã以äžã®ããã«å®çŸ©ããã<br><br>
$\displaystyle f(\{a_1, a_2, \ldots, a_n\}) = \sum_{i=1}^n {a_i}^i$<br><br>
é·ã $N$ ã®æ°å $X = \{ x_1, x_2, \ldots, x_N \}$ ãäžããããã®ã§ã空ã®åãé€ãå
šãŠã®éšåå $X'$ ã«å¯Ÿã㊠$f(X')$ ãæ±ãããã®ç·åã $998244353$ ã§å²ã£ãããŸããåºåããã... |
p00519 |
<H1>åé¡ 5:ãã¿ã¯ã·ãŒ (Taxis)
</H1>
<br/>
<h2>åé¡</h2>
<p>
IOI åœã¯çº 1 ããçº N ãŸã§ã® N åã®çºãããªãïŒçºãšçºãšã¯éè·¯ã§çµã°ããŠããïŒIOI åœã«ã¯ K æ¬ã®éè·¯ãããïŒãã¹ãŠã®éè·¯ã¯ç°ãªã 2 ã€ã®çºãçµãã§ããïŒè»ã¯éè·¯ãåæ¹åã«èªç±ã«ç§»åã§ãããïŒé路以å€ãéã£ãŠããçºããå¥ã®çºã«è¡ãããšã¯ã§ããªãïŒ
</p>
<p>
IOI åœã®çº 1 ã«äœã JOI åã¯ïŒçº N ã«äœãç¥æ¯ã®å®¶ãŸã§ã¿ã¯ã·ãŒã§è¡ãããšã«ããïŒIOI åœã«ã¯ã¿ã¯ã·ãŒäŒç€Ÿ 1 ããã¿ã¯ã·ãŒäŒç€Ÿ N ãŸã§ã® N åã®ã¿ã¯ã·ãŒäŒç€ŸãããïŒIOI åœã®ã¿ã¯ã·ãŒäŒç€Ÿã«ã¯æ¬¡ã®ãããªå°ã
ç¹æ®ãªèŠåããã... |
p02031 | <h2>B: æ¬åŒ§ãèªãæ° / Parentheses Number</h2>
<h3>åé¡</h3>
<p>以äžã®ããã« æ£ããæ¬åŒ§å ãå®ããŸãã</p>
<ul>
<li> 空æååã¯æ£ããæ¬åŒ§åã§ãã</li>
<li> æ£ããæ¬åŒ§å <var>S</var> ã«å¯Ÿã㊠<code>(</code> <var>S</var> <code>)</code> ã¯æ£ããæ¬åŒ§åã§ãã</li>
<li> æ£ããæ¬åŒ§å <var>S</var>, <var>T</var> ã«å¯Ÿã㊠<var>ST</var> ã¯æ£ããæ¬åŒ§åã§ãã</li>
</ul>
<p>ããã§ãæ£ããæ¬åŒ§åã«å¯ŸããŠä»¥äžã®ãããªèŠåã§é åã察å¿ä»ããŸãã<... |
p02461 | <h1>Map: Range Search</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>each key in $M$ must be unique</u>.
</p>
<ul>
<li>insert($key$, $x$): Insert an element formed by a pair of $key$ and $x$ to ... |
p03620 | <span class="lang-en">
<p>Score : <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You have two strings <var>A = A_1 A_2 ... A_n</var> and <var>B = B_1 B_2 ... B_n</var> of the same length consisting of <var>0</var> and <var>1</var>.</p>
<p>You can transform <var>A</var> using the fo... |
p02932 | <span class="lang-en">
<p>Score: <var>1000</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>Find the number of sequences of <var>N</var> non-negative integers <var>A_1, A_2, ..., A_N</var> that satisfy the following conditions:</p>
<ul>
<li><var>L \leq A_1 + A_2 + ... + A_N \leq R</var></li>
... |
p02898 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p><var>N</var> friends of Takahashi has come to a theme park.</p>
<p>To ride the most popular roller coaster in the park, you must be at least <var>K</var> centimeters tall.</p>
<p>The <var>i</var>-th fr... |
p03270 | <span class="lang-en">
<p>Score : <var>700</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Takahashi throws <var>N</var> dice, each having <var>K</var> sides with all integers from <var>1</var> to <var>K</var>. The dice are NOT pairwise distinguishable.
For each <var>i=2,3,...,2K</var>, find ... |
p01563 |
<h1>Connect</h1>
<p>You are playing a solitaire puzzle called "Connect", which uses several letter tiles.
</p>
<p>There are <var>R × C</var> empty cells.
For each <var>i</var> <var>(1 ≤ i ≤ R)</var>, you must put a string <var>s<sub>i</sub></var> <var>(1 ≤ |s<sub>i</sub>| ≤ C)</var> in the ... |
p01099 |
<h3>Warp Drive</h3>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_ICPCDomestic2016_G_airplane" width="30%" align="right">
<p>
The <b>warp drive</b> technology is reforming air travel, making the travel times drastically shorter.
Aircraft reaching above the <b>warp fields</b> built on the ground su... |
p01133 |
<h1><font color="#000000">Problem C:</font> Dragon Fantasy</h1>
<p>
æ°žé ã«ç¶ããšæãããŠããå¹³åã¯çªç¶çµãããåããã ã¯ããæã«å°å°ãããŠããéçãã€ãã«åŸ©æŽ»ãéããã®ã§ããã ã ããä»ãŸãã«äžçãéã«èŠãããããšããŠãããšãã1 人ã®åè
ãçŸããã ãããŠãã®åè
ã¯ãäžçåå°ã«æ£ãã°ã£ãŠããäŒèª¬ã®ã¯ãªã¹ã¿ã«ãéããæ
ã«åºãã äŒèª¬ã«ãããšãå
šãŠã®ã¯ãªã¹ã¿ã«ãéããããšãã§ãããªãã°ãã©ã®ãããªé¡ãã§ãããªãããããšããäŒèª¬ã®éŸç¥ãåŒã³åºãããšãã§ãããšäŒããããŠããã ãã®éŸç¥ã®åãåããã°éçãåãããšãå¯èœãªã¯ãã ã
</p>
... |
p00372 | <H1>Party</H1>
<p>
The students in a class in Akabe high-school define the relation âacquaintanceâ as:
</p>
<ul>
<li>If A and B are friends, then A is acquainted with B.</li>
<li>If A and B are friends and B is acquainted with C, then A is acquainted with C.</li>
</ul>
<p>
They define the relation âcompanionâ a... |
p00688 |
<h1>
Factorization of Quadratic Formula</h1>
<p>As the first step in algebra, students learn quadratic formulas and
their factorization. Often, the factorization is a severe burden
for them. A large number of students cannot master the factorization;
such students cannot be aware of the elegance of advanced algebra... |
p01830 |
<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>Delete Files</h2>
<p>
You are... |
p00722 |
<h1><font color="#000">Problem A:</font> Dirichlet's Theorem on Arithmetic Progressions</h1>
<p>
Good evening, contestants.
</p>
<p>
If <i>a</i> and <i>d</i> are relatively prime positive integers,
the arithmetic sequence beginning with <i>a</i>
and increasing by <i>d</i>, i.e.,
<i>a</i>,
<i>a</i> + <i>d</i>,
<i>a</... |
p00237 |
<H1>æåŸã®æ</H1>
<p>
ç§å¢ã®å°"ãã©ãã³ãå°æ¹"<br>
ãã®å¥¥æ·±ãæŽçªã«ç ãé»éã®äŒèª¬ãæ±ããæ¢æ€å®¶ãããšãã€ã¯ã¯æ§ã
ãªå°é£ã«ç«ã¡åãããŸããããããããã©ãçããæåŸã®æããã®å
ã«ã¯å€¢ã«èŠãé»éãåŸ
ã£ãŠããŸãã
</p>
<p>
ãã®æã«ã¯å€æ°ã®äžè§åœ¢ãæãããŠããŸããã詊ãã«ãã€ã¯ããã® 1 ã€ã«è§ŠããŠã¿ããšããã®äžè§åœ¢ã¯å
ãæŸã¡ãŸãããå
ã¯äžè§åœ¢ã®åºèŸºããåçŽã«é ç¹æ¹åãžé·æ¹åœ¢ãæããªãã䌞ã³ãŠããããã®å
ã«ããå¥ã®äžè§åœ¢ã«è§ŠããŸããããããšãå
ã«è§Šããäžè§åœ¢ãåãããã«å
ãæŸã¡ããããç¹°ãè¿ããŠãããŸããã
</p>
<p>
æã®äžè§åœ¢ã¯å
šãŠäºç蟺äžè§åœ¢(æ£äžè§åœ¢ã¯å«ãŸãªã)ã§ãã©ããåã... |
p01975 | <h1>B: åå</h1>
<h2>åé¡</h2>
<p>
AORã€ã«ã¡ããã¯éå $S = \{a_1, ..., a_N\}$ ãšåå $f: SâS$ãäœã£ãã$f(a_i) = b_i$ ã§ããã
éå $S$ ã®ä»»æã®èŠçŽ $x$ ã«ã€ããŠã$g(f(x)) = h(f(x))$ ãæºããå
šãŠã®åå $g, h: SâS$ ãã$g(x) = h(x)$ ãæºãããã©ããå€å®ããæºãããªãå Žåã¯åäŸãäžã€æ§æããã
</p>
<h2>å¶çŽ</h2>
<ul>
<li>$1 \le N \le 10^5$</li>
<li>$1 \le a_i,b_i \le N$</li>
<li>$a_i \neq a_j \ ... |
p03948 | <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 located in a line, conveniently numbered <var>1</var> through <var>N</var>. Takahashi the merchant is going on a travel from town <var>1</var> to town <var>N</var>, buying a... |
p00667 |
<H1>Problem I: 11224111122411</H1>
<p>
è
ãåŒã£ããã£ãŠæããªãã
</p>
<p>
æºã®è£ã«è»¢ãã蟌ãã§ããŸã£ããã®ãæŸãããšããŠãæäžé»ç¯ä»£ããã«æºåž¯ã®ç»é¢ã§ç
§ãããªããè
ãæ¿ã蟌ãã§ã¿ããããã£ããäœãã«åŒã£ããã£ãŠæããªããªã£ãŠããŸã£ããç¡çã«åãããšçãã
</p>
<p>
ã©ãããããã©ãããã°è±åºã§ããã®ã ããã倧声ã§å©ããåŒã¶ããæ¥ããããã®ã§åŽäžãããããç¬åã§è±åºããã®ã¯é£ãããã ãããã声ã®å±ãç¯å²ã«ã¯èª°ãããªãã£ãã¯ãã ãçŠãæ°æã¡ãæŒãããŠèŸºããèŠæž¡ãããã®ããœã³ã³ã«æãå±ãã°ã¡ãŒã«ã§å©ããåŒã¹ãã®ã ããããã«ãé ãããããã¯ãå¶ç¶èª°ããéããããã®ãåŸ
ã€ã... |
p01426 |
<script src="./IMAGE/varmath.js" charset="UTF-8"></script>
<H1>Vector Compression</H1>
<p>
You are recording a result of a secret experiment, which consists of a large set of <var>N</var>-dimensional vectors.
Since the result may become very large, you are thinking of
compressing it. Fortunately you already have ... |
p01076 |
<h1>Problem E: Graph Making</h1>
<h2>Problem</h2>
<p>
ã©ã®é ç¹ãšãé£çµã§ãªã<var>n</var>åã®é ç¹ãããã<br>
åé ç¹éã«ç¡å蟺ã匵ã£ãŠããã<br>
çŽåŸã<var>d</var>ã«ãªãããã«ãããšããæå€§äœæ¬ã®èŸºã匵ãããšãã§ãããæ±ããã<br>
<!--
çŽåŸãšã¯åé ç¹ãšé£çµã®é ç¹ãšã®æçè·é¢ã®ãã¡æå€§ã衚ãã<br>
-->
çŽåŸãšã¯ã2ã€ã®é ç¹éã®æçè·é¢ã®ãã¡æå€§ã®ãã®ã衚ãã<br>
ããã§ãæçè·é¢ã¯é ç¹éãç§»åããããã«å¿
èŠãªèŸºã®æ°ã®æå°å€ã§ããã<br>
å€é蟺ãèªå·±ã«ãŒãã¯èªããªãã
</p>
<h2>Input</h2>
<pre... |
p02089 |
<h2>B: AddMulSubDiv</h2>
<h3>Problem Statement</h3>
<p>You have an array <var>A</var> of <var>N</var> integers. <var>A_i</var> denotes the <var>i</var>-th element of <var>A</var>.</p>
<p>You have to process one of the following queries <var>Q</var> times:</p>
<ul>
<li> Query 1: The query consists of non-negative i... |
p02573 | <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> persons called Person <var>1</var> through Person <var>N</var>.</p>
<p>You are given <var>M</var> facts that "Person <var>A_i</var> and Person <var>B_i</var> are friends." The sam... |
p02123 |
<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 M: Fissure Puzzle... |
p03698 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You are given a string <var>S</var> consisting of lowercase English letters. Determine whether all the characters in <var>S</var> are different.</p>
</section>
</div>
<div class="part">
<section>
<h3>Co... |
p03362 | <span class="lang-en">
<p>Score: <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3>
<p>Print a sequence <var>a_1, a_2, ..., a_N</var> whose length is <var>N</var> that satisfies the following conditions:</p>
<ul>
<li><var>a_i</var> <var>(1 \leq i \leq N)</var> is a prime number at most <v... |
p03732 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>You have <var>N</var> items and a bag of strength <var>W</var>.
The <var>i</var>-th item has a weight of <var>w_i</var> and a value of <var>v_i</var>.</p>
<p>You will select some of the items and put th... |
p02820 | <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>At an arcade, Takahashi is playing a game called <em>RPS Battle</em>, which is played as follows:</p>
<ul>
<li>The player plays <var>N</var> rounds of Rock Paper Scissors against the machine. (See Notes... |
p03227 | <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 <var>S</var> of length <var>2</var> or <var>3</var> consisting of lowercase English letters. If the length of the string is <var>2</var>, print it as is; if the length is <var>3</... |
p04018 | <span class="lang-en">
<p>Score : <var>900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Let <var>x</var> be a string of length at least <var>1</var>.
We will call <var>x</var> a <em>good</em> string, if for any string <var>y</var> and any integer <var>k (k \geq 2)</var>, the string obtaine... |
p03677 | <span class="lang-en">
<p>Score : <var>700</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is buying a lamp.
The light of the lamp can be adjusted to <var>m</var> levels of brightness, represented by integers from <var>1</var> through <var>m</var>, by the two buttons on the remote contr... |
p00958 |
<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... |
p02965 | <span class="lang-en">
<p>Score : <var>900</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a sequence of <var>N</var> integers: <var>x=(x_0,x_1,\cdots,x_{N-1})</var>.
Initially, <var>x_i=0</var> for each <var>i</var> (<var>0 \leq i \leq N-1</var>).</p>
<p>Snuke will perform the follow... |
p02436 | <h1>Queue</h1>
<p>
Queue is a container of elements that are inserted and deleted according to FIFO (First In First Out).
</p>
<p>
For $n$ queues $Q_i$ ($i = 0, 1, ..., n-1$), perform a sequence of the following operations.
</p>
<ul>
<li>enqueue($t$, $x$): Insert an integer $x$ to $Q_t$.</li>
<li>front($t$): R... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.