摘要:
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define N 100011 int n,w[N],a[N],f[N]; int main() { memset(f,0x7f,sizeo 阅读全文
摘要:
题目在这里 首先想到的是DFS,附上80分代码(不知道为什么WA了一个点): #include <cstdio> #include <cstring> #define N 1001 int max(int a,int b){return a > b ? a : b;} int n,ans[N][N] 阅读全文
摘要:
题目: 农夫约翰想要在他的正方形农场上建造一座正方形大牛棚。他讨厌在他的农场中砍树,想找一个能够让他在空旷无树的地方修建牛棚的地方。我们假定,他的农场划分成 N x N 的方格。输入数据中包括有树的方格的列表。你的任务是计算并输出,在他的农场中,不需要砍树却能够修建的最大正方形牛棚。牛棚的边必须和水 阅读全文