当前位置:网站首页>Guaba and Computational Geometry
Guaba and Computational Geometry
2022-04-23 06:21:00 【Bzdhxs_ nt】
Code
int a[300005],b[300005],c[300005],d[300005],w[300005];
int n;
struct node{
int l,r,w;
bool operator<(const node&t)const{
return l < t.l;
}
}nod[300005];
int ans = -1;
int mx[300005];
void work(){
sort(nod+1,nod+1+n);
mem(mx,0);
for(int i = n;i;i--) mx[i] = max(mx[n+1],nod[i].w);
forr(i,1,n){
int p = upper_bound(nod+1,nod+1+n,node{
nod[i].r,-1,-1}) - nod;
if(p != n+1) ans = max(ans,nod[i].w + mx[p]);
}
}
void solve(){
ans = -1;
cin>>n;
forr(i,1,n) cin>>a[i]>>b[i]>>c[i]>>d[i];
forr(i,1,n) cin>>w[i];
forr(i,1,n){
nod[i] = {
a[i],c[i],w[i]};
}
work();
forr(i,1,n) nod[i] = {
b[i],d[i],w[i]};
work();
cout << ans << endl;
}
signed main()
{
int t;cin>>t;
while(t--) solve();
return 0;
}
版权声明
本文为[Bzdhxs_ nt]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210617219320.html
边栏推荐
- Generate excel template (drop-down selection, multi-level linkage)
- Pytorch learning record (V): back propagation + gradient based optimizer (SGD, adagrad, rmsporp, Adam)
- JDBC operation transaction
- 对比学习论文——[MoCo,CVPR2020]Momentum Contrast for Unsupervised Visual Representation Learning
- Three ways to create threads
- Pyqt5 learning (I): Layout Management + signal and slot association + menu bar and toolbar + packaging resource package
- Customized communication between threads (reentrantlock)
- 深入理解去噪论文——FFDNet和CBDNet中noise level与噪声方差之间的关系探索
- Development environment EAS login license modification
- Solve the error: importerror: iprogress not found Please update jupyter and ipywidgets
猜你喜欢
无监督去噪——[TMI2022]ISCL: Interdependent Self-Cooperative Learning for Unpaired Image Denoising
自动控制原理知识点整合归纳(韩敏版)
深度学习基础——简单了解meta learning(来自李宏毅课程笔记)
In depth understanding of the relationship between dncblevel and noise denoising in the paper
深入理解去噪论文——FFDNet和CBDNet中noise level与噪声方差之间的关系探索
图像恢复论文——[RED-Net, NIPS16]Image Restoration Using Very Deep Convolutional Encoder-Decoder Networks wi
数字图像处理基础(冈萨雷斯)一
SQL injection
Pyqy5 learning (III): qlineedit + qtextedit
去噪论文阅读——[CVPR2022]Blind2Unblind: Self-Supervised Image Denoising with Visible Blind Spots
随机推荐
Techniques et principes de détection
Gaussian processes of sklearn
Problems and solutions of database migration
Best practices for MySQL storage time
Kalman filter and inertial integrated navigation
The user name and password of users in the domain accessing the samba server outside the domain are wrong
Paper on Image Restoration - [red net, nips16] image restoration using very deep revolutionary encoder decoder networks wi
Class loading and classloader understanding
对比学习论文——[MoCo,CVPR2020]Momentum Contrast for Unsupervised Visual Representation Learning
Exception handling: grab and throw model
Three ways to create threads
图像恢复论文简记——Uformer: A General U-Shaped Transformer for Image Restoration
Framework analysis 1 Introduction to system architecture
5.The Simple Problem
PyTorch笔记——观察DataLoader&用torch构建LeNet处理CIFAR-10完整代码
Explain of MySQL optimization
Paper on LDCT image reconstruction: edge enhancement based transformer for medical image denoising
ValueError: loaded state dict contains a parameter group that doesn‘t match the size of optimizer‘s
Rsync for file server backup
C3p0 database connection pool usage