Computer Programming Contest Preparation

ToolBox - Source for: 110/11044/a.c



/home/toolbox/public_html/solutions/110/11044/a.c
    1 #include <stdio.h>
    2 #include <string.h>
    3 #include <sys/types.h>
    4 #include <sys/stat.h>
    5 #include <fcntl.h>
    6 #include <stdlib.h>
    7 #include <math.h>
    8 #include <stdint.h>
    9 
   10 #define TRUE  (1 == 1)
   11 #define FALSE (1 != 1)
   12 
   13 #define DEBUG if (FALSE)
   14 
   15 /* fprintf(stderr, "functionName: message", varslist); */
   16 
   17 /*
   18  *  Author: Isaac Traxler
   19  *    Date: 2014-10-26
   20  * Purpose: UVA Hack-a-thon
   21  * Problem: 11044 - Nessie
   22  */
   23 
   24 /*
   25  * This template reads data a specified number of times.
   26  */
   27 
   28 int numberOfTimes;
   29 int r;
   30 int c;
   31 
   32 void init()
   33 {
   34     /* FUNCTION init */
   35     scanf("%d ", &numberOfTimes);
   36 } /* FUNCTION init */
   37 
   38 void dump()
   39 {
   40     /* FUNCTION dump */
   41 } /* FUNCTION dump */
   42 
   43 void getInput()
   44 {
   45     /* FUNCTION getInput */
   46     scanf(" %d %d ", &r, &c);
   47 } /* FUNCTION getInput */
   48 
   49 void process()
   50 {
   51     /* FUNCTION process */
   52     int t;
   53 
   54     t = (r / 3) * (c / 3);
   55     printf("%d\n", t);
   56 } /* FUNCTION process */
   57 
   58 int main ()
   59 {
   60     /* main */
   61     int i;
   62 
   63     init();
   64     for (i=0; i<numberOfTimes; i++)
   65         {
   66             /* while */
   67             getInput();
   68             process();
   69         } /* while */
   70 
   71     return EXIT_SUCCESS;
   72 } /* main */
   73 
   74