-
Notifications
You must be signed in to change notification settings - Fork 0
/
acwing.h
2129 lines (1810 loc) · 42.1 KB
/
acwing.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef PROBLEMSCPP_ACWING_H
#define PROBLEMSCPP_ACWING_H
#include <iostream>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
namespace acwing {
struct ListNode {
int val;
ListNode *next;
explicit ListNode(int x): val(x), next(nullptr) {}
};
class acwing1 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing4200 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing4201 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing608 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing604 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing606 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing609 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing615 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing616 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing653 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing4203 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing4204 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
class acwing2058 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief 时间转换
*/
class acwing654 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief 简单乘积
*/
class acwing605 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 2041. 干草堆
*/
class acwing2041 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 2060. 奶牛选美
*/
namespace acwing2060 {
class acwing2060 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
struct point {
int x;
int y;
point() = default;
point(int x, int y): x(x), y(y){};
};
struct pointhash {
size_t operator()(const point & /*p*/) const;
};
struct pointequal {
bool operator()(const point & /*p1*/, const point & /*p2*/) const;
};
void flood(point /*first*/, bool /*occupy*/[55][55],
unordered_set<point, pointhash, pointequal> * /*edge*/,
char /*cowhide*/[55][55], int /*n*/, int /*m*/);
}// namespace acwing2060
/**
* \brief AcWing 2019. 拖拉机
*/
namespace acwing2019 {
const int N = 1000;
struct point {
int x;
int y;
int step;
point(int x, int y, int step): x(x), y(y), step(step){};
};
int bfs(point /*start*/, int ** /*field*/, int /*max_x*/, int /*max_y*/);
class acwing2019 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
}// namespace acwing2019
/**
* \brief AcWing 611. 简单计算
*/
class acwing611 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 612. 球的体积
*/
class acwing612 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 2014. 岛
*/
class acwing2014 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 607. 平均数2
*/
class acwing607 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 613. 面积
*/
class acwing613 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 610. 工资和奖金
*/
class acwing610 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 614. 最大值
*/
class acwing614 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 2005. 马蹄铁
*/
class acwing2005 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
///
/// \param stage 当前阶段 ture为寻找左括号 false为寻找右括号
/// \param horseshoes 马蹄铁方格
/// \param picked 已经走过的区域
/// \param count 当前括号字符串长度
/// \param level 括号平衡情况(当前左括号的数量-右括号的数量)
/// \param x 当前横座标
/// \param y 当前纵座标
/// \param n 座标上限
/// \return 当前状态下最长完全平衡括号字符串的长度
static int dfs(bool stage, char horseshoes[5][5], const bool picked[5][5],
int count, int level, int x, int y, int n);
};
/**
* \brief AcWing 617. 距离
*/
class acwing617 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 618. 燃料消耗
*/
class acwing618 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 4206. 判断数字
class acwing4206 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 4207. 最长合法括号子序列
class acwing4207 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 4208. 电话号码
namespace acwing4208 {
/**
* \brief 字典树
*/
struct trie_node {
/**
* \brief 值
*/
int val;
/**
* \brief 父节点
*/
trie_node *father;
/**
* \brief 子节点
*/
trie_node *nexts[10]{};
trie_node(int val, trie_node *father): val(val), father(father){};
/**
* \brief 反向插入
* \param str 插入的字符串
*/
void insert(string str);
/**
* \brief 显示
*/
void display();
/**
* \brief 分支计数
* \return 分支计数
*/
int count();
};
class acwing4208 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
}// namespace acwing4208
/// \brief AcWing 1996. 打乱字母
class acwing1996 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
static bool cmp(char x, char y);
};
/// \brief AcWing 656. 钞票和硬币
class acwing656 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 655. 天数转换
class acwing655 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 665. 倍数
*/
class acwing665 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 657. 选择练习1
*/
class acwing657 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 1987. 粉刷栅栏
*/
class acwing1987 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 660. 零食
class acwing660 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 671. DDD
class acwing671 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 1978. 奶牛过马路
namespace acwing1978 {
struct path {
int a;
int b;
path(): a(0), b(0){};
path(int a, int b): a(a), b(b){};
bool operator<(const path &p) const;
};
class acwing1978 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
}// namespace acwing1978
/**
* \brief AcWing 659. 区间
*/
class acwing659 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 662. 点的坐标
*/
class acwing662 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 1969. 品种邻近
*/
class acwing1969 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 664. 三角形
*/
class acwing664 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 666. 三角形类型
*/
class acwing666 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/**
* \brief AcWing 1960. 闪烁
*/
class acwing1960 {
private:
int fsm[1 << 16] = {};
unsigned int n{};
public:
int main(istream & /*cin*/, ostream & /*cout*/);
unsigned int get_next(unsigned int status);
[[nodiscard]] bool *decompress(unsigned int status) const;
unsigned int compress(const bool * /*bulbs*/) const;
};
/// \brief AcWing 667. 游戏时间
class acwing667 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 668. 游戏时间2
class acwing668 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 1952. 金发姑娘和 N 头牛
class acwing1952 {
public:
static int main(istream & /*cin*/, ostream & /*cout*/);
};
/// \brief AcWing 669. 加薪
class acwing669 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 672. 税
class acwing672 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1945. 奶牛棒球
class acwing1945 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4209. 三元组
*/
class acwing4209 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4210. 数字
*/
class acwing4210 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4211. 序列重排
*/
class acwing4211 {
public:
static int main(istream &cin, ostream &cout);
static unsigned int no2(unsigned long long a);
static unsigned int no3(unsigned long long a);
static bool cmp(unsigned long long a, unsigned long long b);
};
/// \brief AcWing 670. 动物
class acwing670 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 663. 简单排序
class acwing633 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1934. 贝茜放慢脚步
class acwing1934 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 658. 一元二次方程公式
*/
class acwing658 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 661. 平均数3
*/
class acwing661 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 1929. 镜子田地
* \date 2022-01-18
*/
namespace acwing1929 {
/**
* \brief 方向
*/
enum direction {
/// @brief 左
left,
/// @brief 右
right,
/// @brief 上
up,
/// @brief 下
down
};
/**
* \brief 行动
*/
struct step {
/// @brief 方向
direction d;
/// @brief 横坐标
unsigned int x;
/// @brief 纵坐标
unsigned int y;
step(direction d, unsigned int x, unsigned int y): d(d), x(x), y(y){};
};
struct step_hash {
unsigned long operator()(const step & /*s*/) const;
};
struct step_equal {
bool operator()(const step & /*main*/, const step & /*tmp*/) const;
};
class Solution {
private:
/// @brief 镜子
char mirrors[1000][1000] = {0};
/// @brief 在每格向左时可以被反射的次数
unsigned int left_map[1000][1000] = {0};
/// @brief 在每格向右时可以被反射的次数
unsigned int right_map[1000][1000] = {0};
/// @brief 在每格向上时可以被反射的次数
unsigned int up_map[1000][1000] = {0};
/// @brief 在每格向下时可以被反射的次数
unsigned int down_map[1000][1000] = {0};
/// @brief 行数
unsigned short n{};
/// @brief 列数
unsigned short m{};
public:
int main(istream &cin, ostream &cout);
/**
* \brief 获取反射的次数
* \param d 方向
* \param x 横坐标
* \param y 纵坐标
* \return 在(x,y)以d方向前进的光距离离开剩下的反射次数
*/
unsigned int count_reflect(direction d, unsigned int x, unsigned int y);
/**
* \brief 获取记录类型
* \param d 方向
* \return 方向对应的记录
*/
unsigned (*get_record(direction d))[1000][1000];
};
/**
* \brief 方向经过镜子反射后的变化
* \param d 方向
* \param mirror 镜子
* \return 方向经过镜子反射后的变化
*/
direction reflect(direction d, char mirror);
/**
* \brief 取反方向
* \param d 方向
* \return d的反方向
*/
direction operator!(const direction &d);
}// namespace acwing1929
/// \brief AcWing 708. 偶数
class acwing708 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 715. 余数
class acwing715 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1922. 懒惰的牛
class acwing1922 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 709. 奇数
class acwing709 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 710. 六个奇数
class acwing710 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1913. 公平摄影
class acwing1913 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 712. 正数
*/
class acwing712 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 711. 乘法表
*/
class acwing711 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 1904. 奶牛慢跑
*/
class acwing1904 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 714. 连续奇数的和 1
class acwing714 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 718. 实验
class acwing718 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1884. COW
class acwing1884 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4212. 字符串比较
*/
class acwing4212 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4213. 最小结果
*/
class acwing4213 {
public:
static int main(istream &cin, ostream &cout);
static unsigned long long get_min(vector<char> ops,
vector<unsigned long long> vec);
};
/**
* \brief AcWing 4214. 三元组
*/
class acwing4214 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 716. 最大数和它的位置
*/
class acwing716 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 713. 区间 2
*/
class acwing713 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 721. 递增序列
*/
class acwing721 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 719. 连续奇数的和 2
*/
class acwing719 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 1875. 贝茜的报复
*/
class acwing1875 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 720. 连续整数相加
class acwing720 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 717. 简单斐波那契
class acwing717 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1855. 愤怒的奶牛
class acwing1855 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 724. 约数
class acwing724 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 722. 数字序列和它的和
class acwing722 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1843. 圆形牛棚
class acwing1843 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 723. PUM
class acwing723 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 725. 完全数
class acwing725 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1826. 农田缩减
namespace acwing1826 {
struct cmprow {
bool operator()(const pair<unsigned int, unsigned int> &left,
const pair<unsigned int, unsigned int> &right) const;
};
struct cmpcol {
bool operator()(const pair<unsigned int, unsigned int> &left,
const pair<unsigned int, unsigned int> &right) const;
};
class acwing1826 {
public:
static int main(istream &cin, ostream &cout);
};
}// namespace acwing1826
/// \brief AcWing 1813. 方块游戏
class acwing1813 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 726. 质数
class acwing726 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 727. 菱形
class acwing727 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 737. 数组替换
*/
class acwing737 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 740. 数组变换
*/
class acwing740 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 1801. 蹄子剪刀布
*/
class acwing1801 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4215. 处理字符串
*/
class acwing4215 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4216. 图中的环
*/
class acwing4216 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 4217. 机器人移动
*/
class acwing4217 {
vector<char> ops;
vector<pair<int, int>> forth;
vector<pair<int, int>> back;
unsigned int n;
int a;
int b;
public:
int main(istream &cin, ostream &cout);
[[nodiscard]] bool check(int len) const;
};
/**
* \brief AcWing 738. 数组填充
*/
class acwing738 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 741. 斐波那契数列
*/
class acwing741 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1789. 牛为什么过马路 II
class acwing1789 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 739. 数组选择
class acwing739 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 742. 最小数和它的位置
class acwing742 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 1776. 牛的基因组学
class acwing1776 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 743. 数组中的行
class acwing743 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 744. 数组中的列
class acwing744 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 1762. 牛的洗牌
*/
class acwing1762 {
public:
static int main(istream &cin, ostream &cout);
};
/**
* \brief AcWing 1750. 救生员
*/
class acwing1750 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 745. 数组的右上半部分
class acwing745 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 748. 数组的右下半部分
class acwing748 {
public:
static int main(istream &cin, ostream &cout);
};
/// \brief AcWing 747. 数组的左上半部分
class acwing747 {
public:
static int main(istream &cin, ostream &cout);
};