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 »

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'

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

Post by rio »

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.

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

Post by rio »

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 »

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 {

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

Post by rio »

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

Post Reply

Return to “Volume 108 (10800-10899)”