相关分类: Java技术 C/C++ VB delphi
  • Qt-widget画坐标系以及一些功能

    窗口: mywidget.h: 1 #ifndef MYWIDGET_H 2 #define MYWIDGET_H 3 4 #include QWidget 5 #include " ui_mywidget.h " 6 #include QPaintEvent 7 #include QtGui 8 9 class MyWidget : public QWidget 10 { 11 Q_OBJECT 12 13 public : 14 MyWidget(QWidget *parent =...

    2018-06-17 23:41:50

  • 2016 长春东北赛---Coconuts(离散化+DFS)

    题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5925 Problem Description TanBig, a friend of Mr. Frog, likes eating very much, so he always has dreams about eating. One day, TanBig dreams of a field of coconuts, and the field looks like a large c...

    2018-06-17 23:41:46

  • bzoj 3384: [Usaco2004 Nov]Apple Catching 接苹果

    双倍经验题。。。 --1750 dp!! 3384: [Usaco2004 Nov]Apple Catching 接苹果 Time Limit:1 SecMemory Limit:128 MB Submit:61Solved:52 [Submit][Status][Discuss] Description 很少有人知道奶牛爱吃苹果.农夫约翰的农场上有两棵苹果树(编号为1和2),每一棵树上都...

    2018-06-17 23:41:48

  • C及C++中typedef的简单使用指南

    又是在学数据结构的时候,发现了之前学习的知识遗忘很多,在发现对C/C++中关键字typedef的理解还是没有到位后,我翻阅了学C++用到的课本,又问了度娘,也看了不少关于typedef用法的博客。于是我就想把我理解的东西整理下来。 一.基本解释 typedef为C语言的关键字,作用...

    2018-06-17 23:41:35

  • Difficult Melody(映射)

    题目链接 http://vjudge.net/contest/137242#problem/D Description You're addicted to a little game called `remember the melody': you hear some notes, and then you repeat it. In most cases, the longer the melody, the harder to repeat, but it isn't alwa...

    2018-06-17 23:41:45

  • 回溯法求n的全排列

    代码如下: #include iostream #include algorithm #include stdio.h #include cstring #include cmath #include map #include bitset using namespace std;typedef long long LL; int x[ 105 ]; int n; void Backtrack( int t){ if (t== n){ for ( int i= 1 ;i=n;i++...

    2018-06-17 23:41:25

  • Qt隐含共享是如何工作的

    最近学习Qt,在深入了解容器类的时候,特意关注了下隐含共享机制,以下为书中原文,最后部分是自己的一些总结。 《C++ GUI Qt4编程》摘选: 隐含共享在后台自动运行,所以我们不必再编写任何代码来促进这个优化过程发生。但弄明白它到底如何工作,的确是一件有益的事情...

    2018-06-17 23:41:04

  • Gym 100703I---Endeavor for perfection(尺取)

    题目链接 http://codeforces.com/problemset/gymProblem/100703/I Description standard input/output Statements As a matter of fact, Dragon knows what Prince is interested in now. Prince uses to spend his rare off days learning different courses and trai...

    2018-06-17 23:40:55

  • Qt--改变鼠标形状

    改变鼠标形状,在绘制坐标系的时候有用到,特此记下: 1 this -setMouseTracking( true ); // 设置为不按下鼠标键触发moveEvent 2 void mouseMoveEvent(QMouseEvent* event ) 3 { 4 QPoint mousepos = event ()- pos(); 5 6 // 在坐标(0 ~ width,0 ~ height)范围内...

    2018-06-17 23:41:00

  • 命令行界面编译运行C/C++程序

    命令行界面编译运行C/C++程序 2016-10-14 编写好程序后,就需要对程序进行编译、执行。很多编译器都具备集成开发环境(IDE),在开发大型程序时,IDE强大的功能十分有用。然而当程序较小,使用IDE就会非常麻烦。比如,如果用IDE写一个冒泡排序算法对一个数组进行排序,...

    2018-06-17 23:40:55 cms

2