# 200+ ACM Problems solution source code

During 2003~2007 I was an undergraduate computer science student. In this time for our course material and for programming passion I used to try to solve ACM problems from the well-known University of Valladolid site. I solved arround 203 ACM problems in this site. Today I found in my laptop still the accepted codes are saved. So I think I should share these code. May be these could be useful for someone. I had written 99% of my code using C++ language.

One thing I want to mention these codes are accepted but not the best optimized code. These codes were written by me during my student life so you can’t expect that also.

In my sharing code repository all the **file names** are the problem number from the University of Valladolid site. In valladolid site author statistics is down, you can’t see anyone’s statistics but fortunately i saved my statistics in 2007 and here it is.

Great Share! Cloned in mac, will have a look soon ðŸ™‚

Thank You

i need a code to open the Dictionary

thankyou brother for great share!

Tanx a lot Mahmud

your codes are really great!!!!!!!!!!

i promise to use them as well as possible…

You are to write a program that evaluates assignment statements. Assume that there

is one (and only one) statement on each line of the input, and each assignment

statement is terminated by a semicolon. The following are some of possible

assignment statements:

length = 4 +6;

width=3+12*10;

area =length *width – b;

total =100 – y- (width+111*222) /area + x;

area= area +5 – 3 *4^ ( width – 3*(length+30 ))+100;

x = area +(total-area/ width ) ;

Here are some assumptions and rules:

(1) All variables are 1-10 characters long, and only lowercase letters are

used.

(2) All values are integers, and all numbers are in the range of -32768 to

32767. (Such numbers are stored in 16 bits of memory.)

(3) / is the integer division operator. So 7/2 = 3 (truncated to integer),

and 100/7 = 14.

(4) ^ is the exponential operator. For example, 2^5 = 2*2*2*2*2 = 32.

(5) An expression may contain both integer literals and variables.

(6) Any number of spaces may be used to separate different items in a

statement.

(7) All statements are 1 – 80 characters long.

(8) All variables have a default value of 0.

(9) All statements are valid.

(10) First line of the input contains a positive integer indicating the

number of statements to be evaluated.

Your program should read and evaluate all statements and print a table that shows

all variables, in alphabetical order and aligned to the left, that appear in the

input data along with their corresponding final values aligned to right.

Sample Input

6

length = 4 +6;

width=3+12*10;

area =length *width – b;

total =100 – y- (width+111*222) /area + x;

area= area +5 – 3 *4^ ( width – 3*(length+30 ))+100;

x = area +(total-area/ width ) ;

Sample Output

Variable Value =========================

area 1143

b 0

length 10

total 80

width 123

x 1214

y 0 please help to solve it