A - Secret of Chocolate Poles

队友写的。 好像水水的。

//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
//#pragma GCC optimize(4)
//#pragma GCC optimize("unroll-loops")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
#define fi first
#define se second
#define db double
#define mp make_pair
#define pb push_back
#define pi acos(-1.0)
#define ll long long
#define vi vector<int>
#define mod 998244353
#define ld long double
//#define C 0.5772156649
//#define ls l,m,rt<<1
//#define rs m+1,r,rt<<1|1
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define pii pair<int,int>
#define ull unsigned long long
//#define base 1000000000000000000
#define fin freopen("a.txt","r",stdin)
#define fout freopen("a.txt","w",stdout)
#define fio ios::sync_with_stdio(false);cin.tie(0)
inline ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
inline void sub(ll &a,ll b){a-=b;if(a<)a+=mod;}
inline void add(ll &a,ll b){a+=b;if(a>=mod)a-=mod;}
template<typename T>inline T const& MAX(T const &a,T const &b){return a>b?a:b;}
template<typename T>inline T const& MIN(T const &a,T const &b){return a<b?a:b;}
inline ll qp(ll a,ll b){ll ans=;while(b){if(b&)ans=ans*a%mod;a=a*a%mod,b>>=;}return ans;}
inline ll qp(ll a,ll b,ll c){ll ans=;while(b){if(b&)ans=ans*a%c;a=a*a%c,b>>=;}return ans;} using namespace std; const ull ba=;
const db eps=1e-;
const ll INF=0x3f3f3f3f3f3f3f3f;
const int N=+,maxn=+,inf=0x3f3f3f3f; ll dp[][];
int main()
{
int l,k;scanf("%d%d",&l,&k);
dp[][]=dp[k][]=;
for(int i=;i<=l;i++)
{
dp[i+][]+=dp[i][];
dp[i+][]+=dp[i][];
dp[i+k][]+=dp[i][];
}
ll ans=;
for(int i=;i<=l;i++)ans+=dp[i][];
printf("%lld\n",ans);
return ;
}
/******************** ********************/

C - Medical Checkup

队友写的。

//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
//#pragma GCC optimize(4)
//#pragma GCC optimize("unroll-loops")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
#define fi first
#define se second
#define db double
#define mp make_pair
#define pb push_back
#define pi acos(-1.0)
#define ll long long
#define vi vector<int>
#define mod 998244353
#define ld long double
//#define C 0.5772156649
//#define ls l,m,rt<<1
//#define rs m+1,r,rt<<1|1
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define pii pair<int,int>
#define ull unsigned long long
//#define base 1000000000000000000
#define fin freopen("a.txt","r",stdin)
#define fout freopen("a.txt","w",stdout)
#define fio ios::sync_with_stdio(false);cin.tie(0)
inline ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
inline void sub(ll &a,ll b){a-=b;if(a<)a+=mod;}
inline void add(ll &a,ll b){a+=b;if(a>=mod)a-=mod;}
template<typename T>inline T const& MAX(T const &a,T const &b){return a>b?a:b;}
template<typename T>inline T const& MIN(T const &a,T const &b){return a<b?a:b;}
inline ll qp(ll a,ll b){ll ans=;while(b){if(b&)ans=ans*a%mod;a=a*a%mod,b>>=;}return ans;}
inline ll qp(ll a,ll b,ll c){ll ans=;while(b){if(b&)ans=ans*a%c;a=a*a%c,b>>=;}return ans;} using namespace std; const ull ba=;
const db eps=1e-;
const ll INF=0x3f3f3f3f3f3f3f3f;
const int N=+,maxn=+,inf=0x3f3f3f3f; ll a[N];
int main()
{
ll n,t;scanf("%lld%lld",&n,&t);
for(int i=;i<=n;i++)scanf("%lld",&a[i]);
ll ma=,sum=;
for(int i=;i<=n;i++)
{
ma=max(ma,a[i]);
sum=sum+a[i];
if(t<sum)printf("%d\n",);
else
{
ll te=(t-sum)/ma+;
printf("%lld\n",te);
}
}
return ;
}
/******************** ********************/

B - Parallel Lines

dfs暴力枚举两两组合的情况, 枚举选第一个没被选的和枚举的组合, 这样能把复杂度降到最低。

然后答案一遍加入一遍更新, 好像我常数扣的有点厉害。 复杂度是15 * 13 * 11 * ... * 3

