10342 and 10342 is fixed now

Post here if you don't find any other place for your post. But please, stay on-topic: algorithms, programming or something related to this web site and its services.

Moderator: Board moderators

Post Reply
shahriar_manzoor
System administrator & Problemsetter
Posts: 399
Joined: Sat Jan 12, 2002 2:00 am

10342 and 10342 is fixed now

Post by shahriar_manzoor »

Hello,
10342 and 10343 is fixed.

In an earlier contest 10322 and 10323 had mistakes. And they are not still fixed.

Explanation of why our contests have mistakes:
We cannot check all the problems of our contest and the problems set by me are only solved by me (in most cases there is not enough time to be solved by others). Actually, now the contests determine the correctness of the problems. So unless a panel of judges/ problemsetters is formed the contests will always have one or two mistakes- To err is human. Now I actually don't have the time to solve other problems as I am busy with many problems of my own for the future contest. And also I don't have the ability to solve all problems. So please be patient.
Last edited by shahriar_manzoor on Tue Sep 17, 2002 1:32 pm, edited 4 times in total.

Fresh
New poster
Posts: 46
Joined: Mon Apr 15, 2002 10:42 am
Contact:

...

Post by Fresh »

How about problem 10343 - Base64 Decoding? Nobody got accepted during real contest.

-novice :cry:

shahriar_manzoor
System administrator & Problemsetter
Posts: 399
Joined: Sat Jan 12, 2002 2:00 am

Other problem

Post by shahriar_manzoor »

This problem has other problem. It produces binary output so the comparison must be binary. So a special judge is also written. But it is yet to be placed. So you can avoid it now.

Fresh
New poster
Posts: 46
Joined: Mon Apr 15, 2002 10:42 am
Contact:

...

Post by Fresh »

But i used 'unsigned char' variable type and fwrite for the output. Should be ok and i 100% sure my Base64 class has no problem!

-novice :-?

shahriar_manzoor
System administrator & Problemsetter
Posts: 399
Joined: Sat Jan 12, 2002 2:00 am

Our mistake

Post by shahriar_manzoor »

I am not saying it is your mistake. Mistake is ours.

xenon
Learning poster
Posts: 100
Joined: Fri May 24, 2002 10:35 am
Location: Scheveningen, Holland

Post by xenon »

So why are they submittable then? Shouldn't they have no checkmark, like many problems in volume 800 f.i.?

People can waste a lot of time solving the insolvable this way.
My submission for 10323 got accepted. Does this mean that I'll have to do it again after rejudgement (whenever that may be)?

I can live with wrong input now and then. I have great respect for the problemsetters because they supply us with lots of interesting programming problems for free, and I'm sure it takes a lot of their time. Everybody makes mistakes. But I think this is stretching it a little...

Still feeling a little sad about 333 and 168,
-xenon

shahriar_manzoor
System administrator & Problemsetter
Posts: 399
Joined: Sat Jan 12, 2002 2:00 am

Thats why...

Post by shahriar_manzoor »

That is why I report mistakes as a sticky post here. Any careful solver should read the message board. And I feel sorry for 168 and 333 also (my number was also reduced :cry: ). But you should make this complain at problemset@acm.uva.es, I manage the contest section and live 6000 miles away from Spain :D .

No you won't have to resubmit 10323. I will change the statement in such a way that the solution will remain same.

Caesum
Experienced poster
Posts: 225
Joined: Fri May 03, 2002 12:14 am
Location: UK
Contact:

Post by Caesum »

In an earlier contest 10322 and 10323 had mistakes. And they are not still fixed.
I still dont understand why it takes so long!!!!!!! Some things are done on the judge very quickly, like adding the new problems, but corrections seem to take such a long time, as does notifying you of rejudgements (over a month for the last set before I got an email about it!). Also I dont know whether some of my emails have disappeared down the same black hole that swallowed a load of submissions last week..... I am thinking about 168 and 333 specifically :x

Juergen Werner
New poster
Posts: 27
Joined: Wed Apr 17, 2002 7:54 pm

Mistakes in Online Contests

Post by Juergen Werner »

Yes, to err is human, and I do greatly appreciate the effort of the problem setters to arrange contests.

