<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:version="2.0"><channel><title>Mayboy的酷網站</title><description>我不知道但好累喔..</description><link>https://mayboy.net/</link><language>en</language><item><title>How to customize code box</title><link>https://mayboy.net/blog/how-to-customize-code-box/</link><guid isPermaLink="true">https://mayboy.net/blog/how-to-customize-code-box/</guid><description>Modify the code box style</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Frosti Feed and may have formatting issues. For the best experience, please visit:&lt;a href=&quot;https://mayboy.net//blog/how-to-customize-code-box/&quot;&gt;https://mayboy.net//blog/how-to-customize-code-box/&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt;import Collapse from &amp;quot;../../components/blog/collapse.astro&amp;quot;;
import Diff from &amp;quot;../../components/blog/diff.astro&amp;quot;;
import Error from &amp;quot;../../components/blog/error.astro&amp;quot;;
import Info from &amp;quot;../../components/blog/info.astro&amp;quot;;
import Kbd from &amp;quot;../../components/blog/kbd.astro&amp;quot;;
import Success from &amp;quot;../../components/blog/success.astro&amp;quot;;
import Warning from &amp;quot;../../components/blog/warning.astro&amp;quot;;
import TimeLine from &amp;quot;../../components/page/TimeLine.astro&amp;quot;;
import LinkCard from &amp;quot;../../components/page/LinkCard.astro&amp;quot;;&lt;/p&gt;
&lt;h2&gt;添加行号&lt;/h2&gt;
&lt;Warning&gt;
  此方法仅在 `Shiki` 中可用， `Prism` 无法通过 CSS 直接生成行号。
&lt;/Warning&gt;

&lt;p&gt;&lt;Info&gt;在 &lt;code&gt;v2.2.1&lt;/code&gt; 更新后默认添加行号。&lt;/Info&gt;&lt;/p&gt;
&lt;p&gt;在 &lt;code&gt;src\styles\global.scss&lt;/code&gt; 中添加以下内容：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;pre .line {
  counter-increment: line;
  padding-left: 2.5em;
}

pre :not(:last-child).line::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: 3em;
  text-align: right;
  margin-right: 10px;
  color: #888;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;改变主题&lt;/h2&gt;
&lt;p&gt;Frosti 使用 &lt;code&gt;Shiki&lt;/code&gt; 来渲染代码框， &lt;code&gt;Shiki&lt;/code&gt; 已经提供了足够多的主题，不推荐使用 &lt;code&gt;Prism&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;有关于 &lt;code&gt;Shiki&lt;/code&gt; 的主题详见：&lt;a href=&quot;https://shiki.style/themes&quot;&gt;https://shiki.style/themes&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;在 &lt;code&gt;astro.config.mjs&lt;/code&gt; 中修改内容：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;markdown: {
  shikiConfig: {
    themes: {
      light: &amp;#39;github-light&amp;#39;,
      dark: &amp;#39;github-dark&amp;#39;,
    },
  },
},
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><dc:creator>Mayboy的酷網站</dc:creator><pubDate>Thu, 18 Jul 2024 00:00:00 GMT</pubDate></item><item><title>Using mdx in Frosti</title><link>https://mayboy.net/blog/frosti-mdx/</link><guid isPermaLink="true">https://mayboy.net/blog/frosti-mdx/</guid><description>Using MDX in Frosti to enrich article content with more components</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Frosti Feed and may have formatting issues. For the best experience, please visit:&lt;a href=&quot;https://mayboy.net//blog/frosti-mdx/&quot;&gt;https://mayboy.net//blog/frosti-mdx/&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt;import Collapse from &amp;quot;../../components/blog/collapse.astro&amp;quot;;
import Diff from &amp;quot;../../components/blog/diff.astro&amp;quot;;
import Error from &amp;quot;../../components/blog/error.astro&amp;quot;;
import Info from &amp;quot;../../components/blog/info.astro&amp;quot;;
import Kbd from &amp;quot;../../components/blog/kbd.astro&amp;quot;;
import Success from &amp;quot;../../components/blog/success.astro&amp;quot;;
import Warning from &amp;quot;../../components/blog/warning.astro&amp;quot;;
import TimeLine from &amp;quot;../../components/page/TimeLine.astro&amp;quot;;
import LinkCard from &amp;quot;../../components/page/LinkCard.astro&amp;quot;;&lt;/p&gt;
&lt;h2&gt;Preface&lt;/h2&gt;
&lt;p&gt;This article describes how to use the components provided by Frosti in &lt;code&gt;mdx&lt;/code&gt; to realize the functions that can&amp;#39;t be realized by normal &lt;code&gt;md&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Main text&lt;/h2&gt;
&lt;h3&gt;Getting started&lt;/h3&gt;
&lt;p&gt;First you need to create an &lt;code&gt;mdx&lt;/code&gt; file, which is as simple as changing the extension to &lt;code&gt;.mdx&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Introducing&lt;/h3&gt;
&lt;p&gt;The components provided by Frosti are placed in the &lt;code&gt;/blog&lt;/code&gt; and &lt;code&gt;/page&lt;/code&gt; folders. Write something under the document properties (frontmatter):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;import Collapse from &amp;quot;../../components/blog/collapse.astro&amp;quot;; import Diff from
&amp;quot;../../components/blog/diff.astro&amp;quot;; import Error from
&amp;quot;../../components/blog/error.astro&amp;quot;; import Info from
&amp;quot;../../components/blog/info.astro&amp;quot;; import Kbd from
&amp;quot;../../components/blog/kbd.astro&amp;quot;; import Success from
&amp;quot;../../components/blog/success.astro&amp;quot;; import Warning from
&amp;quot;../../components/blog/warning.astro&amp;quot;; import TimeLine from
&amp;quot;../../components/page/TimeLine.astro&amp;quot;; import LinkCard from
&amp;quot;../../components/page/LinkCard.astro&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Example&lt;/h3&gt;
&lt;h4&gt;Collapse&lt;/h4&gt;
&lt;Collapse title=&quot;This is an example text.&quot;&gt;
  This is the hidden content!
