HDU 6343.Problem L. Graph Theory Homework-数学 (2018 Multi-University Training Contest 4 1012)
生活随笔
收集整理的这篇文章主要介绍了
HDU 6343.Problem L. Graph Theory Homework-数学 (2018 Multi-University Training Contest 4 1012)
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
6343.Problem L. Graph Theory Homework
官方题解:
一篇写的很好的博客:
HDU 6343 - Problem L. Graph Theory Homework - [(伪装成图论题的)简单数学题]
代码:
1 //1012-6343-数学 2 #include<iostream> 3 #include<cstdio> 4 #include<cstring> 5 #include<algorithm> 6 #include<bitset> 7 #include<cassert> 8 #include<cctype> 9 #include<cmath> 10 #include<cstdlib> 11 #include<ctime> 12 #include<deque> 13 #include<iomanip> 14 #include<list> 15 #include<map> 16 #include<queue> 17 #include<set> 18 #include<stack> 19 #include<vector> 20 using namespace std; 21 typedef long long ll; 22 23 const double PI=acos(-1.0); 24 const double eps=1e-6; 25 const ll mod=1e9+7; 26 const int inf=0x3f3f3f3f; 27 const int maxn=1e5+10; 28 #define ios ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); 29 30 int a[maxn]; 31 32 int main() 33 { 34 int t; 35 cin>>t; 36 while(t--){ 37 int n; 38 cin>>n; 39 for(int i=1;i<=n;i++) 40 cin>>a[i]; 41 int ans=floor(sqrt(abs(a[1]-a[n]))); 42 cout<<ans<<endl; 43 } 44 }
滚了。。。
转载于:https://www.cnblogs.com/ZERO-/p/9469324.html
总结
以上是生活随笔为你收集整理的HDU 6343.Problem L. Graph Theory Homework-数学 (2018 Multi-University Training Contest 4 1012)的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 华为鸿蒙会议安排,2020华为HDC日程
- 下一篇: java gb28181网关_视频网关G