@@ -13,7 +13,7 @@ typedef long double LD;
13
13
typedef pair<int ,int > pii;
14
14
typedef pair<int ,pii> piii;
15
15
16
- const int MAX = 100005 ;
16
+ const int MAX = 1000005 ;
17
17
const int LIM = 263005 ;
18
18
const int INF = 1000000001 ;
19
19
const LL INFL = 1000000000000000001LL ;
@@ -22,6 +22,7 @@ const LD EPS = 1e-10;
22
22
const double PI = acos(-1.0 );
23
23
24
24
#define fastio ios_base::sync_with_stdio (0 );cin.tie(0 );cout.tie(0 )
25
+ #define Assert (x ) {if (!(x)){cerr<<" Assertion failed at line " <<__LINE__<<" : " <<#x<<" = " <<(x)<<" \n " ;}}
25
26
#define inchar getchar// _unlocked
26
27
#define outchar (x ) putchar(x)// _unlocked(x)
27
28
#define pb push_back
@@ -36,6 +37,10 @@ const double PI = acos(-1.0);
36
37
#define present (c,x ) ((c).find(x) != (c).end())
37
38
#define cpresent (c,x ) (find(all(c),x) != (c).end())
38
39
40
+ #define trace (...) __f(#__VA_ARGS__, __VA_ARGS__)
41
+ template <typename Arg1>void __f (const char * name, Arg1&& arg1){cout<<name<<" : " <<arg1<<" \n " ;}
42
+ template <typename Arg1, typename ... Args>void __f (const char * names, Arg1&& arg1, Args&&... args){const char * comma=strchr (names+1 ,' ,' );cout.write (names,comma-names)<<" : " <<arg1<<" , " ;__f (comma+1 , args...);}
43
+
39
44
double tick (){static clock_t oldt;clock_t newt=clock ();double diff=1.0 *(newt-oldt)/CLOCKS_PER_SEC;oldt = newt;return diff;}
40
45
template <typename T> void inPos (T &x){x=0 ;register T c=inchar ();while (((c<48 )||(c>57 ))&&(c!=' -' ))c=inchar ();bool neg=false ;if (c==' -' )neg=true ;for (;c<48 ||c>57 ;c=inchar ());for (;c>47 &&c<58 ;c=inchar ())x=(x<<3 )+(x<<1 )+(c&15 );if (neg)x=-x;}
41
46
template <typename T> void outPos (T n){if (n<0 ){outchar (' -' );n*=-1 ;}char snum[65 ];int i=0 ;do {snum[i++]=n%10 +' 0' ;n/=10 ;}while (n);i=i-1 ;while (i>=0 )outchar (snum[i--]);outchar (' \n ' );}
@@ -48,11 +53,20 @@ template<typename T> T InverseEuler(T a, T m){return (a==1?1:power(a,m-2,m));}
48
53
template <typename T> T gcd (T a, T b){return (b==0 ?a:__gcd (a,b));}
49
54
template <typename T> T lcm (T a, T b){return (a*(b/gcd (a,b)));}
50
55
56
+ int a[MAX];
57
+
51
58
int main () {
52
59
#ifndef ONLINE_JUDGE
60
+ #define LOCAL 1
61
+ #define DUBUG 1
53
62
freopen (" inp.txt" , " r" , stdin);
63
+ #else
64
+ #define LOCAL 0
65
+ #define DEBUG 0
54
66
#endif
55
67
56
- // cerr<<tick();
68
+ if (LOCAL) {
69
+ cerr<<" Execution time : " <<tick ();
70
+ }
57
71
return 0 ;
58
72
}
0 commit comments