Unnecessary Details: 1B — Spreadsheet

Revision en1, by jsgoller1, 2022-07-03 23:47:16

1B - Spreadsheet was extremely challenging for me; it took me over 2 hours to get AC, and then when I went to see solutions from red/orange people, it made even less sense. I've seen a bunch of practice solutions to this problem that are basically the following (with minor variation): ~~~~~ #include void g(int t){if(t){g((t-1)/26);putchar(65+(t-1)%26);}} int main(){ int n,x,y; char s[64],*p; for(scanf("%d ",&n);n--;){ gets(s); if(sscanf(s,"%*c%d%*c%d",&x,&y)==2){ g(y); printf("%d\n",x); }else{ for(x=0,p=s;*p>64;++p) x=x*26+*p-64; printf("R%sC%d\n",p,x); } } return 0; } ~~~~~

History

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