原创 ICPC2019 瀋陽網絡賽 K.Guanguan's Happy water(高斯消元+逆元+矩陣快速冪)
題目鏈接 https://nanti.jisuanke.com/t/41411 思路 怎麼說呢,這題就是讓你先解模線性方程組,然後用矩陣快速冪算數列前n項和。雖說跟模板題很接近但也有160多行代碼,我覺得寫起來還是很繁瑣的,調試起來也不簡
原创 hdu6620 Just an Old Puzzle
題目鏈接 http://acm.hdu.edu.cn/showproblem.php?pid=6620 題目描述 ou are given a 4 × 4 grid, which consists of 15 number cells a
原创 hdu6638 Snowy Smile(線段樹+最大子段和)
題目鏈接 http://acm.hdu.edu.cn/showproblem.php?pid=6638 題目 Problem Description There are n pirate chests buried in Byteland
原创 Educational Codeforces Round 70 (Rated for Div. 2) C. You Are Given a WASD-string...(線段樹)
題目鏈接 http://codeforces.com/contest/1202/problem/C 題目描述 You have a string ss — a sequence of commands for your toy robot
原创 codeforces1027D. Number Of Permutations(排列組合+容斥原理)
題目鏈接 http://codeforces.com/contest/1207/problem/D 題目描述 You are given a sequence of n pairs of integers: (a1,b1),(a2,b2)
原创 hdu6602 Fansblog(威爾遜定理+大整數判斷素數+質數密度+逆元)
題目鏈接 http://acm.hdu.edu.cn/showproblem.php?pid=6608 題目描述 輸入輸出 樣例 Sample Input 1 1000000007 Sample Output 328400734 題意
原创 hdu6602 Longest Subarray(線段樹)
題目鏈接 http://acm.hdu.edu.cn/showproblem.php?pid=6602 題目描述 輸入輸出 樣例 Sample Input 7 4 2 2 1 4 1 4 3 2 Sample Output 4
原创 洛谷P1641 [SCOI2010]生成字符串(排列組合+逆元)
原文鏈接:https://www.luogu.org/blog/user29936/solution-p1641 原文鏈接 https://www.luogu.org/blog/user2993
原创 洛谷P1357 花園(狀態壓縮+矩陣快速冪)
題目鏈接 https://www.luogu.org/problem/P1357 題目描述 小L有一座環形花園,沿花園的順時針方向,他把各個花圃編號爲1~N(2<=N<=10^15)。他的環形花園每天都會換一個新花樣,但他的花園都不外乎一
原创 【nowcoder_挑戰賽31】克洛涅的多項式
鏈接:https://ac.nowcoder.com/acm/contest/880/B 來源:牛客網 題目描述 克洛涅修女來到了這所孤兒院。Sister 很快就和大家打成一片,開始了捉迷藏的遊戲。 Sister 今天藏起來了一個
原创 洛谷P1297 [國家集訓隊]單選錯位
鏈接:https://www.luogu.org/problemnew/show/P1297 題目描述: gx和lc去參加noip初賽,其中有一種題型叫單項選擇題,顧名思義,只有一個選項是正確答案。試卷上共有n道單選題,第i道單選題有ai
原创 Codeforces Round #549 (Div. 2) ——D.The Beatles
鏈接:http://codeforces.com/contest/1143/problem/D 內容: Recently a Golden Circle of Beetlovers was found in Byteland. It is
原创 [SHOI2017]分手是祝願
鏈接:https://ac.nowcoder.com/acm/problem/20437 來源:牛客網 題目: B 君在玩一個遊戲,這個遊戲由 n 個燈和 n 個開關組成,給定這 n 個燈的初始狀態,下標爲從 1 到 n 的正整數。每個燈
原创 E. Nastya Hasn't Written a Legend
來源:https://www.cnblogs.com/pkgunboat/p/10527569.html 題目:http://codeforces.com/contest/1136/problem/E 題意: 有一個數組a和一個數組k,數
原创 Educational Codeforces Round 61———F.Clear the String
鏈接:http://codeforces.com/contest/1132/problem/F 內容: You are given a string ss of length nn consisting of lowercase Lati