2015ACM/ICPC亞洲區瀋陽站 HDU
Don't tilt your head. I'm serious.
For n given strings S1,S2,⋯,Sn, labelled from 1 to n, you should find the largest i(1≤i≤n) such that there exists an integer j(1≤j<i) and Sj is not a substring of Si.
A substring of a string Si is another string that occurs in Si. For example, ``ruiz" is a substring of ``ruizhang", and ``rzhang" is not a substring of ``ruizhang".
相關推薦
2015ACM/ICPC亞洲區瀋陽站 HDU
Ladies and gentlemen, please sit up straight.Don't tilt your head. I'm serious. For n given strings S1,S2,⋯,Sn, labelled from 1 to n, you should find
HDU 5512 Pagodas(2015ACM/ICPC亞洲區瀋陽站-重現賽(感謝東北大學))
Pagodas Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 3502 &nb
2015ACM/ICPC亞洲區瀋陽站-——Pagodas(簡單博弈)
nn pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 11 to nn. However, only
2015ACM/ICPC亞洲區瀋陽站---重現賽感想
今天打的差極了,,就A了兩個題,,今早九點開始,還真是有點困困的、、今天來的還有點晚。 先看的BD題,兩題並行,然後先敲的B,未果,D替代紙上完成。然後敲了D題,,A了之後就在做B和M,我先做的M,果然存圖沒想到,,然後就亂交了一發,,想象的T,結果RE了,,,遂放棄。
2015ACM/ICPC亞洲區瀋陽站---題解
思路:就暴力匹配就好了,然後加一個剪枝,如果這個字串是某個字串的子串的話,就不用檢查他了就是個思維,還用了KMP,,其實不用也可以,用strstr()過的時間更短。。 程式碼: #inclu
【解題報告】2015ACM/ICPC亞洲區瀋陽站
題目連結 B. Bazinga(HDU5510) 思路 設第i個字串儲存在ss[i][]中。本題最直觀最樸素的做法是列舉兩個字串ss[i]和ss[j] (i+1≤j),再用KMP演算法匹配這兩個字串。首先從大到小列舉j,若對某個ss[j]存在某個s
hdu5512 Pagodas(2015ACM/ICPC亞洲區瀋陽站-重現賽(感謝東北大學) )
n pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 1 to n. However, only two of them (labe
HDU 5950 - Recursive sequence - [矩陣快速冪加速遞推][2016ACM/ICPC亞洲區瀋陽站 Problem C]
題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=5950 Farmer John likes to play mathematics games with his N cows. Recently, they are attracted by recursive
HDU 5954 - Do not pour out - [積分+二分][2016ACM/ICPC亞洲區瀋陽站 Problem G]
題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=5954 Problem DescriptionYou have got a cylindrical cup. Its bottom diameter is 2 units and its height is 2
2016ACM/ICPC亞洲區瀋陽站 Counting Cliques HDU
題意:給你n個點,m條雙向邊,和一個整數s,要你求出大小等於s的完全子圖的個數(完全子圖:圖中的任一點都和其他所有點相連)。 演算法:dfs 思路: 將點逐個放進一個集合,如果該點與集合中的任一點
HDU-6223 Infinite Fraction Path(2017ACM/ICPC亞洲區瀋陽站)
思路:BFS+剪枝。對於每一層,找其最大值mm,對於小於mm的點和找的可能為同一個點進行剪枝。 Code: #include<iostream> #include<cstd
HDU 5950 Recursive sequence(構造矩陣+矩陣乘法)——2016ACM/ICPC亞洲區瀋陽站(重現賽)
傳送門 Recursive sequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 98
2017ACM/ICPC亞洲區瀋陽站(部分解題報告)
HDU 6225 Little Boxes 題意 計算四個整數的和 解題思路 使用Java大整數 1 import java.math.BigInteger; 2 import java.util.Scanner; 3 4 /** 5 * 6 * @author reqaw
2016ACM/ICPC亞洲區瀋陽站 - A/B/C/E/G/H/I - (Undone)
連結:傳送門 A - Thickest Burger - [簽到水題] ACM ICPC is launching a thick burger. The thickness (or the height) of a piece of club steak is A (1 ≤ A ≤ 100). Th
hdu6223Infinite Fraction Path(2017ACM/ICPC亞洲區瀋陽站G題) 【BFS+剪枝】
傳送門:http://acm.hdu.edu.cn/showproblem.php?pid=6223 The ant Welly now dedicates himself to urban infrastructure. He came to the kingdom of numbers
2017ACM/ICPC亞洲區瀋陽站-重現賽(感謝東北大學)
Little Boxes Problem Description Little boxes on the hillside. Little boxes made of ticky-tacky. Little boxes. Little boxes. Little boxes all
2016ACM/ICPC亞洲區瀋陽站
題意:有序列F(n)=F(n-1)+2*F(n-2)+i^4;題目輸入N,F(1),F(2)讓輸出F(N)。N,F(1),F(2) < 2^31 解析:一看就是矩陣快速冪的題,推出以下轉移矩陣即可: 程式碼(9ms): #include <bits/
2017ACM/ICPC亞洲區瀋陽站_Wandering Robots(hash)_馬爾科夫鏈_隨機遊走
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define INF
2016ACM/ICPC亞洲區青島站 K Hdu-5992 Finding Hotels KDtree
限制 .cn element ons poi () 一個點 esp tar 題面 題意:二維平面上有很多點,每個點有個權值,現在給你一個點(很多組),權值v,讓你找到權值小於等於v的點中離這個點最近的,相同的輸出id小的 題解:很裸的KDtree,但是查詢的時候有2個小
HDU 5532 Almost Sorted Array(最長非遞減子序列 模板題)——2015ACM/ICPC亞洲區長春站
Almost Sorted Array Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Problem Description We are