首页 媒体聚焦 > 正文

台州阿才_台州acm-环球快讯

2023-02-17 13:05:45 来源:互联网


(相关资料图)

1、sort(opponent.begin(), opponent.end()); #include #include #include using namespace std;int main(){int N;while (cin >> N && N){int speech;vectoryuanzi;vectoropponent;int i;for (i = 0; i < N; ++i){cin >> speech;yuanzi.push_back(speech);}for (i = 0; i < N; ++i){cin >> speech;opponent.push_back(speech);}sort(yuanzi.begin(), yuanzi.end());sort(opponent.begin(), opponent.end());int x = 0;int ys = 0, ye = N-1, os = 0, oe = N-1;while(ys<=ye){if(yuanzi[ye] > opponent[oe]){ye--;x++;}else{ys++;}oe--;}if (x > N/2)cout << "YES" << endl;elsecout << "NO" << endl;}return 0;}。

本文分享完毕,希望对大家有所帮助。

标签: return
x 广告
x 广告

Copyright   2015-2022 人人体育网版权所有  备案号:粤ICP备18023326号-36   联系邮箱:8557298@qq.com