当前位置:网站首页>[summer daily question] Luogu p6320 [coci2006-2007 4] sibice
[summer daily question] Luogu p6320 [coci2006-2007 4] sibice
2022-07-29 07:28:00 【AC_ Dragon】
Topic link :P6320 [COCI2006-2007#4] SIBICE - Luogu | New ecology of computer science education (luogu.com.cn)
Background
Beardless Mirko Throw matches everywhere . His mother wanted him to put the matches in the box .
Title Description
Mirko Now I want to place n A match , He has one w×h Rectangular box .
He now wants you to judge this n Whether each match can be put into this box .
We can think of the box as a plane , Just judge whether the match can be put down in this plane .
Input format
Enter the first three integers n,w,h.
Next n That's ok , Each row of a [1,1000] An integer in an interval , Indicates the length of a match .
Output format
The output, n That's ok , For each match , Output DA It means it can be put down , Otherwise output NE Can't put down .
Examples #1
The sample input #1
5 3 4
3
4
5
6
7Sample output #1
DA
DA
DA
NE
NEExamples #2
The sample input #2
2 12 17
21
20Sample output #2
NE
DATips
Data scale and agreement
about 100% The data of , Guarantee 1 <= n <= 50,1 <= w,h <= 100.
explain
The title is translated from COCI2006-2007 CONTEST #4 T1 SIBICE
AC code:
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
int n;
cin>>n;
int a,b;
cin>>a>>b;
double c; // Diagonal length
c=sqrt(a*a+b*b);
while(n--)
{
int x;
cin>>x;
if(x<=c)
cout<<"DA"<<endl;
else
cout<<"NE"<<endl;
}
return 0;
}边栏推荐
- Logback log level introduction
- logback中RollingFileAppender属性简介说明
- I, 28, a tester, was ruthlessly dismissed in October: I want to remind people who are still learning to test
- JS chicken laying eggs and egg laying chickens. Who appeared earlier, object or function? Is function an instance of function?
- 一篇长文---深入理解synchronized
- 国内数字藏品的乱象与未来
- MySQL uses the client and select methods to view the summary of blob type fields
- 【WPF】通过动态/静态资源实现语言切换
- leetcode力扣经典问题——4.寻找两个正序数组的中位数
- Some learning and understanding of vintage analysis
猜你喜欢

MySQL如何把行转换为列?

Thinkphp6 realizes database backup
![【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK](/img/bf/c0e03f1bf477730f0b3661b3256d1d.png)
【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK

一篇长文---深入理解synchronized

Section 7 - compilation of programs (preprocessing operations) + links

WPF simple login page completion case

stm32 操作W25Q256 W25Q16 spi flash

国内数字藏品的乱象与未来

零数科技深度参与信通院隐私计算金融场景标准制定

WPF nested layout case
随机推荐
新生代公链再攻「不可能三角」
I'd like to ask, my flick job writes data in the way of upsert Kafka, but I'm more careful in MySQL
BeanUtils.setProperty()
Some learning and understanding of vintage analysis
5-整合swagger2
[100 cases of unity practice] the single choice multiple choice judgment questions of unity universal question answering system are all common
CDC source can quit after reading MySQL snapshot split
Nodejs installation tutorial
3-global exception handling
【暑期每日一题】洛谷 P6320 [COCI2006-2007#4] SIBICE
20-40k | mecarmand 3D vision algorithm / software / Product Manager Recruitment
Leetcode buckle classic problem -- 4. Find the median of two positively ordered arrays
【暑期每日一题】洛谷 P6500 [COCI2010-2011#3] ZBROJ
How to establish EDI connection with Scania in Scania?
How much data can a single MySQL table store at most?
梳理市面上的2大NFT定价范式和4种解决方案
Gin Middleware
对Vintage分析的一些学习理解
I, 28, a tester, was ruthlessly dismissed in October: I want to remind people who are still learning to test
Round avatar of user list and follow small blocks