Submission #583830

# Submission time Handle Problem Language Result Execution time Memory
583830 2022-06-26T09:13:07 Z codebuster_10 Amusement Park (CEOI19_amusementpark) C++17
100 / 100
2171 ms 5628 KB
#include <bits/stdc++.h>
// #define int int64_t //be careful about this 

using namespace std;

#define vt vector 
#define ar array 
#define pr pair 

#define f first 
#define s second

#define pb push_back
#define eb emplace_back

#define fr(i,a,b) for(int i = (a); i < (b); ++i)
#define rf(i,a,b) for(int i = (b)-1; i >= (a); --i)
#define all(x) x.begin(),x.end()
#define mem(a,b) memset(a,b,sizeof(a))

namespace IN{
  template<class T> void re(vector<T> &A);
  template<class S,class T> void re(pair<S,T> &A);
  template<class T,size_t N> void re(array<T,N> &A);

  template<class T> void re(T& x){ 
    cin >> x;}
  template<class H, class... T> void re(H& h, T&... t){ 
    re(h); re(t...);}

  template<class T> void re(vector<T> &A){ 
    for(auto& x : A) re(x);}
  template<class S,class T> void re(pair<S,T> &A){ 
      re(A.first); re(A.second);}
  template<class T,size_t N> void re(array<T,N> &A){
    for(int i = 0; i < N; ++i)  re(A[i]);}
}

namespace OUT{
  template<class T>
  void __p(const T& a){ cout<<a; }
  template<class T, class F>
  void __p(const pair<T, F>& a){ cout<<"{"; __p(a.first); cout<<","; __p(a.second); cout<<"}\n"; }
  template<class T, size_t N>
  void __p(const array<T,N>& a){ cout<<"{"; for(int i=0;i<N;++i)__p(a[i]),cout<<",}\n"[i+1==N]; }
  template<class T>
  void __p(const vector<T>& a){
    cout<<"{";for(auto it=a.begin();it<a.end();it++)__p(*it),cout<<",}\n"[it+1==a.end()]; }
  template<class T, class ...Arg>
  void __p(T a1, Arg ...a){__p(a1); __p(a...); }
  template<class Arg1>
  void __f(const char *s, Arg1 &&arg1){ cout<<s<<" : "; __p(arg1); cout<<endl; }
  template<class Arg1, class ... Args>
  void __f(const char *ss, Arg1 &&arg1, Args &&... args){
    int b=0,i=0; do{ if(ss[i]=='(') b++; if(ss[i]==')') b--; i++;}while(!(ss[i]==','&&b==0));
    const char *comma=ss+i; cout.write(ss,comma-ss)<<" : ";__p(arg1);cout<<" | ";__f(comma+1,args...);}
  #define trace(...) cout<<"Line:"<<__LINE__<<"  ", __f(#__VA_ARGS__, __VA_ARGS__)
}


namespace FUNC{
  void IO(string s = ""){
    ios_base::sync_with_stdio(NULL); 
    cin.tie(nullptr); 
    cout.precision(20); 
    cout << fixed;
    if(!s.empty()){
      freopen((s+".in").c_str(),"r",stdin);
      freopen((s+".out").c_str(),"w",stdout);
    }
  }

  const auto start_time = chrono::high_resolution_clock::now();
  void output_run_time(){
    // will work for ac,cc&&cf.
#ifndef ONLINE_JUDGE
    auto end_time = chrono::high_resolution_clock::now();
    chrono::duration<double> diff = end_time-start_time;
      cout << "\n\n\nTime Taken : " << diff.count();
#endif
  }

  template<class T> bool ckmin(T& a, const T& b){ 
    return b < a ? a = b, true : false; }
    
  template<class T> bool ckmax(T& a, const T& b){ 
    return a < b ? a = b, true : false; }

  mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
  int my_rand(int L, int R){ 
    return uniform_int_distribution<int>(L,R)(rng); }
  
  template<class T> int sz(const T& x){ 
    return int(x.size()); }

  template<class T> int lb(const vector<T>& vec,const T& val){
    return int(lower_bound(vec.begin(), vec.end(),val) - vec.begin()); }

  template<class T> int ub(const vector<T>& vec,const T& val){
    return int(upper_bound(vec.begin(), vec.end(),val) - vec.begin()); }

