problem_id stringlengths 6 6 | language stringclasses 2
values | original_status stringclasses 3
values | original_src stringlengths 19 243k | changed_src stringlengths 19 243k | change stringclasses 3
values | i1 int64 0 8.44k | i2 int64 0 8.44k | j1 int64 0 8.44k | j2 int64 0 8.44k | error stringclasses 270
values | stderr stringlengths 0 226k |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mod 1000000007
using namespace std;
typedef long long ll;
typedef vector<int> vi;
// typedef vector<l>vl ;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvl;
typedef pair<int, int> p... | #include <bits/stdc++.h>
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mod 1000000007
using namespace std;
typedef long long ll;
typedef vector<int> vi;
// typedef vector<l>vl ;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvl;
typedef pair<int, int> p... | replace | 44 | 45 | 44 | 45 | TLE | |
p03174 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0; i... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0; i... | replace | 34 | 36 | 34 | 35 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define forn(i, n) for (int i = 0; i < n; ++i)
ll MOD = 1e9 + 7;
ll INF = 1e17 + 9;
ll dp(int mask, int women, vector<vector<bool>> comp, int n,
vector<vector<ll>> save) {
if (mask == (1 << n) - 1)
return 1;
else if (women >= n)
retu... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define forn(i, n) for (int i = 0; i < n; ++i)
ll MOD = 1e9 + 7;
ll INF = 1e17 + 9;
ll dp(int mask, int women, vector<vector<bool>> &comp, int n,
vector<vector<ll>> &save) {
if (mask == (1 << n) - 1)
return 1;
else if (women >= n)
re... | replace | 7 | 9 | 7 | 9 | 0 | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
#define L "\n"
#define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c)... | #include <bits/stdc++.h>
#define L "\n"
#define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c)... | replace | 63 | 66 | 63 | 66 | -11 | |
p03174 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, x, n) for (int i = x; i < (int)(n); ++i)
const int N = 1e7, M = 7 + 1e9;
int n, t;
ll dp[21][N];
vector<int> v[21];
map<int, bool> sorryIhaveaboyfriend;
ll cal(int i, int taken) {
if (i == n)
return 1;
ll &ret = dp[i][taken];
if (... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, x, n) for (int i = x; i < (int)(n); ++i)
const int N = 1e7, M = 7 + 1e9;
int n, t;
ll dp[21][2097152]; // (1 << 21)-1 the maximum number for the mask
vector<int> v[21];
map<int, bool> sorryIhaveaboyfriend;
ll cal(int i, int taken) {
if (i... | replace | 6 | 7 | 6 | 7 | MLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
int a[21][21] = {0};
int state = pow(2, 21);
vector<vector<int>> dp(21, vector<int>(state, 0));
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) {
cin >> a[i][j];
}
}
for (int i = 0; i < N; ++i) {... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
int a[21][21] = {0};
int state = pow(2, 21);
vector<vector<int>> dp(21, vector<int>(state, 0));
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) {
cin >> a[i][j];
}
}
for (int i = 0; i < N; ++i) {... | replace | 28 | 32 | 28 | 32 | TLE | |
p03174 | C++ | Time Limit Exceeded | // KALAM
#include <bits/stdc++.h>
using namespace std;
const int N = 400 + 77, L = 22, Mod = 1000000007;
int n, dp[L][1 << L];
bool M[N][N];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i = 0; i < n; ++i)
for (int j = 0; j < n; ++j)
cin >> M[i][j];
for (int i = 0; i < (1 <<... | // KALAM
#include <bits/stdc++.h>
using namespace std;
const int N = 400 + 77, L = 22, Mod = 1000000007;
int n, dp[L][1 << L];
bool M[N][N];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i = 0; i < n; ++i)
for (int j = 0; j < n; ++j)
cin >> M[i][j];
for (int i = 0; i < (1 <<... | insert | 21 | 21 | 21 | 23 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using LL = long long;
using VL = vector<LL>;
using VVL = vector<VL>;
using PLL = pair<LL, LL>;
using VS = vector<string>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) (a).rbegin(), (a).rend... | #include <bits/stdc++.h>
using namespace std;
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using LL = long long;
using VL = vector<LL>;
using VVL = vector<VL>;
using PLL = pair<LL, LL>;
using VS = vector<string>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) (a).rbegin(), (a).rend... | replace | 73 | 74 | 73 | 74 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mod = 1e9 + 7;
int dp[1 << 21][21];
vector<int> a[21];
int DONE, n;
int solve(int bitmask, int ind) {
// base case
if (bitmask == DONE) {
return 1;
}
if (ind >= n)
return 0;
if (dp[bitmask][ind] != -1)
return dp[bitmask... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mod = 1e9 + 7;
int dp[1 << 21][21];
vector<int> a[21];
int DONE, n;
int solve(int bitmask, int ind) {
// base case
if (bitmask == DONE) {
return 1;
}
if (ind >= n)
return 0;
if (dp[bitmask][ind] != -1)
return dp[bitmask... | replace | 26 | 27 | 26 | 27 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define int long long
#define reps(i, s, n) for (int(i) = (s);... | #include <algorithm>
#include <bitset>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define int long long
#define reps(i, s, n) for (int(i) = (s);... | replace | 97 | 99 | 97 | 100 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define MOD 1000000007
using namespace std;
int a[22][22];
long long dp[22][2107152];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
cin >> a[i][j];
dp[0][0] = 1;
int nnn = 1 << n;... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define MOD 1000000007
using namespace std;
int a[22][22];
long long dp[22][2107152];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
cin >> a[i][j];
dp[0][0] = 1;
int nnn = 1 << n;... | insert | 22 | 22 | 22 | 24 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll dp[1000000];
ll arr[22][22];
ll n;
ll m = 1000000000 + 7;
ll solve(ll mask) {
ll j = __builtin_popcount(mask);
if (j == n)
return 1;
if (dp[mask] != -1)
return dp[mask];
ll ans = 0;
for (int i = 0; i < n; i++) {
if ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll dp[2097152];
ll arr[25][25];
ll n;
ll m = 1000000000 + 7;
ll solve(ll mask) {
ll j = __builtin_popcount(mask);
if (j == n)
return 1;
if (dp[mask] != -1)
return dp[mask];
ll ans = 0;
for (int i = 0; i < n; i++) {
if ... | replace | 6 | 8 | 6 | 8 | 0 | |
p03174 | C++ | Time Limit Exceeded | #pragma GCC optimize("O3")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <l... | #pragma GCC optimize("O3")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <l... | replace | 64 | 70 | 64 | 69 | TLE | |
p03174 | C++ | Runtime Error | // #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #include <x86intrin.h>
#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;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tr... | // #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #include <x86intrin.h>
#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;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tr... | replace | 47 | 48 | 47 | 48 | -11 | |
p03174 | C++ | Time Limit Exceeded | #pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <iostream>
#include <vector>
using namespace std;
int upbound;
const int MOD = 1000000007;
vector<int> g, dp;
inline int Solve(int x) {
if (x == 0)
return 1;
if (dp[x] != -1)
return dp[x];
int p = __builtin_popcount(x), r... | #pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <iostream>
#include <vector>
using namespace std;
int upbound;
const int MOD = 1000000007;
vector<int> g, dp;
inline int Solve(int x) {
if (x == 0)
return 1;
if (dp[x] != -1)
return dp[x];
int p = __builtin_popcount(x), r... | insert | 23 | 23 | 23 | 24 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long int // comment for large arrays
#define pll pair<int, int>
#define dbl long double
#define ff first
#define ss second
#define endl "\n"
#define mod 1000000007
#define eps 0.00000001
#define INF 10000000000000001
#define all(x) (x).begin(), (x).end()
#define LB(v, x) (lower... | #include <bits/stdc++.h>
#define int long long int // comment for large arrays
#define pll pair<int, int>
#define dbl long double
#define ff first
#define ss second
#define endl "\n"
#define mod 1000000007
#define eps 0.00000001
#define INF 10000000000000001
#define all(x) (x).begin(), (x).end()
#define LB(v, x) (lower... | replace | 46 | 55 | 46 | 52 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long
const int MAX_N = 22;
const int MOD = 1e9 + 7;
int to[MAX_N][MAX_N];
int dp[MAX_N][(1 << MAX_N)];
void modadd(int &a, int b) { a = (a + b) % MOD; }
signed main(void) {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long
const int MAX_N = 22;
const int MOD = 1e9 + 7;
int to[MAX_N][MAX_N];
int dp[MAX_N][(1 << MAX_N)];
void modadd(int &a, int b) { a = (a + b) % MOD; }
signed main(void) {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
... | insert | 36 | 36 | 36 | 49 | TLE | |
p03174 | C++ | Runtime Error | #pragma GCC optimize("-O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace std;
#define all(c) (c).begin(), (c).end()
#de... | #pragma GCC optimize("-O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace std;
#define all(c) (c).begin(), (c).end()
#de... | replace | 54 | 57 | 54 | 55 | -11 | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define md 1000000007
#define mx 1e18
#define pb push_back
#define endl '\n'
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define md 1000000007
#define mx 1e18
#define pb push_back
#define endl '\n'
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL... | replace | 16 | 21 | 16 | 21 | -11 | |
p03174 | C++ | Runtime Error |
/** Which of the favors of your Lord will you deny ? **/
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define PII pair<int, int>
#define PLL pair<LL, LL>
#define MP make_pair
#define F first
#define S second
#define ALL(x) (x).begin(), (x).end()
#define DBG(x) cerr << __LINE__ << " says: " << ... |
/** Which of the favors of your Lord will you deny ? **/
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define PII pair<int, int>
#define PLL pair<LL, LL>
#define MP make_pair
#define F first
#define S second
#define ALL(x) (x).begin(), (x).end()
#define DBG(x) cerr << __LINE__ << " says: " << ... | replace | 64 | 65 | 64 | 65 | 0 | |
p03174 | C++ | Runtime Error |
/** Which of the favors of your Lord will you deny ? **/
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define PII pair<int, int>
#define PLL pair<LL, LL>
#define MP make_pair
#define F first
#define S second
#define ALL(x) (x).begin(), (x).end()
#define DBG(x) cerr << __LINE__ << " says: " << ... |
/** Which of the favors of your Lord will you deny ? **/
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define PII pair<int, int>
#define PLL pair<LL, LL>
#define MP make_pair
#define F first
#define S second
#define ALL(x) (x).begin(), (x).end()
#define DBG(x) cerr << __LINE__ << " says: " << ... | replace | 70 | 71 | 70 | 71 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long ll;
static const int mod = 1000000007;
sta... | #include <algorithm>
#include <climits>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long ll;
static const int mod = 1000000007;
sta... | replace | 32 | 37 | 32 | 33 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fastio \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fastio \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | insert | 83 | 83 | 83 | 85 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<int, pair<int, int>> piii;
#define pb push_back
#define debug(x) cout << x << endl
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
#define PI acos(-1)
#define all(c) c.begin(), c.end()
#define SET(x, y) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<int, pair<int, int>> piii;
#define pb push_back
#define debug(x) cout << x << endl
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
#define PI acos(-1)
#define all(c) c.begin(), c.end()
#define SET(x, y) ... | insert | 32 | 32 | 32 | 34 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define LLINF 1000000000000000ll
#define sz(x) ((int)(x).size())
#define fi first
#define sec se... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define LLINF 1000000000000000ll
#define sz(x) ((int)(x).size())
#define fi first
#define sec se... | insert | 141 | 141 | 141 | 143 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
// #pragma GCC optimize ("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(fal... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
// #pragma GCC optimize ("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(fal... | replace | 95 | 96 | 95 | 96 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i)
#define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i)
#define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--)
#define rreps(i, n)... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i)
#define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i)
#define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--)
#define rreps(i, n)... | replace | 70 | 71 | 70 | 71 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | replace | 72 | 73 | 72 | 73 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define maxn 23
#define maxm (1 << 21) + 5
#define mod 1000000007
int dp[maxm] = {};
int main() {
int n;
int a[maxn][maxn];
scanf("%d", &n);
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
scanf("%d", &a[i][j]);
int M = (1 << n) - 1;
dp[0] = 1;... | #include <bits/stdc++.h>
using namespace std;
#define maxn 23
#define maxm (1 << 21) + 5
#define mod 1000000007
int dp[maxm] = {};
int main() {
int n;
int a[maxn][maxn];
scanf("%d", &n);
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
scanf("%d", &a[i][j]);
int M = (1 << n) - 1;
dp[0] = 1;... | replace | 15 | 20 | 15 | 26 | TLE | |
p03174 | C++ | Time Limit Exceeded | // @idea:
// dp(i, mask) : #ways of matching man i with women bitmask, mask
// given that [0, i-1] men already matched
// dp(i, mask) = sum {dp(i - 1, mask.clear(j)) | j <- mask.ones, a[i][j] == 1}
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
const int NMAX = 21 + 2;
const ... | // @idea:
// dp(i, mask) : #ways of matching man i with women bitmask, mask
// given that [0, i-1] men already matched
// dp(i, mask) = sum {dp(i - 1, mask.clear(j)) | j <- mask.ones, a[i][j] == 1}
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
const int NMAX = 21 + 2;
const ... | insert | 20 | 20 | 20 | 22 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
const int maxn = 22;
const int mo = 1e9 + 7;
int n, a[maxn][maxn],... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
const int maxn = 22;
const int mo = 1e9 + 7;
int n, a[maxn][maxn],... | replace | 46 | 54 | 46 | 54 | TLE | |
p03174 | C++ | Memory Limit Exceeded | #include <cstring>
#include <iostream>
using namespace std;
const int MAXN = 21; // maximum number of couples
const int MAXL = 1 << 21 + 3; // maximum number of couples
const int BIG_NUM = 1000000007;
int N; // number of couples
int dp[MAXN][MAXL]; // dp lookup table
int comp[MAXN]; // compa... | #include <cstring>
#include <iostream>
using namespace std;
const int MAXN = 21; // maximum number of couples
const int MAXL = 1 << 21 + 2; // maximum number of couples
const int BIG_NUM = 1000000007;
int N; // number of couples
int dp[MAXN][MAXL]; // dp lookup table
int comp[MAXN]; // compa... | replace | 5 | 6 | 5 | 6 | MLE | |
p03174 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#... | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#... | insert | 79 | 79 | 79 | 88 | TLE | |
p03174 | C++ | Time Limit Exceeded | // S.G.N.//
#include <bits/stdc++.h>
using namespace std;
typedef vector<long long> vi;
typedef long long ll;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define endl "\n"
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define fr(n) for (ll i = 0; i < n; i++)
#define tr(a) ... | // S.G.N.//
#include <bits/stdc++.h>
using namespace std;
typedef vector<long long> vi;
typedef long long ll;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define endl "\n"
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define fr(n) for (ll i = 0; i < n; i++)
#define tr(a) ... | insert | 39 | 39 | 39 | 41 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, m, n) for (int i = m; i < (n); i++)
typedef long long ll;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
const ll MOD = 1000000007;
int N;
int A[22][22];
ll dp[21][1 << 21];
vector<int... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, m, n) for (int i = m; i < (n); i++)
typedef long long ll;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
const ll MOD = 1000000007;
int N;
int A[25][25];
ll dp[23][1 << 21];
vector<int... | replace | 12 | 15 | 12 | 15 | -11 | |
p03174 | C++ | Time Limit Exceeded | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#includ... | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#includ... | insert | 83 | 83 | 83 | 85 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <unordered_map>
using namespace std;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout... | #include <bits/stdc++.h>
#include <unordered_map>
using namespace std;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout... | replace | 92 | 93 | 92 | 94 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#define debarr(a, x, y) \
cerr << #a << ":"; \
for (int i = x; i <= y; i++) \
cerr ... | #include <bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#define debarr(a, x, y) \
cerr << #a << ":"; \
for (int i = x; i <= y; i++) \
cerr ... | replace | 112 | 116 | 112 | 113 | -11 | |
p03174 | C++ | Time Limit Exceeded | // https://atcoder.jp/contests/dp/tasks/dp_o
#include <bits/stdc++.h>
#define ALL(e) e.begin(), e.end()
#define RALL(e) e.rbegin(), e.rend()
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define dbg(x) (cerr << #x << ":" << x)
#define mid (l + r) / 2
#define fi first
#define sc second
#define N 1000000009
usin... | // https://atcoder.jp/contests/dp/tasks/dp_o
#include <bits/stdc++.h>
#define ALL(e) e.begin(), e.end()
#define RALL(e) e.rbegin(), e.rend()
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define dbg(x) (cerr << #x << ":" << x)
#define mid (l + r) / 2
#define fi first
#define sc second
#define N 1000000009
usin... | delete | 42 | 43 | 42 | 42 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
const int MOD = 1e+9 + 7;
int main() {
int N;
cin >> N;
vector<vector<int>> a(N, vector<int>(N));
REP(i, N) REP(j... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
const int MOD = 1e+9 + 7;
int main() {
int N;
cin >> N;
vector<vector<int>> a(N, vector<int>(N));
REP(i, N) REP(j... | replace | 22 | 23 | 22 | 25 | TLE | |
p03174 | C++ | Memory Limit Exceeded | /*There's a possibility*/
#define dbg(...) ;
#define db(...) ;
#include "bits/stdc++.h"
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); ... | /*There's a possibility*/
#define dbg(...) ;
#define db(...) ;
#include "bits/stdc++.h"
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); ... | replace | 20 | 21 | 20 | 21 | MLE | |
p03174 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define pb push_back
#define size(v) (int)v.size()
#define fast \
ios_base::sync_with_stdio(false); ... |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define pb push_back
#define size(v) (int)v.size()
#define fast \
ios_base::sync_with_stdio(false); ... | replace | 49 | 50 | 49 | 50 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
#define rep(i, x, y) \
for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \
i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#de... | #include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
#define rep(i, x, y) \
for (i64 i = i64(x), i##_max_for_repmacro = i64(y); \
i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#de... | insert | 74 | 74 | 74 | 76 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int add(int a, int b) { return a + b - mod * (a + b >= mod); }
int mul(int a, int b) { return int(1ll * a * b % mod); }
int pwr(int a, int x) {
if (x == 0) {
return 1;
}
return mul(pwr(mul(a, a), x >> 1), (x & 1 ? a : 1));
}
int dvd(... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int add(int a, int b) { return a + b - mod * (a + b >= mod); }
int mul(int a, int b) { return int(1ll * a * b % mod); }
int pwr(int a, int x) {
if (x == 0) {
return 1;
}
return mul(pwr(mul(a, a), x >> 1), (x & 1 ? a : 1));
}
int dvd(... | replace | 40 | 46 | 40 | 45 | TLE | |
p03174 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N;
int a[23][23];
int A[23];
const ll MOD = 1e9 + 7;
ll dp[23][1 << 23];
ll mmax;
ll rec(int n, int m) {
if (dp[n][m] != -1)
return dp[n][m];
if (n == 0) {
if (m == mmax)
return 1;
else
return 0;
}
ll res = 0;
fo... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N;
int a[23][23];
int A[23];
const ll MOD = 1e9 + 7;
ll dp[23][1 << 22];
ll mmax;
ll rec(int n, int m) {
if (dp[n][m] != -1)
return dp[n][m];
if (n == 0) {
if (m == mmax)
return 1;
else
return 0;
}
ll res = 0;
fo... | replace | 8 | 9 | 8 | 9 | MLE | |
p03174 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define LSB __builtin_ctzll
#define sc(a) scanf("%d", &a)
#define MSB 63 - __builtin_clzll
#define scl(a) scanf("%lld", &a)
#define BITS __builtin_popcountll
#define mem(a, v) memset(a, v, sizeof(a))
#define fastIO ... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define LSB __builtin_ctzll
#define sc(a) scanf("%d", &a)
#define MSB 63 - __builtin_clzll
#define scl(a) scanf("%lld", &a)
#define BITS __builtin_popcountll
#define mem(a, v) memset(a, v, sizeof(a))
#define fastIO ... | replace | 35 | 36 | 35 | 36 | MLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1e9 + 7;
int N;
int a[22][22];
ll dp[22][2200000];
int bitcnt(int n) {
int ret = 0;
for (int i = 0; i < 22; i++)
if (n & (1 << i))
ret++;
return ret;
}
int main() {
ios::sync_with_stdio(false... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1e9 + 7;
int N;
int a[22][22];
ll dp[23][2200000];
int bitcnt(int n) {
int ret = 0;
for (int i = 0; i < 22; i++)
if (n & (1 << i))
ret++;
return ret;
}
int main() {
ios::sync_with_stdio(false... | replace | 8 | 9 | 8 | 9 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <iostream>
#define llint long long
#define mod 1000000007
using namespace std;
llint n;
llint a[25][25];
llint dp[25][1 << 21];
int main(void) {
cin >> n;
for (int i = 1; i <= n; i++) {
for (int j = 0; j < n; j++) {
cin >> a[i][j];
}
}
llint S = 1 << n;
dp[0][0] = 1;
for (int i = ... | #include <iostream>
#define llint long long
#define mod 1000000007
using namespace std;
llint n;
llint a[25][25];
llint dp[25][1 << 21];
int main(void) {
cin >> n;
for (int i = 1; i <= n; i++) {
for (int j = 0; j < n; j++) {
cin >> a[i][j];
}
}
llint S = 1 << n;
dp[0][0] = 1;
for (int j = ... | replace | 20 | 30 | 20 | 32 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
#define MOD ll(1e9 + 7)
vector<vector<ll>> memo(22, vector<ll>(2e5 + 1e5, -1));
int binpow(int a, int b) {
int res = 1;
while (b) {
if (b % 2)
res = res * a;
a *= a;
b >>= 1;
}
return res;
}
ll dp(vector<vecto... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
#define MOD ll(1e9 + 7)
vector<vector<ll>> memo(22, vector<ll>(2e6 + 1e5, -1));
int binpow(int a, int b) {
int res = 1;
while (b) {
if (b % 2)
res = res * a;
a *= a;
b >>= 1;
}
return res;
}
ll dp(vector<vecto... | replace | 5 | 6 | 5 | 6 | -11 | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define INF (1LL << 62)
#define NINF ((-1) * (INF))
#define MOD (1000000007)
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define INF (1LL << 62)
#define NINF ((-1) * (INF))
#define MOD (1000000007)
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int arr[n + 5][n + 5];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
... | delete | 10 | 14 | 10 | 10 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define inside sl <= l &&r <= sr
#define outside r < sl || sr < l
#define INF 1000000009
#define mod 1000000007
using namespace std;
typedef long long ll;
int n;
int mat[22][22];
ll dp[22][(1 << 21)];
int main() {
// freopen("stl.gir", "r", stdin);... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define inside sl <= l &&r <= sr
#define outside r < sl || sr < l
#define INF 1000000009
#define mod 1000000007
using namespace std;
typedef long long ll;
int n;
int mat[22][22];
ll dp[22][(1 << 21)];
int main() {
// freopen("stl.gir", "r", stdin);... | insert | 28 | 28 | 28 | 30 | TLE | |
p03174 | C++ | Time Limit Exceeded |
#pragma GCC optimize("-O3")
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#in... |
#pragma GCC optimize("-O3")
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#in... | insert | 647 | 647 | 647 | 649 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define M_PI 3.14159265358979323846
using ull = unsigned long long;
using ll = long long;
#define endl "\n"
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define fill(x, y) memse... | #include <bits/stdc++.h>
using namespace std;
#define M_PI 3.14159265358979323846
using ull = unsigned long long;
using ll = long long;
#define endl "\n"
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define fill(x, y) memse... | replace | 200 | 210 | 200 | 209 | TLE | |
p03174 | C++ | Time Limit Exceeded | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
template <class T> ostream &operator<<(ostream &os, vector<T> V) {
os << "[ ";
for (auto v : V)
os << v << " ";
return os << "]";
}
template <class L, class R> ostream &operator<<(ostream &os, pair<L, R> P) {
return os << "(" << P.firs... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
template <class T> ostream &operator<<(ostream &os, vector<T> V) {
os << "[ ";
for (auto v : V)
os << v << " ";
return os << "]";
}
template <class L, class R> ostream &operator<<(ostream &os, pair<L, R> P) {
return os << "(" << P.firs... | insert | 64 | 64 | 64 | 66 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <climits>
#include <iostream>
#define forn(x, n, s) for (int i = x; i < n; i += s)
#define forr(x, n, s) for (int i = x; i >= n; i -= s)
using namespace std;
void go() {
ios_base::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen... | #include <bits/stdc++.h>
#include <climits>
#include <iostream>
#define forn(x, n, s) for (int i = x; i < n; i += s)
#define forr(x, n, s) for (int i = x; i >= n; i -= s)
using namespace std;
void go() {
ios_base::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen... | delete | 30 | 31 | 30 | 30 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
#define db(x) cout << #x << "=" << x << '\n'
#define db2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << '\n'
#define db3(x, y, z) \
cout << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z ... | #include <bits/stdc++.h>
#include <iostream>
#define db(x) cout << #x << "=" << x << '\n'
#define db2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << '\n'
#define db3(x, y, z) \
cout << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z ... | replace | 33 | 34 | 33 | 34 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAX_NB = 10, MOD = 1e9 + 7;
int main() {
int nbPersonne;
cin >> nbPersonne;
bool comp[nbPersonne][nbPersonne];
for (int i = 0; i < nbPersonne; i++) {
for (int j = 0; j < nbPersonne; j++) {
cin >> comp[i][j];
}
}
int dp[(1 << MAX_NB)]... | #include <bits/stdc++.h>
using namespace std;
const int MAX_NB = 22, MOD = 1e9 + 7;
int main() {
int nbPersonne;
cin >> nbPersonne;
bool comp[nbPersonne][nbPersonne];
for (int i = 0; i < nbPersonne; i++) {
for (int j = 0; j < nbPersonne; j++) {
cin >> comp[i][j];
}
}
int dp[(1 << MAX_NB)]... | replace | 3 | 4 | 3 | 4 | 0 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
#define F first
#define S second
#define migmig \
ios::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
#define F first
#define S second
#define migmig \
ios::sync_with_stdio(false); \
cin.tie(0); ... | replace | 42 | 43 | 42 | 43 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define MOD 1000000007
typedef long long int lli;
using namespace std;
int arr[22][22];
const int N = 22;
int dp[1ll << N][22];
int func(int mask, int col, int n) {
if (col == n) {
if (mask == (1 << n) - 1) {
return 1;
}
return 0;
}
long long int ans = 0;
// i have... | #include <bits/stdc++.h>
#define MOD 1000000007
typedef long long int lli;
using namespace std;
int arr[22][22];
const int N = 22;
int dp[1ll << N][22];
int func(int mask, int col, int n) {
if (col == n) {
if (mask == (1 << n) - 1) {
return 1;
}
return 0;
}
if (dp[mask][col] != -1) {
ret... | insert | 16 | 16 | 16 | 20 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF 100000000
#define fi first
#define se second
const int LEN = 2e5 + 5;
const int LEN5 = 1e5 + 5;
const int MOD = 1e9 + 7;
typedef long long ll;
int N, ar[22][22];
ll dp[22][1 << 22];
int lim;
ll sol(int n, int m) {
// cout<<n<<" "<<m<<endl;
if (n == N)
... | #include <bits/stdc++.h>
using namespace std;
#define INF 100000000
#define fi first
#define se second
const int LEN = 2e5 + 5;
const int LEN5 = 1e5 + 5;
const int MOD = 1e9 + 7;
typedef long long ll;
int N, ar[22][22];
ll dp[22][1 << 22];
int lim;
ll sol(int n, int m) {
// cout<<n<<" "<<m<<endl;
if (n == N)
... | replace | 48 | 50 | 48 | 50 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<ll, null_type, less_equal<ll>, rb_tree_tag, \
... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<ll, null_type, less_equal<ll>, rb_tree_tag, \
... | insert | 108 | 108 | 108 | 110 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | replace | 67 | 71 | 67 | 72 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// repetition
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
// container util
#define all(x) (x).begin(), (x).end()
// typedef
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll... | #include <bits/stdc++.h>
using namespace std;
// repetition
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
// container util
#define all(x) (x).begin(), (x).end()
// typedef
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll... | replace | 49 | 55 | 49 | 59 | TLE | |
p03174 | C++ | Time Limit Exceeded | /*** author: yuji9511 ***/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lpair = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define printa(x, n) ... | /*** author: yuji9511 ***/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lpair = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define printa(x, n) ... | insert | 33 | 33 | 33 | 36 | TLE | |
p03174 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#define rep(index, num) for (int index = 0; index < num; index++)
#define rep1(index, num) for (int index = 1; index <= num; index++)
... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#define rep(index, num) for (int index = 0; index < num; index++)
#define rep1(index, num) for (int index = 1; index <= num; index++)
... | replace | 27 | 29 | 27 | 30 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define INF LLONG_MAX
#define dd double
#define fi first
#define se second
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
#define dll deque<long long>
#define qll queue<long long>... | #include <bits/stdc++.h>
#define ll long long
#define INF LLONG_MAX
#define dd double
#define fi first
#define se second
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
#define dll deque<long long>
#define qll queue<long long>... | replace | 78 | 79 | 78 | 79 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (int i = int(a) - 1; i >= int(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#de... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (int i = int(a) - 1; i >= int(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#de... | insert | 37 | 37 | 37 | 39 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <stdio.h>
#include <string.h>
using namespace std;
typedef long long int ll;
constexpr int kMod = int(1E9 + 7);
int a[30][30];
ll dp[2][1 << 21];
int main() {
int n;
bool f = false;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
scanf("%d", &a[i][j]);
dp[!f][0] =... | #include <stdio.h>
#include <string.h>
using namespace std;
typedef long long int ll;
constexpr int kMod = int(1E9 + 7);
int a[30][30];
ll dp[2][1 << 21];
int main() {
int n;
bool f = false;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
scanf("%d", &a[i][j]);
dp[!f][0] =... | replace | 16 | 20 | 16 | 22 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | replace | 21 | 27 | 21 | 23 | TLE | |
p03174 | C++ | Runtime Error | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int n;
int a[21][21];
int dp[21][1 << 21];
int MOD = 1000000007;
int main(int argc, char **argv) {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; ... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int n;
int a[22][22];
int dp[22][1 << 21];
int MOD = 1000000007;
int main(int argc, char **argv) {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; ... | replace | 8 | 10 | 8 | 10 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using VS = vector<string>;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using PLL = pair<LL, LL>;
using VL = vector<LL>;
using VVL = vector<VL>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) (a).rbegin(), (a).rend... | #include <bits/stdc++.h>
using namespace std;
using VS = vector<string>;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using PLL = pair<LL, LL>;
using VL = vector<LL>;
using VVL = vector<VL>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) (a).rbegin(), (a).rend... | replace | 111 | 116 | 111 | 116 | TLE | |
p03174 | C++ | Time Limit Exceeded | // failed to generate code
#include <bits/stdc++.h>
using namespace std;
int a[22][22];
long long dp[22][1 << 22];
int MOD = 1000000007;
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> a[i][j];
}
}
long long ans = 0;
dp[0][0] = 1;
for (int ... | // failed to generate code
#include <bits/stdc++.h>
using namespace std;
int a[22][22];
long long dp[22][1 << 22];
int MOD = 1000000007;
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> a[i][j];
}
}
long long ans = 0;
dp[0][0] = 1;
for (int ... | insert | 21 | 21 | 21 | 23 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
#define LL long long
#define PII pair<int, int>
using namespace std;
const int MAXN = 21;
const LL MOD = 1000000007;
int N;
bool adj[MAXN][MAXN];
LL dp[1 << MAXN];
vector<int> store[MAXN];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> N;
for (int i = 0; i < (1 << N); ... | #include <bits/stdc++.h>
#define LL long long
#define PII pair<int, int>
using namespace std;
const int MAXN = 21;
const LL MOD = 1000000007;
int N;
bool adj[MAXN][MAXN];
LL dp[1 << MAXN];
vector<int> store[MAXN + 1];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> N;
for (int i = 0; i < (1 << ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03174 | C++ | Time Limit Exceeded | // {{{
#include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using n... | // {{{
#include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using n... | insert | 62 | 62 | 62 | 64 | TLE | |
p03174 | C++ | Runtime Error | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#includ... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#includ... | replace | 23 | 24 | 23 | 24 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define each(i, c) for (auto &i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template <typename P, typename Q>
ostream &operator<<(ostream &os, pair<P, Q> p) {
os << "(" << p.first << ... | #include <bits/stdc++.h>
#define each(i, c) for (auto &i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template <typename P, typename Q>
ostream &operator<<(ostream &os, pair<P, Q> p) {
os << "(" << p.first << ... | insert | 56 | 56 | 56 | 58 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
// #include "boost/multiprecision/cpp_int.hpp"
// typedef boost::multiprecision::cpp_int LL;
typedef long double dd;
#define i_7 (ll)(1E9 + 7)
// #define i_7 998244353
#define i_5 i_7 - 2
ll mod(ll a) {
ll c = a % i_7;
... | #include <bits/stdc++.h>
// #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
// #include "boost/multiprecision/cpp_int.hpp"
// typedef boost::multiprecision::cpp_int LL;
typedef long double dd;
#define i_7 (ll)(1E9 + 7)
// #define i_7 998244353
#define i_5 i_7 - 2
ll mod(ll a) {
ll c = a % i_7;
... | insert | 69 | 69 | 69 | 73 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
#define MP make_pair
#define PB push_back
#define X first
#define Y second
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, b, a) for (int i = (b)-1; i >= (a); --i)
#define ITER(... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
#define MP make_pair
#define PB push_back
#define X first
#define Y second
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, b, a) for (int i = (b)-1; i >= (a); --i)
#define ITER(... | replace | 32 | 33 | 32 | 33 | -11 | |
p03174 | C++ | Runtime Error | #pragma GCC target("popcnt,abm,bmi,avx2")
#include <cstdio>
int n;
int A[21];
constexpr int mod = 1000000007;
int dp[1 << 21];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
int x;
scanf("%d", &x);
if (x)
A[i] |= 1 << j;
}
}
dp[0]... | #pragma GCC target("arch=ivybridge")
#include <cstdio>
int n;
int A[21];
constexpr int mod = 1000000007;
int dp[1 << 21];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
int x;
scanf("%d", &x);
if (x)
A[i] |= 1 << j;
}
}
dp[0] = 1;... | replace | 0 | 1 | 0 | 1 | 0 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a) for (int i = 0; i < (a); i++)
#define ALL(a) (a).begin(), (a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;
using ll = long long;
template <ll MOD = 1000000007> struc... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a) for (int i = 0; i < (a); i++)
#define ALL(a) (a).begin(), (a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;
using ll = long long;
template <ll MOD = 1000000007> struc... | replace | 99 | 103 | 99 | 105 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/hash_map>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;
#define REP(i, n) for ((i) = 0; (i) < (n); (i)++)
#define rep(i, x, n) for ((i) = (x); (i) < (n); (i)++)
#define REV(i, n) for ((i) = (n); (i) >= 0; (i)--)
#define FORIT(it, x) for ((it) = (x).begin... | #include <bits/stdc++.h>
#include <ext/hash_map>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;
#define REP(i, n) for ((i) = 0; (i) < (n); (i)++)
#define rep(i, x, n) for ((i) = (x); (i) < (n); (i)++)
#define REV(i, n) for ((i) = (n); (i) >= 0; (i)--)
#define FORIT(it, x) for ((it) = (x).begin... | replace | 96 | 97 | 96 | 99 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define ve vector
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
const int mod = 1000000007;
int main() {
int n;
cin >> n;
ve<ve<int>> a(n, ve<int>(n));
rep(i, n) rep(j, n) cin >> a[i][j];
ve<ll> dp(1 << n);
r... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define ve vector
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
const int mod = 1000000007;
int main() {
int n;
cin >> n;
ve<ve<int>> a(n, ve<int>(n));
rep(i, n) rep(j, n) cin >> a[i][j];
ve<ll> dp(1 << n);
r... | replace | 24 | 25 | 24 | 29 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (decltype(n) i = 0; i < (n); ++i)
using namespace std;
using int64 = long long;
const long long MOD = 1000000007;
void solve(long long N, std::vector<std::vector<int>> a) {
vector<unordered_map<int, int64>> dp(N);
for (auto i : a[0]) {
dp[0][1 << i] = 1;
}
fo... | #include <bits/stdc++.h>
#define REP(i, n) for (decltype(n) i = 0; i < (n); ++i)
using namespace std;
using int64 = long long;
const long long MOD = 1000000007;
void solve(long long N, std::vector<std::vector<int>> a) {
vector<unordered_map<int, int64>> dp(N);
for (auto i : a[0]) {
dp[0][1 << i] = 1;
}
fo... | replace | 48 | 49 | 48 | 49 | TLE | |
p03174 | C++ | Time Limit Exceeded | // #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c... | // #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c... | replace | 200 | 205 | 200 | 207 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define vl vector<long long int>
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define vl vector<long long int>
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | replace | 41 | 42 | 41 | 42 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)... | insert | 29 | 29 | 29 | 32 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;
int n;
vector<vector<int>> a;
map<int, ll> dp;
map<int, bool> done;
ll dfs(int rest, int line) {
if (done[rest]) {
// cout << "memo" << endl;
return dp[rest];
}
if (line == n - 1) {
for (int j = 0; j < n; j++)
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;
int n;
vector<vector<int>> a;
ll dp[1 << 21];
bool done[1 << 21];
ll dfs(int rest, int line) {
if (done[rest]) {
// cout << "memo" << endl;
return dp[rest];
}
if (line == n - 1) {
for (int j = 0; j < n; j++)
... | replace | 6 | 8 | 6 | 8 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define M_PI 3.14159265358979323846 // pi
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;
typedef tuple<ll, ll, ll, ll, ll> t5;
#define rep(a, n) for (ll ... | #include <bits/stdc++.h>
#define M_PI 3.14159265358979323846 // pi
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;
typedef tuple<ll, ll, ll, ll, ll> t5;
#define rep(a, n) for (ll ... | insert | 86 | 86 | 86 | 89 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
int mm, n;
vector<int> women[23];
int dp[2097154][22];
ll rec(int mask, int wom) {
if (mask == mm) {
return 1;
}
if (wom == 22) {
return 0;
}
if (dp[mask][wom] != -1) {
return dp[mask][wom];
}
ll ans =... | #include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
int mm, n;
vector<int> women[23];
int dp[2097154][22];
ll rec(int mask, int wom) {
if (mask == mm) {
return 1;
}
if (wom == 22) {
return 0;
}
if (dp[mask][wom] != -1) {
return dp[mask][wom];
}
ll ans =... | delete | 21 | 22 | 21 | 21 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vll = std::vector<ll>;
using vvll = std::vector<vll>;
using vvvll = std::vector<vvll>;
using dd = double;
using vdd = std::vector<dd>;
using vvdd = std::vector<vdd>;
using vvvdd = std::vector<vvdd>;
constexpr ll INF = 1LL << 60;
constexpr dd EPS... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vll = std::vector<ll>;
using vvll = std::vector<vll>;
using vvvll = std::vector<vvll>;
using dd = double;
using vdd = std::vector<dd>;
using vvdd = std::vector<vdd>;
using vvvdd = std::vector<vvdd>;
constexpr ll INF = 1LL << 60;
constexpr dd EPS... | replace | 230 | 231 | 230 | 232 | TLE | |
p03174 | C++ | Time Limit Exceeded | const long long MOD = 1000000007;
#include <bits/stdc++.h>
using namespace std;
using ll = int_fast64_t;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const ll INF = 1LL << 60;
void solve();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
so... | const long long MOD = 1000000007;
#include <bits/stdc++.h>
using namespace std;
using ll = int_fast64_t;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const ll INF = 1LL << 60;
void solve();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
so... | replace | 55 | 59 | 55 | 63 | TLE | |
p03174 | C++ | Runtime Error | // People only find me interesting because they can't tell whether I'm serious
// or not #include <boost/multiprecision/cpp_int.hpp>
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
typedef long long int ll;
typedef double db;
typedef __int128 s128;
typedef __uint12... | // People only find me interesting because they can't tell whether I'm serious
// or not #include <boost/multiprecision/cpp_int.hpp>
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
typedef long long int ll;
typedef double db;
typedef __int128 s128;
typedef __uint12... | delete | 70 | 74 | 70 | 70 | -11 | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define vout(x) rep(i, x.size()) cout << x[i] << " "
template <class T> bool chmin(T &a, T b) {
if (a > b) {
a =... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define vout(x) rep(i, x.size()) cout << x[i] << " "
template <class T> bool chmin(T &a, T b) {
if (a > b) {
a =... | insert | 79 | 79 | 79 | 81 | TLE | |
p03174 | C++ | Time Limit Exceeded | #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
voi... | #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
voi... | insert | 66 | 66 | 66 | 67 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, x, n) for (int i = x; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define all(X) (X).begin(), (X).end()
#define X first
#define Y second
#define pb push_back
#define eb emplace_back
using namespace std;
type... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, x, n) for (int i = x; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define all(X) (X).begin(), (X).end()
#define X first
#define Y second
#define pb push_back
#define eb emplace_back
using namespace std;
type... | replace | 70 | 74 | 70 | 76 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define MOD 1000000007
#define LLI long long int
using namespace std;
int N;
LLI dp[22][1 << 21] = {};
int a[21][21] = {};
int main() {
int i, j;
int N;
cin >> N;
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
cin >> a[i][j];
}
}
dp[0][0] = 1;
for (i = 0; i... | #include <bits/stdc++.h>
#define MOD 1000000007
#define LLI long long int
using namespace std;
int N;
LLI dp[22][1 << 21] = {};
int a[21][21] = {};
int main() {
int i, j;
int N;
cin >> N;
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
cin >> a[i][j];
}
}
dp[0][0] = 1;
for (i = 0; i... | replace | 23 | 28 | 23 | 30 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <cstdio>
#include <cstring>
using namespace std;
const int N = 21;
int dp[N + 1][1 << N];
bool a[N][N];
int n;
const int MOD = 1e9 + 7;
void add(int &a, int b) {
a += b;
if (a >= MOD)
a -= MOD;
}
void solve() {
memset(dp, 0, sizeof dp);
dp[0][0] = 1; // only one way to distribute 0 man and 0 wo... | #include <cstdio>
#include <cstring>
using namespace std;
const int N = 21;
int dp[N + 1][1 << N];
bool a[N][N];
int n;
const int MOD = 1e9 + 7;
void add(int &a, int b) {
a += b;
if (a >= MOD)
a -= MOD;
}
void solve() {
memset(dp, 0, sizeof dp);
dp[0][0] = 1; // only one way to distribute 0 man and 0 wo... | insert | 22 | 22 | 22 | 24 | TLE | |
p03174 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define f first
#define s second
#define pb push_back
#define mod 1000000007
ll dp[1 << 22];
ll co(ll n) {
ll g = n;
ll c = 0;
while (g > 0) {
c += (g % 2);
g /= 2;
}
return c;
}
void solve() {
ll n;
cin >> n;
ll g = 1ll << n... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define f first
#define s second
#define pb push_back
#define mod 1000000007
ll dp[1 << 22];
ll co(ll n) {
ll g = n;
ll c = 0;
while (g > 0) {
c += (g % 2);
g /= 2;
}
return c;
}
void solve() {
ll n;
cin >> n;
ll g = 1ll << n... | delete | 41 | 45 | 41 | 41 | 0 | |
p03174 | C++ | Time Limit Exceeded | // #include <boost/multiprecision/cpp_dec_float.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
// ... | // #include <boost/multiprecision/cpp_dec_float.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
// ... | replace | 33 | 40 | 33 | 43 | TLE | |
p03174 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int dp[22][(1 << 22)];
int main(void) {
int N;
cin >> N;
int a[22][22];
memset(a, 0, sizeof(a));
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> a[i][j];
}
}
dp[0][0] = 1;
for (int i = 0; i < N; i++) {
for (int used = 0... | #include <bits/stdc++.h>
using namespace std;
int dp[22][(1 << 22)];
int main(void) {
int N;
cin >> N;
int a[22][22];
memset(a, 0, sizeof(a));
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> a[i][j];
}
}
dp[0][0] = 1;
for (int i = 0; i < N; i++) {
for (int used = 0... | insert | 18 | 18 | 18 | 20 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.