2010 Canadian Computing Competition, Stage 1

Problem J3: Punchy

In the early days of computing, instructions had to be “punched” onto rectangular cards, one instruction per card. This card deck was then fed into a card reader so the program could be read and executed. Students put elastic bands around their card deck, and, often, carried their cards in a box for fear that they would become rearranged, and thus, their program would be incorrect.

Poor Bill though...he left his cards right near a window and the wind blew his neat deck of cards all over the place, and thus his program is out of order! Bill decides to pick up the cards in some random order and then execute the program.

Write a program to read and execute the commands in Bill’s “new” program.

Input Format

The programming language that Bill is using has only two variables (A and B) and seven different types of instructions.

Initially, the variables A and B contain the value 0.

There is one instruction per line. An instruction is an integer in the range 1…7, possibly followed by a variable name, which in turn is possibly followed by either a number or a variable.

In all instructions below, the variable X or Y may refer to either A or B. The specific instructions are:

  • 1 X n means set the variable X to the integer value n;
  • 2 X means output the value of variable X to the screen;
  • 3 X Y means calculate X + Y and store the value in variable X;
  • 4 X Y means calculate X × Y and store the value in variable X;
  • 5 X Y means calculate X − Y and store the value in variable X;
  • 6 X Y means calculate the quotient of X/Y and store the value in variable X as an integer, discarding the remainder.
  • 7 means stop execution of this program.

You may assume that all division instructions do not cause a division by zero, and that all other operations (including instruction 1) do not cause the computed/stored value to be larger than 10000 or smaller than −10000.

(To clarify division of negative numbers, −3/2 and 3/−2 both have quotient −1 and −3/−2 has quotient 1.)

Output Format

Your program should output the value of the indicated variables, one integer per line, until the “stop” instruction has been read in, at which time your program should stop execution.

Sample Input

1 A 3
1 B 4
2 B
2 A
3 A B
2 A
5 A A
2 A
2 B
7

Sample Output

4
3
7
0
4

All Submissions
Best Solutions


Point Value: 5
Time Limit: 2.00s
Memory Limit: 16M
Added: Feb 23, 2010

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)


A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 8190

Filename: libraries/Comments_lib.php

Line Number: 100

#0  comments_lib->preprocess_for_render() called at [/var/trunk/application/libraries/Comments_lib.php:100]
#1  comments_lib->print_comment(8190) called at [/var/trunk/application/libraries/Comments_lib.php:141]
#2  comments_lib->display(0) called at [/var/trunk/application/views/problems/desc.php:140]
#3  include(/var/trunk/application/views/problems/desc.php) called at [/var/trunk/system/core/Loader.php:914]
#4  CI_Loader->_ci_load(Array ([_ci_view] => problems/desc,[_ci_vars] => ,[_ci_return] => 1)) called at [/var/trunk/system/core/Loader.php:445]
#5  CI_Loader->view(problems/desc, , 1) called at [/var/trunk/application/views/templatev2/main.php:118]
#6  include(/var/trunk/application/views/templatev2/main.php) called at [/var/trunk/system/core/Loader.php:914]
#7  CI_Loader->_ci_load(Array ([_ci_view] => templatev2/main,[_ci_vars] => Array ([title] => CCC10J3 - Punchy,[page] => problems/desc,[problem] => ccc10j3,[info] => stdClass Object ([id] => 555,[date_added] => 1266962642,[name] => ccc10j3,[nicename] => CCC10J3 - Punchy,[probtext] => 2010 Canadian Computing Competition, Stage 1
Problem J3: Punchy

In the early days of computing, instructions had to be “punched” onto rectangular cards, one instruction
per card. This card deck was then fed into a card reader so the program could be read and
executed. Students put elastic bands around their card deck, and, often, carried their cards in a box
for fear that they would become rearranged, and thus, their program would be incorrect.

Poor Bill though...he left his cards right near a window and the wind blew his neat deck of cards
all over the place, and thus his program is out of order! Bill decides to pick up the cards in some
random order and then execute the program.

Write a program to read and execute the commands in Bill’s “new” program.

Input Format
The programming language that Bill is using has only two variables (A and B) and seven different
types of instructions.

Initially, the variables A and B contain the value 0.

There is one instruction per line. An instruction is an integer in the range 1…7, possibly followed
by a variable name, which in turn is possibly followed by either a number or a variable.

In all instructions below, the variable X or Y may refer to either A or B. The specific instructions
are:


1 X n means set the variable X to the integer value n;
2 X means output the value of variable X to the screen;
3 X Y means calculate X + Y and store the value in variable X;
4 X Y means calculate X × Y and store the value in variable X;
5 X Y means calculate X − Y and store the value in variable X;
6 X Y means calculate the quotient of X/Y and store the value in variable X as an integer, discarding the remainder.
7 means stop execution of this program.


You may assume that all division instructions do not cause a division by zero, and that all other
operations (including instruction 1) do not cause the computed/stored value to be larger than 10000
or smaller than −10000.

(To clarify division of negative numbers, −3/2 and 3/−2 both have quotient −1 and −3/−2 has
quotient 1.)

Output Format
Your program should output the value of the indicated variables, one integer per line, until the
“stop” instruction has been read in, at which time your program should stop execution.

Sample Input
1 A 3
1 B 4
2 B
2 A
3 A B
2 A
5 A A
2 A
2 B
7

Sample Output
4
3
7
0
4
 CCC10J3 - Punchy,[checker] => nows,[author] => ,[psetter] => ,[tim] => 2,[mem] => 16384,[contest] => 0,[value] => 5,[cvalue] => 5,[score] => 15,[partial] => ,[category] => ccc2010,[ccat] => ,[react] => batch,[languages] => 1,2,3,4,5,6,7,8,10,11,12,13,14,15,16),[types] => Array (),[comments] => Array ([0] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[1] => stdClass Object ([id] => 8191,[replyto] => 8190,[place_id] => 555,[date] => 1503336593,[username] => hello12,[title] => Re: SHUT UP hezeyu2007!,[msg] => lol,[sticky] => 0,[root] => 8190),[2] => stdClass Object ([id] => 8181,[replyto] => 0,[place_id] => 555,[date] => 1503082025,[username] => hezeyu2007,[title] => ,[msg] => :angel:,[sticky] => 0,[root] => 8181)),[offset] => 0,[languages] => Array ([C++03] => C++03 (g++ 4.1.3),[PAS] => Pascal (fpc 2.6.0-9),[C] => C (gcc 4.7.2),[HASK] => Haskell (ghc-6.12.1),[ASM] => Intel x86 assembly (nasm 2.10.01),[RUBY] => Ruby (ruby 2.1.2),[PYTH2] => Python 2 (python 2.6.8),[JAVA] => Java (OpenJDK javac 1.7.0_03),[PHP] => PHP (PHP 5.4.4),[SCM] => Scheme (Racket v5.0.1) (NOT WORKING),[CAML] => OCaml (version 3.12.1),[PERL] => Perl, v5.10.1,[C#] => C# (Mono version 2.4.4.0) (NOT WORKING),[C++11] => C++11 (g++ 4.9.1),[PYTH3] => Python 3 (python 3.2.3)),[desc] => 

2010 Canadian Computing Competition, Stage 1

Problem J3: Punchy

In the early days of computing, instructions had to be “punched” onto rectangular cards, one instruction per card. This card deck was then fed into a card reader so the program could be read and executed. Students put elastic bands around their card deck, and, often, carried their cards in a box for fear that they would become rearranged, and thus, their program would be incorrect.

Poor Bill though...he left his cards right near a window and the wind blew his neat deck of cards all over the place, and thus his program is out of order! Bill decides to pick up the cards in some random order and then execute the program.

Write a program to read and execute the commands in Bill’s “new” program.

Input Format

The programming language that Bill is using has only two variables (A and B) and seven different types of instructions.

Initially, the variables A and B contain the value 0.

There is one instruction per line. An instruction is an integer in the range 1…7, possibly followed by a variable name, which in turn is possibly followed by either a number or a variable.

In all instructions below, the variable X or Y may refer to either A or B. The specific instructions are:

  • 1 X n means set the variable X to the integer value n;
  • 2 X means output the value of variable X to the screen;
  • 3 X Y means calculate X + Y and store the value in variable X;
  • 4 X Y means calculate X × Y and store the value in variable X;
  • 5 X Y means calculate X − Y and store the value in variable X;
  • 6 X Y means calculate the quotient of X/Y and store the value in variable X as an integer, discarding the remainder.
  • 7 means stop execution of this program.

You may assume that all division instructions do not cause a division by zero, and that all other operations (including instruction 1) do not cause the computed/stored value to be larger than 10000 or smaller than −10000.

(To clarify division of negative numbers, −3/2 and 3/−2 both have quotient −1 and −3/−2 has quotient 1.)

Output Format

Your program should output the value of the indicated variables, one integer per line, until the “stop” instruction has been read in, at which time your program should stop execution.

Sample Input

1 A 3
1 B 4
2 B
2 A
3 A B
2 A
5 A A
2 A
2 B
7

Sample Output

4
3
7
0
4
),[_ci_return] => )) called at [/var/trunk/system/core/Loader.php:445] #8 CI_Loader->view(templatev2/main, Array ([title] => CCC10J3 - Punchy,[page] => problems/desc,[problem] => ccc10j3,[info] => stdClass Object ([id] => 555,[date_added] => 1266962642,[name] => ccc10j3,[nicename] => CCC10J3 - Punchy,[probtext] => 2010 Canadian Computing Competition, Stage 1 Problem J3: Punchy In the early days of computing, instructions had to be “punched” onto rectangular cards, one instruction per card. This card deck was then fed into a card reader so the program could be read and executed. Students put elastic bands around their card deck, and, often, carried their cards in a box for fear that they would become rearranged, and thus, their program would be incorrect. Poor Bill though...he left his cards right near a window and the wind blew his neat deck of cards all over the place, and thus his program is out of order! Bill decides to pick up the cards in some random order and then execute the program. Write a program to read and execute the commands in Bill’s “new” program. Input Format The programming language that Bill is using has only two variables (A and B) and seven different types of instructions. Initially, the variables A and B contain the value 0. There is one instruction per line. An instruction is an integer in the range 1…7, possibly followed by a variable name, which in turn is possibly followed by either a number or a variable. In all instructions below, the variable X or Y may refer to either A or B. The specific instructions are: 1 X n means set the variable X to the integer value n; 2 X means output the value of variable X to the screen; 3 X Y means calculate X + Y and store the value in variable X; 4 X Y means calculate X × Y and store the value in variable X; 5 X Y means calculate X − Y and store the value in variable X; 6 X Y means calculate the quotient of X/Y and store the value in variable X as an integer, discarding the remainder. 7 means stop execution of this program. You may assume that all division instructions do not cause a division by zero, and that all other operations (including instruction 1) do not cause the computed/stored value to be larger than 10000 or smaller than −10000. (To clarify division of negative numbers, −3/2 and 3/−2 both have quotient −1 and −3/−2 has quotient 1.) Output Format Your program should output the value of the indicated variables, one integer per line, until the “stop” instruction has been read in, at which time your program should stop execution. Sample Input 1 A 3 1 B 4 2 B 2 A 3 A B 2 A 5 A A 2 A 2 B 7 Sample Output 4 3 7 0 4 CCC10J3 - Punchy,[checker] => nows,[author] => ,[psetter] => ,[tim] => 2,[mem] => 16384,[contest] => 0,[value] => 5,[cvalue] => 5,[score] => 15,[partial] => ,[category] => ccc2010,[ccat] => ,[react] => batch,[languages] => 1,2,3,4,5,6,7,8,10,11,12,13,14,15,16),[types] => Array (),[comments] => Array ([0] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[1] => stdClass Object ([id] => 8191,[replyto] => 8190,[place_id] => 555,[date] => 1503336593,[username] => hello12,[title] => Re: SHUT UP hezeyu2007!,[msg] => lol,[sticky] => 0,[root] => 8190),[2] => stdClass Object ([id] => 8181,[replyto] => 0,[place_id] => 555,[date] => 1503082025,[username] => hezeyu2007,[title] => ,[msg] => :angel:,[sticky] => 0,[root] => 8181)),[offset] => 0,[languages] => Array ([C++03] => C++03 (g++ 4.1.3),[PAS] => Pascal (fpc 2.6.0-9),[C] => C (gcc 4.7.2),[HASK] => Haskell (ghc-6.12.1),[ASM] => Intel x86 assembly (nasm 2.10.01),[RUBY] => Ruby (ruby 2.1.2),[PYTH2] => Python 2 (python 2.6.8),[JAVA] => Java (OpenJDK javac 1.7.0_03),[PHP] => PHP (PHP 5.4.4),[SCM] => Scheme (Racket v5.0.1) (NOT WORKING),[CAML] => OCaml (version 3.12.1),[PERL] => Perl, v5.10.1,[C#] => C# (Mono version 2.4.4.0) (NOT WORKING),[C++11] => C++11 (g++ 4.9.1),[PYTH3] => Python 3 (python 3.2.3)),[desc] =>

