| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:为什么一定要拆牛?将食物放左,牛放中间,水放右边为什么不能AC求指教???In Reply To:为什么一定要拆牛?将食物放左,牛放中间,水放右边为什么不能AC求指教??? Posted by:X2nes at 2011-08-12 15:52:39 WA了之后打印出矩阵我才看出来这么做是错的。。
比如只有1条牛,1 2 两种食物,1 2两种水
那图会是下边那样的
食物1 食物2
| |
| |
-----> 牛 <----
/ \
/ \
水1<--| |-------> 水2
对应的输入数据是
1 2 2
2 2 1 2 1 2
这时候就真的2了WA了
拆成下边那样就没事了
食物1 食物2
| |
| |
--> 牛1<------
/
/
\
|-->还是牛1
/ \
/ \
水1<--| |-----> 水2
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator