Search found 6 matches

by thechaoshacker
Thu Jul 24, 2003 9:18 pm
Forum: Volume 7 (700-799)
Topic: 701 - The Archeologists' Dilemma
Replies: 43
Views: 35512

701

Don't we proceed in this manner :-
number prefix
2^7 = 128 1
2^8 = 256 2
2^9 = 512 5
2^10 = 1024 not possible, since 1 has already been used and 10 is not less than half of the input symbols.

2^11 = 4096 4
.
.
.
2^22 = 4194304 41, 419
I did this by brute force, and still I get a WA. Can nebody help ...
by thechaoshacker
Sun Jan 26, 2003 1:46 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 77227

Accepted

Thanx !
I changed those two lines and it worked. What was going wrong ?
TheChaosHacker
by thechaoshacker
Thu Jan 23, 2003 3:22 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 77227

WA

I read all the threads on this problem. I still can't figure out why I am getting WA. Could u please help me out ?
Here is my code.

#include<iostream.h>

int main()
{
unsigned long long int a,b,tempa,tempb;
while(!cin.eof())
{
cin>>a>>b;
if(a > b)
tempa=a-b;
else
tempa=b-a;
cout<<tempa ...
by thechaoshacker
Thu Jan 23, 2003 2:55 pm
Forum: Volume 2 (200-299)
Topic: 256 - Quirksome Squares
Replies: 30
Views: 8690

WA ?

Why am I getting WA ? Did I miss out any number ?
#include<stdio.h>

int ar[32000];

void f()
{
int a;
while(scanf("%d", &a)!=EOF)

switch(a)
{
case 2: printf("00\n01\n81\n"); break;
case 4: printf("0000\n0001\n2025\n3025\n9801\n");break;
case 6: printf("000000\n000001\n088209\n494209 ...
by thechaoshacker
Thu Jan 23, 2003 2:05 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101779

Stupid Mistake

I forgot the else condition for

if(1==count)
cout<<"1 carry operation.\n";
else
cout<<count<<" carry operations.\n";

oops :)
thechaoshacker }
by thechaoshacker
Wed Jan 22, 2003 9:27 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101779

10035

I am getting a WA for this one. Can't figure out where I went wrong. Could somebody help me please ?

[cpp]#include<iostream.h>
unsigned long long a,b;

int main()
{
int dig1,dig2,carry=0,sum,count=0;
while(1)
{
cin>>a>>b;
if(!a&&!b)
break;
count=0;
carry=0;
while(a||b)
{
dig1=a%10 ...

Go to advanced search