摘要: 104. 货仓选址 在一条数轴上有 NN 家商店,它们的坐标分别为 A1A1~ANAN。 现在需要在数轴上建立一家货仓,每天清晨,从货仓到每家商店都要运送一车商品。 为了提高效率,求把货仓建在何处,可以使得货仓到每家商店的距离之和最小。 输入格式 第一行输入整数N。 第二行N个整数A1A1~ANAN 阅读全文
posted @ 2021-01-21 20:54 冯寳寳 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 null 恢复内容结束 阅读全文
posted @ 2020-12-15 22:10 冯寳寳 阅读(229) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="ver 阅读全文
posted @ 2020-12-15 16:55 冯寳寳 阅读(461) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="ver 阅读全文
posted @ 2020-12-12 20:32 冯寳寳 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 布局代码: 1 <?xml version="1.0" encoding="utf-8"?> 2 <!--suppress ALL --> 3 <LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto" 4 android:la 阅读全文
posted @ 2020-11-27 17:54 冯寳寳 阅读(689) 评论(0) 推荐(0) 编辑
摘要: 布局XML文件 1 <LinearLayout android:layout_width="match_parent" 2 android:layout_height="match_parent" 3 xmlns:android="http://schemas.android.com/apk/res 阅读全文
posted @ 2020-11-27 10:37 冯寳寳 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1 <LinearLayout android:layout_width="fill_parent" 2 android:layout_height="fill_parent" 3 android:orientation="vertical" 4 xmlns:android="http://sche 阅读全文
posted @ 2020-11-17 16:21 冯寳寳 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 1 <LinearLayout android:layout_width="fill_parent" 2 android:layout_height="fill_parent" 3 android:orientation="vertical" 4 xmlns:android="http://sche 阅读全文
posted @ 2020-11-17 16:00 冯寳寳 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 <LinearLayout android:layout_width="fill_parent" 2 android:layout_height="fill_parent" 3 android:orientation="vertical" 4 xmlns:android="http://sche 阅读全文
posted @ 2020-11-17 15:47 冯寳寳 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 4 int f[10010]; 5 int N,V; 6 int v[1000],w[1000]; 7 8 int main() 9 { 10 cin>>N>>V; 11 for(int i=0;i<N;i+ 阅读全文
posted @ 2020-10-24 22:37 冯寳寳 阅读(148) 评论(0) 推荐(0) 编辑