2015年11月1日

HDOJ1728(限制转弯的迷宫问题)

摘要: 用bfs进行深搜,求出每个可达点的最小转弯数#include#include#includeusing namespace std;const int MAX_N=105;char g[MAX_N][MAX_N];int vis[MAX_N][MAX_N];int n,m;int k,sx,sy,e... 阅读全文

posted @ 2015-11-01 18:03 vCoders 阅读(271) 评论(0) 推荐(0)

统计不同的单词(map应用)

摘要: 题目描述:输入一些单词,找出所有满足如下条件的单词:该单词不能通过字母重排,得到输入文本中的另一个单词。在判断是否满足条件时,字母不区分大小写,但在输出时应保留输入中的大小写,按字典序进行排列(所有大写字母在所有的小写字母的前面)。#include#include#include#include#i... 阅读全文

posted @ 2015-11-01 12:23 vCoders 阅读(178) 评论(0) 推荐(0)

统计句子中的不同单词个数(句子中含有标点符号,单词不区分大小写)

摘要: #include#include#include#include#includeusing namespace std;set dict;int main(){ string s,buf; while(getline(cin,s)) { dict.clear(); ... 阅读全文

posted @ 2015-11-01 12:00 vCoders 阅读(477) 评论(0) 推荐(0)

priority_queue的用法

摘要: #include#includeusing namespace std;typedef long long LL;typedef pair P;struct node{ int x,y; node(){} node(int cx,int cy):x(cx),y(cy){} f... 阅读全文

posted @ 2015-11-01 11:35 vCoders 阅读(487) 评论(0) 推荐(0)

C语言中clock函数的使用

摘要: #include#include#includeusing namespace std;int main(){ int i=100000000; clock_t start,finish; double duration; start=clock();//开始计时刻 ... 阅读全文

posted @ 2015-11-01 09:37 vCoders 阅读(1446) 评论(0) 推荐(0)

导航