10728 - Help!

All about problems in Volume 107. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
omnibus
New poster
Posts: 2
Joined: Sun Sep 26, 2004 11:33 am

10728 - Help!

Post by omnibus » Sun Sep 26, 2004 11:41 am

Well I mean prob B and D.
http://acm.uva.es/contest/data/next/problemset/
B:
"Given two patterns, you are to find a phrase that matches both."
So how come for the input:
<a> b
c <a>

Output is
c b

D:
"is called antiarithmetic if there is no subsequence of it forming an arithmetic progression of length bigger than 2, i.e. there are no three indices 0 ? i < j < k < n such that (pi , pj , pk) forms an arithmetic progression."
For each test case output one line with yes or no stating whether the permutation is antiarithmetic or not.

So why is 6: 2 4 3 5 0 1 antiarithmetic ? (2,3,5) (4,3,0) (4,3,1) - that are arithmetic progressions so but there should be none in order for it to be antiarithmetic ....

wiktor
New poster
Posts: 5
Joined: Wed Sep 22, 2004 6:13 pm

Re: Waterloo Fall (10728 & 10730 ?)

Post by wiktor » Sun Sep 26, 2004 1:12 pm

Well I mean prob B and D.
http://acm.uva.es/contest/data/next/problemset/
B:
"Given two patterns, you are to find a phrase that matches both."
So how come for the input:
<a> b
c <a>

Output is
c b
Because the upper <a> is a different <a> than the lower <a> :wink: . You have to divide "tags" into two sets: tags from the first line and tags from the second line.
D:
"is called antiarithmetic if there is no subsequence of it forming an arithmetic progression of length bigger than 2, i.e. there are no three indices 0 ≤ i < j < k < n such that (pi , pj , pk) forms an arithmetic progression."
For each test case output one line with yes or no stating whether the permutation is antiarithmetic or not.

So why is 6: 2 4 3 5 0 1 antiarithmetic ? (2,3,5) (4,3,0) (4,3,1) - that are arithmetic progressions so but there should be none in order for it to be antiarithmetic ....
AFAIR the arithmetic progression is a squence a, a+b, a+2b ... You are probably talking about increasing/decreasing sequence.

omnibus
New poster
Posts: 2
Joined: Sun Sep 26, 2004 11:33 am

Post by omnibus » Sun Sep 26, 2004 1:24 pm

Thank you very much, indeed.

Eduard
Experienced poster
Posts: 183
Joined: Fri Sep 26, 2003 2:54 pm
Location: Armenia,Yerevan

Post by Eduard » Tue Sep 28, 2004 10:27 am

Hello
I want to tell something about Problem B(10728).I got WA during the contest this problem because of just writing caps lock letter.
For example.

Code: Select all

<a>
<b>
I was writing.

Code: Select all

Ed
I just change Ed to e and got AC.
Be carefull with this.
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650

ditrix
New poster
Posts: 33
Joined: Sat Mar 01, 2003 12:38 am
Location: Paris

Post by ditrix » Tue Sep 28, 2004 5:39 pm

I just change Ed to e and got AC.
In others terms, it must be a letters from 'a' to 'z' in the words that you invent?
And what about the length of these words?
@+!
DitriX

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

Post by Adrian Kuegel » Tue Sep 28, 2004 6:24 pm

Of course you should only replace placeholders with what is defined as word in this problem, and that is between one and 16 lowercase letters.

Eduard
Experienced poster
Posts: 183
Joined: Fri Sep 26, 2003 2:54 pm
Location: Armenia,Yerevan

Post by Eduard » Tue Sep 28, 2004 6:31 pm

I just got AC writing 33 'e'-s. :D
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650

sozu
New poster
Posts: 4
Joined: Wed Sep 29, 2004 3:22 pm
Location: Seoul
Contact:

Hm..

Post by sozu » Wed Sep 29, 2004 3:25 pm

Input
<a> <b>
<a> <a>

Ouput
1) abc abc
2) -
What is a right?

Eduard
Experienced poster
Posts: 183
Joined: Fri Sep 26, 2003 2:54 pm
Location: Armenia,Yerevan

Post by Eduard » Wed Sep 29, 2004 5:33 pm

Hello sozu.
Input

Code: Select all

<a> <b> 
<a> <a> 
Output

Code: Select all

1) abc abc 
2) acc acc
3) aaa aaa
4) ppp ppp
5) g g
...
...
...
2 same words.
Each word containing only lower case letters. :wink:
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650

sozu
New poster
Posts: 4
Joined: Wed Sep 29, 2004 3:22 pm
Location: Seoul
Contact:

^^

Post by sozu » Fri Oct 01, 2004 2:32 am

Eduard wrote:Hello sozu.
Input

Code: Select all

<a> <b> 
<a> <a> 
Output

Code: Select all

1) abc abc 
2) acc acc
3) aaa aaa
4) ppp ppp
5) g g
...
...
...
2 same words.
Each word containing only lower case letters. :wink:
Thank you.

I got a ACed. :P

Post Reply

Return to “Volume 107 (10700-10799)”