Hi, I've past all test cases on the forum, and I use a 64 bit data type without success. Could anyone help?
#include<iostream>
#include<algorithm>
using namespace std;
const unsigned long long SIZE=500;
unsigned long long memo[SIZE][SIZE];
bool found[SIZE][SIZE];
unsigned long long n;
inline ...
Search found 15 matches
- Sun Oct 21, 2007 6:29 am
- Forum: Volume 105 (10500-10599)
- Topic: 10520 - Determine it
- Replies: 15
- Views: 11469
- Mon Aug 06, 2007 12:27 am
- Forum: Volume 108 (10800-10899)
- Topic: 10819 - Trouble of 13-Dots
- Replies: 67
- Views: 61255
- Mon Apr 02, 2007 10:35 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10191 - Longest Nap
- Replies: 75
- Views: 43806
What's the Longest nap?
Can someone please help me. This problem is supposed to be easy, but I'm having a very tough time with it. My output seem right. Can someone point out the error in my code or give my inputs to break it. Thank you!
#include<iostream>
#include<string>
#include<sstream>
#include<algorithm>
#include ...
#include<iostream>
#include<string>
#include<sstream>
#include<algorithm>
#include ...
- Fri Jan 19, 2007 3:06 am
- Forum: Volume 110 (11000-11099)
- Topic: 11015 - 05-2 Rendezvous
- Replies: 48
- Views: 24070
- Fri Jan 19, 2007 2:57 am
- Forum: Algorithms
- Topic: programming challenges source code
- Replies: 1
- Views: 2059
programming challenges source code
Can someone explain to me how the code in the Programming challenges book is used? The code seems to reference other code that it does not include. Is anyone familiar with this book? I'm trying to study algorithms and I was hoping to learn.
Thanks.
Thanks.
- Sat Jan 13, 2007 11:02 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11015 - 05-2 Rendezvous
- Replies: 48
- Views: 24070
Test cases
Could someone give me some test cases for this problem. Apparently I don't understand the problem. I'm also a newbie when it comes to algos.
I out which algo to use, which is a big success, but I not getting AC.
Here's my code:
/*
ID:mhayter1
PROG:ride
LANG:C++
*/
#include <iostream>
#include ...
I out which algo to use, which is a big success, but I not getting AC.
Here's my code:
/*
ID:mhayter1
PROG:ride
LANG:C++
*/
#include <iostream>
#include ...
- Sat Aug 12, 2006 3:32 am
- Forum: Volume 109 (10900-10999)
- Topic: 10924 - Prime Words
- Replies: 44
- Views: 29708
- Sat Aug 12, 2006 3:23 am
- Forum: Volume 100 (10000-10099)
- Topic: 10079 - Pizza Cutting
- Replies: 44
- Views: 17040
Unusual
On the problem cutting pizza. This works:
but this doesn't
you must change it to this:
does anyone know why this is?
Code: Select all
cout<<((n*(n+1))/2)+1<<endl;
Code: Select all
cout<<n*n*.5+n*.5+1<<endl;
Code: Select all
cout<<(long long)n*n*.5+n*.5+1<<endl;
- Fri Aug 11, 2006 10:58 pm
- Forum: Volume 7 (700-799)
- Topic: 713 - Adding Reversed Numbers
- Replies: 142
- Views: 60785
- Fri Aug 11, 2006 9:20 am
- Forum: Volume 4 (400-499)
- Topic: 401 - Palindromes
- Replies: 196
- Views: 58120
- Fri Aug 11, 2006 9:19 am
- Forum: Volume 4 (400-499)
- Topic: 401 - Palindromes
- Replies: 196
- Views: 58120
- Fri Aug 11, 2006 9:18 am
- Forum: Volume 4 (400-499)
- Topic: 401 - Palindromes
- Replies: 196
- Views: 58120
- Fri Aug 11, 2006 9:17 am
- Forum: Volume 4 (400-499)
- Topic: 401 - Palindromes
- Replies: 196
- Views: 58120
You need to change this portion of code.
Code: Select all
if(lookup[str1[i]]=='\0')
{
mirror[i]=str1[i];
return 0;
}
- Wed Aug 09, 2006 10:19 am
- Forum: Volume 109 (10900-10999)
- Topic: 10924 - Prime Words
- Replies: 44
- Views: 29708
- Sun Jul 30, 2006 3:08 am
- Forum: Volume 4 (400-499)
- Topic: 401 - Palindromes
- Replies: 196
- Views: 58120
Palindromes problems (401)
Given the test cases available on the forum, I think I only got one wrong.
This is my output:
NOTAPALINDROME -- is not a palindrome.
ISAPALINILAPASI -- is a regular palindrome.
2A3MEAS -- is a mirrored string.
ATOYOTA -- is a mirrored palindrome.
MAIAM -- is a mirrored palindrome.
123ESI ...
This is my output:
NOTAPALINDROME -- is not a palindrome.
ISAPALINILAPASI -- is a regular palindrome.
2A3MEAS -- is a mirrored string.
ATOYOTA -- is a mirrored palindrome.
MAIAM -- is a mirrored palindrome.
123ESI ...