[ create a new paste ] login | about

Link: http://codepad.org/8WXW3Uxv    [ raw code | output | fork ]

C, pasted on Feb 7:
#include<bits/stdc++.h>
#define int long long
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#define endl '\n'
#define pi pair<int,int>
#define pb emplace_back
#define SZ(v) (int)(v).size()
#define all(v) (v).begin(),(v).end()
#define REP(i, j, k) for (int i = j; i < k; ++i)
#define debug(a) cout << #a << " = " << a << endl;
#define mk make_pair
#define F first
#define S second
using namespace std;

signed main()
{
	srand(time(NULL)); int times = rand();
	ofstream fout("0.in");
	
	random_device rd;
	mt19937 gen = mt19937(rd());
	uniform_int_distribution<int> dis(-1000000000, 1000000000);
	auto RAND = bind(dis, gen);
	while (times--) RAND();
	
	fout << 5 << endl;
	REP (_, 0, 5)
	{
		int n = abs(RAND()) % 2000 + 3;
		cout << n << endl;
		set<pi> s;
		if (RAND() % 3 == 0)
		{
			int a = RAND(), b = RAND();
			int c = RAND() % 1000000, d = RAND() % 1000000;
			s.insert(mk(a, b));
			s.insert(mk(a - c, b - d));
			s.insert(mk(a + c, b + d));
		}
		while (SZ(s) < n) s.insert(mk(RAND(), RAND()));
		fout << n << endl;
		for (auto i:s) fout << i.F << " " << i.S << endl;
	}
}


Output:
Line 23: error: bits/stdc++.h: No such file or directory
Line 14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namespace'
In function 'main':
Line 19: error: 'ofstream' undeclared (first use in this function)
Line 19: error: (Each undeclared identifier is reported only once
Line 19: error: for each function it appears in.)
Line 19: error: expected ';' before 'fout'
Line 21: error: 'random_device' undeclared (first use in this function)
Line 21: error: expected ';' before 'rd'
Line 22: error: 'mt19937' undeclared (first use in this function)
Line 22: error: expected ';' before 'gen'
Line 23: error: 'uniform_int_distribution' undeclared (first use in this function)
Line 23: error: expected expression before 'long'
Line 24: error: 'dis' undeclared (first use in this function)
Line 24: error: 'gen' undeclared (first use in this function)
Line 25: error: called object 'RAND' is not a function
Line 27: error: 'fout' undeclared (first use in this function)
Line 28: error: 'for' loop initial declaration used outside C99 mode
Line 30: error: called object 'RAND' is not a function
Line 31: error: 'cout' undeclared (first use in this function)
Line 32: error: 'set' undeclared (first use in this function)
Line 32: error: 'pair' undeclared (first use in this function)
Line 32: error: expected expression before 'long'
Line 33: error: called object 'RAND' is not a function
Line 35: error: called object 'RAND' is not a function
Line 35: error: called object 'RAND' is not a function
Line 36: error: called object 'RAND' is not a function
Line 36: error: called object 'RAND' is not a function
Line 37: error: 's' undeclared (first use in this function)
Line 41: error: called object 'RAND' is not a function
Line 41: error: called object 'RAND' is not a function
Line 43: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Line 43: error: 'for' loop initial declaration used outside C99 mode
Line 43: error: 'i' undeclared (first use in this function)


Create a new paste based on this one


Comments: