A. Automatic Door

对于规律的点可以推公式计算,对于噪点则暴力计算,时间复杂度$O(m\log m)$。

#include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
#include<ctype.h>
#include<math.h>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<bitset>
#include<algorithm>
#include<time.h>
using namespace std;
const int N = 1e5 + 10;
typedef long long LL;
const LL inf = 3e18;
void gmin(LL &x, LL y){if(y < x)x = y;}
LL t[N];
LL n, A, m, D;
int main()
{
while(~scanf("%lld%lld%lld%lld", &n, &m, &A, &D))
{
for(int i = 1; i <= m; ++i)scanf("%lld", &t[i]);
sort(t + 1, t + m + 1);
m = unique(t + 1, t + m + 1) - t - 1;
t[m + 1] = inf; //2e18 LL p1 = 1, p2 = 1; LL num_in_D = D / A + 1;
LL ans = 0;
while(p1 <= n || p2 <= m)
{
//get first time
LL now = inf;
if(p1 <= n)gmin(now, p1 * A);
if(p2 <= m)gmin(now, t[p2]);
LL can = now + D; //
//printf("now = %lld\n", now);
// //if we start at a strange point, just try the 1 segment
if(p2 <= m && t[p2] == now)
{
++ans;
p1 = can / A + 1;
p2 = upper_bound(t + p2, t + m + 1, can) - t;
//
//printf("p2 first: p1 = %d p2 = %d\n", p1, p2);
//
continue;
} //find the first not covered p2, and all the before are in circle
p2 = upper_bound(t + p2, t + m + 1, can) - t;
//
//printf("p2=%d\n", p2);
//
LL ED = t[p2] - D - 1;
LL lastp1 = min(ED / A, n);
LL add = (lastp1 - p1 + 1 + num_in_D - 1) / num_in_D; //
//printf("ED = %lld lastp1 = %lld add = %lld\n", ED, lastp1, add);
// ans += add;
p1 += add * num_in_D; //
//getchar();
//
}
printf("%lld\n", ans);
}
return 0;
}
/*
1 1 3 4
7 4 3 4 2
7 9 11 1000000000 0 1000000000 1000000000000000000 999999999 0 1000000000 1000000000 */

  

B. Berland Army

首先若存在环则无解,否则通过DP可以求出每个数的最小值。

然后按照逆拓扑序,每次选择下界最小的点,填充最大的可以填充的值。

时间复杂度$O(m\log m)$。