#include<bits/stdc++.h>
#define LL long long
#define fi first
#define se second
#define mk make_pair
#define PLL pair<LL, LL>
#define PLI pair<LL, int>
#define PII pair<int, int>
#define SZ(x) ((int)x.size())
#define ull unsigned long long using namespace std; const int N = + ;
const int M = + ;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + ;
const double eps = 1e-;
const double PI = acos(-); struct Point {
int x, y;
} p[N]; int X[][], Y[][], all;
int num[][];
int n, cnt[ << ], who[ << ];
int ans, tmp;
vector<int> go[ << ]; inline void change(int x, int y, int op) {
x += , y += ;
if(op == ) tmp += num[x][y];
else tmp -= num[x][y] - ;
num[x][y] += op;
} void dfs(int S) {
if(cnt[S] + > n) {
ans = max(ans, tmp);
return;
}
for(int i = ; i < SZ(go[S]); i++) {
change(X[go[S][]][go[S][i]], Y[go[S][]][go[S][i]], );
dfs(S | ( << go[S][]) | ( << go[S][i]));
change(X[go[S][]][go[S][i]], Y[go[S][]][go[S][i]], -);
}
} int main() {
for(int i = ; i < ( << ); i++)
cnt[i] = cnt[i - (i & -i)] + ;
scanf("%d", &n);
all = n / ;
for(int i = ; i < n; i++) {
scanf("%d%d", &p[i].x, &p[i].y);
}
for(int i = ; i < n; i++) {
for(int j = i + ; j < n; j++) {
X[i][j] = p[i].x - p[j].x;
Y[i][j] = p[i].y - p[j].y;
int gcd = __gcd(X[i][j], Y[i][j]);
X[i][j] /= gcd;
Y[i][j] /= gcd;
if(X[i][j] < ) X[i][j] = -X[i][j], Y[i][j] = -Y[i][j];
// printf("%d %d: %d %d\n", i, j, X[i][j], Y[i][j]);
}
}
for(int i = ; i < ( << n); i++)
for(int k = ; k < n; k++)
if(!(i >> k & )) go[i].push_back(k);
dfs();
printf("%d\n", ans);
return ;
} /*
*/

I - Starting a Scenic Railroad Service

队友写的。

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<queue>
#include<iostream>
#include<stack>
#include<string>
#include<map>
using namespace std;
#define pb push_back
#define pf push_front
#define lb lower_bound
#define ub upper_bound
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define mst(x,a) memset(x,a,sizeof(x))
#define all(x) (x).begin(),(x).end()
#define CLOSE ios::sync_with_stdio(false)
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
#define fi first
#define se second
#define sz(x) ((int)x.size())
#define cl(x) x.clear()
const int mod = ;
const int N = ;
const int INF=0x3f3f3f3f;
void MOD(ll &a){if(a>=mod) a-=mod;}
void MOD(ll &a,ll c){if(a>=c) a-=c;}
void ADD(ll &a,ll b){ a+=b; MOD(a);}
void ADD(ll &a,ll b,ll c){a+=b;MOD(a,c);}
ll qpow(ll a,ll b){ll ans=;while(b){if(b&)ans=ans*a%mod;a=a*a%mod;b/=;}return ans;}
ll qpow(ll a,ll b,ll c){ll ans=;while(b){if(b&)ans=ans*a%c;a=a*a%c;b/=;}return ans;} int n;
int x[N],y[N],B[N]; struct seg{
int l,r;
}a[N],b[N]; bool cmp1(seg a,seg b){
if(a.l==b.l) return a.r<b.r;
return a.l<b.l;
} bool cmp2(seg a,seg b){
if(a.r==b.r) return a.l<b.l;
return a.r<b.r;
} int main(){
scanf("%d",&n);
for(int i=;i<=n;i++){
scanf("%d%d",&x[i],&y[i]);
y[i]--;
B[x[i]]++; B[y[i]+]--;
a[i].l=x[i]; a[i].r=y[i];
b[i].l=x[i]; b[i].r=y[i];
}
sort(a+,a++n,cmp1);
sort(b+,b++n,cmp2); int ans1=,ans2=;
for(int i=;i<=;i++){
B[i]+=B[i-]; ans2=max(ans2,B[i]);
}
//a sort by l b sort by r
for(int i=;i<=n;i++){
int tmp=n;
int l=,r=n+;
while(l+<r){
int m=l+r>>;
if(a[m].l>y[i]) r=m;
else l=m;
}
tmp-=n-r+;
l=,r=n;
while(l+<r){
int m=l+r>>;
if(b[m].r<x[i]) l=m;
else r=m;
}
tmp-=l;
ans1=max(ans1,tmp);
} printf("%d %d\n",ans1,ans2);
}
/*
*/

