由于数据过大放不上来,以下为 gen:(已固定随机种子保证稳定复现)
//By: OIer rui_er
#include <bits/stdc++.h>
#define rep(x,y,z) for(int x=(y);x<=(z);x++)
#define per(x,y,z) for(int x=(y);x>=(z);x--)
#define debug(format...) fprintf(stderr, format)
#define fileIO(s) do{freopen(s".in","r",stdin);freopen(s".out","w",stdout);}while(false)
using namespace std;
typedef long long ll;
// mt19937 rnd(std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
mt19937 rnd(20070213);
int randint(int L, int R) {
uniform_int_distribution<int> dist(L, R);
return dist(rnd);
}
template<typename T> void chkmin(T& x, T y) {if(x > y) x = y;}
template<typename T> void chkmax(T& x, T y) {if(x < y) x = y;}
int main() {
freopen("1.in", "w", stdout);
int n = 9999;
printf("%d\n", n);
while(n--) {
if(randint(0, 1)) printf("%d %d %d %d\n", randint(0, 100), randint(0, 100), randint(9900, 10000), randint(9900, 10000));
else {
int x1, y1, x2, y2;
do {
x1 = randint(0, 10000);
y1 = randint(0, 10000);
x2 = randint(0, 10000);
y2 = randint(0, 10000);
}while(x1 == x2 || y1 == y2);
if(x1 > x2) swap(x1, x2);
if(y1 > y2) swap(y1, y2);
printf("%d %d %d %d\n", x1, y1, x2, y2);
}
}
return 0;
}
正确答案应为:
99999980
@123wwm 的 #567053 结果为 WA,错误输出了:
4604280