码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
hdu 4911 Inversion(归并)
题目链接:hdu 4911 Inversion 题目大意:给定一个序列,有k次机会交换相邻两个位置的数,问说最后序列的逆序对数最少为多少。 解题思路:每交换一次一定可以减少一个逆序对,所以问题转换成如何求逆序对数。 #include #include #include using namespace std; typedef long long ll; const int m...
分类:其他好文   时间:2014-08-05 22:32:00    阅读次数:291
HDU 4911 Inversion 树状数组求逆序数对
显然每次交换都能减少1 所以求出逆序数对数,然后-=k就好了。。。 _(:зゝ∠)_  #include #include #include #include #include #include #include using namespace std; #define N 100005 #define ll long long ll c[N+100000], maxn; inlin...
分类:其他好文   时间:2014-08-05 19:25:20    阅读次数:213
hdu 3987 Harry Potter and the Forbidden Forest 求割边最少的最小割
view code//hdu 3987 #include #include #include #include #include using namespace std; typedef long long ll; const ll INF = 1LLq; q.push(s); d[s] = 0; ...
分类:其他好文   时间:2014-08-05 19:00:22    阅读次数:243
关于Window的Dos Batch 文件编写的常识
Redirect "all" output to a single file: Run: test.bat?>?test.txt?2>&1 and you‘ll get this text on screen (we‘ll never get rid of this line on screen, as it is sent to the Console and cannot be r...
分类:Windows程序   时间:2014-08-05 14:30:10    阅读次数:296
A trip through the Graphics Pipeline 2011_13 Compute Shaders, UAV, atomic, structured buffer
Welcome back to what’s going to be the last “official” part of this series – I’ll do more GPU-related posts in the future, but this series is long eno...
分类:其他好文   时间:2014-08-05 02:56:18    阅读次数:427
A trip through the Graphics Pipeline 2011_12 Tessellation
Welcome back! This time, we’ll look into what is perhaps the “poster boy” feature introduced with the D3D11 / Shader 5.x hardware generation: Tessella...
分类:其他好文   时间:2014-08-05 02:55:48    阅读次数:272
A trip through the Graphics Pipeline 2011_07_Z/Stencil processing, 3 different ways
In this installment, I’ll be talking about the (early) Z pipeline and how it interacts with rasterization. Like the last part, the text won’t procee.....
分类:其他好文   时间:2014-08-05 00:34:50    阅读次数:360
A trip through the Graphics Pipeline 2011_08_Pixel processing – “fork phase”
In this part, I’ll be dealing with the first half of pixel processing: dispatch and actual pixel shading. In fact, this is really what most graphics.....
分类:其他好文   时间:2014-08-05 00:26:28    阅读次数:484
A trip through the Graphics Pipeline 2011_10_Geometry Shaders
Welcome back. Last time, we dove into bottom end of the pixel pipeline. This time, we’ll switch back to the middle of the pipeline to look at what i.....
分类:其他好文   时间:2014-08-05 00:25:48    阅读次数:321
UVA 11235 Frequent values
1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int maxn=100005; 7 8 int count[maxn]; 9 int num[maxn],ll[maxn],rr[maxn];10 int...
分类:其他好文   时间:2014-08-04 21:03:37    阅读次数:261
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!