#include<cstdio>
#include<algorithm>
#include<set>
#include<cstdlib>
#include<ctime>
#include<queue>
using namespace std;
typedef pair<int,int>P;
const int N=500010;
int n,m,K,i,a[N],f[N],x,y,g[N],v[N],nxt[N],ed,d[N];
int h,t,q[N];
int G[N],V[N],NXT[N],ED;
set<int>T;
int cnt[N];
struct E{int x,y;}e[N];
priority_queue<P>qu;
inline void add(int x,int y){
v[++ed]=y;nxt[ed]=g[x];g[x]=ed;
d[y]++;
}
inline void ADD(int x,int y){
V[++ED]=y;NXT[ED]=G[x];G[x]=ED;
d[y]++;
}
bool can_vio(){
long long t=1;
for(int i=1;i<=n;i++)if(!a[i]){
t*=K;
if(t>1e9)return 0;
}
return 1;
}
inline bool check(){
int i,j;
for(i=1;i<=n;i++){
for(int j=g[i];j;j=nxt[j])if(f[i]>=f[v[j]])return 0;
}
static bool used[N];
for(i=1;i<=K;i++)used[i]=0;
for(i=1;i<=n;i++)used[f[i]]=1;
for(i=1;i<=K;i++)if(!used[i])return 0;
return 1;
}
void dfs(int x){
if(x>n){
if(check()){
for(int i=1;i<=n;i++)printf("%d ",f[i]);
exit(0);
}
return;
}
if(a[x]){
f[x]=a[x];
dfs(x+1);
return;
}
for(int i=1;i<=K;i++){
f[x]=i;
dfs(x+1);
}
}
int main(){
srand(time(NULL));
scanf("%d%d%d",&n,&m,&K);
for(i=1;i<=n;i++)scanf("%d",&a[i]),f[i]=max(1,a[i]);
for(i=1;i<=m;i++)scanf("%d%d",&e[i].x,&e[i].y);
random_shuffle(e+1,e+m+1);
for(i=1;i<=m;i++){
x=e[i].x,y=e[i].y;//x>y
add(y,x);//y<x
}
for(h=i=1;i<=n;i++)if(!d[i])q[++t]=i;
while(h<=t){
x=q[h++];
for(i=g[x];i;i=nxt[i]){
f[v[i]]=max(f[v[i]],f[x]+1);
if(!(--d[v[i]]))q[++t]=v[i];
}
}
if(t<n)return puts("-1"),0;
for(i=1;i<=n;i++)if(a[i]&&f[i]!=a[i])return puts("-1"),0;
for(i=1;i<=n;i++)if(f[i]>K)return puts("-1"),0; if(can_vio()){
//dfs(1);
} for(i=1;i<=K;i++)T.insert(i);
for(i=1;i<=n;i++)if(a[i])T.erase(a[i]);
for(i=1;i<=n;i++)T.erase(f[i]);
for(i=1;i<=n;i++)cnt[f[i]]++; for(i=1;i<=n;i++)d[i]=0;
for(i=1;i<=m;i++){
x=e[i].x,y=e[i].y;//x>y
ADD(x,y);//y<x
} for(i=1;i<=n;i++)if(!d[i])qu.push(P(f[i],i));
while(!qu.empty()){
P t=qu.top();qu.pop();
x=t.second;
for(i=G[x];i;i=NXT[i])if(!(--d[V[i]]))qu.push(P(f[V[i]],V[i]));
if(a[x])continue;
int lim=K;
for(int j=g[x];j;j=nxt[j]){
lim=min(lim,f[v[j]]-1);
}
//printf("%d %d %d\n",x,f[x],lim);
set<int>::iterator it=T.lower_bound(lim);
if(it!=T.begin()&&it==T.end())it--;
while(it!=T.begin()&&(*it)>lim)it--;
//if(it!=T.end())printf("it=%d\n",*it);
bool flag=0;
int old=f[x];
if(it!=T.end()&&(*it)<=lim){
if((*it)>f[x])f[x]=*it,flag=1;
}
if(flag){
cnt[old]--;
if(!cnt[old])T.insert(old);
cnt[f[x]]++;
T.erase(f[x]);
}
}
if(T.size())return puts("-1"),0;
for(i=1;i<=n;i++)if(a[i]&&f[i]!=a[i])return puts("-1"),0;
for(i=1;i<=n;i++){
for(int j=g[i];j;j=nxt[j])if(f[i]>=f[v[j]])return puts("-1"),0;
}
for(i=1;i<=n;i++)printf("%d ",f[i]);
}

  

C. Downloading B++

双指针枚举两种加油包的使用次数,时间复杂度$O(n)$。

#include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
#include<ctype.h>
#include<math.h>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<bitset>
#include<algorithm>
#include<time.h>
using namespace std;
void fre() { freopen("c://test//input.in", "r", stdin); freopen("c://test//output.out", "w", stdout); }
#define MS(x, y) memset(x, y, sizeof(x))
#define ls o<<1
#define rs o<<1|1
typedef long long LL;
typedef unsigned long long UL;
typedef unsigned int UI;
template <class T1, class T2>inline void gmax(T1 &a, T2 b) { if (b > a)a = b; }
template <class T1, class T2>inline void gmin(T1 &a, T2 b) { if (b < a)a = b; }
const int N = 0, M = 0, Z = 1e9 + 7, inf = 0x3f3f3f3f;
template <class T1, class T2>inline void gadd(T1 &a, T2 b) { a = (a + b) % Z; }
int casenum, casei;
LL G, T, t0;
LL g1, t1, p1;
LL g2, t2, p2;
bool ok(LL G, LL T, LL num2)
{
LL sum = min(G, num2 * g2);
LL tim = sum * t2;
return (G - sum) * t0 <= (T - tim);
}
int main()
{
while (~scanf("%lld%lld%lld", &G, &T, &t0))
{
scanf("%lld%lld%lld", &g1, &t1, &p1);
scanf("%lld%lld%lld", &g2, &t2, &p2);
if (t1 > t2)
{
swap(g1, g2);
swap(t1, t2);
swap(p1, p2);
}
if (t2 >= t0)
{
t2 = t0;
g2 = 1;
p2 = 0;
}
LL top1 = (G + g1 - 1) / g1;
LL top2 = (G + g2 - 1) / g2;
LL ans = 9e18;
for (int num1 = 0, num2 = top2; num1 <= top1; ++num1)
{
LL sum = min(G, num1 * g1);
LL tim = sum * t1;
if (tim > T)break;
//gmin(num2, (T - tim + t2 - 1) / t2);
//while (num2 >= 0 && (G - sum) * t2 > (T - tim))--num2;
while (num2 >= 0 && ok(G - sum, T - tim, num2))
{
gmin(ans, num1 * p1 + num2 * p2);
--num2;
}
}
if (ans == 9e18)ans = -1;
printf("%lld\n", ans);
}
return 0;
}

  

