1st Night sucks

Can't stand staying at Zizhu Campus. So I took the  2:30 and headed back to town. It's better to over night in SHM than in SHZ, since everything is so close. Conveinent Store at the lobby, coffee and tea at a nearer pantry. But it's not possible for you to fall asleep on the meeting room floor without a sleeping bag. The carpet feels bad.

Started at 4 this morning, cuz i heard something upstairs moving. 2 peice of Pizza and a cup of hot tea get me back to work. I still have a lot to read to pass the tiptoeing 2 exams.

Janny and Zaphr had their graduation ceremony yesterday. Janny was trapped at work for some stupid printing stuff. She even gave up the graduation picture for that. (That's a BIG lost!! Since you can only have your graduation once in a lifetime.) I remeber that i came back to Intel to make a presentation on our staff meeting during my graduation party. (That was awesome, I can't even believe that i made it.)

June 26. When i went through my weblog and found that on the same day last year. XiaoDi moved out of 404. and on that day an era ended. I didn't do a good job at SJTU. I do not like the school. I do not like my professer. I do not like those guys in my lab. I can never find any passion like what i had when working in the embedded system back at ECNU. I'm even losing my self-esteem.

I'm losing my goal, i'm losing my dreams, I'm feeling that my self-esteem  is caving in. In high school, my goal was to get into a good college, in undergraduate, my goal was to have a chance to get a master degree. When i'm pursuing my master degree now, i do not know where i should go. When starting to picture about the life after graduation, i got lost! I don't know what's gonna happen and i do not know where am i gonna go.


Imperishable Night


It's the eve of the Harvest Moon Festival in Gensokyo when Flandre Scarlet senses that something is wrong with the moon. It appears that the moon has been replaced by a fake moon. Someone must freeze time and find the real moon to ensure a full moon on the night of the festival. Remilia Scarlet tells her that she must go into the Bamboo Forest of the Lost (迷いの竹林) to investigate and gain enough points to remedy this.nn二小姐nFlandre sets off immediately. When she arrives at the entry of the Bamboo Forest of the Lost, she finds that there are n different parts. According to Remilia, there are two kinds of mysterious halidom, ITEM and TIME, that will increase Flandre's points:nnWhen Flandre is at the entry, she can choose any path she hasn't choosed before and collects all ITEM and TIME there, then goes back to the entry.nThere are two values, IV (ITEM Value) and TV (TIME Value) relating to how many points Flandre can gain when she collect a piece of ITEM or a piece of TIME.nThe initial IV, TV and point of Flandre are all 0.nWhen she chooses a new part, her IV and TV and point keep the same as the end of he previous collection.nIn parti, there are xi pieces of ITEM with value ai and yi pieces of TIME with value bi.nWhen she collects a piece of ITEM, her point will increase IV (point += IV), and her TV will increase ai (TV += ai) immediately as well.nwhen she collects a piece of TIME, her point will increase TV (point += TV), and her IV will increase bi (IV += bi) immediately as well.nObviously, Flandre's IV and TV will be changing when she is collecting ITEM and TIME, thus the order of collection is important. Morever, the order of the parts she chooses is crucial too. Flandre should gain as many points as possible. Your task is to calculate the maximal point Flandre can gain.nnInputnnThe input contains multiple test cases (no more than 100). The first line of each case is an integer n (1 ≤ n ≤ 15), indicating the number of parts of the forest. Then follows n lines, the i-th (1 ≤ i ≤ n) of them contains 4 integers ai, bi, xi, yi (0 ≤ ai, bi ≤ 20, 0 ≤ xi, yi ≤ 30), as described above.nnOutputnnFor each case, output the maximal point Flandre can gain in a single line.nnSample Inputnn1n1 2 1 1n3n2 2 2 2n2 2 2 2n2 2 2 2nSample Outputnn2n72