C語言源碼: [cpp] #include<stdio.h> long long f[100]; in
測試數據大放送: 4 4 5 S.X. ..X. ..XD .... 3 4 5 S.X. ..X. ...D 2 2 1 S. .D 8 8 7 .DX
C語言源碼: [cpp] #include<stdio.h> #include<string.h> &n
C語言源碼: [cpp] #include<stdio.h> int s[110][110]; &nb
C語言源碼: [cpp] #include<stdio.h> #include<math.h> &nbs
C語言源碼: [cpp] #include<stdio.h> long long f(long long n) &
C語言源碼: [cpp] #include<stdio.h> #define maxsize 10000000 &n
C語言源碼: [cpp] #include<stdio.h> int s[51][51][51];
C語言源碼: [cpp] #include<stdio.h> int main() {
C語言源碼: [cpp] #include<stdio.h> #include<string.h> &
C語言源碼: [cpp] #include<stdio.h> #include<stdlib.h> &
C語言源碼: [cpp] #include<stdio.h> #define maxsize 110
C語言源碼: [cpp] #include<stdio.h> #include<limits.h> &
思路: 由於第i條邊的權值w[i] = 2^i,那麼前i-1條邊的權值之和為w[0]+w[1]+·+w[i-1] =(2^i)-1 也就是說