题目描述 Orz has two strings of the same length: A and B. Now she wants to transform A into an anagram of B (which means, a rearrangement of B) by changing some of its letters. The only operation the girl can make is to “increase” some (possibly none or…
尴尬...理解不太好T T #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; #define inf 0x3f3f3f3f ; int n; //标杆序号 int lx[maxn],ly[maxn]; //是否被搜索过 bool sx[maxn],sy[maxn]; int weight[maxn][maxn],mat[…
方格取数(2) Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3663 Accepted Submission(s): 1148 Problem Description 给你一个m*n的格子的棋盘,每个格子里面有一个非负数. 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取数所在的2个格子不能相邻,并且取出的…