DP太恐怖恐怖怖了。。。。。 2^28肯定不兹瓷 考虑对于'X'的点不会超过8个,用二进制表示 f[i][j]表示当前填了第i个数字,状态为j的方案数 由小到大填 f[i+1][j]=f[i][j]*num[j] num表示当前这个状态,有多少位置可以填。为了保证合法,没被填的'X'周围的格子肯定不
转载 2018-09-18 15:36:00
37阅读
2评论
给定一个$n\times m$的网格图,其中的数恰好是$1\sim n\times m$。定义一个位置是局部极小值当且仅当它比周围八个数都小,给出所有局部极小值的位置,求可能的网格图个数。
转载 2021-03-28 14:42:00
112阅读
欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - BZOJ2669 题意概括 有一个n行m列的整数矩阵,其中1到nm之间的每个整数恰好出现一次。如果一个格子比所有相邻格子(相邻是指有公共边或公共顶点)都小,我们说这个格子是局部极小值。 给出所有局部极小值的位置
转载 2017-10-17 22:45:00
93阅读
2评论
2669: [cqoi2012]局部极小值 Description 有一个n行m列的整数矩阵,其中1到nm之间的每个整数恰好出现一次。如果一个格子比所有相邻格子(相邻是指有公共边或公共顶点)都小,我们说这个格子是局部极小值。 给出所有局部极小值的位置,你的任务是判断有多少个可能的矩阵。 有一个n行m
转载 2017-04-06 10:08:00
115阅读
2评论
Description The Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Throw the Trees Trees are Shaking, Leaves are Falling. Lovers
转载 2017-07-12 21:36:00
50阅读
2评论
DescriptionThe Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Throw the Trees Trees are Shaou. .....
原创 2022-11-10 01:05:09
10阅读
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6409 Accepted Submission(s): 2667 Problem Descrip
原创 2021-06-04 21:28:00
61阅读
Romantic Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 2669 Romantic Submit Status Practice HDU 2669
转载 2016-08-13 17:34:00
57阅读
有一个n行m列的整数矩阵,其中1到nm之间的每个
原创 2016-08-14 23:23:58
56阅读
数论 扩展欧几里德算法
原创 2023-02-23 10:02:01
17阅读
#include<stdio.h>#include<ctype.h>#include<string.h>#include<math.h>#include<stdlib.h>
原创 2022-07-28 19:02:03
55阅读
RomanticTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Ja
原创 2023-05-30 00:01:31
25阅读
Romantic Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4400 Accepted Submission(s): 1852 Proble
原创 2021-07-21 15:33:35
128阅读
扩展欧几里得
转载 2016-07-11 17:09:00
19阅读
2评论
2669: [cqoi2012]局部极小值 Description 有一个n行m列的整数矩阵,其中1到nm之间的每个整数恰好出现一次。如果一个格子比所有相邻格子(相邻是指有公共边或公共顶点)都小,我们说这个格子是局部极小值。 给出所有局部极小值的位置,你的任务是判断有多少个可能的矩阵。 有一个n行m
转载 2018-03-01 09:19:00
37阅读
2评论
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2669 Problem Description The Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Th
转载 2017-05-20 09:48:00
25阅读
杭电2669 给a,b求X*a Y*b = 1.如果没有则输出sorry。 可以通过拓展欧几里得指导X*a Y*b = gcd(a,b). 不言而喻要判断gcd(a,b)是否
原创 2022-08-24 14:22:29
20阅读
2669: [cqoi2012]局部极小值Time Limit: 3 Sec  Memory Limit: 128 MBSubmit: 762  Solved: 403[Submit][Status][Discuss]Description有一个n行m列的整数矩阵,其中1到nm之间的每个整数恰好出现一次。如果一个格子比所有相邻格子(相邻是指有公共边或公共顶点)都小,我们说
原创 2023-07-07 13:46:07
18阅读
【题目链接】:click here~~ 【题目大意】: Now tell you two nonnegative integer a and b. Find the nonnegative integer X and integer Y to satisfy X*a + Y*b = 1. If no such answer print "sorry" instead. 求满足方程X*a
原创 2022-07-29 15:25:33
29阅读
练习一下数学知识了。。【题目链接】click here~~【题目大意】Find the nonnegative integer X and integer Y to satisfy X*a + Y*b = 1. If no such answer print "sorry" instead. 求满足式子的x和y否则输出“sorry”【解题思路】扩展欧几里得的基础了,扩展欧几里德
原创 2022-07-29 16:52:13
30阅读
  • 1
  • 2
  • 3
  • 4
  • 5