A. 三年二班的投票 题目描述: 三年级二班已经完成了竞选班长的投票,已知一共有 n 张投票,每张投票上写了一位同学的名字。 投票统计结束后,张老师随意问一个同学的名字,请编程快速检索出,该同学共有几票。 输入: 第一行读入一个整数 n ,代表产生了 n 张投票。( n≤10^5 ) 接下来 n 行,每行有一个字符串 s ,代表该张投票上写的同学的姓名(姓名由不含空格的小写英文字母组成
《自动机理论、语言和计算导论》学习第 14 天,p428-p525总结,总计 98 页。 一、技术总结 1.Kruskal’s algorithm(克鲁斯克尔算法) 2.NP-Complete Problems p434, We say L is NP-complete if the following statements are true about L: (1)L is in NP
《自动机理论、语言和计算导论》学习第 12 天,p352-P401总结,总计 50 页。 一、技术总结 1.Turing Machine ™ 2.undecidability a.Ld(the diagonalization language) 3.reduction p392, In general, if we have an algorithm to convert inst
《自动机理论、语言和计算导论》学习第 11 天,p215-p351总结,总计 37 页。 一、技术总结 1.constrained problem 2.Fermat’s lats theorem Fermat’s Last Theorem states that no three positive integers a, b and c satisfy the equation a^n +