2017 ICPC网络赛(西安)--- Xor】的更多相关文章

题目连接 Problem There is a tree with n nodes. For each node, there is an integer value ai, (1≤ai​≤1,000,000,000 for 1≤i≤n). There is q queries which are described as follow: Assume the value on the path from node a to node b is t0​,t1​,⋯tm​. You are sup…
题目连接 : https://nanti.jisuanke.com/t/A1256 Life is a journey, and the road we travel has twists and turns, which sometimes lead us to unexpected places and unexpected people. Now our journey of Dalian ends. To be carefully considered are the following…
Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i]a[i]. Unfortunately, the longer he learns, the fewer he gets. That means, if he reads books from ll to rr, he will get a…
题目链接 裸的结论题.百度 Ramsey定理.刚学过之后以为在哪也不会用到23333333333,没想到今天网络赛居然出了.顺利在题面更改前A掉~~~(我觉得要不是我开机慢+编译慢+中间暂时死机,我还能再早几分钟过掉它 #include<bits/stdc++.h> using namespace std; ][]; int n; void solve() { ; i<=n; i++) ; j<=n; j++) ; k<=n; k++) { if(g[i][j]==g[i][…
这次网络赛没有打.生病了去医院了..尴尬.晚上回来才看了题补简单题. K  Supreme Number 题目链接:https://nanti.jisuanke.com/t/31452 题意:输入一个整数n(其实可以当成字符串,因为很长啊.),求满足不超过n的supreme number.这个supreme number的定义是,这个字符串的子串都是质数.比如.137就是,但是19就不是. 题解:找规律.我先开始题没看懂,没懂子串也要为素数.后面才看到.然后在纸上枚举了一下可能出现的情况.发现大…
There is a tree with nn nodes. For each node, there is an integer value a_ia​i​​, (1 \le a_i \le 1,000,000,0001≤a​i​​≤1,000,000,000 for 1 \le i \le n1≤i≤n). There is qq queries which are described as follow: Assume the value on the path from node aa …
题意:给一棵树,每个点有权值.q次询问a,b,k,问你从a点到b点,每次跳距离k,权值的异或和? 预处理每个点往其根节点的路径上隔1~sqrt(n)的距离的异或和,然后把询问拆成a->lca(a,b),lca(a,b)->b,讨论一下即可,细节比较多. 队友的代码: #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <algo…
题目链接 problem description 5 friends play LOL together . Every one should BAN one character and PICK one character . The enemy should BAN 55 characters and PICK 55 characters . All these 2020 heroes must be different . Every one can BAN any heroes by h…
day 0: 周五, 鸽了概统课,早上和紫金港的几位小伙伴一起打车去萧山机场,从咸阳机场到西北工业大学坐了五十多个站的公交车,感觉身体被掏空.晚上在宾馆本来打算补之前训练的一个题,想想还是先花个十来分钟把数据结构课的作业做了吧,结果写出了奇怪的bug,debug两个多小时还是没有找出原因,心态爆炸(我还是退群吧),于是和一堆学长去楼下吃了夜宵(锅盔+羊肉串),快一点了才睡觉. 感觉宾馆有些垃圾,被单出现了不明血迹,热水壶里满是黄色的锈,马桶半天才能冲一次,水龙头里出来的水是黄色的,无力吐槽. d…
Trace There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xxx , yyy ) means the wave is a rectangle whose vertexes are ( 000 , 000 ), ( xxx , 000 ), ( 000 , yyy ), ( xxx , yyy ). Every time the wave will wash o…