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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02780 | Python | Time Limit Exceeded | #!/usr/bin/env python3
n, k, *p = map(int, open(0).read().split())
ans = float()
for i in range(n - k + 1):
ans = max(ans, (sum(p[i : k + i]) + k) / 2)
print(ans)
| #!/usr/bin/env python3
n, k, *P = map(int, open(0).read().split())
p = [(i + 1) / 2 for i in P]
c = sum(p[:k])
ans = c
for i in range(n - k):
c = c + p[i + k] - p[i]
ans = max(c, ans)
print(ans)
| replace | 1 | 5 | 1 | 8 | TLE | |
p02780 | Python | Time Limit Exceeded | n, k = map(int, input().split())
p = list(map(int, input().split()))
M = 0
for i in range(n - k + 1):
s = sum(p[i : i + k])
M = max(M, s)
print((M + k) / 2)
| n, k = map(int, input().split())
p = list(map(int, input().split()))
s = sum(p[:k])
M = s
for i in range(n - k):
s += p[i + k] - p[i]
M = max(M, s)
print((M + k) / 2)
| replace | 2 | 5 | 2 | 6 | TLE | |
p02780 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int arr[200005];
for (int i = 0; i < n; ++i) {
cin >> arr[i];
}
int xx = 0;
for (int i = 0; i < n - k + 1; ++i) {
int aa = 0;
for (int j = 0; j < k; ++j) {
aa += arr[i + j];
}
if (aa > xx)
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int arr[200005];
for (int i = 0; i < n; ++i) {
cin >> arr[i];
}
int xx = 0;
int aa = 0;
for (int j = 0; j < k; ++j) {
aa += arr[j];
}
xx = aa;
for (int i = 1; i < n - k + 1; ++i) {
aa -= (arr[i - 1]... | replace | 14 | 19 | 14 | 21 | TLE | |
p02780 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = 1; i <= n; i++)
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
using P = pair<int, int>;
ll MOD = 1000000007;
ll INF ... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = 1; i <= n; i++)
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
using P = pair<int, int>;
ll MOD = 1000000007;
ll INF ... | insert | 25 | 25 | 25 | 31 | 0 | |
p02780 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, p[1010], k, num, ans;
int main() {
cin >> n >> k;
for (int i = 0; i < k; i++) {
cin >> p[i];
num += p[i];
}
ans = num;
for (int i = k; i < n; i++) {
cin >> p[i];
num += p[i] - p[i - k];
ans = max(ans, num);
}
float x = ans, y = k;
... | #include <bits/stdc++.h>
using namespace std;
int n, p[200010], k, num, ans;
int main() {
cin >> n >> k;
for (int i = 0; i < k; i++) {
cin >> p[i];
num += p[i];
}
ans = num;
for (int i = k; i < n; i++) {
cin >> p[i];
num += p[i] - p[i - k];
ans = max(ans, num);
}
float x = ans, y = k;
... | replace | 2 | 3 | 2 | 3 | 0 | |
p02780 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef pair<int, int> pi;
int main() {
int n, k;
... | #include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef pair<int, int> pi;
int main() {
int n, k;
... | replace | 23 | 29 | 23 | 29 | TLE | |
p02780 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define INF (ll)1e9
#define deb(x) cerr << #x << " " << x << "\n"
#define fixed setprecision(9)
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<double> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
int index = 0;... | #include <bits/stdc++.h>
#define pb push_back
#define INF (ll)1e9
#define deb(x) cerr << #x << " " << x << "\n"
#define fixed setprecision(9)
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<double> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
int index = 0;... | replace | 22 | 23 | 22 | 23 | 0 | |
p02780 | C++ | Runtime Error | #include <fstream>
#include <iomanip>
#include <iostream>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
long long n, k;
ifstream ifs("10.txt");
cin.rdbuf(ifs.rdbuf());
if (ifs.fail()) {
cout << "読み込み失敗" << endl;
}
cin >> n >> k;
long long p[n];
rep(i, n) { cin >>... | #include <fstream>
#include <iomanip>
#include <iostream>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
long long n, k;
cin >> n >> k;
long long p[n];
rep(i, n) { cin >> p[i]; }
long long max = 0;
rep(i, k) { max += p[i]; }
long long sum = max;
rep(i, n - k) {
su... | delete | 8 | 13 | 8 | 8 | -11 | |
p02780 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define sz(arr) (int)(arr).size()
#define rng(arr) arr.begin(), arr.end()
#define show(x) cout << #x << " = " << x << endl;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
void _cin() {}
template <class Head, class... Tail> void _cin(Head &&head,... | #include <bits/stdc++.h>
#define sz(arr) (int)(arr).size()
#define rng(arr) arr.begin(), arr.end()
#define show(x) cout << #x << " = " << x << endl;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
void _cin() {}
template <class Head, class... Tail> void _cin(Head &&head,... | replace | 42 | 43 | 42 | 44 | TLE | |
p02780 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < (a + n); i++)
#define var auto
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<int> p(n);
rep(i, 0, n) cin >> p[i];
// 累積和
vector<int> s(n + 1, 0);
rep(i, 0, n + 1) s[i + 1] = s[i] + p[i];
// 最大を... | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < (a + n); i++)
#define var auto
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<int> p(n);
rep(i, 0, n) cin >> p[i];
// 累積和
vector<int> s(n + 1, 0);
rep(i, 0, n) { s[i + 1] = s[i] + p[i]; }
// 最大を... | replace | 14 | 15 | 14 | 15 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p02780 | Python | Runtime Error | from itertools import accumulate
def solve(string):
n, k, *p = map(int, string.split())
(*p,) = accumulate((1 + _p) / 2 for _p in p)
return str(max(p2 - p1 for p1, p2 in zip(p, p[k:])))
if __name__ == "__main__":
import sys
print(solve(sys.stdin.read().strip()))
| from itertools import accumulate
def solve(string):
n, k, *p = map(int, string.split())
(*p,) = accumulate((1 + _p) / 2 for _p in p)
return str(max(p2 - p1 for p1, p2 in zip(p, p[k:]))) if k < n else str(p[-1])
if __name__ == "__main__":
import sys
print(solve(sys.stdin.read().strip()))
| replace | 6 | 7 | 6 | 7 | 0 | |
p02780 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
typedef vector<int> vint;
typedef vector<ll> vll;
template <typename T> istream &operator>>(istream &is, ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
typedef vector<int> vint;
typedef vector<ll> vll;
template <typename T> istream &operator>>(istream &is, ... | replace | 30 | 38 | 30 | 40 | TLE | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string s;
int k;
vector<vector<vector<ll>>> dp;
ll f(int indextoadd, bool isequal, int numleft) {
if (numleft < 0) {
return dp[indextoadd][isequal][numleft] = 0;
}
if (indextoadd == s.size()) {
if (numleft == 0) {
return dp[inde... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string s;
int k;
vector<vector<vector<ll>>> dp;
ll f(int indextoadd, bool isequal, int numleft) {
if (numleft < 0) {
return 0;
}
if (indextoadd == s.size()) {
if (numleft == 0) {
return dp[indextoadd][isequal][numleft] = 1;
... | replace | 12 | 13 | 12 | 13 | -6 | free(): invalid pointer
|
p02781 | 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 ... | insert | 54 | 54 | 54 | 56 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define call(var) cout << #var << "=" << var << endl;
#define dup(x, y) (((x) + (y)-1) / (y))
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using Graph = vector<vi>;
using P... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define call(var) cout << #var << "=" << var << endl;
#define dup(x, y) (((x) + (y)-1) / (y))
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using Graph = vector<vi>;
using P... | replace | 39 | 40 | 39 | 40 | 0 | |
p02781 | C++ | Runtime Error | // 6/23 解き直し
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
string N;
vector<int> n;
int dp[100][2][5];
int main() {
cin >> N;
int K;
cin >> K;
// int size = N.size();
for (auto a : N) {
n.push_back(a - '0');... | // 6/23 解き直し
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
string N;
vector<int> n;
int dp[110][2][5];
int main() {
cin >> N;
int K;
cin >> K;
// int size = N.size();
for (auto a : N) {
n.push_back(a - '0');... | replace | 9 | 10 | 9 | 10 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll mod = 1000000007;
const ll mod998 = 998244353;
const ll intmax = 2147483647;
const ll llmax = 9223372036854775807;
const char sp = ' ';
string S, T;
int K, M;
ll res;
bool comp() {
for (int i = 0; i < M; i++) {
if (S[i] > T[i])
... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll mod = 1000000007;
const ll mod998 = 998244353;
const ll intmax = 2147483647;
const ll llmax = 9223372036854775807;
const char sp = ' ';
string S, T;
int K, M;
ll res;
bool comp() {
for (int i = 0; i < M; i++) {
if (S[i] > T[i])
... | replace | 27 | 28 | 27 | 30 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
ll dp[100][2][4];
int main() {
string s;
cin >> s;
ll k;
cin >> k;
dp[0][0][0] = 1;
for (ll i = 0; i < s.size(); i++) {
for (ll j = 0; j <= 9; j++) {
if (s[i] - '0' == j) {
if (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
ll dp[100][2][5];
int main() {
string s;
cin >> s;
ll k;
cin >> k;
dp[0][0][0] = 1;
for (ll i = 0; i < s.size(); i++) {
for (ll j = 0; j <= 9; j++) {
if (s[i] - '0' == j) {
if (... | replace | 5 | 6 | 5 | 6 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | replace | 33 | 34 | 33 | 34 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(NULL);
#define pb push_back
#define eb emplace_back
#define fn for (int i = 0; i... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(NULL);
#define pb push_back
#define eb emplace_back
#define fn for (int i = 0; i... | replace | 106 | 107 | 106 | 107 | 0 | |
p02781 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int t;
cin >> t;
int n = s.size();
string u = "";
for (int i = 0; i < n; i++) {
u += '0';
}
if (n < t) {
cout << 0 << endl;
return 0;
}
long long ans = 0;
string q;
if (t == 1) {
for (int i = 0; i < ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int t;
cin >> t;
int n = s.size();
string u = "";
for (int i = 0; i < n; i++) {
u += '0';
}
if (n < t) {
cout << 0 << endl;
return 0;
}
long long ans = 0;
string q;
if (t == 1) {
for (int i = 0; i < ... | replace | 44 | 57 | 44 | 56 | TLE | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
vl v; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
vl v; ... | replace | 56 | 57 | 56 | 60 | 0 | |
p02781 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <ext/numeric>
using namespace std;
// using namespace __gnu_cxx;
const int MAXN = (int)1e3 + 5;
const int MAXM = (int)1e4 + 5;
const int MOD = 1000000007;
long long mul(long long a, long long b) { return a * b % MOD; }
long long power(long long a, long long b) {
if (!b)
r... | #include <bits/stdc++.h>
// #include <ext/numeric>
using namespace std;
// using namespace __gnu_cxx;
const int MAXN = (int)1e3 + 5;
const int MAXM = (int)1e4 + 5;
const int MOD = 1000000007;
long long mul(long long a, long long b) { return a * b % MOD; }
long long power(long long a, long long b) {
if (!b)
r... | replace | 70 | 71 | 70 | 71 | TLE | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using i64 = std::int_fast64_t;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string S;
int K;
cin >> S >> K;
int N = (int)S.size();
vector<vector<vector<i64>>> dp(N + 1,
vector<vector<i64>>(2, vector<i64>(K + 1, 0)));... | #include <bits/stdc++.h>
using namespace std;
using i64 = std::int_fast64_t;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string S;
int K;
cin >> S >> K;
int N = (int)S.size();
vector<vector<vector<i64>>> dp(N + 1,
vector<vector<i64>>(2, vector<i64>(K + 2, 0)));... | replace | 13 | 14 | 13 | 14 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ld long double
#define all(x) (x).begin(), (x).end()
#define inf 1e18
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, le... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ld long double
#define all(x) (x).begin(), (x).end()
#define inf 1e18
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, le... | replace | 26 | 27 | 26 | 27 | 0 | |
p02781 | C++ | Memory Limit Exceeded | //----------BHAVIK DIWANI(PICT_COMP)---------------
#include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
... | //----------BHAVIK DIWANI(PICT_COMP)---------------
#include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
... | replace | 17 | 19 | 17 | 18 | MLE | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
long long comb(int n, int k) {
if (n < k || k < 0)
return 0;
long long ans = 1;
rep(i, k) {
ans *= n;
n--;
}
rep(i, k) { ans /= i + 1; }
return ans;
}
long long calc(string S, int N, int K) {
i... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
long long comb(int n, int k) {
if (n < k || k < 0)
return 0;
long long ans = 1;
rep(i, k) {
ans *= n;
n--;
}
rep(i, k) { ans /= i + 1; }
return ans;
}
long long calc(string S, int N, int K) {
i... | replace | 22 | 23 | 22 | 23 | 0 | |
p02781 | Python | Runtime Error | import sys
sys.setrecursionlimit(100)
n = input()
k = int(input())
m = {}
def doit(n, k):
if len(n) == 0:
return k == 0
d = int(n[0])
if (n, k) not in m:
ret = 0
for i in range(d + 1):
if i == d:
ret += doit(n[1:], k - 1 if i > 0 else k)
el... | import sys
sys.setrecursionlimit(10000)
n = input()
k = int(input())
m = {}
def doit(n, k):
if len(n) == 0:
return k == 0
d = int(n[0])
if (n, k) not in m:
ret = 0
for i in range(d + 1):
if i == d:
ret += doit(n[1:], k - 1 if i > 0 else k)
... | replace | 2 | 3 | 2 | 3 | 0 | |
p02781 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
string S;
cin >> S;
int K;
cin >> K;
long dp[S.length()][5][2];
for (int i = 0; i < S.length(); i++) {
for (int j = 0; j < S.length() + 1; j++) {
for (int k = 0; k < 2; k++) {
dp[i][j][k] = 0;
}
}
}
dp[0][1][0] = 1;
d... | #include <iostream>
using namespace std;
int main() {
string S;
cin >> S;
int K;
cin >> K;
long dp[S.length()][5][2];
for (int i = 0; i < S.length(); i++) {
for (int j = 0; j < 4; j++) {
for (int k = 0; k < 2; k++) {
dp[i][j][k] = 0;
}
}
}
dp[0][1][0] = 1;
dp[0][1][1] = ... | replace | 12 | 13 | 12 | 13 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define LL long int
int main() {
string s;
cin >> s;
int k;
cin >> k;
int sz = s.size();
vector<int> num(sz);
for (int i = 0; i < sz; ++i)
num[i] = s[i] - '0';
vector<vector<vector<LL>>> dp(sz + 1,
vector<vector<LL>>... | #include <bits/stdc++.h>
using namespace std;
#define LL long int
int main() {
string s;
cin >> s;
int k;
cin >> k;
int sz = s.size();
vector<int> num(sz);
for (int i = 0; i < sz; ++i)
num[i] = s[i] - '0';
vector<vector<vector<LL>>> dp(sz + 1,
vector<vector<LL>>... | replace | 19 | 20 | 19 | 20 | 0 | |
p02781 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#def... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#def... | replace | 45 | 46 | 45 | 46 | 0 | |
p02781 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, x, n) for (int i = x; i < (n); i++)
#define all(n) begin(n), end(n)
struct cww {
cww() {
ios::sync_with_stdio(false);
cin.tie(0);
}
} star;
const long long INF = numeric_limits<long long>::max();
ty... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, x, n) for (int i = x; i < (n); i++)
#define all(n) begin(n), end(n)
struct cww {
cww() {
ios::sync_with_stdio(false);
cin.tie(0);
}
} star;
const long long INF = numeric_limits<long long>::max();
ty... | replace | 91 | 92 | 91 | 92 | 0 | |
p02781 | Python | Runtime Error | N = input()
K = int(input())
a = 1
b = [0] * (K + 1)
b[0] = 1
b[1] = int(N[0]) - 1
for c in N[1:]:
t = int(c)
for i in range(K - 1, -1, -1):
b[i + 1] += b[i] * 9
if t != 0:
b[a + 1] += t - 1
b[a] += 1
a += 1
if a == K:
print(b[K] + 1)
else:
print(b[K])
| N = input()
K = int(input())
a = 1
b = [0] * (K + 1)
b[0] = 1
b[1] = int(N[0]) - 1
for c in N[1:]:
t = int(c)
for i in range(K - 1, -1, -1):
b[i + 1] += b[i] * 9
if t != 0:
if a + 1 <= K:
b[a + 1] += t - 1
if a <= K:
b[a] += 1
a += 1
if a == K:
... | replace | 13 | 15 | 13 | 17 | 0 | |
p02782 | C++ | Runtime Error | #include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#... | #include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#... | replace | 141 | 142 | 141 | 142 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define PI 3.141592653589793
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, a, n) for (int i = a; i < (n); i++)
#define rrep(i, n, k) \
for (int i = (n); i >= (k); i--) ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define PI 3.141592653589793
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, a, n) for (int i = a; i < (n); i++)
#define rrep(i, n, k) \
for (int i = (n); i >= (k); i--) ... | replace | 147 | 148 | 147 | 148 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> P1;
typedef pair<P, P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i, x) for ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> P1;
typedef pair<P, P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i, x) for ... | replace | 23 | 24 | 23 | 24 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define all(x) (x).begin(), (x).end()
#ifdef LOCAL
#define dbg(x)... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define all(x) (x).begin(), (x).end()
#ifdef LOCAL
#define dbg(x)... | replace | 57 | 58 | 57 | 58 | 0 | Time execute: 0.054075 sec
|
p02782 | C++ | Runtime Error | // ====================================================================================================================
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you ... | // ====================================================================================================================
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you ... | replace | 195 | 198 | 195 | 198 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p_ll;
template <class T> void debug(T itr1, T itr2) {
auto now = itr1;
while (now < itr2) {
cout << *now << " ";
now++;
}
cout << endl;
}
#define repr(i, from, to) for (int i = (int)from; i < (int)to; i++)
#define... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p_ll;
template <class T> void debug(T itr1, T itr2) {
auto now = itr1;
while (now < itr2) {
cout << *now << " ";
now++;
}
cout << endl;
}
#define repr(i, from, to) for (int i = (int)from; i < (int)to; i++)
#define... | replace | 24 | 25 | 24 | 25 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 1000002;
const int MOD = 1000000007;
//
int fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MO... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 2000003;
const int MOD = 1000000007;
//
int fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MO... | replace | 3 | 4 | 3 | 4 | 0 | |
p02782 | C++ | Runtime Error | // https://codeforces.com/contest/1295/problem/A
// 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 ... | // https://codeforces.com/contest/1295/problem/A
// 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 ... | replace | 102 | 103 | 102 | 103 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAX = 1100000;
const long long MOD = 1000000007;
typedef long long ll;
ll fac[MAX], finv[MAX], inv[MAX];
ll mod_pow(ll x, ll n) { // べき乗
ll ans = 1;
x %= MOD;
while (n != 0) {
if (n & 1)
ans = ans * x % MOD;
x = x * x % MOD;
n = n >> 1;
... | #include <bits/stdc++.h>
using namespace std;
const int MAX = 2100000;
const long long MOD = 1000000007;
typedef long long ll;
ll fac[MAX], finv[MAX], inv[MAX];
ll mod_pow(ll x, ll n) { // べき乗
ll ans = 1;
x %= MOD;
while (n != 0) {
if (n & 1)
ans = ans * x % MOD;
x = x * x % MOD;
n = n >> 1;
... | replace | 2 | 3 | 2 | 3 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repn(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for (int(i) = (n - 1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define lint long long
#define ulint unsigned long long
#define fi f... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repn(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for (int(i) = (n - 1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define lint long long
#define ulint unsigned long long
#define fi f... | replace | 36 | 37 | 36 | 37 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
const int INF = 1001001001;
const lon... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
const int INF = 1001001001;
const lon... | replace | 108 | 109 | 108 | 109 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <atomic>
#include <bitset>
#include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloat>
#include <chrono>
#include <cinttypes>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <codecvt>
#inc... | #include <algorithm>
#include <array>
#include <atomic>
#include <bitset>
#include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloat>
#include <chrono>
#include <cinttypes>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <codecvt>
#inc... | replace | 209 | 210 | 209 | 210 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
const int N = 1e6 + 6;
ll r1, c1, r2, c2;
ll fac[N], infac[N];
ll sq(ll a) { return (a * a) % mod; }
ll pw(ll a, ll b) {
if (b == 0)
return 1;
if (b == 1)
return a % mod;
if (b & 1)
return (a * sq(pw(a, b >> 1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
const int N = 2e6 + 6;
ll r1, c1, r2, c2;
ll fac[N], infac[N];
ll sq(ll a) { return (a * a) % mod; }
ll pw(ll a, ll b) {
if (b == 0)
return 1;
if (b == 1)
return a % mod;
if (b & 1)
return (a * sq(pw(a, b >> 1... | replace | 4 | 5 | 4 | 5 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define LLINF 9223372036854775807
#define MOD ll(1e9 + 7)
#define all(x) (x).begin(), (x).end()
#define dbg(x) cerr << #x << ": " << x << endl
#define MAX_N 200005
ll factorial[MAX_N];
void make_f... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define LLINF 9223372036854775807
#define MOD ll(1e9 + 7)
#define all(x) (x).begin(), (x).end()
#define dbg(x) cerr << #x << ": " << x << endl
#define MAX_N 2000005
ll factorial[MAX_N];
void make_... | replace | 10 | 11 | 10 | 11 | 0 | |
p02782 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define int long long
using i64 = long long;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i)
#define... | #include "bits/stdc++.h"
using namespace std;
#define int long long
using i64 = long long;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i)
#define... | replace | 138 | 139 | 138 | 139 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
#define endl "\n"
using namespace std;
#define ll long long
#define ld long double
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repo(i, n) for (int i = 1; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
#define np next_permutation
#define fi first
#define se second
... | #include <bits/stdc++.h>
#define endl "\n"
using namespace std;
#define ll long long
#define ld long double
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repo(i, n) for (int i = 1; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
#define np next_permutation
#define fi first
#define se second
... | replace | 46 | 47 | 46 | 47 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define rrep(i, n) for (lli i = (n)-1; i >= 0; i--)
using namespace std;
using lli = long long int;
void YESNO(bool), YesNo(bool);
template <class T1, class T2> bool chmin(T1 &l, const T2 &r);
template <class T1, class T2> bool chmax(T1 &l, const... | #include <bits/stdc++.h>
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define rrep(i, n) for (lli i = (n)-1; i >= 0; i--)
using namespace std;
using lli = long long int;
void YESNO(bool), YesNo(bool);
template <class T1, class T2> bool chmin(T1 &l, const T2 &r);
template <class T1, class T2> bool chmax(T1 &l, const... | replace | 152 | 153 | 152 | 153 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } // 最大公約数
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; } // 最小公倍数
using Graph = vector<vector<int>>;
ll inf = 3000000000000000... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } // 最大公約数
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; } // 最小公倍数
using Graph = vector<vector<int>>;
ll inf = 3000000000000000... | replace | 9 | 10 | 9 | 10 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using ll = long long;... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using ll = long long;... | replace | 117 | 118 | 117 | 118 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | replace | 201 | 202 | 201 | 202 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define bug(x) cout << "zdongdebug1: " << x << endl;
#define bug2(x, y)... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define bug(x) cout << "zdongdebug1: " << x << endl;
#define bug2(x, y)... | replace | 20 | 21 | 20 | 21 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define Inf 1000000000
#define nmax_def 110000
#define mod 1000000007
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define Inf 1000000000
#define nmax_def 110000
#define mod 1000000007
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++... | replace | 78 | 79 | 78 | 79 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
#define LLI long long int
#define FOR(v, a, b) for (LLI v = (a); v < (b); ++v)
#define FORE(v, a, b) for (LLI v = (a); v <= (b); ++v)
#define REP(v, n) FOR(v, 0, n)
#define REPE(v, n) FORE(v, 0, n)
#define REV(v, a, b) for (LLI v = (a); v >= (b); --v)
#define ALL(x) (x).begin(), (x).end()
#defi... | #include <bits/stdc++.h>
#define LLI long long int
#define FOR(v, a, b) for (LLI v = (a); v < (b); ++v)
#define FORE(v, a, b) for (LLI v = (a); v <= (b); ++v)
#define REP(v, n) FOR(v, 0, n)
#define REPE(v, n) FORE(v, 0, n)
#define REV(v, a, b) for (LLI v = (a); v >= (b); --v)
#define ALL(x) (x).begin(), (x).end()
#defi... | replace | 295 | 296 | 295 | 296 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MOD 1000000007
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
ModInt &operator+=(const ModInt &p) {
if ((x += p.x) >= mod)
x -= mod;
r... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MOD 1000000007
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
ModInt &operator+=(const ModInt &p) {
if ((x += p.x) >= mod)
x -= mod;
r... | replace | 109 | 110 | 109 | 110 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll, ll> pii;
const int maxn = 1e6 + 10;
const int INF = 0x3f3f3f3f;
const ll inf = 1e18;
const ll mod = 1000000007;
ll fact[maxn], inv[maxn];
ll power(ll a, int x) {
ll ans = 1;
while (x) {
if (x & 1)
ans = (ans * a) % mod;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll, ll> pii;
const int maxn = 2e6 + 10;
const int INF = 0x3f3f3f3f;
const ll inf = 1e18;
const ll mod = 1000000007;
ll fact[maxn], inv[maxn];
ll power(ll a, int x) {
ll ans = 1;
while (x) {
if (x & 1)
ans = (ans * a) % mod;
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// #define rep(i, n) for (ll i = 0; i < (n); ++... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// #define rep(i, n) for (ll i = 0; i < (n); ++... | replace | 132 | 133 | 132 | 133 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> P;
const ll INF = 10e17;
#... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> P;
const ll INF = 10e17;
#... | replace | 124 | 125 | 124 | 125 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vpi... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vpi... | delete | 127 | 143 | 127 | 127 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__... | replace | 204 | 205 | 204 | 205 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << (x) << '\n'
#define Int int64_t
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
Int INF = 1e18;
int inf = 1e9;
Int mod = 1e9 + 7;
// mod付きコンビネーション
const int MAX = 510000;
const int MOD = 1000000007;
Int fac[MAX], finv[MAX... | #include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << (x) << '\n'
#define Int int64_t
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
Int INF = 1e18;
int inf = 1e9;
Int mod = 1e9 + 7;
// mod付きコンビネーション
const int MAX = 5100000;
const int MOD = 1000000007;
Int fac[MAX], finv[MA... | replace | 14 | 15 | 14 | 15 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long MOD = 1000000007;
const int MAX = 510000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long MOD = 1000000007;
const int MAX = 5100000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02782 | C++ | Runtime Error | // 6/23 解き直し
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
// const int mod = 998244353;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint opera... | // 6/23 解き直し
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
// const int mod = 998244353;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint opera... | replace | 64 | 65 | 64 | 65 | 0 | |
p02782 | C++ | Runtime Error | // F.
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
typedef long long LL;
const LL MOD = 1000000007;
static const size_t MAX_N = 1000001;
struct modll {
long long x;
modll() {}
modll(int _x) : x(_x) {}
oper... | // F.
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
typedef long long LL;
const LL MOD = 1000000007;
static const size_t MAX_N = 2000005;
struct modll {
long long x;
modll() {}
modll(int _x) : x(_x) {}
oper... | replace | 14 | 15 | 14 | 15 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const ll INF = 1LL << 61;
co... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll, ll> P;
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const ll INF = 1LL << 61;
co... | replace | 17 | 18 | 17 | 18 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
template <class Read> void in(Read &x) {
x = 0;
int f = 0;
char ch = getchar();
while (ch < '0' || ch > '9'... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
template <class Read> void in(Read &x) {
x = 0;
int f = 0;
char ch = getchar();
while (ch < '0' || ch > '9'... | replace | 28 | 29 | 28 | 29 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
const ll MOD = 1e9 + 7;
const ll INF = 1e16;
const ld EPS = 1e-11;
const ld PI = acos(-1.0L);
#define eb emplace_... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
const ll MOD = 1e9 + 7;
const ll INF = 1e16;
const ld EPS = 1e-11;
const ld PI = acos(-1.0L);
#define eb emplace_... | replace | 53 | 54 | 53 | 54 | 0 | |
p02782 | C++ | Runtime Error | // 引用:http://drken1215.hatenablog.com/entry/2018/06/08/210000
#include <iostream>
using namespace std;
const int MAX = 510000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i... | // 引用:http://drken1215.hatenablog.com/entry/2018/06/08/210000
#include <iostream>
using namespace std;
const int MAX = 2510000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02782 | C++ | Runtime Error | #ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define bit(n, k) (((ll)n >> (ll)k) & 1) /*nのk bit目*/
#define pb push_back
#define eb emplace_back
#define SZ(x) ((ll)(x).size())
#define all(x) (... | #ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define bit(n, k) (((ll)n >> (ll)k) & 1) /*nのk bit目*/
#define pb push_back
#define eb emplace_back
#define SZ(x) ((ll)(x).size())
#define all(x) (... | replace | 47 | 48 | 47 | 48 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--)
#define itn int
#define miele(v) min_element(v.begin(), v.end())
#define maele(v) max_element(v.begin(), v.end())
#define sum(v) accumulate(... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--)
#define itn int
#define miele(v) min_element(v.begin(), v.end())
#define maele(v) max_element(v.begin(), v.end())
#define sum(v) accumulate(... | replace | 134 | 135 | 134 | 135 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <s... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <s... | replace | 83 | 84 | 83 | 84 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
string to_string(const string &s) { return '"' + s + '"'; }
string to_string(const bool b) { return (b ? "true" : "false"); }
string to_string(const char *s) { return to_string((string)s); }
string to_string(const char c) {
string s = "'";
s += c;
s += "'";
return s... | #include <bits/stdc++.h>
using namespace std;
string to_string(const string &s) { return '"' + s + '"'; }
string to_string(const bool b) { return (b ? "true" : "false"); }
string to_string(const char *s) { return to_string((string)s); }
string to_string(const char c) {
string s = "'";
s += c;
s += "'";
return s... | replace | 73 | 74 | 73 | 74 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <st... | #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <st... | replace | 171 | 173 | 171 | 173 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e6 + 7, M = 1e9 + 7;
LL fac[N], invfac[N];
LL power(LL a, LL p) {
if (p == 0)
return 1;
LL ans = power(a, p / 2);
ans = (ans * ans) % M;
if (p % 2)
ans = (ans * a) % M;
return ans;
}
void pre() {
fac[0] = 1;
for... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 2e6 + 7, M = 1e9 + 7;
LL fac[N], invfac[N];
LL power(LL a, LL p) {
if (p == 0)
return 1;
LL ans = power(a, p / 2);
ans = (ans * ans) % M;
if (p % 2)
ans = (ans * a) % M;
return ans;
}
void pre() {
fac[0] = 1;
for... | replace | 4 | 5 | 4 | 5 | 0 | |
p02782 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <int MOD> struct Fp {
long long val;
constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
if (val < 0)
val += MOD;
}
constexpr int getmod() { return MOD; }
constexpr Fp operator-() const noexcept { return val ? MOD... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <int MOD> struct Fp {
long long val;
constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
if (val < 0)
val += MOD;
}
constexpr int getmod() { return MOD; }
constexpr Fp operator-() const noexcept { return val ? MOD... | replace | 69 | 70 | 69 | 70 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define INF (int)9e18
#define HELL (int)(1e9 + 7)
#define int long long
#define double long double
#define uint unsigned long long
#define deb(x) cerr << #x << " => " << x << "\n"
#define deba(x) ... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define INF (int)9e18
#define HELL (int)(1e9 + 7)
#define int long long
#define double long double
#define uint unsigned long long
#define deb(x) cerr << #x << " => " << x << "\n"
#define deba(x) ... | replace | 41 | 42 | 41 | 42 | 0 | TIME => 17
|
p02782 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set... | replace | 190 | 191 | 190 | 191 | 0 | |
p02782 | C++ | Runtime Error | #include "bits/stdc++.h"
// Begin Header {{{
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (i64 i = 0, i##_limit = (n); i < i##_limit; ++i)
#define reps(i, s, t) for (i64 i = (s), i##_limit = (t); i <= i##_limit; ++i)
#define repr(i, s, t) for (i64 i = (s), i##_limit = (t); i >= i##_limit; --i)
#ifndef DB... | #include "bits/stdc++.h"
// Begin Header {{{
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (i64 i = 0, i##_limit = (n); i < i##_limit; ++i)
#define reps(i, s, t) for (i64 i = (s), i##_limit = (t); i <= i##_limit; ++i)
#define repr(i, s, t) for (i64 i = (s), i##_limit = (t); i >= i##_limit; --i)
#ifndef DB... | replace | 165 | 167 | 165 | 167 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define de(a) cout << #a << " = " << a << endl
#define dd(a) cout << #a << " = " << a << " "
#define optimiza_io \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define de(a) cout << #a << " = " << a << endl
#define dd(a) cout << #a << " = " << a << " "
#define optimiza_io \
cin.tie(0); ... | replace | 46 | 47 | 46 | 47 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL << ((ll)n))
#define SHIFT_LEFT(n) (1LL << ((ll)n))
#define SUBS(s, f, t) (... | #include <bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL << ((ll)n))
#define SHIFT_LEFT(n) (1LL << ((ll)n))
#define SUBS(s, f, t) (... | replace | 30 | 31 | 30 | 31 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | replace | 26 | 27 | 26 | 27 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (i... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (i... | replace | 164 | 165 | 164 | 165 | 0 | |
p02782 | C++ | Runtime Error | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define N 1000000007
#define N2 998244353
#define Nmax 1000005
#define INF (ll)1e18
#define pll pair<ll, ll>
#define mp make_pair
#define fi first
#define se second
#define vv vector
#define rep(i, n) r... | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define N 1000000007
#define N2 998244353
#define Nmax 3000005
#define INF (ll)1e18
#define pll pair<ll, ll>
#define mp make_pair
#define fi first
#define se second
#define vv vector
#define rep(i, n) r... | replace | 7 | 8 | 7 | 8 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
typedef long long LL;
LL n, k;
const LL mof = 1e9 + 7;
LL p = mof;
const LL maxn = 1e6;
inline LL pow_mod(LL a, LL k, LL mo) {
LL ans = 1;
while (k) {
if (k % 2)
ans = ans * a % mo;
a = a * a % mo;
k >>= 1;
}
ret... | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
typedef long long LL;
LL n, k;
const LL mof = 1e9 + 7;
const LL maxn = 2e6 + 5;
inline LL pow_mod(LL a, LL k, LL mo) {
LL ans = 1;
while (k) {
if (k % 2)
ans = ans * a % mo;
a = a * a % mo;
k >>= 1;
}
return ans ... | replace | 8 | 10 | 8 | 9 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, m, n) for (int(i)... | #include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, m, n) for (int(i)... | replace | 133 | 134 | 133 | 134 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vin = vector<int>;
using vll = vector<long long>;
using vvin = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vstr = vector<string>;
using vvstr = vector<vector<string>>;
using vch = vector<char>;
using vvch = vector<vector<ch... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vin = vector<int>;
using vll = vector<long long>;
using vvin = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vstr = vector<string>;
using vvstr = vector<vector<string>>;
using vch = vector<char>;
using vvch = vector<vector<ch... | replace | 24 | 25 | 24 | 25 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#incl... | replace | 229 | 230 | 229 | 230 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mem(a, b) memset(a, b, sizeof(a))
#define pii pair<int, int>
#define int long long
#define gcd __gcd
const int inf = 0x3f3f3f3f;
const int maxn = 1001110;
const int M = 1e9 + 7;
int n, m;
int sum[maxn];
int inv[maxn];
int sinv[maxn];
int solve(int x, int y) {
in... | #include <bits/stdc++.h>
using namespace std;
#define mem(a, b) memset(a, b, sizeof(a))
#define pii pair<int, int>
#define int long long
#define gcd __gcd
const int inf = 0x3f3f3f3f;
const int maxn = 2001110;
const int M = 1e9 + 7;
int n, m;
int sum[maxn];
int inv[maxn];
int sinv[maxn];
int solve(int x, int y) {
in... | replace | 7 | 8 | 7 | 8 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repo(i, n) for (int i = 1; i <= n; i++)
#define ssort(a) sort(a.begin(), a.end())
#define INF 1001001001
#define INFll 100100100100100
// debug用
#define PrintVec(x) \
for (auto ele... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repo(i, n) for (int i = 1; i <= n; i++)
#define ssort(a) sort(a.begin(), a.end())
#define INF 1001001001
#define INFll 100100100100100
// debug用
#define PrintVec(x) \
for (auto ele... | replace | 26 | 27 | 26 | 27 | 0 | |
p02782 | C++ | Runtime Error | #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native")
// #pragma comment(linker, "/stack:200000000"]
#include <algorithm>
#include <bitset>
#in... | #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native")
// #pragma comment(linker, "/stack:200000000"]
#include <algorithm>
#include <bitset>
#in... | replace | 46 | 47 | 46 | 47 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repA(i, a, n) for (int i = a; i <= (n); ++i)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define fill(a) memset(a, 0, sizeof(a))
#define fst first
#define snd second
#define mp make_pair
#define pb p... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repA(i, a, n) for (int i = a; i <= (n); ++i)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define fill(a) memset(a, 0, sizeof(a))
#define fst first
#define snd second
#define mp make_pair
#define pb p... | replace | 25 | 26 | 25 | 26 | 0 | |
p02782 | C++ | Runtime Error | // ABEY SAALE
// QUESTION KHUD KR SOLUTION KYU DEKH RHA H
// MAAF KIJIYEGA ME GUSSE ME IDHAR UDHAR NIKAL JATA HU
#include <bits/stdc++.h>
#define mod 1000000007
#define fr first
#define se second
#define ll long long
#define PI 3.1415926535
#define pb push_back
#define mpr make_pair
#define all(a) a.begin(), a.end()
#... | // ABEY SAALE
// QUESTION KHUD KR SOLUTION KYU DEKH RHA H
// MAAF KIJIYEGA ME GUSSE ME IDHAR UDHAR NIKAL JATA HU
#include <bits/stdc++.h>
#define mod 1000000007
#define fr first
#define se second
#define ll long long
#define PI 3.1415926535
#define pb push_back
#define mpr make_pair
#define all(a) a.begin(), a.end()
#... | delete | 46 | 51 | 46 | 46 | -11 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
const int mod = 1e9 + 7;
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(int64_t... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
const int mod = 1e9 + 7;
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(int64_t... | replace | 96 | 98 | 96 | 98 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
const int mod = 1'000'000'007;
const int size_max = 1'000'005;
long long fac[size_max], finv[size_max];
long long mpow(int a, int b);
void com_init();
long long com(int n, int k);
int main() {
int r1, c1, r2, c2;
cin >> r1 >> c1 >> r2 >> c2;
r1--;... | #include <algorithm>
#include <iostream>
using namespace std;
const int mod = 1'000'000'007;
const int size_max = 2'000'005;
long long fac[size_max], finv[size_max];
long long mpow(int a, int b);
void com_init();
long long com(int n, int k);
int main() {
int r1, c1, r2, c2;
cin >> r1 >> c1 >> r2 >> c2;
r1--;... | replace | 6 | 7 | 6 | 7 | 0 | |
p02782 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#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 ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#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 ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<... | replace | 47 | 48 | 47 | 48 | 0 | |
p02782 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
#include <cassert>
#define MAX 2000000 // 階乗をいくつまで計算するか
class modlong {
long val;
static long *invs, *facts, *finvs;
// 階乗, 逆元, 階乗の逆元をMAXまで求める
bool initModlong() {
in... | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
#include <cassert>
#define MAX 2000010 // 階乗をいくつまで計算するか
class modlong {
long val;
static long *invs, *facts, *finvs;
// 階乗, 逆元, 階乗の逆元をMAXまで求める
bool initModlong() {
in... | replace | 11 | 12 | 11 | 12 | 0 | |
p02782 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <unordered_map>
... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <unordered_map>
... | replace | 48 | 49 | 48 | 49 | 0 | |
p02782 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7, N = 1e6 + 5;
template <int MOD = 1000000007> struct Modular {
int value;
static const int MOD_value = MOD;
Modular(long long v = 0) {
value = v % MOD;
if (value < 0)
value += MOD;
}
Modular(long long a, long long b) : value(0... | #include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7, N = 3e6 + 5;
template <int MOD = 1000000007> struct Modular {
int value;
static const int MOD_value = MOD;
Modular(long long v = 0) {
value = v % MOD;
if (value < 0)
value += MOD;
}
Modular(long long a, long long b) : value(0... | replace | 2 | 3 | 2 | 3 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.