简介:2019 ICPC Asia-East Continent Final(A,M)题解 A. 题意就是输入n,m,代表行含n格,列含m格,让我们在这个网格里面找线段,要求线段中点是交叉点;求有几个线段。 题解; 我们可以分析知道,把每一行每一列的含有合法的线段找出来,然后找出类似2*2,4*4的正方形的所有个数*2; 全部加起来就是答案。 #...
题面Problem B. Black and White 题目大意:有一个$n$ \(\times\) $m$的网格,网格之中的格子有黑白两种颜色。 被(0,0),(0,1),(1,0),(1,1)包围的格子是白色,一个格子周围的四个格子的颜色与其都不相同。 现要从(0,0)走到(n,m),每次只
至于枚举的话,由于每组个数cnt最大也就是20左右,因此可以采用二进制枚举。设k为状态,则遍历k从1到(1 << cnt) - 1,这样对于每个k实际上就构成了一种选法(按位考虑,第i位表示选组里的第i个数),然后根据枚举到的k来选出相应的组里的数,两重循环遍历计算答案即可。注意要想更快判断次幂的话可以用结构体...
Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - solve these problems in the archive. If you just want to solve...
)经ACM ICPC亚洲区执行委员会授权,2019年ICPC Asia -East Continent Final于2019年12月13日至12月15日在我校长安校区顺利举行。本次大赛共邀请171所高校、5所中学的386支队伍,共计1400余名师生参与。参赛高校包括朝鲜金策工业综合大学、香港大学、香港科技大学、清华大学、北京大学等国外高校1所,境外高校2所,国内双...
The problems are mainly prepared by the former ICPC members from Tsinghua University and Shanghai Jiao Tong University. We've added all problem sets in Gym. We are glad to invite you to participate in the mirror contest through2019 ICPC Asia-East Continent Final. You can click on the virtual...
2018-2019 ACM-ICPC, Asia East Continent Finals Eventual … Journey Gym - 102056L 题意:输入:输入n,m。接下来一行输入n个数只有0,1(0=west 1=east),接下来m行每行输入两个数u,v,表示u v直接有路联通。同类之间有路。输出n个数,第i个数为i点到另外几个点的所需的最小的花费和...
2018-2019 ACM-ICPC, Asia East Continent Finals 补题,想趁着大家都有空的时间多练几场,队友上来就挑了一场ec-final,只能说与我的水平不太符合尽力补题中。IMisunderstood…Missing挺有意思的签到题,一个人还没想出来。因为前面的状态会对后面的状态产生影响,后面的状
2018-2019 ACM-ICPC, Asia East Continent Final L Eventual … Journey 2019-12-07 13:37 − #include<iostream> using namespace std; const int MAX=2e5+10; int cnt[MAX]; int ans[MAX]; int a[MAX]; int main() { int n,m,zero=0,one=0; ci... 晴屿 0 329 SDNU ACM-ICPC 201...
2018-2019 ACM-ICPC, Asia East Continent Final L Eventual … Journey 2019-12-07 13:37 −#include<iostream> using namespace std; const int MAX=2e5+10; int cnt[MAX]; int ans[MAX]; int a[MAX]; int main() { int n,m,zero=0,one=0; cin... ...