Codeforces Round #507 (Div. 2) D~E

Codeforces Beta Round #73 (Div. 2 Only) 文章目录前言一、题目链接1.[A. Chord](https://codeforces.com/contest/88/problem/A)2.[B. Keyboard](https://codeforces.com/contest/88/problem/B)3.[C. Trains](https://codeforces.com/contest/88/problem/C)4.[D. Vasya and Types](https://codeforces.com/contest/88/problem/D)总结 阅读详情

D

这个题,首先可以发现是没法通过二分确定准确位置的,其次是询问次数很多。纯二分的交互一般都询问次数100以内。所以,可以猜到是卡到一个小区间然后随机询问,根据概率的话,4500次很够了。就还是二分,不过每次二分之后左右边界往两边扩展k的长度,这样的话理论卡得到的最小区间是2*k,实际不知道(雾)。卡到这个区间之后,随机一个区间内的位置,询问,如果Yes,结束,否则重新卡。卡个几十次应该就可以了。

最开始我是只卡了一次,然后一直随机位置猜,每猜一次左右边界拓展k,继续猜。。后来发现概率好像太低了,毕竟4500*10=45000,一个边界45000,区间长度就是90000了。。T到死。

//QWsin
#include<ctime>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#define rep(i,x,y) for(int i=x;i<=y;++i)
#define out(i,u) for(int i=first[u];i!=-1;i=next[i])
#define repvc(i,vc) for(int i=0,Sz=vc.size();i<Sz;++i)

using namespace std;

const int INF=1<<30;

typedef long long ll;

char s[10];
inline int query(ll x,ll y){
    printf("%I64d %I64d\n",x,y);
    fflush(stdout);
    scanf("%s",s+1);
    if(s[1]=='Y') return 1;
    return 0;
}

inline ll R(){return (ll)rand();}

ll n,k;
inline void find(ll &l,ll &r)
{
    ll mid;l=1;r=n;
    while(r-l>=max(5*k,10ll))
    {
        mid=(l+r)>>1;
        if(query(l,mid)) {
            l=max(1ll,l-k);
            r=min(n,mid+k);
        }
        else {
            l=max(1ll,mid-k);
            r=min(n,r+k);
        }
    }   
}

int main()
{
    srand(time(0));

    cin>>n>>k;k=min(k,n);

    while(1)
    {
        ll l,r;
        find(l,r);  
        l=max(1ll,l-k);r=min(r+k,n);ll len=(r-l+1);
        ll t=(1ll*R()*R()*R()*R()+17ll*R()*R()*R()+13*R()*R()+11*R())%len;
        t=(t%len+len)%len;
        if(query(l+t,l+t)) break;
    }
    return 0;
}

E

很开心我居然能想出来Div2最后一题了。
首先可以发现x这个参数跟边有关系,假如一条边(u,v),那么x=c[u]^c[v] 时,不能单独选u,v。要么都不选,要么都选。其次,边只有50w条,所以要单独考虑的x最多50w个(其他的x贡献都是2n2n)。转化一下,现在对于每一个x,有一些限制,要么(u,v)一起选,要么(u,v)都不选,所以就变成了,某个集合要么一起选,要么都不选,所以就变成了,并查集。也就是对于当前x,(u,v)只能一起选的话,就连边,处理完所有限制之后,如果联通块个数是cnt,对答案贡献就是2cnt2cnt。

另外由于要考虑的x数较多,不能每次都O(n)初始化并查集,只需要把上一个x中考虑过的边的两个端点的father重置成自己就可以了。 时间复杂度应该说相当优秀O(n+m)O(n+m)(不过还是跑了300ms是怎么回事)

//QWsin
#include<vector>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define rep(i,x,y) for(int i=x;i<=y;++i)
#define out(i,u) for(int i=first[u];i!=-1;i=next[i])
#define repvc(i,vc) for(int i=0,Sz=vc.size();i<Sz;++i)

inline int read()
{
    char ch=getchar();int ret=0;
    while(ch<'0' || ch>'9') ch=getchar();
    for(;ch>='0' && ch<='9';ch=getchar()) ret=ret*10+ch-'0';
    return ret; 
}

using namespace std;

const int INF=1<<30;
const int maxn=500000+10;
const int maxm=500000+10;
const int MOD=1e9+7;

typedef long long ll;
ll c[maxn];

