{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eIn the C++ language, the values of variables are stored somewhere in the computer memory as zeros and ones. Our program does not need to know the exact location where a variable is stored since one can simply refer to it by its name.\u003c/p\u003e\u003cp\u003eWhat the program needs to be aware of is the kind of data stored in every variable. Storing a simple integer is not the same as storing a letter or a large floating-point number. Even though they are all represented by zeros and ones, they are not interpreted in the same way, and in many cases, they don\u0027t occupy the same amount of memory.\u003c/p\u003e\u003cp\u003eFundamental data types, implemented directly by the language, represent the basic storage units supported natively by most systems. They can be mainly classified into four types.\u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eCharacter types:\u003c/span\u003e They can represent a single character, such as \u0027A\u0027 or \u0027$\u0027. The most basic type is \u003cspan class\u003d\"tex-font-style-tt\"\u003echar\u003c/span\u003e, which is a one-byte character.\u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eNumerical integer types:\u003c/span\u003e They can store a whole number value, such as $$$7$$$ or $$$1024$$$. They exist in a variety of sizes. The most basic one is \u003cspan class\u003d\"tex-font-style-tt\"\u003eint\u003c/span\u003e, which is a four-byte integer. \u003cspan class\u003d\"tex-font-style-tt\"\u003elong long\u003c/span\u003e is a larger one which occupies twice as many memories as \u003cspan class\u003d\"tex-font-style-tt\"\u003eint\u003c/span\u003e does. A wider type of integer \u003cspan class\u003d\"tex-font-style-tt\"\u003e__int128\u003c/span\u003e may appear in some new systems, which is a $$$16$$$-byte integer and rarely useful.\u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eFloating-point types:\u003c/span\u003e They can represent real values, such as $$$3.14$$$ or $$$0.01$$$, with different levels of precision, depending on which of the three floating-point types is used. \u003cspan class\u003d\"tex-font-style-tt\"\u003efloat\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003edouble\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003elong double\u003c/span\u003e correspond to \u003cspan class\u003d\"tex-font-style-tt\"\u003eint\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003elong long\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003e__int128\u003c/span\u003e where the former types hold the same amount of memory as the latter types used respectively.\u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eBoolean type:\u003c/span\u003e The boolean type, known in C++ as \u003cspan class\u003d\"tex-font-style-tt\"\u003ebool\u003c/span\u003e, can only represent one of two states, true or false. It is a one-byte type.\u003c/p\u003e\u003cp\u003eNow you have a code in C++, $$$n$$$ lines of which apply several variables and arrays. Also, I have checked it so I can claim that all variables and arrays in this code are global without any conflicts.\u003c/p\u003e\u003cp\u003eAs a novice, each line in your code may only apply for one variable or one array; all types of these variables and arrays are mentioned above; any other types unmentioned can not appear in the code. Your task in this problem is to calculate the number of memories in total that the code is using. Output your answer in Kibibyte ($$$1$$$ Kibibyte is $$$1024$$$ bytes) and round it up to the nearest integer.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input contains several test cases, and the first line contains a positive integer $$$T$$$ indicating the number of test cases which is up to $$$100$$$.\u003c/p\u003e\u003cp\u003eFor each test case, the first line contains a positive integer $$$n$$$, which is up to $$$1000$$$, indicating the total number of lines to apply (i.\u0026nbsp;e. allocate memory) for variables and arrays in the code. Each of the following $$$n$$$ lines may declare a variable in the form\u003c/p\u003e\u003cul\u003e \u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003etype variable_name;\u003c/span\u003e \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eor declare a new array in the form\u003c/p\u003e\u003cul\u003e \u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003etype array_name[array_size];\u003c/span\u003e \u003c/li\u003e\u003c/ul\u003e\u003cp\u003ewhere \u003cspan class\u003d\"tex-font-style-tt\"\u003etype\u003c/span\u003e must be one name of the aforementioned types. All \u003cspan class\u003d\"tex-font-style-tt\"\u003evariable_name\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003earray_name\u003c/span\u003e are distinct strings containing only lowercase letters whose lengths are up to $$$10$$$, and all \u003cspan class\u003d\"tex-font-style-tt\"\u003earray_size\u003c/span\u003e are positive integers which are up to $$$10^5$$$. Except for spaces in or after the name of some type, no extra spaces are allowed in the input. In other words, we guarantee that no consecutive spaces appear in the input.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output a line containing \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eCase #x: y\u003c/span\u003e\" (without quotes), where \u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e is the test case number starting from $$$1$$$, and \u003cspan class\u003d\"tex-font-style-tt\"\u003ey\u003c/span\u003e indicates the total number of allocated memories in Kibibyte which is rounded up to the nearest integer.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n8\nbool a;\nchar b;\nint c;\nlong long d;\n__int128 e;\nfloat f;\ndouble g;\nlong double h;\n1\nint a[1000];\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: 1\nCase #2: 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the second sample case, the memory usage is $$$4000$$$ bytes, which should be rounded up to $$$4$$$ Kibibytes.\u003c/p\u003e"}}]}