首页 > 其他分享 >1073-76

1073-76

时间:2023-03-25 20:36:34浏览次数:30  
标签:cout int namespace 1073 76 dy using main

#include <iostream>
#include <cmath>
using namespace std;
int main(){
	int n;
	double x,z,c,j,p;
	int r=0;
	cin>>n;
	double x2=0,z2=0;
	for(int i=0;i<n;i++){
		cin>>x>>z>>c;
		j=sqrt(pow(x-x2,2)+pow(z-z2,2));
		p=c*1+c*0.5;
		r+=j/50*2+ceil(p);
	}
	cout<<ceil(r);
	
	return 0;
}
*/
/*#include <iostream>
#include <cmath>
using namespace std;
int main(){
	int a,b=0,c=0;
	float q=0;
	for(int i=1;i<13;i++){
		cin>>a;
		c=300+b;
		b=c;
		if(c-a>=100){
			if(b-a>0){
			q+=3-a/100;
			b=b-a-q*100;	
			}
		}else if(c-a<100&&c-a>0){
			b=b-a;	
		}else{
			cout<<"-"<<i; 
		return 0;
		}
	}
	cout<<b+q*120;
	return 0;
}
#include <iostream>
using namespace std;
int main(){
	int a=0,b=0,c=0,s=0,t,dy=0;
	for(int i=1;i<=12;i++){
		cin>>b;
		if(a+300-b>=0){
			t=a+300-b;
			c=t%100;
			s+=t-c;
		}else{
			if(dy==0){
				dy=i;
			}
		}
	}
	if(dy==0){
		cout<<-dy;
		return 0;
	}
	cout<<s*1.2+a;
	return 0;
}
#include <iostream>
using namespace std;
int main(){
	int n,a,b,j;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a>>b;
		if(a>=90&&a<=140&&b<=90&&b>=60){
			j++;
		}
	}
	cout<<j;
	return 0;
}

  

标签:cout,int,namespace,1073,76,dy,using,main
From: https://www.cnblogs.com/As10016/p/17255508.html

相关文章

  • 1073:救援
    #include<iostream>#include<cmath>usingnamespacestd;intmain(){ floatn,a,b,c,d; cin>>n; cin>>a; cin>>b; cin>>c; d=d+a/50*2; d=d+b/50*2; d=d+c*1; d=d+c*0.5......
  • 阿里云数据库RDS迁移导入数据时报错:Specified key was too long; max key length is 76
    近期由于新申请了新的阿里云数据库RDS,需要把之前的数据迁移过去,结果通过各种方式去导入数据,都一直报错.报错信息:Indexcolumnsizetoolarge.Themaximumcolumnsize......
  • [ABC276G] Count Sequences 题解
    考虑差分,设\(d_i=a_i-a_{i-1}\),特别的,\(d_1=a_1\),那么约束就变成了\(\displaystyle\sumd_i\lem\)。对所有\(i>1\)有\(d_i\not\equiv0\pmod3\)。发现\(d_1\)......
  • 快慢指针-lc876链表的中间节点
    给你单链表的头结点head,请你找出并返回链表的中间结点。如果有两个中间结点,则返回第二个中间结点。示例1:输入:head=[1,2,3,4,5]输出:[3,4,5]解释:链表只有一个中间......
  • Codeforces Round 760 (Div. 3) D. Array and Operations(贪心)
    https://codeforces.com/contest/1618/problem/D题目大意:给定一个长度为n的数组a,我们可以进行m次操作:每次操作可以任意选择两个不同的下标的数字x和y,并把它两删除,替换......
  • P2764 最小路径覆盖问题
    求最少的路径数目覆盖DAG每个点(无点交集 #include<iostream>#include<algorithm>#include<queue>usingnamespacestd;constintN=500,M=5e5+5;constintinf......
  • LeetCode|876. 链表的中间结点
    题目链接:876.链表的中间结点难度简单829收藏分享切换为英文接收动态反馈给你单链表的头结点head,请你找出并返回链表的中间结点。如果有两个中间结点,则返回第二个中......
  • P2766 最长不下降子序列问题
    给定正整数序列x1…,xn1.计算其最长不下降子序列的长度ss。2.如果每个元素只允许使用一次,计算从给定的序列中最多可取出多少个长度为ss的不下降子序列。3.如果允许......
  • 6.Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x000000079
    这个问题引起的原因是:服务器上物理内存太小,大部分都是应为程序太多,内存吃紧,而给jvm分配的内存太大(java程序启动需要的内存,linux不能给),最好调整java程序jvm内存吧(测试环......
  • 76.最小覆盖子串——学习笔记
    题目:给你一个字符串s、一个字符串t。返回s中涵盖t所有字符的最小子串。如果s中不存在涵盖t所有字符的子串,则返回空字符串""。注意:对于t中重复字符,我们......