Skip to content

Instantly share code, notes, and snippets.

Akifumi Imanishi asi1024

Block or report user

Report or block asi1024

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View template.cpp
#include "../../lib/template/template.cpp"
{% if mod %} #include "../../lib/types/mod.cpp" {% endif %}
{% if mod %} using Mod = Modulo<{{ mod }}>; {% endif %}
{% if yes_str and no_str %}
struct yes_no : std::numpunct<char> {
string_type do_truename() const { return "{{ yes_str }}"; }
string_type do_falsename() const { return "{{ no_str }}"; }
};
View scc_functional.cpp
#include <bits/stdc++.h>
using namespace std;
template<typename Edge>
vector<int> scc(const vector<vector<Edge>> &g) {
const int n = g.size();
vector<vector<int>> rg(n);
vector<int> cmp(n), vs;
vector<bool> used(n, false);
View segtree2.cpp
template <class T>
class SegmentTree {
const int n;
vector<T> data;
public:
SegmentTree(const int s) : n(1 << s), data(n * 2, T()) {}
void update(int p, T val) {
data[p += n] = val;
while (p /= 2) {
data[p] = merge(data[p * 2], data[p * 2 + 1]);
View segtree1.cpp
template <class T>
class SegmentTree {
const int n;
vector<T> data;
T sub(int l, int r, int node, int lb, int ub) const {
if (ub <= l || r <= lb) return T();
if (l <= lb && ub <= r) return data[node];
T vl = sub(l, r, node * 2 + 0, lb, (lb + ub) / 2);
T vr = sub(l, r, node * 2 + 1, (lb + ub) / 2, ub);
return merge(vl, vr);
View AOJ2751.cpp
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
const int mod = 1000000007;
View AOJ2749.cpp
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;
int N, M;
int s[16], d[128];
int memo[1<<15][128];
View AOJ2748.cpp
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;
using ld = long double;
struct Edge{ int src, dest; };
View AOJ2747.cpp
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
View AOJ2746.cpp
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;
vector<string> from_jfen(string s) {
s += "/";
vector<string> res;
View AOJ2745.cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int R0, W0, C, R;
while (cin >> R0 >> W0 >> C >> R, C) {
int rest = max(W0 * C - R0, 0);
cout << (rest + R - 1) / R << endl;
}
You can’t perform that action at this time.