11724 - Evaluate the Expression

All about problems in Volume 117. 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
bm_anas
New poster
Posts: 10
Joined: Fri May 15, 2009 9:13 pm

11724 - Evaluate the Expression

Post by bm_anas » Thu Dec 17, 2009 9:11 am

hi everyone, i m getting wa :( in this problem many times.can anyone give me some critical input outputs.Thnx in advance.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 11724 - Evaluate the Expression

Post by brianfry713 » Thu Sep 25, 2014 4:16 am

Input:

Code: Select all

99
a+b+c*d*e*f*g+h+i*j
8
a>b
e>b
h>i
h>c
i>h
c>a
f>h
b>i
a+b+c+d*e+f
6
c>b
e>d
d>c
d>a
d>f
d>b
a*b*c
9
b>a
c>b
c>a
b>c
a>b
a>c
a>c
a>c
c>a
a*b*c*d*e*f
4
d>f
d>a
e>a
d>e
a+b+c*d+e+f*g+h
3
f>c
f>b
c>e
a
0
a*b*c*d*e*f*g
2
c>d
f>c
a+b*c+d*e+f
5
b>c
d>f
f>d
d>e
b>a
a+b*c*d+e
8
c>d
d>b
c>b
c>a
b>e
a>d
b>d
d>b
a*b
2
a>b
b>a
a*b+c+d*e+f*g+h+i*j
1
h>e
a*b+c+d+e+f+g*h
2
a>h
a>h
a+b*c+d*e
6
a>b
d>b
d>a
d>e
a>c
a>e
a+b+c+d*e+f+g*h
1
d>a
a*b*c+d+e+f+g
9
e>f
g>a
g>c
e>d
c>a
e>b
f>g
g>d
c>d
a*b*c
9
b>a
a>c
c>b
c>a
a>b
b>c
b>c
a>b
c>a
a+b+c+d+e*f+g+h
6
c>d
h>c
h>d
d>e
e>g
f>e
a*b+c*d
6
c>a
c>b
d>b
a>b
b>d
a>d
a
0
a+b*c*d*e+f+g+h
9
g>b
g>e
c>a
h>e
g>f
g>f
e>g
c>f
c>g
a+b+c+d*e
9
e>c
b>c
b>c
a>c
b>c
b>c
b>d
e>c
c>b
a+b
8
b>a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*i+j
6
h>a
g>h
f>b
g>c
i>h
g>j
AC output:

Code: Select all

Case 1: -1
Case 2: 17
Case 3: -1
Case 4: 6
Case 5: 9
Case 6: 1
Case 7: 6
Case 8: -1
Case 9: -1
Case 10: -1
Case 11: 7
Case 12: 7
Case 13: 6
Case 14: 7
Case 15: 15
Case 16: -1
Case 17: 21
Case 18: -1
Case 19: 1
Case 20: -1
Case 21: -1
Case 22: -1
Case 23: 3
Case 24: 9
Case 25: -1
Case 26: 27
Case 27: 1
Case 28: 1
Case 29: -1
Case 30: -1
Case 31: 2
Case 32: 1
Case 33: -1
Case 34: 6
Case 35: 8
Case 36: 5
Case 37: 1
Case 38: 1
Case 39: -1
Case 40: -1
Case 41: -1
Case 42: 3
Case 43: -1
Case 44: 14
Case 45: -1
Case 46: -1
Case 47: 5
Case 48: 4
Case 49: -1
Case 50: 10
Case 51: 8
Case 52: 6
Case 53: 6
Case 54: 2
Case 55: 1
Case 56: 8
Case 57: -1
Case 58: 6
Case 59: -1
Case 60: 5
Case 61: 11
Case 62: 16
Case 63: -1
Case 64: 3
Case 65: 3
Case 66: 1
Case 67: 10
Case 68: -1
Case 69: -1
Case 70: 16
Case 71: 4
Case 72: 2
Case 73: -1
Case 74: 3
Case 75: 7
Case 76: 1
Case 77: 29
Case 78: 1
Case 79: 5
Case 80: -1
Case 81: -1
Case 82: -1
Case 83: 2
Case 84: 2
Case 85: 9
Case 86: 13
Case 87: -1
Case 88: -1
Case 89: -1
Case 90: 12
Case 91: 6
Case 92: -1
Case 93: 15
Case 94: -1
Case 95: 12
Case 96: 9
Case 97: 18
Case 98: 19
Case 99: 16
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 117 (11700-11799)”