  constexpr int  dx[4] = {1,0,-1,0};
  constexpr int  dy[4] = {0,1,0,-1};
  constexpr char dr[4] = {'D','R','U','L'};

  constexpr long long INFLL1 = 1e16, INFLL2 = 9e18;
  constexpr int INF = 2e9;

  template<class T>
  vector<T> V(int n,T val){
    return vector<T> (n,val);
  }

  template<class T>
  vector<vector<T>> V(int n,int m,T val){
    return vector<vector<T>> (n,vector<T> (m,val));
  }

  template<class T>
  vector<vector<vector<T>>> V(int n,int m,int k,T val){
    return vector<vector<vector<T>>> (n,vector<vector<T>> (m,vector<T> (k,val)));
  }
}


using namespace IN;
using namespace OUT;
using namespace FUNC;





















template<const unsigned &MOD>
struct _m_uint {
  unsigned val;
 
  _m_uint(int64_t v = 0){
    if(v < 0) v = v % MOD + MOD;
    if(v >= MOD) v %= MOD;
    val = unsigned(v);
  }
 
  _m_uint(uint64_t v){
    if(v >= MOD) v %= MOD;
    val = unsigned(v);
  }
 
  _m_uint(int v) : _m_uint(int64_t(v)) {}
  _m_uint(unsigned v) : _m_uint(uint64_t(v)) {}
 
  explicit operator unsigned() const { return val; }
  explicit operator int64_t() const { return val; }
  explicit operator uint64_t() const { return val; }
  explicit operator double() const { return val; }
  explicit operator long double() const { return val; }
 
  _m_uint& operator+=(const _m_uint &other){
    val = val < MOD - other.val ? val + other.val : val - (MOD - other.val);
    return *this;
  }
 
  _m_uint& operator-=(const _m_uint &other){
    val = val < other.val ? val + (MOD - other.val) : val - other.val;
    return *this;
  }
 
  static unsigned fast_mod(uint64_t x, unsigned m = MOD){
    return unsigned(x % m);
  }
 
  _m_uint& operator*=(const _m_uint &other){
    val = fast_mod(uint64_t(val) * other.val);
    return *this;
  }
 
  _m_uint& operator/=(const _m_uint &other){
    return *this *= other.inv();
  }
 
  friend _m_uint operator+(const _m_uint &a, const _m_uint &b){ return _m_uint(a) += b; }
  friend _m_uint operator-(const _m_uint &a, const _m_uint &b){ return _m_uint(a) -= b; }
  friend _m_uint operator*(const _m_uint &a, const _m_uint &b){ return _m_uint(a) *= b; }
  friend _m_uint operator/(const _m_uint &a, const _m_uint &b){ return _m_uint(a) /= b; }
 
  _m_uint& operator++(){
    val = val == MOD - 1 ? 0 : val + 1;
    return *this;
  }
 
  _m_uint& operator--(){
    val = val == 0 ? MOD - 1 : val - 1;
    return *this;
  }
    
  _m_uint operator++(int){ _m_uint before = *this; ++*this; return before; }
  _m_uint operator--(int){ _m_uint before = *this; --*this; return before; }
      
  _m_uint operator-() const {
    return val == 0 ? 0 : MOD - val;
  }
 
  friend bool operator==(const _m_uint &a, const _m_uint &b) { return a.val == b.val; }
  friend bool operator!=(const _m_uint &a, const _m_uint &b) { return a.val != b.val; }
  friend bool operator<(const _m_uint &a, const _m_uint &b) { return a.val < b.val; }
  friend bool operator>(const _m_uint &a, const _m_uint &b) { return a.val > b.val; }
  friend bool operator<=(const _m_uint &a, const _m_uint &b) { return a.val <= b.val; }
  friend bool operator>=(const _m_uint &a, const _m_uint &b) { return a.val >= b.val; }
 
  static const int SAVE_INV = int(1e6) + 5;
  static _m_uint save_inv[SAVE_INV];
 
  static void prepare_inv(){
    // Make sure MOD is prime, which is necessary for the inverse algorithm below.
    for(int64_t p = 2; p * p <= MOD; p += p % 2 + 1){
      assert(MOD % p != 0);
    } 
      
    save_inv[0] = 0;
    save_inv[1] = 1;
 
    for (int i = 2; i < SAVE_INV; i++){
      save_inv[i] = save_inv[MOD % i] * (MOD - MOD / i);
    }
  }
 
