相关分类: Java技术 C/C++ VB delphi
  • 最大子段和(分治法)

    题目:输入n个数,求最大的连续子段和,并输出子段的起点下标和终点下标; 思路:分治法; 代码如下: #include iostream #include algorithm #include cstdio #include cstring #include map #define N 1000005 using namespace std; int a[ 1005 ]; int calc( int s,...

    2018-06-17 23:43:12

  • BZOJ 1044 木棍分割 解题报告(二分+DP)

    来到机房刷了一道水(biantai)题。题目思想非常简单易懂(我的做法实际上参考了Evensgn 范学长,在此多谢范学长了) 题目摆上: 1044: [HAOI2008]木棍分割 Time Limit:10 Sec Memory Limit:162 MB Submit:3162 Solved:1182 [Submit][Status][Discuss] Description 有n...

    2018-06-17 23:43:04

  • Gym 100917J---dir -C(RMQ--ST)

    题目链接 http://codeforces.com/gym/100917/problem/D problem description Famous Berland coder and IT manager Linus Gates announced his next proprietary open-source system "Winux 10.04 LTS" In this system command " dir -C" prints list of all files in...

    2018-06-17 23:43:10

  • HDU 5510---Bazinga(指针模拟)

    题目链接 http://acm.hdu.edu.cn/search.php?action=listproblem Problem Description Ladies and gentlemen, please sit up straight. Don't tilt your head. I'm serious. For n given strings S 1 , S 2 , ? , S n , labelled from 1 to n , you should find the la...

    2018-06-17 23:43:04

  • 矩阵连乘最优解---动态规划

    代码如下: #include iostream #include algorithm #include cstdio #include cstring #include map #define N 1000005 using namespace std; int p[ 1005 ],s[ 1005 ][ 1005 ],dp[ 1005 ][ 1005 ]; void print( int i, int j){ if (i== j) { cout " A " i; return ; }...

    2018-06-17 23:43:01

  • 初学C++ 之 auto关键字(IDE:VS2013)

    /* 使用auto关键字,需要先赋初值,auto关键字是会根据初值来判断类型 */ auto i = 5 ; auto j = 10 ; cout " auto i = 5 " " \ti type: " typeid(i).name() endl " auto j = 10 " " \tj type: " typeid(j).name() endl; cout " i + j = " i + j endl; auto a = " Hell...

    2018-06-17 23:42:55

  • 【USACO】DP动态规划小测(一)

    {20160927 19:30~21:30} 总分400分,我113.33,稳稳地垫底了......(十分呼应我上面的博客名,hhh~)过了这么多天我才打完所有代码,废话我也就不多说了。不过,虽然时间花费的多,但我觉得我的PG也是博采众长了。 ------------------------------------------------...

    2018-06-17 23:42:43

  • A -- HDU 4585 Shaolin

    Shaolin Time Limit: 1000 MS Memory Limit: 32768 KB 64-bit integer IO format: %I64d , %I64u Java class name: Main [Submit] [Status] [Discuss] Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every...

    2018-06-17 23:42:45

  • 2016 一中培训 day 5 ksum

    又是一天的爆零!!!!! 原本第一题 很容易做 竟然优化过度 丢了答案 1693: ksum Time Limit 1000 ms Memory Limit 524288 KBytes Judge Standard Judge Solved 18 Submit 41 Submit Status Description Peter喜欢玩数组。NOIP这天,他从Jason手里得到了大小为n的一...

    2018-06-17 23:42:42

  • 【Qt】2.3 使用Qt设计师来创建对话框

    安装完Qt OpenSource之后,在开始菜单目录下会有这几个东西。 其中【Designer】是用来设计窗口界面的程序。所以现在可以使用它来设计一个对话框。在【Qt Creator】中,【设计】这一项里也可以做界面的设计。 打开【Designer】,会默认弹出【新建窗体】,选择【Dialog w...

    2018-06-17 23:42:39 编程工具

2