- 博客(2)
- 收藏
- 关注
原创 A. Anti-knapsack
A. Anti-knapsackYou are given two integers n and k. You are asked to choose maximum number of distinct integers from 1 to n so that there is no subset of chosen numbers with sum equal to k.A subset of a set is a set that can be obtained from initial one
2021-03-09 21:10:26
256
1
原创 练习赛19-f//HDU-1241
题目这题挺简单就是常见的深搜模板题。深搜+递归思路;用深搜遍历每个位置,如果是‘@’就在用深搜查找附近8个方向的量,如果遇到‘*’就返回。#include<iostream>#include<cstring>#include<algorithm>using namespace std;int lei=0;//用于存储目标char leiqu[103][103];//用于储存输入数int n,m;void dfs(int i,int j)//深搜
2021-01-19 19:08:13
108
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人