Skip to content

Instantly share code, notes, and snippets.

@yosupo06 yosupo06/maker.cpp Secret
Last active Oct 30, 2015

What would you like to do?
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <map>
#include <cassert>
#include <set>
#include <cstring>
#include <complex>
#include <random>
using namespace std;
typedef long long ll;
typedef tuple<int, int, int, int> T;
random_device rd;
mt19937 gen(rd());
vector<T> v;
void copyq(int a, int b, int c, int d) {
v.push_back(T(a, b, c, d));
int main() {
const int n = 90000;
int q = 0;
for (int i = 1; i <= n; i++) {
copyq(i, 2*i, 0, i);
if (uniform_int_distribution<int>(0, 30)(gen) == 0) {
copyq(0, i+1, i-1, 2*i);
for (int i = 1; i <= n; i++) {
copyq(2*n-2*i, 2*n-i, 2*n-i, 2*n);
if (uniform_int_distribution<int>(0, 30)(gen) == 0) {
copyq(2*n-(i+1), 2*n, 2*n-2*i, 2*n-i+1);
printf("%d %d\n", 2*n, q);
for (int i = 1; i <= 2*n; i++) {
printf("%d", 0);
if (i != 2*n) {
printf(" ");
} else {
for (auto t: v) {
int a, b, c, d;
tie(a, b, c, d) = t;
printf("2 %d %d %d %d\n", a+1, b, c+1, d);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.