10847 - Basic Tautologies

All about problems in Volume 108. 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
Fedex Ultra
New poster
Posts: 2
Joined: Tue Sep 12, 2006 9:20 am

10847 - Basic Tautologies

Post by Fedex Ultra » Tue Sep 12, 2006 9:37 am

Hello, i've tried to solve the problem 10847 - Basic Tautologies, but i always get WA :evil: , even in C,C++ and JAVA. Could anybody help me with some input cases please. I will appreciate your help. :D

These is what i get with my algorithm:

INPUT

30
aa=-
a=a
aa-
a-
a=
aa=a=
aa==
a-a=
as
as=
asdf===-
aaa=-=
aaaa====
aaa====
aaaa===
aaaa----====
aaaa=-=-=-
aaaa----===
aaaa--==--=
aaaa-=-=-=-
aaaa===----
aaaa=-=-=--
=
-
-aa=
a-a-a-==
aaa--a===
a
asdfghjklqwertyuiopzxcvbnmasdfghjklqwertyuiopzxcvbnm-----=====---=====---=====----=====-----=====---=====---=====-----=====---======----=====ASDFGHJKLZXCVBNMQWERTYUIOPASDFGHJKLZXCVBNMQWERTYUIOP---=====---=====---=====-=====----=====-=====---=====---=---=====---------=====-------======-------------
asdfghjklqwertyuiopzxcvbnmasdfghjklqwertyuiopzxcvbnm-----=====---=====---=====----=====-----=====---=====---=====-----=====---======----=====ASDFGHJKLZXCVBNMQWERTYUIOPASDFGHJKLZXCVBNMQWERTYUIOP---=====---=====---=====-=====----=====-=====---=====---=---=====---------=====-------======--------------

OUTPUT

formula
incorrect
incorrect
formula
incorrect
formula
incorrect
formula
incorrect
formula
formula
formula
incorrect
incorrect
tautology
incorrect
formula
tautology
tautology
tautology
tautology
tautology
incorrect
incorrect
incorrect
formula
tautology
formula
formula
tautology

___________________________________
Fedex Ultra '8'

User avatar
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio » Wed Oct 04, 2006 12:31 am

i didn't yet solve the problem, but i think it' incorrect if variable continues more tha three.well ... i'm not sure.

-------
Addition 06/11/15 : Sory, this is not true.
Last edited by rio on Thu Nov 16, 2006 8:05 am, edited 1 time in total.

User avatar
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio » Wed Oct 04, 2006 1:19 am

ok. i gott accepted.

output of your input will be like this

formula
incorrect
incorrect
formula
incorrect
formula
incorrect
formula
incorrect
formula
formula
formula
incorrect
incorrect
tautology
incorrect
formula
tautology
tautology
tautology
tautology
tautology
incorrect
incorrect
incorrect
formula
tautology
formula
incorrect
incorrect

Fedex Ultra
New poster
Posts: 2
Joined: Tue Sep 12, 2006 9:20 am

Post by Fedex Ultra » Tue Oct 10, 2006 7:07 am

Ohh that's good but i still getting WA, could you please give me a hint or the idea of your solution??

My idea is that if we have an even number of variables (same variables) example "aa=" or "aa=b=b=" ("ab=" will only be a formula) and an even number of {

User avatar
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio » Tue Oct 10, 2006 3:20 pm

[quote]If you see my output, you will see that it

Post Reply

Return to “Volume 108 (10800-10899)”