摘要:
题目链接 https://www.luogu.com.cn/problem/P1219 题目思路 dfs搜索,枚举每一行,查找合法的位置 关键:正对角线用一维表示为 \(u + i\),反对角线为了不超范围表示为 \(n - u + i\) 题目代码 #include <iostream> #inc 阅读全文
posted @ 2022-03-24 21:01
vacilie
阅读(25)
评论(0)
推荐(0)
摘要:
题目链接 https://www.luogu.com.cn/problem/P3397 题目思路 直接暴力求解,枚举$x_1 \sim x_2$,\(y_1 \sim y_2\) 或者二维差分 题目代码 暴力 #include <iostream> #include <algorithm> usin 阅读全文
posted @ 2022-03-24 20:30
vacilie
阅读(41)
评论(0)
推荐(0)
摘要:
题目链接 https://www.luogu.com.cn/problem/solution/P4995 题目思路 就是一高一低来回跳,由于数据大,所以答案用long long(用int只a一半) 题目代码 #include <iostream> #include <algorithm> using 阅读全文
posted @ 2022-03-24 20:01
vacilie
阅读(38)
评论(0)
推荐(0)

浙公网安备 33010602011771号