Problems # Name A Inna and Choose Options standard input/output 1 s, 256 MB x1942 B Inna and New Matrix of Candies standard input/output 1 s, 256 MB x1556 C Inna and Huge Candy Matrix standard input/output 2 s, 256 MB x1114 D Dima and Bact
Problems
# | Name | ||
---|---|---|---|
A |
Inna and Choose Options
standard input/output 1 s, 256 MB |
![]() ![]() |
![]() |
B |
Inna and New Matrix of Candies
standard input/output 1 s, 256 MB |
![]() ![]() |
![]() |
C |
Inna and Huge Candy Matrix
standard input/output 2 s, 256 MB |
![]() ![]() |
![]() |
D |
Dima and Bacteria
standard input/output 2 s, 256 MB |
![]() ![]() |
![]() |
E |
Inna and Binary Logic
standard input/output 3 s, 256 MB |
![]() ![]() |
![]() |
A题:直接暴力枚举每种情况即可。水题
B题:记录下S,G的距离,每种距离只要一次,开个vis数组标记,最后遍历一遍看又几个即可
C题:模拟旋转即可。
D题:并查集+floyd,把w=0的边的点并查集处理,判断同种类是否都在一个集合内,不是就No,剩下的就利用floyd求出最短路即可。
E题:位运算,每个数字对应的每个位向左和向右延生,这个区间内向下的那个三角形区间一定是会增加(1
代码:
A题:
#include <stdio.h> #include <string.h> int t, n; char str[15]; char save[15][15]; bool judge(int a, int b) { int i, j; for (i = 0; i <br> B题: <pre class="brush:php;toolbar:false">#include <stdio.h> #include <string.h> #include <algorithm> using namespace std; const int N = 1005; int n, m, i, j, vis[N]; char g[N][N]; int main() { scanf("%d%d", &n, &m); for (i = 0; i <br> C题: <pre class="brush:php;toolbar:false">#include <stdio.h> #include <string.h> #include <algorithm> using namespace std; int n, m, x, y, z, p, i, j; struct Point { int x, y; } po[100005]; void at(Point &a) { int x = a.x, y = a.y; a.y = n - x + 1; a.x = y; } void ht(Point &a) { int x = a.x, y = a.y; a.y = m - y + 1; a.x = x; } void ct(Point &a) { int x = a.x, y = a.y; a.y = x; a.x = m - y + 1; } int main() { scanf("%d%d%d%d%d%d", &n, &m, &x, &y, &z, &p); x %= 4; y %= 2; z %= 4; for (i = 0; i <br> D题: <pre class="brush:php;toolbar:false">#include <stdio.h> #include <string.h> #include <vector> #define INF 0x3f3f3f3f #define min(a,b) ((a) w) { f[type[u]][type[v]] = w; f[type[v]][type[u]] = w; } if (w == 0) { int pu = find(u); int pv = find(v); if (pu != pv) fa[pv] = pu; } } for (i = 2; i <br> E题: <pre class="brush:php;toolbar:false">#include <stdio.h> #include <string.h> const int N = 100005; const int M = 20; int n, m, i, j, b; int a[N][M]; __int64 sum, mi[32]; int main() { mi[0] = 1; for (i = 1; i <br> <br> </string.h></stdio.h>

许多用户都不太清楚小米平板6和pro哪个值得入手,从配置来看,肯定是Pro的更高配置是推荐的,但也要综合价格和自己的预算来看,不同的产品定位的人群也是不同的。小米平板6和pro哪个值得入手答:小米平板6Pro会更好,不管是性能还是拍照续航都会更好。1、处理器小米平板6:骁龙870小米平板6Pro:性能更强大的骁龙第一代骁龙8+处理器2、电池大小小米平板6:8840mAh,67W秒充小米平板6Pro:8600mAh,33W快充小米平板6的续航上表现会更加的优秀,但是充电会比较慢。3、拍照小米平板6

iPhone15Pro与iPhone14Pro:规格比较以下是iPhone15ProMax和iPhone14ProMax的规格比较:iPhone15ProMaxiPhone14ProMax显示尺寸6.7英寸6.7英寸显示技术超级视网膜XDROLED超级视网膜XDROLED分辨率2796x1290像素,460ppi2796x1290像素,460ppi刷新率120赫兹120赫兹峰值亮度2,000尼特2,000尼特尺寸6.29x3.02x0.32英寸6.33x3.06x0.31英寸重量221克240克

不少用户在第一次接触使用小米手环8的时候不知道该怎么操作使用开机,其实方法也很简单,我们只需要找到USB数据线然后把手表和电源连接起来,然后冲一段时间电以后就可以按键开机了。小米手环8pro怎么开机1、首先把手表安装好,就是把主题和表带两边对接连上。2、然后我们第一次开机是需要连接充电线的,连接方法就在手表底部。3、等待手表震动一下就可以进行开机了,随后就可以和你的手机进行连接了。>>>

macbookair是苹果的一款笔记本电脑,很多用户好奇macbookair和pro之间,有哪些区别,这两个笔记本在处理器核心,主频以及显卡类型上都有一些区别。macbookair和pro的区别:1、处理器核心,线程不同:macbookair的处理器拥有双核心,四线程。而Pro比macbookair更强大,拥有四核心,八线程。2、处理器主频不同:macbookair的处理器是1.6GHz的主频。pro的处理器主频是1.4GHz,比macbookair低了一些。3、显卡不同:macbookair采

苹果继续推动技术的界限,其创新的最新证明是苹果A17ProGPU的推出。这个尖端组件拥有完全重新设计的GPU,有望在性能、图形和用户体验方面取得显着改进。苹果A17ProGPU,推出与iPhone15Pro一起,是半导体工程的奇迹。它采用3nm工艺制造,代表了小型化的重大飞跃,将比以往更多的晶体管封装到单个芯片中。这一技术壮举转化为更高的电源效率和计算能力。苹果A17ProGPU提供令人惊叹的图形A17Pro芯片的突出特点之一是其重新设计的GPU。Apple在优化图形性能方面投入了大量资金,使其

小米pro14已经上市,而且它的配置作为商务办公本来说也是非常不错的了,而且还有三种处理器配置可以选择,价格也不是特别高。很多小伙伴不知道小米Pro14的具体上市时间。小米pro14上市时间答:2021年11月10日小米Pro14锐龙版开启预约,首发价5299元起。2022年7月4日,小米笔记本Pro14发布,7月8日零点正式开售。小米pro14介绍1、屏幕配备14英寸2.5K超视网膜屏,分辨率为2560x1600,屏占比高达88%,拥有100%sRGB色域,刷新率为120Hz。2、外观采用6系

搭载A17Pro芯片的iPhone15Pro系列是今日稍早Apple发布会的亮点,不过这次的Pro系列不仅有别于基本款系列,iPhone15Pro与iPhone15ProMax之间也不只有尺寸差异,是使用者在购买前需要注意的。电池续航力得益于iPhone15ProMax的大体积,其电池续航力胜于iPhone15Pro。透过播放影片来测试,前者的续航力来到了29小时,而后者只有23小时。但在同样的快速充电条件下,要充满iPhone15ProMax也需要花费更多时间。望远焦段iPhone15Pro与

近期,我们注意到有朋友想要深入了解一番Win10中的home版和pro版之间有何差别,为此,小编特别打算为您详解这二者究竟意味着什么以及它们各自独有的特色!win10home和pro区别有哪些Windows10Home即为大家所熟知的家庭版;而Windows10Pro则被称为专业版。Win10Pro针对Home版进行了深度优化,提供更为全面的设备及应用管理功能,以确保敏感的企业级数据得到严密保护。Wind10Pro支持远程及移动办公环境,这些都是Home版本无法比拟的强项所在。Home版专为个人


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
