锘??xml version="1.0" encoding="utf-8" standalone="yes"?>91久久福利国产成人精品,蜜桃麻豆www久久国产精品,日韩人妻无码一区二区三区久久 http://www.shnenglu.com/notonlysuccess/archive/2009/11/08/91589.html#100383EtflEtflSat, 07 Nov 2009 16:35:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/11/08/91589.html#100383

Etfl 2009-11-08 00:35 鍙戣〃璇勮
]]>
re: 紲炲鐨勮垶韞垀~Dancing_Linkshttp://www.shnenglu.com/notonlysuccess/archive/2009/09/08/89701.html#95613whywhyTue, 08 Sep 2009 13:29:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/09/08/89701.html#95613

why 2009-09-08 21:29 鍙戣〃璇勮
]]>
re: 紲炲鐨勮垶韞垀~Dancing_Linkshttp://www.shnenglu.com/notonlysuccess/archive/2009/09/07/89701.html#95488whywhyMon, 07 Sep 2009 13:44:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/09/07/89701.html#95488鎴戣嚜宸變篃妯′豢鐫鍐欎簡涓?浣嗕竴鐩碩LE
鑳藉惁鍊熶綘瀹屾暣鐨勪唬鐮佸涔犲涔犲憿~
榪欐槸鎴戠殑閭:
weihaoo2@163.com
璋㈣阿鍟妦


why 2009-09-07 21:44 鍙戣〃璇勮
]]>
re: 姒傜巼棰樻繪眹http://www.shnenglu.com/notonlysuccess/archive/2009/08/29/83367.html#94769ACMerACMerSat, 29 Aug 2009 08:25:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/29/83367.html#94769#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;
const int MAXN = 20;
struct point_T {
int x, y;
};
point_T st, ed[MAXN * MAXN];
char map[MAXN][MAXN];
int board[MAXN][MAXN];
int row, col, cnt;
double mat[MAXN * MAXN][MAXN * MAXN];
int dir[4][2] = { {1, 0}, {-1, 0}, {0, -1}, {0, 1} };
bool ok(int x, int y) {
return x >= 0 && x < row && y >= 0 && y < col && (map[x][y] == '@' || map[x][y] == '.' || map[x][y] == '$');
}
void floodfill(int x, int y) {
board[x][y] = ++ cnt;
for(int i = 0; i < 4; i ++) {
int tx = x + dir[i][0];
int ty = y + dir[i][1];
if(ok(tx, ty) && board[tx][ty] == -1) {
floodfill(tx, ty);
}
}
}
bool gauss(int n) {
int i, j, row, idx;
double buf, maxx;
for(row = 0; row < n; row ++) {
for(maxx = 0, i = row; i < n; i ++) {
if(maxx < fabs(mat[i][row])) {
maxx = fabs(mat[i][row]);
idx = i;
}
}
if(maxx == 0) return false;
if(idx != row) {
for(i = row; i <= n; i ++)
swap(mat[row][i], mat[idx][i]);
}
for(i = row + 1; i < n; i ++) {
buf = mat[i][row] / mat[row][row];
for(j = row; j <= n; j ++)
mat[i][j] -= buf * mat[row][j];
}
}
for(i = n - 1; i >= 0; i --) {
for(j = i + 1; j < n; j ++)
mat[i][n] -= mat[i][j] * mat[j][j];
mat[i][i] = mat[i][n] / mat[i][i];
}
return true;
}
int main() {
int i, j, k, l, cn;
while(scanf("%d%d", &row, &col) != EOF) {
cn = 0;
for(i = 0; i < row; i ++) {
scanf("%s", map[i]);
for(j = 0; j < col; j ++) {
if(map[i][j] == '@') {
st.x = i;
st.y = j;
}else if(map[i][j] == '$') {
ed[cn].x = i;
ed[cn].y = j;
cn ++;
}
}
}
memset(board, -1, sizeof(board));
cnt = -1;
floodfill(st.x, st.y);
for(i = 0; i < cn; i ++) {
if(board[ed[i].x][ed[i].y] != -1)
break;
}
if(i == cn) {
printf("-1\n");
continue;
}
memset(mat, 0, sizeof(mat));
int now, tx, ty, num;
for(i = 0; i < row; i ++) {
for(j = 0; j < col; j ++) {
if(board[i][j] != -1) {
now = board[i][j];
num = 0;
for(k = 0; k < 4; k ++) {
tx = i + dir[k][0];
ty = j + dir[k][1];
if(ok(tx, ty)) {
num ++;
mat[now][board[tx][ty]] = -1;
}
mat[now][now] = num;
mat[now][cnt + 1] = num;
}
}
}
}
for(i = 0; i < cn; i ++) {
l = board[ed[i].x][ed[i].y];
memset(mat[l], 0, sizeof(mat[l]));
mat[l][l] = 1;
}
if(gauss(cnt + 1))
printf("%.6lf\n", mat[board[st.x][st.y]][board[st.x][st.y]]);
else
printf("-1\n");
}
return(0);
}




