From 39ddf257eac16c3870db613c7b64afd6d5454966 Mon Sep 17 00:00:00 2001 From: AnuragBarfa Date: Mon, 30 Oct 2017 22:19:49 +0530 Subject: [PATCH] solution of senate_evacuation finally did the problem --- .../Senate Evacuation/solutions/c++/solution3 | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 GoogleCodeJam/2016/Round 1C/Senate Evacuation/solutions/c++/solution3 diff --git a/GoogleCodeJam/2016/Round 1C/Senate Evacuation/solutions/c++/solution3 b/GoogleCodeJam/2016/Round 1C/Senate Evacuation/solutions/c++/solution3 new file mode 100644 index 0000000..1e032b6 --- /dev/null +++ b/GoogleCodeJam/2016/Round 1C/Senate Evacuation/solutions/c++/solution3 @@ -0,0 +1,83 @@ +//* +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define MOD 1000000007 +#define MAX 0x3f3f3f3f +#define MAX2 0x3f3f3f3f3f3f3f3fll +#define ERR 1e-10 +#define mp make_pair +#define all(x) (x).begin(), (x).end() +#pragma warning(disable:4996) +using namespace std; + +typedef long long ll; +typedef long double ldb; +typedef pair pii; +typedef pair pll; +typedef pair pdd; + +int n; +int a[3000]; +set> s; + +int main() +{ + int i, j, k; + int T, TT; + freopen("input.txt", "r", stdin); + freopen("output.txt", "w", stdout); + cin>>TT; + for(T=1;T<=TT;T++) + { + cin>>n; + for(i=0;i