F - Pizza Delivery

感觉是比较常规的套路题。

把边(u, v, w)反转以后如果 dis[ 1 ][ v ] + dis[ 2 ][ u ] + w < 最短路则是happy, 这里有个问题就是反转之后1到不了v, 但是反转前到到的了,

那么dis[ 1 ][ v ] 就不是INF, 但是通过分析我们能发现这不影响结果。

然后就是 sad 和 soso, 这个对 1 到 2 之间的最短路图求个桥就好了,看看反转的是不是桥。

#include<bits/stdc++.h>
#define LL long long
#define fi first
#define se second
#define mk make_pair
#define PLL pair<LL, LL>
#define PLI pair<LL, int>
#define PII pair<int, int>
#define SZ(x) ((int)x.size())
#define ull unsigned long long using namespace std; const int N = 1e5 + ;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + ;
const double eps = 1e-;
const double PI = acos(-); int n, m, a[N], b[N], c[N];
LL dis[][N];
bool flag[N]; struct node {
LL d;
int to, id;
bool operator < (const node& rhs) const {
return d > rhs.d;
}
}; vector<node> G[N], rG[N], sG[N]; priority_queue<node> que; void Dij(int S, LL dis[N]) {
dis[S] = ;
que.push(node{, S, });
while(!que.empty()) {
int u = que.top().to;
LL d = que.top().d; que.pop();
if(d > dis[u]) continue;
for(auto& t : G[u]) {
if(d + t.d < dis[t.to]) {
dis[t.to] = d + t.d;
que.push(node{dis[t.to], t.to, });
}
}
}
} void Dij2(int S, LL dis[N]) {
dis[S] = ;
que.push(node{, S, });
while(!que.empty()) {
int u = que.top().to;
LL d = que.top().d; que.pop();
if(d > dis[u]) continue;
for(auto& t : rG[u]) {
if(d + t.d < dis[t.to]) {
dis[t.to] = d + t.d;
que.push(node{dis[t.to], t.to, });
}
}
}
} int dfn[N], low[N], idx;
bool in[N]; void tarjan(int u, int fa) {
in[u] = true; ++idx;
dfn[u] = low[u] = idx;
for(node& t : sG[u]) {
int v = t.to;
if(v == fa) continue;
if(!dfn[v]) {
tarjan(v, u);
low[u] = min(low[u], low[v]);
if(dfn[u] < low[v]) flag[t.id] = true;
} else if(in[v]) {
low[u] = min(low[u], dfn[v]);
}
}
in[u] = false;
} int main() {
memset(dis, INF, sizeof(dis));
scanf("%d%d", &n, &m);
for(int i = ; i <= m; i++) {
scanf("%d%d%d", &a[i], &b[i], &c[i]);
G[a[i]].push_back(node{c[i], b[i], i});
rG[b[i]].push_back(node{c[i], a[i], i});
}
Dij(, dis[]);
Dij2(, dis[]);
LL mn = dis[][];
if(mn != INF) {
for(int i = ; i <= n; i++) {
for(node t : G[i]) {
if(t.d + dis[][i] + dis[][t.to] == mn) {
sG[i].push_back(t);
sG[t.to].push_back(node{t.d, i, t.id});
}
}
}
tarjan(, );
for(int i = ; i <= m; i++) {
if(dis[][b[i]] + dis[][a[i]] + c[i] < mn) {
puts("HAPPY");
} else {
if(flag[i]) puts("SAD");
else puts("SOSO");
}
}
} else {
for(int i = ; i <= m; i++) {
if(dis[][b[i]] + dis[][a[i]] + c[i] < mn) {
puts("HAPPY");
} else {
puts("SAD");
}
}
}
return ;
} /*
*/

赛后补题**********************************************************************************************************************************************

G - Rendezvous on a Tetrahedron

训练结束半个多小时才码出来。。。 把四面体展开, 然后暴力的取找到它最后的位置在哪里, 好像有更方便的方法, 我写得好麻烦啊啊。。

