#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef vector<ll> vi;
typedef vector<vector<ll>> vvi;
typedef pair<ll,ll> pi;
typedef map<ll,ll> mi;
typedef long double ld;
typedef vector<ld> vd;
typedef vector<vector<ld>> vvd;
typedef pair<ld,ld> pd;
#define ff first
#define ss second
#define srt(a) sort(a.begin(),a.end());
#define fip(k, n) for (ll i = k; i < n; i++)
#define fjp(k, n) for (ll j = k; j < n; j++)
#define fin(k, n) for (ll i = k; i >= n; i--)
#define fjn(k, n) for (ll j = k; j >= n; j--)
#define fp(k, n, m) for (ll k = n; k < m; k++)
#define fn(k, n, m) for (ll k = n; k >= m; k--)
#define ordered_set tree<pi, null_type,less< pi >, rb_tree_tag,tree_order_statistics_node_update>
#define totalOne(n) __builtin_popcountll(n)
#define backZero(n) __builtin_ctzll(n)
#define frontZero(n) __builtin_clzll(n)
#define fx(k) for ( auto x : k )
#define test ll t;cin >> t;while (t--)
#define nli "\n"
// ==========================(debug)============================================================================================== //
#ifndef ONLINE_JUDGE
#define debug(x) cerr << #x <<" "; _printn(x); cerr << nli;
#else
#define debug(x)
#endif
void _printn(ll x){ cerr<<x<<" "; }
void _printn(int x){ cerr<<x<<" "; }
void _printn(ld x){ cerr<<x<<" "; }
void _printn(double x){ cerr<<x<<" "; }
void _printn(string x){ cerr<<x<<" "; }
void _printn(char x){ cerr<<x<<" "; }
void _printn(bool x){ cerr<<x<<" "; }
template<class T,class V>void _printn(pair<T,V> vv);
template<class T> void _printn(vector<T> vv);
template<class T> void _printn(set<T> vv);
template<class T,class V> void _printn(map<T,V> vv);
template<class T> void _printn(multiset<T> vv);
template<class T,class V>void _printn(pair<T,V> vv){ cerr<<"( ";_printn(vv.ff);cerr<<",";_printn(vv.ss);cerr<<")";}
template<class T> void _printn(vector<T> vv){ cerr<<"[ "; for(auto xx:vv){ _printn(xx);cerr<<" "; } cerr<<"]"; };
template<class T> void _printn(set<T> vv){ cerr<<"{ "; for(auto xx:vv){ _printn(xx);cerr<<" "; } cerr<<"}"; };
template<class T> void _printn(multiset<T> vv){ cerr<<"{ "; for(auto xx:vv){ _printn(xx);cerr<<" "; } cerr<<"}"; };
template<class T,class V> void _printn(map<T,V> vv){ cerr<<"{ "; for(auto xx:vv){ _printn(xx);cerr<<" "; } cerr<<"}"; };
// ==========================(debug)============================================================================================== //
ll n,m,tp,tp2,res,cnt,sum,tptp,ans;
const ll mx = 18 + 1;
const ll mod = 998244353;
// ==========================(MOD)=============================================================================================== //
ll mod_add(ll aa,ll bb){ return ((aa%mod)+(bb%mod))%mod; }
ll mod_minus(ll aa,ll bb){ return (((aa%mod)-(bb%mod))+10*mod)%mod; }
ll mod_mul(ll aa,ll bb){ return ((aa%mod)*(bb%mod))%mod; }
ll mod_power(ll aa,ll bb){ aa%=mod; ll empowered = 1; bb%=mod-1; while(bb > 0){ if(bb & 1) empowered = mod_mul(empowered,aa); bb = bb >> 1; aa = mod_mul(aa,aa); } return empowered; }
ll mod_divi(ll aa,ll bb){ aa=mod_mul(aa,mod_power(bb,mod-2)); return aa; }
// ==========================(MOD)=============================================================================================== //
bool f = false;
typedef struct OBJ{
ll lft,c,s;
void init(ll a,ll b,ll d){
lft = a;
c = b;
s = d;
return;
}
void deb(){
cerr<<lft<<" "<<c<<" "<<s<<nli;
return;
}
}obj;
obj oe;
ll rev[mx];
ll to[mx];
ll sr,de;
vector<vector<obj>> dp(1<<mx);
vector<obj> v;
void deb(ll x){
bitset<3> bt(x);
cerr<<bt<<nli;
}
int main(){
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
// #ifndef ONLINE_JUDGE
// freopen("input1.txt", "r", stdin);
// freopen("output1.txt", "w", stdout);
// freopen("error1.txt", "w", stderr);
// #endif // ONLINE_JUDGE
cin>>n>>m;
fip(0,m){
cin>>sr>>de;
sr--,de--;
rev[sr] |= (1<<de);
to[sr] |= (1<<de);
to[de] |= (1<<sr);
}
ans = 0;
res = 1<<n;
res--;
oe.init(res,1,0);
// debug(oe.c);
dp[0].push_back(oe);
fip(0,(1<<n)){
sort(dp[i].begin(),dp[i].end(),[](const obj aa,const obj bb){
return aa.lft < bb.lft;
});
if(!dp[i].size())
continue;
// debug(i);
// fx(dp[i]){
// x.deb();
// }
v.clear();
v.push_back(dp[i][0]);
tp = 0;
fjp(1,(ll)dp[i].size()){
if(dp[i][j].lft==v[tp].lft){
v[tp].s += dp[i][j].s;
v[tp].c += dp[i][j].c;
continue;
}
tp++;
v.push_back(dp[i][j]);
}
dp[i].clear();
dp[i] = v;
// fx(dp[i]){
// x.deb();
// deb(x.lft);
// }
tp = 0;
fx(dp[i]){
tp = res;
fjp(0,n){
tp -= (1<<j);
if(x.lft&(1<<j)){
// debug(j);
tp2 = i | (1<<j);
sum = x.lft & tp;
sum |= to[j];
sum ^= (sum&tp2);
// sum &= (res-tptp);
cnt = totalOne(rev[j] & i);
// debug(tp2);
// deb(tp2);
// debug(cnt);
// debug(sum);
// deb(sum);
oe.init(sum,x.c,mod_add(x.s,mod_mul(cnt,x.c)));
// oe.deb();
dp[tp2].push_back(oe);
// cerr<<nli;
}
}
}
// cerr<<nli;
// cerr<<nli;
}
fx(dp[res])
ans = mod_add(ans,x.s);
cout<<ans<<nli;
cerr << "Time elapsed: " << setprecision(6) << 1000.0 * clock() / CLOCKS_PER_SEC << "ms\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
12636 KB |
Output is correct |
2 |
Correct |
4 ms |
12636 KB |
Output is correct |
3 |
Correct |
3 ms |
12636 KB |
Output is correct |
4 |
Correct |
3 ms |
12636 KB |
Output is correct |
5 |
Correct |
3 ms |
12636 KB |
Output is correct |
6 |
Correct |
4 ms |
12636 KB |
Output is correct |
7 |
Correct |
4 ms |
12636 KB |
Output is correct |
8 |
Correct |
4 ms |
12588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
12636 KB |
Output is correct |
2 |
Correct |
4 ms |
12636 KB |
Output is correct |
3 |
Correct |
3 ms |
12636 KB |
Output is correct |
4 |
Correct |
3 ms |
12636 KB |
Output is correct |
5 |
Correct |
3 ms |
12636 KB |
Output is correct |
6 |
Correct |
4 ms |
12636 KB |
Output is correct |
7 |
Correct |
4 ms |
12636 KB |
Output is correct |
8 |
Correct |
4 ms |
12588 KB |
Output is correct |
9 |
Correct |
3 ms |
12636 KB |
Output is correct |
10 |
Correct |
3 ms |
12636 KB |
Output is correct |
11 |
Correct |
3 ms |
12636 KB |
Output is correct |
12 |
Correct |
3 ms |
12528 KB |
Output is correct |
13 |
Correct |
3 ms |
12652 KB |
Output is correct |
14 |
Correct |
3 ms |
12888 KB |
Output is correct |
15 |
Correct |
3 ms |
12636 KB |
Output is correct |
16 |
Correct |
3 ms |
12632 KB |
Output is correct |
17 |
Correct |
3 ms |
12632 KB |
Output is correct |
18 |
Correct |
4 ms |
12636 KB |
Output is correct |
19 |
Correct |
3 ms |
12636 KB |
Output is correct |
20 |
Correct |
3 ms |
12676 KB |
Output is correct |
21 |
Correct |
4 ms |
12636 KB |
Output is correct |
22 |
Correct |
3 ms |
12636 KB |
Output is correct |
23 |
Correct |
3 ms |
12636 KB |
Output is correct |
24 |
Correct |
3 ms |
12636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
12636 KB |
Output is correct |
2 |
Correct |
4 ms |
12636 KB |
Output is correct |
3 |
Correct |
3 ms |
12636 KB |
Output is correct |
4 |
Correct |
3 ms |
12636 KB |
Output is correct |
5 |
Correct |
3 ms |
12636 KB |
Output is correct |
6 |
Correct |
4 ms |
12636 KB |
Output is correct |
7 |
Correct |
4 ms |
12636 KB |
Output is correct |
8 |
Correct |
4 ms |
12588 KB |
Output is correct |
9 |
Correct |
3 ms |
12636 KB |
Output is correct |
10 |
Correct |
3 ms |
12636 KB |
Output is correct |
11 |
Correct |
3 ms |
12636 KB |
Output is correct |
12 |
Correct |
3 ms |
12528 KB |
Output is correct |
13 |
Correct |
3 ms |
12652 KB |
Output is correct |
14 |
Correct |
3 ms |
12888 KB |
Output is correct |
15 |
Correct |
3 ms |
12636 KB |
Output is correct |
16 |
Correct |
3 ms |
12632 KB |
Output is correct |
17 |
Correct |
3 ms |
12632 KB |
Output is correct |
18 |
Correct |
4 ms |
12636 KB |
Output is correct |
19 |
Correct |
3 ms |
12636 KB |
Output is correct |
20 |
Correct |
3 ms |
12676 KB |
Output is correct |
21 |
Correct |
4 ms |
12636 KB |
Output is correct |
22 |
Correct |
3 ms |
12636 KB |
Output is correct |
23 |
Correct |
3 ms |
12636 KB |
Output is correct |
24 |
Correct |
3 ms |
12636 KB |
Output is correct |
25 |
Correct |
4 ms |
12636 KB |
Output is correct |
26 |
Correct |
4 ms |
12636 KB |
Output is correct |
27 |
Correct |
3 ms |
12632 KB |
Output is correct |
28 |
Correct |
3 ms |
12636 KB |
Output is correct |
29 |
Correct |
3 ms |
12636 KB |
Output is correct |
30 |
Correct |
4 ms |
12632 KB |
Output is correct |
31 |
Correct |
3 ms |
12632 KB |
Output is correct |
32 |
Correct |
3 ms |
12636 KB |
Output is correct |
33 |
Correct |
3 ms |
12636 KB |
Output is correct |
34 |
Correct |
4 ms |
12636 KB |
Output is correct |
35 |
Correct |
4 ms |
12636 KB |
Output is correct |
36 |
Correct |
4 ms |
12836 KB |
Output is correct |
37 |
Correct |
4 ms |
12636 KB |
Output is correct |
38 |
Correct |
3 ms |
12636 KB |
Output is correct |
39 |
Correct |
4 ms |
12636 KB |
Output is correct |
40 |
Correct |
3 ms |
12636 KB |
Output is correct |
41 |
Correct |
3 ms |
12636 KB |
Output is correct |
42 |
Correct |
4 ms |
12892 KB |
Output is correct |
43 |
Correct |
4 ms |
12892 KB |
Output is correct |
44 |
Correct |
4 ms |
12892 KB |
Output is correct |
45 |
Correct |
4 ms |
12888 KB |
Output is correct |
46 |
Correct |
4 ms |
12888 KB |
Output is correct |
47 |
Correct |
3 ms |
12636 KB |
Output is correct |
48 |
Correct |
3 ms |
12636 KB |
Output is correct |
49 |
Correct |
4 ms |
12892 KB |
Output is correct |
50 |
Correct |
4 ms |
12892 KB |
Output is correct |
51 |
Correct |
3 ms |
12892 KB |
Output is correct |
52 |
Correct |
4 ms |
12636 KB |
Output is correct |
53 |
Correct |
4 ms |
12892 KB |
Output is correct |
54 |
Correct |
4 ms |
12892 KB |
Output is correct |
55 |
Correct |
4 ms |
12892 KB |
Output is correct |
56 |
Correct |
5 ms |
13148 KB |
Output is correct |
57 |
Correct |
4 ms |
13148 KB |
Output is correct |
58 |
Correct |
4 ms |
13148 KB |
Output is correct |
59 |
Correct |
4 ms |
12960 KB |
Output is correct |
60 |
Correct |
4 ms |
12888 KB |
Output is correct |
61 |
Correct |
4 ms |
12892 KB |
Output is correct |
62 |
Correct |
4 ms |
12892 KB |
Output is correct |
63 |
Correct |
4 ms |
12892 KB |
Output is correct |
64 |
Correct |
4 ms |
12892 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
12636 KB |
Output is correct |
2 |
Correct |
4 ms |
12636 KB |
Output is correct |
3 |
Correct |
3 ms |
12636 KB |
Output is correct |
4 |
Correct |
3 ms |
12636 KB |
Output is correct |
5 |
Correct |
3 ms |
12636 KB |
Output is correct |
6 |
Correct |
4 ms |
12636 KB |
Output is correct |
7 |
Correct |
4 ms |
12636 KB |
Output is correct |
8 |
Correct |
4 ms |
12588 KB |
Output is correct |
9 |
Correct |
3 ms |
12636 KB |
Output is correct |
10 |
Correct |
3 ms |
12636 KB |
Output is correct |
11 |
Correct |
3 ms |
12636 KB |
Output is correct |
12 |
Correct |
3 ms |
12528 KB |
Output is correct |
13 |
Correct |
3 ms |
12652 KB |
Output is correct |
14 |
Correct |
3 ms |
12888 KB |
Output is correct |
15 |
Correct |
3 ms |
12636 KB |
Output is correct |
16 |
Correct |
3 ms |
12632 KB |
Output is correct |
17 |
Correct |
3 ms |
12632 KB |
Output is correct |
18 |
Correct |
4 ms |
12636 KB |
Output is correct |
19 |
Correct |
3 ms |
12636 KB |
Output is correct |
20 |
Correct |
3 ms |
12676 KB |
Output is correct |
21 |
Correct |
4 ms |
12636 KB |
Output is correct |
22 |
Correct |
3 ms |
12636 KB |
Output is correct |
23 |
Correct |
3 ms |
12636 KB |
Output is correct |
24 |
Correct |
3 ms |
12636 KB |
Output is correct |
25 |
Correct |
4 ms |
12636 KB |
Output is correct |
26 |
Correct |
4 ms |
12636 KB |
Output is correct |
27 |
Correct |
3 ms |
12632 KB |
Output is correct |
28 |
Correct |
3 ms |
12636 KB |
Output is correct |
29 |
Correct |
3 ms |
12636 KB |
Output is correct |
30 |
Correct |
4 ms |
12632 KB |
Output is correct |
31 |
Correct |
3 ms |
12632 KB |
Output is correct |
32 |
Correct |
3 ms |
12636 KB |
Output is correct |
33 |
Correct |
3 ms |
12636 KB |
Output is correct |
34 |
Correct |
4 ms |
12636 KB |
Output is correct |
35 |
Correct |
4 ms |
12636 KB |
Output is correct |
36 |
Correct |
4 ms |
12836 KB |
Output is correct |
37 |
Correct |
4 ms |
12636 KB |
Output is correct |
38 |
Correct |
3 ms |
12636 KB |
Output is correct |
39 |
Correct |
4 ms |
12636 KB |
Output is correct |
40 |
Correct |
3 ms |
12636 KB |
Output is correct |
41 |
Correct |
3 ms |
12636 KB |
Output is correct |
42 |
Correct |
4 ms |
12892 KB |
Output is correct |
43 |
Correct |
4 ms |
12892 KB |
Output is correct |
44 |
Correct |
4 ms |
12892 KB |
Output is correct |
45 |
Correct |
4 ms |
12888 KB |
Output is correct |
46 |
Correct |
4 ms |
12888 KB |
Output is correct |
47 |
Correct |
3 ms |
12636 KB |
Output is correct |
48 |
Correct |
3 ms |
12636 KB |
Output is correct |
49 |
Correct |
4 ms |
12892 KB |
Output is correct |
50 |
Correct |
4 ms |
12892 KB |
Output is correct |
51 |
Correct |
3 ms |
12892 KB |
Output is correct |
52 |
Correct |
4 ms |
12636 KB |
Output is correct |
53 |
Correct |
4 ms |
12892 KB |
Output is correct |
54 |
Correct |
4 ms |
12892 KB |
Output is correct |
55 |
Correct |
4 ms |
12892 KB |
Output is correct |
56 |
Correct |
5 ms |
13148 KB |
Output is correct |
57 |
Correct |
4 ms |
13148 KB |
Output is correct |
58 |
Correct |
4 ms |
13148 KB |
Output is correct |
59 |
Correct |
4 ms |
12960 KB |
Output is correct |
60 |
Correct |
4 ms |
12888 KB |
Output is correct |
61 |
Correct |
4 ms |
12892 KB |
Output is correct |
62 |
Correct |
4 ms |
12892 KB |
Output is correct |
63 |
Correct |
4 ms |
12892 KB |
Output is correct |
64 |
Correct |
4 ms |
12892 KB |
Output is correct |
65 |
Correct |
27 ms |
26964 KB |
Output is correct |
66 |
Correct |
37 ms |
33732 KB |
Output is correct |
67 |
Correct |
43 ms |
33388 KB |
Output is correct |
68 |
Correct |
38 ms |
34132 KB |
Output is correct |
69 |
Correct |
11 ms |
17756 KB |
Output is correct |
70 |
Correct |
15 ms |
20060 KB |
Output is correct |
71 |
Correct |
15 ms |
20316 KB |
Output is correct |
72 |
Correct |
16 ms |
20328 KB |
Output is correct |
73 |
Correct |
17 ms |
21340 KB |
Output is correct |
74 |
Correct |
17 ms |
21164 KB |
Output is correct |
75 |
Correct |
17 ms |
21340 KB |
Output is correct |
76 |
Correct |
17 ms |
21220 KB |
Output is correct |
77 |
Correct |
63 ms |
41428 KB |
Output is correct |
78 |
Correct |
67 ms |
50368 KB |
Output is correct |
79 |
Correct |
91 ms |
65708 KB |
Output is correct |
80 |
Correct |
82 ms |
61316 KB |
Output is correct |
81 |
Correct |
96 ms |
67920 KB |
Output is correct |
82 |
Correct |
100 ms |
66936 KB |
Output is correct |
83 |
Correct |
90 ms |
67412 KB |
Output is correct |
84 |
Correct |
69 ms |
52308 KB |
Output is correct |
85 |
Correct |
21 ms |
24156 KB |
Output is correct |
86 |
Correct |
30 ms |
29268 KB |
Output is correct |
87 |
Correct |
30 ms |
29524 KB |
Output is correct |
88 |
Correct |
29 ms |
29532 KB |
Output is correct |
89 |
Correct |
37 ms |
31828 KB |
Output is correct |
90 |
Correct |
33 ms |
31836 KB |
Output is correct |
91 |
Correct |
32 ms |
31960 KB |
Output is correct |
92 |
Correct |
38 ms |
31908 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
12636 KB |
Output is correct |
2 |
Correct |
4 ms |
12636 KB |
Output is correct |
3 |
Correct |
3 ms |
12636 KB |
Output is correct |
4 |
Correct |
3 ms |
12636 KB |
Output is correct |
5 |
Correct |
3 ms |
12636 KB |
Output is correct |
6 |
Correct |
4 ms |
12636 KB |
Output is correct |
7 |
Correct |
4 ms |
12636 KB |
Output is correct |
8 |
Correct |
4 ms |
12588 KB |
Output is correct |
9 |
Correct |
3 ms |
12636 KB |
Output is correct |
10 |
Correct |
3 ms |
12636 KB |
Output is correct |
11 |
Correct |
3 ms |
12636 KB |
Output is correct |
12 |
Correct |
3 ms |
12528 KB |
Output is correct |
13 |
Correct |
3 ms |
12652 KB |
Output is correct |
14 |
Correct |
3 ms |
12888 KB |
Output is correct |
15 |
Correct |
3 ms |
12636 KB |
Output is correct |
16 |
Correct |
3 ms |
12632 KB |
Output is correct |
17 |
Correct |
3 ms |
12632 KB |
Output is correct |
18 |
Correct |
4 ms |
12636 KB |
Output is correct |
19 |
Correct |
3 ms |
12636 KB |
Output is correct |
20 |
Correct |
3 ms |
12676 KB |
Output is correct |
21 |
Correct |
4 ms |
12636 KB |
Output is correct |
22 |
Correct |
3 ms |
12636 KB |
Output is correct |
23 |
Correct |
3 ms |
12636 KB |
Output is correct |
24 |
Correct |
3 ms |
12636 KB |
Output is correct |
25 |
Correct |
4 ms |
12636 KB |
Output is correct |
26 |
Correct |
4 ms |
12636 KB |
Output is correct |
27 |
Correct |
3 ms |
12632 KB |
Output is correct |
28 |
Correct |
3 ms |
12636 KB |
Output is correct |
29 |
Correct |
3 ms |
12636 KB |
Output is correct |
30 |
Correct |
4 ms |
12632 KB |
Output is correct |
31 |
Correct |
3 ms |
12632 KB |
Output is correct |
32 |
Correct |
3 ms |
12636 KB |
Output is correct |
33 |
Correct |
3 ms |
12636 KB |
Output is correct |
34 |
Correct |
4 ms |
12636 KB |
Output is correct |
35 |
Correct |
4 ms |
12636 KB |
Output is correct |
36 |
Correct |
4 ms |
12836 KB |
Output is correct |
37 |
Correct |
4 ms |
12636 KB |
Output is correct |
38 |
Correct |
3 ms |
12636 KB |
Output is correct |
39 |
Correct |
4 ms |
12636 KB |
Output is correct |
40 |
Correct |
3 ms |
12636 KB |
Output is correct |
41 |
Correct |
3 ms |
12636 KB |
Output is correct |
42 |
Correct |
4 ms |
12892 KB |
Output is correct |
43 |
Correct |
4 ms |
12892 KB |
Output is correct |
44 |
Correct |
4 ms |
12892 KB |
Output is correct |
45 |
Correct |
4 ms |
12888 KB |
Output is correct |
46 |
Correct |
4 ms |
12888 KB |
Output is correct |
47 |
Correct |
3 ms |
12636 KB |
Output is correct |
48 |
Correct |
3 ms |
12636 KB |
Output is correct |
49 |
Correct |
4 ms |
12892 KB |
Output is correct |
50 |
Correct |
4 ms |
12892 KB |
Output is correct |
51 |
Correct |
3 ms |
12892 KB |
Output is correct |
52 |
Correct |
4 ms |
12636 KB |
Output is correct |
53 |
Correct |
4 ms |
12892 KB |
Output is correct |
54 |
Correct |
4 ms |
12892 KB |
Output is correct |
55 |
Correct |
4 ms |
12892 KB |
Output is correct |
56 |
Correct |
5 ms |
13148 KB |
Output is correct |
57 |
Correct |
4 ms |
13148 KB |
Output is correct |
58 |
Correct |
4 ms |
13148 KB |
Output is correct |
59 |
Correct |
4 ms |
12960 KB |
Output is correct |
60 |
Correct |
4 ms |
12888 KB |
Output is correct |
61 |
Correct |
4 ms |
12892 KB |
Output is correct |
62 |
Correct |
4 ms |
12892 KB |
Output is correct |
63 |
Correct |
4 ms |
12892 KB |
Output is correct |
64 |
Correct |
4 ms |
12892 KB |
Output is correct |
65 |
Correct |
27 ms |
26964 KB |
Output is correct |
66 |
Correct |
37 ms |
33732 KB |
Output is correct |
67 |
Correct |
43 ms |
33388 KB |
Output is correct |
68 |
Correct |
38 ms |
34132 KB |
Output is correct |
69 |
Correct |
11 ms |
17756 KB |
Output is correct |
70 |
Correct |
15 ms |
20060 KB |
Output is correct |
71 |
Correct |
15 ms |
20316 KB |
Output is correct |
72 |
Correct |
16 ms |
20328 KB |
Output is correct |
73 |
Correct |
17 ms |
21340 KB |
Output is correct |
74 |
Correct |
17 ms |
21164 KB |
Output is correct |
75 |
Correct |
17 ms |
21340 KB |
Output is correct |
76 |
Correct |
17 ms |
21220 KB |
Output is correct |
77 |
Correct |
63 ms |
41428 KB |
Output is correct |
78 |
Correct |
67 ms |
50368 KB |
Output is correct |
79 |
Correct |
91 ms |
65708 KB |
Output is correct |
80 |
Correct |
82 ms |
61316 KB |
Output is correct |
81 |
Correct |
96 ms |
67920 KB |
Output is correct |
82 |
Correct |
100 ms |
66936 KB |
Output is correct |
83 |
Correct |
90 ms |
67412 KB |
Output is correct |
84 |
Correct |
69 ms |
52308 KB |
Output is correct |
85 |
Correct |
21 ms |
24156 KB |
Output is correct |
86 |
Correct |
30 ms |
29268 KB |
Output is correct |
87 |
Correct |
30 ms |
29524 KB |
Output is correct |
88 |
Correct |
29 ms |
29532 KB |
Output is correct |
89 |
Correct |
37 ms |
31828 KB |
Output is correct |
90 |
Correct |
33 ms |
31836 KB |
Output is correct |
91 |
Correct |
32 ms |
31960 KB |
Output is correct |
92 |
Correct |
38 ms |
31908 KB |
Output is correct |
93 |
Correct |
350 ms |
196692 KB |
Output is correct |
94 |
Correct |
140 ms |
64424 KB |
Output is correct |
95 |
Correct |
49 ms |
31820 KB |
Output is correct |
96 |
Correct |
398 ms |
224340 KB |
Output is correct |
97 |
Correct |
393 ms |
220352 KB |
Output is correct |
98 |
Correct |
341 ms |
191460 KB |
Output is correct |
99 |
Correct |
80 ms |
49752 KB |
Output is correct |
100 |
Correct |
135 ms |
84124 KB |
Output is correct |
101 |
Correct |
205 ms |
127316 KB |
Output is correct |
102 |
Correct |
234 ms |
144976 KB |
Output is correct |
103 |
Correct |
18 ms |
16732 KB |
Output is correct |
104 |
Correct |
21 ms |
19864 KB |
Output is correct |
105 |
Correct |
67 ms |
44116 KB |
Output is correct |
106 |
Correct |
289 ms |
163476 KB |
Output is correct |
107 |
Correct |
27 ms |
20828 KB |
Output is correct |
108 |
Correct |
157 ms |
80468 KB |
Output is correct |
109 |
Correct |
707 ms |
343152 KB |
Output is correct |
110 |
Correct |
1652 ms |
831128 KB |
Output is correct |
111 |
Correct |
287 ms |
153948 KB |
Output is correct |
112 |
Correct |
230 ms |
143168 KB |
Output is correct |
113 |
Correct |
232 ms |
142296 KB |
Output is correct |
114 |
Correct |
57 ms |
38144 KB |
Output is correct |
115 |
Correct |
71 ms |
50000 KB |
Output is correct |
116 |
Correct |
68 ms |
49932 KB |
Output is correct |
117 |
Correct |
66 ms |
50004 KB |
Output is correct |
118 |
Correct |
73 ms |
55264 KB |
Output is correct |
119 |
Correct |
78 ms |
55376 KB |
Output is correct |
120 |
Correct |
78 ms |
55636 KB |
Output is correct |
121 |
Correct |
78 ms |
55628 KB |
Output is correct |
122 |
Correct |
440 ms |
227560 KB |
Output is correct |
123 |
Correct |
613 ms |
348076 KB |
Output is correct |
124 |
Correct |
611 ms |
355512 KB |
Output is correct |
125 |
Correct |
588 ms |
346304 KB |
Output is correct |
126 |
Correct |
549 ms |
320828 KB |
Output is correct |
127 |
Correct |
395 ms |
237204 KB |
Output is correct |
128 |
Correct |
284 ms |
166596 KB |
Output is correct |
129 |
Correct |
199 ms |
111424 KB |
Output is correct |
130 |
Correct |
84 ms |
53632 KB |
Output is correct |
131 |
Correct |
107 ms |
69032 KB |
Output is correct |
132 |
Correct |
161 ms |
95700 KB |
Output is correct |
133 |
Correct |
158 ms |
95772 KB |
Output is correct |
134 |
Correct |
147 ms |
95824 KB |
Output is correct |
135 |
Correct |
182 ms |
107604 KB |
Output is correct |
136 |
Correct |
181 ms |
108176 KB |
Output is correct |
137 |
Correct |
186 ms |
109148 KB |
Output is correct |
138 |
Correct |
181 ms |
108652 KB |
Output is correct |
139 |
Correct |
191 ms |
112736 KB |
Output is correct |
140 |
Correct |
194 ms |
113024 KB |
Output is correct |
141 |
Correct |
194 ms |
113280 KB |
Output is correct |
142 |
Correct |
1489 ms |
818100 KB |
Output is correct |
143 |
Correct |
1485 ms |
841124 KB |
Output is correct |
144 |
Correct |
1137 ms |
658472 KB |
Output is correct |
145 |
Correct |
901 ms |
521492 KB |
Output is correct |
146 |
Correct |
492 ms |
285520 KB |
Output is correct |
147 |
Correct |
194 ms |
99356 KB |
Output is correct |
148 |
Correct |
1390 ms |
796072 KB |
Output is correct |
149 |
Correct |
1413 ms |
828076 KB |
Output is correct |
150 |
Correct |
1565 ms |
906812 KB |
Output is correct |
151 |
Correct |
317 ms |
179284 KB |
Output is correct |
152 |
Correct |
364 ms |
187164 KB |
Output is correct |
153 |
Correct |
401 ms |
224432 KB |
Output is correct |
154 |
Correct |
419 ms |
224480 KB |
Output is correct |
155 |
Correct |
420 ms |
225744 KB |
Output is correct |
156 |
Correct |
416 ms |
225760 KB |
Output is correct |
157 |
Correct |
417 ms |
225620 KB |
Output is correct |
158 |
Correct |
431 ms |
226900 KB |
Output is correct |
159 |
Correct |
420 ms |
235448 KB |
Output is correct |
160 |
Correct |
443 ms |
237144 KB |
Output is correct |
161 |
Correct |
428 ms |
236948 KB |
Output is correct |
162 |
Correct |
426 ms |
237336 KB |
Output is correct |
163 |
Correct |
451 ms |
237744 KB |
Output is correct |
164 |
Correct |
445 ms |
238032 KB |
Output is correct |
165 |
Correct |
449 ms |
239416 KB |
Output is correct |
166 |
Correct |
460 ms |
240068 KB |
Output is correct |
167 |
Correct |
442 ms |
238156 KB |
Output is correct |