The 7th Zhejiang Provincial Collegiate Programming Contest

【MCU】一种基于RTOS的无应答重发机制 文章目录一、背景描述二、结构框图三、基于RTOS的信号量的实现(3-1)思路描述(3-2)步骤(3-2-1)定义超时重发信号量(3-2-2)定义发送线程入口(3-2-3)定义接收线程入口四、基于定时器的实现(4-1)思路描述(4-2)步骤(4-2-1)创建定时器(4-2-2)定义定时器超时处理函数(4-2-3)定义发送线程入口(4-2-4)定义接收线程入口 一、背景描述 ​ 在微控制器之间进行数据通信时,大多需要添加无应答重发机制,以增强数据交互和通信的稳定性。 在使用UART通信的双方设备,当一次数据传输 阅读详情

A - Who is Older?

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<string.h>
#include<stdlib.h>
#include<cstdio>
#include<queue>
#define mod 1e9+7
#define ll long long
#define MAXSIZE 100005
#define inf 0x3f3f3f3f
#define eps 1e-7
#define PI acos(-1.0)
#define N 200
using namespace std;


int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int y1,y2,m1,m2,d1,d2;
        cin>>y1>>m1>>d1>>y2>>m2>>d2;
        if(y1<y2)
            cout<<"javaman"<<endl;
        else if(y1>y2)
            cout<<"cpcs"<<endl;
        else if(y1==y2){
            if(m1<m2)
            cout<<"javaman"<<endl;
            else if(m1>m2)
            cout<<"cpcs"<<endl;
            else if(m1==m2){
                if(d1<d2)
                cout<<"javaman"<<endl;
                else if(d1>d2)
                cout<<"cpcs"<<endl;
                else if(d1==d2)
                    cout<<"same"<<endl;
            }
        }
    }

    return 0;

}

B - Somali Pirates

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<string.h>
#include<stdlib.h>
#include<cstdio>
#include<queue>
#define mod 1e9+7
#define ll long long
#define MAXSIZE 100005
#define inf 0x3f3f3f3f
#define eps 1e-7
#define PI acos(-1.0)
#define N 200
using namespace std;


int main()
{
    int t;
    string s;
    cin>>t;
    while(t--)
    {
        cin>>s;
        for(int i=0;i<s.size();i++)
            if(isalpha(s[i]))
                cout<<s[i];
        cout<<endl;
    }

    return 0;

}

E - An Awful Problem

题目大意:求两个日期之间,月份是素数而且日期是素数的有哪几天,当时模拟赛现场做的人都要爆炸了,试了各种方法还是没有解决,最后的时候破罐子破摔,统一把日期推到当年1月1日才完成

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<string.h>
#include<stdlib.h>
#include<cstdio>
#include<queue>
#define mod 1e9+7
#define ll long long
#define MAXSIZE 100005
#define inf 0x3f3f3f3f
#define eps 1e-7
#define PI acos(-1.0)
#define N 200
using namespace std;
int Prime[]= {2,3,5,7,11,13,17,19,23,29,31};
int day[2][12]=
{
    31,28,31,30,31,30,31,31,30,31,30,31,
   31,29,31,30,31,30,31,31,30,31,30,31
};
bool isPrime(int x){
    int flag=0;
    for(int i=0;i<11;i++){
        if(x==Prime[i]){
            flag=1;
            break;
        }
    }
    return flag;
}
bool isLeap(int x){
  if(((x%4==0)&&(x%100!=0))||(x%400==0))
    return 1;
  return 0;
}
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int y1,y2,m1,m2,d1,d2;
        cin>>y1>>m1>>d1>>y2>>m2>>d2;
        int cnt=0;
         if(isPrime(m1)&&isPrime(d1))
            cnt++;
        while(1)
        {
            if(isPrime(m1)&&isPrime(d1)){
                cnt--;
                //cout<<y1<<" "<<m1<<" "<<d1<<endl;
            }
            if(m1==1&&d1==1)
                break;
            d1--;
            if(d1<0){
                m1--;
                d1=day[isLeap(y1)][m1-1];
            }
        }//推到当年1月1
        //cout<<cnt<<endl;
        for(int i=y1;i<y2;i++){
            if(isLeap(i))
                cnt+=53;
            else cnt+=52;
        }
        y1=y2;
        //cout<<y1<<" "<<m1<<" "<<d1<<" "<<cnt<<endl;
        while(1)
        {
            if(isPrime(m1)&&isPrime(d1)){
                cnt++;
                //cout<<y1<<" "<<m1<<" "<<d1<<endl;
            }
            if(y1==y2&&m1==m2&&d1==d2)
                break;
            d1++;
            if(d1>day[isLeap(y1)][m1-1]){
                d1=1;
                m1++;
                if(m1>12){
                    m1=1;
                    y1++;
                }
            }
        }
        cout<<cnt<<endl;
    }

    return 0;

}