ACMer 2009-08-29 16:25 鍙戣〃璇勮
]]>
re: 姒傜巼棰樻繪眹http://www.shnenglu.com/notonlysuccess/archive/2009/08/29/83367.html#94768ACMACMSat, 29 Aug 2009 08:21:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/29/83367.html#94768==> (a + b)E[n] - aE[n-1] - bE[n + 1] = 0;
==>涓轟粈涔堝湪寤哄騫跨煩闃墊椂鏄痬at[i][i - 1] = -b, mat[i][i + 1] = -a,mat[i][i] = a + b; 鑰屼笉鏄痬at[i][i - 1] = -a, mat[i][i + 1] = -b, mat[i][i] = a + b;

ACM 2009-08-29 16:21 鍙戣〃璇勮
]]>
re: 姒傜巼棰樻繪眹http://www.shnenglu.com/notonlysuccess/archive/2009/08/20/83367.html#93910lxghostlxghostThu, 20 Aug 2009 06:52:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/20/83367.html#93910

lxghost 2009-08-20 14:52 鍙戣〃璇勮
]]>
re: 紲炲鐨勮垶韞垀~Dancing_Linkshttp://www.shnenglu.com/notonlysuccess/archive/2009/08/18/89701.html#93699鍌誨唇鍌誨唇Tue, 18 Aug 2009 05:47:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/18/89701.html#93699

鏈夌殑鍟妦鍒濆鐨勬椂鍊欏S榪涜浜嗚祴鍊紐榪欎釜S杈懼埌涓涓緢寮虹殑鍓灊鐨勫憿

鍌誨唇 2009-08-18 13:47 鍙戣〃璇勮
]]>
re: 紲炲鐨勮垶韞垀~Dancing_Linkshttp://www.shnenglu.com/notonlysuccess/archive/2009/08/17/89701.html#93648acmeracmerMon, 17 Aug 2009 14:06:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/17/89701.html#93648

acmer 2009-08-17 22:06 鍙戣〃璇勮
]]>
re: 鍗婂勾AC鐢熸動錛屼粎浠ユ鏂囩邯蹇?/title><link>http://www.shnenglu.com/notonlysuccess/archive/2009/08/12/80162.html#92995</link><dc:creator>cs</dc:creator><author>cs</author><pubDate>Wed, 12 Aug 2009 02:28:00 GMT</pubDate><guid>http://www.shnenglu.com/notonlysuccess/archive/2009/08/12/80162.html#92995</guid><description><![CDATA[璺繃銆傘?鍘夊銆傘?img src ="http://www.shnenglu.com/notonlysuccess/aggbug/92995.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/notonlysuccess/" target="_blank">cs</a> 2009-08-12 10:28 <a href="http://www.shnenglu.com/notonlysuccess/archive/2009/08/12/80162.html#92995#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>re: 鍗婂勾AC鐢熸動錛屼粎浠ユ鏂囩邯蹇?/title><link>http://www.shnenglu.com/notonlysuccess/archive/2009/08/09/80162.html#92712</link><dc:creator>WACow</dc:creator><author>WACow</author><pubDate>Sun, 09 Aug 2009 08:31:00 GMT</pubDate><guid>http://www.shnenglu.com/notonlysuccess/archive/2009/08/09/80162.html#92712</guid><description><![CDATA[紲炲晩銆傝啘鎷?img src ="http://www.shnenglu.com/notonlysuccess/aggbug/92712.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/notonlysuccess/" target="_blank">WACow</a> 2009-08-09 16:31 <a href="http://www.shnenglu.com/notonlysuccess/archive/2009/08/09/80162.html#92712#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>re: 鍗婂勾AC鐢熸動錛屼粎浠ユ鏂囩邯蹇?/title><link>http://www.shnenglu.com/notonlysuccess/archive/2009/08/09/80162.html#92711</link><dc:creator>SiNZeRo</dc:creator><author>SiNZeRo</author><pubDate>Sun, 09 Aug 2009 08:25:00 GMT</pubDate><guid>http://www.shnenglu.com/notonlysuccess/archive/2009/08/09/80162.html#92711</guid><description><![CDATA[紲炲晩銆傝啘鎷溿傚甫甯﹁彍楦熷惂<img src ="http://www.shnenglu.com/notonlysuccess/aggbug/92711.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/notonlysuccess/" target="_blank">SiNZeRo</a> 2009-08-09 16:25 <a href="http://www.shnenglu.com/notonlysuccess/archive/2009/08/09/80162.html#92711#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>re: 鍗婂勾AC鐢熸動錛屼粎浠ユ鏂囩邯蹇礫鏈櫥褰昡http://www.shnenglu.com/notonlysuccess/archive/2009/08/07/80162.html#92493鏉?/dc:creator>鏉?/author>Fri, 07 Aug 2009 01:47:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/07/80162.html#92493

]]>
re: 紲炲鐨勮垶韞垀~Dancing_Linkshttp://www.shnenglu.com/notonlysuccess/archive/2009/08/05/89701.html#92358鍌誨唇鍌誨唇Wed, 05 Aug 2009 14:14:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/05/89701.html#92358
鍏跺疄鍏抽敭鍦ㄤ簬寤哄浘鐨勮繃縐皛~涓婅竟閭d釜妯℃澘鍏跺疄閫熷害宸埆涓嶆槸寰堝ぇ