#include<bits/stdc++.h>
#define LL long long
#define fi first
#define se second
#define mk make_pair
#define PLL pair<LL, LL>
#define PLI pair<LL, int>
#define PII pair<int, int>
#define SZ(x) ((int)x.size())
#define ull unsigned long long using namespace std; const int N = 1e5 + ;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + ;
const double eps = 1e-;
const double PI = acos(-); struct Point {
double x, y;
void print() {
printf("%.3f %.3f ^^\n", x, y);
}
Point(double x = , double y = ) : x(x), y(y) { }
};
typedef Point Vector; int dcmp(double x) {
if(fabs(x) < eps) return ;
else return x < ? - : ;
} Point operator + (Vector A, Vector B) {return Point(A.x + B.x, A.y + B.y);}
Point operator - (Vector A, Vector B) {return Point(A.x - B.x, A.y - B.y);}
Point operator * (Vector A, double p) {return Point(A.x * p, A.y * p);}
Point operator / (Vector A, double p) {return Point(A.x / p, A.y / p);}
bool operator < (const Vector &A, const Vector &B) {return A.y < B.y || (A.y == B.y && A.x < B.x);}
bool operator == (const Vector &A, const Point &B) {return dcmp(A.x - B.x) == && dcmp(A.y - B.y) == ;}
double Dot(Vector A, Vector B) {return A.x * B.x + A.y * B.y;}
double Length(Vector A) {return sqrt(Dot(A, A));}
double Angle(Vector A, Vector B) {return acos(Dot(A, B) / Length(A) / Length(B));}
double Cross(Vector A, Vector B) {return A.x * B.y - A.y * B.x;}
double Area2(Point A, Point B, Point C) {return Cross(B - A, C - A);} Vector Rotate(Vector A, double rad) {
return Vector(A.x*cos(rad)-A.y*sin(rad), A.x*sin(rad)+A.y*cos(rad));
} double GetLineIntersectionTime(Point P, Vector v, Point Q, Vector w) {
Vector u = P - Q;
double t = Cross(w, u) / Cross(v, w);
return t;
} double dist(const Point& a, const Point &b) {
return sqrt((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y));
} bool isPointOnSegment(const Point &p, const Point &a1, const Point &a2)
{
if(dcmp(Cross(a1-p,a2-p))) return ;
else if(dcmp(p.x-min(a1.x,a2.x))>=&&dcmp(p.x-max(a1.x,a2.x))<=
&&dcmp(p.y-min(a1.y,a2.y))>=&&dcmp(p.y-max(a1.y,a2.y))<=) return ;
else return ;
} int isPointInPolygon(Point p, Point *poly, int n) {
int wn = ;
for(int i = ; i < n; i++) {
if(isPointOnSegment(p, poly[i], poly[(i+)%n])) return -; //在边界上
int k = dcmp(Cross(poly[(i+)%n]-poly[i], p-poly[i]));
int d1 = dcmp(poly[i].y-p.y);
int d2 = dcmp(poly[(i+)%n].y-p.y);
if(k> && d1<= && d2>) wn++;
if(k< && d2<= && d1>) wn--;
}
if(wn != ) return ; //内部
return ; //外部
} Point A2 = Point(, );
Point A3 = Point(, );
Point A1 = Point(, sqrt(3.0));
Point D = (A1 + A2) / ;
Point B = (A1 + A3) / ;
Point C = (A2 + A3) / ; Point poly1[] = {A1, D, B};
Point poly2[] = {D, C, B};
Point poly3[] = {D, A2, C};
Point poly4[] = {B, C, A3}; bool isA12(Point x) {
return isPointOnSegment(x, A1, A2);
}
bool isA23(Point x) {
return isPointOnSegment(x, A2, A3);
}
bool isA31(Point x) {
return isPointOnSegment(x, A3, A1);
}
int belong(Point x) {
if(isPointInPolygon(x, poly1, ) == ) return ;
if(isPointInPolygon(x, poly2, ) == ) return ;
if(isPointInPolygon(x, poly3, ) == ) return ;
if(isPointInPolygon(x, poly4, ) == ) return ;
} Point dfs(Point p, Vector v, double len) {
if(isA12(p)) {
double t1 = GetLineIntersectionTime(p, v, A2, A3 - A2);
double t2 = GetLineIntersectionTime(p, v, A1, A3 - A1);
Point nxtp;
if(dcmp(t1) > && (dcmp(t2) <= || dcmp(t1) > && t1 < t2)) {
nxtp = p + (v * t1);
double gg = dist(p, nxtp);
if(dcmp(len - gg) < ) {
return p + (v / Length(v)) * len;
} else {
nxtp = C * 2.0 - nxtp;
v = Rotate(v, PI);
return dfs(nxtp, v, len - gg);
}
} else {
nxtp = p + v * t2;
double gg = dist(p, nxtp);
if(dcmp(len - gg) < ) {
return p + (v / Length(v)) * len;
} else {
nxtp = B * 2.0 - nxtp;
v = Rotate(v, PI);
return dfs(nxtp, v, len - gg);
}
}
} else if(isA23(p)) {
double t1 = GetLineIntersectionTime(p, v, A1, A1 - A2);
double t2 = GetLineIntersectionTime(p, v, A1, A1 - A3);
Point nxtp;
if(dcmp(t1) > && (dcmp(t2) <= || dcmp(t1) > && t1 < t2)) {
nxtp = p + v * t1;
double gg = dist(p, nxtp);
if(dcmp(len - gg) < ) {
return p + (v / Length(v)) * len;
} else {
nxtp = D * 2.0 - nxtp;
v = Rotate(v, PI);
return dfs(nxtp, v, len - gg);
}
} else {
nxtp = p + v * t2;
double gg = dist(p, nxtp);
if(dcmp(len - gg) < ) {
return p + (v / Length(v)) * len;
} else {
nxtp = B * 2.0 - nxtp;
v = Rotate(v, PI);
return dfs(nxtp, v, len - gg);
}
}
} else if(isA31(p)) {
double t1 = GetLineIntersectionTime(p, v, A2, A2 - A1);
double t2 = GetLineIntersectionTime(p, v, A2, A2 - A3);
Point nxtp;
if(dcmp(t1) > && (dcmp(t2) <= || dcmp(t1) > && t1 < t2)) {
nxtp = p + v * t1;
double gg = dist(p, nxtp);
if(dcmp(len - gg) < ) {
return p + (v / Length(v)) * len;
} else {
nxtp = D * 2.0 - nxtp;
v = Rotate(v, PI);
return dfs(nxtp, v, len - gg);
}
} else {
nxtp = p + v * t2;
double gg = dist(p, nxtp);
if(dcmp(len - gg) < ) {
return p + (v / Length(v)) * len;
} else {
nxtp = C * 2.0 - nxtp;
v = Rotate(v, PI);
return dfs(nxtp, v, len - gg);
}
}
}
} Point read() {
char s[];
double d, l;
scanf("%s%lf%lf", s, &d, &l);
if(s[] == 'C' && s[] == 'D') {
Point startp = A2;
Vector startv = Rotate(C - A2, d / * PI);
return dfs(startp, startv, l);
} else if(s[] == 'D' && s[] == 'B') {
Point startp = A1;
Vector startv = Rotate(D - A1, d / * PI);
return dfs(startp, startv, l);
} else {
Point startp = A3;
Vector startv = Rotate(B - A3, d / * PI);
return dfs(startp, startv, l);
}
} int main() {
Point Point1 = read();
Point Point2 = read();
if(belong(Point1) == belong(Point2)) puts("YES");
else puts("NO");
return ;
} /*
*/