&lt;/Collapse&gt;

&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;Collapse title=&amp;quot;This is an example text.&amp;quot;&amp;gt;
  This is the hidden content!
&amp;lt;/Collapse&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Diff&lt;/h4&gt;
&lt;p&gt;&lt;Diff r=&quot;https://mayboy.net/image/r.png&quot; l=&quot;https://mayboy.net/image/l.png&quot;&gt;&lt;/Diff&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;Diff r=&amp;quot;/image/r.png&amp;quot; l=&amp;quot;/image/l.png&amp;quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Error&lt;/h4&gt;
&lt;p&gt;&lt;Error&gt;Maybe something went wrong? &lt;a href=&quot;https://www.baidu.com&quot;&gt;www.baidu.com&lt;/a&gt;&lt;/Error&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;Error&amp;gt;Maybe something went wrong? &amp;lt;/Error&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Warning&lt;/h4&gt;
&lt;p&gt;&lt;Warning&gt;Hey! Watch out for potholes! &lt;/Warning&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;Warning&amp;gt;Hey! Watch out for potholes! &amp;lt;/Warning&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Message&lt;/h4&gt;
&lt;p&gt;&lt;Info&gt;It&amp;#39;s just a message. &lt;/Info&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;Info&amp;gt;It&amp;#39;s just a message. &amp;lt;/Info&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Success&lt;/h4&gt;
&lt;p&gt;&lt;Success&gt;Congratulations on your successful deployment! &lt;/Success&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;Success&amp;gt;Congratulations on your successful deployment! &amp;lt;/Success&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Kbd&lt;/h4&gt;
&lt;p&gt;&lt;Kbd&gt;Ctrl&lt;/Kbd&gt; + &lt;Kbd&gt;C&lt;/Kbd&gt; to copy the text.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;Kbd&amp;gt;Ctrl&amp;lt;/Kbd&amp;gt; + &amp;lt;Kbd&amp;gt;C&amp;lt;/Kbd&amp;gt; to copy the text.
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;TimeLine&lt;/h4&gt;
&lt;p&gt;&amp;lt;TimeLine
  items={[
    { year: &amp;quot;1984&amp;quot;, event: &amp;quot;First Macintosh computer&amp;quot; },
    { year: &amp;quot;1998&amp;quot;, event: &amp;quot;iMac&amp;quot; },
    { year: &amp;quot;2001&amp;quot;, event: &amp;quot;iPod&amp;quot; },
    { year: &amp;quot;2007&amp;quot;, event: &amp;quot;iPhone&amp;quot; },
    { year: &amp;quot;2015&amp;quot;, event: &amp;quot;Apple Watch&amp;quot; },
  ]}
