SRM 630 DIV2_html/css_WEB-ITnose
SRM 630 DIV2
第一次TC,本来以为AK了,结果1000分还是被系统cha掉了,不过倒是也cha掉了房间其他人赚了不少
A:字符串长度才50,直接简单的模拟即可
B:结点个数才10,先做一边floyd,找出两两之间路径,然后暴力枚举选哪些点,判断可不可以,如果可以的话,记录下最大个数
C:一开始的做法是,构造出rank数组后,对于连续的一段,都放a,然后最后一个放b即可,以为这样构造出来的肯定是字典序最小的,结果被系统cha掉了。
正确做法:一开始先构造出sa数组,暴力枚举每个位置,非'a'的,只要减1,保证字典序小了,在去构造一下sa数组,判断一下两个后缀数组一不一样,如果所有位置都不一样,说明这个是字典序最小的
代码:
A:
#include <cstdio>#include <cstring>#include <iostream>#include <vector>#include <set>#include <map>#include <string>using namespace std;class DoubleLetter { public: string ableToSolve(string S) { while (1) { int n = S.length(); string tmp = ""; int flag = 1; for (int i = 0; i <br> B: <p></p> <p> </p> <pre name="code" class="sycode">#include <iostream>#include <cstdio>#include <cstring>#include <vector>#include <algorithm>using namespace std;class Egalitarianism3Easy {public: int bitcount(int x) { int ans = 0; while (x) { ans += (x&1); x >>= 1; } return ans; } int maxCities(int n, vector<int> a, vector<int> b, vector<int> len) { int g[15][15]; for (int i = 1; i <br> C: <p></p> <p> </p> <pre name="code" class="sycode">#include <iostream>#include <cstdio>#include <string>#include <algorithm>using namespace std;typedef pair<string int> pii;class SuffixArrayDiv2 { public: string smallerOne(string s) { int n = s.length(); pii save[55]; for (int i = n - 1; i >= 0; i--) { string tmp = ""; for (int j = i; j = 0; i--) { string tmp = ""; for (int j = i; j <br> <br> <p></p> </string></algorithm></string></cstdio></iostream>

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

熱門話題

本文討論了HTML&lt; Progress&gt;元素,其目的,樣式和與&lt; meter&gt;元素。主要重點是使用&lt; progress&gt;為了完成任務和LT;儀表&gt;對於stati

本文討論了html&lt; datalist&gt;元素,通過提供自動完整建議,改善用戶體驗並減少錯誤來增強表格。Character計數:159

本文討論了HTML&lt; meter&gt;元素,用於在一個範圍內顯示標量或分數值及其在Web開發中的常見應用。它區分了&lt; meter&gt;從&lt; progress&gt;和前

本文討論了使用HTML5表單驗證屬性,例如必需的,圖案,最小,最大和長度限制,以直接在瀏覽器中驗證用戶輸入。

本文討論了視口元標籤,這對於移動設備上的響應式Web設計至關重要。它解釋瞭如何正確使用確保最佳的內容縮放和用戶交互,而濫用可能會導致設計和可訪問性問題。

本文討論了&lt; iframe&gt;將外部內容嵌入網頁,其常見用途,安全風險以及諸如對象標籤和API等替代方案的目的。

GiteePages靜態網站部署失敗:404錯誤排查與解決在使用Gitee...
