日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SRM 591 div1 275

發(fā)布時間:2024/6/14 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SRM 591 div1 275 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

  ?topcoder被Appirio收購了

  好久沒做tc,這個題目挺簡單。就是Arena里面看不到圖片,只能去tc網(wǎng)站上找題目。http://community.topcoder.com/stat?c=problem_statement&pm=12746

#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime>using namespace std;int tmp[55]; class TheTree { public:int maximumDiameter(vector <int> cnt) {int D = cnt.size(), i, j;int ans = 0, sum;for(i = 0; i < D; ++i) {for(j = i; j < D; ++j) tmp[j] = cnt[j];sum = 0;for(j = i; j < D; ++j) {if(tmp[j] != 0) {tmp[j]--;sum++;} else break;}for(j = i; j < D; ++j) {if(tmp[j] != 0) {tmp[j]--;sum++;} else break;}printf("%d\n", sum);ans = max(ans, sum);}return ans;} };<%:testing-code%> //Powered by KawigiEdit 2.1.8 (beta) modified by pivanof! View Code

?

轉(zhuǎn)載于:https://www.cnblogs.com/vongang/p/3331060.html

總結(jié)

以上是生活随笔為你收集整理的SRM 591 div1 275的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。