鍌誨唇 2009-08-05 22:14 鍙戣〃璇勮
]]>
re: 2009.2.10灝忚http://www.shnenglu.com/notonlysuccess/archive/2009/08/05/73421.html#92281zxzzxzWed, 05 Aug 2009 06:29:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/05/73421.html#92281

zxz 2009-08-05 14:29 鍙戣〃璇勮
]]>
re: PKU鈥斺擠P涓撹緫http://www.shnenglu.com/notonlysuccess/archive/2009/08/04/91589.html#92198zhuweicongzhuweicongTue, 04 Aug 2009 10:40:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/08/04/91589.html#92198

zhuweicong 2009-08-04 18:40 鍙戣〃璇勮
]]>
re: 紲炲鐨勮垶韞垀~Dancing_Linkshttp://www.shnenglu.com/notonlysuccess/archive/2009/07/30/89701.html#91670howiehowieThu, 30 Jul 2009 01:49:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/07/30/89701.html#91670浣犵殑涓轟粈涔堥偅涔堝揩鍛紵璇烽棶鍋氫簡浠涔堜紭鍖?


howie 2009-07-30 09:49 鍙戣〃璇勮
]]>
re: 紲炲鐨勮垶韞垀~Dancing_Linkshttp://www.shnenglu.com/notonlysuccess/archive/2009/07/16/89701.html#90270majiamajiaThu, 16 Jul 2009 11:21:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/07/16/89701.html#90270

majia 2009-07-16 19:21 鍙戣〃璇勮
]]>
re: HDOJ1074~~Doing Homework瑙i鎶ュ憡http://www.shnenglu.com/notonlysuccess/archive/2009/07/10/74168.html#89716sh菐宕?/dc:creator>sh菐宕?/author>Fri, 10 Jul 2009 02:46:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/07/10/74168.html#89716
榪欓噷娌℃湁浠g爜鏍煎紡
鑷繁澶嶅埗ALT + F8涓涓?br>

#include<stdio.h>
#include<string>
#define Min(a,b) a>b?b:a
struct DP{
int score;
int next;
int time;
}dp[32768];
struct Homework{
int deadlion,time;
char name[101];
}hw[15];
char ans[15][101];
int n;

