正文
增加 296 行删除 9 行
12345678965 行未改动75767778798081828311 行未改动9596979899100101102103599 行未改动全部展开703704705706707708709710229 行未改动全部展开94094194294394494594694794894995010 行未改动9619629639649659669679689699709719729739745 行未改动980981982983984985986987988989990401 行未改动全部展开13921393139413951396139713981399337 行未改动全部展开173717381739174017411742174317441745216 行未改动全部展开1962196319641965不会写前言。不过看到我们大 SC 江山辈有神人出,老身就放心了😋话不多说直接开赤吧😋😋😋欢迎在 11.14 之前向我私信投稿统计遗漏的迷惑行为,我会在 11.14 再更新一次的!也可以联系我撤下,不过要证明这是你才行。可以点个赞吗/kel/kel/kel,谢谢喵!!!65 行未改动```:::来年再战!## 出现的唯一一个 AFO```cppSC-J00087\card\card.cpp11 行未改动祝你 1=。## 大哥上楼梯SC-J02226 掏出的秘制代码::::info[代码]```cppSC-J02226\and\and.cpp599 行未改动全部展开## ⭐这里是炸鱼的整活大神**太牛了,所以我要全文放出。**:::info[代码]```cppSC-J02089\travel\travel.cpp229 行未改动全部展开//今年 T4 怎么这么简单啊```:::## 我要上电视SC-J01823 老师,你成功了!:::info[代码]```cppSC-J01823\card\card.cpp10 行未改动*/```:::虽然很可惜,因为没有那么多的时间和精力,我只统计了 J 组。## 魔怔人SC-J01797 在 T4 贴了 671 句 `@double_bird 我喜欢你喵!`😨## 区神:::info[代码]```cpp5 行未改动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!!!*/```:::## 不知道写什么标题:::info[代码]```cppSC-J01781\*\*.cpp401 行未改动全部展开#endif /* _STL_ITERATOR_BASE_TYPES_H */```:::## 那你也进来吧:::info[代码]```cpp337 行未改动全部展开*/```:::## ?!宇宙冷漠!?:::info[代码]```cppSC-J01694216 行未改动全部展开写了后面 3 个题的对拍,然后就没事干了,上了 3 次厕所,炫完了一袋甘蔗,出考场已经饱了*/```:::1234567891011121365 行未改动79808182838485868711 行未改动99100101102103104105106107599 行未改动全部展开707708709710711712713714715716229 行未改动全部展开94694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597610 行未改动9879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711585 行未改动11641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219401 行未改动全部展开16211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682337 行未改动全部展开202020212022202320242025202620272028216 行未改动全部展开22452246224722482249225022512252:::info[声明]{open}本文由 人类 生成!:::不会写前言。不过看到我们大 SC 江山辈有神人出,老身就放心了😋话不多说直接开赤吧😋😋😋欢迎在 11.21 之前向我私信投稿统计遗漏的迷惑行为,我会在 11.21 再更新一次的!也可以联系我撤下,不过要证明这是你才行。可以点个赞吗/kel/kel/kel,谢谢喵!!!65 行未改动```:::来年再战!## 出现的唯一一个 AFO 子串```cppSC-J00087\card\card.cpp11 行未改动祝你 1=。## 大哥上楼梯SC-J02226 秘制代码::::info[代码]```cppSC-J02226\and\and.cpp599 行未改动全部展开## ⭐这里是炸鱼的整活大神**太牛了,所以我要全文放出。**(注意:顺序对应没有错误。):::info[代码]```cppSC-J02089\travel\travel.cpp229 行未改动全部展开//今年 T4 怎么这么简单啊```:::我常常乘坐高铁。我常常修改字串。我常常选数运算。我常常游玩卡牌。我常常合成水晶。我常常乘坐地铁。我常常观察候鸟。我常常建造基地。## frein(travel.in,stdin);SC-J01655 的所有题目均使用了```frein(xxx.in,stdin);freout(xxx.out,stdout);```当文件读写。## 我要上电视SC-J01823 老师,你上电视了!:::info[代码]```cppSC-J01823\card\card.cpp10 行未改动*/```:::虽然因为没有那么多的时间和精力,很可惜我只统计了 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 我喜欢你喵!`😨是不是有点重力了😨## 区神:::info[代码]```cpp5 行未改动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 */```:::## 哒↘哒↗哒↘哒↗哒↘,好想玩原神😨:::info[代码]```cppSC-J01781\*\*.cpp401 行未改动全部展开#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-J01694216 行未改动全部展开写了后面 3 个题的对拍,然后就没事干了,上了 3 次厕所,炫完了一袋甘蔗,出考场已经饱了*/```:::---作者翻到这么多已经力竭了😵,即将去耍起,大家如果有没上的猎奇小代码一定要给我,我也很想看🧐🧐🧐