e*t
2 楼
其中的Start Capicitor可以通过电容和电压参数来匹配,那么Start Relay是否有什么
参数来选择吗?
我的空调原来装的是Trane Start Kit BAYKSKT260,包括一个Relay一个电容。在网上实
在是找不到同样的型号在卖,所以在想是不是分开买电容和Relay是不是更容易一点。
谢谢!
参数来选择吗?
我的空调原来装的是Trane Start Kit BAYKSKT260,包括一个Relay一个电容。在网上实
在是找不到同样的型号在卖,所以在想是不是分开买电容和Relay是不是更容易一点。
谢谢!
z*o
3 楼
combination
d*b
4 楼
S(h, t) =
"H" + S(h - 1, t - 1) union "T" + S(h, t - 1) if (h < t)
"HH...H" (h times) if (h = t)
empty if (h > t)
"H" + S(h - 1, t - 1) union "T" + S(h, t - 1) if (h < t)
"HH...H" (h times) if (h = t)
empty if (h > t)
T*e
5 楼
DFS
d*b
6 楼
shut up and show me the code
using namespace std;
vector S(int h, int t) {
vector result;
if (h == 0) {
string s;
for (int i = 0; i < t; i++) s += "T";
result.push_back(s);
} else if (h == t) {
string s;
for (int i = 0; i < h; i++) s += "H";
result.push_back(s);
} else if (h < t){
for (string s : S(h - 1, t - 1))
result.push_back("H" + s);
for (string s : S(h, t - 1))
result.push_back("T" + s);
}
return result;
}
int main() {
for(string s : S(2, 5))
cout << s << endl;
}
using namespace std;
vector
vector
if (h == 0) {
string s;
for (int i = 0; i < t; i++) s += "T";
result.push_back(s);
} else if (h == t) {
string s;
for (int i = 0; i < h; i++) s += "H";
result.push_back(s);
} else if (h < t){
for (string s : S(h - 1, t - 1))
result.push_back("H" + s);
for (string s : S(h, t - 1))
result.push_back("T" + s);
}
return result;
}
int main() {
for(string s : S(2, 5))
cout << s << endl;
}
t*r
8 楼
s*x
10 楼
static ArrayList HeadTail(int m, int n)
{
ArrayList result = new ArrayList<>();
makeheadtail(result, new StringBuilder(), m, n-m);
return result;
}
private static void makeheadtail(ArrayList result, StringBuilder
sb, int head, int tail)
{
if((head == 0) && (tail == 0))
{
String temp = sb.toString();
result.add(temp);
return;
}
if(head == 0)
{
sb.append("T");
makeheadtail(result, sb, head, tail -1);
sb.deleteCharAt(sb.length()-1);
}
else if(tail == 0)
{
sb.append("H");
makeheadtail(result, sb, head-1, tail);
sb.deleteCharAt(sb.length()-1);
}
else
{
sb.append("T");
makeheadtail(result, sb, head, tail-1);
sb.deleteCharAt(sb.length()-1);
sb.append("H");
makeheadtail(result, sb, head-1, tail);
sb.deleteCharAt(sb.length()-1);
}
}
{
ArrayList
makeheadtail(result, new StringBuilder(), m, n-m);
return result;
}
private static void makeheadtail(ArrayList
sb, int head, int tail)
{
if((head == 0) && (tail == 0))
{
String temp = sb.toString();
result.add(temp);
return;
}
if(head == 0)
{
sb.append("T");
makeheadtail(result, sb, head, tail -1);
sb.deleteCharAt(sb.length()-1);
}
else if(tail == 0)
{
sb.append("H");
makeheadtail(result, sb, head-1, tail);
sb.deleteCharAt(sb.length()-1);
}
else
{
sb.append("T");
makeheadtail(result, sb, head, tail-1);
sb.deleteCharAt(sb.length()-1);
sb.append("H");
makeheadtail(result, sb, head-1, tail);
sb.deleteCharAt(sb.length()-1);
}
}
t*i
11 楼
用java大概写了一下, recursion的思路,
void getCoinSequence(ArrayList result, String currSeq, int N, int M,
int numHeadsInCurrSeq) {
//invalid input
if(M > N) {
return null;
}
//end cases with no chance to get M heads
if(N-currSeq.length() < M - numHeadsInCurrSeq || numHeadsInCurrSeq > M)
{
return;
}
if (currSeq.length() == N && numHeadsInCurrSeq == M) {
result.add(currSeq)
return;
}
getCoinSequence(result, currSeq+"T", N, M, numHeadsInCurrSeq);
getCoinSequence(result, currSeq+"H", N, M, numHeadsInCurrSeq + 1);
}
调用的话,就是getCoinSequence( result, "", N, M, 0)
void getCoinSequence(ArrayList
int numHeadsInCurrSeq) {
//invalid input
if(M > N) {
return null;
}
//end cases with no chance to get M heads
if(N-currSeq.length() < M - numHeadsInCurrSeq || numHeadsInCurrSeq > M)
{
return;
}
if (currSeq.length() == N && numHeadsInCurrSeq == M) {
result.add(currSeq)
return;
}
getCoinSequence(result, currSeq+"T", N, M, numHeadsInCurrSeq);
getCoinSequence(result, currSeq+"H", N, M, numHeadsInCurrSeq + 1);
}
调用的话,就是getCoinSequence( result, "", N, M, 0)
s*7
12 楼
dfs吧
相关阅读
地下室大家一般会用什么地板?从国内海运过来的包裹不喜欢窗框的颜色, 有什么选择?厨房水龙头旁边的这是什么东西.人口普查表sump pump太吵怎么办?帮忙看一下foundation inspection report ,哪些是必须修理的?我再推荐一次我们家用过的这个home inspector吧 (转载)请推荐纽约长岛地区的loan agent. 谢谢!有谁知道国内卖房子需要先还清贷款么?求助一些prepaid手机的相关问题微波炉的抽油烟机推荐一款高压水枪2005年co-op9万5现卖12万大家请contractor来家里装修的时候,自己在家看着吗?嗯,diy除半人高杂草初步告捷现在还能够回头吗?问关于银行屋出价以及其他请教:天花板长霉…车库门外上方的感应灯不亮