02 2022 档案

摘要:1 class Solution { 2 public: 3 typedef long long ll; 4 int minimumFinishTime(vector<vector<int>>& tires, int changeTime, int numLaps) { 5 ll miuse[100 阅读全文
posted @ 2022-02-27 17:52 matt-11 阅读(31) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 23:05 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 23:01 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 22:56 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 22:56 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 22:48 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 22:44 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 22:42 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-02-21 22:36 matt-11 阅读(1) 评论(0) 推荐(0) 编辑
摘要:当数学看吧 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=5e5+5; 5 const int K=log(N)/log(2)+1; 6 int a[N],lg[N],mi 阅读全文
posted @ 2022-02-21 22:14 matt-11 阅读(17) 评论(0) 推荐(0) 编辑
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+5; 4 int A[N],s[N]; 5 int main() 6 { 7 int n,m; 8 cin>>n>>m; 9 for(int i=1;i<=n;i++ 阅读全文
posted @ 2022-02-20 21:43 matt-11 阅读(27) 评论(0) 推荐(0) 编辑
摘要:1 #include<iostream> 2 #include<cstdio> 3 #include<algorithm> 4 using namespace std; 5 const int N=1e5+5; 6 int n,t; 7 double a[N],b[N],sum[N]; 8 9 in 阅读全文
posted @ 2022-02-15 22:44 matt-11 阅读(48) 评论(0) 推荐(0) 编辑
摘要:1 Tallest Cow 2 Time Limit: 2000MS Memory Limit: 65536K 3 Total Submissions: 8878 Accepted: 3831 4 Description 5 6 FJ's N (1 ≤ N ≤ 10,000) cows conven 阅读全文
posted @ 2022-02-13 22:23 matt-11 阅读(33) 评论(0) 推荐(0) 编辑
摘要://三进制状压dp; 1 class Solution { 2 public: 3 int maximumANDSum(vector<int>& nums, int k) { 4 5 int n=nums.size(); 6 int mx=1; 7 for(int i=1;i<=k;i++)mx*= 阅读全文
posted @ 2022-02-13 19:39 matt-11 阅读(22) 评论(0) 推荐(0) 编辑
摘要://排序后枚举每个位置k,表示1-k-1全部为0,剩余都为beans[k-1]; //这样对每个位置k都有结论∑sum[i]-(n-k+1)*beans[k-1];取个min就行 1 class Solution { 2 public: 3 long long minimumRemoval(vect 阅读全文
posted @ 2022-02-13 19:38 matt-11 阅读(66) 评论(0) 推荐(0) 编辑
摘要:描述 给定一个长度为 n(n≤10^5 ) 的数列 {a_1,a_2,…,a_n},每次可以选择一个区间 [l,r],使下标在这个区间内的数都加一或者都减一。求至少需要多少次操作才能使数列中的所有数都一样,并求出在保证最少次数的前提下,最终得到的数列可能有多少种。 输入格式 第一行一个正整数n。接下 阅读全文
posted @ 2022-02-13 19:14 matt-11 阅读(37) 评论(0) 推荐(0) 编辑
摘要:1 #include<iostream> 2 #include<cstdio> 3 #include<vector> 4 #include<cstring> 5 #define ls (x<<1) 6 #define rs (x<<1|1) 7 using namespace std; 8 cons 阅读全文
posted @ 2022-02-02 22:45 matt-11 阅读(30) 评论(0) 推荐(0) 编辑
摘要:在一个无限大的二维平面上有一个机器人。 初始时,机器人位于点 (0,0)(0,0)。 机器人可以执行四种行动指令: U — 从 (x,y)(x,y) 移动到 (x,y+1)(x,y+1); D — 从 (x,y)(x,y) 移动到 (x,y−1)(x,y−1); L — 从 (x,y)(x,y) 移 阅读全文
posted @ 2022-02-01 22:43 matt-11 阅读(117) 评论(0) 推荐(0) 编辑
摘要:给定一个 nn 个点 mm 条边的无向图。 点的编号从 11 到 nn。 图中不含重边和自环。 请你对给定图进行判断,如果该图是一个有且仅有一个环的连通图,则输出 YES,否则输出 NO。 输入格式 第一行包含两个整数 n,mn,m。 接下来 mm 行,每行包含两个整数 a,ba,b,表示点 aa  阅读全文
posted @ 2022-02-01 21:10 matt-11 阅读(26) 评论(0) 推荐(0) 编辑
摘要:1 class Solution { 2 public: 3 typedef long long ll; 4 string subStrHash(string s, int k, int mod, int len, int hashValue) { 5 string ans=""; 6 int n= 阅读全文
posted @ 2022-02-01 16:33 matt-11 阅读(48) 评论(0) 推荐(0) 编辑
摘要:1 const int N=2e4+5; 2 int fa[N],sz[N],G[N]; 3 class Solution { 4 public: 5 6 inline int fd(int x){return fa[x]==x?x:fa[x]=fd(fa[x]);} 7 inline void m 阅读全文
posted @ 2022-02-01 15:59 matt-11 阅读(48) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示