struct Edge{int u,v;ll d;Edge(int u=0,int v=0):u(u),v(v){d=c[u]^c[v];}}e[maxm];
vector<Edge>vc;

inline int cmp(const Edge &a,const Edge &b){return a.d<b.d; }

int p[maxn];
int findset(int x){return p[x]==x?x:p[x]=findset(p[x]);}

ll c2[maxn];

int main()
{
    int n,m,k;cin>>n>>m>>k;

    c2[0]=1;
    rep(i,1,n) c2[i]=c2[i-1]*2%MOD;

    rep(i,1,n) scanf("%I64d",c+i);

    rep(i,1,m) e[i]=Edge(read(),read());
    sort(e+1,e+m+1,cmp);

    rep(i,1,n) p[i]=i;

    int pre=1,cnt=n,vis=0;ll ans=0;
    rep(i,1,m+1)
    {
        if((i!=1 && e[i].d!=e[i-1].d)||i==m+1)
        {
            ans+=c2[cnt];++vis;
            rep(j,pre,i-1) {
                p[e[j].u]=e[j].u;
                p[e[j].v]=e[j].v;cnt=n;
            }
            pre=i;
        }
        if(i==m+1) break;
        int pu=findset(e[i].u);
        int pv=findset(e[i].v);
        if(pu!=pv) p[pu]=pv,--cnt;  
    }

    cout<<(ans+((1ll<<k)-vis)%MOD*c2[n])%MOD<<endl;

    return 0;
}
Xarray实战:从气象数据到可视化分析的完整流程(附Python代码) 本文详细介绍了使用Xarray库处理气象数据的完整实战流程。针对气象领域常见的NetCDF和GRIB格式,文章从数据读取、坐标操作、智能索引、统计计算到高级可视化,提供了完整的Python代码示例。重点阐述了Xarray如何高效处理高维标记数据,帮助地球科学领域的研究人员将繁琐的数据处理工作转化为高效的分析流水线。 阅读详情

相关推荐

关于动态存储器dram中rank,bank,device之间的关系

