7.30 团队赛比赛总结

今天打了一场团队赛,从12点到5点,虽然之前也打过几场,但感觉这场还蛮有意思的。首先,我们是分散的打法,一人看了一个题,我们都不怎么熟悉文件式输入和输出,也没怎么在意。然后有意思的事发生了,虽然感觉自己挺有自信,结果接二连三的wa的三个题,这波是听取wa声一片,我们还觉得是自己优化细节有问题,继续改还是wa,而且全是wa在第一个样例上,我们直接疑惑了,然后就一起看一道题了。几乎改到不能再改了,还是wa在第一个样例,这时我们才开始看到是文件类的输入和输出,虽然以前遇见过,但没太在意,这次狠狠的打脸了(知道错了)。当我们做出来第一个题时几乎都过去两个小时了,题目上是满江红,之后我们才慢慢开始追赶,最大的阻碍解决掉之后又一起冲出来几个题,就是罚时高的离谱。总之,感觉时间过的还蛮快的,大家一起做喜欢的事情,一起解决问题是一件很快乐的事情,无论是wa之后的讨论和鼓励,ac之后的成就和喜悦,这就是团队赛的魅力吧。ps:这次开放性和创造性的题挺多的,主要是理解题意,真正读懂和理解才能做出题,光靠套路和模板还真不一定好用。
反思:最大的问题就是没注意文件输入输出(这次学会了),还有英语阅读理解需要提高,阅读速度需要提高,相信队友,一起加油就完事了!
最后放个我喜欢的题吧
题干:
B. Black and White
The jury has a great artistic idea — to create a rectangular panel out of a huge pile of black and white
squares of the same size. The panel should have exactly b 4-connected areas made of black tiles, and w
4-connected areas made of white tiles.
Remember, a 4-connected area of some color is a maximal set of the panel tiles such that:
• any two tiles of the area share the same color;
• for any two tiles of the area there is a tile sequence connecting them, such that any two consecutive
tiles of the sequence share a common side.
In addition to the artistic idea, the jury has already developed a program that produces design of the panel. But since this problem is about art, any new solution is extremely important for the jury.
Input
The only line of the input file contains two integers b and w — number of black and white areas
(1 ≤ b, w ≤ 1000).
Output
The first line of the output file should contain the picture sizes r and c — the number of rows and columns
(1 ≤ r, c ≤ 100 000). This line should be followed by r lines of c symbols each. Each symbol should be
either ‘@’ (for black tile) or ‘.’ (for white one). There should be no more than 100 000 tiles in the panel.
Example
black.in black.out
2 3 6 7
@@@@@@@
@.@@@@@
@@…@@
@@@@@@@

@@@@@@@
题意:大概是相邻的颜色是一整块,然后要输出b个黑的整块和w个白的整块
思路:可以构建,可以建两列,如果b,w相等,那么可以隔一行一种;如果不相等,可以补齐,用一整块少的颜色分隔多的颜色多个,等b和w相同后每隔一行输出一种颜色。

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <map>
#include <cstring>
#include <algorithm>
#include <string>
#define MAX 100000
using namespace std;
const int maxn = 1e5+10;
int vis[500],vis2[500];
int main()
{
	//文件输入和输出
    freopen("black.in","r",stdin);
    freopen("black.out","w",stdout);
    int n,m;
    scanf("%d %d",&n,&m);//黑 白
    int t=max(n,m);
    if(n>=m)// 黑的多或相等
    {
        printf("%d 2\n",t*2);
        int c=n-m;
        for(int i=1;i<=2*c;i++)//少的分隔多的,少的是一整块
        {
            if(i%2==1)
                printf("..\n");
            else
                printf("@.\n");
        }
        for(int i=1;i<=t*2-2*c;i++)//b和w相等
        {
            if(i%2==1)
                printf("..\n");
            else
                printf("@@\n");
        }
    }
    else//正好反过来
    {
        printf("%d 2\n",t*2);
        int c=m-n;
        for(int i=1;i<=2*c;i++)
        {
            if(i%2==1)
                printf("@@\n");
            else
                printf(".@\n");
        }
        for(int i=1;i<=t*2-2*c;i++)
        {
            if(i%2==1)
                printf("@@\n");
            else
                printf("..\n");
        }
    }
}
基于STM32F407,使用DFS算法实现最短迷宫路径检索,分为三种模式:1.DEBUG模式,2. 训练模式,3. 主程序模式 ,DEBUG模式主要分析bug,测量必要数据,训练模式用于DFS算法训练最短路径,并将最短路径以链表形式存储Flash, 主程序模式从Flash中….zip项目工程资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松复刻,拿到资料包后可轻松复现出一样的项目,本人系统开发经验充足(全领域),有任何使用问题欢迎随时与我联系,我会及时为您解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可轻松复现,设计报告也可借鉴此项目,该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的。 【提供帮助】:有任何使用问题欢迎随时与我联系,我会及时解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 下载后请首先打开README文件(如有),项目工程可直接复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值