摘要:
题目链接 #include<bits/stdc++.h> using namespace std; #define ll long long #define mod 998244353 #define maxn 500100 ll fac[maxn] = {0}, inv[maxn] = {0}; 阅读全文
摘要:
题目链接 #include <bits/stdc++.h> using namespace std; int n; double tot,now; double a[105]; double dp[102][102]; // 交前i个,j个ac. int main() { cin >> n; for 阅读全文
摘要:
fill(len,len + maxn,INF); len[0] = 0; int ans = 0; REP(i,n){ //cout<<A[i]<<' '; int L = 0,R = ans; while (L < R){ int mid = (L + R + 1) >> 1; if (len[ 阅读全文
摘要:
题目链接: #include<bits/stdc++.h> using namespace std; #define n 1010 struct point{ int x, y; double rad; bool operator < (point b){ return rad < b.rad; } 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; struct point{ int x, y, id; point(int a = 0, int b = 0){x = a, y = b; } friend point operator -(point a, 阅读全文
摘要:
题目链接 解题思路:判断形成目标状态所须的最小,最大时间,与标准时间对比,在其区间内,则可行,然后模拟 1 #include<bits/sdtc++.h> 2 using namespace std; 3 #define ll long long 4 int n, k; 5 ll maxk = 0l 阅读全文
摘要:
题目链接 这个题关键是想明白,K的含义,即,向前跃进几步 代码如下 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define inf 1000000000 4 #define maxn 200005 5 vector<int> d[maxn 阅读全文
摘要:
可以在O(n)时间复杂度求回文串长度 1 void INIT(string str){ 2 int i, len = str.size(); 3 temp += '@'; 4 for(int i = 1; i <= 2*len; i+=2){ 5 temp += '#'; 6 temp += str 阅读全文