From 31e05cec2ff51d71bcfbfd795d2836325166869d Mon Sep 17 00:00:00 2001 From: Soumya Raj Darbari Date: Wed, 23 Oct 2019 12:46:57 +0530 Subject: [PATCH] Create OBTTRNGL.cpp --- OBTTRNGL.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 OBTTRNGL.cpp diff --git a/OBTTRNGL.cpp b/OBTTRNGL.cpp new file mode 100644 index 0000000..5905a36 --- /dev/null +++ b/OBTTRNGL.cpp @@ -0,0 +1,45 @@ +#include +using namespace std; + +//important constants +#define pi M_PI +#define mod 1000000007 +#define maX(a,b) ((a)>(b)?(a):(b)) +#define miN(a,b) ((a)<(b)?(a):(b)) + +#ifdef ONLINE_JUDGE +#define MAX 2000005 +#else +#define MAX 100000 +#endif + +int a[MAX],b[MAX]; +char s[MAX],r[MAX]; +int test; + +int main(){ + #ifndef ONLINE_JUDGE + freopen("input.txt","r",stdin); + // freopen("output.txt","w",stdout); + #endif + + int t,n,m,k,l,z,flag,count,d,mx,mn,v1,v2,x,y; + long long int sum,prod; + + scanf("%d",&test); + + while(test--){ + + scanf("%d",&n); + scanf("%d%d",&v1,&v2); + x=abs(v2-v1)-1; + y=n-2-x; + if(x