Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • \$\begingroup\$ I get warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] fprintf(stderr, "ERROR: T:%d > %d \n", largestT, listN-1); \$\endgroup\$ Commented May 12, 2014 at 16:22
  • \$\begingroup\$ @Lembik I edited the source for the compiler warning & will add to my makefile. I also added a sentence on how to use at end of post. I've got a threaded version coming, but I'd like to get a performance check of unthreaded performance on your machine. \$\endgroup\$ Commented May 12, 2014 at 16:48
  • \$\begingroup\$ This code is strangely slow for me (see timings in question). How does it compare to the Java submission or the other C submission for you? \$\endgroup\$ Commented May 12, 2014 at 18:45
  • \$\begingroup\$ I think your code doesn't allow T-U = 0. I wanted to test it on the file containing only the lines 18662170 45121353 3365641 (newline) 44329255 18662170 3365641 but it returns an error. \$\endgroup\$ Commented May 12, 2014 at 20:16
  • \$\begingroup\$ @Lembik Ahh, T must be < 50M, not the number of lines of input. I corrected that and added threading. \$\endgroup\$ Commented May 13, 2014 at 7:30