DEVICE_WIDTH表示设备的带宽(单位bit),每个列(column)包含DEVICE_WIDTH 位(bit),每一行(row)包含NUM_COLS个column。   而每一个bank包含NUM_ROWS个行(row)。所以一个设备(device)的存储容量为PER_DEVICE_STORAGE =NUM_ROWS*NUM_COLS*DEVICE_WIDTH*NUM_BANKS (i

wyj7260的专栏 4741

软件测试实战:从功能到非功能的完整测试点清单

软件测试是确保软件质量的关键环节,其核心在于系统性地验证软件是否满足需求并发现潜在缺陷。从原理上讲,测试不仅关注功能的正确性,更涉及对业务逻辑、数据流和系统边界的深入理解。在技术价值层面,一套结构化的测试方法能显著提升缺陷发现效率,降低线上故障风险。常见的应用场景包括核心业务流程验证、异常处理、数据一致性检查以及用户体验评估。本文将围绕测试点设计,重点探讨如何构建覆盖功能测试、异常与边界测试的实战清单,其中异常操作流和并发操作是保障系统稳定性的关键热词,而数据状态流转则是理解业务逻辑的核心。通过结合具体案例

511

Android开发- (2)MediaProjection API实战:构建高效屏幕共享与远程控制方案

本文深入探讨了Android开发中利用MediaProjection API实现高效屏幕共享与远程控制方案的实战方法。文章从权限申请、虚拟屏幕创建讲起,详细解析了图像捕获、编码压缩、Socket网络传输的核心流程,并进一步介绍了如何构建双向控制通道及关键的性能优化与避坑指南,为开发者构建稳定可用的远程协作应用提供了完整路径。

weixin_29207533的博客 461

Codeforces Round #507 div2 DE题解

C. Timetable 题意:还没读懂..... D. Subway Pursuit 题意:交互题,你要求一个点的位置,这个点在1到n之中,每次可以移动至多k步,你每次可以询问系统一个区间 [ L , R ],系统会告诉你这个点在该时刻是否在区间内,要求至多用4500次求出这个点的坐标。 思路:先用二分缩小目标点的可确定区间,直到区间缩小的一定值后,随机询问某个点,看答案是否是它,若不是...

ccsu_cat 257

鸿蒙平板PC应用开发:在termux中安装ubuntu

打开AVNC点击右上角的设置图标,然后点击 输入 , 点击手势栏目中的 单指轻扫 ,选择滚动远程内容

DMZDAMS的博客 5219

VSAN闪存缓存磁盘故障处理指南-RAID0模式实战解析

本文详细解析了VSAN集群中RAID0模式下的闪存缓存磁盘故障处理全流程。通过模拟真实故障场景,从告警识别、数据重建策略到磁盘组重构,提供了手把手的实战操作指南,并深入探讨了RAID0缓存故障的独特影响与风险,为运维人员应对此类高性能存储架构的突发问题提供了专业解决方案。

assembly8low的博客 449

【CodeForces】CodeForces Round #507 (Div. 1) 题解

【比赛链接】 点击打开连接 【题解链接】 点击打开链接 **【A】**Timetable 【思路要点】 首先,若存在任何一组合法解,有 bi≥ai+t&amp;amp;amp;amp;nbsp;(1≤i≤N)bi≥ai+t&amp;amp;amp;amp;nbsp;(1≤i≤N)b_i≥a_i+t\ (1≤i≤N) 。 对于每一个 xixix_i ,应当满足 xi≥i,&amp

cz_xuyixuan的博客 564

SAP ABAP CO核心扩展-ZCKMLQS 多物料工厂的评估数量结构报表(CKMLQS)

CKMLQS 只能查看单一物料工厂的评估数量结构,SAP 没有提供多物料工厂的评估数量结构报表。这篇文章将实现 CO核心扩展-ZCKMLQS 多物料工厂的评估数量结构报表。

SAP李斌,本人承诺所有原创文章均不使用任何AI生成技术,请大家放心阅读。 1099

【补题】Codeforces #507(Div1) AB

1039A. Timetable 构造题 正向模拟一遍,得出X数组必须单调不减且值大于等于下标。 当X[i]==X[i+1]时,B[i]可以构造为A[i+1]+t,否则B[i]为A[i+1]+t-1,即恰不能被后一项所使用。 最后需要检验B数组单调增,以及AB可以正向求解出X。 ll A[M],B[M],t; int X[M],n; int solve() { for(int i=...

秋叶红于二月花 581

Vue3 - 完美解决高德地图定位失败 Get ipLocation failed.Geolocation permission denied.(获取ipLocation失败。地理定位权限被拒绝。)

Get ipLocation failed.Geolocation permission denied.,vue3引入高德地图当前定位失败 ,vue3中使用高德地图定位报错,高德地图API用户定位失败,高德地图H5 定位失败报错排查和解决方案,微信公众号H5网页高德地图定位报错,谷歌浏览器-高德地图定位失败geolocation,getCurrentPosition 返回的 message报错,如何解决此问题,uniapp h5高德地图,微信、QQ等内置浏览器定位失败,高德地图实现实时用户位置定位,引入高德

🏆 前端领域优质创作者 4181

Archery通过OpenResty代理转发后登录一直提示Forbidden

测试几遍,连账号密码都没用验证,因为不管输什么都是提示Forbidden。找到配置文件settings.py,下面命令可到配置文件路径。回到页面刷新,随便输入个账号密码,验证失败证明请求成功了。查看Preview,提示CSRF验证失败,请求被中断。域名:dba.hkeasyspeed.com。打开开发者工具查看,网络里面可以看到报403。添加一条配置,把你配置域名添加进去。可以看到页面可以正常访问到。进入Archery容器。重启Archery容器。正常输入账号密码,OK。

万物皆可学 3151

Codeforces Round #507 (Div. 1)C. Network Safety

题意:给个n个点 m条边的图  每个点有个权值c 范围(0,2^k-1) 如果边的两个定点的权值不同 那么他们的连接就是安全的   现在有一个病毒  他的值x 在上述范围内随机   存在一个集合 &lt;set&lt;int&gt;,int&gt;前面 是点集 后面病毒值x  如果 x感染了 前面的点集的所有点后  (攻击就是  c=c^x)原来的连接仍然是安全的  就是合法的  让你求有多少个合...

Bug___Maker的博客 438

AutoSAR系列讲解(入门篇)2.4-Runnables可运行实体

讲解一下Runnable和其工程的实际映射

雪云飞星的博客 3万+

Codeforces Round #777 (Div. 2) 简训

Codeforces Round #777 (Div. 2) 简训 日常训练,D题的分类很繁琐

C_eeking的博客 2060

InTheHand.Net.Personal+BlueTooth4,蓝牙开发

项目中有蓝牙开发的必备dll,现在网上相关的文档博客不少,有的说的多有的说少,但是却很少有这两个dll,分享一下。

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

Codeforces Round #269 (Div. 2) A~D

这次的CF除了最后一个都比较简单, 第一次用JAVA写CF....... Codeforces Round #269 (Div. 2) A. MUH and Sticks time limit per test 1 second memory limit per test 256 megabytes input

码代码的猿猿 2237

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

【codeforces】Codeforces Round #277 (Div. 2) 题解

传送门:Codeforces Round #277 (Div. 2)

poursoul 1411

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Codeforces Round #306 (Div. 2)

题目传送:Codeforces Round #306 (Div. 2) 这次打的很差,有点累,先贴个代码吧。。 A - Two Substrings #include #include #include #include #include #include #include #include #include #include #include #i

Never say never 850

Codeforces Round #558 (Div. 2)

文章目录Codeforces Round #558 (Div. 2)A - Eating SoupB- Cat PartyC2 - Power Transmission (Hard Edition) Codeforces Round #558 (Div. 2) 退役打cf第一场 A - Eating Soup 注意考虑全面即可 int a,b;cin>>a>>b; ...

海边拾贝,沧海一粟 544

Codeforces Round #578 (Div. 2)

Codeforces Round #578 (Div. 2) 简易题解 A. Hotelier 题意 就是模拟客人进酒店 有n个客人有动作 L表示找到左边第一个空的住进去 R表示找到右边第一个空的住进去 数字表示第几间房子的人走了 题解 模拟即可 #include<bits/stdc++.h> using namespace std; int n, ans[15]; int main(...

lahlah的博客 539

Codeforces Round #205 (Div. 2)

小弟不才,比赛时只做出3道。 A. Domino 容易得出结论最多只需交换1次。。。。 代码: #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL;

u011276914的专栏 1061

【CodeForces】Codeforces Round #589 (Div. 2) 题解

CodeForces Round #589(Div. 2)题解 A.Distinct Digits ◇题目传送门◆ 题目大意 分析 参考代码 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; bool vis[15]; bool check(int a)...

IDDFS 712

Codeforces Round #643 (Div. 2)

Codeforces Round #643 (Div. 2)(2020.5.16) 这波啊,这波是加一百分。芜湖~ (但是依旧被队里大佬吊锤了%%%) (比赛为了赶时间所以代码写得比较丑) 这场依旧还是奇奇怪怪的题目比较多。 A、Sequence with Digits 这题我一开始看确实一脸懵。还拿1的情况打了一张表。 发现1的情况是1,2,6,42,50,50,50,50… 后来仔细一想发现只要搜到出现0就可以停下来了,因为后面肯定都是一样的了。 然后就做完了。 #include <bits/st

牛马一枚 733

Codeforces Round #536 (Div. 2)题解

Codeforces Round #536 (Div. 2)题解 http://codeforces.com/contest/1106 A. Lunar New Year and Cross Counting 解题思路 暴力对全图进行以此搜索即可 AC代码 #include&lt;cstdio&gt; #include&lt;cstring&gt; #include&lt;iostream&gt;...

FLY_WHITE的博客 418

Codeforces Round #619 (Div. 2)

Codeforces Round #619 (Div. 2) https://codeforces.com/contest/1301 A - Three Strings 思路:只要a[i],b[i]中的一个和c[i]相等,直接把另一个和c[i]换就好 #include<bits/stdc++.h> #define MAXN 105 using namespace std; char a...

xing_mo的博客 310

Codeforces Round #608 (Div. 2)

Codeforces Round #608 Div. 2A. SuitsB. Blocks(模拟)C. Shawarma Tent(模拟)E. Common Number(思维) A. Suits #include <bits/stdc++.h> #define fi first #define se second #define ll long long using namespace std; const int maxn=1000+5,maxm=1e5+5; const int mod=

qq_17080419的博客 272

Codeforces Round #320 div2 题解

Codeforce Round #320 div2部分题目题解

skyword的专栏 703
上一篇: Codeforces Round #501 (Div. 3) D~F
下一篇: codeforces 1030E Vasya and Good Sequences
QWsin
博客等级 码龄11年 51粉丝 209原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值