BZOI 2017-07-20集训 T1/hdu 5924(找规律)

根据样例就可以猜到解就是$(A,B),(B,A)$,暴力发现这个规律是正确的。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<cstdio>
#include<cstring>
#include<algorithm>
#define ms(i, j) memset(i, j, sizeof i)
#define LL long long
#define FN2 "Inequality"
using namespace std;
LL kase = 0;
void clean() {
}
void solve() {
clean();
LL a, b;
scanf("%I64d%I64d", &a, &b);
if (a == b) printf("Case #%I64d:\n1\n%I64d %I64d\n", ++kase, a, b);
else printf("Case #%I64d:\n2\n%I64d %I64d\n%I64d %I64d\n", ++kase, a, b, b, a);
}
int main() {
freopen(FN2".in", "r", stdin); freopen(FN2".out", "w", stdout);
int T; scanf("%d", &T);
while (T--) solve();
fclose(stdin); fclose(stdout);
return 0;
}

长者的不等式
Markdown

------ 本文结束 ------