E - Black or White

不会写, 但是看了题解觉得好有道理啊啊啊, 我怎么没想到呢。

我们把t[ i ] == s[ i ]的位置的颜色保留, 把颜色不同的当成没有颜色就好了。

我们定义dp[ i ] 表示把 1 - i 全部染成对应颜色所需要的次数。

我们把 t 中连续相同的一段看成一个整体。变成 WBWBWB的形式, 如果长度为 m 则答案为 (m / 2) + 1

如果t[ i ] == s[ i ]      dp[ i ] = dp[ i - 1]

否则                         dp[ i ] = min(dp[ j ] + (sum[ i ] - sum[ j + 1 ]) / 2 + 1)

很显然能发现能用单调队列优化。

#include<bits/stdc++.h>
#define LL long long
#define fi first
#define se second
#define mk make_pair
#define PLL pair<LL, LL>
#define PLI pair<LL, int>
#define PII pair<int, int>
#define SZ(x) ((int)x.size())
#define ull unsigned long long using namespace std; const int N = 5e5 + ;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + ;
const double eps = 1e-;
const double PI = acos(-); int n, k, head, rear, sum[N], que[N];
int dp[N];
char s[N], t[N]; int main() {
scanf("%d%d", &n, &k);
scanf("%s%s", s + , t + );
for(int i = ; i <= n; i++) sum[i] = sum[i - ] + (t[i] != t[i - ]);
head = , rear = ;
dp[] = ;
que[++rear] = ;
for(int i = ; i <= n; i++) {
if(t[i] == s[i]) {
dp[i] = dp[i - ];
} else {
while(head <= rear && i - que[head] > k) head++;
dp[i] = dp[que[head]] + (sum[i] - sum[que[head] + ] + ) / + ;
}
while(head <= rear && *dp[i] - sum[i + ] <= *dp[que[rear]] - sum[que[rear] + ]) rear--;
que[++rear] = i;
}
printf("%d\n", dp[n]);
return ;
} /*
*/

