Leetcode 377. Combination Sum IV
题目链接:Combination Sum IV Given an integer array with all positive numbers and no ...
题目链接:Combination Sum IV Given an integer array with all positive numbers and no ...
这道题第一眼看去很难,其实不然,短短几行代码就搞定了。 说一下大概思路,如果是排成一排的n个人,如 1 2 3 4 5 6 7 8 我们要变成 8 7 ...
题目意思很容易理解,学校有n个社团,每个社团只给编号从a到b 的发传单,而且只给隔了c的人发,问最后谁收到的传单是单数,输出他的编号和收到的传单数量。 昨天做这...
我先解释一下汉明距离 以下来自百度百科 在信息论中,两个等长字符串之间的汉明距离是两个字符串对应位置的字符不同...
题目意思就是用a-z组成一个N,然后到z后又跳回a,输出宽从3到10的N。 #include <stdio.h>...
#include <string.h> #include <stdio.h> const int maxn = ...
把输入的数加起来,输入0表示结束。 先看我Java代码,用BigINteger类很多东西都不需要考虑,比如前导0什么的,很方...
题目链接 有红绿蓝三种颜色的画,每种拿三朵可以组成一束花,或者各拿一朵组成花束,告诉你每种花的数目,求出可能组成最多的花束。 如果你的代码过不了,考虑一下 8 ...