  _m_uint inv() const {
    if(save_inv[1] == 0)  
      prepare_inv();
 
    if(val < SAVE_INV)  
      return save_inv[val];
 
    _m_uint product = 1;
    unsigned v = val;
 
    while(v >= SAVE_INV){
      product *= MOD - MOD / v;
      v = MOD % v;
    }
    return product * save_inv[v];
  }
 
  _m_uint pow(int64_t p) const {
    if(p < 0)  
      return inv().pow(-p);
    _m_uint a = *this, result = 1;
    while(p > 0){
      if(p & 1) 
        result *= a;
      p >>= 1;
      if(p > 0) 
        a *= a;
    }
    return result;
  }
 
  friend ostream& operator<<(ostream &os, const _m_uint &m){
    return os << m.val;
  }
};
 
template<const unsigned &MOD> _m_uint<MOD> _m_uint<MOD>::save_inv[_m_uint<MOD>::SAVE_INV];

const unsigned MOD = 998244353;
using mint = _m_uint<MOD>;

constexpr int N = 18;

bool e[N][N], is[1<<N];
mint dp[1<<N];

signed main(){
  IO();
    
  int n,m;
  re(n,m);

  fr(_,0,m){
    int u,v; re(u,v); --u,--v;
    e[u][v] = e[v][u] = true;
  }

  is[0] = true;
  fr(mask,1,1<<n){
    if(is[mask & (mask - 1)]){
      is[mask] = true;
      int lsb = __builtin_ctz(mask);
      fr(i,0,n){
        if((mask>>i&1) && e[lsb][i]){
          is[mask] = false; 
        }
      }
    }
  }

  dp[0] = 1;

  fr(mask,1,1<<n){
    for(int submask = mask; submask > 0; submask = (submask - 1) & mask){
      if(is[submask]){
        dp[mask] += (__builtin_popcount(submask)%2 == 1 ? 1 : -1) * dp[mask^submask];
      }
    }
  }

  cout << m * dp[(1<<n)-1] / mint(2);







  //output_run_time();
  return 0;
}

















Compilation message

amusementpark.cpp: In function 'void FUNC::IO(std::string)':
amusementpark.cpp:68:14: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   68 |       freopen((s+".in").c_str(),"r",stdin);
      |       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
amusementpark.cpp:69:14: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   69 |       freopen((s+".out").c_str(),"w",stdout);
      |       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 9 ms 5204 KB Output is correct