2010 Canadian Computing Competition, Stage 1

Problem J3: Punchy

In the early days of computing, instructions had to be “punched” onto rectangular cards, one instruction per card. This card deck was then fed into a card reader so the program could be read and executed. Students put elastic bands around their card deck, and, often, carried their cards in a box for fear that they would become rearranged, and thus, their program would be incorrect.

Poor Bill though...he left his cards right near a window and the wind blew his neat deck of cards all over the place, and thus his program is out of order! Bill decides to pick up the cards in some random order and then execute the program.

Write a program to read and execute the commands in Bill’s “new” program.

Input Format

The programming language that Bill is using has only two variables (A and B) and seven different types of instructions.

Initially, the variables A and B contain the value 0.

There is one instruction per line. An instruction is an integer in the range 1…7, possibly followed by a variable name, which in turn is possibly followed by either a number or a variable.

In all instructions below, the variable X or Y may refer to either A or B. The specific instructions are:

  • 1 X n means set the variable X to the integer value n;
  • 2 X means output the value of variable X to the screen;
  • 3 X Y means calculate X + Y and store the value in variable X;
  • 4 X Y means calculate X × Y and store the value in variable X;
  • 5 X Y means calculate X − Y and store the value in variable X;
  • 6 X Y means calculate the quotient of X/Y and store the value in variable X as an integer, discarding the remainder.
  • 7 means stop execution of this program.

You may assume that all division instructions do not cause a division by zero, and that all other operations (including instruction 1) do not cause the computed/stored value to be larger than 10000 or smaller than −10000.

(To clarify division of negative numbers, −3/2 and 3/−2 both have quotient −1 and −3/−2 has quotient 1.)

Output Format

Your program should output the value of the indicated variables, one integer per line, until the “stop” instruction has been read in, at which time your program should stop execution.

Sample Input

1 A 3
1 B 4
2 B
2 A
3 A B
2 A
5 A A
2 A
2 B
7

Sample Output

