2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛)1002

2019中国大学生程序设计竞赛(CCPC)- 网络选拔赛(部分题解) 1001:^ & ^ 对第i位,如果A和B的第i位都是1,那么C的这一位需要为1,否则取0.C必须为正数,所以C可以取0的时候,要看A和B最小的一个为1一个为0的位出现的位置last,让C为1<<last(这样才能保证(A ^ C)&( B ^ C)最小)。如果没有这样的位置,就让C为1. #include<bits/stdc++.h> #define ll... 阅读详情

Kanade Doesn't Want to Learn CG

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 1786    Accepted Submission(s): 374


 

Problem Description
Computational geometry and computer graphics are such hard parts of computer science that Kanade can't manage them. So she doesn't want to learn CG anymore. She goes to play basketball instead.

The only essential equipment in a basketball game is the ball and the hoop — a flat, rectangular backboard with a basket. We describe the hoop with a side view. Ignoring the thickness, the backboard is considered as a segment parallel to the y-axis, and the basket is considered as a segment parallel to the x-axis. The right end of the basket is connected to the backboard.

To simplify the model, we consider a basketball as a mass point. Taking only gravity into consideration, if we ignore the basket and the backboard, the trajectory of basketball will be a parabola y=ax2+bx+c with a<0. But the basketball is likely to hit the backboard, resulting in a change in trajectory. We consider the collision between a basketball and the backboard (including the endpoints) as a perfectly elastic collision, which means the velocity on the x-axis of the basketball will be reversed, and the velocity on the y-axis will remain the same. We ignore the court floor in this problem.

If the basketball passes through the basket (excluding the endpoints) from top to bottom, we consider the shoot is a goal. Once the basketball touches either of the endpoints of the basket, which means it hits the rim, the basketball will be bounced away and cannot make a goal. In addition, according to the rule, a basketball cannot pass through the basket from bottom to top, or it is a violation and cannot be counted as a goal.

Kanade knows the value of a,b,c and the position of the backboard and basket. She would like to know whether the shoot will be a goal if the basketball starts from x=−1145141919810 and moves in the positive direction of the x-axis. 
 

Input
The first line of input contains one integer T (1≤T≤500), indicating the number of test cases.

For each test case, the first line contains three integers a,b,c (a<0), indicating the parameters of the parabola.

The second line of each test case contains five integers x0,x1,y0,y1,y2 (x0<x1,y1<y0<y2), indicating that the two endpoints of the basket are (x0,y0) and (x1,y0), and the two endpoints of the backboard are (x1,y1) and (x1,y2).

It is guaranteed that the absolute value of all integers in the input won't exceed 104. 
 

Output
For each test case, if the shoot is a goal, output 𝚈𝚎𝚜 in a single line, otherwise output 𝙽𝚘 in a single line.
 

Sample Input

4 -1 4 5 3 5 6 5 8 -2 -3 3 -1 0 2 1 4 -1 -9 19 8 10 6 5 8 -1 9 19 8 10 4 3 6
 

Sample Output

Yes Yes No No
 

Hint
The samples are shown as follows. Segment AB represents the basket, and segment CD represents the backboard.

int a,b,c;
int X0,X1,Y0,Y1,Y2;
double f(int x,int a,int b,int c){
    return a*x*x+b*x+c;;
}
int main(){
    int t;
    cin>>t;
    while (t--) {

        cin>>a>>b>>c;
        cin>>X0>>X1>>Y0>>Y1>>Y2;
        double h1=f(X0,a,b,c);
        double h2=f(X1,a,b,c);
        double h3=f(2*X1-X0,a,b,c);
        if(h1>Y0&&h3<Y0&&h2!=Y0&&h2<=Y2) cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
    }
}

 

Qt 文件对话框(QFileDialog)实战指南 —— 从基础到高级应用 本文是Qt文件对话框(QFileDialog)的实战指南,从基础静态函数调用到高级对象模式应用,全面解析了文件选择、保存、目录选取及多选等核心功能。文章深入探讨了MIME类型过滤、自定义侧边栏、信号槽实时响应及状态持久化等高级技巧,并提供了跨平台开发中的避坑指南与最佳实践,帮助开发者高效、稳健地集成文件操作功能。 阅读详情

相关推荐

SIwave仿真手册——软件基础(一)

最近在学习SIWAVE,在这里将自己的笔记整理一下,做一个专题。希望对大家有帮助,这个会持续更新的。仅限于软件操作学习,不涉及信号完整性的讨论。

luohuo9844的博客 4万+

2021CCPC广州 H. Three Integers

题目链接 You are given three non-negative integers aaa, bbb, and ccc. Find three positive integers xxx, yyy, and zzz that satisfy x mod y=ax\bmod y=axmody=a, y mod z=by\bmod z=bymodz=b, and z mod x=cz\bmod x=czmodx=c. Input The first line contains an integer t

sky123博客 2614

SMR实战指南:从GWAS数据到eQTL分析的完整流程

