dp 我好像很zz。。。 想了好长好长时间,然后没想出来,怒掉rating。。。 其实我们可以吧三种颜色两两计算,因为这样加入第三种颜色不会影响之前的方案,那么我们跑一个dp,计算数量分别为a,b的方案数,乘起来就行了。。。 (我还去想数三元环什么的。。。) #include<bits/stdc++
转载 2017-10-09 20:03:00
29阅读
2评论
A. The Artful Expedient time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output time limit per te
转载 2017-10-07 16:32:00
172阅读
2评论
http://www.elijahqi.win/archives/1231 Rock… Paper!After Karen have found the deterministic winning...
原创 2022-08-08 13:39:55
16阅读
题目链接:http://codeforces.com/contest/869/problem/A 题意:给你长度都为n的序列,xn
原创 2022-11-23 10:22:13
39阅读
切蛋糕 有如下图半径为R的圆形蛋糕,被切一刀后(图中红色直线),分成两个部分3982.49
原创 2022-07-29 13:50:07
71阅读
题目Starting with a positive integer N, we reorder the digits in any order (including the original order) such that the leading digit is not zero.Return true if and only if we can do this
原创 1月前
64阅读
Starting with a positive integer N, we reorder the digits in any order (including the original order) such that the leading digit is not zero. Return 
转载 2019-05-20 22:31:00
86阅读
2评论
题目描述 — This is not playing but duty as allies of justice, Nii-chan! — Not allies but justice itself, Onii-chan! With hands joined, go everywhere at a
转载 2018-03-03 21:35:00
17阅读
2评论
http://www.elijahqi.win/archives/1159 Adieu l’ami.Koyomi is helping Oshino, an acquaintance of his, to t、
原创 2022-08-08 13:44:21
34阅读
The Intriguing Obsession— This is not playing but duty as allies of justice, Nii-chan!— Not allies but justice itself
原创 2022-11-22 19:46:31
79阅读
题目链接:题目链接:http://codeforces.com/contest/869/problem/B 题意:给你一个a,b,让
原创 2022-11-23 10:22:10
49阅读
http://www.elijahqi.win/archives/1229 Even if the world is full of counterfeits, I still regard it as wond
原创 2022-08-08 13:40:21
26阅读
http://www.elijahqi.win/archives/1225 — This is not playing but duty as allies of justice, Nii-chan
原创 2022-08-08 13:40:50
25阅读
LeetCode: 869. Reordered Power of 2
原创 2022-12-06 00:44:23
76阅读
Starting with a positive integer N, we reorder the digits in any order (including the original order) such that the leading digit is not zero. Return 
转载 2021-03-22 06:17:00
59阅读
2评论
题目传送门 #include <bits/stdc++.h> using namespace std; //求所有约数 vector<int> get_divisors(int x) { vector<int> res; for (int i = 1; i <= x / i; i++) // 枚举到
原创 2021-09-29 16:23:15
358阅读
DescriptionStarting with a positive integer N, we reorder the digits in any order (including the original order) such that the leading
原创 2022-08-11 17:12:36
69阅读
题目 给定 $n$ 个正整数 $a_i$,对于每个整数 $a_i$,请你按照从小到大的顺序输出它的所有约数。 输入格式 第一行包含整数 $n$。 接下来 $n$ 行,每行包含一个整数 $a_i$。 输出格式 输出共 $n$ 行,其中第 $i$ 行输出第 $i$ 个整数 $a_i$ 的所有约数。 数据范围 $1≤n≤100,1≤a_i≤2×10^9$ 输入样例: 2 6 8 输出样例: 1 2
原创 2023-08-23 19:47:13
405阅读
#约数专题 ##求一个数的约数个数 ##链接(https://www.acwing.com/activity/content/problem/content/938/) ##代码: #include<bits/stdc++.h> using namespace std; #define cout(x ...
转载 2021-10-25 13:01:00
46阅读
2评论
回溯 static Set<Integer> set=new HashSet<>(); static{ for(int i=1;i<=(int)1e9;i*=2) set.add(i); } private int[] cnt=new int[10]; private int len; privat ...
转载 2021-10-28 13:09:00
29阅读
  • 1
  • 2
  • 3
  • 4
  • 5