FR107对应 RS1M

本文提供了一张电子元件对照表,包括FR307对应RS3M、FR107对应RS1M等,并详细列出了1N4007、5KP48及5KP33的具体参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

FR307对应  RS3M
FR107对应  RS1M
1N4007对应  M7
5KP48  功率5KW,截止电压VBR48V
5KP33  功率5KW,截止电压VBR33V
``` #include<bits/stdc++.h> #define ll long long using namespace std; const int N=1e5+5; struct info{ double q; int le; }; double an[N]; struct Tree__{ #define cl ((x)*2) #define cr ((x)*2+1) vector<info>a; vector<int>l_,r_; int query(int x,double w){ if(l_[x]==r_[x]){ return an[l_[x]]>w; } if(a[cl].q<=w){ return query(cr,w); }else{ return a[x].le-(a[cl].le-query(cl,w)); } } void init(int x,int l,int r){ if(l==r){ l_[x]=l; r_[x]=r; a[x]={0,l==1}; return; } int mid=(l+r)/2; init(cl,l,mid); init(cr,mid+1,r); l_[x]=l_[cl]; r_[x]=r_[cr]; a[x]={0,l==1}; } Tree__(int l,int r):a(r*4),l_(r*4),r_(r*4){ init(1,l,r); } void update(int x,int v,info w){ if(l_[x]==r_[x]){ a[x]=w; return; } if(v<=r_[cl])update(cl,v,w); else update(cr,v,w); a[x].le=a[cl].le+query(cr,a[cl].q); a[x].q=max(a[cl].q,a[cr].q); } }; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,m; cin>>n>>m; ++n; Tree__ tr(1,n); while(m--){ int x; double y; cin>>x>>y; ++x; an[x]=y/x; tr.update(1,x,{y/x,1}); cout<<tr.a[1].le-1<<endl; } return 0; }```debug #include<bits/stdc++.h> using namespace std; #define rep( i, s, t ) for( register int i = s; i <= t; ++ i ) #define re register #define ls(x) x * 2 #define rs(x) x * 2 + 1 #define F(x) tr[x].fr int read() { char cc = getchar(); int cn = 0, flus = 1; while(cc < '0' || cc > '9') { if( cc == '-' ) flus = -flus; cc = getchar(); } while(cc >= '0' && cc <= '9') cn = cn * 10 + cc - '0', cc = getchar(); return cn * flus; } const int N = 200000 + 5 ; int n, m, top ; double v[N] ; struct Tree { double mx ; int len ; } tr[N * 4]; int query( int x, int l, int r, double Max ) { if( l == r ) return v[l] > Max ; int mid = ( l + r ) >> 1; if( tr[ls(x)].mx <= Max ) return query( rs(x), mid + 1, r, Max ) ; else return query( ls(x), l, mid, Max ) + tr[x].len - tr[ls(x)].len ; } void update( int wh, double w, int x, int l, int r ) { if( l == r ) { tr[x].mx = w, tr[x].len = 1 ; return ; } int mid = ( l + r ) >> 1 ; if( wh <= mid ) update( wh, w, ls(x), l, mid ) ; else update( wh, w, rs(x), mid + 1, r ) ; tr[x].len = tr[ls(x)].len + query( rs(x), mid + 1, r, tr[ls(x)].mx ); tr[x].mx = max( tr[ls(x)].mx, tr[rs(x)].mx ) ; } void build( int x, int l, int r ) { if( l == 1 ) tr[x].len = 1 ; if( l == r ) return ; int mid = ( l + r ) >> 1 ; build( ls(x), l, mid ), build( rs(x), mid + 1, r ) ; } signed main() { n = read(), m = read() ; int x ; build( 1, 1, n + 1 ) ; rep( i, 1, m ) { x = read(), v[x + 1] = ( 1.0 * read() ) / ( 1.0 * x ) ; update( x + 1, v[x + 1], 1, 1, n + 1 ) ; printf("%d\n", tr[1].len - 1 ) ; } return 0; }
03-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值