Page 1 of 4
621 - Secret Research
Posted: Sat Jun 15, 2002 5:06 pm
by Ming Han
What does
In case the analysed string does not determine the experiment result, a first match from the above list should be outputted.
mean?
Thank You
Hi!
Posted: Mon Jun 24, 2002 5:15 pm
by cyfra
Hi!
It means that for this input :
19035
You should output:
-
because the negative result is before not completed experiment...
And that's all...
Good Luck

ACM 621
Posted: Tue Jun 25, 2002 8:59 am
by Ming Han
What if you have something like "12345".
Thank You
Posted: Tue Jun 25, 2002 12:09 pm
by cyfra
Hi!
My program returs '-' but I think that there shouldn't be such a case in the input, because it describes nothing....
and what your program gives ??
Posted: Fri Jun 28, 2002 12:15 pm
by Larry
So what do we do in the default case?
Posted: Fri Jun 28, 2002 12:27 pm
by cyfra
Larry wrote:So what do we do in the default case?
What do you mean ??
In the input which is given in task description everything is OK...
Help
Posted: Fri Aug 23, 2002 5:18 pm
by Fresh
Hi,
U're right for the '+' sign but nop the others. Read the question carefully.
[cpp]
'-' for a[strlen(a) - 2] = "35"
'*' for a[0] = '9' and a[strlen(a) - 1] = '4'
'?' for a[0-2] = "190"
[/cpp]
-novice

621 PE
Posted: Fri Sep 06, 2002 10:18 am
by dwyak
The problem is simple, but I cannot get AC.
I've tested. There's no illegal case in input.
Are there any tricks?
And there's my program.
[cpp]#include <fstream.h>
#include <string.h>
//ifstream fin("621.txt");
#define fin cin
#define endl '\n'
char str[1000000];
main() {
int cases, pcase;
fin >> cases;
for (pcase = 0; pcase < cases; pcase++) {
fin >> str;
if (strcmp(str, "1") == 0 || strcmp(str, "4") == 0 || strcmp(str, "78") == 0) {
cout << "+" << endl;
continue;
}
int l = strlen(str);
if (l >= 2 && str[l - 1] == '5' && str[l - 2] == '3') {
cout << "-" << endl;
continue;
}
if (str[0] == '9' && str[l - 1] == '4') {
cout << "*" << endl;
continue;
}
if (l >= 3 && str[0] == '1' && str[1] == '9' && str[2] == '0') {
cout << "?" << endl;
continue;
}
cout << endl;
}
return 0;
}[/cpp]
Posted: Fri Oct 11, 2002 6:05 pm
by cytse
To get AC, there should be no EOLN after the last line of output... but I don't think it is right
621 what's wrong with this code ??
Posted: Fri Dec 06, 2002 4:15 pm
by kurnia w
Never mind...
Posted: Fri Dec 06, 2002 4:56 pm
by Dominik Michniewski
there was a thread about this problem.
look at this ....
Regards
Dominik
621- what is the reasult?
Posted: Tue Jun 03, 2003 3:32 pm
by Master
what should be the output of the following input:
190135
please anyone tell me the reasult?
M H
Posted: Tue Jun 03, 2003 3:53 pm
by Dominik Michniewski
I think "-"
Best regards
DM
Posted: Thu Jun 05, 2003 8:34 pm
by Master
Thanks for help.
I made so

but why

is there any think is in the qustion????????
thanks
M H
well
Posted: Fri Jul 11, 2003 4:06 pm
by ACoimbra
Well I think so, it's very stupid!!!!