4
3
7
0
4
)) called at [/var/trunk/application/controllers/Problems.php:179] #9 Problems->desc(ccc10j3) #10 call_user_func_array(Array ([0] => Problems Object ([benchmark] => CI_Benchmark Object ([marker] => Array ([total_execution_time_start] => 1506086283.4899,[loading_time:_base_classes_start] => 1506086283.4899,[loading_time:_base_classes_end] => 1506086283.4911,[controller_execution_time_( Problems / desc )_start] => 1506086283.4911)),[hooks] => CI_Hooks Object ([enabled] => ,[hooks] => Array (),[] => Array (),[] => ),[config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/)),[log] => CI_Log Object ([] => /var/trunk/application/logs/,[] => 420,[] => 0,[] => Array (),[] => Y-m-d H:i:s,[] => php,[] => 1,[] => Array ([ERROR] => 1,[DEBUG] => 2,[INFO] => 3,[ALL] => 4)),[utf8] => CI_Utf8 Object (),[uri] => CI_URI Object ([keyval] => Array (),[uri_string] => problem/ccc10j3,[segments] => Array ([1] => problem,[2] => ccc10j3),[rsegments] => Array ([1] => problems,[2] => desc,[3] => ccc10j3),[] => a-z 0-9~%.,:_\=\-\?,[config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/))),[router] => CI_Router Object ([config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/)),[routes] => Array ([scaffolding_trigger] => ,[^submissions/([^,/]*)$] => submissions/view/$1,[^submissions/([^,/]*),(.*)$] => submissions/view/$1,$2,[user/(:any)] => users/info/$1,[organization/(:any)] => organizations/info/$1,[problem(?:s/desc)?(?:/[^/]*)?/images/(.+)] => content/get/desc/$1,[problem/(.+)] => problems/desc/$1,[problems/analysis/images/(.+)] => content/get/analysis/$1,[problems/([^=/]*=.*)] => problems/view/$1,[problems/(:num)] => problems/view/$1,[announcement/(.+)] => announcements/thread/$1,[submit] => submissions/submit,[test] => submissions/test,[main/(:num)] => main/index/$1,[exec/(:any)] => internal/exec/$1,[content/analysis/(:any)] => content/get/analysis/$1,[content/testdata/(.+)] => content/get/testdata/$1),[class] => problems,[method] => desc,[directory] => ,[default_controller] => main,[translate_uri_dashes] => ,[enable_query_strings] => ,[uri] => CI_URI Object ([keyval] => Array (),[uri_string] => problem/ccc10j3,[segments] => Array ([1] => problem,[2] => ccc10j3),[rsegments] => Array ([1] => problems,[2] => desc,[3] => ccc10j3),[] => a-z 0-9~%.,:_\=\-\?,[config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/)))),[output] => CI_Output Object ([final_output] => ,[cache_expiration] => 0,[headers] => Array (),[mimes] => Array ([hqx] => Array ([0] => application/mac-binhex40,[1] => application/mac-binhex,[2] => application/x-binhex40,[3] => application/x-mac-binhex40),[cpt] => application/mac-compactpro,[csv] => Array ([0] => text/x-comma-separated-values,[1] => text/comma-separated-values,[2] => application/octet-stream,[3] => application/vnd.ms-excel,[4] => application/x-csv,[5] => text/x-csv,[6] => text/csv,[7] => application/csv,[8] => application/excel,[9] => application/vnd.msexcel,[10] => text/plain),[bin] => Array ([0] => application/macbinary,[1] => application/mac-binary,[2] => application/octet-stream,[3] => application/x-binary,[4] => application/x-macbinary),[dms] => application/octet-stream,[lha] => application/octet-stream,[lzh] => application/octet-stream,[exe] => Array ([0] => application/octet-stream,[1] => application/x-msdownload),[class] => application/octet-stream,[psd] => Array ([0] => application/x-photoshop,[1] => image/vnd.adobe.photoshop),[so] => application/octet-stream,[sea] => application/octet-stream,[dll] => application/octet-stream,[oda] => application/oda,[pdf] => Array ([0] => application/pdf,[1] => application/force-download,[2] => application/x-download,[3] => binary/octet-stream),[ai] => Array ([0] => application/pdf,[1] => application/postscript),[eps] => application/postscript,[ps] => application/postscript,[smi] => application/smil,[smil] => application/smil,[mif] => application/vnd.mif,[xls] => Array ([0] => application/vnd.ms-excel,[1] => application/msexcel,[2] => application/x-msexcel,[3] => application/x-ms-excel,[4] => application/x-excel,[5] => application/x-dos_ms_excel,[6] => application/xls,[7] => application/x-xls,[8] => application/excel,[9] => application/download,[10] => application/vnd.ms-office,[11] => application/msword),[ppt] => Array ([0] => application/powerpoint,[1] => application/vnd.ms-powerpoint,[2] => application/vnd.ms-office,[3] => application/msword),[pptx] => Array ([0] => application/vnd.openxmlformats-officedocument.presentationml.presentation,[1] => application/x-zip,[2] => application/zip),[wbxml] => application/wbxml,[wmlc] => application/wmlc,[dcr] => application/x-director,[dir] => application/x-director,[dxr] => application/x-director,[dvi] => application/x-dvi,[gtar] => application/x-gtar,[gz] => application/x-gzip,[gzip] => application/x-gzip,[php] => Array ([0] => application/x-httpd-php,[1] => application/php,[2] => application/x-php,[3] => text/php,[4] => text/x-php,[5] => application/x-httpd-php-source),[php4] => application/x-httpd-php,[php3] => application/x-httpd-php,[phtml] => application/x-httpd-php,[phps] => application/x-httpd-php-source,[js] => Array ([0] => application/x-javascript,[1] => text/plain),[swf] => application/x-shockwave-flash,[sit] => application/x-stuffit,[tar] => application/x-tar,[tgz] => Array ([0] => application/x-tar,[1] => application/x-gzip-compressed),[z] => application/x-compress,[xhtml] => application/xhtml+xml,[xht] => application/xhtml+xml,[zip] => Array ([0] => application/x-zip,[1] => application/zip,[2] => application/x-zip-compressed,[3] => application/s-compressed,[4] => multipart/x-zip),[rar] => Array ([0] => application/x-rar,[1] => application/rar,[2] => application/x-rar-compressed),[mid] => audio/midi,[midi] => audio/midi,[mpga] => audio/mpeg,[mp2] => audio/mpeg,[mp3] => Array ([0] => audio/mpeg,[1] => audio/mpg,[2] => audio/mpeg3,[3] => audio/mp3),[aif] => Array ([0] => audio/x-aiff,[1] => audio/aiff),[aiff] => Array ([0] => audio/x-aiff,[1] => audio/aiff),[aifc] => audio/x-aiff,[ram] => audio/x-pn-realaudio,[rm] => audio/x-pn-realaudio,[rpm] => audio/x-pn-realaudio-plugin,[ra] => audio/x-realaudio,[rv] => video/vnd.rn-realvideo,[wav] => Array ([0] => audio/x-wav,[1] => audio/wave,[2] => audio/wav),[bmp] => Array ([0] => image/bmp,[1] => image/x-bmp,[2] => image/x-bitmap,[3] => image/x-xbitmap,[4] => image/x-win-bitmap,[5] => image/x-windows-bmp,[6] => image/ms-bmp,[7] => image/x-ms-bmp,[8] => application/bmp,[9] => application/x-bmp,[10] => application/x-win-bitmap),[gif] => image/gif,[jpeg] => Array ([0] => image/jpeg,[1] => image/pjpeg),[jpg] => Array ([0] => image/jpeg,[1] => image/pjpeg),[jpe] => Array ([0] => image/jpeg,[1] => image/pjpeg),[png] => Array ([0] => image/png,[1] => image/x-png),[tiff] => image/tiff,[tif] => image/tiff,[css] => Array ([0] => text/css,[1] => text/plain),[html] => Array ([0] => text/html,[1] => text/plain),[htm] => Array ([0] => text/html,[1] => text/plain),[shtml] => Array ([0] => text/html,[1] => text/plain),[txt] => text/plain,[text] => text/plain,[log] => Array ([0] => text/plain,[1] => text/x-log),[rtx] => text/richtext,[rtf] => text/rtf,[xml] => Array ([0] => application/xml,[1] => text/xml,[2] => text/plain),[xsl] => Array ([0] => application/xml,[1] => text/xsl,[2] => text/xml),[mpeg] => video/mpeg,[mpg] => video/mpeg,[mpe] => video/mpeg,[qt] => video/quicktime,[mov] => video/quicktime,[avi] => Array ([0] => video/x-msvideo,[1] => video/msvideo,[2] => video/avi,[3] => application/x-troff-msvideo),[movie] => video/x-sgi-movie,[doc] => Array ([0] => application/msword,[1] => application/vnd.ms-office),[docx] => Array ([0] => application/vnd.openxmlformats-officedocument.wordprocessingml.document,[1] => application/zip,[2] => application/msword,[3] => application/x-zip),[dot] => Array ([0] => application/msword,[1] => application/vnd.ms-office),[dotx] => Array ([0] => application/vnd.openxmlformats-officedocument.wordprocessingml.document,[1] => application/zip,[2] => application/msword),[xlsx] => Array ([0] => application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,[1] => application/zip,[2] => application/vnd.ms-excel,[3] => application/msword,[4] => application/x-zip),[word] => Array ([0] => application/msword,[1] => application/octet-stream),[xl] => application/excel,[eml] => message/rfc822,[json] => Array ([0] => application/json,[1] => text/json),[pem] => Array ([0] => application/x-x509-user-cert,[1] => application/x-pem-file,[2] => application/octet-stream),[p10] => Array ([0] => application/x-pkcs10,[1] => application/pkcs10),[p12] => application/x-pkcs12,[p7a] => application/x-pkcs7-signature,[p7c] => Array ([0] => application/pkcs7-mime,[1] => application/x-pkcs7-mime),[p7m] => Array ([0] => application/pkcs7-mime,[1] => application/x-pkcs7-mime),[p7r] => application/x-pkcs7-certreqresp,[p7s] => application/pkcs7-signature,[crt] => Array ([0] => application/x-x509-ca-cert,[1] => application/x-x509-user-cert,[2] => application/pkix-cert),[crl] => Array ([0] => application/pkix-crl,[1] => application/pkcs-crl),[der] => application/x-x509-ca-cert,[kdb] => application/octet-stream,[pgp] => application/pgp,[gpg] => application/gpg-keys,[sst] => application/octet-stream,[csr] => application/octet-stream,[rsa] => application/x-pkcs7,[cer] => Array ([0] => application/pkix-cert,[1] => application/x-x509-ca-cert),[3g2] => video/3gpp2,[3gp] => video/3gp,[mp4] => video/mp4,[m4a] => audio/x-m4a,[f4v] => video/mp4,[webm] => video/webm,[aac] => audio/x-acc,[m4u] => application/vnd.mpegurl,[m3u] => text/plain,[xspf] => application/xspf+xml,[vlc] => application/videolan,[wmv] => Array ([0] => video/x-ms-wmv,[1] => video/x-ms-asf),[au] => audio/x-au,[ac3] => audio/ac3,[flac] => audio/x-flac,[ogg] => audio/ogg,[kmz] => Array ([0] => application/vnd.google-earth.kmz,[1] => application/zip,[2] => application/x-zip),[kml] => Array ([0] => application/vnd.google-earth.kml+xml,[1] => application/xml,[2] => text/xml),[ics] => text/calendar,[ical] => text/calendar,[zsh] => text/x-scriptzsh,[7zip] => Array ([0] => application/x-compressed,[1] => application/x-zip-compressed,[2] => application/zip,[3] => multipart/x-zip),[cdr] => Array ([0] => application/cdr,[1] => application/coreldraw,[2] => application/x-cdr,[3] => application/x-coreldraw,[4] => image/cdr,[5] => image/x-cdr,[6] => zz-application/zz-winassoc-cdr),[wma] => Array ([0] => audio/x-ms-wma,[1] => video/x-ms-asf),[jar] => Array ([0] => application/java-archive,[1] => application/x-java-application,[2] => application/x-jar,[3] => application/x-compressed),[svg] => Array ([0] => image/svg+xml,[1] => application/xml,[2] => text/xml),[vcf] => text/x-vcard),[] => text/html,[enable_profiler] => ,[] => ,[] => ,[] => Array (),[parse_exec_vars] => 1),[security] => CI_Security Object ([filename_bad_chars] => Array ([0] => ../,[1] => ,[3] => <,[4] => >,[5] => ',[6] => ",[7] => &,[8] => $,[9] => #,[10] => {,[11] => },[12] => [,[13] => ],[14] => =,[15] => ;,[16] => ?,[17] => %20,[18] => %22,[19] => %3c,[20] => %253c,[21] => %3e,[22] => %0e,[23] => %28,[24] => %29,[25] => %2528,[26] => %26,[27] => %24,[28] => %3f,[29] => %3b,[30] => %3d),[charset] => UTF-8,[] => ,[] => cc26e1f2013074363c9230192356b096,[] => 7200,[] => csrf_test_name,[] => csrf_cookie_name,[] => Array ([document.cookie] => [removed],[document.write] => [removed],[.parentNode] => [removed],[.innerHTML] => [removed],[-moz-binding] => [removed],[] => -->,[ <![CDATA[,[] => <comment>),[] => Array ([0] => javascript\s*:,[1] => (document|(document\.)?window)\.(location|on\w*),[2] => expression\s*(\(|&\#40;),[3] => vbscript\s*:,[4] => wscript\s*:,[5] => jscript\s*:,[6] => vbs\s*:,[7] => Redirect\s+30\d,[8] => (["'])?data\s*:[^\1]*?base64[^\1]*?,[^\1]*?\1?)),[input] => CI_Input Object ([] => ,[] => ,[] => ,[] => ,[] => 1,[] => Array (),[] => ,[] => ,[] => CI_Security Object ([filename_bad_chars] => Array ([0] => ../,[1] => ,[3] => <,[4] => >,[5] => ',[6] => ",[7] => &,[8] => $,[9] => #,[10] => {,[11] => },[12] => [,[13] => ],[14] => =,[15] => ;,[16] => ?,[17] => %20,[18] => %22,[19] => %3c,[20] => %253c,[21] => %3e,[22] => %0e,[23] => %28,[24] => %29,[25] => %2528,[26] => %26,[27] => %24,[28] => %3f,[29] => %3b,[30] => %3d),[charset] => UTF-8,[] => ,[] => cc26e1f2013074363c9230192356b096,[] => 7200,[] => csrf_test_name,[] => csrf_cookie_name,[] => Array ([document.cookie] => [removed],[document.write] => [removed],[.parentNode] => [removed],[.innerHTML] => [removed],[-moz-binding] => [removed],[] => -->,[ <![CDATA[,[] => <comment>),[] => Array ([0] => javascript\s*:,[1] => (document|(document\.)?window)\.(location|on\w*),[2] => expression\s*(\(|&\#40;),[3] => vbscript\s*:,[4] => wscript\s*:,[5] => jscript\s*:,[6] => vbs\s*:,[7] => Redirect\s+30\d,[8] => (["'])?data\s*:[^\1]*?base64[^\1]*?,[^\1]*?\1?)),[] => CI_Utf8 Object ()),[lang] => CI_Lang Object ([language] => Array (),[is_loaded] => Array ()),[load] => CI_Loader Object ([] => 1,[] => Array ([/var/trunk/application/views/] => 1),[] => Array ([0] => /var/trunk/application/,[1] => /var/trunk/system/),[] => Array ([0] => /var/trunk/application/),[] => Array ([0] => /var/trunk/application/,[1] => /var/trunk/system/),[] => Array ([title] => CCC10J3 - Punchy,[page] => problems/desc,[problem] => ccc10j3,[info] => stdClass Object ([id] => 555,[date_added] => 1266962642,[name] => ccc10j3,[nicename] => CCC10J3 - Punchy,[probtext] => 2010 Canadian Computing Competition, Stage 1 Problem J3: Punchy In the early days of computing, instructions had to be “punched” onto rectangular cards, one instruction per card. This card deck was then fed into a card reader so the program could be read and executed. Students put elastic bands around their card deck, and, often, carried their cards in a box for fear that they would become rearranged, and thus, their program would be incorrect. Poor Bill though...he left his cards right near a window and the wind blew his neat deck of cards all over the place, and thus his program is out of order! Bill decides to pick up the cards in some random order and then execute the program. Write a program to read and execute the commands in Bill’s “new” program. Input Format The programming language that Bill is using has only two variables (A and B) and seven different types of instructions. Initially, the variables A and B contain the value 0. There is one instruction per line. An instruction is an integer in the range 1…7, possibly followed by a variable name, which in turn is possibly followed by either a number or a variable. In all instructions below, the variable X or Y may refer to either A or B. The specific instructions are: 1 X n means set the variable X to the integer value n; 2 X means output the value of variable X to the screen; 3 X Y means calculate X + Y and store the value in variable X; 4 X Y means calculate X × Y and store the value in variable X; 5 X Y means calculate X − Y and store the value in variable X; 6 X Y means calculate the quotient of X/Y and store the value in variable X as an integer, discarding the remainder. 7 means stop execution of this program. You may assume that all division instructions do not cause a division by zero, and that all other operations (including instruction 1) do not cause the computed/stored value to be larger than 10000 or smaller than −10000. (To clarify division of negative numbers, −3/2 and 3/−2 both have quotient −1 and −3/−2 has quotient 1.) Output Format Your program should output the value of the indicated variables, one integer per line, until the “stop” instruction has been read in, at which time your program should stop execution. Sample Input 1 A 3 1 B 4 2 B 2 A 3 A B 2 A 5 A A 2 A 2 B 7 Sample Output 4 3 7 0 4 CCC10J3 - Punchy,[checker] => nows,[author] => ,[psetter] => ,[tim] => 2,[mem] => 16384,[contest] => 0,[value] => 5,[cvalue] => 5,[score] => 15,[partial] => ,[category] => ccc2010,[ccat] => ,[react] => batch,[languages] => 1,2,3,4,5,6,7,8,10,11,12,13,14,15,16),[types] => Array (),[comments] => Array ([0] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[1] => stdClass Object ([id] => 8191,[replyto] => 8190,[place_id] => 555,[date] => 1503336593,[username] => hello12,[title] => Re: SHUT UP hezeyu2007!,[msg] => lol,[sticky] => 0,[root] => 8190),[2] => stdClass Object ([id] => 8181,[replyto] => 0,[place_id] => 555,[date] => 1503082025,[username] => hezeyu2007,[title] => ,[msg] => :angel:,[sticky] => 0,[root] => 8181)),[offset] => 0,[languages] => Array ([C++03] => C++03 (g++ 4.1.3),[PAS] => Pascal (fpc 2.6.0-9),[C] => C (gcc 4.7.2),[HASK] => Haskell (ghc-6.12.1),[ASM] => Intel x86 assembly (nasm 2.10.01),[RUBY] => Ruby (ruby 2.1.2),[PYTH2] => Python 2 (python 2.6.8),[JAVA] => Java (OpenJDK javac 1.7.0_03),[PHP] => PHP (PHP 5.4.4),[SCM] => Scheme (Racket v5.0.1) (NOT WORKING),[CAML] => OCaml (version 3.12.1),[PERL] => Perl, v5.10.1,[C#] => C# (Mono version 2.4.4.0) (NOT WORKING),[C++11] => C++11 (g++ 4.9.1),[PYTH3] => Python 3 (python 3.2.3)),[desc] =>

