正文
增加 269 行删除 2 行
4 行未改动5678910111213693 行未改动全部展开707708709710711712713714239 行未改动全部展开95495595695795895996096115 行未改动97797897998098198298398411 行未改动9969979989991000100110021003404 行未改动全部展开14081409141014111412141314141415337 行未改动全部展开175317541755175617571758175917601761224 行未改动全部展开4 行未改动不会写前言。不过看到我们大 SC 江山辈有神人出,老身就放心了😋话不多说直接开赤吧😋😋😋欢迎在 11.14 之前向我私信投稿统计遗漏的迷惑行为,我会在 11.14 再更新一次的!也可以联系我撤下,不过要证明这是你才行。可以点个赞吗/kel/kel/kel,谢谢喵!!!693 行未改动全部展开## ⭐这里是炸鱼的整活大神**太牛了,所以我要全文放出。**:::info[代码]```cppSC-J02089\travel\travel.cpp239 行未改动全部展开我常常乘坐地铁。我常常观察候鸟。我常常建造基地。## 我要上电视SC-J01823 老师,你上电视了!15 行未改动:::虽然因为没有那么多的时间和精力,很可惜我只统计了 J 组,不过这说明你能同时进两篇迷惑行为大赏了🤓## 公开处刑(?)SC-J01797 在 T4 贴了 $\color{red}671$ 句 `@double_bird 我喜欢你喵!`😨11 行未改动Although I have much power , but I can't find any data can hack it.(Well ,the true is,I'm too lazy)Q : Do you know who am I ? A : I'm the god of qu!!!*/```:::## 哒↘哒↗哒↘哒↗哒↘,好想玩原神😨404 行未改动全部展开#endif /* _STL_ITERATOR_BASE_TYPES_H */```:::## 那你也进来吧:::info[代码]```cpp337 行未改动全部展开*/```:::## ?!宇宙冷漠!?:::info[代码]```cppSC-J01694224 行未改动全部展开4 行未改动5678910111213693 行未改动全部展开707708709710711712713714715716239 行未改动全部展开95695795895996096196296396496596696796896997097197297315 行未改动98999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211 行未改动11641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216404 行未改动全部展开16211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682337 行未改动全部展开202020212022202320242025202620272028224 行未改动全部展开4 行未改动不会写前言。不过看到我们大 SC 江山辈有神人出,老身就放心了😋话不多说直接开赤吧😋😋😋欢迎在 11.21 之前向我私信投稿统计遗漏的迷惑行为,我会在 11.21 再更新一次的!也可以联系我撤下,不过要证明这是你才行。可以点个赞吗/kel/kel/kel,谢谢喵!!!693 行未改动全部展开## ⭐这里是炸鱼的整活大神**太牛了,所以我要全文放出。**(注意:顺序对应没有错误。):::info[代码]```cppSC-J02089\travel\travel.cpp239 行未改动全部展开我常常乘坐地铁。我常常观察候鸟。我常常建造基地。## frein(travel.in,stdin);SC-J01655 的所有题目均使用了```frein(xxx.in,stdin);freout(xxx.out,stdout);```当文件读写。## 我要上电视SC-J01823 老师,你上电视了!15 行未改动:::虽然因为没有那么多的时间和精力,很可惜我只统计了 J 组,不过这说明你能同时进两篇迷惑行为大赏了🤓## \_\_attribute\_\_((always_inline))>:>我是 SC-J01677,我想上电视>能满足我吗喵终于看到有人在正赛写这个(指 `__attribute__((always_inline)) inline`)了,感动。:::info[代码]```cppSC-J01677\string\string.cpp/*Author: kkksc98关注 kkksc98 谢谢喵*/#include <bits/stdc++.h>#define int long long#define inl_force __attribute__((always_inline)) inline#define rep(i, a, b) for (int i = (a); i <= (b); ++i)#define per(i, a, b) for (int i = (a); i >= (b); --i)using namespace std;template<typename Tp> inl_force Tp input() {int x = 0;int f = 1;char ch = getchar();while (!isdigit(ch)) {if (ch == EOF) return 0;if (ch == '-') f = -1;ch = getchar();}while (isdigit(ch)) {x = (x << 3) + (x << 1) + (ch - '0');ch = getchar();}return x * f;}template<typename Tp> inline void output(Tp x) {if (x < 0) x = -x, putchar('-');if (x > 9) output(x / 10);putchar(x % 10 + '0');}const int N = 2e5 + 5;int n, ans, sum, id_L, id_R, a[N];char c[N];struct Segment {int cnt;char c;} L[N], R[N];inl_force void solve() {int now_sum = 0;int LIM = (sum >> 1);rep(i, 1, n) {if (now_sum + a[i] >= LIM) {L[++id_L].cnt = LIM - now_sum;L[id_L].c = c[i];a[i] -= (LIM - now_sum);now_sum = LIM;break;} else {L[++id_L].cnt = a[i];L[id_L].c = c[i];now_sum += a[i];a[i] = 0;}}per(i, n, 1) {if (a[i] == 0) break;R[++id_R].cnt = a[i];R[id_R].c = c[i];a[i] = 0;}for (int i = 1, j = 1; i <= id_L && j <= id_R; ++i) {while (L[i].cnt > 0) {if (L[i].cnt >= R[j].cnt) {if (L[i].c != R[j].c) ans += R[j].cnt;L[i].cnt -= R[j++].cnt;} else {if (L[i].c != R[j].c) ans += L[i].cnt;R[j].cnt -= L[i].cnt;L[i].cnt = 0;}}}return ;}inl_force void solve_now() {int now_sum = 0;int LIM = (sum >> 1);rep(i, 1, n) {if (now_sum + a[i] > LIM) {L[++id_L].cnt = LIM - now_sum;L[id_L].c = c[i];a[i] -= ((LIM - now_sum) + 1);now_sum = LIM;break;} else if (now_sum + a[i] == LIM) {L[++id_L].cnt = LIM - now_sum;L[id_L].c = c[i];a[i] -= (LIM - now_sum);--a[i + 1];break;} else {L[++id_L].cnt = a[i];L[id_L].c = c[i];now_sum += a[i];a[i] = 0;}}per(i, n, 1) {if (a[i] == 0) break;R[++id_R].cnt = a[i];R[id_R].c = c[i];a[i] = 0;}for (int i = 1, j = 1; i <= id_L && j <= id_R; ++i) {while (L[i].cnt > 0 && j <= id_R) {if (L[i].cnt >= R[j].cnt) {if (L[i].c != R[j].c) ans += R[j].cnt;L[i].cnt -= R[j++].cnt;} else {if (L[i].c != R[j].c) ans += L[i].cnt;R[j].cnt -= L[i].cnt;L[i].cnt = 0;}}}return ;}signed main() {freopen("string.in", "r", stdin);freopen("string.out", "w", stdout);n = input<int>();rep(i, 1, n) {a[i] = input<int>();c[i] = getchar();sum += a[i];}if (sum % 2 == 0) solve();else solve_now();output(ans);return 0;}/*09:12 写完准备测样例09:16 样例 WA 了09:24 重新写完09:27 样例 3 WA 了09:28 重测样例09:30 样例通过*/```:::虽然但是为啥写了这么长。## 公开处刑(?)SC-J01797 在 T4 贴了 $\color{red}671$ 句 `@double_bird 我喜欢你喵!`😨11 行未改动Although I have much power , but I can't find any data can hack it.(Well ,the true is,I'm too lazy)Q : Do you know who am I ? A : I'm the god of qu!!!*/``````cppSC-J02114\card\card.cpp.../*I've been running in the strange lifechasing all the green lightsthrowing of the shade for a little bit sun shineqi dai ananta qwq , hate wang yi's yun ying.*//*I'm very angry!!!Becase the jian kan guan(an old man)doesn't allow me to paly the game(the little dinosaur/xiao kong long)(surfing/chong lang).*//* I don't know the correct code of the forth question *//* I'm the king of qu. *//* shi jie quan ju zhong , huan ying lai dao xin ai li du *//* en ne ~ , en ne wa da, en ne en ne ! *//*bu shu yu zhe ge shi dai de yu zhehui wu zhi shang de wei da zhu zaizhi zhang hao yun de huang hei zhi wangnin zhong cheng de xin tu xiang nin qi qiu hao yunke wang nin bao you wo na dao j1= s1=hui hu po , jiang li liang chuan di gei wo de zhou wenkang nai xin , jiang li liang chuan di gei wo de zhou wenzan mei yu zhe*//* a!~ zhe yang shou zhen TM gou jing */```:::## 哒↘哒↗哒↘哒↗哒↘,好想玩原神😨404 行未改动全部展开#endif /* _STL_ITERATOR_BASE_TYPES_H */```:::## 这是什么做法大哥你枚举所有情况枚举成 ABCDE 了/xk:::info[代码]```cppSC-J01111\travel\travel.cpp#include <bits/stdc++.h>#define ll long long#define rep(i, j, k) for (int i = j; i <= k; i++)#define dow(i, j, k) for (int i = j; i >= k; i--)std::string s1, s2, c1, c2;std::map < std::pair < std::string, std::string >, bool > ans[5];signed main() {// freopen("travel6.in", "r", stdin);freopen("travel.in", "r", stdin);freopen("travel.out", "w", stdout);ans[1][{"00", "00"}] = 1;ans[1][{"01", "01"}] = 1;ans[1][{"02", "02"}] = 1;ans[1][{"03", "03"}] = 1;ans[1][{"04", "04"}] = 1;ans[1][{"05", "05"}] = 1;ans[1][{"06", "06"}] = 1;ans[1][{"07", "07"}] = 1;ans[1][{"08", "08"}] = 1;ans[1][{"09", "09"}] = 1;ans[1][{"10", "10"}] = 1;ans[1][{"11", "11"}] = 1;ans[1][{"12", "12"}] = 1;ans[1][{"13", "13"}] = 1;ans[1][{"14", "14"}] = 1;ans[1][{"15", "15"}] = 1;ans[1][{"16", "16"}] = 1;ans[1][{"17", "17"}] = 1;ans[1][{"18", "18"}] = 1;ans[1][{"19", "19"}] = 1;ans[2][{"00A", "00A"}] = 1;ans[2][{"00A", "00B"}] = 1;ans[2][{"00A", "00C"}] = 1;ans[2][{"00A", "00D"}] = 1;ans[2][{"00A", "00E"}] = 1;ans[2][{"00B", "00A"}] = 1;ans[2][{"00B", "00B"}] = 1;ans[2][{"00B", "00C"}] = 1;ans[2][{"00B", "00D"}] = 1;...```:::## 那你也进来吧:::info[代码]```cpp337 行未改动全部展开*/```:::## 宇宙冷漠这张牌我是非常了解的,:::info[代码]```cppSC-J01694224 行未改动全部展开