G - Wu Xing

 #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<string.h>
#include<stdlib.h>
#include<cstdio>
#include<queue>
#define mod 1e9+7
#define ll long long
#define MAXSIZE 100005
#define inf 0x3f3f3f3f
#define eps 1e-7
#define PI acos(-1.0)
#define N 200
using namespace std;


int main()
{
    int x;
    while(cin>>x,x){
        cout<<x/2<<endl;
    }
    return 0;

}

H - One Person Game

http://blog.youkuaiyun.com/tinyguyyy/article/details/51066923


J - Process the Tasks

http://blog.youkuaiyun.com/tinyguyyy/article/details/51066991


K - Strange Country II

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<string.h>
#include<stdlib.h>
#include<cstdio>
#include<queue>
#define mod 1e9+7
#define ll long long
#define MAXSIZE 100005
#define inf 0x3f3f3f3f
#define eps 1e-7
#define PI acos(-1.0)
#define N 200
using namespace std;
int G[105][105];
int shunxu[105],vis[105];
int n;
int flag;
void dfs(int st,int cnt)
{
    shunxu[cnt] = st;
    if(cnt == n)
    {
        flag = 1;
        return;
    }
    for(int i= 1; i<= n; i++)
    {
        if(!vis[i] && G[st][i] == 1)
        {
            vis[i] = 1;
            dfs(i,cnt+1);
            if(flag == 1)
                return;
            vis[i] = 0;
        }
    }
}

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        flag=0;
        memset(G,0,sizeof(G));
        memset(vis,0,sizeof(vis));
        memset(shunxu,0,sizeof(shunxu));
        cin>>n;
        for(int i=0; i<n*(n-1)/2; i++)
        {
            int x,y;
            cin>>x>>y;
            G[x][y]=1;
        }
        for(int i=1; i<=n; i++)
        {
            vis[i]=1;
            dfs(i,1);
            vis[i]=0;
            if(flag)
                break;
        }
        if(flag==0)
            cout<<"Impossible";
        else
        {
            for(int i=1; i<=n; i++)
            {
                if(i!=1)
                    cout<<" ";
                cout<<shunxu[i];
            }
        }
        cout<<endl;
    }
    return 0;
}


L - Guess the Price

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<string.h>
#include<stdlib.h>
#include<cstdio>
#include<queue>
#define mod 1e9+7
#define ll long long
#define MAXSIZE 100005
#define inf 0x3f3f3f3f
#define eps 1e-7
#define PI acos(-1.0)
#define N 200
using namespace std;


int main()
{
    int t,x,a,b;
    cin>>t;
    while(t--)
    {
       cin>>x>>a>>b;
       if(abs(x-a)<abs(x-b))
        cout<<"A"<<endl;
       else cout<<"B"<<endl;
    }

    return 0;

}





基于YOLOv11的工业装配完整性智能检测系统 在现代工业生产中,产品质量控制是确保企业竞争力的关键环节。其中,装配完整性检查——即检测产品是否安装了所有应有的部件,是质量检测中的重要一环。传统的人工检测方法存在效率低、易疲劳、主观性强等问题。本文提出了一种基于深度学习的目标检测算法YOLOv11的工业装配完整性智能检测系统,通过计算机视觉技术自动识别和验证产品装配的完整性。本文将详细阐述从数据准备、模型训练到系统部署的完整流程,提供可执行的代码实现,并介绍一个适用于该任务的参考数据集。 阅读详情

相关推荐

国际项目投标那些事(三)海外项目招标文件的组成

以一个实际的项目作为例子,是我2020年初投的一个东南亚国家的水厂的竞争性投标。这个投标的招标基于FIDIC yellow book (Design and Build) 合同模板。 海外项目的招标一般是有专门的咨询公司(consulting engineer)写招标文件,有的咨询公司非常专业,对于技术、合同、业绩的要求非常细致。 我这个项目的招标文件共5册 400多页(全英文),附件26册将...

WTSolutions的博客 2005

The 13th Zhejiang Provincial Collegiate Programming Contest

Apples and IdeasTime Limit: 2 Seconds Memory Limit: 65536 KB "If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if y...

dielu7216的博客 231

Flowable任务节点动态预测:基于任务ID与参数获取下一节点及候选分配策略

本文深入探讨了Flowable工作流引擎中任务节点动态预测功能的实现。通过解析任务ID与运行时参数,模拟流程执行路径,精准预测下一节点及候选用户/组集合,从而提升用户体验与系统透明度。核心在于利用自定义命令实现表达式求值,并深度解析候选者分配策略,确保预测结果与实际流程执行一致。

nnn11的博客 741

2016 浙江省赛 The 13th Zhejiang Provincial Collegiate Programming Contest K题 SPFA

