TÂP 3
Chương 1 Các thuật toán trên String................................................................................ 5
1.1 Xâu kí tự ............................................................................................................................... 5
1.2 Về tổ chức dữ liệu vào/ra ..................................................................................................... 6
1.3 Data ....................................................................................................................................... 6
1.4 Xâu con chung ...................................................................................................................... 8
1.5 Đoạn chung ........................................................................................................................... 9
1.6 Đoạn lặp .............................................................................................................................. 11
1.7 Từ điển ................................................................................................................................ 14
1.8 TEFI .................................................................................................................................... 17
1.9 E xiếc ................................................................................................................................... 20
Chương 2 Xử lí dãy lệnh và biểu thức ............................................................................ 23
2.1 Val ....................................................................................................................................... 23
2.2 Xâu thu gọn ........................................................................................................................ 26
2.3 Robot ................................................................................................................................... 29
2.4 Hàm nhiều biến .................................................................................................................. 33
2.5 Files ..................................................................................................................................... 38
2.6 Gen ...................................................................................................................................... 44
2.7 Tối ưu hóa chương trình ................................................................................................... 44
2.8 Mức của biểu thức ............................................................................................................. 45
2.9 Tháp .................................................................................................................................... 46
2.10 Mi trang ............................................................................................................................ 46
2.11 Xếp thẻ .............................................................................................................................. 49
2.12 Xếp xe ................................................................................................................................ 50
Chương 3 Cặp ghép ........................................................................................................ 51
3.1 Chị Hằng ............................................................................................................................. 51
3.2 Domino ................................................................................................................................ 55
3.3 Thám hiểm .......................................................................................................................... 59
3.4 Show .................................................................................................................................... 64
3.5 Cặp ghép cực đại: Chị Hằng 2 ......................................................................................... 70
Chương 4 Các phép lật và chuyển vị............................................................................... 75
4.1 Lật xâu ................................................................................................................................ 75
4.2 Lật số nguyên ..................................................................................................................... 76
4.3 Sân bay vũ trụ .................................................................................................................... 77
4.4 Cân ...................................................................................................................................... 81
4.5 Biprime ............................................................................................................................... 87
4.6 Chuyển bi ............................................................................................................................ 90
4.7 Lát nền 2 ............................................................................................................................. 94
4.8 Test .................................................................................................................................... 103
4.9 Giải mã .............................................................................................................................. 105
Chương 5 Luyện tập từ các đề thi ................................................................................. 110
5.1 Số nguyên tố cùng độ cao ................................................................................................ 110
5.2 Số nguyên tố cùng số bít 1 ............................................................................................... 112
5.3 Cắt hình ............................................................................................................................ 112
5.4 Tổng nhỏ nhất .................................................................................................................. 115
5.5 Lò cò .................................................................................................................................. 119
5.6 Chuyển tin ........................................................................................................................ 127
5.7 Mã BW .............................................................................................................................. 130
5.8 Tam giác Pascal ................................................................................................................ 134
5.9 Sơn mô hình ...................................................................................................................... 138
5.10 Nhúng mô hình ............................................................................................................... 141
5.11 Số sát sau nhị phân ........................................................................................................ 144
5.12 Hàm f(n) .......................................................................................................................... 150
5.13 Hàm h(n) ......................................................................................................................... 151
5.14 Rhythm ........................................................................................................................... 151
5.15 Cóc ................................................................................................................................... 152
5.16 Trả tiền ........................................................................................................................... 154
5.17 Game ............................................................................................................................... 156
5.18 Robots ............................................................................................................................. 160
Review + Download