本文提供了基于汇总数据的孟德尔随机化(SMR)实战指南,详细解析了如何从GWAS汇总数据出发,整合eQTL数据,完成从数据准备、BESD格式转换到最终SMR与HEIDI分析的完整流程。文章重点阐述了核心操作步骤、常见避坑技巧与结果解读,旨在帮助遗传学研究者高效掌握这一分析基因表达与复杂性状潜在因果关系的强大工具。

weixin_29246195的博客 1067

2021CCPC广州Three Integers(思维)

The 2021 CCPC Guangzhou Onsite H题 Three Integers emm真没啥好说的,分类讨论即可,合理运用倍数关系 注意存在一个0的时候且存在一个数为1 那么倍数就必须扩大下 否则会被hack到死 因为x y z 不能超过1e18 且a b c范围1e9 我设置的倍数趋近于1e9 但是可能会被这种数据卡,a=0,b=1,c=1e9 此时不能单纯的用 signed main() { ll t; read(t); while(t--.

weixin_45948940的博客 2324

无人驾驶汽车系统入门(三十二)——FEC算法:点云快速欧几里得聚类实战解析

本文深入解析了FEC算法在无人驾驶点云聚类中的高效应用,通过逐点处理策略和体素栅格预分割技术,实现了比传统欧几里得聚类快百倍的速度。文章详细介绍了算法原理、Python实现及参数调优指南,并对比了FEC与传统算法的性能差异,为无人驾驶系统开发提供了实用解决方案。

weixin_29065015的博客 485

74HC138译码器的原理和使用

A0,A1,A2为3位二进制加权地址输入端口,A2A1A0顺序组成的3位2进制数对应的十进制数x控制使能端口Yx';例如当A2A1A0 = 101 时,其他门输出端全为高电平,只有Y5'为低电平。 Y0-Y7为8个输出端口,其输出电平由A0,A2,A3,E1,E2,E3决定。

diksan的博客 6万+

2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛)Monopoly

HDU 7130 Monopoly 对于题目来说我们要有 一个前缀和sum[i]sum[i]sum[i]:代表每走一步能得到的价值 一个总和SSS:走完一轮后的总和 一个set<ll>bucket[N]set<ll>bucket[N]set<ll>bucket[N]:(桶)存放前缀和模S相同的数的集合 一个map<ll,ll>_hashmap<ll, ll>\_hashmap<ll,ll>_hash:模数转化为桶的位置(离散化) 一个m

weach的博客 699

华为OD机试真题 新系统 2026-04-19 Java&Go 实现【分辨率排序】

华为OD机试真题 新系统 2026-04-19 Python&JS 实现【分辨率排序】

MISAYAONE的博客 304

2021CCPC网络赛重赛菜鸡签到

重赛的签到三连 没想到啊,煎熬了一次还有第二次,比赛重打了,今天发挥正常,水平有限,原本给自己的目标就是签到签完,所以还是挺满意的,唯一有一点不满意的就是一道题一个很简单的问题,一开始考虑了,改完代码不记得了,WA了好几次,硬是看不出错来,心态快裂开了。 1002题 题目 Computational geometry and computer graphics are such hard parts of computer science that Kanade can’t manage them. So

qq_55687649的博客 780

CANbus收发器TJA1051T/3/1J应用原理图设计

该收发器是为汽车工业中的高速CAN应用而设计的,为(一个带有)CAN协议控制器的微控制器)提供差分传输和接收能力。它提供了改进的电磁兼容性(EMC)和静电放电(ESD)性能,还具有:当电源电压关闭时,TJA1051T/3和TJA1051TK/3可以直接与电源电压从3V到5V的微控制器接口。这种实现能够在CAN FD快速阶段以高达5 Mbit/s的数据速率进行可靠的通信。TJA1051T/3和TJA1051TK/3上的VIO输入允许直接连接3 V至5 V微控制器(分别提供SO8和极小的HVSON8封装)

zhusl6688的博客 3595

SAR成像概述

1. 发展概述 雷达是英文Radar(Radio detection and ranging)的音译,原意为“无线电探测与测距”。雷达的发明是无线电发展史上的里程碑,二战时,英国急需通过雷达探测空中金属物体来帮助搜寻德国飞机,这期间,雷达技术飞速发展,发展出了地对空、空对地轰炸、空对空火控、敌我识别等功能。雷达在第二次世界大战中发挥了重大作用,至今仍是军用和许多民用领域的重要传感器。 早期雷达系统通过时间延迟来测距,通过天线指向来测角,通过多普勒频移测速。1951年,Carl Wiley发现,通..

5070

2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛)1004

Primality Test Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 5305Accepted Submission(s): 2464 Problem Description A positive integer is called aprimeif it is greater than1and cannot...

m0_57006708的博客 630

CATIA二次开发一一一获取属性的几种方法

这些方法覆盖了CATIA CAA开发中属性操作的典型场景,开发者可通过类型判断实现递归遍历、跨文档关联等复杂逻辑。此方法用于遍历对象的所有属性,获取属性键后可通过类型判断选择后续处理方式。适用于处理嵌套对象或关联对象的场景(如几何特征关联制造特征)。适用于简单属性值的直接读取(如版本号、状态标识等)。用于处理多值属性(如多选参数、装配体子件列表等)。用于处理跨文档引用(如零件关联图纸文件)。

