From 03ff5f65b697b81a2e80864fef559964aa368ae0 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sat, 3 Aug 2024 14:05:21 +0800 Subject: [PATCH] fix code --- day2/U111091/U111091.cpp | 4 +- day2/U111091/chat | Bin 0 -> 46400 bytes day2/U111091/chat.cpp | 114 +++++++++++++++++++++++++++++++++++++++ day2/U111091/out.txt | 10 ++-- day2/U458258/chat | Bin 0 -> 37408 bytes day2/U458258/chat.cpp | 2 +- 6 files changed, 121 insertions(+), 9 deletions(-) create mode 100755 day2/U111091/chat create mode 100644 day2/U111091/chat.cpp create mode 100755 day2/U458258/chat diff --git a/day2/U111091/U111091.cpp b/day2/U111091/U111091.cpp index 9a65c01..fcb7cd5 100644 --- a/day2/U111091/U111091.cpp +++ b/day2/U111091/U111091.cpp @@ -2,7 +2,7 @@ using namespace std; #define int long long -const int MAX_N = 5'0000+5; +const int MAX_N = 10'0005; int times; int x[MAX_N]; @@ -106,8 +106,6 @@ signed main(){ } cout<<"\n"; */ - - } } \ No newline at end of file diff --git a/day2/U111091/chat b/day2/U111091/chat new file mode 100755 index 0000000000000000000000000000000000000000..0ba0b26b2da61e68d3730d464ee87d8f0ad628d1 GIT binary patch literal 46400 zcmeHweSDPFmH(4Bh_8tjU8+`6YZXM(OcF4NF99+-k++zDrB-|xCPOls%*4qALJKw} z;xdj|Q$Ju?%PMu*mUXSmT5DOWH3~Xdt&K0WRBcTa?XYN!NZ4~=bm%!z2}~L?m6e)=b4#rc;{SPSWsZ-tH`*}piJwM(d!ieRb9IaGhwOVivX$Kc)G~}Pf=(?LoFdes+aHDevG1MXq2lm z)hnS}DZAm?TE(ZKrd$0rDZ1f;m;ZypYv`;;y4l#N=o?pOLPN&g&O(7Ea*?{I-d3r% zRqAP2F8b6^>yvas|Lde(H>?MZu6q7!818z#QqK(=gkMAIgRYj>W33;jzb2`-Nc8B2 z3#0=Lb$^$k9_i&!FHxt_EdAx1hj!7YhT6`))Dc=bwf0LLt><)v!acp`^wv#1XK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9SHSu^LHc)(Q`dK|U$FD#gsv`_zFqq78mIW_V-iQ;zaF<97vZ$*ic|faxK_bQ ZXF9Rj{+G- +#include +#include +#include +#include + +using namespace std; + +long long calculateInitialDirtLength(int n, const vector& x, const string& road_types) { + long long dirt_length = 0; + int start = -1; + + for (int i = 0; i < n - 1; ++i) { + if (road_types[i] == '1') { + if (start == -1) start = i; + } else { + if (start != -1) { + dirt_length += x[i + 1] - x[start]; + start = -1; + } + } + } + + if (start != -1) { + dirt_length += x[n - 1] - x[start]; + } + + return dirt_length; +} + +long long getMaxReduction(const vector>& dirt_segments, int m) { + long long max_reduction = 0; + int l = 0, n = dirt_segments.size(); + vector prefix_sums(n + 1, 0); + + for (int i = 0; i < n; ++i) { + prefix_sums[i + 1] = prefix_sums[i] + dirt_segments[i].second - dirt_segments[i].first; + } + + for (int r = 0; r < n; ++r) { + while (dirt_segments[r].second - dirt_segments[l].first > m) { + ++l; + } + long long current_reduction = prefix_sums[r + 1] - prefix_sums[l]; + long long total_length = dirt_segments[r].second - dirt_segments[l].first; + if (total_length > m) { + current_reduction -= (total_length - m); + } + max_reduction = max(max_reduction, current_reduction); + } + + return max_reduction; +} + +long long solveCase(int n, int k, int m, const vector& x, const string& road_types) { + long long initial_dirt_length = calculateInitialDirtLength(n, x, road_types); + + vector> dirt_segments; + int start = -1; + + for (int i = 0; i < n - 1; ++i) { + if (road_types[i] == '1') { + if (start == -1) start = i; + } else { + if (start != -1) { + dirt_segments.emplace_back(start, i); + start = -1; + } + } + } + + if (start != -1) { + dirt_segments.emplace_back(start, n - 1); + } + + if (k == 1) { + return initial_dirt_length - getMaxReduction(dirt_segments, m); + } + + long long best = 0; + for (int i = 0; i < dirt_segments.size(); ++i) { + auto first_segment = dirt_segments[i]; + vector> temp_segments; + for (int j = 0; j < dirt_segments.size(); ++j) { + if (j != i) temp_segments.push_back(dirt_segments[j]); + } + long long first_reduction = getMaxReduction(vector>{first_segment}, m); + long long second_reduction = getMaxReduction(temp_segments, m); + best = max(best, first_reduction + second_reduction); + } + + return initial_dirt_length - best; +} + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int T; + cin >> T; + + while (T--) { + int n, k, m; + cin >> n >> k >> m; + vector x(n); + for (int i = 0; i < n; ++i) cin >> x[i]; + string road_types; + cin >> road_types; + + cout << solveCase(n, k, m, x, road_types) << endl; + } + + return 0; +} diff --git a/day2/U111091/out.txt b/day2/U111091/out.txt index fdbf38c..99c99e3 100644 --- a/day2/U111091/out.txt +++ b/day2/U111091/out.txt @@ -1,5 +1,5 @@ -54 -72 -0 -1 -0 +78 +92 +82 +92 +46 diff --git a/day2/U458258/chat b/day2/U458258/chat new file mode 100755 index 0000000000000000000000000000000000000000..4db81e045fd01ccb94d11c815784f64f01f2f0c0 GIT binary patch literal 37408 zcmeHw3w%`7wf9Lv1QkiN*mCi~h^Ry$CLtmZEyH8*L=uPzC@Od|Bm;~llXNnH;H%Mq zGRD}{50%?`ZE9cKUfa^v_DikOAeKSv)lmJATD_)L+u>0~i#4_CeE+rf+Goz3%*4m- z@AuvB_sfCFI(x0P*Is+=wbtHe&pC6x>?>cCot0(iBggonL8bnDh4BiZ=1w^Q@ES9X zlkj(fai(z`$|D%3=w1atRmXwsR5(iTIe=7e9G#?rrz^Cfq1KQf)ys6$oTw-o8qyD{ zmrEomyWy;fs-A|LZnx)Ebh~3xe)VL9*U(vyY_n~ZqHk+Rh1xEYSt-y&FESU^+b;FC zOFa$q#hw~!dy-A)GgIv8hF;L<@bX{7aMx>FST)FZom(nAk(m9&>>9M*|FHPn7~L49!bjM5A0>!#HQLoKb-T4&CfHlwt# zxv{W>RUo~J@S)+mbjflfyUpk&oUWf`WTlj|r3@B6h<7YL)Lp87wH2B>Vb#qK9r*qC zU)pEY_MJC#|8vAc{UDjdLkHpLqYqM_Ezxz=* z#fgyfJ0Ngk8vLyp_!nisZ^(eJ%Ybh|yXo{fD+B(%40vA#d}D@of1LqemqE^38TdzM z;HPo);Nw1)XW$1qE&tRE_{FG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2@jKaE&AvB?2B&;a7vT6=ChEfU^XoyxnRgkl$`iN1;7aN6z-^P8~Gc22j!W#N-8)yL(i6Ak6-W}zxxyMPn=UTP#hy8cY5ub~$- z=YiXdQjQrYIqSDdeGT>f6S~p}eIk&)Uvt){x1!Rap@&P!KkoWhg7i1sORV+R_g8Bu zU&9;6i3qp;e&BIyjop8J|FwqsBA9d}JL~%RdXEqKzLiwg?d$uwHPrWSEAGMe{}Kpv zue7eO?~m3{z81Ch*L)h%_rrAWwJz)XuQlwGhDm?YQ|m8iqZ21&Q(a%*|E-~iI*r3^ zKi&WPL8JQfi3x|kpIk$I|2fsCI=X#b|C_*36I#A~A5cD!IOH}@Rlr~O_&)%gv%W{_ zY1nJmR3}2VoB5ure!nnixcID80lL1%{=ijV-LXh^>;=RDl)KLw(*{*DETTf=Tw2i)yH@2X#UxvH<>S5(pdOKmxi zH&CGOXWYD(@0$S%_>X5A_eTfT5k>M)w9m}`uUBx)NitDsuNvL!?CXV`hKkyHHu%y znHHn#>GF8gC!E$_-_O)kqd2_Uv7~}mpav79eRn@~eRup)U+Hi{R})O{s$pRC(%|Aa u10URyY1?1->v-U_?l`rNN-^A@HKR~;yPEN2oTRINQB-kEc2#f{jsFW2)vHAS literal 0 HcmV?d00001 diff --git a/day2/U458258/chat.cpp b/day2/U458258/chat.cpp index 2858136..e68ac2c 100644 --- a/day2/U458258/chat.cpp +++ b/day2/U458258/chat.cpp @@ -1,7 +1,7 @@ #include #include -const int MOD = 1000000007; +const int MOD = 10'0000'0007; // 快速幂计算 long long mod_pow(long long base, long long exp, long long mod) {