打表可知,答案就是输入的那两个数,只要按照题目要求的顺序输出即可。 代码如下:
#include <cstdio>
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <cctype>
#include <string>
#include <queue>
#define debug printf("debug\n")
#define mst(a,b) memset(a,b,sizeof(a))
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int maxn=1e5+5;
int main()
{
ll t;
cin>>t;
ll kase=0;
while(t--)
{
ll a,b;
cin>>a>>b;
if(a==b){
printf("Case #%lld:\n",++kase);
cout<<1<<endl;
cout<<a<<" "<<b<<endl;
}else{
printf("Case #%lld:\n",++kase);
cout<<2<<endl;
cout<<a<<" "<<b<<endl;
cout<<b<<" "<<a<<endl;
}
}
return 0;
}