D. Packmen Strike Back

若只有一个人,那么显然可以枚举他的方向。

否则一定可以拿到所有的物品,二分答案,DP求出前$i$个人能达到的最长前缀,最多只有连续两个人反向。

时间复杂度$O(n\log n)$。

E. Field of Wonders

按题意模拟即可。

#include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
#include<ctype.h>
#include<math.h>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<bitset>
#include<algorithm>
#include<time.h>
using namespace std;
const int N=50 + 10,M=1010;
int n, m;
char s[N], a[M][N];
char ss[10];
bool e[M];
int main(){
scanf("%d", &n);
scanf("%s", s);
scanf("%d", &m);
for(int i = 1; i <= m; i ++){
scanf("%s", a[i]);
int o = 0;
for(int j = 0; j < n; j ++){
if(s[j] != '*'){
if(a[i][j] != s[j]){e[i] = 1;}
continue;
}
ss[0] = a[i][j]; ss[1] = 0;
if(strstr(s, ss) == 0){
a[i][o++] = a[i][j];
}
else{e[i] = 1;}
}
a[i][o] = 0;
}
int ans = 0;
for(char ch = 'a'; ch <= 'z'; ch ++){
ss[0] = ch; ss[1] = 0;
if(strstr(s, ss) == 0){
int flag = 1;
for(int i = 1; i <= m; i ++){
if(!e[i] && strstr(a[i], ss) == 0){
flag = 0;
break;
}
}
if(flag) ans ++;
}
}
printf("%d\n", ans);
return 0;
}

  

F. Lost in Transliteration

将所有$u$换成$oo$,同时将所有$kh$换成$h$即可。

#include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
#include<ctype.h>
#include<math.h>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<bitset>
#include<algorithm>
#include<time.h>
using namespace std;
const int N = 1e5 + 10;
const int inf = 1e9;
int casenum, casei;
int n;
string s;
int main()
{
while(~scanf("%d", &n))
{
set<string>sot;
for(int i = 1; i <= n; ++i)
{
cin >> s;
while(1)
{
int pos = s.find("u");
if(pos >= 0 && pos < s.size())
{
s.replace(pos, 1, "oo");
}
else break;
}
while(1)
{
int pos = s.find("kh");
if(pos >= 0 && pos < s.size())
{
s.replace(pos, 2, "h");
}
else break;
}
sot.insert(s);
}
cout << sot.size() << endl;
}
return 0;
}
/* */

  

G. Orientation of Edges

从起点开始BFS,对于最多点数,则尽量把边往外定向;对于最少点数,则尽量把边往内定向。

#include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
#include<ctype.h>
#include<math.h>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<bitset>
#include<algorithm>
#include<time.h>
using namespace std;
#define MS(x,y) memset(x, y, sizeof(x))
const int N = 3e5 + 10;
const int inf = 1e9;
int casenum, casei;
int n, m, g, top, S;
struct A
{
int y, w, o;
};
int ans[N];
bool vis[N];
vector<A>a[N];
void BFS(int AIM)
{
MS(ans, -1);
MS(vis, 0);
queue<int>q;
q.push(S); vis[S] = 1;
int ansnum = 0;
while(!q.empty())
{
int x = q.front(); q.pop();
++ansnum;
for(auto it : a[x])
{
int y = it.y;
int w = it.w;
int o = it.o;
if(vis[y])continue;
if(w == 2 || AIM)
{
q.push(y);
vis[y] = 1;
}
if(ans[o] == -1)
{
bool rev = AIM ^ w;
ans[o] = rev;
}
}
}
printf("%d\n", ansnum);
for(int i = 1; i <= g; ++i)
{
printf("%c", ans[i] == 1 ? '-' : '+');
}puts("");
}
int main()
{
while(~scanf("%d%d%d", &n, &m, &S))
{
top = max(n, m);
for(int i = 1; i <= top; ++i)
{
a[i].clear();
}
g = 0;
for(int i = 1; i <= m; ++i)
{
int op, x, y;
scanf("%d%d%d", &op, &x, &y);
if(op == 2)
{
++g;
a[x].push_back({y, 1, g});
a[y].push_back({x, 0, g});
}
else
{
a[x].push_back({y, 2, 0});
}
}
BFS(1);
BFS(0);
}
return 0;
}
/*
2 2 1
1 1 2
2 2 1 6 6 3
2 2 6
1 4 5
2 3 4
1 4 1
1 3 1
2 2 3
*/

  