void dfs(int k)
{
int i,min,cnt,time,d=k,id,score,next,t;
char ch[16];

memset(ch,'0',sizeof(ch));
i = 14;
d = k;
cnt = 0;
ch[15] = 0;
while(d)
{
if(d&1)
{
cnt += d&1;
ch[i] = (d&1) + '0';
id = i;//濡傛灉鍙湁涓涓?錛宨d鍙互璁板綍涓?鐨勪綅瀛?br>}
i --;
d >>= 1;
}//杞寲鎴愪簩榪涘埗

if(cnt == 1)//鏈搴曚笅鐨勬儏鍐?鍙畬鎴愪簡涓縐嶄綔涓?br>{
id = 14 - id;
if(hw[id].deadlion >= hw[id].time)
dp[k].score = 0;
else
dp[k].score = hw[id].time - hw[id].deadlion;
dp[k].time = hw[id].time;
dp[k].next = id;
return ;
}

min = 0x7FFFFFFF;
for(i=0;i<15;i++)
{
if(ch[i]=='1')
{
id = 14 - i;
int kk = k - (1<<id);
if(dp[kk].time == -1)
dfs(kk);
time = dp[kk].time + hw[id].time;
score = dp[kk].score;
if(hw[id].deadlion < time)
score += (time-hw[id].deadlion);
if(score < min || score == min && strcmp(hw[id].name,hw[next].name)<0)
{
if(score<min)
next = id;
min = score;
t = time;
}
}
}
dp[k].score = min;
dp[k].next = next;
dp[k].time = t;
}


int main()
{
int T,i,k;
scanf("%d",&T);
while (T--)
{
scanf("%d",&n);
k = (1<<n)-1;//涓鍏辨湁榪欎箞澶氬彲鑳?br>for(i=0;i<=k;i++)
dp[i].time = -1;
for(i=0;i<n;i++)
scanf("%s%d%d",hw[i].name,&hw[i].deadlion,&hw[i].time);
dfs(k);
printf("%d\n",dp[k].score);
//杈撳嚭鍚嶅瓧
for(i=0;i<n;i++)
{
strcpy(ans[i],hw[ dp[k].next ].name);
k = k - (1<<(dp[k].next));
}
for(i=n-1;i>=0;i--)
puts(ans[i]);
}
return 0;
}

]]>
re: HDOJ1074~~Doing Homework瑙i鎶ュ憡[鏈櫥褰昡http://www.shnenglu.com/notonlysuccess/archive/2009/07/09/74168.html#89603acacThu, 09 Jul 2009 02:37:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/07/09/74168.html#89603楹葷儲璐翠笅

鍦ㄧ嚎鐙傜瓑

ac 2009-07-09 10:37 鍙戣〃璇勮
]]>
re: 鍗婂勾AC鐢熸動錛屼粎浠ユ鏂囩邯蹇礫鏈櫥褰昡http://www.shnenglu.com/notonlysuccess/archive/2009/07/07/80162.html#89480铚楃墰铚楃墰Tue, 07 Jul 2009 10:59:00 GMThttp://www.shnenglu.com/notonlysuccess/archive/2009/07/07/80162.html#89480鍏勫紵瀵笰CM鐨勭簿紲炲拰鎬佸害璁╂垜鏁僵!

铚楃墰 2009-07-07 18:59 鍙戣〃璇勮
]]>
伊人久久大香线焦AV综合影院| 国产精品久久久久久久久鸭| 精品国产婷婷久久久| 久久丝袜精品中文字幕| 久久人人添人人爽添人人片牛牛 | 99久久亚洲综合精品网站| 一级做a爰片久久毛片16| 久久这里只有精品视频99| 欧美丰满熟妇BBB久久久| 久久中文精品无码中文字幕| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 欧美亚洲国产精品久久久久| 久久精品欧美日韩精品| 久久久久婷婷| 99久久99久久| 久久丫精品国产亚洲av| 午夜视频久久久久一区| 91精品国产综合久久香蕉| 波多野结衣AV无码久久一区| 久久精品国产一区二区三区不卡| 久久久无码精品亚洲日韩按摩 | 日韩久久无码免费毛片软件| 九九久久99综合一区二区| 国产美女亚洲精品久久久综合| 久久高清一级毛片| 精品久久香蕉国产线看观看亚洲| 久久午夜福利无码1000合集| 久久九九免费高清视频| 国内精品久久久久久久涩爱| 久久r热这里有精品视频| 亚洲AV日韩精品久久久久| 亚洲精品无码久久久| 久久久不卡国产精品一区二区| 91精品国产色综久久| 99久久www免费人成精品| 久久婷婷久久一区二区三区| 久久美女人爽女人爽| 99久久国产综合精品五月天喷水 | 伊人丁香狠狠色综合久久| av无码久久久久不卡免费网站| 久久精品无码午夜福利理论片|