链接:戳这里 Highway Project Time Limit: 2 Seconds      Memory Limit: 65536 KB Edward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other citi

Cross 561

Calibre电子书阅读器个性化样式定制指南

本文详细介绍了如何通过Calibre电子书阅读器的用户样式表功能进行深度个性化样式定制。从修改全局字体、行距、背景配色(包括深色/浅色模式)到美化代码块、引用等特殊元素,本指南提供了完整的CSS代码示例与实战技巧,帮助用户打造专属的舒适阅读环境,显著提升电子书阅读体验。

vv45678的博客 920

基于Codex平台构建AI技能:抖音爆款分析与带货视频生成实战

这次我们来看一个基于 Codex 平台构建 AI 技能(Skill)的实战项目。核心目标很直接:利用 AI 能力,自动化分析抖音平台的爆款内容,并生成可用于带货的视频。这听起来像是内容创作领域的“自动化流水线”,它解决的核心痛点是:人工分析爆款、撰写脚本、制作视频的效率瓶颈。 对于技术开发者和内容创作者而言,这个项目的价值在于将“内容策略分析”和“视频内容生成”两个环节通过 Codex 的 Skill 机制串联起来,形成一个可定制、可批量执行的自动化工作流。我们最关心的几个问题包括:这个方案的技术门槛高不高

weixin_29054399的博客 486

BSUIR Open Finals

A. Game with chocolates 因为差值必须是$P$的幂,故首先可以$O(\log n)$枚举出先手第一步所有取法,判断之后的游戏是否先手必败。 对于判断,首先特判非法的情况,并假设$n&lt;m$,则题意可理解成将$n$或者$m$减小至$n-P^k$,在$P$进制下可以理解为$n$某一位减$1$,且这一位在减之前不能是$0$。 若是将$m$减小为$n-P^k$,则整个游戏都...

weixin_34268753的博客 304

无人机避障——4DMmvRadar三维点云坐标转换到无人机坐标系(三)

无人机避障——4DMmvRadar三维点云坐标转换到无人机坐标系(三)

weixin_45390670的博客 1869

【DFS+线段树】以不同节点为根,求第k小的子树大小 CF 2016-2017 BSUIR Contest E. Kth subtree

E. Kth subtree 2016-2017 7th BSUIR Open Programming Contest. Semifinal http://codeforces.com/gym/102134/problem/E E. Kth subtree time limit per test 2.0 s memory limit per test 256 MB input s...

qq_41037114的博客 601

ESP32-S3开发板烧录失败?Bootloader模式进入全攻略

本文详细解析了ESP32-S3开发板烧录失败的常见原因及解决方案,重点介绍了如何正确进入Bootloader模式。通过按键组合、硬件设计差异分析、自动下载模式失效排查等实用技巧,帮助开发者高效解决烧录问题,提升开发效率。

weixin_28716769的博客 592

Android架构中UseCase的设计原则与实战解析

本文深入解析Android架构中UseCase的设计原则与实战应用,探讨其在Domain Layer中的核心作用。通过对比ViewModel的臃肿问题,详细阐述UseCase的无状态原则、单一职责边界等设计铁律,并提供多种实现方式的代码示例,帮助开发者构建更清晰、高效的Android应用架构。

weixin_28432777的博客 431

The 7th Zhejiang Provincial Collegiate Programming Contest - G(Wu Xing)

IntroductionThe Wu Xing, or the Five Movements, Five Phases or Five Steps/Stages, are chiefly an ancient mnemonic device, in many traditional Chinese fields.The doctrine of five phases describes

Just_ACM的专栏 750

让 ABAP 开发更聪明的搭档:SAP Joule for Developers 与 ABAP AI Capabilities 全面实战

摘要:SAP已将生成式AI集成到ABAP开发工具中,推出Joule for Developers功能。该功能直接嵌入Eclipse开发环境,提供代码解释、生成、测试构造和遗留代码迁移等辅助功能。Joule支持ABAP Cloud项目开发,能围绕当前开发对象提供上下文相关的建议,帮助开发者高效完成应用开发与迁移任务。启用该功能需升级ADT并获取相应许可,典型应用场景包括RAP应用构建和S/4HANA迁移中的代码重构。官方资源提供了多个实践案例,帮助开发者快速上手这一AI辅助开发功能。(149字)

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 493

【ZJCPC2021 第18届 浙江省赛】The 18th Zhejiang Provincial Collegiate Programming Contest(ACFGJLM 7题)

【ZJCPC2021 第18届 浙江省赛】The 18th Zhejiang Provincial Collegiate Programming Contest(ACFGJLM 7题)

小哈里的博客 3767

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

The 15th Zhejiang Provincial Collegiate Programming Contest SponsoredM Lucky 7(水)

Lucky 7Time Limit: 1 Second      Memory Limit: 65536 KBBaoBao has just found a positive integer sequence  of length  from his left pocket and another positive integer  from his right pocket. As number...