H. Palindromic Cut

枚举段数,根据奇偶性分类讨论构造。

#include<cstdio>
#include<cstdlib>
using namespace std;
const int N=400010,M=200;
int n,i,j,c[M];
int cntodd;
char a[N],b[N],p[N];
inline int geteven(){
for(int i=0;i<M;i++)if(c[i]&&c[i]%2==0)return i;
return -1;
}
inline int getodd(int k=1){
for(int i=0;i<M;i++)if(c[i]>=k&&c[i]%2==1)return i;
return -1;
}
inline void check(int len){//each length
if(n%len)return;
int i,j;
if(len%2==0){
if(cntodd)return;
for(i=0;i<M;i++)c[i]/=2;
printf("%d\n",n/len);
int k=0;
for(i=0;i<n/len;i++){//each part
for(j=0;j<len/2;j++){
while(!c[k])k++;
p[j]=k;
c[k]--;
}
for(j=0;j<len/2;j++)putchar(p[j]);
for(j=len/2-1;~j;j--)putchar(p[j]);
putchar(' ');
}
exit(0);
}
//len%2==1
int ret=n/len-cntodd;
if(ret<0)return;
if(ret%2)return;
printf("%d\n",n/len);
for(i=0;i<n/len;i++){
int k=getodd();
if(k<0)k=geteven();
c[k]--;
for(j=0;j<len/2;j++){
p[j]=geteven();
if(p[j]<0)p[j]=getodd(3);
c[p[j]]-=2;
}
for(j=0;j<len/2;j++)putchar(p[j]);
putchar(k);
for(j=len/2-1;~j;j--)putchar(p[j]);
putchar(' ');
}
exit(0);
}
int main(){
scanf("%d%s",&n,a);
for(i=0;i<n;i++)c[a[i]]++;
for(i=0;i<M;i++)if(c[i]%2)cntodd++;
for(i=n;i;i--)check(i);
}

  

I. Photo Processing

二分答案,然后排序后DP,双指针+前缀和优化。

时间复杂度$O(n\log n)$。

#include<cstdio>
#include<algorithm>
using namespace std;
int n,m,i,l,r,mid,a[333333],ans,f[333333],s[333333];
bool check(){
int i,j;
f[0]=s[0]=1;
for(i=1,j=0;i<=n;i++){
while(a[i]-a[j+1]>mid)j++;
int l=j,r=i-m;
f[i]=0;
if(l<=r)f[i]=!!(s[r]-s[l-1]);
s[i]=s[i-1]+f[i];
}
return f[n];
}
int main(){
scanf("%d%d",&n,&m);
for(i=1;i<=n;i++)scanf("%d",&a[i]);
sort(a+1,a+n+1);
l=0,r=a[n]-a[1];
while(l<=r){
mid=(l+r)>>1;
if(check())r=(ans=mid)-1;else l=mid+1;
}
printf("%d",ans);
}

  

J. Renovation

按价格从小到大考虑每个房子,在最靠后的能覆盖的地方拆掉这个房子,线段树维护可行性。

时间复杂度$O(n\log n)$。

