Search found 4 matches

by NaIx
Thu Jun 28, 2007 9:21 am
Forum: Volume 4 (400-499)
Topic: 408 - Uniform Generator
Replies: 48
Views: 9936

WA helppp

i submit my code but i'm get WA... i didn't know where the problem... so somebody help plsss..... tq


#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#define MAX 100000

long int seed[MAX];
long int temp[MAX];

int main()
{
long int step, mod, cek, i;
// freopen("in.txt","r ...
by NaIx
Wed Jun 06, 2007 3:30 am
Forum: Volume 4 (400-499)
Topic: 483 - Word Scramble
Replies: 122
Views: 38848

somebody help plzz... i got WA... i don't know why i got WA.......
#include<cstdio>
#include<cstring>
#include<cstdlib>
#define MAX 1000000

int main()
{
char kata[MAX];
long int start, end, len, i, j;
while(gets(kata))
{
len=strlen(kata);
start=end=0;
for(i=0;i<len;i++)
{
if(kata[i ...
by NaIx
Wed Jun 06, 2007 3:27 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 33320

WA... help

I submit new code but still got WA... I'm really confuse because my Dev C++ doesn't have compiler for long long int type... somebody help me... what wrong with my algorithm........
#include<cstdio>
#include<cstdlib>

int main()
{
long int N, M, C, i, j, k;
while(scanf("%ld %ld",&N,&M)==2)
{
if ...
by NaIx
Sat Jun 02, 2007 5:57 pm
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 33320

WA... need help

I don't know wjy my program WA... i'm really confuse..... somebody help plzzz...........

#include<cstdio>
#include<cstdlib>

int main()
{
long int N, M, C, i, j;
while(scanf("%ld %ld",&N,&M)==2)
{
if(N==0&&M==0) break;
else
{
if(N-M < M) M=N-M;
C=1;
for(i=N,j=1;j<=M;i--,j++)
{
C=(C*i)/j ...

Go to advanced search