diff --git a/HDOJ/Multi-University Training Contest/2017/Team 6/1003_Richard_Kiritow.cpp b/HDOJ/Multi-University Training Contest/2017/Team 6/1003_Richard_Kiritow.cpp new file mode 100644 index 0000000..0fc3431 --- /dev/null +++ b/HDOJ/Multi-University Training Contest/2017/Team 6/1003_Richard_Kiritow.cpp @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +bool cmp(const pair A, const pair B) { + if (A.first == B.first) { + return A.second < B.second; + } + else + return A.first > B.first; +} +vector> a; +int main() { + int testcases; + cin >> testcases; + while (testcases--) { + a.clear(); + int n; + cin >> n; + int temp; + for (int i = 1; i <= n; i++) { + cin >> temp; + a.push_back(make_pair(temp,i)); + } + sort(a.begin(),a.end(),cmp); + for (int i = 2; i <= n; i++) { + for (int j = 0; j < n; j++) { + if (a[j].second%i == 0) + continue; + else { + cout << a[j].first; + break; + } + } + if (i != n) + cout << ' '; + } + cout << endl; + } +} \ No newline at end of file diff --git a/HDOJ/Multi-University Training Contest/2017/Team 6/1011.cpp b/HDOJ/Multi-University Training Contest/2017/Team 6/1011.cpp new file mode 100644 index 0000000..22dec69 --- /dev/null +++ b/HDOJ/Multi-University Training Contest/2017/Team 6/1011.cpp @@ -0,0 +1,39 @@ +#include +#include +#include + +#include +using namespace std; + +int main() +{ + int t; + scanf("%d",&t); + while(t--) + { + int n; + scanf("%d",&n); + int maxtotal=-1; + for(int i=0;i