通过遍历任务管理器,输出当前正在运行的进程ID和Name。
同时打印出遍历过程所消耗的时间。/*
@Date:2014/6/8
@Author:Alex
*/
#include
#include
#include
#include
#include
using namespace std;
bool traverseProcesses(map &_mapProcess)...
点击打开链接
求MST的最长边~
prim
#include
#include
#include
#include
#define Min(a,b) (a)<(b)?(a):(b)
using namespace std;
const int INF = 1000000000;
const int maxn = 2000 + 5;
struct pto
{...
分类:
其他好文 时间:
2014-06-11 06:45:17
阅读次数:
235
基于上面一篇博文的代码设计求的某个数的回文距离,所谓回文距离就是给定一个数,求这个数离与他最近的那个回文数的距离,例如123的回文距离为2,因为离123最近的回文数为121,所以123的回文距离为2,代码如下:
#include
#include
#include
using namespace std;
bool fun(int);
void main()
{
int val,val...
分类:
其他好文 时间:
2014-06-11 06:43:53
阅读次数:
234
q '0'); 表示将q的所有位赋值为0,当q位数较多时比较方便。。。
信号属性函数:用来得到有关信号的行为功能信息;
信号‘event:当前的一个相当小的时间间隔内有信号事件发生,则返回’true’,否则返回‘false’;
关于conv_std_logic_vector 和 conv_integer 这两个函数的使用问题...
分类:
其他好文 时间:
2014-06-11 06:26:39
阅读次数:
240
非常巧妙的题目,巧用cmp,注意cmp的重载
#include
#include
using namespace std;
string a[55];
bool cmp(string a, string b){
return a+b > b+a;
}
int main(int argc, char const *argv[])
{
int n;
while(cin >...
分类:
其他好文 时间:
2014-06-11 06:10:28
阅读次数:
293
string类型转换int类型本文地址: http://blog.csdn.net/caroline_wendyC语言转换形式:...
std::string str;
int i = atoi(str.c_str());
...C++转换形式(C++11):...
std::string str;
int i = std::stoi(str);
...同样, 可以使用 stol(long), s...
分类:
编程语言 时间:
2014-06-11 00:27:22
阅读次数:
294
同步读写文本 代码(C++)本文地址: http://blog.csdn.net/caroline_wendy写程序: 每个2秒写入文本一个数字;读程序: 每个5秒读入文本最后一个数字;写程序代码:#include
#include
#include
using namespace std;
int main (void) {
ofstream ofs("D:/w.txt");
...
分类:
编程语言 时间:
2014-06-10 16:02:52
阅读次数:
331
水题#include #include #include #include using
namespace std;int main(){ int n,v; cin >> n >> v; vector res;
for(int i = 0; i > k; for...
分类:
其他好文 时间:
2014-06-10 09:24:16
阅读次数:
337
【题目描述】回文数是指从左向右念和从右向左念都一样的数。如12321就是一个典型的回文数。给定一个进制B(2 2 #include 3 #include 4
#include 5 #include 6 const int maxl=1000; 7 using namespace std; 8...
分类:
其他好文 时间:
2014-06-10 08:49:27
阅读次数:
180
贪心算法,每条路径最短2格,故前k-1步每次走2格,最后一步全走完由于数据比较小,可以先打表#include
#include #include #include using namespace std;typedef pair Point;int main(){
int n, m, k, f...
分类:
其他好文 时间:
2014-06-10 00:33:15
阅读次数:
302