<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>逆序对 on 111qqz's blog</title><link>https://111qqz.com/en/tags/%E9%80%86%E5%BA%8F%E5%AF%B9/</link><description>Recent content in 逆序对 on 111qqz's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2015-2026 111qqz</copyright><lastBuildDate>Tue, 20 Sep 2016 12:07:02 +0000</lastBuildDate><atom:link href="https://111qqz.com/en/tags/%E9%80%86%E5%BA%8F%E5%AF%B9/index.xml" rel="self" type="application/rss+xml"/><item><title>codeforces 540 E. Infinite Inversions (分类思想+线段树求逆序对)</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-09-20-cf540e/</link><pubDate>Tue, 20 Sep 2016 12:07:02 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-09-20-cf540e/</guid><description>&lt;p&gt;&lt;a href="http://codeforces.com/problemset/problem/540/E" target="_blank" rel="noreferrer"&gt;题目链接&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;题意：一个无穷数列，从1开始，初始第i个位置上为i，给出n个swap，每次交换两个位置的数。问交换n次以后得到的数列中，逆序对的数。&lt;/p&gt;</description></item><item><title>codeforces 220 E. Little Elephant and Inversions (树状数组+尺取)</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-09-15-cf220e/</link><pubDate>Thu, 15 Sep 2016 08:13:56 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-09-15-cf220e/</guid><description>&lt;p&gt;&lt;a href="http://codeforces.com/problemset/problem/220/E" target="_blank" rel="noreferrer"&gt;题目链接&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;题意：&lt;/p&gt;
&lt;p&gt;how many pairs of integers &lt;em&gt;l&lt;/em&gt; and &lt;em&gt;r&lt;/em&gt; are there, such that 1 ≤ &lt;em&gt;l&lt;/em&gt; &amp;lt; &lt;em&gt;r&lt;/em&gt; ≤ &lt;em&gt;n&lt;/em&gt; and sequence &lt;em&gt;b&lt;/em&gt; = _a_1_a_2&amp;hellip; &lt;em&gt;a__l__a__r__a__r&lt;/em&gt; + 1&amp;hellip; &lt;em&gt;a__n&lt;/em&gt; has no more than &lt;em&gt;k&lt;/em&gt; inversions.&lt;/p&gt;</description></item><item><title>codeforces 61 E. Enemy is weak (离散化+线段树求逆序三元组)</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-09-05-cf61e/</link><pubDate>Mon, 05 Sep 2016 08:35:49 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-09-05-cf61e/</guid><description>&lt;p&gt;&lt;a href="http://codeforces.com/problemset/problem/61/E" target="_blank" rel="noreferrer"&gt;题目链接&lt;/a&gt;
题意：给出n个数，求满足 i&amp;lt;j&amp;lt;k且a[i]&amp;gt;a[j]&amp;gt;a[k]的三元组有多少个。&lt;/p&gt;</description></item><item><title>codeforces 459 D. Pashmak and Parmida's problem (离散化+线段树求逆序对数)</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-09-05-cf459d/</link><pubDate>Mon, 05 Sep 2016 07:23:18 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-09-05-cf459d/</guid><description>&lt;p&gt;&lt;a href="http://codeforces.com/problemset/problem/459/D" target="_blank" rel="noreferrer"&gt;题目链接&lt;/a&gt;
题意：定义_f_(&lt;em&gt;l&lt;/em&gt;, &lt;em&gt;r&lt;/em&gt;, &lt;em&gt;x&lt;/em&gt;)为区间[l,r]中x出现的次数。现在要求calculate the number of pairs of indicies &lt;em&gt;i&lt;/em&gt;, &lt;em&gt;j&lt;/em&gt; (1 ≤ &lt;em&gt;i&lt;/em&gt; &amp;lt; &lt;em&gt;j&lt;/em&gt; ≤ &lt;em&gt;n&lt;/em&gt;) such that_f_(1, &lt;em&gt;i&lt;/em&gt;, &lt;em&gt;a__i&lt;/em&gt;) &amp;gt; &lt;em&gt;f&lt;/em&gt;(&lt;em&gt;j&lt;/em&gt;, &lt;em&gt;n&lt;/em&gt;, &lt;em&gt;a__j&lt;/em&gt;).&lt;/p&gt;</description></item><item><title>hdu 1394 Minimum Inversion Number (树状数组 逆序对)</title><link>https://111qqz.com/en/post/acm-icpc/2015/2015-10-28-hdu1394/</link><pubDate>Wed, 28 Oct 2015 14:00:00 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2015/2015-10-28-hdu1394/</guid><description>&lt;h1 class="relative group"&gt;
 &lt;div id="" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h1&gt;
&lt;p&gt;&lt;a href="http://acm.hdu.edu.cn/showproblem.php?pid=1394" target="_blank" rel="noreferrer"&gt;题目链接&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;题意：&lt;/p&gt;
&lt;p&gt;这题是问一个长度为n的循环数组中，逆序对最少的个数。。。&lt;/p&gt;</description></item></channel></rss>