Search found 5 matches

by naguib
Sat Jun 03, 2006 11:41 pm
Forum: Volume 110 (11000-11099)
Topic: 11035 - Card Hands
Replies: 12
Views: 6593

I think I missunderstood the problem would some body reword it with examples
by naguib
Tue May 30, 2006 1:13 am
Forum: Volume 110 (11000-11099)
Topic: 11035 - Card Hands
Replies: 12
Views: 6593

stupid me anyway it still gives runtime error

#include<algorithm>
#include<cstdio>
#include<list>
using namespace std;
FILE *in=stdin;//fopen("hands.in","r");
class node{public:
int i,c;
};
node arr[100009];
char cards[100009];
int hands[100009];
int cum[100009];
bool vis[55];
int n;
void err ...
by naguib
Tue May 30, 2006 12:13 am
Forum: Volume 110 (11000-11099)
Topic: 11035 - Card Hands
Replies: 12
Views: 6593

11035 - Card Hands

I get runtime error

for(i=0;i<n;i++)
{
fscanf(in,"%d",hands+i);
for(j=0;j<hands[i];j++)
{
fscanf(in,"%s",cstr);
cards[t++]=tonum(cstr);
}
}

is this a right way to read input
I checked "cstr" is some times more than 2 chars
is there problem with judge or with my code???
by naguib
Wed Oct 05, 2005 8:10 pm
Forum: Volume 101 (10100-10199)
Topic: 10139 - Factovisors
Replies: 80
Views: 42121

Accepted

I just rewrote the code and I got Accepted thx anyway
by naguib
Wed Oct 05, 2005 12:47 pm
Forum: Volume 101 (10100-10199)
Topic: 10139 - Factovisors
Replies: 80
Views: 42121

10139 Factovisors WA plz help

#include<cstdio>
#include<string>
#include<cmath>
using namespace std;
//FILE *in=fopen("fact.in","r");
bool iscom[46502];
int prime[5000];
#ifdef __GNUC__
#define longlong long long
#else
#define longlong __int64
#endif
int howfac(longlong* n,int f)
{
//return how many factor F is in n
longlong ...

Go to advanced search