#include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
#include<ctype.h>
#include<math.h>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<bitset>
#include<algorithm>
#include<time.h>
#define rt 1,1,top
#define ls o<<1
#define rs o<<1|1
#define mid (l+r>>1)
#define lson ls,l,mid
#define rson rs,mid+1,r
using namespace std;
const int N = 1e5 + 10;
typedef long long LL;
int casenum, casei;
LL n, m;
LL a[N], suma[N];
int sta[N], top;
struct B
{
LL b, p;
bool operator < (const B & b)const
{
return p < b.p;
}
}b[N];
LL flag[N * 4];
LL v[N * 4];
LL mn[N * 4];
void pushdown(int o)
{
if(flag[o])
{
flag[ls] += flag[o];
flag[rs] += flag[o];
v[ls] -= flag[o];
v[rs] -= flag[o];
mn[ls] -= flag[o];
mn[rs] -= flag[o];
flag[o] = 0;
}
}
void pushup(int o)
{
mn[o] = min(mn[ls], mn[rs]);
}
void build(int o, int l, int r)
{
flag[o] = 0;
if(l == r)
{
v[o] = suma[sta[l]];
mn[o] = suma[sta[l]];
return;
}
build(lson);
build(rson);
pushup(o);
}
int L, R, P; LL V;
LL check(int o, int l, int r)
{
if(L <= l && r <= R)
{
return mn[o];
}
pushdown(o);
LL rtn = 1e18;
if(L <= mid)
{
rtn = min(rtn, check(lson));
}
if(R > mid)
{
rtn = min(rtn, check(rson));
}
pushup(o);
return rtn;
}
void dec(int o, int l, int r)
{
if(L <= l && r <= R)
{
flag[o] += V;
v[o] -= V;
mn[o] -= V;
return;
}
pushdown(o);
if(L <= mid)dec(lson);
if(R > mid)dec(rson);
pushup(o);
}
int main()
{
while(~scanf("%lld%lld", &n, &m))
{
for(int i = 1; i <= n; ++i)
{
scanf("%lld", &a[i]);
suma[i] = suma[i - 1] + a[i];
}
for(int i = 1; i <= m; ++i)
{
scanf("%lld", &b[i].b);
}
for(int i = 1; i <= m; ++i)
{
scanf("%lld", &b[i].p);
}
sort(b + 1, b + m + 1); top = 0;
for(int i = 1; i <= n; ++i)
{
while(top && a[i] >= a[sta[top]])--top;
sta[++top] = i;
}
build(rt);
int ans = 0;
for(int i = 1; i <= m; ++i)
{
int l = 0;
int r = top;
while(l < r)
{
int md = (l + r + 1) / 2;
if(a[sta[md]] >= b[i].b)
{
l = md;
}
else r = md - 1;
}
if(l)
{
L = l;
R = top;
LL val = check(rt);
if(val >= b[i].p)
{
++ans;
V = b[i].p;
dec(rt);
}
}
}
printf("%d\n", ans);
}
return 0;
}
/* */

  

K. Road Widening

首先将每个数都拨高到最大限度,然后正反两边递推满足差值的限制即可。

#include<cstdio>
#include<algorithm>
using namespace std;
const int N=1000010;
int n,i,f[N],s[N],g[N];long long ans;
int main(){
scanf("%d",&n);
for(i=1;i<=n;i++)scanf("%d%d",&s[i],&g[i]),f[i]=s[i]+g[i];
for(i=2;i<=n;i++)f[i]=min(f[i-1]+1,f[i]);
for(i=n-1;i;i--)f[i]=min(f[i+1]+1,f[i]);
for(i=1;i<=n;i++)if(f[i]<s[i])return puts("-1"),0;
for(i=1;i<=n;i++)ans+=f[i]-s[i];
printf("%I64d\n",ans);
for(i=1;i<=n;i++)printf("%d ",f[i]);
}

  

L. Berland.Taxi

按题意模拟。

M. Quadcopter Competition

答案为两倍的曼哈顿距离加上一点微调距离。

#include<cstdio>
int a,b,c,d,x,y,ans;
int abs(int x){return x>0?x:-x;}
int main(){
scanf("%d%d%d%d",&a,&b,&c,&d);
x=abs(a-c);
y=abs(b-d);
if(x*y==0)ans=x+y+3;else ans=x+y+2;
printf("%d",ans*2);
}

  

