Search found 2 matches

by tplee923
Sat Mar 09, 2013 8:29 pm
Forum: Volume 1 (100-199)
Topic: 133 - The Dole Queue
Replies: 42
Views: 10648

Re: Why 133 - The Dole Queue keeps Runtime Error

Just found an edge case, when N is 1, this program will seg fault. after solve this case, the program got AC.
by tplee923
Sat Mar 09, 2013 7:44 pm
Forum: Volume 1 (100-199)
Topic: 133 - The Dole Queue
Replies: 42
Views: 10648

Why 133 - The Dole Queue keeps Runtime Error

Hello I am using pointer to solve the problem, but it always get runtime error, can someone help me see what could cause the error? Thanks!



//uva 133
#include<cstdio>

typedef struct Node* PTR;
struct Node {
int val;
PTR left,right;
};

int main() {
int N,k,m;
while(scanf("%d %d %d",&N,&k,&m ...

Go to advanced search