Maybe it would help if the 'Call For Problems' page on the Contest Site would make the suggestion to the problem setters that they pose the problem set (before the contest) to maybe 2-3 persons they know to see if there are any ambiguous statements or other problems with it.
(I think this should be possible since most problem setters know either other people from their university or people from the online judge community, or both, that they can pose the questions to.)

Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

I see that 10343 in Volume 13 was rejudged. Is it possible to rejudge the submissions made during online contest for this problem?

Bistromath
New poster
Posts: 16
Joined: Fri Oct 11, 2002 11:03 pm
Location: France

Post by Bistromath »

Hi,

I read all posts about problem 10343 but always get WA.

The description of the problem says that "Each dataset consists of a valid Base64 encoding of some (possibly binary) data".
But how can i take this binary data into account ?

Here the code i have submitted

Thanks for any help

[cpp]
#include <stdio.h>

char Buffer[200000] ;

class CBase64Decoding
{
public:
CBase64Decoding( const char* buffer ) ;

void Decode() const ;

protected:

inline void Putchar( unsigned char c ) const ;
void Flush() const ;
void Decode( const char*,int count ) const;
char Decode( char ) const ;

private:
const char* m_Buffer ;
mutable int m_OutCount ;
enum { OutSize = 1024 } ;
mutable unsigned char m_OutBuffer[OutSize] ;
} ;


CBase64Decoding::CBase64Decoding(const char* buffer)
: m_Buffer( buffer ),
m_OutCount(0 )
{
}

void CBase64Decoding::Decode() const
{
const char* c ;
for ( c = m_Buffer ; *c != 0 ; c+=4 )
{
int count = 3 ;
if ( c[3] == '=' )
{
count-- ;
if ( c[2] == '=' ) count-- ;
}
Decode( c, count ) ;
}
Putchar('#') ;
Flush() ;
}


void CBase64Decoding::Decode( const char* str, int count ) const
{
char dStr[4] ;
for ( int i = 0 ; i < count+1 ; ++i )
dStr = Decode( str ) ;
unsigned char c0 = ( dStr[0] << 2 ) | ( ( dStr[1] & 0x30 ) >> 4 ) ;
Putchar(c0 ) ;
if ( count == 1 )
return ;
unsigned char c1 = ( ( dStr[1] & 0x0F ) << 4 ) | ( ( dStr[2] & 0x3C ) >> 2 );
Putchar(c1 ) ;
if ( count == 2 )
return ;
unsigned char c2 = ( ( dStr[2] & 0x03 ) << 6 ) | dStr[3] ;
Putchar(c2 ) ;

}


char CBase64Decoding::Decode( char c ) const
{
if ( c >= 'A' && c <= 'Z' ) return c-'A' ;
if ( c >= 'a' && c <= 'z' ) return 26+c-'a' ;
if ( c >= '0' && c <= '9' ) return 52+c-'0' ;
if ( c == '+' ) return 62 ;
if ( c == '-' ) return 63 ;

return -1 ;
}

inline void CBase64Decoding::Putchar( unsigned char c ) const
{
m_OutBuffer[m_OutCount++] = c ;
if ( m_OutCount==OutSize)
{
fwrite( m_OutBuffer, OutSize, sizeof( unsigned char ), stdout) ;
m_OutCount=0 ;
}
}

void CBase64Decoding::Flush() const
{
if (m_OutCount>0)
{
fwrite( m_OutBuffer, m_OutCount, sizeof( unsigned char ), stdout) ;
m_OutCount=0 ;
}
}

inline bool ValidChar( char c )
{
return
( c >= 'A' && c <= 'Z' ) ||
( c >= 'a' && c <= 'z' ) ||
( c >= '0' && c <= '9' ) ||
( c == '+' ) ||
( c == '-' ) ||
( c == '=' ) ;
}


int main()
{
char c ;
char* pc ;
//_setmode( _fileno( stdout), _O_BINARY );
do
{
pc = Buffer;
while ( ( c = getchar() ) != '#' )
{
if ( ValidChar( c ) )
*pc++ = c ;
}

if ( pc != Buffer )
{
*pc = 0 ;
CBase64Decoding( Buffer).Decode() ;
}
} while ( pc != Buffer ) ;
}
[/cpp]

Post Reply

Return to “Other words”