Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8790793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:44:56+00:00 2026-06-13T22:44:56+00:00

UPDATE Hm, I have an update. Apparently my huge array of unsigned long long

  • 0

UPDATE
Hm, I have an update. Apparently my huge array of “unsigned long long fhash[105][100555]” was not getting initialized to zero automatically in vC++… It worked when I did = {0}. Isn’t it supposed to initialize automatically?

I’m doing contest programming, and I usually compile with g++ at school/ideone etc… but I have to use a VC++ 2010 compiler.

That said, I have code to do polynomial rolling hashing (like used in Rabin-Karp), but do these overflow differently on these compilers?

Code is here: http://pastebin.com/UFdpwHCt (hashing is around line 67)

Output is here: https://i.stack.imgur.com/03Np0.png

How come “bhash” is equal between the two compilers, but “fhash” isn’t? They are hashed using the same method… In the G++-3 output, the “fhash” and “bhash” outputs are the same (they are supposed to be) but in the VC++-10 output the “fhash” and “bhash” aren’t the same…

I’m using the overflow to let it mod itself naturally, to speed up execution, instead of explicitly modding it with a large prime.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:44:57+00:00Added an answer on June 13, 2026 at 10:44 pm

    Wasn’t an issue. the issue was that it wasn’t getting initialized to zero. fixed it using memset.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to update different server data which takes huge time. I have to
I have an object that is apparently randomly getting set to an id of
So apparently Microsoft does not have a Months Enum on their Date structure. What
Update: Apparently Tomcat, starting with 7.0.11, closes the DataSource for you, so it's not
Update I have just tried Pinning my site to the Taskbar again (after removing
UPDATE I have updated my code in response to @MichaelRushton comments. I am now
UPDATE: I have somewhat resolved the issue. Just in case if anyone runs in
UPDATE - I have fixed some mistakes in the code below and the images
I have update panel that content check box, textbox, 3 DropDownList with CascadingDropDown extender.
I have scenario, I have two update panels on the page (both have update

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.