HDU 2105: The Center of Gravity
The Center of Gravity
[email protected] Sycamore, ZJNU; [email protected] 8/4/2017 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int t; while (cin >> t&&t) while (t--) { double a, b, c, d, e, f; cin >> a >>b >> c >> d >> e >> f; cout << fixed << setprecision(1) << (a + c + e) / 3 << ‘ ‘ << fixed << setprecision(1) << (b + d + f) / 3 << ‘\n‘; } return 0; }
HDU 2105: The Center of Gravity
相關推薦
HDU 2105: The Center of Gravity
using int date amp pan space bit sync double The Center of Gravity[email protected]/* */ Sycamore, ZJNU; [email protected]/*
sincerit 2105 The Center of Gravity(三角形重心)
The Center of Gravity Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7178 Accepted Submissi
ACM--三角形重心--HDOJ 2105--The Center of Gravity(FOR JAVA)
Problem Description Everyone know the story that how Newton discovered the Universal Gravitation. One day, Newton walked leisurely, suddenly
HDU 3591 The trouble of Xiaoqian(多重背包+全然背包)
給他 cas 維數 color cost 代碼 01背包 size code HDU 3591 The trouble of Xiaoqian(多重背包+全然背包) http://acm.hdu.edu.cn/showproblem.php?pid=3591 題意:
hdu 5381 The sum of gcd 2015多校聯合訓練賽#8莫隊算法
names 來看 efi nbsp span ems multipl script there The sum of gcd Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K
HDU 4260(The End of The World-Hanoi塔從中間狀態移動)
ctype read finish car ann bbb over lines 遞歸 The End of The World Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/327
HDU 5542 The Battle of Chibi dp+樹狀數組
mod sizeof tac pro sum cpp case name problem 題目:http://acm.hdu.edu.cn/showproblem.php?pid=5542 題意:給你n個數,求其中上升子序列長度為m的個數 可以考慮用dp[i][j]表示
HDU 6208 The Dominator of Strings ——(青島網絡賽,AC自動機)
while using else .cn 清空 mat 一點 自動 ring 最長的才可能成為答案,那麽除了最長的以外全部insert到自動機裏,再拿最長的去match,如果match完以後cnt全被清空了,那麽這個最長串就是答案。事實上方便起見這個最長串一起丟進去也無
HDU - 2444 The Accomodation of Studentsp[二分圖判定,匈牙利算法]
inpu print string app oom set vid ans 2個 There are a group of students. Some of them may know each other, while others don‘t. For example
hdu 5381 The sum of gcd(線段樹+gcd)
const HR LV oid pac vector AR statistic modify 題目鏈接:hdu 5381 The sum of gcd 將查詢離線
hdu-1492 The number of divisors(約數) about Humble Numbers---因子數公式
AI tro -- Go hdu esp clu mat -s 題目鏈接: http://acm.hdu.edu.cn/showproblem.php?pid=1492 題目大意: 給出一個數,因子只有2 3 5 7,求這個數的因子個數 解題思路: 直接求出指數即可
HDU - 3006 The Number of set(狀態壓縮位運算)
memset scl 所有 targe oid print push out queue http://acm.hdu.edu.cn/showproblem.php?pid=3006 題意 給定n個集合,每個集合都是由大於等於1小於等於m的數字組成,m最大為14。問由給
HDU - 5542 The Battle of Chibi(LIS+樹狀數組優化)
possible ould eof namespace chan panel arm int sam The Battle of Chibi Cao Cao made up a big army and was going to invade the whole Sout
HDU-6208 The Dominator of Strings(查詢子串string)
The Dominator of Strings
HDU 4028 The time of a day (dp+離散化)
題意:給你1~n的數字,問你一個集合中的lcm大於m的集合有多少個 思路:這個題挺有意思的,我們直接的可以想到爆枚的話的複雜度有2^40,但是這些數中的lcm的答案缺不會有很多,最多也就是這40個數的lcm,所以不會有很大,那這樣的話我們用一個map來記錄dp[i]代表當前是有前i個數,對於每i個數的map
HDU 3948-The Number of Palindromes-迴文自動機
題意: 給出一個字串,求其不相同迴文子串的個數 思路: 迴文自動機模板題,因為迴文自動機中每個新建的結點就表示一個迴文子串,各個結點都不相同 所以不同迴文子串個數就是迴文自動機中新增結點個數,直接輸出即可 程式碼: #include <bits/stdc
HDU 1492 The number of divisors(約數) about Humble Numbers
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 1
HDU-2444 The Accomodation of Students
先看圖是否是二分圖,用染色來判斷即可,兩種顏色,相鄰的點染不同的顏色,沒有衝突即可 dfs染色分完之後,再用匈牙利演算法求最大匹配 #include<iostream> #include<cstdio> #include<cstring>
HDU - 5381 The sum of gcd(離線處理 + 線段樹)
題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=5381 題目大意:給出一個長度為 n 的陣列a,現在有q次詢問,每次詢問給出一個區間 [L,R],要你求出這個區間內所有子區間的gcd之和,即求。 題目思路:根據gcd的性質,以L為起點,終點小於
Mystery at the center of the Milky Way solved
Last spring, researchers published a study about the apparent presence of astonishing and dramatically high levels of three different elements in red gian