OK, yes, I could use other functions as well.
I just adapted the code from Cho:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char txt[1024][1024], ptn[1024][1024];
int main()
{
int M, N, Y, X, T, i;
int len, zero = 0, *nullpt = 0;
for(scanf("%d", &T); T--; )
{
scanf("%d %d\n ...
Search found 7 matches
- Thu Apr 06, 2006 3:38 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11019 - Matrix Matcher
- Replies: 43
- Views: 22748
- Thu Apr 06, 2006 1:46 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11019 - Matrix Matcher
- Replies: 43
- Views: 22748
Input format
I fear there is something wrong with the input.
I wrote a program that reads a whole matrix definition in one call to fread. But no matter if I assumed exactly one newline following the matrix size, or used gets to first read to the end of the line with the dimensions, or had scanf skip all ...
I wrote a program that reads a whole matrix definition in one call to fread. But no matter if I assumed exactly one newline following the matrix size, or used gets to first read to the end of the line with the dimensions, or had scanf skip all ...
- Thu Sep 01, 2005 3:25 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10853 - Pablito nailed a nail
- Replies: 10
- Views: 4218
- Thu May 06, 2004 10:18 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10061 - How many zero's and how many digits ?
- Replies: 43
- Views: 29191
- Wed Apr 14, 2004 6:49 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10061 - How many zero's and how many digits ?
- Replies: 43
- Views: 29191
- Wed Apr 14, 2004 6:45 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10395 - Titans in Danger
- Replies: 18
- Views: 5203
See also Topic 1866.
I also tried this simple recursion:
Result: some permutations occur several times, up to 36. Thus others must be missing.
Greetings!
I also tried this simple recursion:
Code: Select all
perm(0): output current
perm(i): perm(i-1);
for j=1 to i: swap 0 and i;
perm(i-1);
Greetings!
- Thu Mar 11, 2004 6:03 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10061 - How many zero's and how many digits ?
- Replies: 43
- Views: 29191
10061 Test case correct?
Hello!
First thing: after the following code I'm going to discuss different solution strategies, so if you want to think for yourself, please don't read on. But this code is fine to use, since it is way too slow for the judge. But it does create exact results, since it really calculates the ...
First thing: after the following code I'm going to discuss different solution strategies, so if you want to think for yourself, please don't read on. But this code is fine to use, since it is way too slow for the judge. But it does create exact results, since it really calculates the ...