Unnecessary Details: 1B — Spreadsheet

Правка en4, от jsgoller1, 2022-07-03 23:58:46

1B - Spreadsheet was extremely challenging for me; it took me over 2 hours to get AC. I didn't find the editorial helpful, and then when I went to see practice solutions from red/orange people, it made even less sense (they were basically copy/paste with minor variation):

Solution

I took a few more hours to really work through this and how it differs from my solution, so here's some unnecessary details.

The problem

Input: First line is an int representing the number of test cases. Each following line is a string of characters specifying a spreadsheet cell, in one of two formats:

  • "Excel": ^[A-Z]+[0-9]+\$ (e.g. BB352).
  • "RC": ^R[0-9]+C[0-9]+\$ (e.g. R253C55).

Output: For test case, we must output the same cell specified in the opposite format. Example:

2
R23C55
BC23

should output

BC23
R23C55

Constraints:

  • Between 1 and 10000 test cases (all valid in either format)
  • In each case, the row and column numbers are no larger than 1000000 (so each line is 16 chars at longest since we never exceed R1000000C1000000 / BDWGN1000000).

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en28 Английский jsgoller1 2022-07-04 03:21:00 5 Tiny change: 'ut**: For test case' -> 'ut**: For each test case'
en27 Английский jsgoller1 2022-07-04 03:15:03 2
en26 Английский jsgoller1 2022-07-04 03:13:58 17 Tiny change: ' variation):\n\n<spo' -> ' variation of the following):\n\n<spo'
en25 Английский jsgoller1 2022-07-04 03:12:12 31 Tiny change: 'in any way. ' -> 'in any way (I'll publish edits over time). ' (published)
en24 Английский jsgoller1 2022-07-04 03:11:19 421
en23 Английский jsgoller1 2022-07-04 03:04:47 625
en22 Английский jsgoller1 2022-07-04 02:45:35 928
en21 Английский jsgoller1 2022-07-04 02:06:15 573
en20 Английский jsgoller1 2022-07-04 02:00:38 735
en19 Английский jsgoller1 2022-07-04 01:45:29 1172
en18 Английский jsgoller1 2022-07-04 01:42:24 1138
en17 Английский jsgoller1 2022-07-04 01:22:39 337
en16 Английский jsgoller1 2022-07-04 01:19:48 535 Tiny change: 'xplicit:\n1. Deref' -> 'xplicit:\n\n1. Deref'
en15 Английский jsgoller1 2022-07-04 01:15:59 6
en14 Английский jsgoller1 2022-07-04 01:15:33 700
en13 Английский jsgoller1 2022-07-04 01:09:00 729 Tiny change: 't. \n\n### `for(x' -> 't. \n\n#### `for(x'
en12 Английский jsgoller1 2022-07-04 00:54:11 319
en11 Английский jsgoller1 2022-07-04 00:48:02 426
en10 Английский jsgoller1 2022-07-04 00:42:21 997
en9 Английский jsgoller1 2022-07-04 00:38:16 1026
en8 Английский jsgoller1 2022-07-04 00:20:29 31 Tiny change: 'ter way:\n~~~~~\ni' -> 'ter way:\n<spoiler summary="Solution">\n~~~~~\ni'
en7 Английский jsgoller1 2022-07-04 00:20:07 13 Tiny change: '.\n~~~~~\n\nThe so' -> '.\n~~~~~\n</spoiler>\n\nThe so'
en6 Английский jsgoller1 2022-07-04 00:19:35 1292
en5 Английский jsgoller1 2022-07-04 00:04:48 418
en4 Английский jsgoller1 2022-07-03 23:58:46 988 Tiny change: 'aints**:\n- Betwee' -> 'aints**:\n\n- Betwee'
en3 Английский jsgoller1 2022-07-03 23:48:17 48
en2 Английский jsgoller1 2022-07-03 23:47:33 4 Tiny change: 'iation):\n~~~~~\n ' -> 'iation):\n\n~~~~~\n '
en1 Английский jsgoller1 2022-07-03 23:47:16 745 Initial revision (saved to drafts)