Section 1 is not explained ~
Section 2
1.2.1 A + B coming
1 #include<stdio.h> 2 long long z,x,y; 3 int main( ) 4 { 5 while( scanf( "%I64x%I64x",&x,&y ) != EOF ) 6 { 7 z = x + y; 8 if( z < 0 ) 9 printf( "-" ), z = -z;10 printf( "%d\n",z );11 }12 return 0;13 }View code
1.2.2 climbing Worm
1 // 2 // _ oo0oo _ 3 // o8888888o 4 // 88 ". "88 5 // (|-_-|) 6 // 0 \ =/0 7 // ___/'---' \ ___ 8 //. '\\| | //'. 9 // \\||||||//10 ////_ |||||||| -: -|-11 // | \-// | 12 // | \ _ | ''\ ---/'' | _/| 13 //\. -\__'-'___/-. /14 //___'.. '/--. --\'.. '___ 15 //. "" '<'. ___ \_< |> _/___. '> '"". 16 // | :'-\'.; '\_/';. '/-': | 17 //\\'_. \___\/___/. -'// 18 // ==== '-. ____'. _ __\_____/___. -'___. -'= 19 //' = --- = '20 // 21 // 22 //~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 // 24 // Buddha bless never have bug25 // 26 // 27 // 28 # include <iostream> 29 # include <string. h> 30 # include <stdio. h> 31 # include <ctype. h> 32 # include <algorithm> 33 # include <stack> 34 # include <queue> 35 # include <set> 36 # include <math. h> 37 # include <vector> 38 # include <map> 39 # include <deque> 40 # include <list> 41 using namespace STD; 42 int main () 43 {44 int A, B, C; 45 while (CIN> C> A> B) 46 {47 If (A + B + C = 0) 48 break; 49 int T = 0; 50 while (C> 0) 51 {52 T ++; 53 c-= A; 54 if (C <= 0) 55 break; 56 c + = B; 57 t ++; 58} 59 printf ("% d \ n", T); 60} 61 Return 0; 62}View code
1.2.3 finacial management
1 // 2 // _ oo0oo _ 3 // o8888888o 4 // 88 ". "88 5 // (|-_-|) 6 // 0 \ =/0 7 // ___/'---' \ ___ 8 //. '\\| | //'. 9 // \\||||||//10 ////_ |||||||| -: -|-11 // | \-// | 12 // | \ _ | ''\ ---/'' | _/| 13 //\. -\__'-'___/-. /14 //___'.. '/--. --\'.. '___ 15 //. "" '<'. ___ \_< |> _/___. '> '"". 16 // | :'-\'.; '\_/';. '/-': | 17 //\\'_. \___\/___/. -'// 18 // ==== '-. ____'. _ __\_____/___. -'___. -'= 19 //' = --- = '20 // 21 // 22 //~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 // 24 // Buddha bless never have bug25 // 26 // 27 // 28 # include <iostream> 29 # include <string. h> 30 # include <stdio. h> 31 # include <ctype. h> 32 # include <algorithm> 33 # include <stack> 34 # include <queue> 35 # include <set> 36 # include <math. h> 37 # include <vector> 38 # include <map> 39 # include <deque> 40 # include <list> 41 using namespace STD; 42 int main () 43 {44 float a = 0, B; 45 for (INT I = 1; I <= 12; I ++) 46 {47 CIN> B; 48 A + = B; 49} 50 printf ("$ %. 2lf \ n ", A/12); 51 return 0; 52}View code
HDU step by step