PAT 1117 Eddington Number】的更多相关文章

1117 Eddington Number (25 分) British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one ri…
British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one rides more than E miles. Edding…
1117 Eddington Number (25 分) British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one ri…
https://pintia.cn/problem-sets/994805342720868352/problems/994805354762715136 British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum…
British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one rides more than E miles. Edding…
British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one rides more than E miles. Edding…
如题,大水题...贴个代码完事,就这么任性~~ #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #define INF 0x3f3f3f3f using namespace std; /* 求满足下面的最大的E: 恰好有E个天的行程都大于E miles 从小到大排序,倒着循环一遍,直到最小值<=天数为止,此时的天数-1即为答案. */ +; i…
题意: 输入一个正整数N(<=100000),接着输入N个非负整数.输出最大的整数E使得有至少E个整数大于E. AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ]; ]; map<int,int>mp; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL…
题意:给出了N个数字,确定一个尽可能大的数字E,要求这N个数字中大于E的数字有E个. 思路: 乍一看不知道题目在说啥.静下心来多读几遍题目,在草稿纸上比划比划,发现是个大水题.解释一下样例,原始序列为6 7 6 9 3 10 8 2 7 8,将其从大到小排序,则是10 9 8 8 7 7 6 6 3 2,(假设下标从1开始),我们这样来理解,第1天骑行10公里(说明有1天超过1):第2天骑行9公里(说明有2天超过2):第3天骑行8公里(说明有3天超过3)...,第6天骑行7公里(说明有6天超过6…
Source: PAT A1117 Eddington Number (25 分) Description: British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it…