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
p02900
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define reps(i, n) for (int i = 1; i <= (int)(n); ++i) #define repd(i, n) for (int i = (int)(n - 1); i >= 0; --i) #define repds(i, n) for (int i = (int)(n); i > 0; --i) #define loop(i, x, n) for (int i = (int)(x); i < (n...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define reps(i, n) for (int i = 1; i <= (int)(n); ++i) #define repd(i, n) for (int i = (int)(n - 1); i >= 0; --i) #define repds(i, n) for (int i = (int)(n); i > 0; --i) #define loop(i, x, n) for (int i = (int)(x); i < (n...
replace
59
60
59
60
0
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; const int N = 1e5; const long long INF = 1e9; int main() { long long a, b; cin >> a >> b; long long g = __gcd(a, b); int ans = 1; for (int i = 2; i * i <= g; i++) { if (g % i == 0) { ans++; while (!(g % i)) g /= ...
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; const int N = 1e5; const long long INF = 1e9; int main() { long long a, b; cin >> a >> b; long long g = __gcd(a, b); int ans = 1; for (int i = 2; 1ll * i * i <= g; i++) { if (g % i == 0) { ans++; while (!(g % i)) ...
replace
13
14
13
14
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <numeric> using namespace std; #define ll long long ll gcd(ll a, ll b) { if (a < b) swap(a, b); if (a % b == 0) return b; else return gcd(b, a % b); } int main() { long long a, b; cin >> a >> b; long long ans = 1; ll g =...
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <numeric> using namespace std; #define ll long long ll gcd(ll a, ll b) { if (a < b) swap(a, b); if (a % b == 0) return b; else return gcd(b, a % b); } int main() { long long a, b; cin >> a >> b; long long ans = 1; ll g =...
replace
21
22
21
22
TLE
p02900
C++
Time Limit Exceeded
#include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; using namespace std; ll gcd(ll a, ll b) { if (a < b) swap(a, b); if (a % b != 0) return gcd(b, a % b); else return b; } int main() { ll a, b; cin >> a >> b; ll G = gcd(a, b); ll ans = ...
#include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; using namespace std; ll gcd(ll a, ll b) { if (a < b) swap(a, b); if (a % b != 0) return gcd(b, a % b); else return b; } int main() { ll a, b; cin >> a >> b; ll G = gcd(a, b); ll ans = ...
replace
21
22
21
22
TLE
p02900
C++
Time Limit Exceeded
// BROWNIE TK #include <bits/stdc++.h> typedef long long int lli; typedef unsigned long long int ulli; typedef long double ldb; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pb push_back #define popb pop_back() #define pf push_front #define popf pop...
// BROWNIE TK #include <bits/stdc++.h> typedef long long int lli; typedef unsigned long long int ulli; typedef long double ldb; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pb push_back #define popb pop_back() #define pf push_front #define popf pop...
replace
98
99
98
99
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long a, b; cin >> a >> b; if (a < b) swap(a, b); long long amari; long long waru = b; long long warareru = a; while (amari != 0) { amari = warareru % waru; if (amari == 0) break; warareru = waru; waru = amari; } ...
#include <bits/stdc++.h> using namespace std; int main() { long long a, b; cin >> a >> b; if (a < b) swap(a, b); long long amari; long long waru = b; long long warareru = a; while (amari != 0) { amari = warareru % waru; if (amari == 0) break; warareru = waru; waru = amari; } ...
replace
21
22
21
22
TLE
p02900
C++
Runtime Error
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cmath> #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iostream> // cou...
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cmath> #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iostream> // cou...
replace
73
74
73
74
127
/tmp/b86a0178-e588-453d-9ef9-6ad17b8a9660.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p02900
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const long long MOD = 1e9 + 7; const int INF = 1e9 + 7; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } int main() { cin.tie(0); ios::sync_with_stdio(false); ll A, B; cin >> A >> B; ll g = gcd(A, B); vector<b...
#include <bits/stdc++.h> using namespace std; using ll = long long; const long long MOD = 1e9 + 7; const int INF = 1e9 + 7; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } int main() { cin.tie(0); ios::sync_with_stdio(false); ll A, B; cin >> A >> B; ll g = gcd(A, B); vector<b...
replace
30
31
30
31
0
p02900
C++
Runtime Error
#include <algorithm> #include <cstdio> using namespace std; /* ----------------------------------------------------------------------------- 型とクラス定義 ----------------------------------------------------------------------------- */ typedef long long ll; /* ------------------------------------------------------...
#include <algorithm> #include <cstdio> using namespace std; /* ----------------------------------------------------------------------------- 型とクラス定義 ----------------------------------------------------------------------------- */ typedef long long ll; /* ------------------------------------------------------...
replace
20
21
20
21
0
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long using namespace std; int main(void) { ll a, b; cin >> a >> b; ll g = __gcd(a, b); ll ans = 1; for (int i = 2; i * i <= g; i++) { if (g % i == 0) { ans++; while (g % i == 0) g /= i; } } if (g != 1) ans++; cout << ans << "\n"...
#include <bits/stdc++.h> #define ll long long using namespace std; int main(void) { ll a, b; cin >> a >> b; ll g = __gcd(a, b); ll ans = 1; for (ll i = 2; i * i <= g; i++) { if (g % i == 0) { ans++; while (g % i == 0) g /= i; } } if (g != 1) ans++; cout << ans << "\n";...
replace
11
12
11
12
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define RITR(x, c) for (__typeof(c.rbegin()) x = c.rbegin(); x != c.rend(); x++) #define setp(n) fixed << setprecision(n) #define lf double #define ll long long #d...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define RITR(x, c) for (__typeof(c.rbegin()) x = c.rbegin(); x != c.rend(); x++) #define setp(n) fixed << setprecision(n) #define lf double #define ll long long #d...
replace
32
33
32
33
TLE
p02900
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stri...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stri...
replace
38
39
38
39
TLE
p02900
C++
Runtime Error
// This code writed by chtholly_micromaker(MicroMaker) #include <bits/stdc++.h> #define reg register #define int long long using namespace std; template <class t> inline void rd(t &s) { s = 0; reg char c = getchar(); while (!isdigit(c)) c = getchar(); while (isdigit(c)) s = (s << 3) + (s << 1) + (c ^ 48...
// This code writed by chtholly_micromaker(MicroMaker) #include <bits/stdc++.h> #define reg register #define int long long using namespace std; template <class t> inline void rd(t &s) { s = 0; reg char c = getchar(); while (!isdigit(c)) c = getchar(); while (isdigit(c)) s = (s << 3) + (s << 1) + (c ^ 48...
replace
47
48
47
48
-11
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define LL long long LL gcd(LL a, LL b) { return b ? gcd(b, a % b) : a; } int main() { LL a, b, c; int ans = 1; scanf("%lld%lld", &a, &b); c = gcd(a, b); for (int i = 2; i * i <= c; i++) { if (c % i == 0) ans++; while (c % i == 0) c /= i; } ...
#include <bits/stdc++.h> using namespace std; #define LL long long LL gcd(LL a, LL b) { return b ? gcd(b, a % b) : a; } int main() { LL a, b, c; int ans = 1; scanf("%lld%lld", &a, &b); c = gcd(a, b); for (LL i = 2; i * i <= c; i++) { if (c % i == 0) ans++; while (c % i == 0) c /= i; } ...
replace
9
10
9
10
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = 1e9; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } int main() { ll a, b; cin >> a >> b; ll g = gcd(a, b); ll ans = 1; for (int i = 2; i * i <= g; i++) { if (g % i == ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = 1e9; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } int main() { ll a, b; cin >> a >> b; ll g = gcd(a, b); ll ans = 1; for (ll i = 2; i * i <= g; i++) { if (g % i == 0...
replace
17
18
17
18
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define all(x) x.begin(), x.end() #define pb(x) push_back(x) #define INF 1000000000000000000 #define IOS \ ios::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define all(x) x.begin(), x.end() #define pb(x) push_back(x) #define INF 1000000000000000000 #define IOS \ ios::sync_with_stdio(false); ...
replace
23
24
23
24
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll countPrimes(ll n) { map<ll, int> m; for (int i = 2; i * i <= n; i++) { while (n % i == 0) { m[i]++; n /= i; } } if (n != 1) m[n]++; return (m.size()); } int main() { ll a, b; cin >> a >> b; ll g = __gcd(a, b...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll countPrimes(ll n) { map<ll, int> m; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { m[i]++; n /= i; } } if (n != 1) m[n]++; return (m.size()); } int main() { ll a, b; cin >> a >> b; ll g = __gcd(a, b)...
replace
6
7
6
7
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rg register #define rep(i, a, b) for (rg int i = a; i <= b; i++) #define per(i, a, b) for (rg int i = b; i >= a; i--) #define pb push_back #define lowbit(x) (x & (-x)) #define mk make_pair #define VI vector<int> #define pii pair<int, int> #define pLL pair<long long,...
#include <bits/stdc++.h> using namespace std; #define rg register #define rep(i, a, b) for (rg int i = a; i <= b; i++) #define per(i, a, b) for (rg int i = b; i >= a; i--) #define pb push_back #define lowbit(x) (x & (-x)) #define mk make_pair #define VI vector<int> #define pii pair<int, int> #define pLL pair<long long,...
replace
54
55
54
55
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define repd(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) #define all(x) (x).begin(), (x).end() template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chma...
#include <bits/stdc++.h> using namespace std; #define repd(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) #define all(x) (x).begin(), (x).end() template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chma...
replace
25
26
25
26
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define hell 1000000007 #define endl "\n" #define io \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define int long long #define hell 1000000007 #define endl "\n" #define io \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
replace
21
22
21
22
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; long long gcd(long long a, long long b) { if (a < b) swap(a, b); if (b == 0) return a; else return gcd(b, a % b); } int main() { long long a, b, g, buf; set<long long> cd; cin >> a >> b; g = gcd(a, b); buf = g; for (int i = 2; i * i <= g; i+...
#include <bits/stdc++.h> using namespace std; long long gcd(long long a, long long b) { if (a < b) swap(a, b); if (b == 0) return a; else return gcd(b, a % b); } int main() { long long a, b, g, buf; set<long long> cd; cin >> a >> b; g = gcd(a, b); buf = g; for (long long i = 2; i * i <=...
replace
19
20
19
20
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; long gcd(long x, long y) { long r; if (x < y) swap(x, y); while (y > 0) { r = x % y; x = y; y = r; } return x; } long CntPrime(long x) { long cnt = 0; if (x < 2) { // cout << "CntPrimt(1)" << x << endl; return 0; } else if (x == 2)...
#include <bits/stdc++.h> using namespace std; long gcd(long x, long y) { long r; if (x < y) swap(x, y); while (y > 0) { r = x % y; x = y; y = r; } return x; } long CntPrime(long x) { long cnt = 0; if (x < 2) { // cout << "CntPrimt(1)" << x << endl; return 0; } else if (x == 2)...
insert
49
49
49
51
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; long long f(long long a, long long b) { return !b ? a : f(b, a % b); } bool isPrime(long long i) { for (long long ii = 2; ii * ii <= i; ii++) { if (i % ii == 0) return 0; } return 1; } int main() { long long a, b, cnt = 0; scanf("%lld%lld", &a, &b); ...
#include <bits/stdc++.h> using namespace std; long long f(long long a, long long b) { return !b ? a : f(b, a % b); } bool isPrime(long long i) { for (long long ii = 2; ii * ii <= i; ii++) { if (i % ii == 0) return 0; } return 1; } int main() { long long a, b, cnt = 0; scanf("%lld%lld", &a, &b); ...
replace
23
27
23
29
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll a, b; cin >> a >> b; ll cnt = 0, g = __gcd(a, b); for (int i = 2; i * i <= g; i++) { if (g % i != 0) continue; cnt++; while (g % i == 0) g /= i; } if (g != 1) cnt++; cout << cnt + 1 << endl; r...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll a, b; cin >> a >> b; ll cnt = 0, g = __gcd(a, b); for (ll i = 2; i * i <= g; i++) { if (g % i != 0) continue; cnt++; while (g % i == 0) g /= i; } if (g != 1) cnt++; cout << cnt + 1 << endl; re...
replace
7
8
7
8
TLE
p02900
C++
Runtime Error
#include <algorithm> #include <cstring> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stdio.h> #include <string> #include <tuple> #include <vector> using namespace std; #define MOD (long long int)(1e...
#include <algorithm> #include <cstring> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stdio.h> #include <string> #include <tuple> #include <vector> using namespace std; #define MOD (long long int)(1e...
replace
95
96
95
96
0
p02900
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define eps 1e-9 using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<i...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define eps 1e-9 using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<i...
insert
46
46
46
50
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int maxn = 3e5 + 10; #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 42 #endif // LOCAL using ll = long long; ll a, b, x; int main() { scanf("%lld %lld", &a, &b); x = __gcd(a, b); int ans = 1; for (int i = 2; i * i <=...
#include <bits/stdc++.h> using namespace std; const int maxn = 3e5 + 10; #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 42 #endif // LOCAL using ll = long long; ll a, b, x; int main() { scanf("%lld %lld", &a, &b); x = __gcd(a, b); int ans = 1; for (ll i = 2; i * i <= ...
replace
15
16
15
16
TLE
p02900
C++
Time Limit Exceeded
#include <algorithm> #include <bits/stdc++.h> #include <bitset> #include <cmath> #include <iostream> #include <queue> #include <string> #include <vector> #define ll long long #define itn int #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FFOR(i, a, b) for (int i = (a); i <= (b); ++i) #define REP(i, n) FOR...
#include <algorithm> #include <bits/stdc++.h> #include <bitset> #include <cmath> #include <iostream> #include <queue> #include <string> #include <vector> #define ll long long #define itn int #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FFOR(i, a, b) for (int i = (a); i <= (b); ++i) #define REP(i, n) FOR...
replace
53
54
53
59
TLE
p02900
C++
Time Limit Exceeded
// // Disjoint Set of Common Divisors.cpp // National Olympiad in Informatics in Provinces // // Created by 黄子齐 on 2019/9/28. // Copyright © 2019 黄子齐. All rights reserved. // #include <stdio.h> #define ll long long ll a, b; ll gcd(ll x, ll y) { if (!y) return x; return gcd(y, x % y); } int main() { // ...
// // Disjoint Set of Common Divisors.cpp // National Olympiad in Informatics in Provinces // // Created by 黄子齐 on 2019/9/28. // Copyright © 2019 黄子齐. All rights reserved. // #include <stdio.h> #define ll long long ll a, b; ll gcd(ll x, ll y) { if (!y) return x; return gcd(y, x % y); } int main() { // ...
replace
22
23
22
23
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (int)(n); i++) ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } map<ll, ll> prime_factor(ll N) { map<ll, ll> res; // res[2] = 4は、素因数2が4個あることを表す for (int i = ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (int)(n); i++) ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } map<ll, ll> prime_factor(ll N) { map<ll, ll> res; // res[2] = 4は、素因数2が4個あることを表す for (ll i = 2...
replace
13
14
13
14
TLE
p02900
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // MACROS #define ll long long #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vld vector<ld> #define u_s unordered_set #define pii pair<int, int> #define pll pair<ll, ll> #define FOR(i, n) for (ll(i) = 0; i ...
#include <bits/stdc++.h> using namespace std; // MACROS #define ll long long #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vld vector<ld> #define u_s unordered_set #define pii pair<int, int> #define pll pair<ll, ll> #define FOR(i, n) for (ll(i) = 0; i ...
delete
60
61
60
60
0
p02900
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <vector> using namespace std; map<long long, int> factorize(long long n) { map<long long, int> m; for (long long x = 2; x <= n; ++x) { while (n % x == 0) { ++m[x]; n /= x; } } if (n != 1) { ++m[n]; } return m; } long...
#include <algorithm> #include <iostream> #include <map> #include <vector> using namespace std; map<long long, int> factorize(long long n) { map<long long, int> m; for (long long x = 2; x * x <= n; ++x) { while (n % x == 0) { ++m[x]; n /= x; } } if (n != 1) { ++m[n]; } return m; } ...
replace
9
10
9
10
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, g; cin >> a >> b; g = __gcd(a, b); set<int> s; if (g % 2 == 0) { s.insert(2); while (g % 2 == 0) g /= 2; } for (int i = 3; i * i <= g; i += 2) if (g % i == 0) { s.insert(i); while (g % i == 0) ...
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, g; cin >> a >> b; g = __gcd(a, b); set<int> s; if (g % 2 == 0) { s.insert(2); while (g % 2 == 0) g /= 2; } for (long long i = 3; i * i <= g; i += 2) if (g % i == 0) { s.insert(i); while (g % i == 0) ...
replace
12
13
12
13
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } int main() { ll a, b; cin >> a >> b; ll ab = gcd(a, b); int ans = 1; for (int i = 2; i * i <= ab; ++i) { if (ab % i == 0) { ++ans; while (ab % i == 0) { ab /= i; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } int main() { ll a, b; cin >> a >> b; ll ab = gcd(a, b); int ans = 1; for (ll i = 2; i * i <= ab; ++i) { if (ab % i == 0) { ++ans; while (ab % i == 0) { ab /= i; ...
replace
11
12
11
12
TLE
p02900
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <stdlib.h> #include <string> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<string> vs; typedef vector<bool> vb; typedef pair<int, int> P; int gcd(int a, ...
#include <algorithm> #include <bits/stdc++.h> #include <stdlib.h> #include <string> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<string> vs; typedef vector<bool> vb; typedef pair<int, int> P; ll gcd(ll a, ll...
replace
15
16
15
16
0
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; int main() { ll a, b; cin >> a >> b; ll g = __gcd(a, b); ll ans = 1; for (int i = 2; i * i <= g; ++i) { if (g % i == 0) { while (g % i == ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; int main() { ll a, b; cin >> a >> b; ll g = __gcd(a, b); ll ans = 1; for (ll i = 2; i * i <= g; ++i) { if (g % i == 0) { while (g % i == 0...
replace
11
12
11
12
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1e9 + 7; #define pb push_back #define pf push_front #define pob pop_back #define pof pop_front #define mp make_pair #define mt make_tuple #define lb lower_bound #define ub upper_bound #define fi first #define sc second #define IOS ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1e9 + 7; #define pb push_back #define pf push_front #define pob pop_back #define pof pop_front #define mp make_pair #define mt make_tuple #define lb lower_bound #define ub upper_bound #define fi first #define sc second #define IOS ...
replace
26
27
26
27
TLE
p02900
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int divisorList[1000001] = {0}; // WA おそらく1000000を超える素数が答えにあるが出力していない int main(void) { unsigned long long A, B; cin >> A >> B; vector<int> divisor; vector<unsigned long long> AHighDiv, BHighDiv; for (int i = 1; i <= 1000000; i++...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int divisorList[1000001] = {0}; // WA おそらく1000000を超える素数が答えにあるが出力していない int main(void) { unsigned long long A, B; cin >> A >> B; vector<int> divisor; vector<unsigned long long> AHighDiv, BHighDiv; for (int i = 1; i <= 1000000; i++...
replace
50
51
50
51
0
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1010000000000000017LL; const ll MOD = 1000000007LL; #define REP(i, n) for (ll i = 0; i < n; i++) // #define DEBUG(fmt, ...) #define DEBUG(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__) bool is_prime(ll n) { if (n == 1) { re...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1010000000000000017LL; const ll MOD = 1000000007LL; #define REP(i, n) for (ll i = 0; i < n; i++) // #define DEBUG(fmt, ...) #define DEBUG(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__) bool is_prime(ll n) { if (n == 1) { re...
replace
44
45
44
45
TLE
p02900
C++
Time Limit Exceeded
#include <iostream> #include <set> template <typename T> T gcd(T a, T b) { if (a % b == 0) { return b; } else { return gcd(b, a % b); } } int main() { int64_t a, b; std::cin >> a >> b; int64_t g = gcd(a, b); std::set<int64_t> primes; primes.insert(1); for (int i = 2; i * i <= g; i++) { ...
#include <iostream> #include <set> template <typename T> T gcd(T a, T b) { if (a % b == 0) { return b; } else { return gcd(b, a % b); } } int main() { int64_t a, b; std::cin >> a >> b; int64_t g = gcd(a, b); std::set<int64_t> primes; primes.insert(1); for (int64_t i = 2; i * i <= g; i++) {...
replace
19
20
19
20
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long a, b; cin >> a >> b; int ans = 1; for (long long i = 2; i <= a; i++) if (a % i == 0) { if (b % i == 0) { ans++; } while (a % i == 0) { a /= i; } } ans += (a > 1 && b % a == 0); cout << an...
#include <bits/stdc++.h> using namespace std; int main() { long long a, b; cin >> a >> b; int ans = 1; for (long long i = 2; i * i <= a; i++) if (a % i == 0) { if (b % i == 0) { ans++; } while (a % i == 0) { a /= i; } } ans += (a > 1 && b % a == 0); cout <...
replace
9
10
9
10
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define repr(i, n) for (int i = (n)-1; i >= 0; i--) using namespace std; using ll = long long; typedef pair<int, int> Pair; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } vector<pair<ll, l...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define repr(i, n) for (int i = (n)-1; i >= 0; i--) using namespace std; using ll = long long; typedef pair<int, int> Pair; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } vector<pair<ll, l...
replace
14
15
14
15
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; ll gcd(ll a, ll b) { return (b ? gcd(b, a % b) : a); } vector<pair<ll, int>> factorize(ll n) { vector<pair<ll, int>> v; for (int i = 2; i * i <= n; i++) { if (n % i) continue; v.emplace_back(i, 0); whil...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; ll gcd(ll a, ll b) { return (b ? gcd(b, a % b) : a); } vector<pair<ll, int>> factorize(ll n) { vector<pair<ll, int>> v; for (ll i = 2; i * i <= n; i++) { if (n % i) continue; v.emplace_back(i, 0); while...
replace
9
10
9
10
TLE
p02900
C++
Memory Limit Exceeded
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <util...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <util...
replace
81
82
81
82
MLE
p02900
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define MOD 1000000007 #define REP(i, n) for (ll(i) = 0; (i) <...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define MOD 1000000007 #define REP(i, n) for (ll(i) = 0; (i) <...
replace
473
485
473
482
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define all(x) x.begin(), x.end() #define dbg(x) cout << #x << ":" << x << endl typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, P> PP; ll gcd(ll a, ll b) { while (b != 0) { a ...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define all(x) x.begin(), x.end() #define dbg(x) cout << #x << ":" << x << endl typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, P> PP; ll gcd(ll a, ll b) { while (b != 0) { a ...
replace
25
26
25
26
TLE
p02900
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define all(x) x.begin(), x.end() #define fi first #define se second...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define all(x) x.begin(), x.end() #define fi first #define se second...
replace
52
53
52
53
TLE
p02900
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define he...
#include <bits/stdc++.h> #define int long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define h...
replace
2
3
2
3
TLE
p02901
C++
Runtime Error
/* while(!cin.eof()) */ #include <bits/stdc++.h> using namespace std; #define int long long #define mod (int)(1e9 + 7) #define MAXI (int)(1e15 + 100) #define N 1000050 int n, m; vector<int> vec; int dp[(1 << 12) + 1][1005][2]; int cost[1005]; int fun(int mask, int ind, int stage) { if (ind > m - 1) { if (mask ...
/* while(!cin.eof()) */ #include <bits/stdc++.h> using namespace std; #define int long long #define mod (int)(1e9 + 7) #define MAXI (int)(1e15 + 100) #define N 1000050 int n, m; vector<int> vec; int dp[(1 << 12) + 1][1005][2]; int cost[1005]; int fun(int mask, int ind, int stage) { if (ind > m - 1) { if (mask ...
delete
37
44
37
37
0
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long typedef int ll; typedef long double ld; const ll N = 1005; char en = '\n'; ll inf = 1e16; ll mod = 1e9 + 7; ll power(ll x, ll n, ll mod) { ll res = 1; x %= mod; while (n) { if (n & 1) res = (res * x) % mod; x = (x * x) % mod; n ...
#include <bits/stdc++.h> using namespace std; #define int long long typedef int ll; typedef long double ld; const ll N = 1005; char en = '\n'; ll inf = 1e16; ll mod = 1e9 + 7; ll power(ll x, ll n, ll mod) { ll res = 1; x %= mod; while (n) { if (n & 1) res = (res * x) % mod; x = (x * x) % mod; n ...
replace
34
35
34
36
TLE
p02901
C++
Runtime Error
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author parsa bahrami */ #pragma GCC optimize("O2") #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; typedef long long i...
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author parsa bahrami */ #pragma GCC optimize("O2") #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; typedef long long i...
replace
54
55
54
55
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #define inf 9000000000000 #define mx 1003 int n, m; int a[mx], b[mx], c[mx]; ll dp[15][1 << 15]; ll solve(int i, int mask) { if (i == m) { if (mask == (1 << n) - 1) return 0; return inf; } if (mask == (1 << n) - 1) return 0...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define inf 9000000000000 #define mx 1003 int n, m; int a[mx], b[mx], c[mx]; ll dp[mx][1 << 15]; ll solve(int i, int mask) { if (i == m) { if (mask == (1 << n) - 1) return 0; return inf; } if (mask == (1 << n) - 1) return 0...
replace
10
11
10
11
0
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define FOR(...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define FOR(...
replace
46
47
46
47
0
p02901
C++
Time Limit Exceeded
#define DEBUG 1 #include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using ull = unsigned long lon...
#define DEBUG 1 #include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using ull = unsigned long lon...
replace
153
161
153
163
TLE
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, x, n) for (int i = x; i < n; i++) typedef long long ll; const int INF = 1e9 + 7; using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector<int> a(m); vector<int> b(m); vector<vector<int>> c; rep(i, 0, m) { ...
#include <bits/stdc++.h> #define rep(i, x, n) for (int i = x; i < n; i++) typedef long long ll; const int INF = 1e9 + 7; using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector<int> a(m); vector<int> b(m); vector<vector<int>> c; rep(i, 0, m) { ...
replace
26
27
26
27
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define CPP_STR(x) CPP_STR_I(x) #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_STR_I(args...) #args #define CPP_CAT_I(x, y) x##y using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = uint16_t; using i32 = int32_t; using u32 = uint32_t; using i64 = int...
#include <bits/stdc++.h> using namespace std; #define CPP_STR(x) CPP_STR_I(x) #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_STR_I(args...) #args #define CPP_CAT_I(x, y) x##y using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = uint16_t; using i32 = int32_t; using u32 = uint32_t; using i64 = int...
replace
101
102
101
102
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #include <map> using namespace std; int main() { int N, M; cin >> N >> M; int INF = 1e9 + 7; int A[15] = {}; int B[15] = {}; for (int i = 0; i < N; i++) { cin >> A[i]; int b; cin >> b; for (int j = 0; j < b; j++) { int c; cin >> c; B[i] += (1 << (c ...
#include <bits/stdc++.h> #include <map> using namespace std; int main() { int N, M; cin >> N >> M; int INF = 1e9 + 7; int A[1005] = {}; int B[1005] = {}; for (int i = 0; i < M; i++) { cin >> A[i]; int b; cin >> b; for (int j = 0; j < b; j++) { int c; cin >> c; B[i] += (1 <<...
replace
7
10
7
10
0
p02901
C++
Runtime Error
#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; if (c >= 0) return c; r...
#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; if (c >= 0) return c; r...
replace
70
71
70
71
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double db; typedef pair<int, int> pii; const int N = 10000; const db pi = acos(-1.0); #define lowbit(x) (x) & (-x) #define sqr(x) (x) * (x) #define rep(i, a, b) for (register int i = a; i <= b; i++) #define per(i, a, b) for (register int i...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double db; typedef pair<int, int> pii; const int N = 10000; const db pi = acos(-1.0); #define lowbit(x) (x) & (-x) #define sqr(x) (x) * (x) #define rep(i, a, b) for (register int i = a; i <= b; i++) #define per(i, a, b) for (register int i...
replace
17
18
17
18
0
p02901
C++
Runtime Error
// // Created by Hideaki Imamura on 2020-03-23. // #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline boo...
// // Created by Hideaki Imamura on 2020-03-23. // #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline boo...
replace
38
39
38
39
0
p02901
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define MOD (1000000007) using namespace std; ...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define MOD (1000000007) using namespace std; ...
replace
25
26
25
27
0
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define RREP(...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define RREP(...
replace
44
45
44
45
0
p02901
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, j) for (int i = 0; i < j; i++) #define all(obj) (obj).begin(), (obj).end() #define rall(obj) (obj).rbegin(), (obj).rend() typedef long long int ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vi> vvi; typedef ve...
#include <bits/stdc++.h> using namespace std; #define rep(i, j) for (int i = 0; i < j; i++) #define all(obj) (obj).begin(), (obj).end() #define rall(obj) (obj).rbegin(), (obj).rend() typedef long long int ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vi> vvi; typedef ve...
replace
41
48
41
46
TLE
p02901
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define M 1000000000000000000LL #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; typedef vector<ll> vll; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmi...
#include "bits/stdc++.h" using namespace std; #define M 1000000000000000000LL #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; typedef vector<ll> vll; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmi...
replace
29
31
29
33
-11
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; ...
#include <algorithm> #include <bitset> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; ...
replace
274
276
274
276
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #include <iostream> #define ll long long using namespace std; int n, m, a[310], dp[310][(1 << 12) + 10]; vector<int> v[310]; const int Inf = 1e9; int Rec(int i, int Mask) { if (i == m) return (Mask == ((1 << n) - 1) ? 0 : Inf); if (dp[i][Mask] != -1) return dp[i][Mask]; int R...
#include <bits/stdc++.h> #include <iostream> #define ll long long using namespace std; int n, m, a[1010], dp[1010][(1 << 12) + 10]; vector<int> v[1010]; const int Inf = 1e9; int Rec(int i, int Mask) { if (i == m) return (Mask == ((1 << n) - 1) ? 0 : Inf); if (dp[i][Mask] != -1) return dp[i][Mask]; in...
replace
5
7
5
7
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using LL = long long; using P = pair<int, int>; const int Max_N = 15; const int Max_M = 1e3 + 5; int c[Max_M][Max_N]; const int INF = 1e9; int main() { int N, M; cin >> N >> M; vector<int> a(M), b(M); rep(i, M) ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using LL = long long; using P = pair<int, int>; const int Max_N = 15; const int Max_M = 1e3 + 5; int c[Max_M][Max_N]; const int INF = 1e9; int main() { int N, M; cin >> N >> M; vector<int> a(M), b(M); rep(i, M) ...
replace
25
26
25
26
0
p02901
C++
Time Limit Exceeded
#include <cstdio> #include <iostream> #define N 15 #define M 1005 using namespace std; int n, m, a[M], b[M], c[M][N], d[1 << N]; int f(int p, int q) { int i, j, ne, re = 1e9; if (p == 0) return 0; if (q == m) return 1e9; if (d[p]) return d[p]; for (i = q; i < m; i++) { ne = p; for (j = 0...
#include <cstdio> #include <iostream> #define N 15 #define M 1005 using namespace std; int n, m, a[M], b[M], c[M][N], d[1 << N]; int f(int p, int q) { int i, j, ne, re = 1e9; if (p == 0) return 0; if (q == m) return 1e9; if (d[p]) return d[p]; for (i = q; i < m; i++) { ne = p; for (j = 0...
replace
21
22
21
23
TLE
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int MAXN = 11; const int INF = 0x3f3f3f3f; int n, m, f[1 << MAXN]; int main() { cin >> n >> m; memset(f, 255, sizeof(f)); f[0] = 0; for (int i = 1; i <= m; i++) { int a, b; cin >> a >> b; int msk = 0; while (b--) { int t; cin >> t; ...
#include <bits/stdc++.h> using namespace std; const int MAXN = 15; const int INF = 0x3f3f3f3f; int n, m, f[1 << MAXN]; int main() { cin >> n >> m; memset(f, 255, sizeof(f)); f[0] = 0; for (int i = 1; i <= m; i++) { int a, b; cin >> a >> b; int msk = 0; while (b--) { int t; cin >> t; ...
replace
2
3
2
3
0
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n, m) for (int i = (n); i < (int)(m); i++) #define re...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n, m) for (int i = (n); i < (int)(m); i++) #define re...
replace
80
81
80
81
0
p02901
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <vector> #define ll l...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <vector> #define ll l...
replace
41
42
41
42
0
p02901
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; typedef long long ll; const ll MOD = 998244353; const ll INF = 1LL << 60; int dp[1001][1 << 12]; int a[12], b[12], c[12]; int main() { int N, M; cin >> N >> M; for (int i = 0; i < M; i++) { cin >> a[i] >> b[i]; for (int j = 0; j < b[i]; j++) { int k; ...
#include "bits/stdc++.h" using namespace std; typedef long long ll; const ll MOD = 998244353; const ll INF = 1LL << 60; int dp[1001][1 << 12]; int a[1000], b[1000], c[1000]; int main() { int N, M; cin >> N >> M; for (int i = 0; i < M; i++) { cin >> a[i] >> b[i]; for (int j = 0; j < b[i]; j++) { int ...
replace
6
7
6
7
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(m), b(m), c(m); for (int i = 0; i < m; i++) { cin >> a[i] >> b[i]; for (int j = 0; j < b[i]; j++) { int x; cin >> x; x--; c[i] += (1 << x); } } vector<int> dp(1 << n, 1e9); ...
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(m), b(m), c(m); for (int i = 0; i < m; i++) { cin >> a[i] >> b[i]; for (int j = 0; j < b[i]; j++) { int x; cin >> x; x--; c[i] += (1 << x); } } vector<int> dp(1 << n, 1e9); ...
replace
18
20
18
20
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #include <iostream> #include <utility> #include <vector> #define chmin(x, y) x = min(x, y); #define chmax(x, y) x = max(x, y); #define rep(i, j) for (int(i) = 0; (i) < (j); (i)++) #define dump(x) cout << #x << " = " << (x) << endl; #define debug(x) ...
#include <bits/stdc++.h> #include <iostream> #include <utility> #include <vector> #define chmin(x, y) x = min(x, y); #define chmax(x, y) x = max(x, y); #define rep(i, j) for (int(i) = 0; (i) < (j); (i)++) #define dump(x) cout << #x << " = " << (x) << endl; #define debug(x) ...
replace
42
43
42
43
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0; i < ll(n); i++) #define REPR(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, m, n) for (ll i = m; i < ll(n); i++) #define ALL(v) v.begin(), v.end() #define SIZE(x) ll(x.size()) using P = pair<int, int>; template <c...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0; i < ll(n); i++) #define REPR(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, m, n) for (ll i = m; i < ll(n); i++) #define ALL(v) v.begin(), v.end() #define SIZE(x) ll(x.size()) using P = pair<int, int>; template <c...
replace
26
27
26
27
0
p02901
C++
Runtime Error
// g++ -std=c++14 test.cpp -o test.out #include <algorithm> #include <bitset> #include <cassert> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string.h> #include <utility> #include <vector>...
// g++ -std=c++14 test.cpp -o test.out #include <algorithm> #include <bitset> #include <cassert> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string.h> #include <utility> #include <vector>...
replace
46
47
46
47
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define INCANT \ cin.tie(0), cout.tie(0), ios::sync_with_stdio(false), \ cout << fixed << setprecision(20); #define int long long #define gcd __gcd #define all(x) (x).begin(), (x)...
#include <bits/stdc++.h> using namespace std; #define INCANT \ cin.tie(0), cout.tie(0), ios::sync_with_stdio(false), \ cout << fixed << setprecision(20); #define int long long #define gcd __gcd #define all(x) (x).begin(), (x)...
replace
33
34
33
34
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; const int INF = 1001001001; int main() { int N, M; cin >> N >> M; vector<pair<int, int>> key; rep(i, M) { int a, b; cin >> a >> b; int s; rep(j, b) { int c; cin >...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; const int INF = 1001001001; int main() { int N, M; cin >> N >> M; vector<pair<int, int>> key; rep(i, M) { int a, b; cin >> a >> b; int s = 0; rep(j, b) { int c; c...
replace
13
14
13
14
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") #pragma comment(linker, "/stack:200000000") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=nati...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") #pragma comment(linker, "/stack:200000000") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=nati...
replace
116
118
116
118
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define loop(i, n) rep(i, 0, n) using namespace std; using ll = long long; // dp[i][j]={鍵1,...,iを用いて宝箱j(bitsetで管理)を開けるための費用の最小値} constexpr int n_max = 12, m_max = 100; int dp[m_max + 1][1 << n_max]; constexpr int infty = 1e9; int ma...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define loop(i, n) rep(i, 0, n) using namespace std; using ll = long long; // dp[i][j]={鍵1,...,iを用いて宝箱j(bitsetで管理)を開けるための費用の最小値} constexpr int n_max = 12, m_max = 1000; int dp[m_max + 1][1 << n_max]; constexpr int infty = 1e9; int m...
replace
6
7
6
7
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/hash_map> #include <ext/numeric> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; #define REP(i, n) for ((i) = 0; (i) < (n);...
#include <bits/stdc++.h> #include <ext/hash_map> #include <ext/numeric> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; #define REP(i, n) for ((i) = 0; (i) < (n);...
replace
60
61
60
61
0
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <...
#include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <...
replace
66
67
66
67
-11
p02901
C++
Time Limit Exceeded
#include <iostream> #include <vector> #define ANS_MAX 1000000000 #define M_MAX 1000 #define N_MAX 12 using namespace std; long dp[M_MAX][1 << N_MAX]; long price[M_MAX]; vector<vector<int>> keys(M_MAX); int n, m; long caldp(int k, int close) { if (k == m) return close == 0 ? 0 : ANS_MAX; if (dp[k][close] > 0) ...
#include <iostream> #include <vector> #define ANS_MAX 1000000000 #define M_MAX 1000 #define N_MAX 12 using namespace std; long dp[M_MAX][1 << N_MAX]; long price[M_MAX]; vector<vector<int>> keys(M_MAX); int n, m; long caldp(int k, int close) { if (k == m) return close == 0 ? 0 : ANS_MAX; if (close == 0) re...
insert
15
15
15
17
TLE
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define all(x) begin(x), end(x) #define dbg(x) cerr << #x << " = " << x << endl #define _ << ' ' << using namespace std; using ll = long long; using vi = vector<int>; int a[100], mask[100]; int n, m, b, dp[100][1 << 12]; int f(int k, int m) { if (k == ::m) { if (m == (1 << n) - 1) ...
#include <bits/stdc++.h> #define all(x) begin(x), end(x) #define dbg(x) cerr << #x << " = " << x << endl #define _ << ' ' << using namespace std; using ll = long long; using vi = vector<int>; int a[1000], mask[1000]; int n, m, b, dp[1000][1 << 12]; int f(int k, int m) { if (k == ::m) { if (m == (1 << n) - 1) ...
replace
8
10
8
10
0
p02901
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() #define MEMSET...
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() #define MEMSET...
replace
22
23
22
23
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" #define PI 3.14...
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" #define PI 3.14...
replace
18
19
18
19
0
p02901
C++
Runtime Error
// header {{{ #include <bits/stdc++.h> using namespace std; // {U}{INT,LONG,LLONG}_{MAX,MIN} #define INF INT_MAX / 3 #define LLINF LLONG_MAX / 3 #define MOD (1000000007LL) #define MODA(a, b) a = ((a) + (b)) % MOD #define MODP(a, b) a = ((a) * (b)) % MOD #define inc(i, l, r) for (int i = (l); i < (r); i++) #define dec(...
// header {{{ #include <bits/stdc++.h> using namespace std; // {U}{INT,LONG,LLONG}_{MAX,MIN} #define INF INT_MAX / 3 #define LLINF LLONG_MAX / 3 #define MOD (1000000007LL) #define MODA(a, b) a = ((a) + (b)) % MOD #define MODP(a, b) a = ((a) * (b)) % MOD #define inc(i, l, r) for (int i = (l); i < (r); i++) #define dec(...
replace
31
32
31
32
0
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #inc...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #inc...
replace
74
76
74
76
0
p02901
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for (int i = 0; i < ...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for (int i = 0; i < ...
replace
38
39
38
39
0
p02901
C++
Runtime Error
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using lint = int64_t; int main()...
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using lint = int64_t; int main()...
replace
38
39
38
39
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define F first #define S second const int mod = 1e9 + 7, A = 1e3 + 2; int n, m, price[A], masks[888]; ll dp[A][888]; ll solve(int ind, int mask) { if (ind == m) return (mask == (1 << n) - 1 ? 0 : 1e18); if (~dp[ind][mask]) ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define F first #define S second const int mod = 1e9 + 7, A = 1e3 + 2; int n, m, price[A], masks[8888]; ll dp[A][8888]; ll solve(int ind, int mask) { if (ind == m) return (mask == (1 << n) - 1 ? 0 : 1e18); if (~dp[ind][mask]...
replace
7
9
7
9
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define MOD 1000000007 typedef long long int ll; // const ll INF=(ll)1e18; const int INF = (1 << 21); int dp[13][100000]; int main() { int N, M; cin >> N >> M; REP(i, M + 1) REP(...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define MOD 1000000007 typedef long long int ll; // const ll INF=(ll)1e18; const int INF = (1 << 21); int dp[1001][4096]; int main() { int N, M; cin >> N >> M; REP(i, M + 1) REP(...
replace
12
13
12
13
0
p02901
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <time.h> #include <vecto...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <time.h> #include <vecto...
replace
44
45
44
45
TLE
p02901
C++
Runtime Error
// fifer a tak luboin #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #inclu...
// fifer a tak luboin #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #inclu...
replace
36
38
36
38
0
p02901
C++
Runtime Error
/* Author : Aaryan Srivastava ^__^ */ #include <bits/stdc++.h> #include <chrono> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <random> #define pb push_back #define popb pop_back #define mt make_tuple #define eb emplace_back #define mp make_pair #define ff first #define ss secon...
/* Author : Aaryan Srivastava ^__^ */ #include <bits/stdc++.h> #include <chrono> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <random> #define pb push_back #define popb pop_back #define mt make_tuple #define eb emplace_back #define mp make_pair #define ff first #define ss secon...
replace
55
56
55
56
0
p02901
C++
Runtime Error
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; // repetition #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) for (int i = 0; i < (int)(n); i++) // container util #define all(x) (x).begin(), (x).end() // debug #define dump(x) cerr << #x << " = " << (x) << endl; #define...
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; // repetition #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) for (int i = 0; i < (int)(n); i++) // container util #define all(x) (x).begin(), (x).end() // debug #define dump(x) cerr << #x << " = " << (x) << endl; #define...
replace
66
67
66
67
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long MIN(long long x, long long y) { if (x > y) return y; else return x; } int main() { long long INF = 100000000 + 100; // 情報を取り込む int N, M; cin >> N >> M; vector<int> a(M); vector<int> b(M); vector<vector<int>> c(M); for (int i = 0;...
#include <bits/stdc++.h> using namespace std; long long MIN(long long x, long long y) { if (x > y) return y; else return x; } int main() { long long INF = 100000000 + 100; // 情報を取り込む int N, M; cin >> N >> M; vector<int> a(M); vector<int> b(M); vector<vector<int>> c(M); for (int i = 0;...
replace
23
24
23
24
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define all(x) x.begin(), x.end() #define pb(x) push_back(x) #define INF 1000000000000000000 #define IOS \ ios::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define all(x) x.begin(), x.end() #define pb(x) push_back(x) #define INF 1000000000000000000 #define IOS \ ios::sync_with_stdio(false); ...
insert
23
23
23
25
-11
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define int long long using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 1e18; signed main(...
#include <bits/stdc++.h> #define int long long using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 1e18; signed main(...
replace
46
47
46
47
0
p02901
C++
Runtime Error
#include <bits/stdc++.h> #define fio ios_base::sync_with_stdio(false) #define pdl cout << "*" << endl #define MOD 1000000007 #define INF 1000000000 #define INFLL 1000000000000000000ll #define ff first #define ss second #define long int64_t using namespace std; typedef pair<int, int> pii; typedef pair<long, long> pll; m...
#include <bits/stdc++.h> #define fio ios_base::sync_with_stdio(false) #define pdl cout << "*" << endl #define MOD 1000000007 #define INF 1000000000 #define INFLL 1000000000000000000ll #define ff first #define ss second #define long int64_t using namespace std; typedef pair<int, int> pii; typedef pair<long, long> pll; m...
replace
28
29
28
29
0