9
26
2015
2

hiho一下 第六十五周

又被水题虐智商

#include <cstdio>
#include <algorithm>
using namespace std;

int N;
struct Car
{
	int X, Y;
	double L;
	inline void Read()
	{
		scanf("%d%d%lf", &X, &Y, &L);
	}
} C[1003];
int p[1003], o[1003];
double Res[1003], t[1003];
inline bool cmp(int a, int b)
{
	return C[a].X > C[b].X;
}
int main()
{
	scanf("%d", &N);
	for (int i = 1; i <= N; i ++) C[o[i] = i].Read(), p[i] = C[i].Y;
	sort(p + 1, p + N + 1), sort(o + 1, o + N + 1, cmp);
	for (int i = 1; i <= N; i ++)
	{
		int Cur = o[i], Pos = C[Cur].X;
		double T = 0;
		for (int j = 1; j <= N; j ++)
			if (p[j] >= Pos)
			{
				T += (double)(p[j] - Pos) / C[Cur].L;
				T = t[j] = max(t[j], T), Pos = p[j];
				if (Pos == C[Cur].Y)
				{
					Res[Cur] = T;
					break;
				}
			}
	}
	for (int i = 1; i <= N; i ++) printf("%.2lf\n", Res[i]);
	return 0;
}
Category: hihocoder | Tags: math | Read Count: 622
TN +1 Model Paper 20 说:
2022年8月16日 18:22

This board oversees a large number of schools in the state of Tamil Nadu, and it makes every effort to give its pupils access to a top-notch education. This board also held 11th-class exams during the current academic year in the state of Tamil Nadu, and all students who registered for those exams are currently awaiting the TN +1 Important Question Paper 2023. TN +1 Model Paper 2023 The Directorate of Government Examinations, Tamil Nadu, released the TN 11th Question Paper 2023 for these examinations in May. Approximately 88.1% of the pupils that participated in the tests were successful.

AP SSC Urdu Question 说:
2022年9月17日 01:22

Urdu is one of the main languages in the state, and this is the first language for Urdu Medium students, there are fewer schools are working in all districts of the state, all the applicable students also can download AP SSC Urdu Model Paper 2023 Pdf in chapter wise for all lessons of the course, AP SSC Urdu Question Paper download, and practice the Ibtedai Question bank to get better rank in all exams conducted by BSEAP. Urdu is one of the main languages in the state, and this is the first language for Urdu Medium students, there are fewer schools are working in all districts of the state, all the applicable students also can download AP SSC Urdu Model Paper 2023 Pdf in chapter wise for all lessons of the course.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com