problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02537 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define pb push_back
#define nn "\n"
#define all(p) p.begin(), p.end()
#define zz(v) (ll) v.size()
#define ss ' '
#define pii pair<ll, ll>
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * b) / gcd(a, b)
#define S(a) scanf("%... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define pb push_back
#define nn "\n"
#define all(p) p.begin(), p.end()
#define zz(v) (ll) v.size()
#define ss ' '
#define pii pair<ll, ll>
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * b) / gcd(a, b)
#define S(a) scanf("%... | null | 242,022 | 242,023 | u400281904 | cpp |
p02537 | #include <algorithm>
#include <iostream>
#include <numeric>
#include <queue>
#include <utility>
#include <vector>
#define faster \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <queue>
#include <utility>
#include <vector>
#define faster \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | null | 242,024 | 242,025 | u579856806 | cpp |
p02537 | #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 = 1 << 30;
const ll LLINF = 1LL << 62;
int mod = 1000000007;
int N, K;
template <class T> class SegTree {
int n;
vector<T> data;
T def; //初期値,単位元
function<T... | #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 = 1 << 30;
const ll LLINF = 1LL << 62;
int mod = 1000000007;
int N, K;
template <class T> class SegTree {
int n;
vector<T> data;
T def; //初期値,単位元
function<T... | null | 242,033 | 242,034 | u882620594 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
#define ft \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
const int N = 3e... | #include <bits/stdc++.h>
using namespace std;
#define ft \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
const int N = 3e... | null | 242,071 | 242,072 | u999669186 | cpp |
p02537 | #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;
#define ordered_set \
tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_Node_update>
#define... | #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;
#define ordered_set \
tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_Node_update>
#define... | null | 242,073 | 242,074 | u386344986 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pl = pair<ll, ll>;
using pi = pair<int, int>;
#define all(x) x.begin(), x.end()
#define rep(i, j, n) for (long long i = j; i < (long l... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pl = pair<ll, ll>;
using pi = pair<int, int>;
#define all(x) x.begin(), x.end()
#define rep(i, j, n) for (long long i = j; i < (long l... | null | 242,091 | 242,092 | u164181205 | cpp |
p02537 | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#defi... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#defi... | null | 242,093 | 242,094 | u649310245 | cpp |
p02537 | /*
Author- Aasav Badera
Time- Mon Sep 28 09:58:16 2020
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("-O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
using namespace __gnu_pbds;
#ifdef LOCAL
#inc... | /*
Author- Aasav Badera
Time- Mon Sep 28 09:58:16 2020
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("-O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
using namespace __gnu_pbds;
#ifdef LOCAL
#inc... | null | 242,095 | 242,096 | u645123130 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
int dp[4 * 300000 + 5];
int n, x, k;
int qry(int ni, int ns, int ne, int nl, int nr) {
if (nl <= ns && ne <= nr)
return dp[ni];
if (nr < ns || ne < nl)
return 0;
int mid = ns + (ne - ns) / 2;
int l = ni * 2 + 1, r = ni * 2 + 2;
int x =... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
int dp[4 * 300000 + 5];
int n, x, k;
int qry(int ni, int ns, int ne, int nl, int nr) {
if (nl <= ns && ne <= nr)
return dp[ni];
if (nr < ns || ne < nl)
return 0;
int mid = ns + (ne - ns) / 2;
int l = ni * 2 + 1, r = ni * 2 + 2;
int x =... | null | 242,159 | 242,160 | u839354257 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
int dp[4 * 300000 + 5];
int n, x, k;
int qry(int ni, int ns, int ne, int nl, int nr) {
if (nl <= ns && ne <= nr)
return dp[ni];
if (nr < ns || ne < nl)
return 0;
int mid = ns + (ne - ns) / 2;
int l = ni * 2 + 1, r = ni * 2 + 2;
int x =... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
int dp[4 * 300000 + 5];
int n, x, k;
int qry(int ni, int ns, int ne, int nl, int nr) {
if (nl <= ns && ne <= nr)
return dp[ni];
if (nr < ns || ne < nl)
return 0;
int mid = ns + (ne - ns) / 2;
int l = ni * 2 + 1, r = ni * 2 + 2;
int x =... | null | 242,161 | 242,160 | u839354257 | cpp |
p02537 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
// Acknowledgement: Special thanks to kyomukyomupurin, who developed this
// template.
template <class T, class U>
std::os... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
// Acknowledgement: Special thanks to kyomukyomupurin, who developed this
// template.
template <class T, class U>
std::os... | null | 242,301 | 242,302 | u721166818 | cpp |
p02537 | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.t... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.t... | null | 242,303 | 242,304 | u221959447 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)
namespace IO {
#define gc getchar()
template <typename T> inline void read(T &x) {
x = 0;
bool f = 1;
char ch;
for (ch = g... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)
namespace IO {
#define gc getchar()
template <typename T> inline void read(T &x) {
x = 0;
bool f = 1;
char ch;
for (ch = g... | null | 242,307 | 242,308 | u261839899 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define _IO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.t... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define _IO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.t... | null | 242,315 | 242,316 | u927523864 | cpp |
p02537 | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int INFint = 1e9 + 1;
const ll INFll = (ll)1e18 + 1;
ll MOD = 1e9 + 7;
int main() {
int N, K;
cin >> N >> K;
vector<int> A(N);
for (int i(0); i < N; i++) {
cin >> A[i];
}
vector<int> dp(N, 1);
for (int i(0); i < N; i++) {
... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int INFint = 1e9 + 1;
const ll INFll = (ll)1e18 + 1;
ll MOD = 1e9 + 7;
int main() {
int N, K;
cin >> N >> K;
vector<int> A(N);
for (int i(0); i < N; i++) {
cin >> A[i];
}
vector<int> dp(N, 1);
for (int i(0); i < N; i++) {
... | null | 242,359 | 242,360 | u991846372 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
template <typename T> struct SegmentTree { // 1-indexed
T m_id;
T op(const T &a, const T &b) const { return max(a, b); }
vector<T> m_SegT;
SegmentTree(int N) : m_id(0), m_SegT(2 * N, m_id) {}
SegmentTree(const vector<T> &data) : m_id(0), m_SegT(2 * data.size()) ... | #include <bits/stdc++.h>
using namespace std;
template <typename T> struct SegmentTree { // 1-indexed
T m_id;
T op(const T &a, const T &b) const { return max(a, b); }
vector<T> m_SegT;
SegmentTree(int N) : m_id(0), m_SegT(2 * N, m_id) {}
SegmentTree(const vector<T> &data) : m_id(0), m_SegT(2 * data.size()) ... | null | 242,085 | 242,086 | u068765697 | cpp |
p02537 | /*
Author:zeke
pass System Test!
GET AC!!
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include... | /*
Author:zeke
pass System Test!
GET AC!!
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include... | null | 242,432 | 242,433 | u759162415 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
template <typename T> struct RMQ {
int n;
const T ex = 0; //初期値
vector<T> dat; // tree本体
RMQ(vector<T> v) {
int x = 1;
int i;
n = v.size();
while (x ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
template <typename T> struct RMQ {
int n;
const T ex = 0; //初期値
vector<T> dat; // tree本体
RMQ(vector<T> v) {
int x = 1;
int i;
n = v.size();
while (x ... | null | 242,434 | 242,435 | u446795710 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n, k, a[N], f[N << 2];
void pushup(int o) { f[o] = max(f[o << 1], f[o << 1 | 1]); }
int ask(int l, int r, int o, int ld, int rd) {
if (l == r)
return f[o];
if (ld >= l && rd <= r)
return f[o];
int mid = l + r >> 1, ans = 0;
if (rd... | #include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n, k, a[N], f[N << 2];
void pushup(int o) { f[o] = max(f[o << 1], f[o << 1 | 1]); }
int ask(int l, int r, int o, int ld, int rd) {
if (l == r)
return f[o];
if (ld <= l && rd >= r)
return f[o];
int mid = l + r >> 1, ans = 0;
if (rd... | null | 242,503 | 242,504 | u312066476 | cpp |
p02537 | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, s, n) for (int i = (s); i < (n); ++i)
#define rrep(i, n, g) for (int i = (n)-1; i >= (g); --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define len(x) (int)(x).size()
#define dup(x, y) (((x) + (y)-1) / (y))
#define ... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, s, n) for (int i = (s); i < (n); ++i)
#define rrep(i, n, g) for (int i = (n)-1; i >= (g); --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define len(x) (int)(x).size()
#define dup(x, y) (((x) + (y)-1) / (y))
#define ... | null | 241,893 | 241,894 | u126146165 | cpp |
p02537 | #pragma region Macros
#pragma GCC optimize("O3")
#pragma GCC target("avx2,avx")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i ... | #pragma region Macros
#pragma GCC optimize("O3")
#pragma GCC target("avx2,avx")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i ... | null | 241,895 | 241,896 | u495699318 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct segt {
int l, r, maxv;
} tree[2400010];
int a[300010], dp[300010];
void build(int le, int ri, int i) {
tree[i].l = le;
tree[i].r = ri;
tree[i].maxv = 0;
if (le == ri)
return;
int mid = (le + ri) >> 1;
build(le, mid, i << 1);
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct segt {
int l, r, maxv;
} tree[2400010];
int a[300010], dp[300010];
void build(int le, int ri, int i) {
tree[i].l = le;
tree[i].r = ri;
tree[i].maxv = 0;
if (le == ri)
return;
int mid = (le + ri) >> 1;
build(le, mid, i << 1);
... | null | 241,899 | 241,900 | u076923204 | cpp |
p02537 | #include <iostream>
using namespace std;
const int NMAX = 3e5 + 5;
int n, m, arb[4 * NMAX + 66], poz, val, start, finish, maxim, dp[NMAX], sol,
v[NMAX], x;
void actualizare(int nod, int st, int dr)
{
int mij;
if (st == dr)
{
arb[nod] = val;
return;
}
mij = (st + dr) / 2;
if (poz <= mij... | #include <iostream>
using namespace std;
const int NMAX = 3e5 + 5;
int n, m, arb[4 * NMAX + 66], poz, val, start, finish, maxim, dp[NMAX], sol,
v[NMAX], x;
void actualizare(int nod, int st, int dr)
{
int mij;
if (st == dr)
{
arb[nod] = val;
return;
}
mij = (st + dr) / 2;
if (poz <= mij... | null | 241,912 | 241,913 | u644497121 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
#define all(x) x.begin(), x.end()
#define rall (x) x.rbegin(), x.rend()
#define pb push_back
#define eb emplace_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
int k;
con... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
#define all(x) x.begin(), x.end()
#define rall (x) x.rbegin(), x.rend()
#define pb push_back
#define eb emplace_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
int k;
con... | null | 241,916 | 241,917 | u559449910 | cpp |
p02537 | #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;
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
#define fi first
#define se second
#define endl ... | #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;
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
#define fi first
#define se second
#define endl ... | null | 241,942 | 241,943 | u211779154 | cpp |
p02537 | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | null | 241,733 | 241,734 | u664394831 | cpp |
p02537 | #include <bits/stdc++.h>
#define int long long
#define all(x) begin(x), end(x)
#define SZ(x) ((int)(x).size())
#define EB emplace_back
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define de(x) if (x && x == MODE)
#define MODE 1
using namespace std;
typedef pair<int, int> pii;
const int ... | #include <bits/stdc++.h>
#define int long long
#define all(x) begin(x), end(x)
#define SZ(x) ((int)(x).size())
#define EB emplace_back
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define de(x) if (x && x == MODE)
#define MODE 1
using namespace std;
typedef pair<int, int> pii;
const int ... | null | 241,744 | 241,745 | u704302939 | cpp |
p02537 | #include <bits/stdc++.h>
#define Mashu cout << "UUZ ate it." << endl
#define RE register int
#define LL int
using namespace std;
inline int read() {
char ch = getchar();
int x = 0, cf = 1;
while (ch < '0' || ch > '9') {
if (ch == '-')
cf = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
... | #include <bits/stdc++.h>
#define Mashu cout << "UUZ ate it." << endl
#define RE register int
#define LL int
using namespace std;
inline int read() {
char ch = getchar();
int x = 0, cf = 1;
while (ch < '0' || ch > '9') {
if (ch == '-')
cf = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
... | null | 241,750 | 241,751 | u425701555 | cpp |
p02537 | #include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define repi(n) for (int i = 0; i < (n); i++)
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define all(p) p.begin(), p.end()
#define pop_count(p) __builtin_popcountll(p)
#define len(s, e) ... | #include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define repi(n) for (int i = 0; i < (n); i++)
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define all(p) p.begin(), p.end()
#define pop_count(p) __builtin_popcountll(p)
#define len(s, e) ... | null | 241,762 | 241,763 | u412232733 | cpp |
p02537 | #include <bits/stdc++.h>
typedef long long lint;
using namespace std;
// セグメント木
// ref:https://ei1333.github.io/luzhiled/snippets/structure/segment-tree.html
template <typename Mnd> struct segment_tree {
int sz;
vector<Mnd> data;
function<Mnd(Mnd, Mnd)> f;
Mnd e;
//サイズだけ指定して初期化
segment_tree(int _sz, functi... | #include <bits/stdc++.h>
typedef long long lint;
using namespace std;
// セグメント木
// ref:https://ei1333.github.io/luzhiled/snippets/structure/segment-tree.html
template <typename Mnd> struct segment_tree {
int sz;
vector<Mnd> data;
function<Mnd(Mnd, Mnd)> f;
Mnd e;
//サイズだけ指定して初期化
segment_tree(int _sz, functi... | null | 241,768 | 241,769 | u045575753 | cpp |
p02537 | #include <bits/stdc++.h>
typedef long long lint;
using namespace std;
// セグメント木
// ref:https://ei1333.github.io/luzhiled/snippets/structure/segment-tree.html
template <typename Mnd> struct segment_tree {
int sz;
vector<Mnd> data;
function<Mnd(Mnd, Mnd)> f;
Mnd e;
//サイズだけ指定して初期化
segment_tree(int _sz, functi... | #include <bits/stdc++.h>
typedef long long lint;
using namespace std;
// セグメント木
// ref:https://ei1333.github.io/luzhiled/snippets/structure/segment-tree.html
template <typename Mnd> struct segment_tree {
int sz;
vector<Mnd> data;
function<Mnd(Mnd, Mnd)> f;
Mnd e;
//サイズだけ指定して初期化
segment_tree(int _sz, functi... | null | 241,770 | 241,769 | u045575753 | cpp |
p02537 | #line 1 "main.cpp"
/**
* @title Template
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <iostream>
#include <numeric>
#include <utility>
#include <vector>
#line 2 "/Users/kodamankod/Desktop/cpp_programming/Library/other/chmin_chmax.cpp"
template <class T, class U> constexpr bool chmin(T &lhs... | #line 1 "main.cpp"
/**
* @title Template
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <iostream>
#include <numeric>
#include <utility>
#include <vector>
#line 2 "/Users/kodamankod/Desktop/cpp_programming/Library/other/chmin_chmax.cpp"
template <class T, class U> constexpr bool chmin(T &lhs... | null | 241,781 | 241,782 | u807998890 | cpp |
p02537 | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T> using V = vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
const ll inf = (1e18);
const ll mod = 1000000007;
const vector<int> dy = {-1, 0, 1, 0}, ... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T> using V = vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
const ll inf = (1e18);
const ll mod = 1000000007;
const vector<int> dy = {-1, 0, 1, 0}, ... | null | 241,828 | 241,829 | u822169805 | cpp |
p02537 | #include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
typedef long long ll;
using namespace std;
const int nm = 300010;
int n, k, a[nm];
int tree[4 * nm];
void update(int u, int x, int l, int r, int id) {
if (l == r) {
tree[id] = max(tree[id], x);
return;
}
int m = (l +... | #include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
typedef long long ll;
using namespace std;
const int nm = 300010;
int n, k, a[nm];
int tree[4 * nm];
void update(int u, int x, int l, int r, int id) {
if (l == r) {
tree[id] = max(tree[id], x);
return;
}
int m = (l +... | null | 241,830 | 241,831 | u226234691 | cpp |
p02537 | #import <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long LL;
LL i, j, k, m, n, p = 1, v, a[1050000], l[1050000], r[1050000];
LL M(LL x, LL y, LL d) {
if (x <= l[d] && r[d] <= y)
return a[d];
if (r[d] < x || y < l[d])
return 0;
return max(M(x, y, d << 1), M(x, y, (d << 1) + 1));
}
v... | #import <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long LL;
LL i, j, k, m, n, p = 1, v, a[1050000], l[1050000], r[1050000];
LL M(LL x, LL y, LL d) {
if (x <= l[d] && r[d] <= y)
return a[d];
if (r[d] < x || y < l[d])
return 0;
return max(M(x, y, d << 1), M(x, y, (d << 1) + 1));
}
v... | null | 242,832 | 242,833 | u381108555 | cpp |
p02537 | #include <functional>
#include <iostream>
#include <vector>
template <class T> struct SegmentTree {
using Merger = std::function<T(T, T)>;
int length;
std::vector<T> dat;
T unit;
Merger merge;
SegmentTree() = default;
SegmentTree(int n, const T &unit, const Merger &merge)
: length(1), unit(unit)... | #include <functional>
#include <iostream>
#include <vector>
template <class T> struct SegmentTree {
using Merger = std::function<T(T, T)>;
int length;
std::vector<T> dat;
T unit;
Merger merge;
SegmentTree() = default;
SegmentTree(int n, const T &unit, const Merger &merge)
: length(1), unit(unit)... | null | 242,372 | 242,373 | u059727354 | cpp |
p02537 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define eFOR(i, a, n) for (in... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define eFOR(i, a, n) for (in... | null | 242,845 | 242,846 | u863044225 | cpp |
p02538 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#... | null | 242,861 | 242,862 | u699554766 | cpp |
p02538 | // W i B
#include <bits/stdc++.h>
#define F first
#define S second
#define MOD 1000000007
#define pb push_back
#define bit(x, p) ((x >> p) & 1)
#define ll long long
#define Task "CF"
using namespace std;
const int base = 100003;
const int maxn = 200005;
int n, k;
ll tree[8 * maxn], T1[maxn], P[maxn], lazy[maxn];
voi... | // W i B
#include <bits/stdc++.h>
#define F first
#define S second
#define MOD 998244353
#define pb push_back
#define bit(x, p) ((x >> p) & 1)
#define ll long long
#define Task "CF"
using namespace std;
const int base = 100003;
const int maxn = 200005;
int n, k;
ll tree[8 * maxn], T1[maxn], P[maxn], lazy[4 * maxn];
... | null | 242,229 | 242,230 | u487884309 | cpp |
p02540 | #include <algorithm>
#include <deque>
#include <iostream>
#include <vector>
using namespace std;
#include <vector>
struct UF {
int n;
vector<int> parent, rank;
UF(int n_ = 0) : n(n_), parent(n_), rank(n_, 1) {
for (int i = 0; i < n_; i++)
parent[i] = i;
}
int find(int a) { return parent[a] != a ? pa... | #include <algorithm>
#include <deque>
#include <iostream>
#include <vector>
using namespace std;
#include <vector>
struct UF {
int n;
vector<int> parent, rank;
UF(int n_ = 0) : n(n_), parent(n_), rank(n_, 1) {
for (int i = 0; i < n_; i++)
parent[i] = i;
}
int find(int a) { return parent[a] != a ? pa... | null | 242,292 | 242,293 | u657913472 | cpp |
p02540 |
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define mp make_pair
#define pb push_back
#define a first
#define b second
#define endl '\n'
int n;
int aa[200001];
int bb[200001];
pair<int, int> cc[200001];
int ans[200001];
int par[200001];
int ss[200001];
int mi[200001];
int find(int no) {
if ... |
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define mp make_pair
#define pb push_back
#define a first
#define b second
#define endl '\n'
int n;
int aa[200001];
int bb[200001];
pair<int, int> cc[200001];
int ans[200001];
int par[200001];
int ss[200001];
int mi[200001];
int find(int no) {
if ... | null | 242,294 | 242,295 | u180645294 | cpp |
p02541 |
// Problem : B - Sum is Multiple
// Contest : AtCoder - ACL Contest 1
// URL : https://atcoder.jp/contests/acl1/tasks/acl1_b
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
// 私に忍び寄るのをやめてください、ありがとう
#include <bits/stdc++.h>
using namespace std;
#pragma ... |
// Problem : B - Sum is Multiple
// Contest : AtCoder - ACL Contest 1
// URL : https://atcoder.jp/contests/acl1/tasks/acl1_b
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
// 私に忍び寄るのをやめてください、ありがとう
#include <bits/stdc++.h>
using namespace std;
#pragma ... | null | 243,480 | 243,481 | u430707737 | cpp |
p02541 | #pragma region include
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#inc... | #pragma region include
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#inc... | null | 243,499 | 243,500 | u766846351 | cpp |
p02541 | //#define _GLIBCXX_DEBUG
//#include "atcoder/all"
// using namespace atcoder;
#include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
#define dump(x) \
if (dbg) { ... | //#define _GLIBCXX_DEBUG
//#include "atcoder/all"
// using namespace atcoder;
#include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
#define dump(x) \
if (dbg) { ... | null | 243,519 | 243,520 | u070600790 | cpp |
p02547 |
// Problem : B - Go to Jail
// Contest : AtCoder - AtCoder Beginner Contest 179
// URL : https://atcoder.jp/contests/abc179/tasks/abc179_b
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
typedef long long in... |
// Problem : B - Go to Jail
// Contest : AtCoder - AtCoder Beginner Contest 179
// URL : https://atcoder.jp/contests/abc179/tasks/abc179_b
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
typedef long long in... | null | 245,360 | 245,361 | u719027159 | cpp |
p02547 | /////////////////////////////////////////////////
///// Give me AC!!!! /////
/////////////////////////////////////////////////
//↑これじゃ気合いが足りない!
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////
///お願いしますACをくださいそうじゃないと僕泣きますお願いしま... | /////////////////////////////////////////////////
///// Give me AC!!!! /////
/////////////////////////////////////////////////
//↑これじゃ気合いが足りない!
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////
///お願いしますACをくださいそうじゃないと僕泣きますお願いしま... | null | 245,362 | 245,363 | u620626180 | cpp |
p02547 | #include <bits/stdc++.h>
using namespace std;
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define watch(... | #include <bits/stdc++.h>
using namespace std;
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define watch(... | null | 245,234 | 245,235 | u626186340 | cpp |
p02547 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define f0(i, a, b) for (int i = a; i < b; i++)
#define f1(i, a, b) for (int i = a; i <= b; i++)
#define f2(i, a, b) for (int i = a; i > b; i--)
#define f3(i, a, b) for (int i = a; i >= ... |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define f0(i, a, b) for (int i = a; i < b; i++)
#define f1(i, a, b) for (int i = a; i <= b; i++)
#define f2(i, a, b) for (int i = a; i > b; i--)
#define f3(i, a, b) for (int i = a; i >= ... | null | 245,254 | 245,255 | u318894730 | cpp |
p02547 | #include <bits/stdc++.h>
#define ll long long
int M = 1e9 + 7;
using namespace std;
int main() {
int n, cnt = 0, ans = 0;
cin >> n;
pair<int, int> p[n];
for (int i = 0; i < n; i++) {
cin >> p[i].first >> p[i].second;
if (p[i].first == p[i].second)
cnt++;
else
cnt = 0;
if (cnt >= 3)
... | #include <bits/stdc++.h>
#define ll long long
int M = 1e9 + 7;
using namespace std;
int main() {
int n, cnt = 0, ans = 0;
cin >> n;
pair<int, int> p[n];
for (int i = 0; i < n; i++) {
cin >> p[i].first >> p[i].second;
if (p[i].first == p[i].second)
cnt++;
else
cnt = 0;
if (cnt >= 3)
... | null | 245,266 | 245,267 | u974480625 | cpp |
p02547 | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
#define PI 3.141592653589793238462643383279
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
typedef long long int ll;
typedef unsigned long long... | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
#define PI 3.141592653589793238462643383279
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
typedef long long int ll;
typedef unsigned long long... | null | 245,048 | 245,049 | u140607769 | cpp |
p02547 | #include <bits/stdc++.h>
using namespace std;
#define fr first
#define sc second
#define Fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define fr first
#define sc second
#define Fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | null | 245,060 | 245,061 | u834174868 | cpp |
p02547 | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(0); ... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(0); ... | null | 245,062 | 245,063 | u064544517 | cpp |
p02547 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int cnt = 0;
string ans = "NO";
for (int i = 0; i < N; i++) {
int D1, D2;
cin >> D1 >> D2;
if (D1 == D2)
cnt++;
else
cnt = 0;
if (cnt == 3) {
ans = "YES";
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int cnt = 0;
string ans = "No";
for (int i = 0; i < N; i++) {
int D1, D2;
cin >> D1 >> D2;
if (D1 == D2)
cnt++;
else
cnt = 0;
if (cnt == 3) {
ans = "Yes";
}
}
cout << ans << endl;
} | null | 245,081 | 245,082 | u597584295 | cpp |
p02547 | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vector<int>... | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vector<int>... | null | 245,024 | 245,025 | u055148641 | cpp |
p02547 | #include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
// math
//--------... | #include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
// math
//--------... | null | 245,207 | 245,208 | u276588887 | cpp |
p02547 | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | null | 245,165 | 245,166 | u322057345 | cpp |
p02547 | #include <algorithm>
#include <cctype>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef int long long ll;... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef int long long ll;... | null | 245,183 | 245,184 | u031448582 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long long MOD = 1000000007;
constexpr long long INF = 1LL << 60;
const long double PI = acosl(-1.0);
constexpr long double EPS = 1e-11;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long long MOD = 1000000007;
constexpr long long INF = 1LL << 60;
const long double PI = acosl(-1.0);
constexpr long double EPS = 1e-11;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return ... | null | 245,386 | 245,387 | u371051907 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (in... | #include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (in... | null | 245,394 | 245,395 | u361777955 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <string_view>
#include <unordered_map>
#inc... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <string_view>
#include <unordered_map>
#inc... | null | 245,412 | 245,413 | u533749093 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int32_t main() {
int n;
cin >> n;
int c = 0, sum;
for (int i = 1; i <= n; i++) {
sum += floor((n - 1) / i);
}
cout << sum << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
int32_t main() {
int n;
cin >> n;
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += floor((n - 1) / i);
}
cout << sum << endl;
}
| null | 245,416 | 245,417 | u150985509 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int cnt = 0;
for (int i = 1; i <= n - 1; i++) {
cnt += n / i;
}
cout << cnt << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int cnt = 0;
for (int i = 1; i <= n - 1; i++) {
cnt += (n - 1) / i;
}
cout << cnt << endl;
return 0;
} | null | 245,422 | 245,423 | u268467094 | cpp |
p02548 | #include <iostream>
#include <string>
#include <vector>
int main() {
int n;
std::cin >> n;
int count = 0;
for (int a = 1; a < n; a++) {
for (int b = 1; b <= (n - 1) / a; b++) {
count += 1;
}
}
std::cout << n << std::endl;
} | #include <iostream>
#include <string>
#include <vector>
int main() {
int n;
std::cin >> n;
int count = 0;
for (int a = 1; a < n; a++) {
for (int b = 1; b <= (n - 1) / a; b++) {
count += 1;
}
}
std::cout << count << std::endl;
} | null | 245,433 | 245,434 | u838024582 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 0;
int n;
cin >> n;
for (int i = 1; i < n; i++) {
ans += n - 1 / i;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 0;
int n;
cin >> n;
for (int i = 1; i < n; i++) {
ans += (n - 1) / i;
}
cout << ans << endl;
} | null | 245,437 | 245,438 | u247216870 | cpp |
p02548 | #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,... | null | 245,476 | 245,477 | u008365786 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
ll sol = 0;
for (int a = 1; a <= n; a++) {
sol += n / a;
}
cout << sol << "\n";
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
ll sol = 0;
n--;
for (int a = 1; a <= n; a++) {
sol += n / a;
}
cout << sol << "\n";
}
| null | 245,505 | 245,506 | u804448625 | cpp |
p02548 | #include <bits/stdc++.h>
#define lint long long int
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define arep(i, a, n) for (int i = a; i < n; i++)
#define sort(a) sort(a.begin(), a.end())
#define reverse(a) reverse(a.begin(), a.end())
#define fill(a, x) fill(a.be... | #include <bits/stdc++.h>
#define lint long long int
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define arep(i, a, n) for (int i = a; i < n; i++)
#define sort(a) sort(a.begin(), a.end())
#define reverse(a) reverse(a.begin(), a.end())
#define fill(a, x) fill(a.be... | null | 245,521 | 245,522 | u955586894 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, i, j, k, res = 0;
cin >> n;
// int r = n
for (i = 1; i < n; i++) {
for (j = 1; j < n; j++) {
if (n - (i * j) < n && n - (i * j) > 0)
res++;
else
break;
// r--;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, i, j, k, res = 0;
cin >> n;
// int r = n
for (i = 1; i < n; i++) {
for (j = 1; j < n; j++) {
if (n - (i * j) < n && n - (i * j) > 0)
res++;
else
break;
// r--;
}
}
cout << res;
} | null | 245,442 | 245,443 | u019595426 | cpp |
p02548 | #include <bits/stdc++.h>
#define pb push_back
#define fo(i, n) for (int i = 0; i < n; i++)
#define ll long long
#define int long long
#define Mod 10000000000007
#define maxn 200005
#define MAX 4294967296 // 2^32
const int M = 1e9 + 7;
#define ip pair<int, int>
#define test(t) ... | #include <bits/stdc++.h>
#define pb push_back
#define fo(i, n) for (int i = 0; i < n; i++)
#define ll long long
#define int long long
#define Mod 10000000000007
#define maxn 200005
#define MAX 4294967296 // 2^32
const int M = 1e9 + 7;
#define ip pair<int, int>
#define test(t) ... | null | 245,454 | 245,455 | u223377124 | cpp |
p02548 | #include <bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main() {
int n;
int count = 0;
cin >> n;
for (int i = 1; i < n; i++) {
count += (n / i);
count += (n % i == 0) ? 1 : 0;
}
cout << count;
return 0;
} | #include <bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main() {
long long int n;
long long int count = 0;
cin >> n;
for (int i = 1; i < n; i++) {
count += (n / i);
count -= (n % i == 0) ? 1 : 0;
}
cout << count;
return 0;
}
| null | 245,458 | 245,459 | u436681785 | cpp |
p02548 | #include <cmath>
#include <iostream>
using namespace std;
int N;
int main() {
cin >> N;
int count = 0;
for (int c = 1; c < N; c++) {
double Nc = sqrt(N - c);
for (int a = 1; a < Nc; a++) {
if ((N - c) % a == 0) {
count += 2;
}
}
int a = round(Nc);
if (abs(Nc) < 0.0000001) ... | #include <cmath>
#include <iostream>
using namespace std;
int N;
int main() {
cin >> N;
int count = 0;
for (int c = 1; c < N; c++) {
double Nc = sqrt(N - c);
for (int a = 1; a < Nc; a++) {
if ((N - c) % a == 0) {
count += 2;
}
}
int a = round(Nc);
if (abs(Nc - a) < 0.00000... | null | 245,646 | 245,647 | u948266886 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, i, j, count = 0;
cin >> N;
for (i = 1; i < N; i++) {
for (j = i; j < N; j++) {
if (N - i * j <= 0) {
break;
} else if (i == j) {
count++;
} else {
count += 2;
}
};
}
cout << count << endl;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N, i, j, count = 0;
cin >> N;
for (i = 1; i < N; i++) {
for (j = i; j < N; j++) {
if (N - i * j <= 0) {
break;
} else if (i == j) {
count++;
} else {
count += 2;
}
};
}
cout << count << e... | null | 245,648 | 245,649 | u073000401 | cpp |
p02548 | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <math.h>
#include <numeric>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int N;
int i, j;
int cnt = 0;
cin >> N;
for (i = 1; i * (i + 1) < N; i++) {
for (j = i; j < N; j++) {
if (i * j < N) {
... | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <math.h>
#include <numeric>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int N;
int i, j;
int cnt = 0;
cin >> N;
for (i = 1; i * i < N; i++) {
for (j = i; j < N; j++) {
if (i * j < N) {
if (... | null | 245,603 | 245,604 | u913852240 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
long long divisor(int n) {
long long ret;
for (int i = 1; i * i <= n; i++) {
if (n % i == 0) {
ret++;
if (i * i != n)
ret++;
}
}
return ret;
}
int main() {
int N;
cin >> N;
long long ans = 0;
for (int i = 1; i < N; i++) {
a... | #include <bits/stdc++.h>
using namespace std;
long long divisor(int n) {
long long ret = 0;
for (int i = 1; i * i <= n; i++) {
if (n % i == 0) {
ret++;
if (i * i != n)
ret++;
}
}
return ret;
}
int main() {
int N;
cin >> N;
long long ans = 0;
for (int i = 1; i < N; i++) {
... | null | 245,622 | 245,623 | u923051067 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int n, cnt, f[maxn];
int main() {
int n, cnt;
scanf("%d", &n);
for (int i = 1; i < n; i++)
f[i] = 1;
for (int i = 2; i < n; i++) {
for (int j = i; j < n; j += i)
++f[j];
}
for (int i = 1; i < n; i++)
cnt += f[i];
pri... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int n, cnt, f[maxn];
int main() {
scanf("%d", &n);
for (int i = 1; i < n; i++)
f[i] = 1;
for (int i = 2; i < n; i++) {
for (int j = i; j < n; j += i)
++f[j];
}
for (int i = 1; i < n; i++)
cnt += f[i];
printf("%d", cnt)... | null | 245,718 | 245,719 | u711155818 | cpp |
p02548 | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int a = 1;
int b = 1;
int c = 1;
// a, b, cは正整数
// a * b < N となる組み合わせを探せば良い
// a, bが定まればcは一意に定まる
long long count = 0;
for (a = 1; a < N; a++) {
count += N / a;
}
cout << count << endl;
} | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int a = 1;
int b = 1;
int c = 1;
// a, b, cは正整数
// a * b < N となる組み合わせを探せば良い
// a, bが定まればcは一意に定まる
long long count = 0;
for (a = 1; a < N; a++) {
count += (N - 1) / a;
}
cout << count << endl;
}
| null | 245,720 | 245,721 | u318955153 | cpp |
p02548 | #include <algorithm>
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define N 1010
#define pb push_back
#define fi first
#define se second
#define si size()
#define ll long long
#define mp make_pair
#define iter ::iterator
#define all(v) v.begin(), v.end()
#define... | #include <algorithm>
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define N 1010
#define pb push_back
#define fi first
#define se second
#define si size()
#define ll long long
#define mp make_pair
#define iter ::iterator
#define all(v) v.begin(), v.end()
#define... | null | 245,691 | 245,692 | u930689495 | cpp |
p02548 | /*
- If you fail to prepare, you are prepared to fail.
(C) Mark Spitz
*/
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x).size()
#define S second
#define F first
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
void setIO(s... | /*
- If you fail to prepare, you are prepared to fail.
(C) Mark Spitz
*/
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x).size()
#define S second
#define F first
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
void setIO(s... | null | 245,693 | 245,694 | u828521673 | cpp |
p02548 | ////////////// VATSAL AGARWAL ////////////////////////
////////////// Codeforces id : warhead38 ////////////////////////
////////////// Codechef id : vatsal38 ////////////////////////
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __... | ////////////// VATSAL AGARWAL ////////////////////////
////////////// Codeforces id : warhead38 ////////////////////////
////////////// Codechef id : vatsal38 ////////////////////////
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __... | null | 245,695 | 245,696 | u656463312 | cpp |
p02548 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
//定数
//円周率
const double pi = 3.141592653589793238462643383279;
//天井
const int INF = 1000000000; // = 10^9
const ll LINF = 100000000000000000; // = 10^17
// ABC文字列
const string ABC = "ABCDEFGHIJ... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
//定数
//円周率
const double pi = 3.141592653589793238462643383279;
//天井
const int INF = 1000000000; // = 10^9
const ll LINF = 100000000000000000; // = 10^17
// ABC文字列
const string ABC = "ABCDEFGHIJ... | null | 245,711 | 245,712 | u453366189 | cpp |
p02548 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
//定数
//円周率
const double pi = 3.141592653589793238462643383279;
//天井
const int INF = 1000000000; // = 10^9
const ll LINF = 100000000000000000; // = 10^17
// ABC文字列
const string ABC = "ABCDEFGHIJ... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
//定数
//円周率
const double pi = 3.141592653589793238462643383279;
//天井
const int INF = 1000000000; // = 10^9
const ll LINF = 100000000000000000; // = 10^17
// ABC文字列
const string ABC = "ABCDEFGHIJ... | null | 245,713 | 245,712 | u453366189 | cpp |
p02548 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
int ans = 0;
for (int i = 1; i <= 1000; i++) {
for (int j = 1; j <= 1000; j++) {
if (i * j >= n)
continue;
ans += 1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
int ans = 0;
for (int i = 1; i <= 1000000; i++) {
for (int j = 1; j <= 1000000; j++) {
if (i * j >= n)
break;
ans +... | null | 245,699 | 245,700 | u064087840 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
// --------------------------------------------------------
#define FOR(i, l, r) for (int i = (l); i < (r); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define SORT(c) sort(ALL(c))
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
// --------------------------------------------------------
#define FOR(i, l, r) for (int i = (l); i < (r); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define SORT(c) sort(ALL(c))
... | null | 245,732 | 245,733 | u934442292 | cpp |
p02549 | // O(nk)
#define IO \
ios::sync_with_stdio(false); \
cin.tie(); \
cout.tie(0)
#pragma GCC optimize(2)
#include <algorithm>
#include ... | // O(nk)
#define IO \
ios::sync_with_stdio(false); \
cin.tie(); \
cout.tie(0)
#pragma GCC optimize(2)
#include <algorithm>
#include ... | null | 245,734 | 245,735 | u399281391 | cpp |
p02549 | // O(nk)
#define IO \
ios::sync_with_stdio(false); \
cin.tie(); \
cout.tie(0)
#pragma GCC optimize(2)
#include <algorithm>
#include ... | // O(nk)
#define IO \
ios::sync_with_stdio(false); \
cin.tie(); \
cout.tie(0)
#pragma GCC optimize(2)
#include <algorithm>
#include ... | null | 245,736 | 245,735 | u399281391 | cpp |
p02549 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 50;
const int inf = 0x3f3f3f3f;
const... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 50;
const int inf = 0x3f3f3f3f;
const... | null | 246,203 | 246,204 | u942153032 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 998244353;
int main() {
int n, k;
cin >> n >> k;
vector<pair<int, int>> lr(k);
for (int i = 0; i < k; i++) {
int l, r;
cin >> l >> r;
lr[i] = {l, r};
}
vector<ll> dp(n);
vector<ll> sdp(n + 1);
dp[0] = 1;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 998244353;
int main() {
int n, k;
cin >> n >> k;
vector<pair<int, int>> lr(k);
for (int i = 0; i < k; i++) {
int l, r;
cin >> l >> r;
lr[i] = {l, r};
}
vector<ll> dp(n);
vector<ll> sdp(n + 1);
dp[0] = 1;
... | null | 246,215 | 246,216 | u932291797 | cpp |
p02549 | #include <bits/stdc++.h>
#include <cassert>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
/*
struct Edge
{
int to;
int weight;
Edge(int t, int w) : to(t), weight(w) {}
};
using Graph = vector<vector<Edge>>;
*/
using Graph = vector<vector... | #include <bits/stdc++.h>
#include <cassert>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
/*
struct Edge
{
int to;
int weight;
Edge(int t, int w) : to(t), weight(w) {}
};
using Graph = vector<vector<Edge>>;
*/
using Graph = vector<vector... | null | 246,217 | 246,218 | u665871498 | cpp |
p02549 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int mod = 998244353;
const int maxn = 200000 + 5;
int f[maxn], a[maxn], b[maxn];
int c[20];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 0; i < m; ++i)
scanf("%d%d", &a[i], &b[i]);
f[1] = 1;
for (int i = 2; i <= n; +... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int mod = 998244353;
const int maxn = 200000 + 5;
ll f[maxn], a[maxn], b[maxn];
ll c[20];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 0; i < m; ++i)
scanf("%d%d", &a[i], &b[i]);
f[1] = 1;
for (int i = 2; i <= n; ++i... | null | 246,246 | 246,247 | u055765743 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 998244353;
int main() {
ll n, k;
cin >> n >> k;
vector<pair<ll, ll>> sections;
for (int i = 0; i < k; ++i) {
ll l, r;
cin >> l >> r;
sections.push_back({l, r});
}
vector<ll> f(2 * n + 100, 0), a(2 * n + 100, ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 998244353;
int main() {
ll n, k;
cin >> n >> k;
vector<pair<ll, ll>> sections;
for (int i = 0; i < k; ++i) {
ll l, r;
cin >> l >> r;
sections.push_back({l, r});
}
vector<ll> f(2 * n + 100, 0), a(2 * n + 100, ... | null | 246,262 | 246,261 | u849073847 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
namespace ate {
template <int64_t p> struct F_p {
using value_type = int64_t;
static constexpr inline value_type get_mod() { return p; }
value_type value;
constexpr F_p() : value(value_type{}) {}
template <class T>
constexpr F_p(T v)
: value(static_cast<v... | #include <bits/stdc++.h>
using namespace std;
namespace ate {
template <int64_t p> struct F_p {
using value_type = int64_t;
static constexpr inline value_type get_mod() { return p; }
value_type value;
constexpr F_p() : value(value_type{}) {}
template <class T>
constexpr F_p(T v)
: value(static_cast<v... | null | 246,267 | 246,268 | u423624748 | cpp |
p02549 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int MOD = 998244353;
int main() {
int n, k;
cin >> n >> k;
vector<int> l(k), r(k);
rep(j... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int MOD = 998244353;
int main() {
int n, k;
cin >> n >> k;
vector<int> l(k), r(k);
rep(j... | null | 246,099 | 246,100 | u309168663 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
/******* All Required define Pre-Processors and typedef Constants *******/
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, a, b) for (int i = a; i <= (b); ++i)
#define rep3(i, a, b) for (int i = a; i >= (b); --i)
#define all(cont) cont.begin(), cont.end()
#... | #include <bits/stdc++.h>
using namespace std;
/******* All Required define Pre-Processors and typedef Constants *******/
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, a, b) for (int i = a; i <= (b); ++i)
#define rep3(i, a, b) for (int i = a; i >= (b); --i)
#define all(cont) cont.begin(), cont.end()
#... | null | 245,962 | 245,963 | u502312544 | cpp |
p02549 | #include <bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
// using namespace atcoder;
// https://algo-logic.info/segment-tree/
/* SegTreeLazyProportional<X,M>(n,fx,fa,fm,fp,ex,em): モノイド(集合X,
二項演算fx,fa,fm,p 単位元ex,em)についてサイズnで構築 set(int i, X x),
build(): i番目の要素をxにセット。まとめてセグ木を構築する。O(n) update(i,x):
... | #include <bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
// using namespace atcoder;
// https://algo-logic.info/segment-tree/
/* SegTreeLazyProportional<X,M>(n,fx,fa,fm,fp,ex,em): モノイド(集合X,
二項演算fx,fa,fm,p 単位元ex,em)についてサイズnで構築 set(int i, X x),
build(): i番目の要素をxにセット。まとめてセグ木を構築する。O(n) update(i,x):
... | null | 246,049 | 246,050 | u853817705 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 100;
const int S = 5e5 + 100;
const ll MOD = 998244353;
ll dp[S] = {0};
void add(int id, ll x) {
// cout<<"add: "<<id<<' '<<x<<'\n';
x %= MOD;
while (id < S) {
dp[id] += x;
// assert(dp[id] >= 0);
dp[id] %= MO... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 100;
const int S = 5e5 + 100;
const ll MOD = 998244353;
ll dp[S] = {0};
void add(int id, ll x) {
// cout<<"add: "<<id<<' '<<x<<'\n';
x %= MOD;
while (id < S) {
dp[id] += x;
dp[id] %= MOD;
id += id & -id;
}
}... | null | 245,747 | 245,748 | u567815593 | cpp |
p02549 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
... | null | 245,782 | 245,783 | u156778176 | cpp |
p02549 | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#define dlog(str) cout << "====" << str << endl;
#else
#define dlog(str)
#endif
#define INF 998244353
#define MOD 1000000007
#define REP(i, n) for (int i = 0, i##_l = (n); i < i##_l; i++)
#define FOR(i, s, e) for (int i = s, i##_l = (e); i < i##_l; i++)
#defin... | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#define dlog(str) cout << "====" << str << endl;
#else
#define dlog(str)
#endif
#define INF 998244353
#define MOD 998244353
#define REP(i, n) for (int i = 0, i##_l = (n); i < i##_l; i++)
#define FOR(i, s, e) for (int i = s, i##_l = (e); i < i##_l; i++)
#define... | null | 245,788 | 245,789 | u840105874 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 998244353;
int n, k, l[10], r[10], a[200001], b[200002] = {0, 1, -1};
int main() {
cin >> n >> k;
for (int i = 0; i < k; ++i) {
cin >> l[i] >> r[i];
}
for (int i = 1; i < n; ++i) {
a[i] = (a[i - 1] + b[i]) % mod;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 998244353;
int n, k, l[10], r[10], a[200001], b[200002] = {0, 1, -1};
int main() {
cin >> n >> k;
for (int i = 0; i < k; ++i) {
cin >> l[i] >> r[i];
}
for (int i = 1; i < n; ++i) {
a[i] = (a[i - 1] + b[i]) % mod;
... | null | 245,836 | 245,837 | u154898295 | cpp |
p02549 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define r... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define r... | null | 246,103 | 246,104 | u277556971 | cpp |
p02549 | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cstdint>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#in... | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cstdint>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#in... | null | 245,898 | 245,899 | u535347736 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.