工业软件开发 431

2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛)

1002,1004,1006

NEFU AB-IN's Blog 1503

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

【题目记录】——2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛)

文章目录1002 Kanade Doesn't Want to Learn CG 数学思维1004 Primality Test 思维 简单题1006 Nun Heh Heh Aaaaaaaaaaa 动态规划+组合数 题目集地址2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛) 1002 Kanade Doesn’t Want to Learn CG 数学思维 题目地址1002 Kanade Doesn’t Want to Learn CG 题目大意:给一个二次函数作为篮球投篮的抛物线,给

气派飞鹰的博客 5098

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

【CCPC网络赛】2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛) 签到题5题

Problems Solved Problem ID Title Ratio (Accepted / Submitted) 1001 Median Problem 9.09% (5/55) 1002 Kanade Doesn’t Want to Learn CG 16.30% (1904/11682) 1003 GCD on Tree 10.45% (7/67) 1004 Primality Test 37.59% (2693/7165) 1005 Monopoly 9.09% (522/5744) 100

小哈里的博客 2365

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

2021中国大学生程序设计竞赛部分题解(CCPC)- 网络选拔赛(重赛)

文章目录一、1002 Kanade Doesn't Want to Learn CG二、1004 Primality Test三、1005 Monopoly四、1006 Nun Heh Heh Aaaaaaaaaaa五、1010 Bigraph Extension六、1011 Jumping Monkey 一、1002 Kanade Doesn’t Want to Learn CG 简单数学问题:判断位置即可 #include <bits/stdc++.h> #define MaxN 0x3.

m0_50435987的博客 1275

2019中国大学生程序设计竞赛(CCPC) - 网络选拔赛

我只写了02 03 04,05 gcd 是我离现场切gcd最接近ac的一场,果然数论还是写不出gcd 1002 array 解法:如果这题不带修改操作,相信大家都会做,我就来讲讲怎么处理修改,对于每次修改操作,我不需要真的去修改它,而是把修改的那个元素插入set中去,然后每次查询,我们不带修改查一个答案v1,然后再去set里找第一个大于等于k的v2,min(v1, v2)就是答案。证明:如果v2...

ccsu_cat 1799

2019中国大学生程序设计竞赛(CCPC) - 网络选拔赛(解题报告)

1001 签到。输出A&B,当(A&B == 0)时特判。 1002 HDU - 6703 array 因为给的数字是1-n的全排列,对于操作2,可以转换为查询区间[r+1,n]里面第一个大于等于k的数字。(考虑到该区间可能没有大于等于k的数字,可以在n+1位置插入数字n+1,就一定能查询到了。所以每次查询区间[r+1,n+1]第一个大于等于k的数字。)对于操作1,可以将加了1e7...

ayyyyy_zc的博客 2261

2020中国大学生程序设计竞赛(CCPC)- 网络选拔赛 1002 Graph Theory Class

HDUOJ 6889 A.Graph Theory Class 题目链接 Problem Description This class is on graph theory. Mr. Kruskal teaches babies the concept of minimal spanning tree, and how to calculate the minimal spanning tree of a given graph. Now, it’s time for an in-class quizz.

旺崽的博客 5549

2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛 1002 Time-division Multiplexing

HDU7101 - Time-division Multiplexing 题目链接 题意 给定nnn​​个字符串s1,s2,...,sns_1,s_2,...,s_ns1​,s2​,...,sn​​​,按照一定规则将字符串输出到ansansans​中。 一开始所有字符串都按照顺序将第111​​个字符(即s[i][posi],posi=0s[i][pos_i],pos_i=0s[i][posi​],posi​=0​​)输出到ansansans​​中: 然后∀i,posi=(posi+1) mod&

Moyan的博客 573

2019中国大学生程序设计竞赛(CCPC) - 网络选拔赛 部分题解

题目链接:http://acm.hdu.edu.cn/contests/contest_show.php?cid=869 1001 . ^&^ 位运算签到题,输出a,b与的结果,如果为0,输出lowbit最小的。 #include <bits/stdc++.h> using namespace std; #define lowbit(x) x&amp...

qq_41645482的博客 724

2019中国大学生程序设计竞赛(CCPC) - 网络选拔赛 1 ,2,4,6,7,8

这场打的很迷,只做了四个,赛后听许老师讲1002题解,感觉简单的要死。第一个要求c是正整数,我是第一次知道正整数是不能为0的。 打cf 的时候看到postive interger都是自动忽略的,以为仅是一个名词。签到题都wa几发 1001^&^ 签到题 #include<bits/stdc++.h> #define rep(i,a,b) for(int i=a;i&...

ccsu_deer 810
上一篇: 2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛)1004
下一篇: 2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛(重赛)1006(快速幂+dp+后缀和)
郭晋龙
博客等级 码龄6年 940粉丝 449原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郭晋龙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值