I am also getting WA on the new server when I tried to resubmit codes I wrote long time ago... I have tried all sample inputs I found in this forum and I think my program gives the correct outputs.
I am just using DFS brute force....
AND most importantly my code got accepted a few years ago on ...
Search found 29 matches
- Sat Mar 15, 2008 6:07 pm
- Forum: Volume 2 (200-299)
- Topic: 216 - Getting in Line
- Replies: 57
- Views: 31060
- Fri Oct 17, 2003 4:30 pm
- Forum: C++
- Topic: g++ problem!?
- Replies: 6
- Views: 3297
- Wed Oct 15, 2003 2:31 pm
- Forum: C++
- Topic: g++ problem!?
- Replies: 6
- Views: 3297
- Wed Oct 15, 2003 2:05 pm
- Forum: C++
- Topic: g++ problem!?
- Replies: 6
- Views: 3297
g++ problem!?
I want to extract the last two non-zero digits from an int n, using the following code:
[cpp]while (n%10 == 0)
n /= 10;
n %= 100;[/cpp]
if i input 26300, the change of value of n is as expected
n=26300
n=2630
n=263
n=63
but it doesn't run as expected when the value of n is 10...
[cpp]n%10 == 0 ...
[cpp]while (n%10 == 0)
n /= 10;
n %= 100;[/cpp]
if i input 26300, the change of value of n is as expected
n=26300
n=2630
n=263
n=63
but it doesn't run as expected when the value of n is 10...
[cpp]n%10 == 0 ...
- Thu May 22, 2003 3:11 pm
- Forum: C++
- Topic: About CPU time
- Replies: 5
- Views: 3469
- Sat Apr 19, 2003 4:37 pm
- Forum: Other words
- Topic: acm solve sites
- Replies: 51
- Views: 31436
- Sat Apr 19, 2003 4:26 pm
- Forum: C++
- Topic: About CPU time
- Replies: 5
- Views: 3469
About CPU time
How can I know how long my program runs?
Do I have to code myself or I can get such information from my compiler.......?
And how about the memory size a program uses?
Do I have to code myself or I can get such information from my compiler.......?
And how about the memory size a program uses?
- Fri Dec 20, 2002 3:21 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10013 - Super long sums
- Replies: 212
- Views: 67745
- Sat Nov 16, 2002 2:25 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10055 - Hashmat the Brave Warrior
- Replies: 166
- Views: 77258
- Sun Nov 10, 2002 1:35 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317984
- Sun Nov 10, 2002 1:29 pm
- Forum: Algorithms
- Topic: Another GRAPH problem
- Replies: 1
- Views: 2504
- Sun Nov 10, 2002 1:26 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10055 - Hashmat the Brave Warrior
- Replies: 166
- Views: 77258
- Sat Oct 26, 2002 3:15 pm
- Forum: Volume 5 (500-599)
- Topic: 530 - Binomial Showdown
- Replies: 137
- Views: 49056
- Sat Oct 26, 2002 2:54 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 83871
Re: 10070 Output Limit Exceeded
This is my source code for problem 10070. When I ran it on my computer, it worked well when I input a long number. But I got "Output Limit Exceeded" when I submit it. Can anyone help me?
[c]#include <stdio.h>
#include <string.h>
main()
{
char s[10000];
int y[10000];
//...
[/c]
Maybe 10000 ...
[c]#include <stdio.h>
#include <string.h>
main()
{
char s[10000];
int y[10000];
//...
[/c]
Maybe 10000 ...
- Sat Oct 26, 2002 6:59 am
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 83871
Re: me w/a too,help!!!
#include "iostream.h"
bool mod11(str year)
{
int i;
i=0;
long sum1,sum2;
sum1=0;
sum2=0;
while(i<year.len)
{
sum1+=(year.base -'0');
i+=2;
}
i=1;
while(i<year.len)
{
sum2+=(year.base -'0');
i+=2;
}
if( sum1==sum2 )
return true;
return false;
}
it should be
((sum1-sum2)%11 ...
bool mod11(str year)
{
int i;
i=0;
long sum1,sum2;
sum1=0;
sum2=0;
while(i<year.len)
{
sum1+=(year.base -'0');
i+=2;
}
i=1;
while(i<year.len)
{
sum2+=(year.base -'0');
i+=2;
}
if( sum1==sum2 )
return true;
return false;
}
it should be
((sum1-sum2)%11 ...