A gas is taken from state A to state B along two different paths, shown in the pressure-volume diagram. Along path ACB it absorbs 80J of heat and does 30J of work. Along path ADB it does 10J of work. Later the gas is brought back from B to A along the curved path, and 20J of work is done on the gas on the way. Which statement is correct?