Search found 5 matches

by quanghm
Tue May 12, 2015 10:40 pm
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 16189

Re: 369 - Combinations

bgcsaif wrote:Getting WA! Tried some inputs.... It works fine....
:-(
You tries to compute n(n-1)...(n-m+1). That's too much for long long. Try input:
100 10
100 15
0 0
by quanghm
Fri May 01, 2015 9:27 pm
Forum: Volume 103 (10300-10399)
Topic: 10327 - Flip Sort
Replies: 81
Views: 21925

Re: 10327 - Flip Sort

I would like to argue that the problem is ill-posed. At least, there's a conflict between the text ( a number N followed by several lines) while the sample input showed two data sets with two "different" N as one can see in the sample output. The reference program at udebug seemed to agreed with the...
by quanghm
Tue Apr 28, 2015 4:50 am
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 23021

Re: 543 - Goldbach's Conjecture

My code complies and runs fine with Mingw but got a compile error, can someone help me with this? #include <iostream> #include <vector> #include <string> #include <stdio.h> using namespace std; int main() { int n=1000000; bool a[1000000] = {0}; // if i is check int i = 2; do { while(a[i]&&(i<n)){i++...
by quanghm
Sat Apr 25, 2015 5:06 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 34070

Re: 101 - The Blocks Problem

never mind, I realized that it was due to the condition "if a and b are on the same stack then do nothing".
by quanghm
Sat Apr 25, 2015 4:19 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 34070

Re: 101 - The Blocks Problem

so my (rejected-time limit) program yields the same output with this guy (6th post) my program couldn't be accepted from judge. and error is Your program has died with signal 11 (SIGSEGV). Meaning: Invalid memory reference 24 move 9 onto 1 move 23 onto 22 pile 21 over 20 move 16 over 1 pile 8 over 6...

Go to advanced search