The Problem to Slow Down You Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=93645#problem/G Description http://7xjob4.com1.z0.glb.clouddn.com/76e435d3c21fa3cbeef1e76780086dc4 Input Output Sample In…
The Problem to Slow Down You Problem's Link: http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=141572 Mean: 给你两个字符串,求这两个字符串相同回文串的匹配对数. analyse: 每个字符串建一棵回文树,分别从0结点和1结点两棵树一起往下dfs,对于同一条路径上的结点,一定是相同的回文,然后两个的数量相乘加到answer中. Time complexity: O(N)…
The Problem to Slow Down You Time Limit: 20000ms Memory Limit: 524288KB This problem will be judged on CodeForcesGym. Original ID: 100548G64-bit integer IO format: %I64d Java class name: (Any) After finishing his homework, our problem setter F…
The Problem to Slow Down You 输入:t个测试样例,每个样例输入两个字符串 输出:这两对字符串的回文串可以组成多少对本质不同的回文串 题意:给你两个字符串,然后问你这两字符串中 有多少对本质不同的字符串子序列 #include<iostream> #include<stdio.h> #include <algorithm> #include <string> #include<string.h> #include<…
Kevin's Problem 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4921 Description In his applied probability class, Kevin learned about the Secretary Problem. There are N applicants a…
Discrete Logarithm Problem 题目链接: http://acm.hust.edu.cn/vjudge/contest/127401#problem/D Description http://7xjob4.com1.z0.glb.clouddn.com/42600d1bedc3c308a68ea0453befd84e Input The first line of the input file contains a prime p, 1 < p < 2^13 . This…