摘要:
#include
#include
int map[105][105],vis[105][105],ans,n,father[105];
int find(int x)
{ while(x!=father[x]) x=father[x]; return x;
}
int main()
{ int i,j,k,a,b,d,t,min1,min2,state,tt,num; while(scanf("%d",&n)==1 && n) { memset(vis,0,sizeof(vis)); memset(map... 阅读全文
摘要:
#include
int main(void)
{ int n, i; __int64 g[34] = {1}; __int64 d[34] = {0}; for (i = 1; i < 34; i++) { g[i] = 3 * g[i - 1] + 2 * d[i - 1]; d[i] = g[i - 1] + d[i - 1]; } while (scanf("%d", &n), n != -1) printf("%I64d, %I64d\n", g[n], d[n]); re... 阅读全文