2010 Canadian Computing Competition, Stage 1

Problem J3: Punchy

In the early days of computing, instructions had to be “punched” onto rectangular cards, one instruction per card. This card deck was then fed into a card reader so the program could be read and executed. Students put elastic bands around their card deck, and, often, carried their cards in a box for fear that they would become rearranged, and thus, their program would be incorrect.

Poor Bill though...he left his cards right near a window and the wind blew his neat deck of cards all over the place, and thus his program is out of order! Bill decides to pick up the cards in some random order and then execute the program.

Write a program to read and execute the commands in Bill’s “new” program.

Input Format

The programming language that Bill is using has only two variables (A and B) and seven different types of instructions.

Initially, the variables A and B contain the value 0.

There is one instruction per line. An instruction is an integer in the range 1…7, possibly followed by a variable name, which in turn is possibly followed by either a number or a variable.

In all instructions below, the variable X or Y may refer to either A or B. The specific instructions are:

  • 1 X n means set the variable X to the integer value n;
  • 2 X means output the value of variable X to the screen;
  • 3 X Y means calculate X + Y and store the value in variable X;
  • 4 X Y means calculate X × Y and store the value in variable X;
  • 5 X Y means calculate X − Y and store the value in variable X;
  • 6 X Y means calculate the quotient of X/Y and store the value in variable X as an integer, discarding the remainder.
  • 7 means stop execution of this program.

You may assume that all division instructions do not cause a division by zero, and that all other operations (including instruction 1) do not cause the computed/stored value to be larger than 10000 or smaller than −10000.

(To clarify division of negative numbers, −3/2 and 3/−2 both have quotient −1 and −3/−2 has quotient 1.)

Output Format

Your program should output the value of the indicated variables, one integer per line, until the “stop” instruction has been read in, at which time your program should stop execution.

Sample Input

1 A 3
1 B 4
2 B
2 A
3 A B
2 A
5 A A
2 A
2 B
7

Sample Output

