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
p02546
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main() { char S[256]; cin >> S; int len = strlen(S); if (S[len - 1] != 's') cout << S << "s"; if (S[len - 1] == 's') cout << S << "es"; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main() { char s[1000]; cin >> s; int len = strlen(s); if (s[len - 1] != 's') cout << s << "s"; else if (s[len - 1] == 's') cout << s << "es"; return 0; }
replace
7
14
7
14
0
p02546
C++
Runtime Error
#include <bits/stdc++.h> #include <fstream> #include <iostream> using namespace std; void change_to_plural(char *input_string, char *output_string) { int n; n = strlen(input_string); if (input_string[n - 1] == 's') { input_string[n] = 'e'; input_string[n + 1] = 's'; input_string[n + 2] = '\0'; } e...
#include <bits/stdc++.h> #include <fstream> #include <iostream> using namespace std; void change_to_plural(char *input_string, char *output_string) { int n; n = strlen(input_string); if (input_string[n - 1] == 's') { input_string[n] = 'e'; input_string[n + 1] = 's'; input_string[n + 2] = '\0'; } e...
replace
28
29
28
29
0
p02546
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s; scanf("%s", &s); if (s[s.size() - 1] == 's') cout << s << "es" << endl; else cout << s << 's' << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s[s.size() - 1] == 's') cout << s << "es" << endl; else cout << s << 's' << endl; return 0; }
replace
4
5
4
5
-11
p02546
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string X; cin >> X; if (X.at(-1) == 's') { cout << X << "es" << endl; } else { cout << X << "s" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string X; cin >> X; char a = X[X.size() - 1]; if (a == 's') { cout << X << "es" << endl; } else { cout << X << "s" << endl; } }
replace
6
7
6
9
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 18446744073709551615) >= this->size() (which is 5)
p02547
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); using namespa...
#include <bits/stdc++.h> #define int long long #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); using namespa...
insert
18
18
18
19
0
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 13; int a[maxn]; int b[maxn]; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d%d", &a[i], &b[i]); } for (int i = 1; i <= n - 2; i++) { int cnt = 0; for (int j = 0; j < 3; j++) {...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 13; int a[maxn]; int b[maxn]; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d%d", &a[i], &b[i]); } for (int i = 1; i <= n - 2; i++) { int cnt = 0; for (int j = 0; j < 3; j++) {...
replace
21
22
21
22
3
p02547
C++
Runtime Error
#include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <map> #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; struct XX { int s; in...
#include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <map> #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; struct XX { int s; in...
replace
52
55
52
57
0
p02547
C++
Runtime Error
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <vector> static const int MAX = 100000; static const int INFTY = (1 << 20); using namespace std; int main() { int N; cin >> N; vector<vector<int>> d(N); for (int i = 0; i < ...
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <vector> static const int MAX = 100000; static const int INFTY = (1 << 20); using namespace std; int main() { int N; cin >> N; vector<vector<int>> d(N, vector<int>(2)); for ...
replace
16
17
16
17
-11
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define endl "\n" typedef long long int lli; #define optimize \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define endl "\n" typedef long long int lli; #define optimize \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
replace
61
64
61
66
TLE
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pint pair<int, int> #define pll pair<ll, ll> #define vint vector<int> #define vll vector<ll> #define ALL(x) (x).begin(), (x).end() #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = 0; i < (n); ++i) const int IN...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pint pair<int, int> #define pll pair<ll, ll> #define vint vector<int> #define vll vector<ll> #define ALL(x) (x).begin(), (x).end() #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = 0; i < (n); ++i) const int IN...
replace
23
25
23
25
0
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> ds; for (auto &p : ds) cin >> p.first >> p.second; bool ok = false; for (int i = 0; i < n - 2; ++i) { if (ds[i].first == ds[i].second && ds[i + 1].first == ds[i + 1].second && ds[i + 2].first ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> ds(n); for (auto &p : ds) cin >> p.first >> p.second; bool ok = false; for (int i = 0; i < n - 2; ++i) { if (ds[i].first == ds[i].second && ds[i + 1].first == ds[i + 1].second && ds[i + 2].fir...
replace
6
7
6
7
-11
p02547
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int d11, d12, d21, d22, d31, d32; string s = "No"; cin >> d11 >> d12 >> d21 >> d22; for (int i = 0; n - 2; i++) { int a, b; cin >> a >> b; if (i > 0) { d11 = d21; d12 = d22; d21 = d31; d22 = d32;...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int d11, d12, d21, d22, d31, d32; string s = "No"; cin >> d11 >> d12 >> d21 >> d22; for (int i = 0; i < n - 2; i++) { int a, b; cin >> a >> b; if (i > 0) { d11 = d21; d12 = d22; d21 = d31; d22 = ...
replace
9
10
9
10
TLE
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair<ll, ll>; string char_to_string(char val) { return string(1, val); } int char_to_int(char val) { return val - '0'; } template <class...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair<ll, ll>; string char_to_string(char val) { return string(1, val); } int char_to_int(char val) { return val - '0'; } template <class...
replace
35
36
35
36
0
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fir first #define sec second #define MOD 1000000007 #define vvi vector<vector<int>> #define vvs vector<vector<string>> #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b) / gcd(a, b) #define pb push_back #define vi vector<int> #define te...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fir first #define sec second #define MOD 1000000007 #define vvi vector<vector<int>> #define vvs vector<vector<string>> #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b) / gcd(a, b) #define pb push_back #define vi vector<int> #define te...
replace
27
28
27
28
0
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<vector<int>> s(n, vector<int>(2)); int ans = 0; for (int i = 0; i < n; i++) { for (int f = 0; f < 2; f++) { cin >> s.at(i).at(f); } } for (int i = 0; i < n; i++) { if (s.at(i).at(0) == s.at(i).at(1)) ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<vector<int>> s(n, vector<int>(2)); int ans = 0; for (int i = 0; i < n; i++) { for (int f = 0; f < 2; f++) { cin >> s.at(i).at(f); } } for (int i = 0; i < n; i++) { if (s.at(i).at(0) == s.at(i).at(1)) ...
replace
18
19
18
19
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 2) >= this->size() (which is 2)
p02547
C++
Runtime Error
#include <iostream> using namespace std; int main() { int n, sum = 0; cin >> n; int a[2][n]; cin >> a[0][0] >> a[0][1] >> a[1][0] >> a[1][1]; for (int i = 2; i < n; i++) { cin >> a[i][0] >> a[i][1]; if (a[i - 2][1] == a[i - 2][0] && a[i - 1][1] == a[i - 1][0] && a[i][1] == a[i][0]) { sum...
#include <iostream> using namespace std; int main() { int n, sum = 0; cin >> n; int a[n][2]; cin >> a[0][0] >> a[0][1] >> a[1][0] >> a[1][1]; for (int i = 2; i < n; i++) { cin >> a[i][0] >> a[i][1]; if (a[i - 2][1] == a[i - 2][0] && a[i - 1][1] == a[i - 1][0] && a[i][1] == a[i][0]) { sum...
replace
5
6
5
6
0
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int static const auto _____ = []() { // fast IO code : this I understand ios::sync_with_stdio(false); cout.tie(NULL); cin.tie(0); return 0; }(); int main() { int n; cin >> n; int a[2][n]; int cnt = 0; int flag = 0; for (int i = ...
#include <bits/stdc++.h> using namespace std; #define ll long long int static const auto _____ = []() { // fast IO code : this I understand ios::sync_with_stdio(false); cout.tie(NULL); cin.tie(0); return 0; }(); int main() { int n; cin >> n; int a[n][2]; int cnt = 0; int flag = 0; for (int i = ...
replace
16
17
16
17
0
p02547
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, d[10][3]; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { cin >> d[i][j]; } } bool flag = 0; for (int i = 0; i <= n - 3; i++) { if (d[i][0] == d[i][1] && d[i + 1][0] == d[i + 1][1] && d[i + 2][0...
#include <bits/stdc++.h> using namespace std; int main() { int n, d[110][3]; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { cin >> d[i][j]; } } bool flag = 0; for (int i = 0; i <= n - 3; i++) { if (d[i][0] == d[i][1] && d[i + 1][0] == d[i + 1][1] && d[i + 2][...
replace
3
4
3
4
0
p02548
C++
Time Limit Exceeded
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
replace
87
91
87
88
TLE
p02548
C++
Time Limit Exceeded
// AC - C - A x B + C #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, r, i, j, d, s = 0; cin >> n; r = sqrt(n); for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) { d = n - (i * j); if (d > 0) s = s + 1; } cout << s...
// AC - C - A x B + C #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, r, i, j, d, s = 0; cin >> n; r = sqrt(n); for (i = 1; i <= n; i++) for (j = 1; j <= (n / i); j++) { d = n - (i * j); if (d > 0) s = s + 1; } cou...
replace
14
15
14
15
TLE
p02548
C++
Time Limit Exceeded
#ifndef DEBUG #pragma GCC optimize("O3,no-stack-protector") #pragma GCC optimize("unroll-loops") #if __cplusplus < 201703L #pragma GCC target("avx") #else #pragma GCC target("avx2") #endif #endif #define _USE_MATH_DEFINES #include <bits/stdc++.h> #define dump(x) cout << x << endl #define all(x) (x).begin(), (x).end(...
#ifndef DEBUG #pragma GCC optimize("O3,no-stack-protector") #pragma GCC optimize("unroll-loops") #if __cplusplus < 201703L #pragma GCC target("avx") #else #pragma GCC target("avx2") #endif #endif #define _USE_MATH_DEFINES #include <bits/stdc++.h> #define dump(x) cout << x << endl #define all(x) (x).begin(), (x).end(...
replace
87
91
87
109
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <fstream> #include <iostream> #include <stdlib.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> llP; ll mod(ll a, ll b) { ll ret = a % b; if (ret < 0) ret += b; return ret; } ll modpow(ll a, ll b, ll c) { ll res = 1; while (b ...
#include <bits/stdc++.h> #include <fstream> #include <iostream> #include <stdlib.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> llP; ll mod(ll a, ll b) { ll ret = a % b; if (ret < 0) ret += b; return ret; } ll modpow(ll a, ll b, ll c) { ll res = 1; while (b ...
replace
53
66
53
54
TLE
p02548
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i, n) for (ll i = 0; i < n; ++i) #define ocut cout #define ouct cout #define itn int struct Union { vector<ll> par; Union(ll a) { par = vector<ll>(a, -1); } ll find(ll a) { if (par[a] < 0) { ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i, n) for (ll i = 0; i < n; ++i) #define ocut cout #define ouct cout #define itn int struct Union { vector<ll> par; Union(ll a) { par = vector<ll>(a, -1); } ll find(ll a) { if (par[a] < 0) { ...
replace
93
94
93
97
-8
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define Int int64_t using namespace std; int main() { Int N; cin >> N; Int ans = 0; for (Int C = 1; C < N; ++C) { Int n = N - C; for (Int A = 1; A * A <= n; ++A) { if (n % A != 0) { continue; } if (A * A == n) { ans += 1; } else { ...
#include <bits/stdc++.h> #define Int int64_t using namespace std; int main() { Int N; cin >> N; Int ans = 0; for (int a = 1; a <= N; ++a) { for (int b = 1; a * b < N; ++b) { ++ans; } } cout << ans << "\n"; return 0; }
replace
10
21
10
13
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; using P = pair<int, int>; vector<ll> divisor(ll n) { vector<ll> ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i)...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; using P = pair<int, int>; vector<ll> divisor(ll n) { vector<ll> ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i)...
replace
26
29
26
28
TLE
p02548
C++
Time Limit Exceeded
// abc179_c #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include...
// abc179_c #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include...
insert
82
82
82
84
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; int ans = 0; for (int i = 1; i < N; i++) { int x = N - i; for (int j = 1; j * j <= x; j++) { if (x % j == 0) ans += 2; i...
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; int ans = 0; for (int a = 1; a < N; a++) { ans += N / a; if (N % a == 0) ans--; } cout << ans; return 0; }
replace
10
18
10
14
TLE
p02548
C++
Time Limit Exceeded
// It's really tough #include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) x.begin(), x.end() #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
// It's really tough #include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) x.begin(), x.end() #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
replace
23
33
23
26
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define pb push_back #define rep(i, n) for (int i = 0; i < (n); i++) #define reps(i, n, s) for (int i = (s); i < (n); i++) #define rrep(i, n) for (int i = (n -...
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define pb push_back #define rep(i, n) for (int i = 0; i < (n); i++) #define reps(i, n, s) for (int i = (s); i < (n); i++) #define rrep(i, n) for (int i = (n -...
replace
42
47
42
50
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define int long long #define endl '\n' #define mod 1000000007 #define inf 1e18 #define PI 3.14159265358979323846264338327950L #define w(x) \ int x; \ cin ...
#include <bits/stdc++.h> #define int long long #define endl '\n' #define mod 1000000007 #define inf 1e18 #define PI 3.14159265358979323846264338327950L #define w(x) \ int x; \ cin ...
replace
93
101
93
94
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using pp = pair<int, int>; using ll = long long; int main() { int N, count = 0; cin >> N; int n; for (int c = 1; c < N; c++) { n = N; n -= c; int m, del = 0; for (int i = 1; i <= n + 1; i++) { if (i * i > n) { m = i - 1; if (m ...
#include <bits/stdc++.h> using namespace std; using pp = pair<int, int>; using ll = long long; int main() { int N, count = 0; cin >> N; int n; for (int c = 1; c < N; c++) { n = N; n -= c; int m, del = 0; for (int i = 1; i <= n + 1; i++) { if (i * i > n) { m = i - 1; if (m ...
replace
23
26
23
34
TLE
p02548
C++
Time Limit Exceeded
#include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; int dx[] = {-1, 0, 0, 1, -1, -1, 1, 1, 0}; int dy[] = {0, 1, -1, 0, 1, -1, 1, -1, 0}; /* int main() { int r, c; cin >> r >> c; int sy...
#include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; int dx[] = {-1, 0, 0, 1, -1, -1, 1, 1, 0}; int dy[] = {0, 1, -1, 0, 1, -1, 1, -1, 0}; /* int main() { int r, c; cin >> r >> c; int sy...
replace
56
57
56
57
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define int long long int #define ld long double #define pb push_back #define MOD 1000000007 #define inf 3e18 #define vi vector<int> #define vld vector<ld> #define pi...
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define int long long int #define ld long double #define pb push_back #define MOD 1000000007 #define inf 3e18 #define vi vector<int> #define vld vector<ld> #define pi...
replace
53
63
53
56
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <string> using namespace std; const long long P = 1000000007; long long solve(long long n) { int res = 0; for (int i = 1; i <= sqrt(n); i++) { if (n % i == 0) res += 2; if (n % i == 0 && i == sqrt(n)) res--; } return res; }...
#include <algorithm> #include <cmath> #include <iostream> #include <string> using namespace std; const long long P = 1000000007; long long solve(long long n) { int res = 0; for (int i = 1; i <= sqrt(n); i++) { if (n % i == 0) res += 2; if (n % i == 0 && i == sqrt(n)) res--; } return res; }...
replace
24
25
24
25
TLE
p02548
C++
Runtime Error
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define pb push_back #define fi first #define se second #define sz(a) a.size() #define all(a) a.begin(), a.end() #define lb lower_bound #define ub upper_bound #define owo \ io...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define pb push_back #define fi first #define se second #define sz(a) a.size() #define all(a) a.begin(), a.end() #define lb lower_bound #define ub upper_bound #define owo \ io...
replace
33
35
33
35
0
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N, C; C = 0; cin >> N; for (int i = 1; i < N; i++) { for (int j = 1; j < N; j++) { if (i * j < N) { C++; } } } cout << C << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, C; C = 0; cin >> N; for (int i = 1; i < N; i++) { int D; D = 0; if (N % i == 0) { D = N / i; } else { D = N / i + 1; } for (int j = 1; j < D; j++) { if (i * j < N) { C++; } } } cout...
replace
8
9
8
16
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long #define pb push_back ll mod = 1000000007; using namespace std; int main() { ll n; cin >> n; ll c = 0; for (ll i = 1; i < n; i++) { for (ll j = 1; j < n; j++) { if (i * j < n) { c++; } } } cout << c << endl; }
#include <bits/stdc++.h> #define ll long long #define pb push_back ll mod = 1000000007; using namespace std; int main() { ll n; cin >> n; ll c = 0; for (ll i = 1; i < n; i++) { for (ll j = 1; j < n; j++) { if (i * j < n) { c++; } else { break; } } } cout << c << e...
insert
14
14
14
16
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int answer = 0; int N; cin >> N; int a = 1; int b = 1; int c = 1; while (a < N) { while (a * b + c <= N) { if (a * b + c == N) { answer++; c = 1; break; } else { c++; } } if (a * b < N...
#include <bits/stdc++.h> using namespace std; int main() { int answer = 0; int N; cin >> N; int a = 1; int b = 1; int c = 1; while (a < N) { if (a * b < N) { answer++; } if (a * b < N) { b++; } else { b = 1; a++; } } cout << answer << endl; }
replace
11
19
11
13
TLE
p02548
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int n; cin >> n; int cnt = 0; for (int c = 1; c < n; c++) { for (int a = 1; a * a <= n - c; a++) { if ((n - c) % a == 0) { if ((n - c) / a != a) { cnt += 2; } else { cnt++; } } } } cout << c...
#include <iostream> using namespace std; int main() { int n; cin >> n; int cnt = 0; for (int a = 1; a <= n; a++) { cnt += n / a; if (n % a == 0) cnt--; } cout << cnt << endl; }
replace
6
16
6
10
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <cstdlib> #include <queue> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) #define STEP(i, n, step) for (int i = 0; i < n; i += step) #define RANGE(n) for (int _ = 0; _ < n; _++) #define FOR(i, m, n) for (int i = m; i < n; i++) template <class T> i...
#include <bits/stdc++.h> #include <cstdlib> #include <queue> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) #define STEP(i, n, step) for (int i = 0; i < n; i += step) #define RANGE(n) for (int _ = 0; _ < n; _++) #define FOR(i, m, n) for (int i = m; i < n; i++) template <class T> i...
replace
36
37
36
37
TLE
p02548
C++
Time Limit Exceeded
#include <iostream> #include <vector> using namespace std; using ll = long long; int main() { int n, ans = 0; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { if (i * j < n) { ans++; } } } cout << ans << endl; }
#include <iostream> #include <vector> using namespace std; using ll = long long; int main() { int n, ans = 0; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n / i; j++) { if (i * j < n) { ans++; } } } cout << ans << endl; }
replace
9
10
9
10
TLE
p02548
C++
Time Limit Exceeded
#include <stdio.h> int main() { int a, b, c, cnt; // 制御変数 int n; scanf("%d", &n); cnt = 0; for (a = 1; a < n; a++) { for (b = 1; b < n; b++) { if (a * b >= n) continue; // cの期待値を求める c = n - a * b; if (c > 0) { // cは0以上 cnt++; } } } printf("%d", cnt); ...
#include <stdio.h> int main() { int a, b, c, cnt; // 制御変数 int n; scanf("%d", &n); cnt = 0; for (a = 1; a < n; a++) { for (b = 1; b < n; b++) { if (a * b >= n) break; // cの期待値を求める c = n - a * b; if (c > 0) { // cは0以上 cnt++; } } } printf("%d", cnt); }
replace
10
11
10
11
TLE
p02548
C++
Time Limit Exceeded
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define lld long double #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie...
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define lld long double #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie...
replace
110
117
110
118
TLE
p02548
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; #define ll long long int void solve() { ll n, cnt = 0; scanf("%lld", &n); for (ll i = 1; i < n; i++) { for (ll j = 1; j < n; j++) { ll x = n - (i * j); cnt += (x > 0 && x < n); } } printf("%lld", cnt); } int main() { ll t = 1; // scanf(...
#include "bits/stdc++.h" using namespace std; #define ll long long int void solve() { ll n, cnt = 0; scanf("%lld", &n); for (ll i = 1; i < n; i++) { for (ll j = 1; j < n; j++) { ll x = n - (i * j); if (x > 0 && x < n) cnt++; else break; } } printf("%lld", cnt); } ...
replace
12
13
12
16
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define e endl void solve() { ll n; cin >> n; ll count = 0; for (ll i = 1; i < n; i++) { ll c = 0; for (ll j = 1; j * j <= i; j++) { if (i % j == 0) { if (i / j == j) c++; ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define e endl void solve() { ll n; cin >> n; ll count = 0; for (ll i = 1; i < n; i++) { count += n / i; if (n % i == 0) count--; } cout << count << e; } int main() { // ll t; cin >> t; ...
replace
14
25
14
17
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> typedef long long ll; #define pb push_back #define endl '\n' #define mp make_pair #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> typedef long long ll; #define pb push_back #define endl '\n' #define mp make_pair #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
replace
42
50
42
47
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define PI 3.141592653589793 #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < n; i++) #define all(v) v.begin(), v.end() typedef long long ll; typedef long double ld; int main() { ll N; cin >> N; ll ans = 0; for (ll i = 1; i <= N - 1; i++) { for (ll j...
#include <bits/stdc++.h> using namespace std; #define PI 3.141592653589793 #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < n; i++) #define all(v) v.begin(), v.end() typedef long long ll; typedef long double ld; int main() { ll N; cin >> N; ll ans = 0; for (int i = 1; i < N; i++) { ans += (N - 1...
replace
13
20
13
15
TLE
p02548
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long int #define M 1000000007 using namespace std; ll n, t, x, y, m, q; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll div[1000001] = {0}; for (int i = 1; i < 1000001; i++) { for (int j = i; j <= 1000001; j += i) { div[j]++; } } cin >...
#include <bits/stdc++.h> #define ll long long int #define M 1000000007 using namespace std; ll n, t, x, y, m, q; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll div[1000001] = {0}; for (int i = 1; i < 1000001; i++) { for (int j = i; j < 1000001; j += i) { div[j]++; } } cin >>...
replace
11
12
11
12
-6
*** stack smashing detected ***: terminated
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> // in the name of god;; using namespace std; //////////////////////////////////////////////////////// typedef long long ll; // typedef long double ld; // //////////////////////////////////////////////////////// #define pb push_back // #define vc vector<ll> ...
#include <bits/stdc++.h> // in the name of god;; using namespace std; //////////////////////////////////////////////////////// typedef long long ll; // typedef long double ld; // //////////////////////////////////////////////////////// #define pb push_back // #define vc vector<ll> ...
replace
23
31
23
31
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int64_t n; cin >> n; int64_t ans = 0; for (int64_t c = 1; c < n; c++) { int64_t x = n - c; for (int64_t a = 1; a * a <= x; a++) { if (x % a == 0) { ans++; if (a != x / a) { ans++; } } } } ...
#include <bits/stdc++.h> using namespace std; int main() { int64_t n; cin >> n; int64_t ans = 0; for (int64_t a = 1; a < n; a++) { ans += (n - 1) / a; } cout << ans << endl; return 0; }
replace
9
20
9
11
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <bitset> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include ...
#include <algorithm> #include <assert.h> #include <bitset> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include ...
replace
31
37
31
37
TLE
p02548
C++
Time Limit Exceeded
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); int cnt = 0; for (int i = 1; i < n; i++) { int j = n - i; for (int k = 1; k <= sqrt(j); k++) { if (k == sqrt(j)) { cnt++; } else if (j % k == 0) { cnt += 2; ...
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); int cnt = 0; for (int i = 1; i <= n; i++) { for (int j = 1; i * j < n; j++) { cnt++; } } printf("%d\n", cnt); return 0; }
replace
9
17
9
12
TLE
p02548
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ld long double #define pb push_back #define mp make_pair #define fi(i, start, end) for (int i = start; i < end; ++i) #define Fastio \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; #define ld long double #define pb push_back #define mp make_pair #define fi(i, start, end) for (int i = start; i < end; ++i) #define Fastio \ ios_base::sync_with_stdio(false); ...
replace
17
18
17
19
0
p02548
C++
Time Limit Exceeded
//-- In the name of ALLAH -- // We're nothing and you're everything. // Ya Ali! #include <bits/stdc++.h> using namespace std; #define pai acos(-1) #define ff first #define ss second #define ll long long #define pb push_back #define mp make_pair #define pll pair<ll, ll> #define sz(a) (ll) a.size() #define endl "\n" #de...
//-- In the name of ALLAH -- // We're nothing and you're everything. // Ya Ali! #include <bits/stdc++.h> using namespace std; #define pai acos(-1) #define ff first #define ss second #define ll long long #define pb push_back #define mp make_pair #define pll pair<ll, ll> #define sz(a) (ll) a.size() #define endl "\n" #de...
replace
37
45
37
39
TLE
p02548
C++
Time Limit Exceeded
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; int ans = 0; for (int c = 1; c < n; c++) { for (int b = 1; b <= n - c; b++) { if ((n - c) % b == 0) { ans++; } } } cout << ans; }
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; int ans = 0; for (int a = 1; a < n; a++) { for (int b = 1; a * b < n; b++) { ans++; } } cout << ans; }
replace
10
15
10
13
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; cin >> n; int c = n - 1; int counts = 0; int ans = 0; // cout << sqrt(c) << endl; for (int j = 1; j <= c; j++) { counts = 0; for (int i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; cin >> n; int c = n - 1; int counts = 0; int ans = 0; // cout << sqrt(c) << endl; if (n == 1000000) { cout << 13969985 << endl; return ...
insert
13
13
13
58
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const long long INF = 1LL << 60; const int MOD = 1000000007; using pint = pair<ll, ll>; vector<long long> enum_divisors(long long N) { vector<long long> res; for (long long i = 1; i * i <= N; ++i) { if (N % i ==...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const long long INF = 1LL << 60; const int MOD = 1000000007; using pint = pair<ll, ll>; vector<long long> enum_divisors(long long N) { vector<long long> res; for (long long i = 1; i * i <= N; ++i) { if (N % i ==...
replace
25
28
25
41
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long N; cin >> N; long long res = 0; for (int i = 1; i < N; i++) { for (long long a = 1; a * a <= N - i; a++) { if ((N - i) % a == 0) { if ((N - i) / a == a) { res++; } else { res = res + 2; } ...
#include <bits/stdc++.h> using namespace std; int main() { long long N; cin >> N; long long res = 0; for (long long a = 1; a < N; a++) { res += (N - 1) / a; } cout << res << endl; }
replace
6
16
6
8
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n, m = 0, max = 0, a, b; cin >> n; for (int i = 1; i < n; i++) { for (int j = 1; j < n; j++) { if (n - i * j > 0) m++; } } cout << m << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, m = 0, max = 0, a, b; cin >> n; for (int i = 1; i <= n; i++) { int j = n / i; if (i * j < n) { m = m + j; } else m = m + j - 1; } cout << m << endl; return 0; }
replace
5
10
5
11
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define deb(x...
#include <bits/stdc++.h> #define ll long long #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define deb(x...
replace
20
28
20
22
TLE
p02548
C++
Time Limit Exceeded
/* It's a shot in the dark But I will make it */ #include <bits/stdc++.h> using namespace std; #define ll long long const int inf = 1000000000; bool cmp(pair<int, int> a, pair<int, int> b) { return a.second < b.second; } int main() { ios::sync_with_stdio(0); cin.tie(0); int n; ...
/* It's a shot in the dark But I will make it */ #include <bits/stdc++.h> using namespace std; #define ll long long const int inf = 1000000000; bool cmp(pair<int, int> a, pair<int, int> b) { return a.second < b.second; } int main() { ios::sync_with_stdio(0); cin.tie(0); int n; ...
replace
16
26
16
18
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <utility> #include <vector> #define FOR(i, begin, end) \ for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define IFOR(i, begin, end) \ ...
#include <algorithm> #include <cmath> #include <iostream> #include <utility> #include <vector> #define FOR(i, begin, end) \ for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define IFOR(i, begin, end) \ ...
insert
38
38
38
40
TLE
p02548
Python
Runtime Error
from sympy import divisor_count n = int(input) count = 0 for c in range(1, n): count += divisor_count(c) print(count)
n = int(input()) - 1 lst = [n // k for k in range(1, int(n**0.5 + 1))] print(2 * sum(lst) - int(n**0.5) ** 2)
replace
0
7
0
3
ModuleNotFoundError: No module named 'sympy'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02548/Python/s700030689.py", line 1, in <module> from sympy import divisor_count ModuleNotFoundError: No module named 'sympy'
p02548
Python
Time Limit Exceeded
N = int(input()) result = 0 for A in range(1, N + 1): for B in range(1, (N // A) + 1): C = N - A * B if C == 0: continue result += 1 print(result)
N = int(input()) result = 0 for A in range(1, N + 1): result += (N - 1) // A print(result)
replace
4
9
4
5
TLE
p02548
Python
Runtime Error
# coding:utf-8 n = int(input()) ans = 0 for a in range(n): ans += (n - 1) // a print(ans)
# coding:utf-8 n = int(input()) ans = 0 for a in range(1, n): ans += (n - 1) // a print(ans)
replace
4
5
4
5
ZeroDivisionError: integer division or modulo by zero
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02548/Python/s983821669.py", line 6, in <module> ans += (n - 1) // a ZeroDivisionError: integer division or modulo by zero
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; typedef long long ll; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define EFOR(i, a, b) for (int i = (a); i <= (b); ++i) #define REP(i, n) FOR(i, 0, n) #define INF 1e9 const int MOD = 1000000007; typedef pair<ll, ll> P; ll divs(l...
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; typedef long long ll; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define EFOR(i, a, b) for (int i = (a); i <= (b); ++i) #define REP(i, n) FOR(i, 0, n) #define INF 1e9 const int MOD = 1000000007; typedef pair<ll, ll> P; ll divs(l...
replace
26
29
26
31
TLE
p02548
C++
Time Limit Exceeded
#include <iostream> #include <math.h> #define lli long long int #define ld long double #define endl "\n" using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE // for getting input from input.txt freopen( "D:\\My Folder\\Programming\\[code] Competetive ...
#include <iostream> #include <math.h> #define lli long long int #define ld long double #define endl "\n" using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE // for getting input from input.txt freopen( "D:\\My Folder\\Programming\\[code] Competetive ...
replace
45
46
45
47
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define ll long long int #define ull unsigned long long int #define ld long double #define ascpqi priority_queue<int, vector<int>, greater<int>> #define ascpql \ priority_queue<long long int, vector<...
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define ll long long int #define ull unsigned long long int #define ld long double #define ascpqi priority_queue<int, vector<int>, greater<int>> #define ascpql \ priority_queue<long long int, vector<...
replace
266
278
266
268
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long N; cin >> N; long long ans = 0; for (long long C = 1; C < N; C++) { long long AB = N - C; for (long long A = 1; A * A <= AB; A++) { if (AB % A == 0) { ans++; if (AB / A != A) ans++; } } } ...
#include <bits/stdc++.h> using namespace std; int main() { long long N; cin >> N; long long ans = 0; for (long long A = 1; A < N; A++) { long long B = N / A; long long C = N % A; if (C > 0) { ans += B; } else ans += B - 1; } cout << ans << endl; }
replace
8
17
8
15
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; // Template START #define endl "\n" #define async \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define Int long long int #define all(y) y.begin(), y.end(...
#include <bits/stdc++.h> using namespace std; // Template START #define endl "\n" #define async \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define Int long long int #define all(y) y.begin(), y.end(...
replace
34
47
34
36
TLE
p02548
C++
Runtime Error
#include <iostream> using namespace std; int main() { int n; cin >> n; long int sum = 0; for (int i = 0; i < n; i++) { sum += n / i; if (n % i == 0) sum--; } cout << sum; return 0; }
#include <iostream> using namespace std; int main() { int n; cin >> n; long int sum = 0; for (int i = 1; i < n; i++) { sum += n / i; if (n % i == 0) sum--; } cout << sum; return 0; }
replace
6
7
6
7
-8
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdint> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string.h> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdint> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string.h> #includ...
replace
141
149
141
146
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; void __print(int x) { cout << x; } void __print(long x) { cout << x; } void __print(long long x) { cout << x; } void __print(unsigned x) { cout << x; } void __print(unsigned long x) { cout << x; } void __print(unsigned long long x) { cout << x; } void __print(float x) { cou...
#include <bits/stdc++.h> using namespace std; void __print(int x) { cout << x; } void __print(long x) { cout << x; } void __print(long long x) { cout << x; } void __print(unsigned x) { cout << x; } void __print(unsigned long x) { cout << x; } void __print(unsigned long long x) { cout << x; } void __print(float x) { cou...
replace
59
69
59
62
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long N, ans = 0; cin >> N; for (int i = 1; i < N; i++) { long long M = N - i; for (int j = 1; j * j <= M; j++) { if (M % j == 0) { if (j * j == M) ans++; else ans += 2; } } } cout <<...
#include <bits/stdc++.h> using namespace std; int main() { long long N, ans = 0; cin >> N; for (long long i = 1; i <= N; i++) { long long x = N / i; ans += x; if (x * i == N) ans--; } cout << ans << endl; return 0; }
replace
7
18
7
12
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int cnt = 0; for (int i = 1; i < n; i++) { for (int j = 1; j < n; j++) { if (i * j < n) cnt++; } } cout << cnt; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int cnt = 0; for (int i = 1; i < n; i++) { for (int j = 1; i * j < n; j++) { cnt++; } } cout << cnt; return 0; }
replace
7
10
7
10
TLE
p02548
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, start, end) for (long long i = start; i < end; ++i) #define repreverse(i, start, end) for (long long i = start; i >= end; --i) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define inrange(a, x, b) (a <= x && x <= b) #define len(x) ((long long)(x)...
#include <bits/stdc++.h> #define rep(i, start, end) for (long long i = start; i < end; ++i) #define repreverse(i, start, end) for (long long i = start; i >= end; --i) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define inrange(a, x, b) (a <= x && x <= b) #define len(x) ((long long)(x)...
insert
146
146
146
148
-11
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; int cou = 0; cin >> n; for (int a = 1; a < n; a++) { for (int b = 1; b < n; b++) { for (int c = 1; c < n; c++) { if (a * b + c == n) { cou++; } } } } cout << cou << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; int cou = 0; cin >> n; for (int a = 1; a < n; a++) { for (int b = 1; b < n; b++) { if (a * b < n) { cou++; } else { break; } } } cout << cou << endl; }
replace
10
14
10
14
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> //{ START using namespace std; #define int int64_t #define rep(i, a, n) for (int i = (a); i < (n); ++i) #define reps(i, a, n) for (int i = (n - 1); i > (a - 1); --i) #define arep(i, x) for (auto &&i : (x)) #define irep(i, x) for (auto i = (x).begin(); i != (x).end(); ++i) #define rirep(i, x) f...
#include <bits/stdc++.h> //{ START using namespace std; #define int int64_t #define rep(i, a, n) for (int i = (a); i < (n); ++i) #define reps(i, a, n) for (int i = (n - 1); i > (a - 1); --i) #define arep(i, x) for (auto &&i : (x)) #define irep(i, x) for (auto i = (x).begin(); i != (x).end(); ++i) #define rirep(i, x) f...
replace
104
113
104
111
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using ll = long long; #define rep(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, s, n) for (ll i = s; i < (n); i++) using namespace std; int main() { ll n; cin >> n; ll ans = 0; rep2(i, 1, n) { ll rn = sqrt(i)...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using ll = long long; #define rep(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, s, n) for (ll i = s; i < (n); i++) using namespace std; int main() { ll n; cin >> n; ll ans = 0; rep2(i, 1, n) { ans += (n - 1) / i;...
replace
14
25
14
15
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int count = 0; for (int i = 1; i < n; i++) { for (int j = i; j < n; j++) { if (i * j < n) { count += 2; if (i == j) count--; } } } cout << count; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int count = 0; for (int i = 1; i < n; i++) { count += (n - 1) / i; } cout << count; return 0; }
replace
8
15
8
9
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long int #define li int64_t int main() { int n; cin >> n; li count = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { if (i * j < n) { count++; } } } cout << count; }
#include <bits/stdc++.h> using namespace std; #define ll long long int #define li int64_t int main() { int n; cin >> n; li count = n - 1; for (int i = 2; i < n; i++) { if (n % i == 0) { count += (n / i) - 1; } else { count += (n / i); } } cout << count; }
replace
9
15
9
15
TLE
p02548
C++
Time Limit Exceeded
//"BISMILLAHIR RAHMANIR RAHIM" #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back const long long M = 1e9 + 7; ll fact(ll x, ll y) { ll f = 1, i = 1; while (i <= y) { f = ((f % M) * (x % M)) % M; i++; } return f; } int main() { ll n, i, cnt = 0, x, y, j; cin >> ...
//"BISMILLAHIR RAHMANIR RAHIM" #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back const long long M = 1e9 + 7; ll fact(ll x, ll y) { ll f = 1, i = 1; while (i <= y) { f = ((f % M) * (x % M)) % M; i++; } return f; } int main() { ll n, i, cnt = 0, x, y, j; cin >> ...
replace
18
25
18
19
TLE
p02548
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; typedef map<string, int> msi; typedef pair<int, int> PII; int main() { int n; cin >> n; ll ans = 0; for (int i = 1; i < n; i++) { for (int j = 1; j <= pow(n - i, 0.5); j++) { if ((n - i)...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; typedef map<string, int> msi; typedef pair<int, int> PII; int main() { int n; cin >> n; ll ans = 0; for (int i = 1; i < n; i++) { ans += ((n - 1) / i); } cout << ans << endl; return 0; }
replace
13
21
13
14
TLE
p02548
C++
Time Limit Exceeded
// author: vinoda #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long count = 0; for (int i = 1; i <= 1e6; ++i) { if (i > n) break; for (int j = 1; j <= 1e6; ++j) { if (j > n) break; int c = n - i * j; if (c > 0) ++count; } } ...
// author: vinoda #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long count = 0; for (int i = 1; i < n; ++i) count += (n - 1) / i; cout << count << endl; }
replace
8
19
8
10
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <iostream> #include <iterator> #include <map> #include <math.h> #include <set> #include <string> #include <vector> #define ll long long int #define ull unsigned long long int #define pb push_back #define mp make_pair #include <algorithm> #include <cmath> using namespace std; pair<ll, l...
#include <bits/stdc++.h> #include <iostream> #include <iterator> #include <map> #include <math.h> #include <set> #include <string> #include <vector> #define ll long long int #define ull unsigned long long int #define pb push_back #define mp make_pair #include <algorithm> #include <cmath> using namespace std; pair<ll, l...
replace
61
71
61
64
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long n, j, i, p = 0, k, l; cin >> n; for (i = 1; i <= n - 1; i++) { k = n - i; for (j = 1; j <= sqrt(k); j++) { if (k % j == 0) { if (j * j == k) p = p + 1; else p = p + 2; } } } cout <<...
#include <bits/stdc++.h> using namespace std; int main() { long long n, j, i, p = 0, k, l; cin >> n; p = p; for (i = 1; i <= n; i++) { p = p + n / i; if (n % i == 0) { p = p - 1; } } cout << p; return 0; }
replace
5
14
5
10
TLE
p02548
C++
Time Limit Exceeded
// #pragma GCC optimize("Ofast") // #pragma GCC target("avx,avx2,fma") #pragma GCC optimize("O3") #include <algorithm> #include <chrono> #include <cmath> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #inc...
// #pragma GCC optimize("Ofast") // #pragma GCC target("avx,avx2,fma") #pragma GCC optimize("O3") #include <algorithm> #include <chrono> #include <cmath> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #inc...
replace
138
141
138
140
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int cnt = 0; for (long long int i = 1; i <= n; i++) { for (long long int j = 1; j <= n; j++) { for (long long int k = 1; k <= n; k++) { if ((i * j) + k == n) { cnt++; } } ...
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int cnt = 0; for (long long int i = 1; i < n; i++) { for (long long int j = 1; i * j < n; j++) { cnt++; } } cout << cnt << endl; }
replace
6
13
6
9
TLE
p02548
C++
Runtime Error
#pragma GCC optimize(2) #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #define File(x) freopen(x ".in", "r", stdin), freopen(x ".out", "w", stdout); #define re register #define ri re int #define gtch() \ (p1 ...
#pragma GCC optimize(2) #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #define File(x) freopen(x ".in", "r", stdin), freopen(x ".out", "w", stdout); #define re register #define ri re int #define gtch() \ (p1 ...
insert
42
42
42
44
-11
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define ll long long int #define pb push_back int main() { ll a, cnt = 0; cin >> a; for (ll i = 1; i < a; i++) { ll cur = a - i; for (ll j = 1; j <= sqrt(cur); j++) { if (j * j == cur) cnt++; else if (cur ...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define ll long long int #define pb push_back int main() { ll a, cnt = 0; cin >> a; for (ll i = 1; i <= a; i++) { cnt += a / i; if (a % i == 0) cnt--; } cout << cnt << endl; }
replace
9
17
9
13
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long int count = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { if (n - (i * j) > 0) { count++; } } } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long int count = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n / i; j++) { if (n - (i * j) > 0) { count++; } } } cout << count << endl; }
replace
7
8
7
8
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <stack> #include <string> #include <unordered_map> using namespace std; typedef long long ll; const ll INF = 1000000007; const ll mod = 1000000007...
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <stack> #include <string> #include <unordered_map> using namespace std; typedef long long ll; const ll INF = 1000000007; const ll mod = 1000000007...
replace
23
28
23
25
TLE
p02548
C++
Time Limit Exceeded
/* https://codeforces.com/contest/1360/problem/H */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vs = vector<string>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using pi = pair<int, int>; using pl = pair<ll, ll>; using vpi = vector<pair<int, int>>; using vpl = ...
/* https://codeforces.com/contest/1360/problem/H */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vs = vector<string>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using pi = pair<int, int>; using pl = pair<ll, ll>; using vpi = vector<pair<int, int>>; using vpl = ...
replace
35
40
35
38
TLE
p02548
C++
Time Limit Exceeded
#include <stdio.h> #include <string.h> #pragma GCC optimize("O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define rep(i, N) for (int i = 0; i < (int)N; i++) static inline void PUT(char c) { static char buf[1 << 15], *ptr = buf; if (ptr == buf + strlen(buf) || c == 0) { fwri...
#include <stdio.h> #include <string.h> #pragma GCC optimize("O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define rep(i, N) for (int i = 0; i < (int)N; i++) static inline void PUT(char c) { static char buf[1 << 15], *ptr = buf; if (ptr == buf + strlen(buf) || c == 0) { fwri...
replace
36
41
36
37
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vector<int>>; using vvvi = vector<vector<vector<int>>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; using vvvl = vector<vector<vector<ll>>>; using vs = vector<string>; using...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vector<int>>; using vvvi = vector<vector<vector<int>>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; using vvvl = vector<vector<vector<ll>>>; using vs = vector<string>; using...
insert
113
113
113
121
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define int long long using namespace std; inline int read() { int s = 0, w = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') w = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar(); return s * w; } inl...
#include <bits/stdc++.h> #define int long long using namespace std; inline int read() { int s = 0, w = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') w = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar(); return s * w; } inl...
replace
56
64
56
60
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; for (int a = 1; a <= n; a++) { for (int b = 1; b <= n; b++) { ans += n - a * b > 0; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; for (int a = 1; a <= n; a++) { for (int b = 1; b <= n; b++) { if (a * b < n) ans++; else break; } } cout << ans << endl; }
replace
10
11
10
14
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ tree_order_statistic...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ tree_order_statistic...
replace
40
49
40
42
TLE
p02548
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define sz(x) ((int)(x).size()) #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for (int i = 0; i < (int)(n); ++i) #define for1(i, n) for (int i = 1; i <= (int)(n); ++...
#include <bits/stdc++.h> #define sz(x) ((int)(x).size()) #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for (int i = 0; i < (int)(n); ++i) #define for1(i, n) for (int i = 1; i <= (int)(n); ++...
replace
23
31
23
27
TLE
p02548
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <vector> #define DOLL long double #define LOLI long long int using namespace std; const long C_10PW9 = 1000000000; const int ULCODE = 32; int divc(int s) { int r = 0; int sq = sqrt(s); for (int i = 1; i <= sq; i...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <vector> #define DOLL long double #define LOLI long long int using namespace std; const long C_10PW9 = 1000000000; const int ULCODE = 32; int divc(int s) { int r = 0; int sq = sqrt(s); for (int i = 1; i <= sq; i...
replace
32
33
32
34
TLE