gym 101986的更多相关文章

  1. ACM: Gym 101047M Removing coins in Kem Kadrãn - 暴力

     Gym 101047M Removing coins in Kem Kadrãn Time Limit:2000MS     Memory Limit:65536KB     64bit IO Fo ...

  2. ACM: Gym 101047K Training with Phuket's larvae - 思维题

     Gym 101047K Training with Phuket's larvae Time Limit:2000MS     Memory Limit:65536KB     64bit IO F ...

  3. ACM: Gym 101047E Escape from Ayutthaya - BFS

    Gym 101047E Escape from Ayutthaya Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I6 ...

  4. ACM: Gym 101047B Renzo and the palindromic decoration - 手速题

     Gym 101047B  Renzo and the palindromic decoration Time Limit:2000MS     Memory Limit:65536KB     64 ...

  5. Gym 101102J---Divisible Numbers(反推技巧题)

    题目链接 http://codeforces.com/gym/101102/problem/J Description standard input/output You are given an a ...

  6. Gym 100917J---Judgement(01背包+bitset)

    题目链接 http://codeforces.com/gym/100917/problem/J Description standard input/outputStatements The jury ...

  7. Gym 100917J---dir -C(RMQ--ST)

    题目链接 http://codeforces.com/gym/100917/problem/D problem description Famous Berland coder and IT mana ...

  8. Gym 101102D---Rectangles(单调栈)

    题目链接 http://codeforces.com/gym/101102/problem/D problem  description Given an R×C grid with each cel ...

  9. Gym 101102C---Bored Judge(区间最大值)

    题目链接 http://codeforces.com/gym/101102/problem/C problem description Judge Bahosain was bored at ACM ...

随机推荐

  1. set, unordered_set模板类

    template< class Key, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key> ...

  2. Django入门项目实践(下)

    5.设置应用程序的样式 安装django-bootstrap3. # untitled/untitled/settings.py # ··· INSTALLED_APPS = [ 'django.co ...

  3. 51nod1462 树据结构(树链剖分+线段树)

    这题好久之前就被学长安利了...一直没写珍藏在收藏夹一个不为人知的角落233 这题怎么做...我们来数形结合,横坐标为$t_i$被加的次数(可看作时间$t$),纵坐标为$v_i$,那么$t_i$实际上 ...

  4. UiAutomator2.0入门

    总是听说UiAutomator这个框架,但从来没有使用过.找了篇入门,实践一下.实践之后感觉,uiautomator写测试代码,还是有点费劲.接口名比较多,比较长.网易的atx里使用的uiautoma ...

  5. golang(01) linux环境搭建和编码

    1 在自己的工作目录下建立一个goproject文件夹 /home/secondtonone/goproject 2 在文件夹下建立如下三个文件 bin pkg srcbin 保存执行go insta ...

  6. SQL Server 一些查询技巧

    --1.[行列转换] --列转行 USE tempdb GO IF (OBJECT_ID('DEPT') IS NOT NULL) DROP TABLE DEPT CREATE TABLE DEPT( ...

  7. 情人节网站logo赏析

    一年一度的情人节,不少网站都进行了不错的装点,我们不妨来简单浏览一下,借以触发灵感. 百度 百度的logo放上了改变,变成了一个gif,图片如下. 腾讯 淘宝 淘宝的logo同样换成了一个gif 谷歌 ...

  8. IsNullOrWhiteSpace与IsNullOrEmpty

    public static boolean IsNullOrEmpty(String value) { return (value == null || value.length() == 0);} ...

  9. java学习路线-从入门到入土

    以下是个人学习路线,资源等我找到了 share,如果没找到请自行百度: 1.javase 观看 毕向东的 javase ,主要是老毕口才略屌,听着不容易打瞌睡,冷不丁吓你一大跳 老毕的年代久远,我已经 ...

  10. Spring Cloud (十五)Stream 入门、主要概念与自定义消息发送与接收

    前言 不写随笔的日子仿佛就是什么都没有产出一般--上节说到要学Spring Cloud Bus,这里发现按照官方文档的顺序反而会更好些,因为不必去后边的章节去为当前章节去打基础,所以我们先学习Spri ...