2 Correct 10 ms 5332 KB Output is correct
3 Correct 10 ms 5204 KB Output is correct
4 Correct 11 ms 5204 KB Output is correct
5 Correct 9 ms 5204 KB Output is correct
6 Correct 10 ms 5204 KB Output is correct
7 Correct 10 ms 5268 KB Output is correct
8 Correct 10 ms 5268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 5204 KB Output is correct
2 Correct 10 ms 5332 KB Output is correct
3 Correct 10 ms 5204 KB Output is correct
4 Correct 11 ms 5204 KB Output is correct
5 Correct 9 ms 5204 KB Output is correct
6 Correct 10 ms 5204 KB Output is correct
7 Correct 10 ms 5268 KB Output is correct
8 Correct 10 ms 5268 KB Output is correct
9 Correct 10 ms 5264 KB Output is correct
10 Correct 11 ms 5204 KB Output is correct
11 Correct 11 ms 5204 KB Output is correct
12 Correct 10 ms 5264 KB Output is correct
13 Correct 10 ms 5272 KB Output is correct
14 Correct 11 ms 5264 KB Output is correct
15 Correct 10 ms 5276 KB Output is correct
16 Correct 11 ms 5276 KB Output is correct
17 Correct 10 ms 5264 KB Output is correct
18 Correct 9 ms 5204 KB Output is correct
19 Correct 11 ms 5264 KB Output is correct
20 Correct 10 ms 5276 KB Output is correct
21 Correct 11 ms 5204 KB Output is correct
22 Correct 10 ms 5264 KB Output is correct
23 Correct 10 ms 5204 KB Output is correct
24 Correct 10 ms 5264 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 5204 KB Output is correct
2 Correct 10 ms 5332 KB Output is correct
3 Correct 10 ms 5204 KB Output is correct
4 Correct 11 ms 5204 KB Output is correct
5 Correct 9 ms 5204 KB Output is correct
6 Correct 10 ms 5204 KB Output is correct
7 Correct 10 ms 5268 KB Output is correct
8 Correct 10 ms 5268 KB Output is correct
9 Correct 10 ms 5264 KB Output is correct
10 Correct 11 ms 5204 KB Output is correct
11 Correct 11 ms 5204 KB Output is correct
12 Correct 10 ms 5264 KB Output is correct
13 Correct 10 ms 5272 KB Output is correct
14 Correct 11 ms 5264 KB Output is correct
15 Correct 10 ms 5276 KB Output is correct
16 Correct 11 ms 5276 KB Output is correct
17 Correct 10 ms 5264 KB Output is correct
18 Correct 9 ms 5204 KB Output is correct
19 Correct 11 ms 5264 KB Output is correct
20 Correct 10 ms 5276 KB Output is correct
21 Correct 11 ms 5204 KB Output is correct
22 Correct 10 ms 5264 KB Output is correct
23 Correct 10 ms 5204 KB Output is correct
24 Correct 10 ms 5264 KB Output is correct
25 Correct 9 ms 5268 KB Output is correct
26 Correct 9 ms 5272 KB Output is correct
27 Correct 10 ms 5268 KB Output is correct
28 Correct 9 ms 5204 KB Output is correct
29 Correct 11 ms 5264 KB Output is correct
30 Correct 9 ms 5264 KB Output is correct
31 Correct 10 ms 5204 KB Output is correct
32 Correct 10 ms 5264 KB Output is correct
33 Correct 10 ms 5264 KB Output is correct
34 Correct 10 ms 5268 KB Output is correct
35 Correct 10 ms 5180 KB Output is correct
36 Correct 11 ms 5332 KB Output is correct
37 Correct 10 ms 5272 KB Output is correct
38 Correct 9 ms 5260 KB Output is correct
39 Correct 10 ms 5264 KB Output is correct
40 Correct 10 ms 5272 KB Output is correct
41 Correct 9 ms 5264 KB Output is correct
42 Correct 9 ms 5204 KB Output is correct
43 Correct 9 ms 5268 KB Output is correct
44 Correct 10 ms 5204 KB Output is correct
45 Correct 10 ms 5204 KB Output is correct
46 Correct 12 ms 5264 KB Output is correct
47 Correct 9 ms 5268 KB Output is correct
48 Correct 10 ms 5268 KB Output is correct
49 Correct 9 ms 5204 KB Output is correct
50 Correct 10 ms 5204 KB Output is correct
51 Correct 10 ms 5276 KB Output is correct
52 Correct 9 ms 5204 KB Output is correct
53 Correct 10 ms 5204 KB Output is correct
54 Correct 10 ms 5272 KB Output is correct
55 Correct 10 ms 5204 KB Output is correct
56 Correct 10 ms 5204 KB Output is correct
57 Correct 9 ms 5272 KB Output is correct
58 Correct 10 ms 5272 KB Output is correct
59 Correct 10 ms 5204 KB Output is correct
60 Correct 10 ms 5204 KB Output is correct
61 Correct 10 ms 5268 KB Output is correct
62 Correct 9 ms 5204 KB Output is correct
63 Correct 10 ms 5272 KB Output is correct
64 Correct 10 ms 5204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 5204 KB Output is correct
2 Correct 10 ms 5332 KB Output is correct
3 Correct 10 ms 5204 KB Output is correct
4 Correct 11 ms 5204 KB Output is correct
5 Correct 9 ms 5204 KB Output is correct
6 Correct 10 ms 5204 KB Output is correct
7 Correct 10 ms 5268 KB Output is correct
8 Correct 10 ms 5268 KB Output is correct
9 Correct 10 ms 5264 KB Output is correct
10 Correct 11 ms 5204 KB Output is correct
11 Correct 11 ms 5204 KB Output is correct
12 Correct 10 ms 5264 KB Output is correct
13 Correct 10 ms 5272 KB Output is correct
14 Correct 11 ms 5264 KB Output is correct
15 Correct 10 ms 5276 KB Output is correct
16 Correct 11 ms 5276 KB Output is correct
17 Correct 10 ms 5264 KB Output is correct
18 Correct 9 ms 5204 KB Output is correct
19 Correct 11 ms 5264 KB Output is correct
20 Correct 10 ms 5276 KB Output is correct
21 Correct 11 ms 5204 KB Output is correct
22 Correct 10 ms 5264 KB Output is correct
23 Correct 10 ms 5204 KB Output is correct
24 Correct 10 ms 5264 KB Output is correct
25 Correct 9 ms 5268 KB Output is correct
26 Correct 9 ms 5272 KB Output is correct
27 Correct 10 ms 5268 KB Output is correct
28 Correct 9 ms 5204 KB Output is correct
29 Correct 11 ms 5264 KB Output is correct
30 Correct 9 ms 5264 KB Output is correct
31 Correct 10 ms 5204 KB Output is correct
32 Correct 10 ms 5264 KB Output is correct
33 Correct 10 ms 5264 KB Output is correct
34 Correct 10 ms 5268 KB Output is correct
35 Correct 10 ms 5180 KB Output is correct
36 Correct 11 ms 5332 KB Output is correct
37 Correct 10 ms 5272 KB Output is correct
38 Correct 9 ms 5260 KB Output is correct
39 Correct 10 ms 5264 KB Output is correct
40 Correct 10 ms 5272 KB Output is correct
41 Correct 9 ms 5264 KB Output is correct
42 Correct 9 ms 5204 KB Output is correct
43 Correct 9 ms 5268 KB Output is correct
44 Correct 10 ms 5204 KB Output is correct
45 Correct 10 ms 5204 KB Output is correct
46 Correct 12 ms 5264 KB Output is correct
47 Correct 9 ms 5268 KB Output is correct
48 Correct 10 ms 5268 KB Output is correct
49 Correct 9 ms 5204 KB Output is correct
50 Correct 10 ms 5204 KB Output is correct
51 Correct 10 ms 5276 KB Output is correct
52 Correct 9 ms 5204 KB Output is correct
53 Correct 10 ms 5204 KB Output is correct
54 Correct 10 ms 5272 KB Output is correct
55 Correct 10 ms 5204 KB Output is correct
56 Correct 10 ms 5204 KB Output is correct
57 Correct 9 ms 5272 KB Output is correct
58 Correct 10 ms 5272 KB Output is correct
59 Correct 10 ms 5204 KB Output is correct
60 Correct 10 ms 5204 KB Output is correct
61 Correct 10 ms 5268 KB Output is correct
62 Correct 9 ms 5204 KB Output is correct
63 Correct 10 ms 5272 KB Output is correct
64 Correct 10 ms 5204 KB Output is correct
65 Correct 23 ms 5288 KB Output is correct
66 Correct 23 ms 5268 KB Output is correct
67 Correct 20 ms 5204 KB Output is correct
68 Correct 18 ms 5204 KB Output is correct
69 Correct 28 ms 5204 KB Output is correct
70 Correct 23 ms 5204 KB Output is correct
71 Correct 24 ms 5204 KB Output is correct
72 Correct 24 ms 5204 KB Output is correct
73 Correct 23 ms 5204 KB Output is correct
74 Correct 22 ms 5204 KB Output is correct
75 Correct 24 ms 5284 KB Output is correct
76 Correct 21 ms 5204 KB Output is correct
77 Correct 43 ms 5288 KB Output is correct
78 Correct 40 ms 5276 KB Output is correct
79 Correct 38 ms 5204 KB Output is correct
80 Correct 38 ms 5288 KB Output is correct
81 Correct 35 ms 5280 KB Output is correct
82 Correct 41 ms 5204 KB Output is correct
83 Correct 32 ms 5296 KB Output is correct
84 Correct 30 ms 5288 KB Output is correct
85 Correct 68 ms 5204 KB Output is correct
86 Correct 52 ms 5284 KB Output is correct
87 Correct 57 ms 5272 KB Output is correct
88 Correct 58 ms 5204 KB Output is correct
89 Correct 42 ms 5204 KB Output is correct
90 Correct 45 ms 5268 KB Output is correct
91 Correct 47 ms 5280 KB Output is correct
92 Correct 48 ms 5268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 5204 KB Output is correct
2 Correct 10 ms 5332 KB Output is correct
3 Correct 10 ms 5204 KB Output is correct
4 Correct 11 ms 5204 KB Output is correct
5 Correct 9 ms 5204 KB Output is correct
6 Correct 10 ms 5204 KB Output is correct
7 Correct 10 ms 5268 KB Output is correct
8 Correct 10 ms 5268 KB Output is correct
9 Correct 10 ms 5264 KB Output is correct
10 Correct 11 ms 5204 KB Output is correct
11 Correct 11 ms 5204 KB Output is correct
12 Correct 10 ms 5264 KB Output is correct
13 Correct 10 ms 5272 KB Output is correct
14 Correct 11 ms 5264 KB Output is correct
15 Correct 10 ms 5276 KB Output is correct
16 Correct 11 ms 5276 KB Output is correct
17 Correct 10 ms 5264 KB Output is correct
18 Correct 9 ms 5204 KB Output is correct
19 Correct 11 ms 5264 KB Output is correct
20 Correct 10 ms 5276 KB Output is correct
21 Correct 11 ms 5204 KB Output is correct
22 Correct 10 ms 5264 KB Output is correct
23 Correct 10 ms 5204 KB Output is correct
24 Correct 10 ms 5264 KB Output is correct
25 Correct 9 ms 5268 KB Output is correct
26 Correct 9 ms 5272 KB Output is correct
27 Correct 10 ms 5268 KB Output is correct
28 Correct 9 ms 5204 KB Output is correct
29 Correct 11 ms 5264 KB Output is correct
30 Correct 9 ms 5264 KB Output is correct
31 Correct 10 ms 5204 KB Output is correct
32 Correct 10 ms 5264 KB Output is correct
33 Correct 10 ms 5264 KB Output is correct
34 Correct 10 ms 5268 KB Output is correct
35 Correct 10 ms 5180 KB Output is correct
36 Correct 11 ms 5332 KB Output is correct
37 Correct 10 ms 5272 KB Output is correct
38 Correct 9 ms 5260 KB Output is correct
39 Correct 10 ms 5264 KB Output is correct
40 Correct 10 ms 5272 KB Output is correct
41 Correct 9 ms 5264 KB Output is correct
42 Correct 9 ms 5204 KB Output is correct
43 Correct 9 ms 5268 KB Output is correct
44 Correct 10 ms 5204 KB Output is correct
45 Correct 10 ms 5204 KB Output is correct
46 Correct 12 ms 5264 KB Output is correct
47 Correct 9 ms 5268 KB Output is correct
48 Correct 10 ms 5268 KB Output is correct
49 Correct 9 ms 5204 KB Output is correct
50 Correct 10 ms 5204 KB Output is correct
51 Correct 10 ms 5276 KB Output is correct
52 Correct 9 ms 5204 KB Output is correct
53 Correct 10 ms 5204 KB Output is correct
54 Correct 10 ms 5272 KB Output is correct
55 Correct 10 ms 5204 KB Output is correct
56 Correct 10 ms 5204 KB Output is correct
57 Correct 9 ms 5272 KB Output is correct
58 Correct 10 ms 5272 KB Output is correct
59 Correct 10 ms 5204 KB Output is correct
60 Correct 10 ms 5204 KB Output is correct
61 Correct 10 ms 5268 KB Output is correct
62 Correct 9 ms 5204 KB Output is correct
63 Correct 10 ms 5272 KB Output is correct
64 Correct 10 ms 5204 KB Output is correct
65 Correct 23 ms 5288 KB Output is correct
66 Correct 23 ms 5268 KB Output is correct
67 Correct 20 ms 5204 KB Output is correct
68 Correct 18 ms 5204 KB Output is correct
69 Correct 28 ms 5204 KB Output is correct
70 Correct 23 ms 5204 KB Output is correct
71 Correct 24 ms 5204 KB Output is correct
72 Correct 24 ms 5204 KB Output is correct
73 Correct 23 ms 5204 KB Output is correct
74 Correct 22 ms 5204 KB Output is correct
75 Correct 24 ms 5284 KB Output is correct
76 Correct 21 ms 5204 KB Output is correct
77 Correct 43 ms 5288 KB Output is correct
78 Correct 40 ms 5276 KB Output is correct
79 Correct 38 ms 5204 KB Output is correct
80 Correct 38 ms 5288 KB Output is correct
81 Correct 35 ms 5280 KB Output is correct
82 Correct 41 ms 5204 KB Output is correct
83 Correct 32 ms 5296 KB Output is correct
84 Correct 30 ms 5288 KB Output is correct
85 Correct 68 ms 5204 KB Output is correct
86 Correct 52 ms 5284 KB Output is correct
87 Correct 57 ms 5272 KB Output is correct
88 Correct 58 ms 5204 KB Output is correct
89 Correct 42 ms 5204 KB Output is correct
90 Correct 45 ms 5268 KB Output is correct
91 Correct 47 ms 5280 KB Output is correct
92 Correct 48 ms 5268 KB Output is correct
93 Correct 1222 ms 5628 KB Output is correct
94 Correct 1157 ms 5496 KB Output is correct
95 Correct 1191 ms 5500 KB Output is correct
96 Correct 901 ms 5504 KB Output is correct
97 Correct 905 ms 5496 KB Output is correct
98 Correct 1026 ms 5500 KB Output is correct
99 Correct 134 ms 5204 KB Output is correct
100 Correct 97 ms 5296 KB Output is correct
101 Correct 88 ms 5268 KB Output is correct
102 Correct 85 ms 5304 KB Output is correct
103 Correct 734 ms 5376 KB Output is correct
104 Correct 450 ms 5340 KB Output is correct
105 Correct 360 ms 5348 KB Output is correct
106 Correct 263 ms 5344 KB Output is correct
107 Correct 2171 ms 5508 KB Output is correct
108 Correct 982 ms 5500 KB Output is correct
109 Correct 791 ms 5404 KB Output is correct
110 Correct 638 ms 5384 KB Output is correct
111 Correct 87 ms 5204 KB Output is correct
112 Correct 86 ms 5288 KB Output is correct
113 Correct 68 ms 5204 KB Output is correct
114 Correct 188 ms 5388 KB Output is correct
115 Correct 144 ms 5320 KB Output is correct
116 Correct 149 ms 5288 KB Output is correct
117 Correct 141 ms 5284 KB Output is correct
118 Correct 110 ms 5204 KB Output is correct
119 Correct 117 ms 5204 KB Output is correct
120 Correct 115 ms 5204 KB Output is correct
121 Correct 121 ms 5284 KB Output is correct
122 Correct 260 ms 5332 KB Output is correct
123 Correct 211 ms 5272 KB Output is correct
124 Correct 212 ms 5332 KB Output is correct
125 Correct 201 ms 5264 KB Output is correct
126 Correct 182 ms 5332 KB Output is correct
127 Correct 175 ms 5332 KB Output is correct
128 Correct 183 ms 5332 KB Output is correct
129 Correct 165 ms 5308 KB Output is correct
130 Correct 161 ms 5248 KB Output is correct
131 Correct 539 ms 5372 KB Output is correct
132 Correct 394 ms 5376 KB Output is correct
133 Correct 399 ms 5332 KB Output is correct
134 Correct 470 ms 5204 KB Output is correct
135 Correct 305 ms 5380 KB Output is correct
136 Correct 314 ms 5268 KB Output is correct
137 Correct 323 ms 5308 KB Output is correct
138 Correct 328 ms 5332 KB Output is correct
139 Correct 260 ms 5452 KB Output is correct
140 Correct 289 ms 5368 KB Output is correct
141 Correct 260 ms 5312 KB Output is correct
142 Correct 571 ms 5376 KB Output is correct
143 Correct 566 ms 5368 KB Output is correct
144 Correct 483 ms 5380 KB Output is correct
145 Correct 473 ms 5360 KB Output is correct
146 Correct 473 ms 5344 KB Output is correct
147 Correct 463 ms 5336 KB Output is correct
148 Correct 577 ms 5372 KB Output is correct
149 Correct 591 ms 5344 KB Output is correct
150 Correct 591 ms 5392 KB Output is correct
151 Correct 726 ms 5348 KB Output is correct
152 Correct 748 ms 5352 KB Output is correct
153 Correct 884 ms 5580 KB Output is correct
154 Correct 981 ms 5500 KB Output is correct
155 Correct 982 ms 5396 KB Output is correct
156 Correct 953 ms 5336 KB Output is correct
157 Correct 894 ms 5392 KB Output is correct
158 Correct 940 ms 5352 KB Output is correct
159 Correct 747 ms 5504 KB Output is correct
160 Correct 732 ms 5352 KB Output is correct
161 Correct 766 ms 5452 KB Output is correct
162 Correct 755 ms 5504 KB Output is correct
163 Correct 644 ms 5400 KB Output is correct
164 Correct 631 ms 5352 KB Output is correct
165 Correct 640 ms 5332 KB Output is correct
166 Correct 659 ms 5332 KB Output is correct
167 Correct 678 ms 5332 KB Output is correct