buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const ll mxn = 5e5 + 5; // check for forloop // intialize variable // overflow // go for easy solution #define mod 1000000007 ll INF = 1000000000000000005LL; #define endl '\n' void rishabh() { ios_base::sync_with_stdio...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const ll mxn = 5e5 + 5; // check for forloop // intialize variable // overflow // go for easy solution #define mod 1000000007 ll INF = 1000000000000000005LL; #define endl '\n' void rishabh() { ios_base::sync_with_stdio...
[["-", 12, 2, 3, 4, 0, 83, 0, 16, 31, 22], ["+", 12, 2, 3, 4, 0, 83, 0, 16, 31, 22]]
1
160
#include <bits/stdc++.h> using namespace std; #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) #define debug(x) cerr << x << endl typedef long long int ll; typedef long double ld; typedef pair<int, int> P; template <typename T> struct V : vector<T> { using vector<T>::vector; }; V()-...
#include <bits/stdc++.h> using namespace std; #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) #define debug(x) cerr << x << endl typedef long long int ll; typedef long double ld; typedef pair<int, int> P; template <typename T> struct V : vector<T> { using vector<T>::vector; }; V()-...
[["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 13], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48]]
1
452
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define MOD 1000000007 template <typename Type> istream &operator>>(istream &in, vector<Type> &vec) { ll n = vec.size(); for (ll i = 0; i < n; i++) in >> vec[i]; return in; } template <typename Type> ostream &operator<...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define MOD 1000000007 template <typename Type> istream &operator>>(istream &in, vector<Type> &vec) { ll n = vec.size(); for (ll i = 0; i < n; i++) in >> vec[i]; return in; } template <typename Type> ostream &operator<...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22]]
1
227
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define si(a) scanf("%d", &a) #define si2(a, b) scanf("%d%d", &a, &b) #define sl(a) scanf("%lld", &a) #define sl2(a, b) scanf("%lld%lld", &a, &b) #define pb push_back #define mk make_pair #define loop(n) for (int i = 0; i < n; i++) #de...
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define si(a) scanf("%d", &a) #define si2(a, b) scanf("%d%d", &a, &b) #define sl(a) scanf("%lld", &a) #define sl2(a, b) scanf("%lld%lld", &a, &b) #define pb push_back #define mk make_pair #define loop(n) for (int i = 0; i < n; i++) #de...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
178
#include <bits/stdc++.h> #define int long long #define rep1(i, a, b) for (int i = a; i < b; i++) #define rep2(i, a, b) for (int i = a; i >= b; i--) #define mod 1000000009 #define garou \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> #define int long long #define rep1(i, a, b) for (int i = a; i < b; i++) #define rep2(i, a, b) for (int i = a; i >= b; i--) #define mod 1000000009 #define garou \ ios_base::sync_with_stdio(false); ...
[["-", 0, 11, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 31, 22]]
1
189
#include <iostream> using namespace std; typedef long long ll; int main(void) { ll a, b, c, d, result; cin >> a >> b >> c >> d; if (result < a * d) result = a * d; if (result < b * c) result = b * c; if (result < b * d) result = b * d; cout << result << endl; return 0; }
#include <iostream> using namespace std; typedef long long ll; int main(void) { ll a, b, c, d, result; cin >> a >> b >> c >> d; result = a * c; if (result < a * d) result = a * d; if (result < b * c) result = b * c; if (result < b * d) result = b * d; cout << result << endl; return 0; }...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
90
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; long long int A[4]; A[0] = (a * c); A[1] = (b * c); A[2] = (a * d); A[3] = (b * d); sort(A, A + 4); cout << (A[3]) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, c, d; cin >> a >> b >> c >> d; long long int A[4]; A[0] = (a * c); A[1] = (b * c); A[2] = (a * d); A[3] = (b * d); sort(A, A + 4); cout << (A[3]) << endl; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
103
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("O3") #include <bits/stdc++.h> #include <chrono> using namespace std::chrono; #define fl(i, z, n) for (int i = z; i <= (n); i++) #define flr(i, z, n) for (int i = z; i >= (n); i--) using namespace std; #define ll long ...
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("O3") #include <bits/stdc++.h> #include <chrono> using namespace std::chrono; #define fl(i, z, n) for (int i = z; i <= (n); i++) #define flr(i, z, n) for (int i = z; i >= (n); i--) using namespace std; #define ll long ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
270
a, b, c, d = map(int, input().split()) max([a * c, a * d, b * c, b * d])
a, b, c, d = map(int, input().split()) print(max([a * c, a * d, b * c, b * d]))
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
40
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, b * d), max(a * d, b * c)) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, b * d), max(a * d, b * c)) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
60
#include <bits/stdc++.h> #include <cmath> #define ll int #define mod (long long)(1e9 + 7) // #define endl "\n" using namespace std; #define ld long double // unordered_map<_____,_____,custom_hash> struct custom_hash { static uint64_t splitmix64(uint64_t x) { // http://xorshift.di.unimi.it/splitmix64.c x += 0x...
#include <bits/stdc++.h> #include <cmath> #define ll long long #define mod (long long)(1e9 + 7) // #define endl "\n" using namespace std; #define ld long double // unordered_map<_____,_____,custom_hash> struct custom_hash { static uint64_t splitmix64(uint64_t x) { // http://xorshift.di.unimi.it/splitmix64.c x...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22]]
1
192
#include <iostream> using namespace std; #include <algorithm> #include <map> #include <string> #include <vector> typedef long long ll; #include <cmath> #include <iomanip> const int MOD = 1000000007; int main(int argc, char *argv[]) { ll a, b, c, d; cin >> a >> b >> c >> d; ll ret = a * c, ad = a * d, bc = b * ...
#include <iostream> using namespace std; #include <algorithm> #include <map> #include <string> #include <vector> typedef long long ll; #include <cmath> #include <iomanip> const int MOD = 1000000007; int main(int argc, char *argv[]) { ll a, b, c, d; cin >> a >> b >> c >> d; ll ret = a * c, ad = a * d, bc = b * ...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
126
a, b, c, d = map(int, input().split()) print(max([a*c, a*d, b*d, b*d]))
a, b, c, d = map(int, input().split()) print(max([a*c, a*d, b*c, b*d]))
[["-", 0, 652, 3, 4, 0, 634, 0, 657, 12, 22], ["+", 0, 652, 3, 4, 0, 634, 0, 657, 12, 22]]
5
43
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d; cin >> a >> b >> c >> d; cout << max({0LL, b * d, a * c, a * d, b * c}); }
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d; cin >> a >> b >> c >> d; cout << max({b * d, a * c, a * d, b * c}); }
[["-", 0, 16, 12, 2, 3, 4, 0, 83, 0, 13], ["-", 0, 16, 12, 2, 3, 4, 0, 83, 0, 21]]
1
57
a, b, c, d = [int(i) for i in input()] print(max([a * d, a * c, b * c, b * d]))
a, b, c, d = [int(i) for i in input().split()] print(max([a * d, a * c, b * c, b * d]))
[["+", 12, 658, 0, 659, 12, 652, 63, 319, 0, 131], ["+", 12, 658, 0, 659, 12, 652, 63, 319, 319, 22], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 24], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 25]]
5
43
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int main() { // freopen("input.txt", "r", stdin); long long a, b, c, d; scanf("%lld %lld %ll...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int main() { // freopen("input.txt", "r", stdin); long long a, b, c, d; scanf("%lld %lld %ll...
[["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
169
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define forn(i, n) for (ll i = 0; i < (ll)(n); ++i) #define ll long long int main() { ios::sync_with_stdio(false); cin.tie(nullpt...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define forn(i, n) for (ll i = 0; i < (ll)(n); ++i) #define ll long long int main() { ios::sync_with_stdio(false); cin.tie(nullpt...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
132
n = list(map(int,input().split())) a =n[0]*n[2] b =n[0]*n[3] c =n[1]*n[2] d =n[0]*n[3] x = max(a,b,c,d) print(x)
n = list(map(int,input().split())) a =n[0]*n[2] b =n[0]*n[3] c =n[1]*n[2] d =n[1]*n[3] x = max(a,b,c,d) print(x)
[["-", 0, 1, 0, 662, 12, 657, 31, 206, 206, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 206, 206, 612]]
5
77
#include <bits/stdc++.h> using namespace std; #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \ c i) { sim ...
#include <bits/stdc++.h> using namespace std; #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \ c i) { sim ...
[["+", 36, 36, 36, 36, 0, 30, 0, 42, 0, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 42, 0, 151], ["+", 36, 36, 36, 36, 0, 30, 0, 42, 0, 35]]
1
380
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int res = a * c; res = max(res, a * d); res = max(res, b * c); res = max(res, b * d); cout << res << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d; cin >> a >> b >> c >> d; long long res = a * c; res = max(res, a * d); res = max(res, b * c); res = max(res, b * d); cout << res << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
77
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i < (n + 1); ++i) const double PI = 3.141592653589793238463; using namespace std; using ll = long long; const ll INF = 1LL << 50; typedef pair<int, int> P; const int mod = 1e9 + 7; struct ...
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i < (n + 1); ++i) const double PI = 3.141592653589793238463; using namespace std; using ll = long long; const ll INF = 1LL << 50; typedef pair<int, int> P; const int mod = 1e9 + 7; struct ...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22], ["-", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]]
1
677
#include <bits/stdc++.h> #define io \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define lli long long int #define fast ...
#include <bits/stdc++.h> #define io \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define lli long long int #define fast ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22]]
1
159
#include <bits/stdc++.h> using namespace std; main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, a * d), max(b * c, b * d)); }
#include <bits/stdc++.h> using namespace std; #define int long long main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, a * d), max(b * c, b * d)); }
[["+", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]]
1
57
#include <bits/stdc++.h> #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define PI acos(-1.0) #define sq(n...
#include <bits/stdc++.h> #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define PI acos(-1.0) #define sq(n...
[["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22]]
1
140
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d, e; cin >> a >> b >> c >> d; e = a * c; if (e < a * d) { e = a * d; } if (e < b * c) { e = a * b; } if (e < b * d) { e = b * d; } cout << e; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d, e; cin >> a >> b >> c >> d; e = a * c; if (e < a * d) { e = a * d; } if (e < b * c) { e = b * c; } if (e < b * d) { e = b * d; } cout << e; return 0; }
[["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
95
#include <bits/stdc++.h> using namespace std; #define IO \ { \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define IO \ { \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
[["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22]]
1
99
#include <algorithm> #include <climits> #include <iostream> using namespace std; int main() { int a, b, c, d; int result = INT_MIN; cin >> a >> b >> c >> d; result = max(a * c, a * d); result = max(result, b * c); result = max(result, b * d); cout << result << endl; }
#include <algorithm> #include <climits> #include <iostream> using namespace std; int main() { long long a, b, c, d; long long result = LLONG_MIN; cin >> a >> b >> c >> d; result = max(a * c, a * d); result = max(result, b * c); result = max(result, b * d); cout << result << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]]
1
81
a,b,c,d = map(int, input().split()) l = [a*c, a*d, b*c, b*d] print(max[l])
a,b,c,d = map(int, input().split()) l = [a*c, a*d, b*c, b*d] print(max(l))
[["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 70], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 73], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
46
#include <bits/stdc++.h> using namespace std; #define io ios::sync_with_stdio(false) #define pb push_back #define pqueue priority_queue #define fi first #define se second #define ls rt << 1 #define rs rt << 1 | 1 #define sz(x) (int)(x).size() #define dbg(x) cout << #x << " --- " << x << endl #define mst(x, a) memset(x...
#include <bits/stdc++.h> using namespace std; #define io ios::sync_with_stdio(false) #define pb push_back #define pqueue priority_queue #define fi first #define se second #define ls rt << 1 #define rs rt << 1 | 1 #define sz(x) (int)(x).size() #define dbg(x) cout << #x << " --- " << x << endl #define mst(x, a) memset(x...
[["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 8, 7, 8, 9, 0, 45], ["+", 8, 9, 0, 7, 8, 7, 8, 9, 0, 46]]
1
272
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int x1, x2, x3, x4; x1 = a * c; x2 = a * d; x3 = b * c; x4 = b * d; x1 = max(x1, x2); x3 = max(x3, x4); cout << max(x1, x3) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t a, b, c, d; cin >> a >> b >> c >> d; int64_t x1, x2, x3, x4; x1 = a * c; x2 = a * d; x3 = b * c; x4 = b * d; x1 = max(x1, x2); x3 = max(x3, x4); cout << max(x1, x3) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
93
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; vector<int> x; cin >> a >> b >> c >> d; x.push_back(a * c); x.push_back(a * d); x.push_back(b * d); x.push_back(b * c); sort(x.begin(), x.end()); reverse(x.begin(), x.end()); cout << x.at(0); }
#include <bits/stdc++.h> using namespace std; int main() { int64_t a, b, c, d; vector<int64_t> x; cin >> a >> b >> c >> d; x.push_back(a * c); x.push_back(a * d); x.push_back(b * d); x.push_back(b * c); sort(x.begin(), x.end()); reverse(x.begin(), x.end()); cout << x.at(0); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]]
1
112
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { long long int a, b, c, d; scanf("%lld %lld %lld %lld", &a, &b, &c, &d); long long int ans = a * c; if (a * d > ans) ans = a * d; else if (b * c > ans) ans = b * c; else if (b * d > ans) ans = b * d; ...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { long long int a, b, c, d; scanf("%lld %lld %lld %lld", &a, &b, &c, &d); long long int ans = a * c; if (a * d > ans) ans = a * d; if (b * c > ans) ans = b * c; if (b * d > ans) ans = b * d; printf("%l...
[["-", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]]
0
111
a,b,c,d=list(map(int, input().split())) ac=a*c ad=a*d bc=b*c cd=b*d print(max([ac,ad,bc,bd]))
a,b,c,d=list(map(int, input().split())) ac=a*c ad=a*d bc=b*c bd=b*d print(max([ac,ad,bc,bd]))
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
58
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long int a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * c, a * d, b * c, b * d}) << endl; /*vector<unsigned long long int> input_vec(N); for (int i = 0; i < N; i++) { cin >> input_vec.at(i); } for (int i = 0; i < input...
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * c, a * d, b * c, b * d}) << endl; /*vector<unsigned long long int> input_vec(N); for (int i = 0; i < N; i++) { cin >> input_vec.at(i); } for (int i = 0; i < input_vec.size...
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87]]
1
60
#include <bits/stdc++.h> #define ll long long #define pb push_back #define se second #define fr first using namespace std; const ll N = 2e5 + 7; ll n, m, k, a, cnt, ans, b, c, d, sum, sum1, mx, mx1; vector<pair<ll, ll>> p; map<ll, ll> mp; int main() { cin >> a >> b >> c >> d; cnt = a * d; ans = a * d; sum = b ...
#include <bits/stdc++.h> #define ll long long #define pb push_back #define se second #define fr first using namespace std; const ll N = 2e5 + 7; ll n, m, k, a, cnt, ans, b, c, d, sum, sum1, mx, mx1; vector<pair<ll, ll>> p; map<ll, ll> mp; int main() { cin >> a >> b >> c >> d; cnt = a * d; ans = a * c; sum = b ...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
139
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * c, a * d, b * c, b * d}) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * c, a * d, b * c, b * d}) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
56
#include <iostream> int main() { int a, b, c, d, res[5]; std::cin >> a >> b >> c >> d; res[0] = a * c; res[1] = a * d; res[2] = b * c; res[3] = b * d; for (int i = 1; i < 4; i++) { if (res[i] > res[0]) { res[0] = res[i]; } } std::cout << res[0] << std::endl; return 0; }
#include <iostream> int main() { long long int a, b, c, d, res[5]; std::cin >> a >> b >> c >> d; res[0] = a * c; res[1] = a * d; res[2] = b * c; res[3] = b * d; for (int i = 1; i < 4; i++) { if (res[i] > res[0]) { res[0] = res[i]; } } std::cout << res[0] << std::endl; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
126
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int INF = 1001001001; int main() { int a, b, c, d, ans; int m1, m2, m3, m4; cin >> a >> b >> c >> d; m1 = b * d; m2 = a * c; m3 = a * d; m4 = b * c; ...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int INF = 1001001001; int main() { ll a, b, c, d, ans; ll m1, m2, m3, m4; cin >> a >> b >> c >> d; m1 = b * d; m2 = a * c; m3 = a * d; m4 = b * c; a...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
123
a,b,c,d=map(int,input().split()) ans=a*c ans=max(ans,b*c) ans=max(ans,a*c) ans=max(ans,a*d) print(ans)
a,b,c,d=map(int,input().split()) ans=a*c ans=max(ans,b*c) ans=max(ans,a*d) ans=max(ans,b*d) print(ans)
[["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 22], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22]]
5
59
#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<int, null_type, less<int>, 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<int, null_type, less<int>, rb_tree_tag, \ ...
[["-", 51, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["-", 51, 2, 3, 4, 0, 2, 3, 4, 0, 21], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 21], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 22]]
1
171
#include <bits/stdc++.h> #define ll long long int M = 1e9 + 7; using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; ll max = 0; max = a * c; if (a * d > max) max = a * d; if (b * c > max) max = b * c; if (b * d > max) max = b * d; cout << max; return 0; }
#include <bits/stdc++.h> #define ll long long int M = 1e9 + 7; using namespace std; int main() { ll a, b, c, d; cin >> a >> b >> c >> d; ll max; max = a * c; if (a * d > max) max = a * d; if (b * c > max) max = b * c; if (b * d > max) max = b * d; cout << max; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
101
a, b, c, d = map(int, input().split()) ac = a*c ad = a*d bc = b*d bd = b*d ans = ac if ans < ad: ans = ad if ans < bc: ans = bc if ans < bd: ans = bd print(ans)
a, b, c, d = map(int, input().split()) ac = a*c ad = a*d bc = b*c bd = b*d ans = ac if ans < ad: ans = ad if ans < bc: ans = bc if ans < bd: ans = bd print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]]
5
71
#include <bits/stdc++.h> using namespace std; int main() { long long t = 1, n, i, a, b, c, d; // cin>>t; while (t--) { cin >> a, b, c, d; cout << max(max(a * c, a * d), max(b * c, b * d)) << '\n'; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long t = 1, n, i, a, b, c, d; // cin>>t; while (t--) { cin >> a >> b >> c >> d; cout << max(max(a * c, a * d), max(b * c, b * d)) << '\n'; } return 0; }
[["-", 0, 52, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 34, 12, 34, 0, 21], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 0, 1, 0, 34, 12, 34, 12, 34, 0, 21], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152]]
1
82
#include <bits/stdc++.h> using namespace std; #define online_judge \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define fastio ...
#include <bits/stdc++.h> using namespace std; #define online_judge \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define fastio ...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
578
a, b, c, d = [int(s) for s in input().split()] return max(a * c, a * d, b *c, b * d)
a, b, c, d =[int(s) for s in input().split()] print(max(a * c, a * d, b * c, b * d))
[["-", 36, 36, 36, 36, 0, 656, 0, 37, 0, 38], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
43
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]]
1
3,679
a,b,c,d = map(int,input().split()) answer = 0 ac =a*c ad = a*d bc = b*C bd = b*d answer = max(ac,ad) answer = max(answer,bc) answer = max(answer,bd) print(answer)
a,b,c,d = map(int,input().split()) answer = 0 ac =a*c ad = a*d bc = b*c bd = b*d answer = max(ac,ad) answer = max(answer,bc) answer = max(answer,bd) print(answer)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]]
5
71
#include <bits/stdc++.h> #include <functional> #include <stdio.h> using namespace std; #define ll long long int #define dd long double #define pb push_back #define pf push_front #define pi pair<ll, ll> #define vi vector<ll> #define vpi vector<pi> #define mi map<ll, ll> #define vvi vector<vector<ll>> #define mpi map<pi,...
#include <bits/stdc++.h> #include <functional> #include <stdio.h> using namespace std; #define ll long long int #define dd long double #define pb push_back #define pf push_front #define pi pair<ll, ll> #define vi vector<ll> #define vpi vector<pi> #define mi map<ll, ll> #define vvi vector<vector<ll>> #define mpi map<pi,...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
443
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long int main() { ll a, b, c, d; cin >> a >> b >> c >> d; cout << max(a * c, max(a * d, max(b * c, b * c))); }
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long int main() { ll a, b, c, d; cin >> a >> b >> c >> d; cout << max(a * c, max(a * d, max(b * c, b * d))); }
[["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22]]
1
64
#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; int main() { ll a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * c, a * d, b * c, b * c}); return 0; }
#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; int main() { ll a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * c, a * d, b * c, b * d}); return 0; }
[["-", 12, 2, 3, 4, 0, 83, 0, 16, 12, 22], ["+", 12, 2, 3, 4, 0, 83, 0, 16, 12, 22]]
1
76
// Code for B - Product Max #include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define FOR(i, x, y) for (ll i = x; i < (ll)(y); i++) #define MOD 1000000007 #define mod(x) ((x) % MOD + MOD) % MOD #define debug(var) ...
// Code for B - Product Max #include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define FOR(i, x, y) for (ll i = x; i < (ll)(y); i++) #define MOD 1000000007 #define mod(x) ((x) % MOD + MOD) % MOD #define debug(var) ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
280
#include <bits/stdc++.h> using namespace std; int main() { int l, r, ll, rr; cin >> l >> r >> ll >> rr; cout << max({r * rr, l * ll, r * ll, l * rr}); }
#include <bits/stdc++.h> using namespace std; int main() { long long l, r, ll, rr; cin >> l >> r >> ll >> rr; cout << max({r * rr, l * ll, r * ll, l * rr}); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
54
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 #define pb push_back #define ff first #define ss second typedef pair<int, int> pp; bool com(pp x, pp y) { return x.ff < y.ff; } int N = 1e5 + 9; ll multiply(ll x, ll y) { return ((x % mod) * (y % mod)) % mod; } ll sum(ll x, ll...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 #define pb push_back #define ff first #define ss second typedef pair<int, int> pp; bool com(pp x, pp y) { return x.ff < y.ff; } int N = 1e5 + 9; ll multiply(ll x, ll y) { return ((x % mod) * (y % mod)) % mod; } ll sum(ll x, ll...
[["+", 0, 11, 12, 2, 3, 4, 0, 2, 63, 22], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22]]
1
211
#include <bits/stdc++.h> using namespace std; typedef long long ll; int t, n; int a, b, c, d; int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> a >> b >> c >> d; cout << max(a * c, max(a * d, max(b * c, b * d))) << endl; return ~~(0 ^ 0); }
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll a, b, c, d; int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> a >> b >> c >> d; cout << max(a * c, max(a * d, max(b * c, b * d))) << endl; return ~~(0 ^ 0); }
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78]]
1
93
#include <algorithm> #include <iostream> #include <set> #include <string> #include <iomanip> #include <locale> #include <regex> using namespace std; using ll = long long; #define OVERLOAD3(_1, _2, _3, name, ...) name #define REP(i, n) REPI(i, 0, n) #define REPI(i, a, b) for (int i = int(a), i##_Len = int(b); i < i##...
#include <algorithm> #include <iostream> #include <set> #include <string> #include <iomanip> #include <locale> #include <regex> using namespace std; using ll = long long; #define OVERLOAD3(_1, _2, _3, name, ...) name #define REP(i, n) REPI(i, 0, n) #define REPI(i, a, b) for (int i = int(a), i##_Len = int(b); i < i##...
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 34, 12, 34, 0, 21], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 0, 1, 0, 34, 12, 34, 12, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
124
import sys import collections as cc import math as mt I=lambda:list(map(int,input().split())) a,b,c,d=I() print(max(a*c,a*d,b*d,b*d))
import sys import collections as cc import math as mt I=lambda:list(map(int,input().split())) a,b,c,d=I() print(max(a*c,a*d,b*c,b*d))
[["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22]]
5
61
// #pragma GCC target ("avx2") // #pragma GCC optimization ("O2") // #pragma GCC optimization ("unroll-loops") #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef long double ld; // #define int ll #define pb push_back #define pob pop_back #define __bp __builtin_popcount using pii = pair<int, int...
// #pragma GCC target ("avx2") // #pragma GCC optimization ("O2") // #pragma GCC optimization ("unroll-loops") #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef long double ld; // #define int ll #define pb push_back #define pob pop_back #define __bp __builtin_popcount using pii = pair<int, int...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
306
a,b,c,d=map(int,input().split()) ans=max[(b*d),(a*c),(a*d),(b*c)] print(ans)
a,b,c,d=map(int,input().split()) ans=max([(b*d),(a*c),(a*d),(b*c)]) print(ans)
[["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
52
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define FOR(S, F) for (int i = S; i < F; i++) #define FOR2(S, F) for (int j = S; j < F; j++) using ull = long long int; int main() { ull a, b, c, d, Max; cin >> a >> b >> c >> d; Max = a * c; if (a...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define FOR(S, F) for (int i = S; i < F; i++) #define FOR2(S, F) for (int j = S; j < F; j++) using ull = long long int; int main() { ull a, b, c, d, Max; cin >> a >> b >> c >> d; Max = a * c; if (a...
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
123
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_set> #include <...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_set> #include <...
[["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22]]
1
476
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); long long a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * b, a * c, b * c, b * d}) << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); long long a, b, c, d; cin >> a >> b >> c >> d; cout << max({a * c, a * d, b * c, b * d}) << '\n'; return 0; }
[["-", 12, 2, 3, 4, 0, 83, 0, 16, 12, 22], ["+", 12, 2, 3, 4, 0, 83, 0, 16, 12, 22]]
1
76
#include <bits/stdc++.h> #define rep(i, n) for (int i = (0); i < (n); i++) using namespace std; typedef long long ll; 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; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = (0); i < (n); i++) using namespace std; typedef long long ll; 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; ...
[["-", 12, 2, 3, 4, 0, 83, 0, 16, 12, 22], ["+", 12, 2, 3, 4, 0, 83, 0, 16, 12, 22]]
1
157
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, a * d), max(b * c, b * d)); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, a * d), max(b * c, b * d)); return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
61
a,b,c,d=map(int,input().split()) print(mac(max(a*c,a*d),max(b*c,b*d)))
a,b,c,d=map(int,input().split()) print(max(max(a*c,a*d),max(b*c,b*d)))
[["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22]]
5
47
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back #define all(x) (x).begin(), (x).end() #define mem0(x) memset(x, 0, sizeof(x)) #define mem1(x) memset(x, -1, sizeof(x)) typedef long long ll; typedef vector<int> vi; typedef vector<vi> vv...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back #define all(x) (x).begin(), (x).end() #define mem0(x) memset(x, 0, sizeof(x)) #define mem1(x) memset(x, -1, sizeof(x)) typedef long long ll; typedef vector<int> vi; typedef vector<vi> vv...
[["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13]]
1
191
# ------------------- fast io -------------------- import os import sys from io import BytesIO, IOBase BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode...
# ------------------- fast io -------------------- import os import sys from io import BytesIO, IOBase BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode...
[["-", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22]]
5
702
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using ll = long long; using ull = unsigned long long; using namespac...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using ll = long long; using ull = unsigned long long; using namespac...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]]
1
523
#include <bits/stdc++.h> using namespace std; // -----------------<fast IO>------------------ #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; // -----------------<fast IO>------------------ #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
185
#include <bits/stdc++.h> using namespace std; #define int long long int signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a, b, c, d; cin >> a >> b >> c >> d; int ans = max({a * c, b * d, a * d, a * c}); cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; #define int long long int signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a, b, c, d; cin >> a >> b >> c >> d; int ans = max({a * c, b * d, a * d, b * c}); cout << ans; return 0; }
[["-", 51, 2, 3, 4, 0, 83, 0, 16, 31, 22], ["+", 51, 2, 3, 4, 0, 83, 0, 16, 31, 22]]
1
86
#define IO \ ios::sync_with_stdio(false); \ cin.tie(); \ cout.tie(0) #pragma GCC optimize(2) #include <algorithm> #include <cmath> #...
#define IO \ ios::sync_with_stdio(false); \ cin.tie(); \ cout.tie(0) #pragma GCC optimize(2) #include <algorithm> #include <cmath> #...
[["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22]]
1
129
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) typedef long long ll; const ll M = 1000000007; //------------------------------------------// int main() { int a, b, c, d; cin >> a >> b >> c >> d; int x = max(a * c, a * d); int y = max(b * c, b * d); cout << ma...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) typedef long long ll; const ll M = 1000000007; //------------------------------------------// int main() { ll a, b, c, d; cin >> a >> b >> c >> d; ll x = max(a * c, a * d); ll y = max(b * c, b * d); cout << max(x...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
91
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define f first #define se second #define pb push_back #define ms memset #define MOD 1000000007 #define MOD2 1000000009 #define sp fixed << setprecision #define sz(x) (int)(x).size() #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend()...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define f first #define se second #define pb push_back #define ms memset #define MOD 1000000007 #define MOD2 1000000009 #define sp fixed << setprecision #define sz(x) (int)(x).size() #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend()...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]]
1
538
#include <bits/stdc++.h> #include <cstdio> using namespace std; typedef long long int ll; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false;...
#include <bits/stdc++.h> #include <cstdio> using namespace std; typedef long long int ll; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false;...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
189
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d; cin >> a >> b >> c >> d; long long p1 = a * d; long long p2 = b * d; long long p3 = a * c; long long p4 = b * c; cout << max(max(p1, p2), max(p2, p3)); }
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, d; cin >> a >> b >> c >> d; long long p1 = a * d; long long p2 = b * d; long long p3 = a * c; long long p4 = b * c; cout << max(max(p1, p2), max(p4, p3)); }
[["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 22]]
1
83
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define pii pair<int, int> #define F first #define S second #define ll long long #define io \ ios_base::sync_with_stdio(0); \ cin.tie(0);...
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define pii pair<int, int> #define F first #define S second #define ll long long #define io \ ios_base::sync_with_stdio(0); \ cin.tie(0);...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
96
eval'A,B,C,D='+`tr ' ' ,` p [A*C,A*D,B*C,B*C].max
eval'A,B,C,D='+`tr ' ' ,` p [A*C,A*D,B*C,B*D].max
[["-", 3, 4, 0, 652, 486, 516, 0, 738, 12, 743], ["+", 3, 4, 0, 652, 486, 516, 0, 738, 12, 743]]
4
28
a, b, c, d = gets.split.map &:to_i p [a*c, a*d, b*c, b*c].max
a, b, c, d = gets.split.map &:to_i p [a*c, a*d, b*c, b*d].max
[["-", 3, 4, 0, 652, 486, 516, 0, 738, 12, 22], ["+", 3, 4, 0, 652, 486, 516, 0, 738, 12, 22]]
4
35
#include <iostream> using namespace std; int main(void) { int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, b * d), max(a * d, b * c)); }
#include <iostream> using namespace std; int main(void) { long a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, b * d), max(a * d, b * c)); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
59
a, b, c, d = [int(x) for x in input().split()] print(max(a*c,b*d,a*b,b*c))
a, b, c, d = [int(x) for x in input().split()] print(max(a*c,b*d,a*d,b*c))
[["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22]]
5
45
#include <bits/stdc++.h> #define f first #define s second #define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i) #define pb push_back #define all(s) begin(s), end(s) #define lb(c, x) distance((c).begin(), lower_bound(all(c), (x))) #define ub(c, x) distance((c).begin(), upper_bound(all(c), (x))) #define _ ...
#include <bits/stdc++.h> #define f first #define s second #define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i) #define pb push_back #define all(s) begin(s), end(s) #define lb(c, x) distance((c).begin(), lower_bound(all(c), (x))) #define ub(c, x) distance((c).begin(), upper_bound(all(c), (x))) #define _ ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
1,399
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int x, y; x = max(a * c, a * d); y = max(b * c, b * d); int ans = max(x, y); cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; int main() { ll a, b, c, d; cin >> a >> b >> c >> d; ll x, y; x = max(a * c, a * d); y = max(b * c, b * d); ll ans = max(x, y); cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
91
#include <algorithm> #include <cstdio> #define SF scanf #define PF printf #define MAXN 100010 using namespace std; typedef long long ll; ll a, b, c, d, ans; int main() { SF("%lld%lld%lld%lld", &a, &b, &c, &d); ans = a * c; ans = max(ans, b * c); ans = max(ans, a * d); ans = max(ans, c * d); PF("%lld", ans);...
#include <algorithm> #include <cstdio> #define SF scanf #define PF printf #define MAXN 100010 using namespace std; typedef long long ll; ll a, b, c, d, ans; int main() { SF("%lld%lld%lld%lld", &a, &b, &c, &d); ans = a * c; ans = max(ans, b * c); ans = max(ans, a * d); ans = max(ans, b * d); PF("%lld", ans);...
[["-", 0, 11, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 31, 22]]
1
106
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string.h> #include <s...
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string.h> #include <s...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22]]
1
297
#include <bits/stdc++.h> using namespace std; #define pb push_back #define int unsigned long long int signed main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, b * d), max(a * d, b * c)) << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; #define pb push_back #define int long long int signed main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << max(max(a * c, b * d), max(a * d, b * c)) << "\n"; return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]]
1
71
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; using p = pair<int, int>; using Graph = vector<vector<int>>; int main(int argc, const char *argv[]) { cin.tie(0); ios::sync_with_stdio(false); int a, b, c, d; cin >> a >> b >> c >> d; int ans = -...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; using p = pair<int, int>; using Graph = vector<vector<int>>; int main(int argc, const char *argv[]) { cin.tie(0); ios::sync_with_stdio(false); ll a, b, c, d; cin >> a >> b >> c >> d; ll ans = -10...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
147
package main import ( "bufio" "fmt" "math" "math/big" "os" "strconv" ) func powmod(x int64, y int64, m int64) int64 { res := new(big.Int).Exp(big.NewInt(x), big.NewInt(y), big.NewInt(m)) return res.Int64() } var ( scanner = bufio.NewScanner(os.Stdin) ) func readInt() (read int) { scanner.Scan() read, err...
package main import ( "bufio" "fmt" "math" "math/big" "os" "strconv" ) func powmod(x int64, y int64, m int64) int64 { res := new(big.Int).Exp(big.NewInt(x), big.NewInt(y), big.NewInt(m)) return res.Int64() } var ( scanner = bufio.NewScanner(os.Stdin) ) func readInt() (read int) { scanner.Scan() read, err...
[["+", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["+", 0, 435, 8, 196, 0, 436, 31, 432, 0, 22], ["+", 0, 434, 0, 435, 8, 196, 0, 436, 17, 132], ["+", 0, 435, 8, 196, 0, 436, 12, 432, 0, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22], ["-", 36, 36, 36, 36, 36, 36, 0, 434, 0, 165]]
7
274
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines def main(): N = int(readline()) K = int(1e9) + 7 ans = pow(10, N, K) - pow(9, N, K) - pow(9, N, K) + pow(8, N, K) print(ans) if __name__ == '__main__': main()
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines def main(): N = int(readline()) K = int(1e9) + 7 ans = pow(10, N, K) - pow(9, N, K) - pow(9, N, K) + pow(8, N, K) print(ans%K) if __name__ == '__main__': main()
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
101
#include <bits/stdc++.h> using namespace std; #define ll long long const int m = 1e9 + 7; ll binpow(ll a, ll b) { a %= m; ll res = 1; while (b) { if (b & 1) { res = (res * a) % m; } a = (a * a) % m; b >>= 1; } return res; } int main() { ll n; cin >> n; cout << (binpow(10LL, n) - (2...
#include <bits/stdc++.h> using namespace std; #define ll long long const int m = 1e9 + 7; ll binpow(ll a, ll b) { a %= m; ll res = 1; while (b) { if (b & 1) { res = (res * a) % m; } a = (a * a) % m; b >>= 1; } return res; } int main() { ll n; cin >> n; cout << ((binpow(10LL, n) - (...
[["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]]
1
131
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long int; 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; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long int; 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; ...
[["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
234
#include <iostream> using namespace std; long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } int main() { int N; cin >> N; int ans; ans = modpow(10, N, 1000000007) - m...
#include <iostream> using namespace std; long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } int main() { int N; cin >> N; int ans; ans = modpow(10, N, 1000000007) - m...
[["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]]
1
132
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout....
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout....
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
199
n = int(input()) mod = 10**9+7 def pow(n, num): s = num for i in range(1,num): s = s*num%mod return s print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)
n = int(input()) mod = 10**9+7 def pow(n, num): s = num for i in range(1,n): s = s*num%mod return s print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22]]
5
74
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (ll i = 0; i < n; ++i) #define rREP(i, n) for (ll i = n - 1; i >= 0; --i) #define FOR(i, a, b) for (ll i = a; i <= b; ++i) #define rFOR(i, a, b) for (ll i = a; i >= b; --i) #define aFOR(i, V) for (auto i : V) #define ALL(vec) vec....
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (ll i = 0; i < n; ++i) #define rREP(i, n) for (ll i = n - 1; i >= 0; --i) #define FOR(i, a, b) for (ll i = a; i <= b; ++i) #define rFOR(i, a, b) for (ll i = a; i >= b; --i) #define aFOR(i, V) for (auto i : V) #define ALL(vec) vec....
[["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 25], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]]
1
167
N=int(input());M=10**9+7 print(pow(10,N,M)-2*pow(9,N,M)+pow(8,N,M))
N=int(input());M=10**9+7 print((pow(10,N,M)-2*pow(9,N,M)+pow(8,N,M))%M)
[["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
47
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define ll long long #define int long long #define inf ((ll)1e18) #define mod 1000000007 #define double long double #define ull unsigned long long #define vi vector<ll> #define ppi pair<int, int> #define pii pair<pair<int, int>, int> #defi...
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define ll long long #define int long long #define inf ((ll)1e18) #define mod 1000000007 #define double long double #define ull unsigned long long #define vi vector<ll> #define ppi pair<int, int> #define pii pair<pair<int, int>, int> #defi...
[["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]]
1
288
#include <bits/stdc++.h> using namespace std; #define ll long long #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define fill(a, b) memset(a, b, sizeof(a)) #define f first #define s second #define pb push_back #define inf 1e17 #define ninf -1 * 1e17 #define mod 1000000007 #define N 500005 #...
#include <bits/stdc++.h> using namespace std; #define ll long long #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define fill(a, b) memset(a, b, sizeof(a)) #define f first #define s second #define pb push_back #define inf 1e17 #define ninf -1 * 1e17 #define mod 1000000007 #define N 500005 #...
[["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]]
1
269
#include <algorithm> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> using namespace...
#include <algorithm> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> using namespace...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13]]
1
183
/* * yaswanth phani kommineni */ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl '\n'; const ll mod = 1e9 + 7, M = 1e6 + 1; ll modpow(ll x, ll n) { if (n == 0) return 1 % mod; ll u = modpow(x, n / 2); u = (u * u) % mod; if (n & 1) u = (u * x) % mod; return u; } vo...
/* * yaswanth phani kommineni */ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl '\n'; const ll mod = 1e9 + 7, M = 1e6 + 1; ll modpow(ll x, ll n) { if (n == 0) return 1 % mod; ll u = modpow(x, n / 2); u = (u * u) % mod; if (n & 1) u = (u * x) % mod; return u; } vo...
[["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]]
1
198
n=int(input()) mod=10**9+7 ans=pow(10,n,mod) ans-=pow(9,n,mod)*2 ans+=pow(8,n,mod) print(ans)
n=int(input()) mod=10**9+7 ans=pow(10,n,mod) ans-=pow(9,n,mod)*2 ans+=pow(8,n,mod) print(ans%mod)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
51
#include <bits/stdc++.h> #define int long long using namespace std; const int maxn = 1e5 + 5; typedef long long ll; const int mod = 1e9 + 7; int a[2005]; int ksm(int x, int y) { x %= mod; int res = 1; while (y) { if (y & 1) res = (res * x) % mod; x = (x * x) % mod; y >>= 1; } return res; } ...
#include <bits/stdc++.h> #define int long long using namespace std; const int maxn = 1e5 + 5; typedef long long ll; const int mod = 1e9 + 7; int a[2005]; int ksm(int x, int y) { x %= mod; int res = 1; while (y) { if (y & 1) res = (res * x) % mod; x = (x * x) % mod; y >>= 1; } return res; } ...
[["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 12, 22]]
1
199