/&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;TimeLine
  items={[
    { year: &amp;quot;1984&amp;quot;, event: &amp;quot;First Macintosh computer&amp;quot; },
    { year: &amp;quot;1998&amp;quot;, event: &amp;quot;iMac&amp;quot; },
    { year: &amp;quot;2001&amp;quot;, event: &amp;quot;iPod&amp;quot; },
    { year: &amp;quot;2007&amp;quot;, event: &amp;quot;iPhone&amp;quot; },
    { year: &amp;quot;2015&amp;quot;, event: &amp;quot;Apple Watch&amp;quot; },
  ]}
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;LinkCard&lt;/h4&gt;
&lt;p&gt;&lt;LinkCard
  title=&quot;Frosti&quot;
  desc=&quot;My blog project!&quot;
  url=&quot;https://github.com/EveSunMaple/Frosti&quot;
  img=&quot;https://mayboy.net/favicon.ico&quot;
/&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;LinkCard
  title=&amp;quot;Frosti&amp;quot;
  desc=&amp;quot;My blog project!&amp;quot;
  url=&amp;quot;https://github.com/EveSunMaple/Frosti&amp;quot;
  img=&amp;quot;/favicon.ico&amp;quot;
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><dc:creator>Mayboy的酷網站</dc:creator><pubDate>Fri, 12 Jul 2024 00:00:00 GMT</pubDate></item><item><title>测试文档</title><link>https://mayboy.net/blog/using-mdx-copy/</link><guid isPermaLink="true">https://mayboy.net/blog/using-mdx-copy/</guid><description>这是一个用于测试的Markdown文档</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Frosti Feed and may have formatting issues. For the best experience, please visit:&lt;a href=&quot;https://mayboy.net//blog/using-mdx-copy/&quot;&gt;https://mayboy.net//blog/using-mdx-copy/&lt;/a&gt;&lt;/blockquote&gt; &lt;h2&gt;标题&lt;/h2&gt;
&lt;p&gt;Markdown 支持多级标题，使用 &lt;code&gt;#&lt;/code&gt; 符号表示。一个 &lt;code&gt;#&lt;/code&gt; 表示一级标题，两个 &lt;code&gt;#&lt;/code&gt; 表示二级标题，以此类推。&lt;/p&gt;
&lt;h3&gt;三级标题&lt;/h3&gt;
&lt;p&gt;这是一个三级标题。&lt;/p&gt;
&lt;h2&gt;列表&lt;/h2&gt;
&lt;h3&gt;无序列表&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;项目一&lt;/li&gt;
&lt;li&gt;项目二&lt;/li&gt;
&lt;li&gt;项目三&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;有序列表&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;第一项&lt;/li&gt;
&lt;li&gt;第二项&lt;/li&gt;
&lt;li&gt;第三项&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;格式化文本&lt;/h2&gt;
&lt;p&gt;你可以使用&lt;strong&gt;加粗&lt;/strong&gt;和&lt;em&gt;斜体&lt;/em&gt;来格式化文本。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;加粗示例&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;斜体示例&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;删除线示例&lt;/del&gt;&lt;/p&gt;
&lt;h2&gt;链接&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.example.com&quot;&gt;这是一个链接&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;图片&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://mayboy.net/image/image4.jpg&quot; alt=&quot;这是一个示例图片&quot;&gt;&lt;/p&gt;
&lt;h2&gt;代码&lt;/h2&gt;
&lt;p&gt;你可以在文档中插入代码片段：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def hello_world():
    print(&amp;quot;Hello, world!&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><dc:creator>Mayboy的酷網站</dc:creator><pubDate>Tue, 02 Jul 2024 00:00:00 GMT</pubDate></item><item><title>Markdown Style Guide</title><link>https://mayboy.net/blog/markdown-style-guide/</link><guid isPermaLink="true">https://mayboy.net/blog/markdown-style-guide/</guid><description>Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Frosti Feed and may have formatting issues. For the best experience, please visit:&lt;a href=&quot;https://mayboy.net//blog/markdown-style-guide/&quot;&gt;https://mayboy.net//blog/markdown-style-guide/&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt;Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.&lt;/p&gt;
&lt;h2&gt;Headings&lt;/h2&gt;
&lt;p&gt;The following HTML &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;—&lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; elements represent six levels of section headings. &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; is the highest section level while &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; is the lowest.&lt;/p&gt;
&lt;h1&gt;H1&lt;/h1&gt;
&lt;h2&gt;H2&lt;/h2&gt;
&lt;h3&gt;H3&lt;/h3&gt;
&lt;h4&gt;H4&lt;/h4&gt;
&lt;h5&gt;H5&lt;/h5&gt;
&lt;h6&gt;H6&lt;/h6&gt;
&lt;h2&gt;Paragraph&lt;/h2&gt;
&lt;p&gt;Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.&lt;/p&gt;
&lt;p&gt;Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.&lt;/p&gt;
&lt;h2&gt;Images&lt;/h2&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;![Alt text](./full/or/relative/path/of/image)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://mayboy.net/home.webp&quot; alt=&quot;blog placeholder&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Blockquotes&lt;/h2&gt;
&lt;p&gt;The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a &lt;code&gt;footer&lt;/code&gt; or &lt;code&gt;cite&lt;/code&gt; element, and optionally with in-line changes such as annotations and abbreviations.&lt;/p&gt;
&lt;h3&gt;Blockquote without attribution&lt;/h3&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;&amp;gt; Tiam, ad mint andaepu dandae nostion secatur sequo quae.  
&amp;gt; **Note** that you can use _Markdown syntax_ within a blockquote.
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Tiam, ad mint andaepu dandae nostion secatur sequo quae.&lt;br&gt;&lt;strong&gt;Note&lt;/strong&gt; that you can use &lt;em&gt;Markdown syntax&lt;/em&gt; within a blockquote.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Blockquote with attribution&lt;/h3&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;&amp;gt; Don&amp;#39;t communicate by sharing memory, share memory by communicating.&amp;lt;br&amp;gt;
&amp;gt; — &amp;lt;cite&amp;gt;Rob Pike[^1]&amp;lt;/cite&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Don&amp;#39;t communicate by sharing memory, share memory by communicating.&lt;br&gt;
— &lt;cite&gt;Rob Pike[^1]&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;[^1]: The above quote is excerpted from Rob Pike&amp;#39;s &lt;a href=&quot;https://www.youtube.com/watch?v=PAAkCSZUG1c&quot;&gt;talk&lt;/a&gt; during Gopherfest, November 18, 2015.&lt;/p&gt;
&lt;h2&gt;Tables&lt;/h2&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;| Italics   | Bold     | Code   |
| --------- | -------- | ------ |
| _italics_ | **bold** | `code` |
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Italics&lt;/th&gt;
&lt;th&gt;Bold&lt;/th&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;em&gt;italics&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;bold&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;code&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Code Blocks&lt;/h2&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;p&gt;we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntac, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;```cpp
#include &amp;lt;bits/stdc++.h&amp;gt;
using namespace std;
const int N = 1e5 + 5;
int n, k, a[N];
long long ans;
vector&amp;lt;int&amp;gt; v[N];
int main()
{
    scanf(&amp;quot;%d%d&amp;quot;, &amp;amp;n, &amp;amp;k);
    for (int i = 1; i &amp;lt;= n; i++)
    {
        scanf(&amp;quot;%d&amp;quot;, &amp;amp;a[i]);
        v[i % k].push_back(a[i]);
    }
    for (int i = 0; i &amp;lt; k; i++)
        sort(v[i].rbegin(), v[i].rend());
    for (int i = 0; i &amp;lt; k; i++)
    {
        for (int j = 0; j + 1 &amp;lt; v[i].size(); j += 2)
        {
            ans += v[i][j] + v[i][j + 1];
        }
    }
    printf(&amp;quot;%lld\n&amp;quot;, ans);
    return 0;
}
```
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Output&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-cpp&quot;&gt;#include &amp;lt;bits/stdc++.h&amp;gt;
using namespace std;
const int N = 1e5 + 5;
int n, k, a[N];
long long ans;
vector&amp;lt;int&amp;gt; v[N];
int main()
{
    scanf(&amp;quot;%d%d&amp;quot;, &amp;amp;n, &amp;amp;k);
    for (int i = 1; i &amp;lt;= n; i++)
    {
        scanf(&amp;quot;%d&amp;quot;, &amp;amp;a[i]);
        v[i % k].push_back(a[i]);
    }
    for (int i = 0; i &amp;lt; k; i++)
        sort(v[i].rbegin(), v[i].rend());
    for (int i = 0; i &amp;lt; k; i++)
    {
        for (int j = 0; j + 1 &amp;lt; v[i].size(); j += 2)
        {
            ans += v[i][j] + v[i][j + 1];
        }
    }
    printf(&amp;quot;%lld\n&amp;quot;, ans);
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;List Types&lt;/h2&gt;
&lt;h3&gt;Ordered List&lt;/h3&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;1. First item
2. Second item
3. Third item
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;First item&lt;/li&gt;
&lt;li&gt;Second item&lt;/li&gt;
&lt;li&gt;Third item&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Unordered List&lt;/h3&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;- List item
- Another item
- And another item
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;Another item&lt;/li&gt;
&lt;li&gt;And another item&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Nested list&lt;/h3&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;- Fruit
  - Apple
  - Orange
  - Banana
- Dairy
  - Milk
  - Cheese
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Fruit&lt;ul&gt;
&lt;li&gt;Apple&lt;/li&gt;
&lt;li&gt;Orange&lt;/li&gt;
&lt;li&gt;Banana&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Dairy&lt;ul&gt;
&lt;li&gt;Milk&lt;/li&gt;
&lt;li&gt;Cheese&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Other Elements&lt;/h2&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;&amp;lt;abbr title=&amp;quot;Graphics Interchange Format&amp;quot;&amp;gt;GIF&amp;lt;/abbr&amp;gt; is a bitmap image format.

H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O

X&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; + Y&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; = Z&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt;

Press &amp;lt;kbd&amp;gt;&amp;lt;kbd&amp;gt;CTRL&amp;lt;/kbd&amp;gt;+&amp;lt;kbd&amp;gt;ALT&amp;lt;/kbd&amp;gt;+&amp;lt;kbd&amp;gt;Delete&amp;lt;/kbd&amp;gt;&amp;lt;/kbd&amp;gt; to end the session.

Most &amp;lt;mark&amp;gt;salamanders&amp;lt;/mark&amp;gt; are nocturnal, and hunt for insects, worms, and other small creatures.
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output&lt;/h4&gt;
&lt;p&gt;&lt;abbr title=&quot;Graphics Interchange Format&quot;&gt;GIF&lt;/abbr&gt; is a bitmap image format.&lt;/p&gt;
&lt;p&gt;H&lt;sub&gt;2&lt;/sub&gt;O&lt;/p&gt;
&lt;p&gt;X&lt;sup&gt;n&lt;/sup&gt; + Y&lt;sup&gt;n&lt;/sup&gt; = Z&lt;sup&gt;n&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Press &lt;kbd&gt;&lt;kbd&gt;CTRL&lt;/kbd&gt;+&lt;kbd&gt;ALT&lt;/kbd&gt;+&lt;kbd&gt;Delete&lt;/kbd&gt;&lt;/kbd&gt; to end the session.&lt;/p&gt;
&lt;p&gt;Most &lt;mark&gt;salamanders&lt;/mark&gt; are nocturnal, and hunt for insects, worms, and other small creatures.&lt;/p&gt;
</content:encoded><dc:creator>Mayboy的酷網站</dc:creator><pubDate>Mon, 01 Jul 2024 00:00:00 GMT</pubDate></item><item><title>Using MDX</title><link>https://mayboy.net/blog/using-mdx/</link><guid isPermaLink="true">https://mayboy.net/blog/using-mdx/</guid><description>Lorem ipsum dolor sit amet</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Frosti Feed and may have formatting issues. For the best experience, please visit:&lt;a href=&quot;https://mayboy.net//blog/using-mdx/&quot;&gt;https://mayboy.net//blog/using-mdx/&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt;This theme comes with the &lt;a href=&quot;https://docs.astro.build/en/guides/integrations-guide/mdx/&quot;&gt;@astrojs/mdx&lt;/a&gt; integration installed and configured in your &lt;code&gt;astro.config.mjs&lt;/code&gt; config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file.&lt;/p&gt;
&lt;h2&gt;Why MDX?&lt;/h2&gt;
&lt;p&gt;MDX is a special flavor of Markdown that supports embedded JavaScript &amp;amp; JSX syntax. This unlocks the ability to &lt;a href=&quot;https://docs.astro.build/en/guides/markdown-content/#mdx-features&quot;&gt;mix JavaScript and UI Components into your Markdown content&lt;/a&gt; for things like interactive charts or alerts.&lt;/p&gt;
&lt;p&gt;If you have existing content authored in MDX, this integration will hopefully make migrating to Astro a breeze.&lt;/p&gt;
&lt;h2&gt;Example&lt;/h2&gt;
&lt;p&gt;Here is how you import and use a UI component inside of MDX.&lt;br&gt;When you open this page in the browser, you should see the clickable button below.&lt;/p&gt;
&lt;h2&gt;More Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://mdxjs.com/docs/what-is-mdx&quot;&gt;MDX Syntax Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.astro.build/en/guides/markdown-content/#markdown-and-mdx-pages&quot;&gt;Astro Usage Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;a href=&quot;https://docs.astro.build/en/reference/directives-reference/#client-directives&quot;&gt;Client Directives&lt;/a&gt; are still required to create interactive components. Otherwise, all components in your MDX will render as static HTML (no JavaScript) by default.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><dc:creator>Mayboy的酷網站</dc:creator><pubDate>Sat, 02 Jul 2022 00:00:00 GMT</pubDate></item></channel></rss>