From 6fc7554c74c5745c8890f2367628d3d1cf3ddac7 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Sat, 12 May 2018 21:00:48 -0400 Subject: huatuo and bricks --- 12992/huatuo.c | 12 +++++++ 12992/huatuo.in | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 591/bricks.c | 23 +++++++++++++ 591/bricks.in | 3 ++ 4 files changed, 139 insertions(+) create mode 100644 12992/huatuo.c create mode 100644 12992/huatuo.in create mode 100644 591/bricks.c create mode 100644 591/bricks.in diff --git a/12992/huatuo.c b/12992/huatuo.c new file mode 100644 index 0000000..58d4ea3 --- /dev/null +++ b/12992/huatuo.c @@ -0,0 +1,12 @@ +#include + +int main(){ + int n, j=0; + scanf("%d", &n); + while(n--){ + j++; + int b; + scanf("%d", &b); + printf("Case #%d: %d\n", j, b*2-1); + } +} diff --git a/12992/huatuo.in b/12992/huatuo.in new file mode 100644 index 0000000..2c842b0 --- /dev/null +++ b/12992/huatuo.in @@ -0,0 +1,101 @@ +100 +68 +80 +100 +26 +95 +10 +9 +43 +94 +97 +30 +16 +18 +6 +8 +74 +59 +23 +15 +93 +76 +55 +45 +91 +96 +64 +63 +46 +21 +40 +4 +81 +82 +49 +27 +78 +47 +35 +2 +87 +37 +61 +48 +3 +66 +42 +13 +85 +58 +60 +44 +38 +84 +92 +56 +65 +19 +54 +22 +73 +77 +86 +24 +31 +1 +88 +39 +67 +32 +72 +11 +75 +89 +99 +71 +41 +34 +20 +7 +70 +17 +25 +83 +79 +51 +90 +12 +14 +5 +98 +57 +28 +69 +50 +33 +53 +62 +36 +29 +52 diff --git a/591/bricks.c b/591/bricks.c new file mode 100644 index 0000000..bd4d047 --- /dev/null +++ b/591/bricks.c @@ -0,0 +1,23 @@ +#include + +int main(){ + int n, j=0; + scanf("%d", &n); + while(n>0){ + j++; + int heights[100], avg, sum=0, i, moves=0, move, h; + for(i=0; i