4
3
7
0
4
,[comment] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[can] => Array ([reply] => ,[edit] => ,[delete] => ,[delete_tree] => ,[rate] => )),[] => Array ([benchmark] => Benchmark,[hooks] => Hooks,[config] => Config,[log] => Log,[utf8] => Utf8,[uri] => URI,[router] => Router,[output] => Output,[security] => Security,[input] => Input,[lang] => Lang,[loader] => Loader,[agent] => User_agent,[session] => Session,[form_validation] => Form_validation,[auth_lib] => Auth_lib,[email] => Email,[alias] => Alias,[model] => Model,[pagination] => Pagination,[comments_lib] => Comments_lib,[exceptions] => Exceptions),[] => Array ([0] => users,[1] => problems,[2] => submissions,[3] => contests,[4] => languages,[5] => organizations,[6] => auth_model,[7] => comments),[] => Array ([url_helper] => 1,[global_helper] => 1,[html_helper] => 1,[cookie_helper] => 1,[my_form_helper] => 1,[form_helper] => 1),[] => Array ([unit_test] => unit,[user_agent] => agent),[benchmark] => CI_Benchmark Object ([marker] => Array ([total_execution_time_start] => 1506086283.4899,[loading_time:_base_classes_start] => 1506086283.4899,[loading_time:_base_classes_end] => 1506086283.4911,[controller_execution_time_( Problems / desc )_start] => 1506086283.4911)),[hooks] => CI_Hooks Object ([enabled] => ,[hooks] => Array (),[] => Array (),[] => ),[config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/)),[log] => CI_Log Object ([] => /var/trunk/application/logs/,[] => 420,[] => 0,[] => Array (),[] => Y-m-d H:i:s,[] => php,[] => 1,[] => Array ([ERROR] => 1,[DEBUG] => 2,[INFO] => 3,[ALL] => 4)),[utf8] => CI_Utf8 Object (),[uri] => CI_URI Object ([keyval] => Array (),[uri_string] => problem/ccc10j3,[segments] => Array ([1] => problem,[2] => ccc10j3),[rsegments] => Array ([1] => problems,[2] => desc,[3] => ccc10j3),[] => a-z 0-9~%.,:_\=\-\?,[config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/))),[router] => CI_Router Object ([config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/)),[routes] => Array ([scaffolding_trigger] => ,[^submissions/([^,/]*)$] => submissions/view/$1,[^submissions/([^,/]*),(.*)$] => submissions/view/$1,$2,[user/(:any)] => users/info/$1,[organization/(:any)] => organizations/info/$1,[problem(?:s/desc)?(?:/[^/]*)?/images/(.+)] => content/get/desc/$1,[problem/(.+)] => problems/desc/$1,[problems/analysis/images/(.+)] => content/get/analysis/$1,[problems/([^=/]*=.*)] => problems/view/$1,[problems/(:num)] => problems/view/$1,[announcement/(.+)] => announcements/thread/$1,[submit] => submissions/submit,[test] => submissions/test,[main/(:num)] => main/index/$1,[exec/(:any)] => internal/exec/$1,[content/analysis/(:any)] => content/get/analysis/$1,[content/testdata/(.+)] => content/get/testdata/$1),[class] => problems,[method] => desc,[directory] => ,[default_controller] => main,[translate_uri_dashes] => ,[enable_query_strings] => ,[uri] => CI_URI Object ([keyval] => Array (),[uri_string] => problem/ccc10j3,[segments] => Array ([1] => problem,[2] => ccc10j3),[rsegments] => Array ([1] => problems,[2] => desc,[3] => ccc10j3),[] => a-z 0-9~%.,:_\=\-\?,[config] => CI_Config Object ([config] => Array ([base_url] => http://wcipeg.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.,:_\=\-\?,[enable_query_strings] => ,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[sess_driver] => database,[sess_cookie_name] => ci_session,[sess_save_path] => ci_sessions,[sess_match_ip] => ,[sess_time_to_update] => 300,[cookie_prefix] => ,[cookie_domain] => wcipeg.com,[cookie_path] => /,[cookie_secure] => ,[global_xss_filtering] => ,[csrf_protection] => 1,[csrf_token_name] => csrf_test_name,[csrf_cookie_name] => csrf_cookie_name,[csrf_expire] => 7200,[csrf_exclude_uris] => Array ([0] => internal/.*),[compress_output] => ,[time_reference] => local,[rewrite_short_tags] => ,[proxy_ips] => ,[judge] => Array ([site_name] => PEG Judge,[admin_email] => [email protected],[socket] => unix:///var/run/pegjudge/socket,[recaptcha_enabled] => 1,[recaptcha_public_key] => 6Ld6m8ESAAAAAAiYZEwe9oyuoHTSMAVv2YncK1iA,[recaptcha_private_key] => 6Ld6m8ESAAAAAE8wXU36Xk9Go17tkVqjOwNofrgA,[password_hash_cost] => 12),[email] => Array ([protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[mailtype] => text,[charset] => utf-8,[smtp_timeout] => 10)),[is_loaded] => Array ([0] => /var/trunk/application/config/judge.php,[1] => /var/trunk/application/config/email.php),[_config_paths] => Array ([0] => /var/trunk/application/)))),[output] => CI_Output Object ([final_output] => ,[cache_expiration] => 0,[headers] => Array (),[mimes] => Array ([hqx] => Array ([0] => application/mac-binhex40,[1] => application/mac-binhex,[2] => application/x-binhex40,[3] => application/x-mac-binhex40),[cpt] => application/mac-compactpro,[csv] => Array ([0] => text/x-comma-separated-values,[1] => text/comma-separated-values,[2] => application/octet-stream,[3] => application/vnd.ms-excel,[4] => application/x-csv,[5] => text/x-csv,[6] => text/csv,[7] => application/csv,[8] => application/excel,[9] => application/vnd.msexcel,[10] => text/plain),[bin] => Array ([0] => application/macbinary,[1] => application/mac-binary,[2] => application/octet-stream,[3] => application/x-binary,[4] => application/x-macbinary),[dms] => application/octet-stream,[lha] => application/octet-stream,[lzh] => application/octet-stream,[exe] => Array ([0] => application/octet-stream,[1] => application/x-msdownload),[class] => application/octet-stream,[psd] => Array ([0] => application/x-photoshop,[1] => image/vnd.adobe.photoshop),[so] => application/octet-stream,[sea] => application/octet-stream,[dll] => application/octet-stream,[oda] => application/oda,[pdf] => Array ([0] => application/pdf,[1] => application/force-download,[2] => application/x-download,[3] => binary/octet-stream),[ai] => Array ([0] => application/pdf,[1] => application/postscript),[eps] => application/postscript,[ps] => application/postscript,[smi] => application/smil,[smil] => application/smil,[mif] => application/vnd.mif,[xls] => Array ([0] => application/vnd.ms-excel,[1] => application/msexcel,[2] => application/x-msexcel,[3] => application/x-ms-excel,[4] => application/x-excel,[5] => application/x-dos_ms_excel,[6] => application/xls,[7] => application/x-xls,[8] => application/excel,[9] => application/download,[10] => application/vnd.ms-office,[11] => application/msword),[ppt] => Array ([0] => application/powerpoint,[1] => application/vnd.ms-powerpoint,[2] => application/vnd.ms-office,[3] => application/msword),[pptx] => Array ([0] => application/vnd.openxmlformats-officedocument.presentationml.presentation,[1] => application/x-zip,[2] => application/zip),[wbxml] => application/wbxml,[wmlc] => application/wmlc,[dcr] => application/x-director,[dir] => application/x-director,[dxr] => application/x-director,[dvi] => application/x-dvi,[gtar] => application/x-gtar,[gz] => application/x-gzip,[gzip] => application/x-gzip,[php] => Array ([0] => application/x-httpd-php,[1] => application/php,[2] => application/x-php,[3] => text/php,[4] => text/x-php,[5] => application/x-httpd-php-source),[php4] => application/x-httpd-php,[php3] => application/x-httpd-php,[phtml] => application/x-httpd-php,[phps] => application/x-httpd-php-source,[js] => Array ([0] => application/x-javascript,[1] => text/plain),[swf] => application/x-shockwave-flash,[sit] => application/x-stuffit,[tar] => application/x-tar,[tgz] => Array ([0] => application/x-tar,[1] => application/x-gzip-compressed),[z] => application/x-compress,[xhtml] => application/xhtml+xml,[xht] => application/xhtml+xml,[zip] => Array ([0] => application/x-zip,[1] => application/zip,[2] => application/x-zip-compressed,[3] => application/s-compressed,[4] => multipart/x-zip),[rar] => Array ([0] => application/x-rar,[1] => application/rar,[2] => application/x-rar-compressed),[mid] => audio/midi,[midi] => audio/midi,[mpga] => audio/mpeg,[mp2] => audio/mpeg,[mp3] => Array ([0] => audio/mpeg,[1] => audio/mpg,[2] => audio/mpeg3,[3] => audio/mp3),[aif] => Array ([0] => audio/x-aiff,[1] => audio/aiff),[aiff] => Array ([0] => audio/x-aiff,[1] => audio/aiff),[aifc] => audio/x-aiff,[ram] => audio/x-pn-realaudio,[rm] => audio/x-pn-realaudio,[rpm] => audio/x-pn-realaudio-plugin,[ra] => audio/x-realaudio,[rv] => video/vnd.rn-realvideo,[wav] => Array ([0] => audio/x-wav,[1] => audio/wave,[2] => audio/wav),[bmp] => Array ([0] => image/bmp,[1] => image/x-bmp,[2] => image/x-bitmap,[3] => image/x-xbitmap,[4] => image/x-win-bitmap,[5] => image/x-windows-bmp,[6] => image/ms-bmp,[7] => image/x-ms-bmp,[8] => application/bmp,[9] => application/x-bmp,[10] => application/x-win-bitmap),[gif] => image/gif,[jpeg] => Array ([0] => image/jpeg,[1] => image/pjpeg),[jpg] => Array ([0] => image/jpeg,[1] => image/pjpeg),[jpe] => Array ([0] => image/jpeg,[1] => image/pjpeg),[png] => Array ([0] => image/png,[1] => image/x-png),[tiff] => image/tiff,[tif] => image/tiff,[css] => Array ([0] => text/css,[1] => text/plain),[html] => Array ([0] => text/html,[1] => text/plain),[htm] => Array ([0] => text/html,[1] => text/plain),[shtml] => Array ([0] => text/html,[1] => text/plain),[txt] => text/plain,[text] => text/plain,[log] => Array ([0] => text/plain,[1] => text/x-log),[rtx] => text/richtext,[rtf] => text/rtf,[xml] => Array ([0] => application/xml,[1] => text/xml,[2] => text/plain),[xsl] => Array ([0] => application/xml,[1] => text/xsl,[2] => text/xml),[mpeg] => video/mpeg,[mpg] => video/mpeg,[mpe] => video/mpeg,[qt] => video/quicktime,[mov] => video/quicktime,[avi] => Array ([0] => video/x-msvideo,[1] => video/msvideo,[2] => video/avi,[3] => application/x-troff-msvideo),[movie] => video/x-sgi-movie,[doc] => Array ([0] => application/msword,[1] => application/vnd.ms-office),[docx] => Array ([0] => application/vnd.openxmlformats-officedocument.wordprocessingml.document,[1] => application/zip,[2] => application/msword,[3] => application/x-zip),[dot] => Array ([0] => application/msword,[1] => application/vnd.ms-office),[dotx] => Array ([0] => application/vnd.openxmlformats-officedocument.wordprocessingml.document,[1] => application/zip,[2] => application/msword),[xlsx] => Array ([0] => application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,[1] => application/zip,[2] => application/vnd.ms-excel,[3] => application/msword,[4] => application/x-zip),[word] => Array ([0] => application/msword,[1] => application/octet-stream),[xl] => application/excel,[eml] => message/rfc822,[json] => Array ([0] => application/json,[1] => text/json),[pem] => Array ([0] => application/x-x509-user-cert,[1] => application/x-pem-file,[2] => application/octet-stream),[p10] => Array ([0] => application/x-pkcs10,[1] => application/pkcs10),[p12] => application/x-pkcs12,[p7a] => application/x-pkcs7-signature,[p7c] => Array ([0] => application/pkcs7-mime,[1] => application/x-pkcs7-mime),[p7m] => Array ([0] => application/pkcs7-mime,[1] => application/x-pkcs7-mime),[p7r] => application/x-pkcs7-certreqresp,[p7s] => application/pkcs7-signature,[crt] => Array ([0] => application/x-x509-ca-cert,[1] => application/x-x509-user-cert,[2] => application/pkix-cert),[crl] => Array ([0] => application/pkix-crl,[1] => application/pkcs-crl),[der] => application/x-x509-ca-cert,[kdb] => application/octet-stream,[pgp] => application/pgp,[gpg] => application/gpg-keys,[sst] => application/octet-stream,[csr] => application/octet-stream,[rsa] => application/x-pkcs7,[cer] => Array ([0] => application/pkix-cert,[1] => application/x-x509-ca-cert),[3g2] => video/3gpp2,[3gp] => video/3gp,[mp4] => video/mp4,[m4a] => audio/x-m4a,[f4v] => video/mp4,[webm] => video/webm,[aac] => audio/x-acc,[m4u] => application/vnd.mpegurl,[m3u] => text/plain,[xspf] => application/xspf+xml,[vlc] => application/videolan,[wmv] => Array ([0] => video/x-ms-wmv,[1] => video/x-ms-asf),[au] => audio/x-au,[ac3] => audio/ac3,[flac] => audio/x-flac,[ogg] => audio/ogg,[kmz] => Array ([0] => application/vnd.google-earth.kmz,[1] => application/zip,[2] => application/x-zip),[kml] => Array ([0] => application/vnd.google-earth.kml+xml,[1] => application/xml,[2] => text/xml),[ics] => text/calendar,[ical] => text/calendar,[zsh] => text/x-scriptzsh,[7zip] => Array ([0] => application/x-compressed,[1] => application/x-zip-compressed,[2] => application/zip,[3] => multipart/x-zip),[cdr] => Array ([0] => application/cdr,[1] => application/coreldraw,[2] => application/x-cdr,[3] => application/x-coreldraw,[4] => image/cdr,[5] => image/x-cdr,[6] => zz-application/zz-winassoc-cdr),[wma] => Array ([0] => audio/x-ms-wma,[1] => video/x-ms-asf),[jar] => Array ([0] => application/java-archive,[1] => application/x-java-application,[2] => application/x-jar,[3] => application/x-compressed),[svg] => Array ([0] => image/svg+xml,[1] => application/xml,[2] => text/xml),[vcf] => text/x-vcard),[] => text/html,[enable_profiler] => ,[] => ,[] => ,[] => Array (),[parse_exec_vars] => 1),[security] => CI_Security Object ([filename_bad_chars] => Array ([0] => ../,[1] => ,[3] => <,[4] => >,[5] => ',[6] => ",[7] => &,[8] => $,[9] => #,[10] => {,[11] => },[12] => [,[13] => ],[14] => =,[15] => ;,[16] => ?,[17] => %20,[18] => %22,[19] => %3c,[20] => %253c,[21] => %3e,[22] => %0e,[23] => %28,[24] => %29,[25] => %2528,[26] => %26,[27] => %24,[28] => %3f,[29] => %3b,[30] => %3d),[charset] => UTF-8,[] => ,[] => cc26e1f2013074363c9230192356b096,[] => 7200,[] => csrf_test_name,[] => csrf_cookie_name,[] => Array ([document.cookie] => [removed],[document.write] => [removed],[.parentNode] => [removed],[.innerHTML] => [removed],[-moz-binding] => [removed],[] => -->,[ <![CDATA[,[] => <comment>),[] => Array ([0] => javascript\s*:,[1] => (document|(document\.)?window)\.(location|on\w*),[2] => expression\s*(\(|&\#40;),[3] => vbscript\s*:,[4] => wscript\s*:,[5] => jscript\s*:,[6] => vbs\s*:,[7] => Redirect\s+30\d,[8] => (["'])?data\s*:[^\1]*?base64[^\1]*?,[^\1]*?\1?)),[input] => CI_Input Object ([] => ,[] => ,[] => ,[] => ,[] => 1,[] => Array (),[] => ,[] => ,[] => CI_Security Object ([filename_bad_chars] => Array ([0] => ../,[1] => ,[3] => <,[4] => >,[5] => ',[6] => ",[7] => &,[8] => $,[9] => #,[10] => {,[11] => },[12] => [,[13] => ],[14] => =,[15] => ;,[16] => ?,[17] => %20,[18] => %22,[19] => %3c,[20] => %253c,[21] => %3e,[22] => %0e,[23] => %28,[24] => %29,[25] => %2528,[26] => %26,[27] => %24,[28] => %3f,[29] => %3b,[30] => %3d),[charset] => UTF-8,[] => ,[] => cc26e1f2013074363c9230192356b096,[] => 7200,[] => csrf_test_name,[] => csrf_cookie_name,[] => Array ([document.cookie] => [removed],[document.write] => [removed],[.parentNode] => [removed],[.innerHTML] => [removed],[-moz-binding] => [removed],[] => -->,[ <![CDATA[,[] => <comment>),[] => Array ([0] => javascript\s*:,[1] => (document|(document\.)?window)\.(location|on\w*),[2] => expression\s*(\(|&\#40;),[3] => vbscript\s*:,[4] => wscript\s*:,[5] => jscript\s*:,[6] => vbs\s*:,[7] => Redirect\s+30\d,[8] => (["'])?data\s*:[^\1]*?base64[^\1]*?,[^\1]*?\1?)),[] => CI_Utf8 Object ()),[lang] => CI_Lang Object ([language] => Array (),[is_loaded] => Array ()),[load] => CI_Loader Object ( *RECURSION*,[db] => CI_DB_mysqli_driver Object ([dbdriver] => mysqli,[compress] => ,[delete_hack] => 1,[stricton] => ,[] => `,[] => ,[] => ,[] => Array (),[] => ,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => ,[] => ,[] => Array (),[] => Array (),[] => Array (),[] => ,[] => 0,[] => ,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[dsn] => ,[username] => judge,[password] => gnxh32s,[hostname] => 127.0.0.1,[database] => judge,[subdriver] => ,[dbprefix] => ,[char_set] => utf8,[dbcollat] => utf8_general_ci,[encrypt] => ,[swap_pre] => ,[port] => 3306,[pconnect] => ,[conn_id] => mysqli Object ([affected_rows] => ,[client_info] => ,[client_version] => ,[connect_errno] => ,[connect_error] => ,[errno] => ,[error] => ,[error_list] => ,[field_count] => ,[host_info] => ,[info] => ,[insert_id] => ,[server_info] => ,[server_version] => ,[stat] => ,[sqlstate] => ,[protocol_version] => ,[thread_id] => ,[warning_count] => ),[result_id] => mysqli_result Object ([current_field] => ,[field_count] => ,[lengths] => ,[num_rows] => ,[type] => ),[db_debug] => ,[benchmark] => 0.0077986717224121,[query_count] => 16,[bind_marker] => ?,[save_queries] => 1,[queries] => Array ([0] => SELECT GET_LOCK('37dae11f061d92733c630dea76c4a3055311d3d8', 300) AS ci_session_lock,[1] => SELECT `data` FROM `ci_sessions` WHERE `id` = '37dae11f061d92733c630dea76c4a3055311d3d8',[2] => SELECT `id` FROM `problems` WHERE `name` = 'ccc10j3' AND `contest` =0 LIMIT 1,[3] => SELECT `id` FROM `problems` WHERE `name` = 'ccc10j3' AND `contest` =0 LIMIT 1,[4] => SELECT * FROM `problems` WHERE `id` = '555',[5] => SELECT `idx`, `ext`, `name`, `shortname` FROM `languages` ORDER BY `idx` asc,[6] => SELECT comments.id AS id,replyto,place_id,date,username,title,msg,sticky,root FROM comments LEFT OUTER JOIN problems ON comments.place_id=problems.id WHERE place_id = '555' AND (place_id = 0 OR problems.contest = 0) ORDER BY date DESC LIMIT 0,999999,[7] => SELECT * FROM `probtype` WHERE `probid` = '555',[8] => SELECT * FROM `contests` WHERE `id` =0,[9] => SELECT `id` FROM `problems` WHERE `name` = 'ccc10j3' AND `contest` =0 LIMIT 1,[10] => SELECT * FROM `problems` WHERE `id` = '555',[11] => SELECT COUNT(*) AS `numrows` FROM `comment_ratings` WHERE `name` = '8192' AND `rating` = 1,[12] => SELECT COUNT(*) AS `numrows` FROM `comment_ratings` WHERE `name` = '8192' AND `rating` = -1,[13] => SELECT * FROM `users` WHERE `username` = 'hezeyu2007',[14] => SELECT * FROM `problems` WHERE `id` = '555',[15] => SELECT `rating` FROM `comment_ratings` WHERE `name` = '8192' AND `user` IS NULL),[query_times] => Array ([0] => 0.00018811225891113,[1] => 0.00079107284545898,[2] => 0.00025606155395508,[3] => 0.00023412704467773,[4] => 0.00031304359436035,[5] => 0.00027012825012207,[6] => 0.0037350654602051,[7] => 0.00035905838012695,[8] => 0.00023198127746582,[9] => 0.0002439022064209,[10] => 0.00021696090698242,[11] => 0.0002129077911377,[12] => 0.00024604797363281,[13] => 0.00017905235290527,[14] => 0.00018405914306641,[15] => 0.0001370906829834),[data_cache] => Array (),[trans_enabled] => 1,[trans_strict] => 1,[] => 0,[] => 1,[] => ,[cache_on] => ,[cachedir] => ,[cache_autodel] => ,[CACHE] => ,[] => 1,[] => Array ([0] => *),[] => ESCAPE '%s' ,[] => !,[] => Array ([0] => RAND(),[1] => RAND(%d)),[] => SELECT COUNT(*) AS ),[agent] => CI_User_agent Object ([agent] => CCBot/2.0 (http://commoncrawl.org/faq/),[is_browser] => ,[is_robot] => ,[is_mobile] => ,[languages] => Array (),[charsets] => Array (),[platforms] => Array ([windows nt 6.0] => Windows Longhorn,[windows nt 5.2] => Windows 2003,[windows nt 5.0] => Windows 2000,[windows nt 5.1] => Windows XP,[windows nt 4.0] => Windows NT 4.0,[winnt4.0] => Windows NT 4.0,[winnt 4.0] => Windows NT,[winnt] => Windows NT,[windows 98] => Windows 98,[win98] => Windows 98,[windows 95] => Windows 95,[win95] => Windows 95,[windows] => Unknown Windows OS,[os x] => Mac OS X,[ppc mac] => Power PC Mac,[freebsd] => FreeBSD,[ppc] => Macintosh,[linux] => Linux,[debian] => Debian,[sunos] => Sun Solaris,[beos] => BeOS,[apachebench] => ApacheBench,[aix] => AIX,[irix] => Irix,[osf] => DEC OSF,[hp-ux] => HP-UX,[netbsd] => NetBSD,[bsdi] => BSDi,[openbsd] => OpenBSD,[gnu] => GNU/Linux,[unix] => Unknown Unix OS),[browsers] => Array ([Flock] => Flock,[Chrome] => Chrome,[Opera] => Opera,[MSIE] => Internet Explorer,[Internet Explorer] => Internet Explorer,[Shiira] => Shiira,[Firefox] => Firefox,[Chimera] => Chimera,[Phoenix] => Phoenix,[Firebird] => Firebird,[Camino] => Camino,[Netscape] => Netscape,[OmniWeb] => OmniWeb,[Safari] => Safari,[Mozilla] => Mozilla,[Konqueror] => Konqueror,[icab] => iCab,[Lynx] => Lynx,[Links] => Links,[hotjava] => HotJava,[amaya] => Amaya,[IBrowse] => IBrowse),[mobiles] => Array ([mobileexplorer] => Mobile Explorer,[palmsource] => Palm,[palmscape] => Palmscape,[motorola] => Motorola,[nokia] => Nokia,[palm] => Palm,[iphone] => Apple iPhone,[ipad] => iPad,[ipod] => Apple iPod Touch,[sony] => Sony Ericsson,[ericsson] => Sony Ericsson,[blackberry] => BlackBerry,[cocoon] => O2 Cocoon,[blazer] => Treo,[lg] => LG,[amoi] => Amoi,[xda] => XDA,[mda] => MDA,[vario] => Vario,[htc] => HTC,[samsung] => Samsung,[sharp] => Sharp,[sie-] => Siemens,[alcatel] => Alcatel,[benq] => BenQ,[ipaq] => HP iPaq,[mot-] => Motorola,[playstation portable] => PlayStation Portable,[hiptop] => Danger Hiptop,[nec-] => NEC,[panasonic] => Panasonic,[philips] => Philips,[sagem] => Sagem,[sanyo] => Sanyo,[spv] => SPV,[zte] => ZTE,[sendo] => Sendo,[symbian] => Symbian,[SymbianOS] => SymbianOS,[elaine] => Palm,[series60] => Symbian S60,[windows ce] => Windows CE,[obigo] => Obigo,[netfront] => Netfront Browser,[openwave] => Openwave Browser,[mobilexplorer] => Mobile Explorer,[operamini] => Opera Mini,[opera mini] => Opera Mini,[digital paths] => Digital Paths,[avantgo] => AvantGo,[xiino] => Xiino,[novarra] => Novarra Transcoder,[vodafone] => Vodafone,[docomo] => NTT DoCoMo,[o2] => O2,[mobile] => Generic Mobile,[wireless] => Generic Mobile,[j2me] => Generic Mobile,[midp] => Generic Mobile,[cldc] => Generic Mobile,[up.link] => Generic Mobile,[up.browser] => Generic Mobile,[smartphone] => Generic Mobile,[cellphone] => Generic Mobile),[robots] => Array ([googlebot] => Googlebot,[msnbot] => MSNBot,[slurp] => Inktomi Slurp,[yahoo] => Yahoo,[askjeeves] => AskJeeves,[fastcrawler] => FastCrawler,[infoseek] => InfoSeek Robot 1.0,[lycos] => Lycos),[platform] => Unknown Platform,[browser] => ,[version] => ,[mobile] => ,[robot] => ,[referer] => ),[session] => CI_Session Object ([userdata] => Array ([__ci_last_regenerate] => 1506086283),[] => database,[] => Array ([cookie_lifetime] => 0,[cookie_name] => ci_session,[cookie_path] => /,[cookie_domain] => wcipeg.com,[cookie_secure] => ,[expiration] => 604800,[match_ip] => ,[save_path] => ci_sessions)),[form_validation] => CI_Form_validation Object ([] => Problems Object ( *RECURSION*,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] =>

,[] =>

,[] => ,[] => ,[validation_data] => Array ()),[email] => CI_Email Object ([useragent] => CodeIgniter,[mailpath] => /usr/sbin/sendmail,[protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[smtp_timeout] => 10,[smtp_keepalive] => ,[smtp_crypto] => ,[wordwrap] => 1,[wrapchars] => 76,[mailtype] => text,[charset] => UTF-8,[multipart] => mixed,[alt_message] => ,[validate] => ,[priority] => 3,[newline] => ,[crlf] => ,[dsn] => ,[send_multipart] => 1,[bcc_batch_mode] => ,[bcc_batch_size] => 200,[] => ,[] => ,[] => ,[] => ,[] => ,[] => ,[] => ,[] => ,[] => 8bit,[] => 1,[] => ,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array ([User-Agent] => CodeIgniter,[Date] => Fri, 22 Sep 2017 13:18:03 +0000),[] => Array (),[] => Array ([0] => mail,[1] => sendmail,[2] => smtp),[] => Array ([0] => us-ascii,[1] => iso-2022-),[] => Array ([0] => 7bit,[1] => 8bit),[] => Array ([1] => 1 (Highest),[2] => 2 (High),[3] => 3 (Normal),[4] => 4 (Low),[5] => 5 (Lowest))),[auth_lib] => auth_lib Object ([] => Problems Object ( *RECURSION*),[users] => Users_model Object (),[problems] => Problems_model Object (),[submissions] => Submissions_model Object (),[contests] => Contests_model Object (),[languages] => Languages_model Object (),[organizations] => Organizations_model Object (),[alias] => alias Object (),[auth_model] => auth_model Object ([hash_cost] => 12),[pagination] => CI_Pagination Object ([] => Problems Object ( *RECURSION*,[] => http://wcipeg.com/problem/ccc10j3,[] => 10,[] => 3,[] => 10,[] => 3,[] => ,[] => ),[comments] => Comments_model Object ([table] => comments),[comments_lib] => comments_lib Object ([] => Problems Object ( *RECURSION*,[comments] => Array ([0] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[1] => stdClass Object ([id] => 8191,[replyto] => 8190,[place_id] => 555,[date] => 1503336593,[username] => hello12,[title] => Re: SHUT UP hezeyu2007!,[msg] => lol,[sticky] => 0,[root] => 8190),[2] => stdClass Object ([id] => 8181,[replyto] => 0,[place_id] => 555,[date] => 1503082025,[username] => hezeyu2007,[title] => ,[msg] => :angel:,[sticky] => 0,[root] => 8181)),[id_comment] => Array ([8192] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[8191] => stdClass Object ([id] => 8191,[replyto] => 8190,[place_id] => 555,[date] => 1503336593,[username] => hello12,[title] => Re: SHUT UP hezeyu2007!,[msg] => lol,[sticky] => 0,[root] => 8190),[8181] => stdClass Object ([id] => 8181,[replyto] => 0,[place_id] => 555,[date] => 1503082025,[username] => hezeyu2007,[title] => ,[msg] => :angel:,[sticky] => 0,[root] => 8181)),[children] => Array ([0] => Array ([0] => 8192,[1] => 8181),[8190] => Array ([0] => 8191)),[per_page] => 10,[place] => ccc10j3)),[db] => CI_DB_mysqli_driver Object ([dbdriver] => mysqli,[compress] => ,[delete_hack] => 1,[stricton] => ,[] => `,[] => ,[] => ,[] => Array (),[] => ,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => ,[] => ,[] => Array (),[] => Array (),[] => Array (),[] => ,[] => 0,[] => ,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array (),[dsn] => ,[username] => judge,[password] => gnxh32s,[hostname] => 127.0.0.1,[database] => judge,[subdriver] => ,[dbprefix] => ,[char_set] => utf8,[dbcollat] => utf8_general_ci,[encrypt] => ,[swap_pre] => ,[port] => 3306,[pconnect] => ,[conn_id] => mysqli Object ([affected_rows] => ,[client_info] => ,[client_version] => ,[connect_errno] => ,[connect_error] => ,[errno] => ,[error] => ,[error_list] => ,[field_count] => ,[host_info] => ,[info] => ,[insert_id] => ,[server_info] => ,[server_version] => ,[stat] => ,[sqlstate] => ,[protocol_version] => ,[thread_id] => ,[warning_count] => ),[result_id] => mysqli_result Object ([current_field] => ,[field_count] => ,[lengths] => ,[num_rows] => ,[type] => ),[db_debug] => ,[benchmark] => 0.0077986717224121,[query_count] => 16,[bind_marker] => ?,[save_queries] => 1,[queries] => Array ([0] => SELECT GET_LOCK('37dae11f061d92733c630dea76c4a3055311d3d8', 300) AS ci_session_lock,[1] => SELECT `data` FROM `ci_sessions` WHERE `id` = '37dae11f061d92733c630dea76c4a3055311d3d8',[2] => SELECT `id` FROM `problems` WHERE `name` = 'ccc10j3' AND `contest` =0 LIMIT 1,[3] => SELECT `id` FROM `problems` WHERE `name` = 'ccc10j3' AND `contest` =0 LIMIT 1,[4] => SELECT * FROM `problems` WHERE `id` = '555',[5] => SELECT `idx`, `ext`, `name`, `shortname` FROM `languages` ORDER BY `idx` asc,[6] => SELECT comments.id AS id,replyto,place_id,date,username,title,msg,sticky,root FROM comments LEFT OUTER JOIN problems ON comments.place_id=problems.id WHERE place_id = '555' AND (place_id = 0 OR problems.contest = 0) ORDER BY date DESC LIMIT 0,999999,[7] => SELECT * FROM `probtype` WHERE `probid` = '555',[8] => SELECT * FROM `contests` WHERE `id` =0,[9] => SELECT `id` FROM `problems` WHERE `name` = 'ccc10j3' AND `contest` =0 LIMIT 1,[10] => SELECT * FROM `problems` WHERE `id` = '555',[11] => SELECT COUNT(*) AS `numrows` FROM `comment_ratings` WHERE `name` = '8192' AND `rating` = 1,[12] => SELECT COUNT(*) AS `numrows` FROM `comment_ratings` WHERE `name` = '8192' AND `rating` = -1,[13] => SELECT * FROM `users` WHERE `username` = 'hezeyu2007',[14] => SELECT * FROM `problems` WHERE `id` = '555',[15] => SELECT `rating` FROM `comment_ratings` WHERE `name` = '8192' AND `user` IS NULL),[query_times] => Array ([0] => 0.00018811225891113,[1] => 0.00079107284545898,[2] => 0.00025606155395508,[3] => 0.00023412704467773,[4] => 0.00031304359436035,[5] => 0.00027012825012207,[6] => 0.0037350654602051,[7] => 0.00035905838012695,[8] => 0.00023198127746582,[9] => 0.0002439022064209,[10] => 0.00021696090698242,[11] => 0.0002129077911377,[12] => 0.00024604797363281,[13] => 0.00017905235290527,[14] => 0.00018405914306641,[15] => 0.0001370906829834),[data_cache] => Array (),[trans_enabled] => 1,[trans_strict] => 1,[] => 0,[] => 1,[] => ,[cache_on] => ,[cachedir] => ,[cache_autodel] => ,[CACHE] => ,[] => 1,[] => Array ([0] => *),[] => ESCAPE '%s' ,[] => !,[] => Array ([0] => RAND(),[1] => RAND(%d)),[] => SELECT COUNT(*) AS ),[agent] => CI_User_agent Object ([agent] => CCBot/2.0 (http://commoncrawl.org/faq/),[is_browser] => ,[is_robot] => ,[is_mobile] => ,[languages] => Array (),[charsets] => Array (),[platforms] => Array ([windows nt 6.0] => Windows Longhorn,[windows nt 5.2] => Windows 2003,[windows nt 5.0] => Windows 2000,[windows nt 5.1] => Windows XP,[windows nt 4.0] => Windows NT 4.0,[winnt4.0] => Windows NT 4.0,[winnt 4.0] => Windows NT,[winnt] => Windows NT,[windows 98] => Windows 98,[win98] => Windows 98,[windows 95] => Windows 95,[win95] => Windows 95,[windows] => Unknown Windows OS,[os x] => Mac OS X,[ppc mac] => Power PC Mac,[freebsd] => FreeBSD,[ppc] => Macintosh,[linux] => Linux,[debian] => Debian,[sunos] => Sun Solaris,[beos] => BeOS,[apachebench] => ApacheBench,[aix] => AIX,[irix] => Irix,[osf] => DEC OSF,[hp-ux] => HP-UX,[netbsd] => NetBSD,[bsdi] => BSDi,[openbsd] => OpenBSD,[gnu] => GNU/Linux,[unix] => Unknown Unix OS),[browsers] => Array ([Flock] => Flock,[Chrome] => Chrome,[Opera] => Opera,[MSIE] => Internet Explorer,[Internet Explorer] => Internet Explorer,[Shiira] => Shiira,[Firefox] => Firefox,[Chimera] => Chimera,[Phoenix] => Phoenix,[Firebird] => Firebird,[Camino] => Camino,[Netscape] => Netscape,[OmniWeb] => OmniWeb,[Safari] => Safari,[Mozilla] => Mozilla,[Konqueror] => Konqueror,[icab] => iCab,[Lynx] => Lynx,[Links] => Links,[hotjava] => HotJava,[amaya] => Amaya,[IBrowse] => IBrowse),[mobiles] => Array ([mobileexplorer] => Mobile Explorer,[palmsource] => Palm,[palmscape] => Palmscape,[motorola] => Motorola,[nokia] => Nokia,[palm] => Palm,[iphone] => Apple iPhone,[ipad] => iPad,[ipod] => Apple iPod Touch,[sony] => Sony Ericsson,[ericsson] => Sony Ericsson,[blackberry] => BlackBerry,[cocoon] => O2 Cocoon,[blazer] => Treo,[lg] => LG,[amoi] => Amoi,[xda] => XDA,[mda] => MDA,[vario] => Vario,[htc] => HTC,[samsung] => Samsung,[sharp] => Sharp,[sie-] => Siemens,[alcatel] => Alcatel,[benq] => BenQ,[ipaq] => HP iPaq,[mot-] => Motorola,[playstation portable] => PlayStation Portable,[hiptop] => Danger Hiptop,[nec-] => NEC,[panasonic] => Panasonic,[philips] => Philips,[sagem] => Sagem,[sanyo] => Sanyo,[spv] => SPV,[zte] => ZTE,[sendo] => Sendo,[symbian] => Symbian,[SymbianOS] => SymbianOS,[elaine] => Palm,[series60] => Symbian S60,[windows ce] => Windows CE,[obigo] => Obigo,[netfront] => Netfront Browser,[openwave] => Openwave Browser,[mobilexplorer] => Mobile Explorer,[operamini] => Opera Mini,[opera mini] => Opera Mini,[digital paths] => Digital Paths,[avantgo] => AvantGo,[xiino] => Xiino,[novarra] => Novarra Transcoder,[vodafone] => Vodafone,[docomo] => NTT DoCoMo,[o2] => O2,[mobile] => Generic Mobile,[wireless] => Generic Mobile,[j2me] => Generic Mobile,[midp] => Generic Mobile,[cldc] => Generic Mobile,[up.link] => Generic Mobile,[up.browser] => Generic Mobile,[smartphone] => Generic Mobile,[cellphone] => Generic Mobile),[robots] => Array ([googlebot] => Googlebot,[msnbot] => MSNBot,[slurp] => Inktomi Slurp,[yahoo] => Yahoo,[askjeeves] => AskJeeves,[fastcrawler] => FastCrawler,[infoseek] => InfoSeek Robot 1.0,[lycos] => Lycos),[platform] => Unknown Platform,[browser] => ,[version] => ,[mobile] => ,[robot] => ,[referer] => ),[session] => CI_Session Object ([userdata] => Array ([__ci_last_regenerate] => 1506086283),[] => database,[] => Array ([cookie_lifetime] => 0,[cookie_name] => ci_session,[cookie_path] => /,[cookie_domain] => wcipeg.com,[cookie_secure] => ,[expiration] => 604800,[match_ip] => ,[save_path] => ci_sessions)),[form_validation] => CI_Form_validation Object ([] => Problems Object ( *RECURSION*,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] =>

,[] =>

,[] => ,[] => ,[validation_data] => Array ()),[email] => CI_Email Object ([useragent] => CodeIgniter,[mailpath] => /usr/sbin/sendmail,[protocol] => smtp,[smtp_host] => 127.0.0.1,[smtp_user] => [email protected],[smtp_pass] => gnxh32s,[smtp_port] => 587,[smtp_timeout] => 10,[smtp_keepalive] => ,[smtp_crypto] => ,[wordwrap] => 1,[wrapchars] => 76,[mailtype] => text,[charset] => UTF-8,[multipart] => mixed,[alt_message] => ,[validate] => ,[priority] => 3,[newline] => ,[crlf] => ,[dsn] => ,[send_multipart] => 1,[bcc_batch_mode] => ,[bcc_batch_size] => 200,[] => ,[] => ,[] => ,[] => ,[] => ,[] => ,[] => ,[] => ,[] => 8bit,[] => 1,[] => ,[] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => Array ([User-Agent] => CodeIgniter,[Date] => Fri, 22 Sep 2017 13:18:03 +0000),[] => Array (),[] => Array ([0] => mail,[1] => sendmail,[2] => smtp),[] => Array ([0] => us-ascii,[1] => iso-2022-),[] => Array ([0] => 7bit,[1] => 8bit),[] => Array ([1] => 1 (Highest),[2] => 2 (High),[3] => 3 (Normal),[4] => 4 (Low),[5] => 5 (Lowest))),[auth_lib] => auth_lib Object ([] => Problems Object ( *RECURSION*),[users] => Users_model Object (),[problems] => Problems_model Object (),[submissions] => Submissions_model Object (),[contests] => Contests_model Object (),[languages] => Languages_model Object (),[organizations] => Organizations_model Object (),[alias] => alias Object (),[auth_model] => auth_model Object ([hash_cost] => 12),[pagination] => CI_Pagination Object ([] => Problems Object ( *RECURSION*,[] => http://wcipeg.com/problem/ccc10j3,[] => 10,[] => 3,[] => 10,[] => 3,[] => ,[] => ),[comments] => Comments_model Object ([table] => comments),[comments_lib] => comments_lib Object ([] => Problems Object ( *RECURSION*,[comments] => Array ([0] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[1] => stdClass Object ([id] => 8191,[replyto] => 8190,[place_id] => 555,[date] => 1503336593,[username] => hello12,[title] => Re: SHUT UP hezeyu2007!,[msg] => lol,[sticky] => 0,[root] => 8190),[2] => stdClass Object ([id] => 8181,[replyto] => 0,[place_id] => 555,[date] => 1503082025,[username] => hezeyu2007,[title] => ,[msg] => :angel:,[sticky] => 0,[root] => 8181)),[id_comment] => Array ([8192] => stdClass Object ([id] => 8192,[replyto] => 0,[place_id] => 555,[date] => 1503337299,[username] => hezeyu2007,[title] => ,[msg] => :biggrin:,[sticky] => 0,[root] => 8192,[children] => Array (),[class] => normal,[votes] => Array ([0] => 0,[1] => 0),[wilson] => 0,[user_exists] => 1,[can_edit] => ,[can_delete] => ,[can_delete_tree] => ,[my_rating] => 0,[compiled_msg] => biggrin.gif),[8191] => stdClass Object ([id] => 8191,[replyto] => 8190,[place_id] => 555,[date] => 1503336593,[username] => hello12,[title] => Re: SHUT UP hezeyu2007!,[msg] => lol,[sticky] => 0,[root] => 8190),[8181] => stdClass Object ([id] => 8181,[replyto] => 0,[place_id] => 555,[date] => 1503082025,[username] => hezeyu2007,[title] => ,[msg] => :angel:,[sticky] => 0,[root] => 8181)),[children] => Array ([0] => Array ([0] => 8192,[1] => 8181),[8190] => Array ([0] => 8191)),[per_page] => 10,[place] => ccc10j3)),[1] => desc), Array ([0] => ccc10j3)) called at [/var/trunk/system/core/CodeIgniter.php:514] #11 require_once(/var/trunk/system/core/CodeIgniter.php) called at [/var/trunk/index.php:292]