Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create spoj-cot.mdx (solution for the problem I added about persisten… #5073
base: master
Are you sure you want to change the base?
Create spoj-cot.mdx (solution for the problem I added about persisten… #5073
Changes from 36 commits
fe06370
53a37c1
9a8a775
997b2e1
daddec5
0ddcbd2
b872dea
1dc48cf
0b80073
6ffd62c
3a0ace6
0114d34
43ecc8c
9878da2
74478a6
cb7950b
ea05116
8933218
5f43b1e
70012c1
c205dd5
9032de1
46c28cc
af2d2e0
5427b2f
37d8141
95b3933
8c6ba59
64139d4
d13cdc7
f700aea
c60fda1
c65e0ea
a956b3b
34e2eee
122943a
336dc27
05e5cf9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap in an tag or something, you can find examples by ctrl-f ing the reop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I use Spoiler tag and give it a title note
or can I use $ \ textb f { } $
@SansPapyrus683
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im curious, is there a specific reason ur code coordinate compresses? ig it is faster, but it isn't needed for this problem
as a side note, you definitely do not need 7e6 nodes. 5e6 sufficed for me, and my range was from 0 to INT_MAX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. To avoid segmentation fault I set the number of nodes to 7e6. I changed the number of nodes to 5e6.
I used coordinate compression because the segment tree is a frequency tree and the constraint of the values isn't given in the problem statement. I used this method to ensure that there won't be a problem when building the segment tree. It also speeds up the program
I wrote the coed without the compression and it exceeded the time limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk my code was perfectly fine without coord compression lol, but ig its fine the way it is
(also, i think maybe even 2e6 or 3e6 would work because ur coord compressing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, 2e6 works