I've tried to keep track of the value, but got Runtime Error.. :(
but I don't have any idea why?? can someone help? Thanks! :)
[cpp]
#include<stdio.h>
#define NUMS 102
#define NUMS2 64001
int p,found[NUMS],num[NUMS],target,foundans;
char used[NUMS][NUMS2];
void dig(int n,int res)
{
int i;
if ...
Search found 8 matches
- Wed Jun 18, 2003 2:30 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10400 - Game Show Math
- Replies: 32
- Views: 23197
- Sun Jun 15, 2003 5:59 pm
- Forum: Volume 4 (400-499)
- Topic: 492 - Pig-Latin
- Replies: 213
- Views: 49424
- Tue Jun 03, 2003 5:48 pm
- Forum: Volume 5 (500-599)
- Topic: 598 - Bundling Newspapers
- Replies: 25
- Views: 12045
598 - Bundling Newspapers
This is my code, but I don't know why I get Runtime Error(SIGSEGV) :(
Can someone help me? Thanks!
[cpp]
#include<stdio.h>
#include<string.h>
int used[14],found[14],totalnum=0,k;
char name[14][35];
void dig(int n)
{
int i;
if (n==k+1)
{
printf("%s",name[found[1]]);
for (i=2;i<=k;i++) printf ...
Can someone help me? Thanks!
[cpp]
#include<stdio.h>
#include<string.h>
int used[14],found[14],totalnum=0,k;
char name[14][35];
void dig(int n)
{
int i;
if (n==k+1)
{
printf("%s",name[found[1]]);
for (i=2;i<=k;i++) printf ...
- Sun Jun 01, 2003 7:15 am
- Forum: Volume 102 (10200-10299)
- Topic: 10285 - Longest Run on a Snowboard
- Replies: 10
- Views: 9312
- Fri May 30, 2003 7:02 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10285 - Longest Run on a Snowboard
- Replies: 10
- Views: 9312
10285 - Longest Run on a Snowboard
I don't know why I get Wrong Answer with Q10285.. :(
Can someone tell me where I am wrong, or is there more test cases? Thx!
[cpp]
#include<stdio.h>
int a[101][101],R,C,max,len;
void dig(int i,int j)
{
len++;
if (len>max) max=len;
if (i-1>=0 && a[i-1][j]<a [j]) { dig (i-1,j); len--; } // Up ...
Can someone tell me where I am wrong, or is there more test cases? Thx!
[cpp]
#include<stdio.h>
int a[101][101],R,C,max,len;
void dig(int i,int j)
{
len++;
if (len>max) max=len;
if (i-1>=0 && a[i-1][j]<a [j]) { dig (i-1,j); len--; } // Up ...
- Sat May 24, 2003 4:47 pm
- Forum: Volume 6 (600-699)
- Topic: 694 - The Collatz Sequence
- Replies: 46
- Views: 21937
- Sat May 24, 2003 7:21 am
- Forum: Volume 6 (600-699)
- Topic: 694 - The Collatz Sequence
- Replies: 46
- Views: 21937
694 - The Collatz Sequence
I got output limit exceeded but I don't know why.. :(
please help me..Thanks!
[cpp]
#include<stdio.h>
void main()
{
unsigned long i,j;
int clen,setnum=1;
while(1)
{
scanf("%ld %ld",&i,&j);
if (i<0 && j<0) break;
printf("Case %d: A = %ld, limit = %ld, number of terms = ",setnum,i,j);
for ...
please help me..Thanks!
[cpp]
#include<stdio.h>
void main()
{
unsigned long i,j;
int clen,setnum=1;
while(1)
{
scanf("%ld %ld",&i,&j);
if (i<0 && j<0) break;
printf("Case %d: A = %ld, limit = %ld, number of terms = ",setnum,i,j);
for ...
- Tue May 13, 2003 4:43 pm
- Forum: Volume 1 (100-199)
- Topic: 145 - Gondwanaland Telecom
- Replies: 62
- Views: 22448