Educational Segment Tree Contest - ITDS1
View as PDF
Submit solution
Points:
0.04
Time limit:
3.0s
Memory limit:
256M
Input:
stdin
Output:
stdout
Problem source:
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch
Comments
ai dùng ms thì thay đổi kích thước mảng là ok nhé
This comment is hidden due to too much negative feedback. Show it anyway.
Map nhanh hơn do lưu trùng lặp sẽ chuyển thành đếm tần suất, bài toán quan tâm đến giá trị nên sẽ rất nhanh
dùng map thay multiset là AC
Các bạn có thể xem hướng dẫn chi tiết trên Wiki của VNOI, rất dễ hiểu và dễ cài đặt: https://wiki.vnoi.info/algo/data-structures/segment-tree-basic.md ví dụ 3
Thay multiset thành map nó chạy max 2,5s :))
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
này làm sao viết hàm build v mn
merge sort tree
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
VanvatthuaFuxuan
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
Cmt này spoil thuật!