2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest的更多相关文章

  1. 2018-2019 ICPC, NEERC, Southern Subregional Contest

    目录 2018-2019 ICPC, NEERC, Southern Subregional Contest (Codeforces 1070) A.Find a Number(BFS) C.Clou ...

  2. Codeforces 2018-2019 ICPC, NEERC, Southern Subregional Contest

    2018-2019 ICPC, NEERC, Southern Subregional Contest 闲谈: 被操哥和男神带飞的一场ACM,第一把做了这么多题,荣幸成为7题队,虽然比赛的时候频频出锅 ...

  3. 2018.10.20 2018-2019 ICPC,NEERC,Southern Subregional Contest(Online Mirror, ACM-ICPC Rules)

    i207M的“怕不是一个小时就要弃疗的flag”并没有生效,这次居然写到了最后,好评=.= 然而可能是退役前和i207M的最后一场比赛了TAT 不过打得真的好爽啊QAQ 最终结果: 看见那几个罚时没, ...

  4. 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror) Solution

    从这里开始 题目列表 瞎扯 Problem A Find a Number Problem B Berkomnadzor Problem C Cloud Computing Problem D Gar ...

  5. Codeforces1070 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred)总结

    第一次打ACM比赛,和yyf两个人一起搞事情 感觉被两个学长队暴打的好惨啊 然后我一直做傻子题,yyf一直在切神仙题 然后放一波题解(部分) A. Find a Number LINK 题目大意 给你 ...

  6. codeforce1070 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) 题解

    秉承ACM团队合作的思想懒,这篇blog只有部分题解,剩余的请前往星感大神Star_Feel的blog食用(表示男神汉克斯更懒不屑于写我们分别代写了下...) C. Cloud Computing 扫 ...

  7. 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred)

    A. Find a Number 找到一个树,可以被d整除,且数字和为s 记忆化搜索 static class S{ int mod,s; String str; public S(int mod, ...

  8. 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) Solution

    A. Find a Number Solved By 2017212212083 题意:$找一个最小的n使得n % d == 0 并且 n 的每一位数字加起来之和为s$ 思路: 定义一个二元组$< ...

  9. 【*2000】【2018-2019 ICPC, NEERC, Southern Subregional Contest C 】Cloud Computing

    [链接] 我是链接,点我呀:) [题意] [题解] 我们可以很容易知道区间的每个位置有哪些安排可以用. 显然 我们优先用那些花费的钱比较少的租用cpu方案. 但一个方案可供租用的cpu有限. 我们可以 ...

  10. 2018-2019 ICPC, NEERC, Southern Subregional Contest (codeforces 1070)

    A. 直接从状态(0,0)bfs, 这样一定是最小的 #include <iostream> #include <sstream> #include <algorithm ...

随机推荐

  1. 金融量化分析【day111】:Matplotib-绘制K线图

    一.绘制k线图 1.使用金融包出错解决 1.错误代码 ImportError: No module named finance 2.解决办法 https://github.com/matplotlib ...

  2. Entity Framework入门教程(8)---预先加载、延迟加载、显示加载

    1.预先加载 预先加载:在对一种类型的实体进行查询时,将相关的实体作为查询的一部分一起加载.预先加载可以使用Include()方法实现. 1.加载一个相关实体类型 栗子:使用Include()方法从数 ...

  3. Entity Framework入门教程(15)---DbContext追踪实体状态改变

    这一节介绍DbContext追踪实体的变化.EF支持DbContext在其生命周期中自动追踪加载的实体.我们可以通过DbChangeTracker类获取DbContext追踪的所有实体的变化. 注意每 ...

  4. https://www.chromestatus.com/features/5093566007214080

    移动端滑动报错:Unable to preventDefault inside passive event listener due to target being treated as passiv ...

  5. CemtOS7更改yum网易 阿里云的yum源。

    一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/Cent ...

  6. 使用OpenPop.dll开发读取POP3邮件程序

    1.设置邮件的pop3 以163网易邮箱为例: https://jingyan.baidu.com/article/adc81513804be9f722bf7350.html 2.下载OpenPop. ...

  7. 用sklearn 实现linear regression

    基本的regression算法有四种方法可以实现,分别是下面四种 LinearRegressionRidge (L2 regularization)Lasso (L1 regularization)E ...

  8. Studio 5000指令IN_OUT管脚实现西门子风格

    习惯了西门子博途编辑风格的同学,乍一看到Studio 5000的编辑界面,一时不适应,尤其是功能块或指令的IN和OUT管脚在一起,不好分辨,本文简单几步搞定,实现像西门子IN和OUT分左右显示风格. ...

  9. 基于STM32F1的局域网通信模块W5500驱动

    目录 说明 W5500 W5500.c 使用方法 说明 需要调整的内容为W5500.h中关于IP地址.端口号.子网掩码.网关等参数 W5500 #ifndef _W5500_H_ #define _W ...

  10. 阿里的fastJson.jar jsonArray 和 list 互转

    阿里的fastJson.jar: //list转换为json List<CustPhone> list = new ArrayList<CustPhone>(); String ...