why the answer of the input
1
300
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
is
100???
Could someone explain to me?? thanks
Search found 5 matches
- Wed May 25, 2011 8:50 am
- Forum: Volume 103 (10300-10399)
- Topic: 10337 - Flight Planner
- Replies: 20
- Views: 12603
- Fri Apr 02, 2010 5:00 pm
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58162
Re: 195: anagram, wrong answer
I got AC.Thank you!helloneo wrote:I think your compare function is not correct..
m=i>='a'&&i<='a'?i-'a':i-'A';
Shouldn't this be..
m= i>='a' && i <= 'z' ? i - 'a' : i - 'A'

That was a stupid mistake
- Wed Mar 31, 2010 4:27 pm
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58162
Re: 195: anagram, wrong answer
I think my algorithm is right,but I got WA.
Could someone tell me why?please
Could someone tell me why?please
Code: Select all
AC
- Mon Mar 09, 2009 4:59 pm
- Forum: Volume 3 (300-399)
- Topic: 336 - A Node Too Far
- Replies: 121
- Views: 58655
Re:
A little speech about the problem:
I got at least 6 times WA for the given code ( in the previous post). I posted here bcz I didn't found any bug in my code. I hoped that I will get helped from the great helpers about my problem. But I failed to get help from others.
I think somebody ( cordial ...
I got at least 6 times WA for the given code ( in the previous post). I posted here bcz I didn't found any bug in my code. I hoped that I will get helped from the great helpers about my problem. But I failed to get help from others.
I think somebody ( cordial ...
- Wed Aug 27, 2008 7:13 pm
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 44203
Re: 562 - Dividing Coins
I got WA. And I still can't find my mistakes.
Could anyone give me some test data?
Here is my code
#include <cstdio>
#include <memory>
#define abs(a) ((a)>=0?(a):-(a))
int main(){
int q;
scanf("%d",&q);
while(q--){
bool *a1=new bool[501];
bool *a2=new bool[501];
bool *now;
bool *tmp ...
Could anyone give me some test data?
Here is my code
#include <cstdio>
#include <memory>
#define abs(a) ((a)>=0?(a):-(a))
int main(){
int q;
scanf("%d",&q);
while(q--){
bool *a1=new bool[501];
bool *a2=new bool[501];
bool *now;
bool *tmp ...