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
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int INF = 1 << 29; int main() { ios::sync_with_stdio(false); int R, G, B, N, ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= (...
#include <algorithm> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int INF = 1 << 29; int main() { ios::sync_with_stdio(false); int R, G, B, N, ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= (...
replace
15
19
15
17
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; int max_r, max_g, max_b; max_r = N / R; max_g = N / G; max_b = N / B; for (int i = 0; i < max_r + 1; i++) { for (int j = 0; j < max_g + 1; j++) { for (int k = 0; k < max_b + 1; k++...
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; int max_r, max_g, max_b; max_r = N / R; max_g = N / G; max_b = N / B; for (int i = 0; i < max_r + 1; i++) { for (int j = 0; j < max_g + 1; j++) { if ((N - (R * i + G * j)) % B == 0...
replace
16
19
16
18
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n, cnt = 0; cin >> r >> g >> b >> n; for (int i = 0; i * r <= n; i++) { for (int j = 0; j * g + i * r <= n; j++) { for (int k = 0; k * b + j * g + i * r <= n; k++) { if (i * r + j * g + k * b == n) { cnt++; ...
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n, cnt = 0; cin >> r >> g >> b >> n; for (int i = 0; i * r <= n; i++) { for (int j = 0; j * g + i * r <= n; j++) { if (i * r + j * g == n) { cnt++; } else if (i * r + j * g < n) { if ((n - (i * r + j * g)) %...
replace
10
12
10
14
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> #include <vector> // #include <string> #include <algorithm> #include <cmath> #include <iostream> #include <numeric> using namespace std; int main() { int r, g, b, n, ans = 0, tmp; cin >> r >> g >> b >> n; if (r < g) { tmp = r; r = g; g = tmp; } if (r < b) { tmp = r; ...
#include <iostream> #include <vector> // #include <string> #include <algorithm> #include <cmath> #include <iostream> #include <numeric> using namespace std; int main() { int r, g, b, n, ans = 0, tmp; cin >> r >> g >> b >> n; if (r < g) { tmp = r; r = g; g = tmp; } if (r < b) { tmp = r; ...
replace
33
37
33
35
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <unordered_map> #include <vector> using namespace std; #define intmax INT_MAX #define...
#include <algorithm> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <unordered_map> #include <vector> using namespace std; #define intmax INT_MAX #define...
replace
82
88
82
84
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; } int main() { ll R, G, B, N, ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N; i++) { for (int j = 0; j <= N - i * R; j++) { for (int k = 0...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; } int main() { ll R, G, B, N, ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N; i++) { for (int j = 0; j <= N - i * R; j++) { if ((N - (i * ...
replace
13
17
13
15
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <iostream> using namespace std; #define REP(i, n) FOR(i, 0, n) #define FOR(i, a, b) for (int i = (a), i##Len_ = (b); i < i##Len_; i++) int main() { vector<int> X(4); vector<int> Y(4); REP(i, 4) { cin >> X[i]; } int a, b, res, cnt; REP(i, 4) { Y[i] = X[3] / X[i]; } vec...
#include <bits/stdc++.h> #include <iostream> using namespace std; #define REP(i, n) FOR(i, 0, n) #define FOR(i, a, b) for (int i = (a), i##Len_ = (b); i < i##Len_; i++) int main() { vector<int> X(4); vector<int> Y(4); REP(i, 4) { cin >> X[i]; } int a, b, res, cnt; REP(i, 4) { Y[i] = X[3] / X[i]; } vec...
replace
32
40
32
35
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> using namespace std; constexpr int MAX_N = 3000; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (auto r = 0u; r <= MAX_N / R; ++r) { for (auto g = 0u; g <= (MAX_N - R * r) / G; ++g) { for (auto b = 0u; b <= (MAX_N - R * r - G * g) / B; ++b) { if...
#include <iostream> using namespace std; constexpr int MAX_N = 3000; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (auto r = 0u; r <= MAX_N / R; ++r) { auto rc = R * r; for (auto g = 0u; g <= (MAX_N - rc) / G; ++g) { auto rest = N - rc - G * g; if (rest / B <= M...
replace
11
16
11
16
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; signed main() { long long R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { for (int k = 0; k <= N / B; k++) { if (R * i + G * j + B * k == N) { count++; } ...
#include <bits/stdc++.h> using namespace std; signed main() { long long R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { if (N - R * i - G * j >= 0 && (N - R * i - G * j) % B == 0) { count++; } } } cout <...
replace
10
14
10
12
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <queue> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= (N / R); r++) { for (int g = 0; g <= ((N - r * R) / G); g++) { for (int b = 0; b <= (...
#include <bits/stdc++.h> #include <queue> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= (N / R); r++) { for (int g = 0; g <= ((N - r * R) / G); g++) { int count = r * R + g ...
replace
13
18
13
20
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()) #define VRSORT(v) sort(v.rbegin(), v.rend()) // vectorの降順ソート #define ll long long #define pb(a) push_back(a) #define INF 1000000000 #define MOD 1000000007 using namespace s...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()) #define VRSORT(v) sort(v.rbegin(), v.rend()) // vectorの降順ソート #define ll long long #define pb(a) push_back(a) #define INF 1000000000 #define MOD 1000000007 using namespace s...
replace
43
48
43
49
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <stack> #include <string.h> #include <string> #include <vector> #define Z class #define ln cout << '\n' #define ll long long #define rep(i, n) for (int i = 0; i < (n); ++i) // ASCII...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <stack> #include <string.h> #include <string> #include <vector> #define Z class #define ln cout << '\n' #define ll long long #define rep(i, n) for (int i = 0; i < (n); ++i) // ASCII...
replace
74
78
74
76
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; ll ans = 0; int r_max = (N + R - 1) / R; int g_max = (N + G - 1) / G; int b_max = (N + B - 1) / B; rep(i, r_max + 1) rep(j, g_max + 1) ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; ll ans = 0; int r_max = (N + R - 1) / R; int g_max = (N + G - 1) / G; rep(i, r_max + 1) rep(j, g_max + 1) { int k = (N - i * R - j * ...
replace
11
13
11
15
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <iostream> #include <string.h> using namespace std; int main(void) { int R, G, B, N, answer = 0, num1, num2; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) { num1 = N - R * i; for (int j = 0; j <= num1 / G; j++) { num2 = num1 - G * j; ...
#include <algorithm> #include <cstdio> #include <iostream> #include <string.h> using namespace std; int main(void) { int R, G, B, N, answer = 0, num1, num2; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) { num1 = N - R * i; for (int j = 0; j <= num1 / G; j++) { num2 = num1 - G * j; ...
replace
13
17
13
15
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define REP(i, a, b) for (int i = (int)(a); (i) < (int)(b); i++) typedef unsigned long long ull; typedef long long ll; const int INF = 1001001001; const ll MOD = 1e9 + 7; using namespace std; using P = pair<int, int>; ll gcd(...
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define REP(i, a, b) for (int i = (int)(a); (i) < (int)(b); i++) typedef unsigned long long ull; typedef long long ll; const int INF = 1001001001; const ll MOD = 1e9 + 7; using namespace std; using P = pair<int, int>; ll gcd(...
replace
23
34
23
29
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; R * r <= N; r++) for (int g = 0; G * g <= N; g++) for (int b = 0; B * b <= N; b++) { if (R * r + G * g + B * b == N) ans++; } cout << ans << en...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; R * r <= N; r++) for (int g = 0; G * g + R * r <= N; g++) { if ((N - R * r - G * g) % B == 0) ans++; } cout << ans << endl; }
replace
10
15
10
14
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <utility> #in...
#include <algorithm> #include <bitset> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <utility> #in...
replace
50
54
50
54
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int cnt = 0; for (int r = 0; R * r <= N; r++) { for (int g = 0; G * g <= N; g++) { for (int b = 0; B * b <= N; b++) { if (N == R * r + G * g + B * b) cnt++; } } } cout << c...
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int cnt = 0; for (int r = 0; R * r <= N; r++) { for (int g = 0; G * g <= N; g++) { if (N < R * r + G * g) continue; if ((N - R * r - G * g) % B == 0) cnt++; } } cout << cnt <...
replace
10
14
10
14
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int k = 0; for (int x = 0; x < N + 1; x++) { if (R * x > N) break; for (int y = 0; y < N + 1; y++) { if (R * x + G * ...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int k = 0; for (int x = 0; x < N + 1; x++) { if (R * x > N) break; for (int y = 0; y < N + 1; y++) { if (R * x + G * ...
replace
17
20
17
19
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <numeric> #include <queue> #includ...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <numeric> #include <queue> #includ...
replace
70
74
70
73
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int res = 0; for (int r = 0; r * R <= N; r++) { for (int g = 0; g * G <= N - (r * R); g++) { for (int b = 0; b * B <= N - (r * R) - (g * G); b++) { if (r * R + g * G + b * B == N) res++; ...
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int res = 0; for (int r = 0; r * R <= N; r++) { for (int g = 0; g * G <= N - (r * R); g++) { if ((N - (r * R + g * G)) % B == 0) res++; } } cout << res << endl; }
replace
9
13
9
12
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const double EPS = 1e-9; const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef pair<int, int> pi; typedef pair<ll, ll> pll; typedef map<int, int> mi; typedef set<int> si; #d...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const double EPS = 1e-9; const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef pair<int, int> pi; typedef pair<ll, ll> pll; typedef map<int, int> mi; typedef set<int> si; #d...
replace
66
72
66
69
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int answer = 0; for (int i = 0; i <= (N / R); i++) { for (int j = 0; j <= (N - R * i) / G; j++) { for (int k = 0; k <= (N - R * i - G * j) / B; k++) { if (R * i + G * j + B * k == N) a...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int answer = 0; for (int i = 0; i <= (N / R); i++) { for (int j = 0; j <= (N - R * i) / G; j++) { if ((N - R * i - G * j) % B == 0) answer++; } } cout << answer; return 0; }
replace
8
12
8
10
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int r = R; int g = G; int b = B; int count = 0; for (int i = 0; i <= N; i += r) { for (int x = 0; x + i <= N; x += g) { for (int y = 0; y + x + i <= N; y += b) { if (y + x + i == N) { ...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int r = R; int g = G; int b = B; int count = 0; if (R == G == B) { if (N % G == 0) { int xxx = N / R; int yyy = xxx + 2; int yyyy = xxx + 1; int yyyyy = yyy * yyyy; count ...
replace
10
15
10
27
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int a, b, c, ans, n, k, r, g; int main() { cin >> r >> g >> b >> n; for (int i = 0; i < (n / r) + 1; i++) { for (int u = 0; u < (n / g) + 1; u++) { for (int o = 0; o < (n / b) + 1; o++) { if ((i * r) + (u * g) + (o * b) == n) ans++; }...
#include <bits/stdc++.h> using namespace std; int a, b, c, ans, n, k, r, g; int main() { cin >> r >> g >> b >> n; for (int i = 0; i < n + 1; i += r) { if (i > n) break; for (int u = 0; u < n + 1; u += g) { if (u > n) break; int ll = n - i - u; if (ll < b && ll != 0) ...
replace
7
12
7
23
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define repp(i, n, m) for (int i = (int)(n); i < (int)(m); i++) #define rrep(i, n, m) for (int i = n; i >= m; i--) #define ALL(a) (a).begin(), (a).end() #define p(a, b) printf(a, b); #define c(s) cout << (s) << endl; #define yes...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define repp(i, n, m) for (int i = (int)(n); i < (int)(m); i++) #define rrep(i, n, m) for (int i = n; i >= m; i--) #define ALL(a) (a).begin(), (a).end() #define p(a, b) printf(a, b); #define c(s) cout << (s) << endl; #define yes...
replace
41
45
41
46
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) constexpr int INF = numeric_limits<int>::max() / 2; constexpr long long INFL = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) constexpr int INF = numeric_limits<int>::max() / 2; constexpr long long INFL = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int ...
replace
18
25
18
21
TLE
p03048
C++
Runtime Error
#include <cstdio> #include <iostream> using namespace std; int a, b, c, n, ans; int main() { freopen("input.txt", "r", stdin); int i, j, t; cin >> a >> b >> c >> n; for (i = 0; i <= 3000; i++) for (j = 0; j <= 3000; j++) { t = n - a * i - b * j; if (t < 0) break; if (t % c == 0) ...
#include <cstdio> #include <iostream> using namespace std; int a, b, c, n, ans; int main() { int i, j, t; cin >> a >> b >> c >> n; for (i = 0; i <= 3000; i++) for (j = 0; j <= 3000; j++) { t = n - a * i - b * j; if (t < 0) break; if (t % c == 0) ans++; } cout << ans; ...
delete
7
8
7
7
-8
p03048
C++
Time Limit Exceeded
#include <iostream> #include <stdio.h> using namespace std; int R, G, B, N; int main() { cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= N; r += R) { for (int g = 0; g <= N - r; g += G) { for (int b = 0; b <= N - (r + g); b += B) { // int b = N - (r + g); if ((r + g + b) == ...
#include <iostream> #include <stdio.h> using namespace std; int R, G, B, N; int main() { cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= N; r += R) { for (int g = 0; g <= N - r; g += G) { if ((N - (r + g)) % B == 0) ans++; } } cout << ans << endl; return 0; }
replace
10
15
10
12
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using ll = long long; using itn = int; using namespace std; int GCD(...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using ll = long long; using itn = int; using namespace std; int GCD(...
replace
22
29
22
39
TLE
p03048
C++
Runtime Error
/* author: Apoorv Singh */ #include <bits/stdc++.h> using namespace std; typedef vector<long long> vi; typedef pair<long long, long long> pii; #define pb push_back #define all(c) c.begin(), c.end() #define watch(x) cout << (#x) << " " << (x) << endl; #define FOR(i, a, b) for (long long i = a; i < b; ++i) #define FORR...
/* author: Apoorv Singh */ #include <bits/stdc++.h> using namespace std; typedef vector<long long> vi; typedef pair<long long, long long> pii; #define pb push_back #define all(c) c.begin(), c.end() #define watch(x) cout << (#x) << " " << (x) << endl; #define FOR(i, a, b) for (long long i = a; i < b; ++i) #define FORR...
delete
63
67
63
63
TLE
p03048
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); typedef long...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); typedef long...
replace
21
28
21
24
0
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; signed main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; R * r <= N; r++) { for (int g = 0; R * r + G * g <= N; g++) { for (int b = 0; R * r + G * g + B * b <= N; b++) { if (R * r + G * g + B * b == N) ans++; ...
#include <bits/stdc++.h> using namespace std; signed main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; R * r <= N; r++) { for (int g = 0; R * r + G * g <= N; g++) { if (N > R * r + G * g && (N - R * r - G * g) % B == 0) { ans++; } else if (N == R * r + G * g)...
replace
8
11
8
12
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define puts(i) cout << i << endl #define INF INT_MAX; #define INFL LLONG_MAX; typedef long long ll; using namespace std; int main() { int R, G, B, n; cin >> R >> G >> B >> n; in...
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define puts(i) cout << i << endl #define INF INT_MAX; #define INFL LLONG_MAX; typedef long long ll; using namespace std; int main() { int R, G, B, n; cin >> R >> G >> B >> n; in...
replace
16
20
16
18
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <regex> #include <set> #include <string> #include <vector> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int r = 0, g = 0, b = 0, ans = 0; for (r = 0; r <= N; r++) { for (g = 0; g <= N; g++) { ...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <regex> #include <set> #include <string> #include <vector> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int r = 0, g = 0, b = 0, ans = 0; for (r = 0; r <= N; r++) { for (g = 0; g <= N; g++) { ...
replace
15
20
15
18
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; #pragma GCC target("avx2") #pragma GCC optimization("unroll-loops") #define rep(i, n) for (int i = 0; i < (int)(n); ++i) template <typename T> ll gcd(T a, T b) { return b ? gcd(b, a % b) : a; } template <typename T> ll lcm(T a...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; #pragma GCC target("avx2") #pragma GCC optimization("unroll-loops") #define rep(i, n) for (int i = 0; i < (int)(n); ++i) template <typename T> ll gcd(T a, T b) { return b ? gcd(b, a % b) : a; } template <typename T> ll lcm(T a...
replace
26
31
26
28
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; vector<int> rgb(3, 0); rgb[0] = R; rgb[1] = G; rgb[2] = B; int rmax = N / R; int gmax = N / G; int bmax = N / B; int count = 0; for (int i = 0; i <= rmax; i++) { for (int j = 0; j <= gmax; ...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; vector<int> rgb(3, 0); rgb[0] = R; rgb[1] = G; rgb[2] = B; int rmax = N / R; int gmax = N / G; int bmax = N / B; int count = 0; for (int i = 0; i <= rmax; i++) { for (int j = 0; j <= gmax; ...
replace
20
25
20
23
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int cnt = 0; for (int r = 0; r <= (3000 / R) + 1; r++) { for (int g = 0; g <= (3000 / G) + 1; g++) { if (r * R + g * G > N) break; for (int b = 0; b <= (3000 / B) + 1; b++) { if (...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int cnt = 0; for (int r = 0; r <= (3000 / R) + 1; r++) { for (int g = 0; g <= (3000 / G) + 1; g++) { if ((N - r * R - g * G) % B == 0 && r * R + g * G <= N) cnt++; } } cout << cnt << en...
replace
9
16
9
11
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int sum = 0; for (int r = 0; r <= N / R; r++) { for (int g = 0; g <= (N - R * r) / G; g++) { for (int b = 0; b <= (N - R * r - g * G) / B; b++) { if (R * r + g * G + b * B == N) { sum...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int sum = 0; for (int r = 0; r <= N / R; r++) { for (int g = 0; g <= (N - R * r) / G; g++) { if ((N - R * r - g * G) % B == 0) { sum++; } } } cout << sum << endl; return 0; }
replace
9
13
9
11
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int mod = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; ll gcd(ll A, ll B) { if (A % B == 0) return (B); else return (gcd(B, A % B)); } ll keta(ll...
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int mod = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; ll gcd(ll A, ll B) { if (A % B == 0) return (B); else return (gcd(B, A % B)); } ll keta(ll...
replace
56
63
56
61
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define froop1(a, n) for (int i = a; i < n; i++) #define froop2(a, n) for (int i = a; i > n; i--) int main() { int N, r, g, b, count; cin >> r >> g >> b >> N; froop1(0, N / r + 1) { for (int j = 0; j < (N - i * r) / g + 1; j++) { for (int k = 0; k < (N - i ...
#include <bits/stdc++.h> using namespace std; #define froop1(a, n) for (int i = a; i < n; i++) #define froop2(a, n) for (int i = a; i > n; i--) int main() { int N, r, g, b, count; cin >> r >> g >> b >> N; froop1(0, N / r + 1) { for (int j = 0; j < (N - i * r) / g + 1; j++) { if ((N - r * i - g * j) % b...
replace
10
14
10
12
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n, a = 0; cin >> r >> g >> b >> n; for (int i = 0; i <= n / r; i++) { for (int j = 0; j <= (n - i * r) / g; j++) { int p = n - i * r - j * g; for (int k = 0; k <= p / b; k++) { if (n == i * r + j * g + k * b) ...
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n, a = 0; cin >> r >> g >> b >> n; for (int i = 0; i <= n / r; i++) { for (int j = 0; j <= (n - i * r) / g; j++) { if ((n - i * r - j * g) % b == 0) a++; } } cout << a << endl; }
replace
7
12
7
9
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= 3000; i++) { for (int j = 0; j <= 3000 - i; j++) { for (int k = 0; k <= 3000 - i - j; k++) { int A = R * i + G * j + B * k; if (A == N) ans++; ...
#include <iostream> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= N; i++) { for (int j = 0; j <= N; j++) { int A = R * i + G * j; int n = N - A; // cout << n << endl; if (n >= 0 && n % B == 0) ans++; } } c...
replace
6
13
6
13
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r < N / R + 1; r++) { int tmp = N - (R * r); if (tmp < 0) break; for (int g = 0; g < tmp / G + 1; g++) { int tmp = N - (R * r + G * g); if (tmp < 0) ...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r < N / R + 1; r++) { int tmp = N - (R * r); if (tmp < 0) break; for (int g = 0; g < tmp / G + 1; g++) { int tmp = N - (R * r + G * g); if (tmp < 0) ...
replace
17
23
17
19
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> int main() { int R, G, B, N; std::cin >> R; std::cin >> G; std::cin >> B; std::cin >> N; int result = 0; for (int r = 0, r_limit = N / R; r <= r_limit; ++r) { int r_buy = r * R; for (int g = 0, g_limit = (N - r_buy) / G; g <= g_limit; ++g) { int g_buy = g * G; fo...
#include <iostream> int main() { int R, G, B, N; std::cin >> R; std::cin >> G; std::cin >> B; std::cin >> N; int result = 0; for (int r = 0, r_limit = N / R; r <= r_limit; ++r) { int r_buy = r * R; for (int g = 0, g_limit = (N - r_buy) / G; g <= g_limit; ++g) { int g_buy = g * G; if...
replace
15
20
15
17
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using ll = long long; using Pii = std::pair<int, int>; using Pll = std::pair<ll, ll>; const ll INF = (ll)1e11; using namespace std; int main() { ios::sync_with_stdio(false); int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= N / R + 1; ++r) { for (int...
#include <bits/stdc++.h> using ll = long long; using Pii = std::pair<int, int>; using Pll = std::pair<ll, ll>; const ll INF = (ll)1e11; using namespace std; int main() { ios::sync_with_stdio(false); int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= N / R + 1; ++r) { for (int...
replace
19
25
19
23
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep0(i, n) for (long long i = 0; i < (long long)(n); i++) #define rep1(i, n) for (long long i = 1; i <= (long long)(n); i++) #define all(v) v.begin(), v.end() #define Sort(v) sort(all(v)) #define Reverse(v) reverse(all(v)) #define Rsort(v) sort(all(v), greater) #def...
#include <bits/stdc++.h> using namespace std; #define rep0(i, n) for (long long i = 0; i < (long long)(n); i++) #define rep1(i, n) for (long long i = 1; i <= (long long)(n); i++) #define all(v) v.begin(), v.end() #define Sort(v) sort(all(v)) #define Reverse(v) reverse(all(v)) #define Rsort(v) sort(all(v), greater) #def...
replace
20
25
20
24
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> int main() { int R, G, B, N; std::cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= N / R; ++i) { for (int j = 0; j <= N / G; ++j) { for (int k = 0; k <= N / B; ++k) { int n = R * i + G * j + B * k; if (n == N) ++ans; else if (n > N) ...
#include <iostream> int main() { int R, G, B, N; std::cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= N / R; ++i) { for (int j = 0; j <= N / G; ++j) { int k = N - R * i - G * j; if (k >= 0 && k % B == 0) ++ans; } } std::cout << ans << std::endl; return 0; }
replace
9
16
9
12
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <string> #include <tuple> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; int main(void) { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int r = 0; R * r <= N; r++) { ...
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <string> #include <tuple> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; int main(void) { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int r = 0; R * r <= N; r++) { ...
replace
20
24
20
25
TLE
p03048
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ld long double #define pr pair<ll, ll> #define loop(i, n) for (ll i = 0; i < n; ++i) #define rep(i, x, n) for (ll i = x; i <= n; ++i) #define iteloop(type, data, name, it) \ for (type<data>::iterator it = name.begin(); it ...
#include <bits/stdc++.h> #define ll long long #define ld long double #define pr pair<ll, ll> #define loop(i, n) for (ll i = 0; i < n; ++i) #define rep(i, x, n) for (ll i = x; i <= n; ++i) #define iteloop(type, data, name, it) \ for (type<data>::iterator it = name.begin(); it ...
replace
15
16
15
16
-8
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
21
25
21
25
TLE
p03048
C++
Runtime Error
#include <iostream> using namespace std; int main(void) { int R, G, B, N, tmp, count = 0; cin >> R >> G >> B >> N; for (int i = 0; R * i <= N; i++) { for (int j = 0; R * i + G * j <= N; j++) { tmp = N - (R * i + G * j); if (N % tmp == 0) count++; } } cout << count << "\n"; }
#include <iostream> using namespace std; int main(void) { int R, G, B, N, tmp, count = 0; cin >> R >> G >> B >> N; for (int i = 0; R * i <= N; i++) { for (int j = 0; R * i + G * j <= N; j++) { tmp = N - (R * i + G * j); if (tmp % B == 0) count++; } } cout << count << "\n"; }
replace
9
10
9
10
-8
p03048
C++
Runtime Error
#include <cstdio> #include <iostream> using namespace std; int x, n; int f[5000]; int main() { f[0] = 1; for (register int i = 1; i <= 3; i++) { scanf("%d", &x); for (register int j = 0; j <= 5000; j++) { if (f[j]) f[j + x] += f[j]; } } scanf("%d", &n); printf("%d\n", f[n]); return...
#include <cstdio> #include <iostream> using namespace std; int x, n; int f[10000]; int main() { f[0] = 1; for (register int i = 1; i <= 3; i++) { scanf("%d", &x); for (register int j = 0; j <= 5000; j++) { if (f[j]) f[j + x] += f[j]; } } scanf("%d", &n); printf("%d\n", f[n]); retur...
replace
4
5
4
5
0
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int ans = 0; for (int i = 0; i * r <= n; i++) { for (int j = 0; i * r + j * g <= n; j++) { for (int k = ...
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int ans = 0; for (int i = 0; i * r <= n; i++) { for (int j = 0; i * r + j * g <= n; j++) { if ((n - i * ...
replace
12
16
12
14
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int count = 0; int rmax = n / r; int gmax = n / g; int bmax = n / b; for (int i = 0; i <= rmax; i++) { for (int j = 0; j <= gmax; j++) { for (int k = 0; k <= bmax; k++) { if (n == r * i +...
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int count = 0; int rmax = n / r; int gmax = n / g; int bmax = n / b; for (int i = 0; i <= rmax; i++) { for (int j = 0; j <= (n - r * i) / g; j++) { if ((n - r * i - g * j) % b == 0) count...
replace
11
16
11
14
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define INF INT_MAX using namespace std; typedef long long ll; typedef pair<int, int> pii; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= N; i += R) { for (int j = 0; j + i <= N; j += B) { ...
#include <bits/stdc++.h> #define INF INT_MAX using namespace std; typedef long long ll; typedef pair<int, int> pii; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= N; i += R) { for (int j = 0; j + i <= N; j += B) { ...
replace
17
21
17
19
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; rep(i, (N - 1) / R + 2) { rep(j, (N - 1) / G + 2) { rep(k, (N - 1) / B + 2) { if (R * i + G * j + B * k == N) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; rep(i, 3001) { rep(j, 3001) { if ((N - R * i - G * j) % B == 0 && (N - R * i - G * j) / B >= 0) count++; }...
replace
9
15
9
13
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define FOR(i, start, end) for (int i = start; i <= end; i++) const int INF = 1001001001; typedef long long ll; const ll MOD = 1000000007; using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1;...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define FOR(i, start, end) for (int i = start; i <= end; i++) const int INF = 1001001001; typedef long long ll; const ll MOD = 1000000007; using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1;...
replace
160
164
160
163
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; const ll INF = LLONG_MAX; int main() { int r, g, b, n; int ans = 0; cin >> r >> g >> b >> n; for (int R = 0; R <= n; R += r) { for (int G = 0; G < n + 1 - R; G += g) { for (int B = 0; B < n + 1 - R - G; B += b...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; const ll INF = LLONG_MAX; int main() { int r, g, b, n; int ans = 0; cin >> r >> g >> b >> n; for (int R = 0; R <= n; R += r) { for (int G = 0; G < n + 1 - R; G += g) { if ((n - R - G) % b == 0) ans++; ...
replace
12
17
12
14
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int cnt = 0; for (int i = 0; i <= n / r; ++i) { for (int j = 0; j <= (n - i * r) / g; ++j) { for (int k = 0; k <= (n - i * r - j * g) / b; ++k) { if (i * r + j * g + k * b == n) cnt++; ...
#include <iostream> using namespace std; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int cnt = 0; for (int i = 0; i <= n / r; ++i) { for (int j = 0; j <= (n - i * r) / g; ++j) { if ((n - (i * r + j * g)) % b == 0) cnt++; } } cout << cnt << endl; return 0; }
replace
10
14
10
12
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, char const *argv[]) { int r, g, b, n; cin >> r >> g >> b >> n; int cnt = 0; for (int i = 0; i <= n / r; ++i) { for (int j = 0; j <= n / g; ++j) { for (int k = 0; k <= n / b; ++k) { ...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, char const *argv[]) { int r, g, b, n; cin >> r >> g >> b >> n; int cnt = 0; for (int i = 0; i <= n / r; ++i) { for (int j = 0; j <= n / g; ++j) { int temp = n - r * i - g * j; //...
replace
12
16
12
16
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; int r = N / R + 1; int g = N / G + 1; int b = N / B + 1; for (int i = 0; i < r; i++) { int sum = i * R; for (int j = 0; j < g; j+...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; int r = N / R + 1; int g = N / G + 1; int b = N / B + 1; for (int i = 0; i < r; i++) { int sum = i * R; for (int j = 0; j < g; j+...
replace
19
25
19
21
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; int r = N / R; int g = N / G; int b = N / B; for (int i = 0; i <= r; i++) { for (int j = 0; j <= g; j++) { for (int m = 0; m <= b; m++) { i...
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; int r = N / R; int g = N / G; int b = N / B; for (int i = 0; i <= r; i++) { for (int j = 0; j <= g; j++) { if ((N - (R * i + G * j)) % B == 0 && N ...
replace
15
20
15
17
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n, ans = 0; cin >> r >> g >> b >> n; for (int i = 0; i <= n / r; i++) { for (int j = 0; j <= n / g; j++) { for (int k = 0; k <= n / b; k++) { if (r * i + g * j + b * k == n) ans++; } } } cout << ans ...
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n, ans = 0; cin >> r >> g >> b >> n; for (int i = 0; i <= n / r; i++) { for (int j = 0; j <= n / g; j++) { if ((n - r * i - g * j) % b == 0 && (n - r * i - g * j) >= 0) ans++; } } cout << ans << endl; }
replace
8
12
8
10
TLE
p03048
C++
Time Limit Exceeded
// to format a document: ctrl + K -> ctrl + D #include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; using ll = long long; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= N; i += R) { for (int j = 0; j <= N - i; j += G) { ...
// to format a document: ctrl + K -> ctrl + D #include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; using ll = long long; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= N; i += R) { for (int j = 0; j <= N - i; j += G) { ...
replace
17
21
17
19
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n; vector<int> input(3); cin >> input[0] >> input[1] >> input[2] >> n; sort(input.begin(), input.end()); r = input[2]; g = input[1]; b = input[0]; int ans = 0; int r_n = n / r; int g_n = n / g; int b_n = n / b; for (int i...
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, n; vector<int> input(3); cin >> input[0] >> input[1] >> input[2] >> n; sort(input.begin(), input.end()); r = input[2]; g = input[1]; b = input[0]; int ans = 0; int r_n = n / r; int g_n = n / g; int b_n = n / b; for (int i...
replace
19
26
19
21
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main(void) { int R, G, B, N, a, ans = 0; cin >> R >> B >> G >> N; for (int i = 0; i * R <= N; i++) { for (int j = 0; i * R + j * G <= N; j++) { for (int k = 0; i * R + j * G + k * B <= N; k++) { a = R * i + B * k + G * j; if (N == a) { ...
#include <bits/stdc++.h> using namespace std; int main(void) { int R, G, B, N, a, ans = 0; cin >> R >> B >> G >> N; for (int i = 0; i * R <= N; i++) { for (int j = 0; i * R + j * G <= N; j++) { a = R * i + G * j; if ((N - a) % B == 0 && N >= a) { ans++; } } } cout << ans <...
replace
9
14
9
12
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <math.h> #include <string.h> #include <vector> typedef long long ll; using namespace std; ll Mod = 1e9 + 7; int main() { int R, G, B, N, ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { for (int k...
#include <algorithm> #include <iostream> #include <math.h> #include <string.h> #include <vector> typedef long long ll; using namespace std; ll Mod = 1e9 + 7; int main() { int R, G, B, N, ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { if (i * R ...
replace
16
20
16
21
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <climits> #include <iostream> #include <set> #include <string> #include <vector> #define MAX 1000000007 using namespace std; #define ll long long #define dbg if (1) #define ISRANGE(val, lo, hi) ((lo <= val) && (val < hi)) int main() { ll ans, r, g, b, n; ans = 0; cin >> r >> g >> b...
#include <algorithm> #include <climits> #include <iostream> #include <set> #include <string> #include <vector> #define MAX 1000000007 using namespace std; #define ll long long #define dbg if (1) #define ISRANGE(val, lo, hi) ((lo <= val) && (val < hi)) int main() { ll ans, r, g, b, n; ans = 0; cin >> r >> g >> b...
replace
19
23
19
21
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> #include <string> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { for (int k = 0; k <= N / B; k++) { if ((R * i + G * j + B * k) == N) { count++; ...
#include <iostream> #include <string> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; /* for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { for (int k = 0; k <= N / B; k++) { if ((R * i + G * j + B...
replace
11
17
11
31
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> typedef char SINT8; typedef unsigned char UINT8; typedef short SINT16; typedef unsigned short UINT16; typedef int SINT32; typedef unsigned int UINT32; typedef long long SINT64; typedef unsigned lo...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> typedef char SINT8; typedef unsigned char UINT8; typedef short SINT16; typedef unsigned short UINT16; typedef int SINT32; typedef unsigned int UINT32; typedef long long SINT64; typedef unsigned lo...
replace
44
48
44
46
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> #include <string> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int r = 0; r <= N; r += R) { for (int g = 0; g <= N; g += G) { for (int b = 0; b <= N; b += B) { if (r + g + b == N) count++; } } } cout...
#include <iostream> #include <string> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int r = 0; r * R <= N; r++) { for (int g = 0; g * G <= N - r * R; g++) { if ((N - r * R - g * G) % B == 0) count++; } } cout << count << endl; return ...
replace
8
14
8
12
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define all(v) v.begin(), v.end() #define len(x) (ll)(x).length() using namespace std; typedef long long ll; typedef pair<int, int> P; const int INF = 1e9; const ll INFS = 1e18; const int MOD = INF + 7; const int di[] = {-1, 0, 1, 0}; const int dj...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define all(v) v.begin(), v.end() #define len(x) (ll)(x).length() using namespace std; typedef long long ll; typedef pair<int, int> P; const int INF = 1e9; const ll INFS = 1e18; const int MOD = INF + 7; const int di[] = {-1, 0, 1, 0}; const int dj...
replace
19
23
19
21
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> using namespace std; int main(void) { int N, A; int T[3]; cin >> T[0] >> T[1] >> T[2] >> N; A = 0; sort(T, T + 3); reverse(T, T + 3); for (int i = 0; i <= N / T[0]; i++) { for (int j = 0; j <= (N - i * T[0]) / T[1]; j++) { for (int t = 0; t <= (N - i * ...
#include <algorithm> #include <iostream> using namespace std; int main(void) { int N, A; int T[3]; cin >> T[0] >> T[1] >> T[2] >> N; A = 0; sort(T, T + 3); reverse(T, T + 3); for (int i = 0; i <= N / T[0]; i++) { for (int j = 0; j <= (N - i * T[0]) / T[1]; j++) { if ((N - T[0] * i - T[1] * j)...
replace
14
18
14
17
TLE
p03048
C++
Time Limit Exceeded
#define _USE_MATH_DEFINES // M_PI #include <bits/stdc++.h> #include <cmath> using namespace std; using ll = long long; #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define rep(i, n) REP(i, 0, n) #define rREP(i, a, n) for (int(i) = (n)-1; (i) >= (a); --(i)) #define all(x) (x).begin(), (x).end() #define...
#define _USE_MATH_DEFINES // M_PI #include <bits/stdc++.h> #include <cmath> using namespace std; using ll = long long; #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define rep(i, n) REP(i, 0, n) #define rREP(i, a, n) for (int(i) = (n)-1; (i) >= (a); --(i)) #define all(x) (x).begin(), (x).end() #define...
replace
42
46
42
46
TLE
p03048
C++
Time Limit Exceeded
#include <iostream> #include <vector> using namespace std; int main(void) { int r, g, b, k; cin >> r >> g >> b >> k; int temp1, temp2; int num = 0; for (int x = 0; x < k + 1; x++) { if (x * r > k) continue; temp1 = k - r * x; for (int y = 0; y < temp1 + 1; y++) { if (y * g > temp1) ...
#include <iostream> #include <vector> using namespace std; int main(void) { int r, g, b, k; cin >> r >> g >> b >> k; int temp1, temp2; int num = 0; for (int x = 0; x < k + 1; x++) { if (x * r > k) continue; temp1 = k - r * x; for (int y = 0; y < temp1 + 1; y++) { if (y * g > temp1) ...
replace
18
26
18
22
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define pie 3.141592653589793238462643383279 #define mod 998244353 #defi...
#include <algorithm> #include <cmath> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define pie 3.141592653589793238462643383279 #define mod 998244353 #defi...
replace
57
60
57
60
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stdlib.h> #include <string.h> #include <time.h> #include <vector> using namespace std; int main(void) { long long int R, G, B, N; long long int ans = 0; cin >> R >> G >> B >> N; for (int i ...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stdlib.h> #include <string.h> #include <time.h> #include <vector> using namespace std; int main(void) { long long int R, G, B, N; long long int ans = 0; cin >> R >> G >> B >> N; for (int i ...
replace
20
23
20
22
TLE
p03048
C++
Time Limit Exceeded
#ifdef __GNUC__ #include <bits/stdc++.h> #endif // __GNUC_ int main() { int R, G, B, N; std::cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= N / R; ++r) for (int g = 0; g <= (N + r * R) / G; ++g) for (int b = 0; b <= (N + r * R + g * G) / B; ++b) if (r * R + g * G + b * B == N) ...
#ifdef __GNUC__ #include <bits/stdc++.h> #endif // __GNUC_ int main() { int R, G, B, N; std::cin >> R >> G >> B >> N; int ans = 0; for (int r = 0; r <= N / R; ++r) { for (int g = 0; g <= N / G; ++g) { int dif = N - r * R - g * G; if ((dif >= 0) && (dif % B == 0)) { ++ans; } }...
replace
9
14
9
17
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i <= (int)(n); i++) #define intll int long long const intll INF = 1e9; const int MOD = 1e9 + 7; int main() { int a, b, c, n; cin >> a >> b >> c >> n; int ans = 0; rep(i, (n / a) + 1) { rep(j,...
#include <bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i <= (int)(n); i++) #define intll int long long const intll INF = 1e9; const int MOD = 1e9 + 7; int main() { int a, b, c, n; cin >> a >> b >> c >> n; int ans = 0; rep(i, 3000) { rep(j, 3000) ...
replace
14
21
14
19
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int r = 0; r < N / R + 1; r++) { for (int g = 0; g < (N - r * R) / G + 1; g++) { for (int b = 0; b < (N - r * R - g * G) / B + 1; b++) { int ord = N - r * R - g * G; ...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int r = 0; r < N / R + 1; r++) { for (int g = 0; g < (N - r * R) / G + 1; g++) { int ord = N - r * R - g * G; if (ord % B == 0) { count++; } } } cout << ...
replace
9
17
9
12
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <stdio.h> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int R, G, B, N; cin >> R >> G >> B >> N; ll ans = 0; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { for (int k = 0; k <= N / ...
#include <algorithm> #include <iostream> #include <stdio.h> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int R, G, B, N; cin >> R >> G >> B >> N; ll ans = 0; for (int i = 0; i <= N / R; i++) { for (int j = 0; j <= N / G; j++) { if ((N - i * R - j * G) >...
replace
15
19
15
17
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= (N / R); i++) { for (int j = 0; j <= ((N - i * R) / G); j++) { for (int k = 0; k <= ((N - i * R - j * G) / B); k++) { if ((i * R + j * G + k * B) == N) ...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int ans = 0; for (int i = 0; i <= (N / R); i++) { for (int j = 0; j <= ((N - i * R) / G); j++) { if ((N - i * R - j * G) % B == 0) ans++; } } cout << ans << endl; }
replace
10
14
10
12
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> #define SORT(a) sort(a.begin(), a.end()) #define RSORT(a) sort(a.rbegin(), a.rend()) #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; 0 <= i; i--) #define FOR(i...
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> #define SORT(a) sort(a.begin(), a.end()) #define RSORT(a) sort(a.rbegin(), a.rend()) #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; 0 <= i; i--) #define FOR(i...
replace
45
53
45
49
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; std::cin >> R >> G >> B >> N; int ans = 0; for (size_t i = 0; i < N + 1; i++) { for (size_t j = 0; j < N + 1; j++) { for (size_t k = 0; k < N + 1; k++) { if (R * i + B * j + G * k == N) { ans++; } el...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; std::cin >> R >> G >> B >> N; if (R + G + B == 3) { std::cout << (N + 2) * (N + 1) / 2 << '\n'; return 0; } int ans = 0; for (size_t i = 0; i < N + 1; i++) { for (size_t j = 0; j < N + 1; j++) { for (size_t k = 0...
insert
6
6
6
11
TLE
p03048
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define printArr(harry, tam) range(tam) cout << harry[i] << " \n"[i == tam - 1]; #define range(n) for (int i = 0; i < n; i++) #define forn(x, n) for (int x = 0; x < n; x++) #define maxn "100000" #define mod "1000000007" #define md(x) ((((x) % mod) + mod) % mod) #define sc s...
#include <bits/stdc++.h> using namespace std; #define printArr(harry, tam) range(tam) cout << harry[i] << " \n"[i == tam - 1]; #define range(n) for (int i = 0; i < n; i++) #define forn(x, n) for (int x = 0; x < n; x++) #define maxn "100000" #define mod "1000000007" #define md(x) ((((x) % mod) + mod) % mod) #define sc s...
replace
46
47
46
47
0
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define mfill(x, y) memset(x, y, sizeof(x)) #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 42 #endif #define y0 y12345 #define y1 y54321 typedef unsigned long ul; typedef long long ll; // typedef pair<int, ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define mfill(x, y) memset(x, y, sizeof(x)) #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 42 #endif #define y0 y12345 #define y1 y54321 typedef unsigned long ul; typedef long long ll; // typedef pair<int, ...
replace
41
42
41
42
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; int main() { int R, G, B, N, count = 0; cin >> R >> G >> B >> N; for (int i = 0; R * i <= N; i++) { for (int j = 0; G *...
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; int main() { int R, G, B, N, count = 0; cin >> R >> G >> B >> N; for (int i = 0; R * i <= N; i++) { for (int j = 0; G *...
replace
20
24
20
22
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; int ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) for (int j = 0; j <= (N - R * i) / G; j++) for (int k = 0; k <= (N - R * i - G * j) / B; k++) if (R * i + G * j + B * k == N) ans++; c...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; int ans = 0; cin >> R >> G >> B >> N; for (int i = 0; i <= N / R; i++) for (int j = 0; j <= (N - R * i) / G; j++) if ((N - (R * i + G * j)) % B == 0) ans++; cout << ans << endl; }
replace
10
13
10
12
TLE
p03048
C++
Time Limit Exceeded
#define _USE_MATH_DEFINES #include "bits/stdc++.h" #define rep(i, a, b) for (int i = (a); i < (b); i++) using namespace std; typedef long long int ll; typedef complex<double> com; typedef pair<ll, ll> P; const int mod = 1e9 + 7; const int MOD = 998244353; const int inf = 2e9; int main() { int r, g, b, n; cin >> r ...
#define _USE_MATH_DEFINES #include "bits/stdc++.h" #define rep(i, a, b) for (int i = (a); i < (b); i++) using namespace std; typedef long long int ll; typedef complex<double> com; typedef pair<ll, ll> P; const int mod = 1e9 + 7; const int MOD = 998244353; const int inf = 2e9; int main() { int r, g, b, n; cin >> r ...
replace
15
17
15
18
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, N) for (int i = 0; i < (N); ++i) #define ALL(x) (x).begin(), (x).end() #define MOD 1000000007 #define PB push_back #define MP make_pair using namespace std; typedef long long ll; ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; } ll div_ceil(ll, ll); int dx[4] = {0, 0, -1, 1};...
#include <bits/stdc++.h> #define REP(i, N) for (int i = 0; i < (N); ++i) #define ALL(x) (x).begin(), (x).end() #define MOD 1000000007 #define PB push_back #define MP make_pair using namespace std; typedef long long ll; ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; } ll div_ceil(ll, ll); int dx[4] = {0, 0, -1, 1};...
replace
18
25
18
22
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int answer = 0; for (int r = 0; r < int(N / R) + 1; r++) { for (int g = 0; g < int(N / G) + 1; g++) { if (r * R + g * G > N) { break; } for (int b = 0; b < int(N / B) + 1; b++) { ...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int answer = 0; for (int r = 0; r < int(N / R) + 1; r++) { for (int g = 0; g < int(N / G) + 1; g++) { if (r * R + g * G > N) { break; } if ((N - r * R - g * G) % B == 0) { ...
replace
13
20
13
15
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B; cin >> R >> G >> B; int N; cin >> N; int count = 0; for (int i = 0; i * R <= N; i++) { for (int j = 0; j * G + i * R <= N; j++) { for (int k = 0; k * B + j * G + i * R <= N; k++) { if (i * R + j * G + k * B == N) { ...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B; cin >> R >> G >> B; int N; cin >> N; int count = 0; for (int i = 0; i * R <= N; i++) { for (int j = 0; j * G + i * R <= N; j++) { int sum = N - j * G - i * R; if (sum % B == 0) { count++; } } } cou...
replace
11
15
11
14
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <iostream> #include <limits> #include <map> #include <memory> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> constexpr long long MOD = 1000000007; int main() { i...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <iostream> #include <limits> #include <map> #include <memory> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> constexpr long long MOD = 1000000007; int main() { i...
replace
27
34
27
29
TLE
p03048
C++
Time Limit Exceeded
#define _USE_NATH_DEFINES #include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numer...
#define _USE_NATH_DEFINES #include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numer...
replace
43
47
43
45
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int i = 0; i <= N / R; i++) { for (int j = 0; G * j <= N - R * i; j++) { for (int k = 0; B * k <= N - R * i - G * j; k++) { int sum = i * R + j * G + k * B; if (sum =...
#include <bits/stdc++.h> using namespace std; int main() { int R, G, B, N; cin >> R >> G >> B >> N; int count = 0; for (int i = 0; i <= N / R; i++) { for (int j = 0; G * j <= N - R * i; j++) { int k = N - R * i - G * j; if (k >= 0 && k % B == 0) { count++; } } } cout << cou...
replace
8
13
8
11
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <numeric> #include <set> #include <string> #include <vector> using namespace std; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int counter = 0; for (size_t i = 0; i <= n / r; i++) { for (size_t j = 0; j <= n / g; j++) { for (size_t k = 0; k ...
#include <algorithm> #include <iostream> #include <numeric> #include <set> #include <string> #include <vector> using namespace std; int main() { int r, g, b, n; cin >> r >> g >> b >> n; int counter = 0; for (size_t i = 0; i <= n / r; i++) { for (size_t j = 0; j <= n / g; j++) { int z = (n - (i * r +...
replace
15
19
15
18
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int P, Q, R, N; cin >> P >> Q >> R >> N; int count = 0; int x = N / P + 1; for (int i = 0; i < x; i++) { for (int j = 0; j < (N - P * i) / Q + 1 && i + j < N + 1; j++) { for (int k = 0; k < (N - P * i - Q * j) / R + 1 && i + j + k < N + 1; ...
#include <bits/stdc++.h> using namespace std; int main() { int P, Q, R, N; cin >> P >> Q >> R >> N; int count = 0; int x = N / P + 1; for (int i = 0; i < x; i++) { for (int j = 0; j < (N - P * i) / Q + 1 && i + j < N + 1; j++) { int B = N - P * i - Q * j; if (B % R == 0 && B >= 0) cou...
replace
10
17
10
13
TLE
p03048
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep1(i, n) for (int i = 1; i < (n); ++i) using namespace std; typedef long long ll; const ll INF = 1LL << 60; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int r, g, b, n; cin >> r >> g >> b >> n; int res = 0; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep1(i, n) for (int i = 1; i < (n); ++i) using namespace std; typedef long long ll; const ll INF = 1LL << 60; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int r, g, b, n; cin >> r >> g >> b >> n; int res = 0; ...
replace
18
21
18
20
TLE
p03048
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <sstream> #include <stdio.h> #include <vector> #define FORi(N) for (int i = 0; i < N; ++i) #define FORj(N) for (int j = 0; j < N; ++j) using namespace std; usin...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <sstream> #include <stdio.h> #include <vector> #define FORi(N) for (int i = 0; i < N; ++i) #define FORj(N) for (int j = 0; j < N; ++j) using namespace std; usin...
replace
38
44
38
44
TLE