#P3467. Crash和陶陶的游戏
Crash和陶陶的游戏
题目描述
输入格式
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning />
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas />
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SpaceForUL />
<w:BalanceSingleByteDoubleByteWidth />
<w:DoNotLeaveBackslashAlone />
<w:ULTrailSpace />
<w:DoNotExpandShiftReturn />
<w:AdjustLineHeightInTable />
<w:BreakWrappedTables />
<w:SnapToGridInCell />
<w:WrapTextWithPunct />
<w:UseAsianBreakRules />
<w:DontGrowAutofit />
<w:UseFELayout />
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
<![endif]-->
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
<![endif]--><!--[if gte mso 10]>
/* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}<![endif]-->
<span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Calibri;
mso-hansi-font-family:Calibri">共</span>N+1<span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Calibri;
mso-hansi-font-family:Calibri">行。</span>
mso-hansi-font-family:"Times New Roman"">第一行包含一个正整数
mso-hansi-font-family:"Times New Roman"">,表示操作的数目。</span>
</p><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Calibri;
mso-hansi-font-family:Calibri">接下来有</span><span lang="EN-US" style="font-size:
12.0pt">N</span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Calibri;mso-hansi-font-family:Calibri">行,每行包含两个个正整数</span>T,V<span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri">和一个小写英文字母</span>C<span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri">,表示一次操作,数据保证所有的操作都合法。</span>
输出格式
<span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri">共</span>N<span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri">行,依次表示每次操作后满足条件的三元组个数。</span>
5 1 1 a 2 1 a 1 2 b 2 1 b 2 3 a
1 3 3 4 7