
暴力
文章平均质量分 84
詹明捷
此博客停止更新,迁移至www.zhanmingjie.com
展开
-
POJ 2718 Smallest Difference (穷竭搜索)
穷竭搜索,bfs,c++,stl,string原创 2014-11-09 12:57:48 · 1014 阅读 · 0 评论 -
POJ 3187 Backward Digit Sums (杨辉三角,穷竭搜索,组合数,DFS)
杨辉三角,穷竭搜索,组合数,暴力,acm,dfs原创 2014-11-09 23:20:58 · 1345 阅读 · 0 评论 -
POJ-3050 Hopscotch(穷竭搜索,DFS,回溯法)
穷竭搜索,DFS,回溯法原创 2014-11-10 13:06:29 · 1438 阅读 · 0 评论 -
AOJ-0525 Osenbei-翻煎饼(穷竭搜索,BFS,BITSET)
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0525题意:药药!切克闹! 煎饼果子来一套!有一个烤饼器可以烤r行c列的煎饼,煎饼可以正面朝上(用1表示)也可以背面朝上(用0表示)。一次可将同一行或同一列的煎饼全部翻转。现在需要把尽可能多的煎饼翻成正面朝上,问最多能使多少煎饼正面朝上? 输入:多组输入,每组第一行为二整数r原创 2014-11-10 21:48:42 · 1704 阅读 · 0 评论 -
Floyd-Warshall+二进制枚举SRM 661 Div2 Medium: BridgeBuilding
SRM 661-Medium: BridgeBuildingDiv2 Problem StatementYou have two rows of nodes. Each row contains N nodes, numbered 0 through N-1 from the left to the right.Within each row, adjacent nodes原创 2015-07-25 23:12:38 · 958 阅读 · 0 评论 -
暴力+稍微剪枝 SRM 660 Div1 Easy: Coversta
给一个 n 行 m 列的矩阵,矩阵元素为0-9,表示权值。现在给不超过10个集合{dx,dy},表示如果我选择了(i,j),则我就选择了集合里每个(i+dx , j+dy)点。现在要求你选择两个不同的点作为中心点(当然,它们拓展出来的点可能会重合),使得被选择的点(重复只能算一次)权值之和最大。原创 2015-08-04 10:50:39 · 544 阅读 · 0 评论 -
六进制+括号替换 SRM 628 Division Two - Level Two BracketExpressions
题意:给小于5个X,可在字符串中替换括号,判断该括号字符串是否合法原创 2015-08-18 21:14:03 · 563 阅读 · 0 评论 -
交换a串的位置让b.c串出现最多次 暴力 Codeforces Div. 2 B. ZgukistringZ
题意给你a,b,c三个串,让你随意交换a串的位置,让b串和c串在a串里面不重复的出现最多次题解:B题,就老老实实想暴力就好,直接暴力枚举b串出现的次数,然后再算出c串出现的最多次数,然后搞一搞就好了#include #include #include #include #include #include #include using namespace原创 2015-10-08 00:58:44 · 687 阅读 · 0 评论 -
暴力字符串 Codeforces Div. 2 A Mr. Kitayuta's Gift
替换一个字符后是否能成为回文串#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;string s,sss原创 2015-10-23 17:32:05 · 799 阅读 · 0 评论