團隊賽 (第九周)

2021-08-30 08:52:44 字數 1168 閱讀 3350

a and then there was 5

d dating on-line

h hotel rewards a

題意:給出4個數,兩個乙個組合,求最小的差距。

思路:直接排序,中間兩個一組,兩邊一組,這樣差最小。

注意:一定是正數。

input

4 7 10 20

0 0 1 1000

1 2 3 4

output

7999

0

#include #include#include#include#include#include#includeusing namespace std;

int main()

}

d

題意:將延伸出去的最大邊連起來,求最大面積。

思路:分成n個三角形,根據面積公式求加和。s=1/2sin(a)bc,其中a是角度(弧度制),要想面積最大,首先角度要平均,所以角度已知,a=360/n,主要是求所有bc和的最大值。

注意:錯誤主要是精度不準確

sample input

610 60 70 70 80 80

3100 100 100

716 37 50 35 12 39 24

sample output

10002.593

12990.381

2772.765

#include #include #include #include #include #include #include #include #include #include using namespace std;

typedef long long ll;

#define inf 0x3f3f3f3f

#define pi acos(-1)

const int aa=4e5+7;

mapm;

mapn;

double a[100101];

dequeq;

bool cmp(double s,double ss)

while(q.size()>0)

cout<}

return 0;

}

(第九周)團隊專案12

專案名 食物鏈教學工具 組名 奮鬥吧兄弟 組長 黃興 組員 李俞寰 杜橋 欒驕陽 王東涵 ssh git git.coding.net li yuhuan foodchain.git scrum會議 地點 冬華樓一樓大廳 會議內容 已完成的內容 1 解決統計食物鏈時,會出現重複的問題。2 完成最長最...

606第九周週六賽 A 免費餡餅

a 免費餡餅 time limit 1000msmemory limit 32768kb64bit io format i64d i64u submit status practice hdu 1176 description 都說天上不會掉餡餅,但有一天gameboy正走在回家的小徑上,忽然天上掉...

第九周 工資

設計乙個工資類 salary 其中的資料成員包括職工人數 number,人數不定 和number個職工的工資salary,要求輸入職工工資並逐個輸出。class salary 下面定義類的成員函式 下面是測試函式 int main 答案 includeusing namespace std clas...