05 2016 档案

摘要:http://poj.org/problem?id=2681 给你任意长度的字符串,找出两串字符中不相同的字符个数(总数) 阅读全文
posted @ 2016-05-31 21:14 |瑾诺学长| 阅读(155) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=1562 阅读全文
posted @ 2016-05-30 12:34 |瑾诺学长| 阅读(161) 评论(0) 推荐(0) 编辑
摘要:Description You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you 阅读全文
posted @ 2016-05-29 20:28 |瑾诺学长| 阅读(191) 评论(0) 推荐(0) 编辑
摘要:题目描述: 大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。 任务描述: 给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列 阅读全文
posted @ 2016-05-29 18:50 |瑾诺学长| 阅读(350) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=1456 阅读全文
posted @ 2016-05-27 21:37 |瑾诺学长| 阅读(154) 评论(0) 推荐(0) 编辑
摘要:C++通过以下几个类支持文件的输入输出 (1) ofstream:写操作,输出文件类; (2) ifstream:读操作,输入文件类; (3) fstream:可同时读写的文件类。 1. open函数:打开文件 函数原型:void open(const char*filename,int mode, 阅读全文
posted @ 2016-05-27 11:11 |瑾诺学长| 阅读(181) 评论(0) 推荐(0) 编辑
摘要:题意:给出一个矩阵,其中有些格子干燥、有些潮湿。 如果一个潮湿的格子的相邻的四个方向有格子也是潮湿的,那么它们就可以构成更大 的湖泊,求最大的湖泊。 也就是求出最大的连在一块儿的潮湿的格子的数目。 阅读全文
posted @ 2016-05-23 13:20 |瑾诺学长| 阅读(218) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; int n,k,bb[8]={0},sum=0; char aa[8][8]; void dfs(int a,int b) { if(b>=n) { if(a==k) sum++; return; } for(int i=0... 阅读全文
posted @ 2016-05-23 11:31 |瑾诺学长| 阅读(560) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=1088 阅读全文
posted @ 2016-05-21 19:34 |瑾诺学长| 阅读(139) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=1154 阅读全文
posted @ 2016-05-21 14:39 |瑾诺学长| 阅读(229) 评论(0) 推荐(0) 编辑
摘要:初学dfs参考别人代码,如有雷同,见怪不怪。#include using namespace std; int aa[25][25]; int maxa=0; int step[25]={0},n; void dfs(int a,int b) { int t=b; step[a]=1; for(int i=0;i>n; for(int i=0;i>aa[i][j]; ... 阅读全文
posted @ 2016-05-20 20:12 |瑾诺学长| 阅读(182) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=3664 进行两轮选举,第一轮选前n进入第二轮,第二轮选最高 阅读全文
posted @ 2016-05-20 11:20 |瑾诺学长| 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Description n participants of << crazy tea party >> sit around the table. Each minute one pair of neighbors can change their places. Find the minimum 阅读全文
posted @ 2016-05-20 11:17 |瑾诺学长| 阅读(193) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=2299 阅读全文
posted @ 2016-05-20 10:58 |瑾诺学长| 阅读(161) 评论(0) 推荐(0) 编辑
摘要:题目:http://poj.org/problem?id=1804 大意:给你一串数字,排序。求出最少的交换次数 \ 我用归并做的 阅读全文
posted @ 2016-05-20 10:53 |瑾诺学长| 阅读(301) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=1979 阅读全文
posted @ 2016-05-20 10:41 |瑾诺学长| 阅读(157) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示