Skip to content
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

solution for spoj-cot #5073

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open

Conversation

1Nigar357
Copy link
Contributor

@1Nigar357 1Nigar357 commented Jan 22, 2025

The code solution for the problem count on tree from spoj on persistent segment tree concept

Place an "x" in the corresponding checkbox if it is done or does not apply to this pull request.

  • I have tested my code.
  • I have added my solution according to the steps here.
  • I have followed the code conventions mentioned here.
    • I understand that if it is clear that I have not attempted to follow these conventions, my PR will be closed.
    • If changes are requested, I will re-request a review after addressing them.
  • I have linked this PR to any issues that it closes.

…t segment tree)

The code solution for the problem count on tree from spoj on persistent segment tree concept
@1Nigar357 1Nigar357 requested a review from dongliuu as a code owner January 22, 2025 22:36
@1Nigar357
Copy link
Contributor Author

Hi, I just submitted this pull request. Please let me know if there’s anything I need to adjust or address. Thanks!

@1Nigar357
Copy link
Contributor Author

1Nigar357 commented Jan 22, 2025

Could you please help me resolve the problem "Some checks were not successful"? Is the " '''cpp " causing the problem?

@TheGamingMousse
Copy link
Contributor

fyi, you can test ur mdx code at usaco.guide/editor

@TheGamingMousse
Copy link
Contributor

hmm, it's giving this error:

Internal solution spoj-cot isn't linked to all of its problems (see above). Did you forget to update the solution metadata of a module after adding an internal solution?

  Error:Internal solution spoj-cot isn't linked to all of its problems (see abo  ve). Did you forget to update the solution metadata of a module after adding a  n internal solution?
  
  - gatsby-node.js:1 
    /home/runner/work/usaco-guide/usaco-guide/.cache/compiled/gatsby-node.js:1:8    567
  
  - Array.forEach
  
  - gatsby-node.js:1 Object.n.createPages
    /home/runner/work/usaco-guide/usaco-guide/.cache/compiled/gatsby-node.js:1:7    973
  
  - task_queues:95 processTicksAndRejections
    node:internal/process/task_queues:95:5
  
  - api-runner-node.js:[48](https://github.com/cpinitiative/usaco-guide/actions/runs/12919237231/job/36029331675?pr=5073#step:7:49)7 runAPI
    [usaco-guide]/[gatsby]/src/utils/api-runner-node.js:487:16
  

not finished Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 13.133s
failed createPages - 0.814s

@1Nigar357
Copy link
Contributor Author

1Nigar357 commented Jan 23, 2025

I changed the solution metadata kind to internal after committing this change. I think I accidentally included it in a different pull request

@TheGamingMousse
Copy link
Contributor

TheGamingMousse commented Jan 23, 2025

I changed the solution metadata kind to internal after committing this change. I think I accidentally included it in a different pull request

yeah thats what it looks like, just change the solution type to internal

@1Nigar357
Copy link
Contributor Author

I think I solved it

Copy link
Contributor

@TheGamingMousse TheGamingMousse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some misc style changes + other

for examples of how the code should roughly look, u can look at other internal solutions (here's a good example)

1Nigar357 and others added 2 commits January 23, 2025 03:26
Co-authored-by: Justin Ji <68484800+TheGamingMousse@users.noreply.github.com>
@1Nigar357
Copy link
Contributor Author

Thank you for the suggestions! Is there anything else that you would suggest modifying?

…code)

Modified the explanation part and organized the code
@1Nigar357
Copy link
Contributor Author

I changed the code and the explanation part

1Nigar357 and others added 2 commits March 8, 2025 12:32
Changed the code according to the suggestions. Changed the format and added a constructor
@1Nigar357
Copy link
Contributor Author

1Nigar357 commented Mar 8, 2025

@SansPapyrus683 The format is automatically changed by pre-commit. Therefore, the weird formatting is caused by pre-commit

@SansPapyrus683
Copy link
Contributor

SansPapyrus683 commented Mar 8, 2025

no yeah, to fix it you need to place the comment above the line of code as opposed to it being on the same line

Moved the comments next to the code lines to a separate line
@1Nigar357
Copy link
Contributor Author

1Nigar357 commented Mar 8, 2025

@SansPapyrus683 I moved the comments to separate lines

1Nigar357 and others added 2 commits March 8, 2025 23:38
Chnaged the method name to snake_case format, changed the name of struct to pacal case, changed the name fo the strcut from graph to tree, modified the constructor,
1Nigar357 and others added 2 commits March 9, 2025 21:21
Changed the vraible names to more explanatory names
@SansPapyrus683 SansPapyrus683 changed the title Create spoj-cot.mdx (solution for the problem I added about persisten… solution for spoj-cot Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants