### B Binary Vector

#### AC代码：

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#include <cstdio>
#include <vector>
#include <queue>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <string>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <stack>
#include <queue>
using namespace std;
#define sd(n) scanf("%d", &n)
#define sdd(n, m) scanf("%d%d", &n, &m)
#define sddd(n, m, k) scanf("%d%d%d", &n, &m, &k)
#define pd(n) printf("%d\n", n)
#define pc(n) printf("%c", n)
#define pdd(n, m) printf("%d %d\n", n, m)
#define pddd(n, m, z) printf("%d %d %d\n", n, m, z)
#define pld(n) printf("%lld\n", n)
#define pldd(n, m) printf("%lld %lld\n", n, m)
#define plddd(n, m, z) printf("%lld %lld %lld\n", n, m, z)
#define sld(n) scanf("%lld", &n)
#define sldd(n, m) scanf("%lld%lld", &n, &m)
#define slddd(n, m, k) scanf("%lld%lld%lld", &n, &m, &k)
#define sf(n) scanf("%lf", &n)
#define sc(n) scanf("%c", &n)
#define sff(n, m) scanf("%lf%lf", &n, &m)
#define sfff(n, m, k) scanf("%lf%lf%lf", &n, &m, &k)
#define ss(str) scanf("%s", str)
#define rep(i, a, n) for (int i = a; i <= n; i++)
#define per(i, a, n) for (int i = a; i >= n; i--)
#define mem(a, n) memset(a, n, sizeof(a))
#define debug(x) cout << #x << ": " << x << endl
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define ce i == n ? '\n' : ' '
#define mod(x) ((x) % MOD)
#define gcd(a, b) __gcd(a, b)
#define lowbit(x) (x & -x)
typedef pair<int, int> PII;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const int MOD = 1e9 + 7;
const double eps = 1e-9;
const ll INF = 0x3f3f3f3f3f3f3f3fll;
const int inf = 0x3f3f3f3f;
{
int ret = 0, sgn = 1;
char ch = getchar();
while (ch < '0' || ch > '9')
{
if (ch == '-')
sgn = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
{
ret = ret * 10 + ch - '0';
ch = getchar();
}
return ret * sgn;
}
inline void Out(int a) //ê?3?ía1ò
{
if (a > 9)
Out(a / 10);
putchar(a % 10 + '0');
}

ll gcd(ll a, ll b)
{
return b == 0 ? a : gcd(b, a % b);
}

ll lcm(ll a, ll b)
{
return a * b / gcd(a, b);
}

///快速幂m^k%mod
ll qpow(ll x, ll n, ll mod)
{
ll res = 1;
while (n)
{
if (n & 1)
res = (res * x) % mod;
x = x * x % mod, n >>= 1;
}
return res;
}

### C Combination of Physics and Maths

#### AC代码：

const int N = 1e5 + 50;
int n, m;
int a[500][500];

int main()
{
int t;
sd(t);
while (t--)
{
sdd(n, m);
rep(i, 1, n)
{
rep(j, 1, m)
{
sd(a[i][j]);
}
}
double ans = 0;
rep(j, 1, m)
{
ll res = 0;
rep(i, 1, n)
{
res += a[i][j];
ans = max(ans, res * 1.0 / (1.0 * a[i][j]));
}
}
printf("%.8lf\n", ans);
}
return 0;
}

### E Easy Construction

#### 题意：

n为奇数时，知道 个元素的和 ，那么 必须为 ，可构造 ，若 不为

#### AC代码：

const int N = 5e5 + 50;
int n, k;
vector<int> ans;
int main()
{
sdd(n, k);
if (n & 1)
{
if (k)
{
puts("-1");
}
else
{
ans.pb(n);
rep(i, 1, n)
{
if (i >= n - i)
break;
ans.pb(i);
ans.pb(n - i);
}
}
}
else
{

if (k * 2 != n)
puts("-1");
else
{
ans.pb(n);
ans.pb(k);
rep(i, 1, n)
{
if (i >= n - i)
break;
ans.pb(i);
ans.pb(n - i);
}
}
}
for (auto i : ans)
printf("%d ", i);
printf("\n");
return 0;
}