mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			730 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			730 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给定一个数组 <code>nums</code> ,如果 <code>i < j</code> 且 <code>nums[i] > 2*nums[j]</code> 我们就将 <code>(i, j)</code> 称作一个<strong><em>重要翻转对</em></strong>。</p>
 | 
						|
 | 
						|
<p>你需要返回给定数组中的重要翻转对的数量。</p>
 | 
						|
 | 
						|
<p><strong>示例 1:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>输入</strong>: [1,3,2,3,1]
 | 
						|
<strong>输出</strong>: 2
 | 
						|
</pre>
 | 
						|
 | 
						|
<p><strong>示例 2:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>输入</strong>: [2,4,3,5,1]
 | 
						|
<strong>输出</strong>: 3
 | 
						|
</pre>
 | 
						|
 | 
						|
<p><strong>注意:</strong></p>
 | 
						|
 | 
						|
<ol>
 | 
						|
	<li>给定数组的长度不会超过<code>50000</code>。</li>
 | 
						|
	<li>输入数组中的所有数字都在32位整数的表示范围内。</li>
 | 
						|
</ol>
 |