FilesSubmittedBranchesLabelsClientsUsersJobsHelp
Tree viewShow/hide recent activityInformation
Recent activity in //depot/...
2412005/11/08ksimpsonprocmail: pharma spam that sneaks past greylistd. v1agra, c1alis, 'replica watches'.
2342005/11/02zz9fast: print solve time. 0.004s. ken's main branch: 0.31s. just saying.
2272005/10/30nullbytestrip <script> out of page bodies. someone (zz9) had an XSS in FrontPage within
2192005/10/20ksimpsoniTunes 4.9 does podcasts natively now, so podgrab is officially obsolete.
2082005/09/17nullbytegreylistd 0.4: point people at a page explaining the 450 instead of just being rude
Change 234

Change 234 by zz9@zz9-imac-g4 on 2005/11/02 22:07:59

fast: print solve time. 0.004s. ken's main branch: 0.31s. just saying.
Affected files ...
//depot/projects/sudoku/fast/sudoku.c#4 edittext
Differences ...

==== //depot/projects/sudoku/fast/sudoku.c#4 (text) ====

@@ -12,6 +12,7 @@
1212#include <stdio.h>
1313#include <stdlib.h>
1414#include <string.h>
15#include <time.h>
1516
1617static int grid[9][9];
1718static long nodes = 0;
@@ -99,6 +100,7 @@
99100{
100101 FILE *f = stdin;
101102 int i;
103 clock_t t0;
102104
103105 if (argc > 1 && !(f = fopen(argv[1], "r"))) {
104106 perror(argv[1]);
@@ -112,11 +114,13 @@
112114 if (grid[i / 9][i % 9])
113115 place(i / 9, i % 9, grid[i / 9][i % 9]);
114116 }
117 t0 = clock();
115118 if (!solve(0)) {
116119 printf("no solution (are you sure you copied it right?)\n");
117120 return 1;
118121 }
119122 print_grid();
120 fprintf(stderr, "%ld nodes\n", nodes);
123 fprintf(stderr, "%ld nodes, %.3fs\n", nodes,
124 (double)(clock() - t0) / CLOCKS_PER_SEC);
121125 return 0;
122126}

P4Web/LINUX26X86/2005.1/82295 · Copyright © 1995-2005 Perforce Software · ttul.org