摘要:
#include<bits/stdc++.h> using namespace std; int n,p[1000],len,p1[1000]; int f() { int i; for(i=0;i<=len;i++) if(p[i]!=p[len-i]) return 0; return 1; } 阅读全文
摘要:
题目:我已经明示到这个程度了你还不用并查集? #include<bits/stdc++.h> using namespace std; const int MAXN=1010; int F[MAXN]; int GetFather(int x) { return F[x]==x?x:F[x]=Get 阅读全文
摘要:
P200汉诺塔 #include<bits/stdc++.h> using namespace std; int main() { int n,i; long long s[40]; s[1]=2; for(i=2;i<=35;i++) s[i]=3*s[i-1]+2; while(cin>>n) 阅读全文