08/03/26 19:15:47 9WSF5cHr
#include <stdio.h>
#include <stdlib.h>
#define P 1000
#define Q 43
void set0(char *a){
int i;
i=0;
while(i<Q){
*(a+i)=0; i++; }
}
void main(int argc,char *argv[]){
if(argc==3){
char buf[40],*mem,*p1;
int i,j,max,n1,n2,n3,n4,n5,n6;
long cnt[P];
FILE *fp;
mem=malloc(P*Q); p1=mem;
fp=fopen(argv[1],"r");
while(fgets(buf,39,fp)!=NULL){
set0(p1); i=9;
while(i<27){
j=10*(buf[i]-48)+buf[i+1]-49; *(p1+j)=1; i+=3; }
p1+=Q; }
*p1=-1; fclose(fp);