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
p02606
C++
Runtime Error
#include <bits/stdc++.h> /* * coder :: ATUL_PANDEY_2608 * >>> INDIA <<< */ using namespace std; // #define part .. #define pb(a) push_back(a) #define all(a) a.begin(), a.end() #define mod 1000000007 #define maxx 200006 #define ll long long #define quick ios_base::sync_with_stdio(NULL), cin.tie(0); #defin...
#include <bits/stdc++.h> /* * coder :: ATUL_PANDEY_2608 * >>> INDIA <<< */ using namespace std; // #define part .. #define pb(a) push_back(a) #define all(a) a.begin(), a.end() #define mod 1000000007 #define maxx 200006 #define ll long long #define quick ios_base::sync_with_stdio(NULL), cin.tie(0); #defin...
insert
41
41
41
43
0
p02607
C++
Runtime Error
#include <iostream> using namespace std; int main() { int i, n; cin >> n; int a[i], c = 0; for (i = 0; i < n; i++) cin >> a[i]; for (i = 0; i < n; i++) { if (i % 2 == 0 && a[i] % 2 != 0) c++; } cout << c << endl; }
#include <iostream> using namespace std; int main() { int i, n; cin >> n; int a[n], c = 0; for (i = 0; i < n; i++) cin >> a[i]; for (i = 0; i < n; i++) { if (i % 2 == 0 && a[i] % 2 != 0) c++; } cout << c << endl; }
replace
5
6
5
6
-11
p02607
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, n = 0; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(i); } for (int i = 1; i <= N; i++) { if (i % 2 != 0 && a.at(i) % 2 != 0) n++; } cout << n; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int N, n = 0; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(i); } for (int i = 1; i <= N; i++) { if (i % 2 != 0 && a.at(i - 1) % 2 != 0) n++; } cout << n; return 0; }
replace
11
12
11
12
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02607
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define LL long long #define mod 998244353 int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); LL N; cin >> N; LL x; LL count = 0; x = 1; while (x <= N) { LL y; cin >...
#include <bits/stdc++.h> using namespace std; #define LL long long #define mod 998244353 int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); LL N; cin >> N; LL x; LL count = 0; x = 1; while (x <= N) { LL y; cin >> y; if (x % 2 and y % 2) count++; x++; } cout << count;...
delete
7
9
7
7
TLE
p02607
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(i); } int count = 0; int M; if (N % 2 == 0) { M == N / 2; } else if (!(N % 2 == 0)) { M == N / 2 + 1; } if (N % 2 == 0) { for (int i = 0; i <= N...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(i); } int count = 0; int M; if (N % 2 == 0) { M == N / 2; } else if (!(N % 2 == 0)) { M == N / 2 + 1; } if (N % 2 == 0) { for (int i = 0; i < N ...
replace
19
20
19
20
0
p02607
C++
Runtime Error
#include <bits/stdc++.h> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> using namespace std; using ll = long long; int main() { int N; cin >> N; vector<int> a(N); int count = 0; for (int i = 1; i < N + 1; i++) { cin >> a.at(i); if (i % 2 == 1 && a.at(i) % 2 == 1) ...
#include <bits/stdc++.h> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> using namespace std; using ll = long long; int main() { int N; cin >> N; vector<int> a(N + 1); int count = 0; for (int i = 1; i < N + 1; i++) { cin >> a.at(i); if (i % 2 == 1 && a.at(i) % 2 == ...
replace
12
13
12
13
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02607
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } int ans = 0; for (int i = 1; i <= n; i++) { if ((i % 2 == 1) && (vec.at(i) % 2 == 1)) ans++; } cout << ans; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } int ans = 0; for (int i = 0; i < n; i++) { if (((i + 1) % 2 == 1) && (vec.at(i) % 2 == 1)) ans++; } cout << ans; }
replace
13
15
13
15
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02607
Python
Runtime Error
n = int(input()) a = list(map(int, input().split())) res = 0 for i in range(1, n + 1, 2): if a[i] % 2 != 0: res += 1 print(res)
n = int(input()) a = list(map(int, input().split())) res = 0 for i in range(0, n, 2): if a[i] % 2 != 0: res += 1 print(res)
replace
3
4
3
4
IndexError: list index out of range
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02607/Python/s671759343.py", line 5, in <module> if a[i] % 2 != 0: IndexError: list index out of range
p02607
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n, c; c = 0; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } for (int i = 0; i < n; i + 2) { if (vec.at(i) % 2 == 1) { c++; } } cout << c << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, c; c = 0; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } for (int i = 0; i < n; i++) { if (i % 2 == 1) { continue; } if (vec.at(i) % 2 == 1) { c++; } } cout << c << endl;...
replace
11
12
11
15
TLE
p02607
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, cnt = 0; cin >> N; vector<int> N_a(N); for (int i = 0; i < N; i++) { cin >> N_a.at(i); } for (int i = 0; N; i++) { if ((i + 1) % 2 == 1 && N_a.at(i) % 2 == 0) { cnt++; } } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, cnt = 0; cin >> N; vector<int> N_a(N); for (int i = 0; i < N; i++) { cin >> N_a.at(i); } for (int i = 0; i < N; i++) { if ((i + 1) % 2 == 1 && N_a.at(i) % 2 == 1) { cnt++; } } cout << cnt << endl; }
replace
10
12
10
12
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 6) >= this->size() (which is 5)
p02607
C++
Runtime Error
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (auto &x : a) { cin >> x; } int t = n; if (t % 2 == 1) { t--; } int ans = 0; for (int i = 0; i <= t; i += 2) { if (a.at(i) % 2 == 1) { ans++; } } c...
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (auto &x : a) { cin >> x; } int t = n - 1; int ans = 0; for (int i = 0; i <= t; i += 2) { if (a.at(i) % 2 == 1) { ans++; } } cout << ans << endl; }
replace
13
17
13
14
0
p02607
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N = 0; int count = 0; cin >> N; vector<int> data(N); for (int i = 0; i < N; i++) { cin >> data.at(i); } for (int i = 0; i < data.size(); i++) { if (data.at(2 * i) % 2 == 0) count++; } cout << count << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int N = 0; int count = 0; cin >> N; vector<int> data(N); for (int i = 0; i < N; i++) { cin >> data.at(i); } for (int i = 0; i < data.size(); i += 2) { if (data.at(i) % 2 != 0) count++; } cout << count << endl; return 0; }
replace
11
13
11
13
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 6) >= this->size() (which is 5)
p02607
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vi; #define INF (1e9) int main() { int N; cin >> N; vi a(N); ll ans = 0; for (ll i = 1; i <= N; i++) { cin >> a[i]; if (a[i] % 2 == 1 && i % 2 == 1) ans++; } cout << ans << endl; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vi; #define INF (1e9) int main() { int N; cin >> N; vi a(N + 1); ll ans = 0; for (ll i = 1; i <= N; i++) { cin >> a[i]; if (a[i] % 2 == 1 && i % 2 == 1) ans++; } cout << ans << en...
replace
10
11
10
11
-6
Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
p02607
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <vector> using namespace std; int main() { int N, ans; cin >> N; ans = 0; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(N); } if (N % 2 == 0) { for (int j = 0; j < N / 2; j++) { if (a.at(2 * j) % 2 == 1...
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <vector> using namespace std; int main() { int N, ans; cin >> N; ans = 0; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(i); } if (N % 2 == 0) { for (int j = 0; j < N / 2; j++) { if (a.at(2 * j) % 2 == 1...
replace
12
13
12
13
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02607
Python
Runtime Error
N = int(input()) li = [] for i in input().split(): li.append(int(i)) a = 1 count = 0 for i in li: if a % 2 == 1 and li % 2 == 1: count += 1 a += 1 print(count)
N = int(input()) li = [] for i in input().split(): li.append(int(i)) a = 1 count = 0 for i in li: if a % 2 == 1 and i % 2 == 1: count += 1 a += 1 print(count)
replace
8
9
8
9
TypeError: unsupported operand type(s) for %: 'list' and 'int'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02607/Python/s128008997.py", line 9, in <module> if a % 2 == 1 and li % 2 == 1: TypeError: unsupported operand type(s) for %: 'list' and 'int'
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define DEBUG 0 int main() { int N; cin >> N; vector<int> counter_n(N + 1, 0); for (int num = 1; num < N + 1; num++) { for (int i = 1; i < (int)sqrt(num) * 2; i++) { for (int j = i; j < (int)sqrt(num) * 2; j++) { for (int k = j; k < (int)sqr...
#include <bits/stdc++.h> using namespace std; #define DEBUG 0 int main() { int N; cin >> N; vector<int> counter_n(N + 1, 0); for (int num = 1; num < N + 1; num++) { for (int i = 1; i < (int)(sqrt(num) * 1.4); i++) { for (int j = i; j < (int)(sqrt(num) * 1.4); j++) { for (int k = j; k < ...
replace
15
18
15
18
TLE
p02608
C++
Runtime Error
#pragma GCC optimze("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") // inbuilt function in c++ // abs(-2)=2 , __gcd(2,3)=1 , swap(a,b) , // string/array s = "aba"; sort(s.begin(), s.end()); do { cout << s << '\n'; // } while(next_permutation(s.begin(), s.end())); for all permutati...
#pragma GCC optimze("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") // inbuilt function in c++ // abs(-2)=2 , __gcd(2,3)=1 , swap(a,b) , // string/array s = "aba"; sort(s.begin(), s.end()); do { cout << s << '\n'; // } while(next_permutation(s.begin(), s.end())); for all permutati...
replace
155
156
155
157
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> //全てのヘッダファイルをインクルード // ループ #define rep(i, n) for (int i = 0; i < (n); i++) // 普通のループ #define repr(i, n) for (int i = n; i >= 0; i--) // 逆ループ // 型名省略 typedef long long ll; // 値 static const ll MX = 100005; static const ll MX_ll = 1e18; using namespace std; // ソート #define SIZE_OF_ARRAY(array)...
#include <bits/stdc++.h> //全てのヘッダファイルをインクルード // ループ #define rep(i, n) for (int i = 0; i < (n); i++) // 普通のループ #define repr(i, n) for (int i = n; i >= 0; i--) // 逆ループ // 型名省略 typedef long long ll; // 値 static const ll MX = 100005; static const ll MX_ll = 1e18; using namespace std; // ソート #define SIZE_OF_ARRAY(array)...
replace
40
44
40
54
TLE
p02608
C++
Runtime Error
#ifdef LOCAL #define _GLIBCXX_DEBUG #define __clock__ #else #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using VI = vector<ll>; using VV = vector<VI>; using VS = vector<string>; using PII = pair<ll, ll>; // tourist set template <typena...
#ifdef LOCAL #define _GLIBCXX_DEBUG #define __clock__ #else #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using VI = vector<ll>; using VV = vector<VI>; using VS = vector<string>; using PII = pair<ll, ll>; // tourist set template <typena...
replace
238
239
238
239
0
p02608
C++
Time Limit Exceeded
#pragma region Macros #include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < (n); i++) #define REPS(i, n) for (int i = 0; i <= (n); i++) #define FOR(i, a, b) for (int i = a; i < (b); i++) #define FORS(i, a, b) for (int i = a; i <= (b); i++) // for container x #define...
#pragma region Macros #include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < (n); i++) #define REPS(i, n) for (int i = 0; i <= (n); i++) #define FOR(i, a, b) for (int i = a; i < (b); i++) #define FORS(i, a, b) for (int i = a; i <= (b); i++) // for container x #define...
replace
34
39
34
45
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int Triplets(int x, int y, int z) { return x * x + y * y + z * z + x * y + y * z + z * x; } int main() { int N, x = 1, y = 1, z = 1; cin >> N; vector<int> ans(10001); for (z = 1; z < y + 1; z++) { for (y = z; y < x + 1; y++) { for (x = y; x < sqrt(N - ...
#include <bits/stdc++.h> using namespace std; int Triplets(int x, int y, int z) { return x * x + y * y + z * z + x * y + y * z + z * x; } int main() { int N, x = 1, y = 1, z = 1; cin >> N; vector<int> ans(100000); for (z = 1; z < y + 1; z++) { for (y = z; y < x + 1; y++) { for (x = y; x < sqrt(N -...
replace
10
11
10
11
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; ++i) { int cnt = 0; int N = i; for (int x = 1; x <= n; ++x) { for (int y = 1; y <= n; ++y) { for (int z = 1; z <= n; ++z) { int cal = x * x + y * y + z * z + x * y + y * z + z * ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; ++i) { int cnt = 0; int N = i; for (int x = 1; x * x <= n; ++x) { for (int y = 1; y * y <= n; ++y) { for (int z = 1; z * z <= n; ++z) { int cal = x * x + y * y + z * z + x * y + ...
replace
8
11
8
11
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair<ll, ll> #define vpii vector<pair<ll, ll>> #define F first #define S second #define ld long double #define built __builtin_popcountll #define mst(a...
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair<ll, ll> #define vpii vector<pair<ll, ll>> #define F first #define S second #define ld long double #define built __builtin_popcountll #define mst(a...
replace
61
62
61
63
-11
p02608
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; using ll = long long int; #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() #define pi 3.14159265358979323846 template <class T> bool ch1000000(T ...
#include "bits/stdc++.h" using namespace std; using ll = long long int; #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() #define pi 3.14159265358979323846 template <class T> bool ch1000000(T ...
replace
32
33
32
33
-11
p02608
C++
Time Limit Exceeded
#pragma GCC optimize("Ofast") #include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stdio.h> #include <string.h> #include <vector> const long long INFL = 1e17 + 7; const long long INFI = 1e9 + 7; const long long MOD = 1e9 + 7; const double EPS = 1e-8; c...
#pragma GCC optimize("Ofast") #include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stdio.h> #include <string.h> #include <vector> const long long INFL = 1e17 + 7; const long long INFI = 1e9 + 7; const long long MOD = 1e9 + 7; const double EPS = 1e-8; c...
replace
27
30
27
30
TLE
p02608
C++
Time Limit Exceeded
// It gets easier day by day, but the hard part is to........ // "I am here." ~ All Might! #pragma optimise GCC(-O2) #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define ld long double #define pii pair<ll, ll> #define ve(x) vector<x> #define f(a, b, c) for (ll a = b; a < c; ...
// It gets easier day by day, but the hard part is to........ // "I am here." ~ All Might! #pragma optimise GCC(-O2) #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define ld long double #define pii pair<ll, ll> #define ve(x) vector<x> #define f(a, b, c) for (ll a = b; a < c; ...
replace
110
119
110
121
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long int ll; typedef pair<int, int> P; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { int ans = 0; int num = i; for (int x = 1; x * x <= num; x++) { for (int y = 1; y * ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long int ll; typedef pair<int, int> P; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { int ans = 0; int num = i; for (int x = 1; x * x < num; x++) { for (int y = 1; x * x...
replace
12
15
12
16
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep2(i, a, b) for (int i = (a); i <= (b); ++i) using namespace std; typedef long long ll; typedef pair<int, int> P; int f(int n) { int cnt = 0; for (int x = 1; x <= 100; x++) { for (int y = 1; y <= 100; y++) { for (int z = 1...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep2(i, a, b) for (int i = (a); i <= (b); ++i) using namespace std; typedef long long ll; typedef pair<int, int> P; int f(int n) { int cnt = 0; for (int x = 1; x <= 100; x++) { for (int y = 1; y <= 100; y++) { int a = (x + y...
replace
11
15
11
16
TLE
p02608
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int n, ans = 0; cin >> n; for (int i = 1; i <= n; i++) { for (int x = 1; x <= n; x++) { if (x * x + 2 * x + 3 > i) break; int xx = x * x; for (int y = x; y <= n; y++) { int xy = xx + y * (x + y); if (xy + x + y + ...
#include <iostream> using namespace std; int main() { int n, ans = 0; cin >> n; for (int i = 1; i <= n; i++) { for (int x = 1; x <= n; x++) { if (x * x + 2 * x + 3 > i) break; int xx = x * x; for (int y = x; y <= n; y++) { int xy = xx + y * (x + y); if (xy + x + y + ...
replace
25
26
25
27
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FAST() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) int Check(i...
#include <bits/stdc++.h> using namespace std; #define FAST() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) int Check(i...
replace
15
16
15
16
0
p02608
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 = 998244353;...
#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 = 998244353;...
replace
24
26
24
27
TLE
p02608
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; using ll = long long; using Pii = pair<int, int>; using Pll = pair<ll, ll>; #define rep(i, begin, n) for (int i = begin; i < n; i++) #define repe(i, begin, n) for (int i = begin; i <= n; i++) #define repr(i, begin, n) for (int i = begin; i > begin - n; i--) #define repre(i,...
#include "bits/stdc++.h" using namespace std; using ll = long long; using Pii = pair<int, int>; using Pll = pair<ll, ll>; #define rep(i, begin, n) for (int i = begin; i < n; i++) #define repe(i, begin, n) for (int i = begin; i <= n; i++) #define repr(i, begin, n) for (int i = begin; i > begin - n; i--) #define repre(i,...
insert
42
42
42
44
0
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[10010] = {0}; for (int x = 1; x < 100; x++) { for (int y = 1; y < 100; y++) { for (int z = 1; z < 100; z++) { a[x * x + y * y + z * z + x * y + y * z + z * x]++; } } } for (int i = 1; i <= n; i++) ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[100000]; for (int i = 1; i < 100000; i++) a[i] == 0; for (int x = 1; x < 100; x++) { for (int y = 1; y < 100; y++) { for (int z = 1; z < 100; z++) { a[x * x + y * y + z * z + x * y + y * z + z * x]++; ...
replace
6
7
6
9
-11
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #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 - 1); i >= 0; i--) #define rreps(i, n, s) for (int i = s; i >= n; i--) template <class T> bool chmax(T &a, const T &b) { if (a < b) { ...
#include <bits/stdc++.h> #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 - 1); i >= 0; i--) #define rreps(i, n, s) for (int i = s; i >= n; i--) template <class T> bool chmax(T &a, const T &b) { if (a < b) { ...
replace
38
43
38
44
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repI(i, d, n) for (int i = (d); i < (n); ++i) #define reps1(i, n) for (int i = 1; i < (n); ++i) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <clas...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repI(i, d, n) for (int i = (d); i < (n); ++i) #define reps1(i, n) for (int i = 1; i < (n); ++i) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <clas...
replace
34
36
34
36
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repI(i, d, n) for (int i = (d); i < (n); ++i) #define reps1(i, n) for (int i = 1; i < (n); ++i) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <clas...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repI(i, d, n) for (int i = (d); i < (n); ++i) #define reps1(i, n) for (int i = 1; i < (n); ++i) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <clas...
replace
37
38
37
41
0
p02608
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); ++i) #define RREP(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (a); i >= (b); --i) #define ALL(v) (v).begin(), (v).end() #define RALL(a) (a).rbegin(), (a).rend() #define ...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); ++i) #define RREP(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (a); i >= (b); --i) #define ALL(v) (v).begin(), (v).end() #define RALL(a) (a).rbegin(), (a).rend() #define ...
replace
31
32
31
35
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define ll long long int #define ld long double #define vii vector<ll> #define pb push_back #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define ll long long int #define ld long double #define vii vector<ll> #define pb push_back #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
insert
29
29
29
31
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using ll = long long; using vec = vector<int>; using vec2 = vector<vector<int>>; ll inf = pow(2, 62); // x2 + y2 + z2 + xy+yz+zx = x2 + x(y + z)...
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using ll = long long; using vec = vector<int>; using vec2 = vector<vector<int>>; ll inf = pow(2, 62); // x2 + y2 + z2 + xy+yz+zx = x2 + x(y + z)...
replace
16
19
16
19
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define REP(i, x, n) for (int i = x; i < (int)n; i++) #define rep(i, n) REP(i, 0, n) #define sp(p) cout << setprecision(16) << fixed << p << endl; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define SORT(a) sort(all(a)) #define RSORT(a) sort(rall(...
#include <bits/stdc++.h> using namespace std; #define REP(i, x, n) for (int i = x; i < (int)n; i++) #define rep(i, n) REP(i, 0, n) #define sp(p) cout << setprecision(16) << fixed << p << endl; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define SORT(a) sort(all(a)) #define RSORT(a) sort(rall(...
insert
83
83
83
85
TLE
p02608
C++
Time Limit Exceeded
// Alisher_2211 #include <bits/stdc++.h> #define long long long #define all(vc) vc.begin(), vc.end() #define allr(vc) vc.rbegin(), vc.rend() #define pb push_back #define fi first #define se second #define pi pair<long, long> #define lcm(a, b) (a * b) / __gcd(a, b) using namespace std; vo...
// Alisher_2211 #include <bits/stdc++.h> #define long long long #define all(vc) vc.begin(), vc.end() #define allr(vc) vc.rbegin(), vc.rend() #define pb push_back #define fi first #define se second #define pi pair<long, long> #define lcm(a, b) (a * b) / __gcd(a, b) using namespace std; vo...
replace
26
28
26
28
TLE
p02608
C++
Runtime Error
#include <cmath> #include <iostream> #include <vector> using namespace std; int main() { long long n; std::cin >> n; vector<long long> answers(n + 1, 0); for (int x = 1; x <= 100; x++) { for (int y = 1; y <= 100; y++) { for (int z = 1; z <= 100; z++) { long long val = pow(x, 2)...
#include <cmath> #include <iostream> #include <vector> using namespace std; int main() { long long n; std::cin >> n; vector<long long> answers(n + 1, 0); for (int x = 1; x <= 100; x++) { for (int y = 1; y <= 100; y++) { for (int z = 1; z <= 100; z++) { long long val = pow(x, 2)...
insert
17
17
17
19
-11
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int a[50005] = {0}; int main() { ios ::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 1; i <= sqrt(n); i++) { for (int j = 1; j <= sqrt(n); j++) { for (int k = 1; k <= sqrt(n); k++) { int x ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int a[60005] = {0}; int main() { ios ::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 1; i <= sqrt(n); i++) { for (int j = 1; j <= sqrt(n); j++) { for (int k = 1; k <= sqrt(n); k++) { int x ...
replace
3
4
3
4
0
p02608
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <unordered_set> #include <valarray> #include <vector> #include <utility> #include <deque> #include <queue> using namespace std; long long a[10001]; int main() { long long n; cin >...
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <unordered_set> #include <valarray> #include <vector> #include <utility> #include <deque> #include <queue> using namespace std; long long a[10001]; int main() { long long n; cin >...
replace
29
31
29
31
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) #define _GLIBCXX_DEBUG int n, ans; int max_n(double t) { if (t < 5) return t; t = sqrt(t); return t; } int main() { cin >> n; rep2(i, 1, n + 1) { ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) #define _GLIBCXX_DEBUG int n, ans; int max_n(double t) { if (t < 5) return t; t = sqrt(t); return t; } int main() { cin >> n; rep2(i, 1, n + 1) { ...
replace
20
23
20
29
TLE
p02608
C++
Runtime Error
#include <cmath> #include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> ans(N + 1); int n = sqrt(N); for (int x = 1; x < n; x++) { for (int y = 1; y < n; y++) { for (int z = 1; z < n; z++) { int a = (x + y + z) * (x + y + z) - (x * y + y * z + z...
#include <cmath> #include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> ans(N + 1); int n = sqrt(N); for (int x = 1; x < n; x++) { for (int y = 1; y < n; y++) { for (int z = 1; z < n; z++) { int a = (x + y + z) * (x + y + z) - (x * y + y * z + z...
replace
14
15
14
16
0
p02608
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 REP1(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i) #define ll long long static const int MAX = 10000; static const ll INFTY = 1e12; template <class T> inline bool chmax(T &a, T b) { if (...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define REP1(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i) #define ll long long static const int MAX = 10000; static const ll INFTY = 1e12; template <class T> inline bool chmax(T &a, T b) { if (...
replace
30
31
30
31
-11
p02608
C++
Runtime Error
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); int flag[10001] = {0}; for (int x = 1; x < 100; x++) { for (int y = 1; y < 100; y++) { for (int z = 1; z < 100; z++) { int s = x * x + y * y + z * z + z * x + x * y + z * y; ...
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); int flag[10001] = {0}; for (int x = 1; x < 100; x++) { for (int y = 1; y < 100; y++) { for (int z = 1; z < 100; z++) { int s = x * x + y * y + z * z + z * x + x * y + z * y; ...
replace
14
15
14
16
-11
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> cnt(n + 1, 0); for (int x = 1; x * x <= n; x++) { for (int y = 1; y * y <= n; y++) { for (int z = 1; z * z <= n; z++) { int res = x * x + y * y + z * z + x * y + y * z + z * x; cnt[res]++; } ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> cnt(n + 1, 0); for (int x = 1; x * x <= n; x++) { for (int y = 1; y * y <= n; y++) { for (int z = 1; z * z <= n; z++) { int res = x * x + y * y + z * z + x * y + y * z + z * x; if (res > n) ...
insert
11
11
11
13
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; /* s.find_by_order(k) ---> returns iterat...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; /* s.find_by_order(k) ---> returns iterat...
replace
124
128
124
137
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; #define speed \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; #define speed \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
36
37
36
40
-11
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int64; typedef vector<int> vec; typedef vector<int64> vec64; #define db(x) cout << "> " << #x << ": " << x << "\n"; #define ss cout << " "; #define ct(x) cout << x; #define nn cout << "\n"; #define cts(x) cout << x << " "; #define ctn(x) cout << x << "\n";...
#include <bits/stdc++.h> using namespace std; typedef long long int64; typedef vector<int> vec; typedef vector<int64> vec64; #define db(x) cout << "> " << #x << ": " << x << "\n"; #define ss cout << " "; #define ct(x) cout << x; #define nn cout << "\n"; #define cts(x) cout << x << " "; #define ctn(x) cout << x << "\n";...
replace
45
46
45
46
0
p02608
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); ++i) template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } using namespace s...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); ++i) template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } using namespace s...
replace
34
35
34
35
-6
corrupted size vs. prev_size
p02608
C++
Time Limit Exceeded
#include <cmath> #include <cstdio> using namespace std; int main() { int n, cnt = 0; scanf("%d", &n); for (int i = 1; i <= n; i++) { int x, y, z; for (x = 1; x <= sqrt(i); x++) { for (y = 1; y <= sqrt(i); y++) { for (z = 1; z <= sqrt(i); z++) { if (x * x + y * y + z * z + x * y + ...
#include <cmath> #include <cstdio> using namespace std; int main() { int n, cnt = 0; scanf("%d", &n); for (int i = 1; i <= n; i++) { int a, b, c; for (a = -sqrt(2 * i); a <= sqrt(2 * i); a++) { for (b = -sqrt(2 * i); b <= sqrt(2 * i); b++) { if ((int)sqrt(2 * i - a * a - b * b) == sqrt(2 * ...
replace
8
13
8
14
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (i = 1; i <= n; i++) // 2D::rep(i,j)rep(j,j)cin>>bin[i][j]; // vector<int> a(n) #define Graph vector<vector<int>> #define A1 cout << "No" << endl #define A2 cout << "Yes" << endl #define A3 cout << ans << #define AA(i) cout << i <...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (i = 1; i <= n; i++) // 2D::rep(i,j)rep(j,j)cin>>bin[i][j]; // vector<int> a(n) #define Graph vector<vector<int>> #define A1 cout << "No" << endl #define A2 cout << "Yes" << endl #define A3 cout << ans << #define AA(i) cout << i <...
replace
20
23
20
23
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; typedef pair<int, int> P; struct edge { int to, id; }; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define mod 1000000007 using graph = vector<vector<ll>>; int main() { int n; cin >> n; int ans = 0; for (int i = 1; i <= n; i++) {...
#include <bits/stdc++.h> using namespace std; using ll = long long; typedef pair<int, int> P; struct edge { int to, id; }; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define mod 1000000007 using graph = vector<vector<ll>>; int main() { int n; cin >> n; int ans = 0; for (int i = 1; i <= n; i++) {...
replace
20
23
20
23
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n = 0; cin >> n; for (ll i = 1; i <= n; i++) { ll sum = 0; for (ll j = 1; j * j <= n; j++) { for (ll k = 1; k * k <= n; k++) { for (ll l = 1; l * l <= n; l++) { if (l * l + j * j + k * k + l * k ...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n = 0; cin >> n; for (ll i = 1; i <= n; i++) { ll sum = 0; for (ll j = 1; j * j <= n; j++) { for (ll k = 1; k * k <= n; k++) { if ((j + k) * (j + k) < (4 * (j * j + k * k + j * k - i))) { continu...
replace
13
17
13
29
TLE
p02608
C++
Time Limit Exceeded
#include <cmath> #include <cstdint> #include <iostream> #include <string> #include <vector> int main(int argc, char *argv[]) { int64_t N; std::cin >> N; const int64_t maxXYZ = int64_t(std::sqrt(double(N + 1))); for (int64_t n = 1; n <= N; ++n) { int cnt = 0; for (int64_t x = 1; x <= maxXYZ; ++x) { ...
#include <cmath> #include <cstdint> #include <iostream> #include <string> #include <vector> int main(int argc, char *argv[]) { int64_t N; std::cin >> N; const int64_t maxXYZ = int64_t(std::sqrt(double(N + 1))); for (int64_t n = 1; n <= N; ++n) { int cnt = 0; for (int64_t x = 1; x <= maxXYZ; ++x) { ...
replace
16
17
16
17
TLE
p02608
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <unordered_map> #include <utility> ...
#include <algorithm> #include <array> #include <cstdlib> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <unordered_map> #include <utility> ...
replace
34
36
34
37
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(a) (a).begin(), (a).end() using namespace std; using ll = long long int; using vec = vector<int>; using P = pair<int, int>; const int INF = 1e9 + 7; int main() { int n; cin >> n; vec f(n + 1, 0); for (int x = 1; x * x < n; x+...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(a) (a).begin(), (a).end() using namespace std; using ll = long long int; using vec = vector<int>; using P = pair<int, int>; const int INF = 1e9 + 7; int main() { int n; cin >> n; vec f(n + 1, 0); for (int x = 1; x * x < n; x+...
replace
17
18
17
20
0
p02608
C++
Runtime Error
#include <iostream> using namespace std; int t, n; int d[10001]; int main() { cin >> n; for (int x = 1; x * x <= n; x++) for (int y = 1; y * y <= n; y++) for (int z = 1; z * z <= n; z++) { t = x * x + y * y + z * z + x * y + y * z + z * x; d[t]++; } for (int i = 1; i <= n; i++) ...
#include <iostream> using namespace std; int t, n; int d[10001]; int main() { cin >> n; for (int x = 1; x * x <= n; x++) for (int y = 1; y * y <= n; y++) for (int z = 1; z * z <= n; z++) { t = x * x + y * y + z * z + x * y + y * z + z * x; if (t > n) break; d[t]++; ...
insert
12
12
12
14
0
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define repd(i, a, b) for (int i = a; i < int(b); i++) #define rep(i, n) repd(i, 0, n) #define VARNAME(v) #v using P = pair<int, int>; constexpr int MOD = 1000000007; // constexpr int MOD = 998244353; constexpr ll INF = 1e16; #...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define repd(i, a, b) for (int i = a; i < int(b); i++) #define rep(i, n) repd(i, 0, n) #define VARNAME(v) #v using P = pair<int, int>; constexpr int MOD = 1000000007; // constexpr int MOD = 998244353; constexpr ll INF = 1e16; #...
replace
168
169
168
169
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n, ans; cin >> n; for (int i = 1; i <= n; i++) { ans = 0; for (int x = 1; x < 100 && x * x < i; x++) { for (int y = 1; y < 100 && x * x + y * y + x * y < i; y++) { for (int z = 1; z < 100; z++) { if (x * x + y * y + z ...
#include <bits/stdc++.h> using namespace std; int main() { int n, ans; cin >> n; for (int i = 1; i <= n; i++) { ans = 0; for (int x = 1; x < 100 && x * x < i; x++) { for (int y = 1; y <= x && x * x + y * y + x * y < i; y++) { for (int z = 1; z <= y; z++) { if (x * x + y * y + z * ...
replace
9
13
9
19
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int Ull; typedef pair<int, int> PII; template <typename T> inline T read() { char c = getchar(); T x = 0, f = 1; while (!isdigit(c)) { if (c == '-') f = -1; c = getchar(); } while (isdigit(c)) ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int Ull; typedef pair<int, int> PII; template <typename T> inline T read() { char c = getchar(); T x = 0, f = 1; while (!isdigit(c)) { if (c == '-') f = -1; c = getchar(); } while (isdigit(c)) ...
replace
29
33
29
39
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) FOR(i, 0, n) #define all(x) (x).begin(), (x).end() #define YES() printf("YES\n") #define NO() printf("NO\n") #define isYES(x) printf(...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) FOR(i, 0, n) #define all(x) (x).begin(), (x).end() #define YES() printf("YES\n") #define NO() printf("NO\n") #define isYES(x) printf(...
replace
24
37
24
662
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ll l, r, i, j, k, n, m, x; cin >> n; ll ar[1005] = {0}; for (i = 1; i <= 100; i++) { for (j = 1; j <= 100; j++) { for (k = 1; k <= 100; k++) { // cout<<i<<' '<<j<<' '<<k<<endl; ll x = i * i + j * j +...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ll l, r, i, j, k, n, m, x; cin >> n; ll ar[10005] = {0}; for (i = 1; i <= 100; i++) { for (j = 1; j <= 100; j++) { for (k = 1; k <= 100; k++) { // cout<<i<<' '<<j<<' '<<k<<endl; ll x = i * i + j * j ...
replace
6
7
6
7
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ALL(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; for (int i = 1; i < N + 1; i++) { int ANS = 0; for (int j = 1; pow(j, 2) < i; j++) { for (int k = 1; pow(k, 2) < i; k++) { if (p...
#include <bits/stdc++.h> using namespace std; #define ALL(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; for (int i = 1; i < N + 1; i++) { int ANS = 0; for (int j = 1; j * j <= i; j++) { for (int k = 1; (j + k) * (j + k) - j * k <= i; k++) {...
replace
10
20
10
15
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> ans(n + 1, 0); for (int x = 1; x * x <= n; x++) { for (int y = 1; y * y <= n; y++) { for (int z = 1; z * z <= n; z++) { int num = x * x + y * y + z * z + x * y + y * z + z * x; ans[num]++; } ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> ans(1000000, 0); for (int x = 1; x * x <= n; x++) { for (int y = 1; y * y <= n; y++) { for (int z = 1; z * z <= n; z++) { int num = x * x + y * y + z * z + x * y + y * z + z * x; ans[num]++; }...
replace
5
6
5
6
0
p02608
C++
Time Limit Exceeded
#include <stdio.h> #pragma warning(disable : 4996) // prototype int counter(int); int main() { // input int N; (void)scanf("%d", &N); // output for (int i = 1; i <= N; i++) { printf("%d\n", counter(i)); } } int counter(int i) { int count = 0; for (int x = 1; x * x < i; x++) { for (int y = 1;...
#include <stdio.h> #pragma warning(disable : 4996) // prototype int counter(int); int main() { // input int N; (void)scanf("%d", &N); // output for (int i = 1; i <= N; i++) { printf("%d\n", counter(i)); } } int counter(int i) { int count = 0; for (int x = 1; x * (x + 2) <= (i - 3); x++) { fo...
replace
19
22
19
24
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, a, b) for (int i = a; i < b; ++i) #define FORR(i, a, b) for (int i = b - 1; i >= a; --i) #define SORT(v) sort(v.begin(), v.end()) #define SORTR(v) sort(v.rbegin(), v.rend()) #define ...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, a, b) for (int i = a; i < b; ++i) #define FORR(i, a, b) for (int i = b - 1; i >= a; --i) #define SORT(v) sort(v.begin(), v.end()) #define SORTR(v) sort(v.rbegin(), v.rend()) #define ...
replace
28
31
28
31
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; int a[10001] = {0}; for (int i = 1; i * i <= 10050; i++) { for (int j = 1; j * j <= 10050; j++) { for (int k = 1; k * k <= 10050; k++) { ll x = i * i + j * j + k * k + i * j + j * k + k * i; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; int a[10001] = {0}; for (int i = 1; i * i <= 10050; i++) { for (int j = 1; j * j <= 10050; j++) { for (int k = 1; k * k <= 10050; k++) { ll x = i * i + j * j + k * k + i * j + j * k + k * i; ...
replace
11
12
11
12
-6
*** stack smashing detected ***: terminated
p02608
C++
Runtime Error
#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; vector<int> ans(1000000000); for (int i = 1; i < n; i++) { for (int j = 1; j < n; j++) { for (int k = 1; k < n; k++) { an...
#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; vector<int> ans(100000000); for (int i = 1; i <= sqrt(n); i++) { for (int j = 1; j <= sqrt(n); j++) { for (int k = 1; k <= sqrt(n...
replace
9
13
9
13
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define arep(x, n) for (int x : n) using namespace std; int main() { int n; cin >> n; vector<int> ans(n); int max = sqrt(n); // bool over_x, over_y, over_z; int tmp = 0; for (int i = 6; i <= n; i++) { for (int x = 1; x <= max;...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define arep(x, n) for (int x : n) using namespace std; int main() { int n; cin >> n; vector<int> ans(n); int max = sqrt(n); // bool over_x, over_y, over_z; int tmp = 0; for (int i = 6; i <= n; i++) { for (int x = 1; x <= max;...
replace
23
24
23
25
TLE
p02608
C++
Time Limit Exceeded
#include <cmath> #include <iostream> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 1; i <= n; i++) { int c = 0; for (int x = 1; x <= i; x++) { for (int y = 1; y <= i; y++) { // cout << (y + x) * (y + x) - 4 * (-i + x ...
#include <cmath> #include <iostream> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 1; i <= n; i++) { int c = 0; for (int x = 1; x <= sqrt(i); x++) { for (int y = 1; y <= sqrt(i); y++) { // cout << (y + x) * (y + x) - ...
replace
12
14
12
14
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using llong = long long; using ldbl = long double; using lpair = pair<llong, llong>; #define ALL(x) x.begin(), x.end() constexpr llong mod = 1e9 + 7; constexpr llong inf = mod * mod; int main() { llong N; cin >> N; for (llong i = 1; i <= N; ++i) { llong cnt =...
#include <bits/stdc++.h> using namespace std; using llong = long long; using ldbl = long double; using lpair = pair<llong, llong>; #define ALL(x) x.begin(), x.end() constexpr llong mod = 1e9 + 7; constexpr llong inf = mod * mod; int main() { llong N; cin >> N; for (llong i = 1; i <= N; ++i) { llong cnt =...
replace
19
34
19
29
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #define int long long #define ll long long #define sz(a) (int)(a.size()) #define pb push_back #define all(c) c.begin(), c.end() #define tr(it, c) for (auto it = c.begin(); it != c.end(); it++) #define fr(i, a, n) for (int i = a; i < n; i++) #define present(c, x) (c.find(...
#include <bits/stdc++.h> using namespace std; // #define int long long #define ll long long #define sz(a) (int)(a.size()) #define pb push_back #define all(c) c.begin(), c.end() #define tr(it, c) for (auto it = c.begin(); it != c.end(); it++) #define fr(i, a, n) for (int i = a; i < n; i++) #define present(c, x) (c.find(...
replace
79
80
79
80
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02608
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<string, int>; const int INF = 1000000007; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { int cnt = 0; for (int x = 1; x <= sqrt(i); x++) { for (int y = 1...
#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<string, int>; const int INF = 1000000007; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { int cnt = 0; for (int x = 1; x <= sqrt(i); x++) { for (int y = x...
replace
14
18
14
29
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { int ansi = 0; for (int x = 1; x < sqrt(n); x++) { for (int y = x; y < sqrt(n); y++) { for (int z = y; z ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() int main() { int n; cin >> n; vector<int> ans( {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0,...
replace
8
26
8
637
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define mp make_pair #define fi first #define se second #define VAL 100000 #define ll long long #define INF 10000000000000000LL #define pll pair<long long, long long> const int MAX = 1e7 + 9; const ll MOD = 1e9 + 7; const int TOT_PRIMES = 19; const int MAX_A = 70; using namespace std; int main(...
#include <bits/stdc++.h> #define mp make_pair #define fi first #define se second #define VAL 100000 #define ll long long #define INF 10000000000000000LL #define pll pair<long long, long long> const int MAX = 1e7 + 9; const ll MOD = 1e9 + 7; const int TOT_PRIMES = 19; const int MAX_A = 70; using namespace std; int main(...
replace
22
25
22
25
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; ll ans[2001] = {}; int main() { int n_max; cin >> n_max; for (int x = 1; x * x <= n_max; ++x) { for (int y = 1; x * x + y * y + x * y <= n_max; ++y) { for (int z = 1; x * x + y * (x + y) + z * (x + y + z) <= n_max; ++z) { ans[x ...
#include <bits/stdc++.h> using namespace std; using ll = long long; ll ans[10001] = {}; int main() { int n_max; cin >> n_max; for (int x = 1; x * x <= n_max; ++x) { for (int y = 1; x * x + y * y + x * y <= n_max; ++y) { for (int z = 1; x * x + y * (x + y) + z * (x + y + z) <= n_max; ++z) { ans[x...
replace
3
4
3
4
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int X = N / 6 + 1; int F; for (int l = 1; l <= N; l++) { F = 0; for (int i = 1; i <= X; i++) { for (int j = i; j <= X; j++) { for (int k = j; k <= X; k++) { if (i * i + j * j + k * k + i * j + j * k +...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int X = sqrt(N) + 1; int F; for (int l = 1; l <= N; l++) { F = 0; for (int i = 1; i <= X; i++) { for (int j = i; j <= X; j++) { for (int k = j; k <= X; k++) { if (i * i + j * j + k * k + i * j + j * k...
replace
6
7
6
7
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define repr(i, n) for (int i = (int)n - 1; i >= 0; --i) #define ALL(a) (a).begin(), (a).end() using ll = long long; using Graph = vector<vector<int>>; using P = p...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define repr(i, n) for (int i = (int)n - 1; i >= 0; --i) #define ALL(a) (a).begin(), (a).end() using ll = long long; using Graph = vector<vector<int>>; using P = p...
replace
39
40
39
40
TLE
p02608
C++
Runtime Error
#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 <map> #incl...
#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 <map> #incl...
replace
52
53
52
54
-11
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N = 10010; vector<int> vec(N); int n; cin >> n; for (int i = 1; i * i < N; i++) { for (int j = 1; j * j < N; j++) { for (int k = 1; k * k < N; k++) { int a = i * i + j * j + k * k; int b = i * j + j * k + k * i; ...
#include <bits/stdc++.h> using namespace std; int main() { int N = 10010; vector<int> vec(N); int n; cin >> n; for (int i = 1; i * i < N; i++) { for (int j = 1; j * j < N; j++) { for (int k = 1; k * k < N; k++) { int a = i * i + j * j + k * k; int b = i * j + j * k + k * i; ...
replace
13
14
13
14
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 10010) >= this->size() (which is 10010)
p02608
C++
Runtime Error
#include <cstdio> int n, f[1100], data[101][101][101]; void check(int x, int y, int z) { int tmp = x * x + y * y + z * z + x * y + y * z + z * x; if (tmp > n) return; data[x][y][z] = 1; if (!data[x + 1][y][z]) check(x + 1, y, z); if (!data[x][y + 1][z]) check(x, y + 1, z); if (!data[x][y][z + 1]...
#include <cstdio> int n, f[11000], data[101][101][101]; void check(int x, int y, int z) { int tmp = x * x + y * y + z * z + x * y + y * z + z * x; if (tmp > n) return; data[x][y][z] = 1; if (!data[x + 1][y][z]) check(x + 1, y, z); if (!data[x][y + 1][z]) check(x, y + 1, z); if (!data[x][y][z + 1...
replace
1
2
1
2
0
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> count(N, 0); int max; for (int i = 0; i < N; i++) { if (i * i > N) { max = i - 1; break; } } if (N == 1) { max = 1; } // これでmax求まった int value; for (int i = 1; i <= max; i++) { ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> count(N, 0); int max; for (int i = 0; i < N; i++) { if (i * i > N) { max = i - 1; break; } } if (N == 1) { max = 1; } // これでmax求まった int value; for (int i = 1; i <= max; i++) { ...
replace
32
33
32
33
0
p02608
C++
Runtime Error
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var <<...
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var <<...
replace
161
162
161
162
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define codefor \ int test; \ scanf("...
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define codefor \ int test; \ scanf("...
replace
77
91
77
705
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPr(i, n) for (int i = (n)-1; i >= 0; --i) #define FORq(i, m, n) for (int i = (m); i <= (n); ++i) #define FORqr(i, m, n) for (int i = (n); i >= (m); --i) #define M...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPr(i, n) for (int i = (n)-1; i >= 0; --i) #define FORq(i, m, n) for (int i = (m); i <= (n); ++i) #define FORqr(i, m, n) for (int i = (n); i >= (m); --i) #define M...
replace
50
53
50
53
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int t; t = 1; while (t--) { long long n, i, c = 0, x, j, k; map<long long, long long> m; cin >> n; for (i = 1; i <= 1000; i++) { for (j = 1; j <= 1000; j++) { for (k = 1; k <= 1000; k++) { x = i * i + j * j + k * k ...
#include <bits/stdc++.h> using namespace std; int main() { int t; t = 1; while (t--) { long long n, i, c = 0, x, j, k; map<long long, long long> m; cin >> n; for (i = 1; i <= 1000; i++) { for (j = 1; j <= 1000; j++) { for (k = 1; k <= 1000; k++) { x = i * i + j * j + k * k ...
replace
13
15
13
16
TLE
p02608
C++
Time Limit Exceeded
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
insert
83
83
83
85
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool f(int val, int rhs) { bool ok = false; for (int i = 1; i < 100; i++) { if (i * (i + val) == rhs) ok = true; } return ok; } int main() { int N; cin >> N; vector<int> ans(N); vector<vector<bool>> table(200, vector<bool>(1...
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool f(int val, int rhs) { bool ok = false; for (int i = 1; i < 100; i++) { if (i * (i + val) == rhs) ok = true; } return ok; } int main() { int N; cin >> N; vector<int> ans(N); vector<vector<bool>> table(200, vector<bool>(1...
replace
18
20
18
20
-11
p02608
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, m, n) for (int i = m; i < n; ++i) #define FORR(i, m, n) for (int i = m; i >= n; --i) #define ALL(v) (v).begin(), ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, m, n) for (int i = m; i < n; ++i) #define FORR(i, m, n) for (int i = m; i >= n; --i) #define ALL(v) (v).begin(), ...
replace
37
38
37
38
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; // #define int long long #define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i) #define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i) #define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--) #define rreps(i, n)...
#include <bits/stdc++.h> using namespace std; // #define int long long #define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i) #define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i) #define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--) #define rreps(i, n)...
insert
63
63
63
65
TLE
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll fact(int x) { if (x == 1) return 1; else return x * fact(x - 1); } int main() { int n; cin >> n; int rt = sqrt(n) + 1; for (int i = 1; i <= n; i++) { int cnt = 0; for (int x = 1; x <= rt; x++) { for (int y = 1; y ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll fact(int x) { if (x == 1) return 1; else return x * fact(x - 1); } int main() { int n; cin >> n; int rt = sqrt(n) + 1; for (int i = 1; i <= n; i++) { int cnt = 0; for (int x = 1; x <= rt; x++) { for (int y = 1; y ...
replace
22
23
22
24
TLE
p02608
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define dd double #define scl(n) scanf("%lld", &n) #define scd(n) scanf("%lf", &n) #define ptl(n) printf("%lld", n) #define ptd(n) printf("%lf", n) #define nline printf("\n") #define vld vector<ll> #define vbd vector<bool> #define eb emplace_back #define FOR(i, n) for (ll ...
#include <bits/stdc++.h> #define ll long long #define dd double #define scl(n) scanf("%lld", &n) #define scd(n) scanf("%lf", &n) #define ptl(n) printf("%lld", n) #define ptd(n) printf("%lf", n) #define nline printf("\n") #define vld vector<ll> #define vbd vector<bool> #define eb emplace_back #define FOR(i, n) for (ll ...
replace
19
20
19
20
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0)->sync_with_stdio(false); int n; cin >> n; for (int i = 1; i <= n; i++) { int cnt = 0; for (int x = 1; x <= sqrt(n); x++) { for (int y = 1; y <= sqrt(n); y++) { for (int z = 1; z <= sqrt(n); z++) { if (pow(x,...
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0)->sync_with_stdio(false); int n; cin >> n; for (int i = 1; i <= n; i++) { int cnt = 0; for (int x = 1; x <= sqrt(n); x++) { for (int y = 1; y <= sqrt(n); y++) { double d = sqrt(-2 * x * y - 3 * pow(x, 2) - 3 * pow(y, 2...
replace
13
16
13
20
TLE
p02608
C++
Runtime Error
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <stdio.h> #include <vector> using ll = long long int; const int INF = (1 << 30); const ll INFLL = (1ll << 60); const ll MOD = (ll)(1e9 + 7); #define l_ength size void mul_mod(ll &a, ll b) { a *= b; a %= MOD; } void add_mod(ll &a...
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <stdio.h> #include <vector> using ll = long long int; const int INF = (1 << 30); const ll INFLL = (1ll << 60); const ll MOD = (ll)(1e9 + 7); #define l_ength size void mul_mod(ll &a, ll b) { a *= b; a %= MOD; } void add_mod(ll &a...
replace
26
27
26
27
0
p02608
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <climits> #include <cmath> #include <iostream> #include <queue> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; constexpr int64_t MOD = 1e9 + 7; int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int32_t x, y...
#include <algorithm> #include <assert.h> #include <climits> #include <cmath> #include <iostream> #include <queue> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; constexpr int64_t MOD = 1e9 + 7; int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int32_t x, y...
insert
28
28
28
30
0
p02608
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; for (int n = 1; n <= N; ++n) { int ans = 0; for (int x = 1; x <= N; ++x) { if (x * x > n) break; for (int y = 1; y <= N; ++y) { if (y * y > n) break; for (int z = 1; z <= N; ++z) { ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; for (int n = 1; n <= N; ++n) { int ans = 0; for (int x = 1; x <= N; ++x) { if (x * x > n) break; for (int y = 1; y <= N; ++y) { if (y * y > n) break; int b = x + y; int c = x ...
replace
14
21
14
21
TLE