UncleJokerly 418

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

The 15th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple - M Lucky 7

Lucky 7Time Limit:1 Second Memory Limit:65536 KB BaoBao has just found a positive integer sequenceof lengthfrom his left pocket and another positive integerfrom his right pocket. As numb...

weixin_30955341的博客 79

The 7th Zhejiang Provincial Collegiate Programming Contest->Problem B:B - Somali Pirates

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3323 题意:去掉字符串里面的数字然后按输入顺序输出 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int main(){ 5 int t; 6 cin&g...

weixin_30409849的博客 107

The 7th Zhejiang Provincial Collegiate Programming Contest->Problem G:G - Wu Xing

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3328 至今未看懂题意,未编译直接提交,然后 A了。莫名AC总感觉怪怪的。 详情参考:http://www.acmsearch.com/article/show/2918 玄学参考: 1 #include<stdio.h> 2 int ma...

weixin_30673715的博客 103

The 18th Zhejiang Provincial Collegiate Programming Contest

中,由图可知,每个蜂巢相邻着六个蜂巢,所以每次加入蜂巢后,我们可以遍历它周围的六个蜂巢,如果之前的蜂巢出现过,则通过并查集的方式把出现过的蜂巢块加到当前蜂巢下,同时记录当前蜂巢块内有多少个蜂巢和重复的蜂巢个数。联系在一起呢,如果两个圆之间没有冲突,那我们可以剪掉另外一个圆使得剩下这两个没有冲突的圆可以被直接拿走,所以最后。,不会出现圆与圆之间相互嵌套的情况,即至少剪掉一个圆后所有的圆都能拿走。时,先来看至少剪掉两个圆的情况,这种情况下最多只会剩下一个圆,所以无论如何也能成功拿走所有的圆,

zjdysq的博客 1613

The 17th Zhejiang Provincial Collegiate Programming Contest

The 17th Zhejiang Provincial Collegiate Programming Contest 题目 A B C D E F G H I J K L solved ✔ ???? - - ???? - - - ✔ - ✔ - ✔:比赛时通过;????:赛后通过;⚪:比赛时尝试了未通过;-:比赛时未尝试

lllllan 1657

The 16th Zhejiang Provincial Collegiate Programming Contest

本次和队友总共出了五题(E,F,G,H,I)。 E. #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=1e5+10; int a[maxn],b[maxn]; int main(){ int T; scanf("%d",&T); while(T--...

451

The 17th Zhejiang Provincial Collegiate Programming Contest 补题

题目链接 http://codeforces.com/gym/102770 参考题解 A - AD 2020 简要题意: 多组数据,每次给定起始和结束日期 yyyymmdd,询问有多少天的日期表示中含有 202 子串。 解题思路: 日期总数为几百万,不大,可以直接预处理出来,含有 202 子串的日期权值为 1,否则为 0,每次询问就是区间和。更进一步,直接存权值为 1 的日期,询问时二分确定区间长度。 参考代码: #include<bits/stdc++.h> using namespace s

weixin_44059127的博客 1477

The 5th Zhejiang Provincial Collegiate Programming Contest 部分题解

A Accurately Say "CocaCola"!  暴力 求出 符合条件的情况好了, 反正一定是止于700的 #include #include bool check(int x) { do if(x % 10 ==7) return 1; while(x /= 10); return 0; } int main(void) { int T, n, ans = -1, tem

uiiの技术随笔 1346

The 11th Zhejiang Provincial Collegiate Programming Contest

A.Pokemon Master 传送门 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; template <typename T> inline void rd(T& x) { ll tmp = 1; char c = getchar(); x = 0;

bloom_er的博客 311

The 16th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple

Problem AVertices in the Pocket 比赛地址:http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5989 补题地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4100 Problem BElemen...

无限迭代中...... 915

The 12th Zhejiang Provincial Collegiate Programming Contest

A - Ace of Aces 题意:数字代表选的那个人,票数最多的当选,如果出现最高票有多个人,否则输出Nobody #include #include #include #include #include #include #include #include #include #include #include #define mod 1e9+7 #define ll long long

Linnnnnger的博客 665

The 10th Zhejiang Provincial Collegiate Programming Contest

题目连接:http://acm.zju.edu.cn/onlinejudge/showContestProblems.do?contestId=347 套题是真TM酸爽。193∗47∗887∗29193*47*887*29 A Applications英语题 特别复杂的模拟 注意细节 细节 细节 细节 细节 。。。。B Break Standard Weight签到题 直接暴力就好了C

Tabris的博客 489
上一篇: Process the Tasks(ZOJ3331)
下一篇: The 11th Zhejiang Provincial Collegiate Programming Contest
Linnnnnger
博客等级 码龄11年 71粉丝 79原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值