problem_id
stringlengths 6
6
| buggy_code
stringlengths 8
526k
| fixed_code
stringlengths 12
526k
| labels
listlengths 0
15
⌀ | buggy_submission_id
int64 1
1.54M
| fixed_submission_id
int64 2
1.54M
| user_id
stringlengths 10
10
| language
stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
long long max = 0;
cin >> N;
max = N * (N - 1) / 2;
cout << max << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long max = 0;
cin >> N;
max = N * (N - 1) / 2;
cout << max << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,227
| 724,226
|
u099619676
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, max = 0;
cin >> N;
max = N * (N - 1) / 2;
cout << max << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long max = 0;
cin >> N;
max = N * (N - 1) / 2;
cout << max << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,228
| 724,226
|
u099619676
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define PI 3.141592653
#define rep(i, a, n) for (int i = a; i < (int)n; ++i)
#define SZ(x) ((int)(x).size()) // size() unsigned -> int
#define descSort(a) sort(a.begin(), a.end(), std::greater<int>())
using namespace std;
typedef long long ll;
const ll INF = 1e9 + 7;
ll gcd(ll x, ll y) {
if (x % y == 0)
return y;
return gcd(y, x % y);
}
int main(void) {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
#define PI 3.141592653
#define rep(i, a, n) for (int i = a; i < (int)n; ++i)
#define SZ(x) ((int)(x).size()) // size() unsigned -> int
#define descSort(a) sort(a.begin(), a.end(), std::greater<int>())
using namespace std;
typedef long long ll;
const ll INF = 1e9 + 7;
ll gcd(ll x, ll y) {
if (x % y == 0)
return y;
return gcd(y, x % y);
}
int main(void) {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,236
| 724,237
|
u817523595
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int N;
cin >> N;
long long sum = 0;
sum = N * (N - 1) / 2;
cout << sum << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
long long N;
cin >> N;
long long sum = 0;
sum = N * (N - 1) / 2;
cout << sum << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,240
| 724,241
|
u406647332
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
// long long ret = 0;
// for (int i = 1; i <= n-1; i++) ret += i%(i+1);
long long ret = (1 + n) * n / 2 - n;
cout << setprecision(32) << ret << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long ret = (long long)(1 + n) * n / 2 - n;
cout << setprecision(30) << ret << endl;
return 0;
}
|
[
"literal.number.change",
"io.output.change"
] | 724,255
| 724,256
|
u161892443
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
// long long ret = 0;
// for (int i = 1; i <= n-1; i++) ret += i%(i+1);
long long ret = (1 + n) * n / 2 - n;
cout << setprecision(10) << ret << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long ret = (long long)(1 + n) * n / 2 - n;
cout << setprecision(30) << ret << endl;
return 0;
}
|
[
"literal.number.change",
"io.output.change"
] | 724,257
| 724,256
|
u161892443
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define COUT(x) cout << (x) << "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define REP(i, n) for (int i = 0; i < n; i++)
#define YES(x) cout << (x ? "YES" : "NO") << "\n"
#define Yes(x) cout << (x ? "Yes" : "No") << "\n"
#define dump(x) cout << #x << " = " << (x) << "\n"
#define endl "\n"
using G = vector<vector<int>>;
using M = map<int, int>;
using P = pair<int, int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int, vector<int>, greater<int>>;
using V = vector<int>;
using ll = long long;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
IOS;
int n;
cin >> n;
COUT((ll)(n * (n - 1) / 2));
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define COUT(x) cout << (x) << "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define REP(i, n) for (int i = 0; i < n; i++)
#define YES(x) cout << (x ? "YES" : "NO") << "\n"
#define Yes(x) cout << (x ? "Yes" : "No") << "\n"
#define dump(x) cout << #x << " = " << (x) << "\n"
#define endl "\n"
using G = vector<vector<int>>;
using M = map<int, int>;
using P = pair<int, int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int, vector<int>, greater<int>>;
using V = vector<int>;
using ll = long long;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
IOS;
ll n;
cin >> n;
COUT(n * (n - 1) / 2);
return 0;
}
|
[
"variable_declaration.type.change",
"call.arguments.change"
] | 724,268
| 724,269
|
u303884911
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
long long ans = N * (N - 1);
ans /= 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans = N * (N - 1);
ans /= 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,270
| 724,271
|
u251242696
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = N * (N - 1);
ans /= 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans = N * (N - 1);
ans /= 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,272
| 724,271
|
u251242696
|
cpp
|
p02924
|
/*
The Island Was Silent before.
.....
And One day again it became Silent.
*/
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define modd(a, b) ((a + 2 * b) % b)
#define debug(a) cout << #a << ": " << (a) << "\n"
#define ioso ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define rtt cerr << "Time: " << clock() * 1.0 / CLOCKS_PER_SEC << endl;
#define ffe \
freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
int main() {
#ifndef ONLINE_JUDGE
ioso ffe
#endif
ll n;
cin >> n;
ll ans = (((n) * (n - 1)) / 2);
cout << ans << endl;
}
|
/*
The Island Was Silent before.
.....
And One day again it became Silent.
*/
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define modd(a, b) ((a + 2 * b) % b)
#define debug(a) cout << #a << ": " << (a) << "\n"
#define ioso ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define rtt cerr << "Time: " << clock() * 1.0 / CLOCKS_PER_SEC << endl;
#define ffe \
freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
int main() {
#ifndef ONLINE_JUDGE
ioso // ffe
#endif
ll n;
cin >> n;
ll ans = (((n) * (n - 1)) / 2);
cout << ans << endl;
}
|
[] | 724,273
| 724,274
|
u118452388
|
cpp
|
p02924
|
#include "bits/stdc++.h"
using namespace std;
int main() {
int n;
cin >> n;
cout << n * (n + 1) / 2 - n << endl;
return 0;
}
|
#include "bits/stdc++.h"
using namespace std;
int main() {
long long n;
cin >> n;
cout << n * (n + 1) / 2 - n << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,278
| 724,279
|
u948522631
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change"
] | 724,282
| 724,283
|
u476488060
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change"
] | 724,285
| 724,286
|
u602140789
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll = long long;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define MOD 1000000007
const ll INF = 1e18;
template <class T> void show(vector<T> v) {
for (int i = 0; i < v.size(); i++) {
cerr << v[i] << " ";
}
cerr << endl;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
int main(int argc, char const *argv[]) {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll = long long;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define MOD 1000000007
const ll INF = 1e18;
template <class T> void show(vector<T> v) {
for (int i = 0; i < v.size(); i++) {
cerr << v[i] << " ";
}
cerr << endl;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
int main(int argc, char const *argv[]) {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,289
| 724,290
|
u406237526
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
if (n == 1)
cout << 0 << endl;
else
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
long long n;
cin >> n;
if (n == 1)
cout << 0 << endl;
else
cout << (n * (n - 1)) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,295
| 724,296
|
u537835158
|
cpp
|
p02924
|
#include <algorithm>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define SZ(x) (int)(x).size()
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REPR(i, n) for (int i = (n)-1; i >= 0; i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase(unique(ALL(v)), v.end());
typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<bool> vb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 29);
const ll LINF = 1e18;
const double PI = acos(-1);
template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value != 0>::type fill_v(U &u, const V... v) {
u = U(v...);
}
template <typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value == 0>::type fill_v(U &u, const V... v) {
for (auto &e : u)
fill_v<T>(e, v...);
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
ll ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define SZ(x) (int)(x).size()
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REPR(i, n) for (int i = (n)-1; i >= 0; i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase(unique(ALL(v)), v.end());
typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<bool> vb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 29);
const ll LINF = 1e18;
const double PI = acos(-1);
template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value != 0>::type fill_v(U &u, const V... v) {
u = U(v...);
}
template <typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value == 0>::type fill_v(U &u, const V... v) {
for (auto &e : u)
fill_v<T>(e, v...);
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N;
cin >> N;
ll ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,297
| 724,298
|
u137332130
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define vi vector<int>
#define vl vector<long long>
#define vvi vector<vector<int>>
#define vvl vector<vector<ll>>
#define vp vector<P>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPD(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define FORD(i, a, b) for (int i = (int)(a); i >= (int)(b); i--)
#define INF 1e18
#define INFTY 1e9
const int mod = 998244353;
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return true;
}
return false;
}
// cout << fixed << setprecision(10) << y << endl;
struct edge {
int to, cost;
};
vector<vector<edge>> es;
const int MAX_N = 10010;
int main() {
int n;
cin >> n;
ll res = n * (n - 1) / 2;
cout << res << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define vi vector<int>
#define vl vector<long long>
#define vvi vector<vector<int>>
#define vvl vector<vector<ll>>
#define vp vector<P>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPD(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define FORD(i, a, b) for (int i = (int)(a); i >= (int)(b); i--)
#define INF 1e18
#define INFTY 1e9
const int mod = 998244353;
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return true;
}
return false;
}
// cout << fixed << setprecision(10) << y << endl;
struct edge {
int to, cost;
};
vector<vector<edge>> es;
const int MAX_N = 10010;
int main() {
ll n;
cin >> n;
ll res = n * (n - 1) / 2;
cout << res << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,299
| 724,300
|
u037098269
|
cpp
|
p02924
|
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
long long ans;
ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans;
ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,301
| 724,302
|
u037098269
|
cpp
|
p02924
|
#include <iostream>
#include <stdio.h>
//#include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <float.h>
#include <iomanip>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define INF 1e9
#define rep(i, n) for (int i = 0; (i) < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); (i) <= (int)(b); i++)
#define VEC(type, c, n) \
std::vector<type> c(n); \
for (auto &i : c) \
std::cin >> i;
#define vec(type, n) vector<type>(n)
#define vvec(m, n) vector<vector<int>>(int(m), vector<int>(n))
#define ALL(a) (a).begin(), (a).end()
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<char, int>;
int main() {
ll n;
cin >> n;
n--;
ll res = n * (n - 1) / 2;
cout << res << endl;
}
|
#include <iostream>
#include <stdio.h>
//#include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <float.h>
#include <iomanip>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define INF 1e9
#define rep(i, n) for (int i = 0; (i) < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); (i) <= (int)(b); i++)
#define VEC(type, c, n) \
std::vector<type> c(n); \
for (auto &i : c) \
std::cin >> i;
#define vec(type, n) vector<type>(n)
#define vvec(m, n) vector<vector<int>>(int(m), vector<int>(n))
#define ALL(a) (a).begin(), (a).end()
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<char, int>;
int main() {
ll n;
cin >> n;
n--;
ll res = n * (n + 1) / 2;
cout << res << endl;
}
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 724,305
| 724,306
|
u516525290
|
cpp
|
p02924
|
#include <iostream>
#include <stdio.h>
//#include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <float.h>
#include <iomanip>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define INF 1e9
#define rep(i, n) for (int i = 0; (i) < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); (i) <= (int)(b); i++)
#define VEC(type, c, n) \
std::vector<type> c(n); \
for (auto &i : c) \
std::cin >> i;
#define vec(type, n) vector<type>(n)
#define vvec(m, n) vector<vector<int>>(int(m), vector<int>(n))
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
ll res = (n - 1) * n / 2;
cout << res;
}
|
#include <iostream>
#include <stdio.h>
//#include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <float.h>
#include <iomanip>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define INF 1e9
#define rep(i, n) for (int i = 0; (i) < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); (i) <= (int)(b); i++)
#define VEC(type, c, n) \
std::vector<type> c(n); \
for (auto &i : c) \
std::cin >> i;
#define vec(type, n) vector<type>(n)
#define vvec(m, n) vector<vector<int>>(int(m), vector<int>(n))
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int, int>;
int main() {
ll n;
cin >> n;
ll res = (n - 1) * n / 2;
cout << res;
}
|
[
"variable_declaration.type.change"
] | 724,307
| 724,308
|
u516525290
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n * (n + 1) / 2) - n << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
cout << (n * (n + 1) / 2) - n << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,316
| 724,317
|
u145562832
|
cpp
|
p02924
|
/**
* Includes
*/
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
/**
* Macros
*/
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define repx(i, s, e, d) for (int i = s, i##_end = (e); i < i##_end; i += d)
#define repxr(i, s, e, d) for (int i = s, i##_end = (e); i > i##_end; i += d)
#define rept(n) \
for (int ___i___ = 0, i##_len = (n); ___i___ < i##_len; ++___i___)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define CEIL(x, y) (((x) + ((x) > 0 ? (y)-1 : -((y)-1))) / (y))
#define DIST2(x1, y1, x2, y2) ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))
/**
* Standard input helpers
*/
// vector:input
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
// pair:output
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &pair_var) {
os << "(" << pair_var.first << ", " << pair_var.second << ")";
return os;
}
// vector:output
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
os << "{";
for (int i = 0; i < vec.size(); i++) {
os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
}
os << "}";
return os;
}
// map:output
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
os << "{";
repi(itr, map_var) {
os << *itr;
itr++;
if (itr != map_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// set:output
template <typename T> ostream &operator<<(ostream &os, set<T> &set_var) {
os << "{";
repi(itr, set_var) {
os << *itr;
itr++;
if (itr != set_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
/**
* Debug tools
*/
#define DUMPOUT cout
void dump_func() { DUMPOUT << endl; }
template <class Head, class... Tail>
void dump_func(Head &&head, Tail &&...tail) {
DUMPOUT << head;
if (sizeof...(Tail) > 0) {
DUMPOUT << ", ";
}
dump_func(std::move(tail)...);
}
#ifdef LOCAL_
#define dump(...) \
DUMPOUT << " " << string(#__VA_ARGS__) << ": " \
<< "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]" << endl \
<< " ", \
dump_func(__VA_ARGS__)
#else
#define dump(...)
#endif
/**
* Helpers
*/
using lli = long long int;
using ii = pair<int, int>;
using ld = long double;
template <typename T>
using heapq = priority_queue<T, vector<T>, greater<T>>; // implement <
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int exdx[8] = {1, 1, 1, 0, 0, -1, -1, -1};
int exdy[8] = {1, 0, -1, 1, -1, 1, 0, -1};
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
};
} aaaaaaa;
/**
* Libraries
*/
// (paste function or Libraries from ContestLibrary)
/**
* If necessary
*/
// #define int long long int
// #define INF (1e9 + 1)
/**
* Solver
*/
signed main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
/**
* Includes
*/
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
/**
* Macros
*/
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define repx(i, s, e, d) for (int i = s, i##_end = (e); i < i##_end; i += d)
#define repxr(i, s, e, d) for (int i = s, i##_end = (e); i > i##_end; i += d)
#define rept(n) \
for (int ___i___ = 0, i##_len = (n); ___i___ < i##_len; ++___i___)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define CEIL(x, y) (((x) + ((x) > 0 ? (y)-1 : -((y)-1))) / (y))
#define DIST2(x1, y1, x2, y2) ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))
/**
* Standard input helpers
*/
// vector:input
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
// pair:output
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &pair_var) {
os << "(" << pair_var.first << ", " << pair_var.second << ")";
return os;
}
// vector:output
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
os << "{";
for (int i = 0; i < vec.size(); i++) {
os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
}
os << "}";
return os;
}
// map:output
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
os << "{";
repi(itr, map_var) {
os << *itr;
itr++;
if (itr != map_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// set:output
template <typename T> ostream &operator<<(ostream &os, set<T> &set_var) {
os << "{";
repi(itr, set_var) {
os << *itr;
itr++;
if (itr != set_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
/**
* Debug tools
*/
#define DUMPOUT cout
void dump_func() { DUMPOUT << endl; }
template <class Head, class... Tail>
void dump_func(Head &&head, Tail &&...tail) {
DUMPOUT << head;
if (sizeof...(Tail) > 0) {
DUMPOUT << ", ";
}
dump_func(std::move(tail)...);
}
#ifdef LOCAL_
#define dump(...) \
DUMPOUT << " " << string(#__VA_ARGS__) << ": " \
<< "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]" << endl \
<< " ", \
dump_func(__VA_ARGS__)
#else
#define dump(...)
#endif
/**
* Helpers
*/
using lli = long long int;
using ii = pair<int, int>;
using ld = long double;
template <typename T>
using heapq = priority_queue<T, vector<T>, greater<T>>; // implement <
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int exdx[8] = {1, 1, 1, 0, 0, -1, -1, -1};
int exdy[8] = {1, 0, -1, 1, -1, 1, 0, -1};
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
};
} aaaaaaa;
/**
* Libraries
*/
// (paste function or Libraries from ContestLibrary)
/**
* If necessary
*/
// #define int long long int
// #define INF (1e9 + 1)
/**
* Solver
*/
signed main() {
lli N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,318
| 724,319
|
u576106056
|
cpp
|
p02924
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i = ((int)((n)-1)); i >= 0; --i)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; --i)
#define rept(n) \
for (int ___i___ = 0, i##_len = (n); ___i___ < i##_len; ++___i___)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define CEIL(x, y) (((x) + (y)-1) / (y))
// vector
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
// pair
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &pair_var) {
os << "(" << pair_var.first << ", " << pair_var.second << ")";
return os;
}
// vector
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
os << "{";
for (int i = 0; i < vec.size(); i++) {
os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
}
os << "}";
return os;
}
// map
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
os << "{";
repi(itr, map_var) {
os << *itr;
itr++;
if (itr != map_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// set
template <typename T> ostream &operator<<(ostream &os, set<T> &set_var) {
os << "{";
repi(itr, set_var) {
os << *itr;
itr++;
if (itr != set_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
#define DUMPOUT cout
void dump_func() { DUMPOUT << endl; }
template <class Head, class... Tail>
void dump_func(Head &&head, Tail &&...tail) {
DUMPOUT << head;
if (sizeof...(Tail) > 0) {
DUMPOUT << ", ";
}
dump_func(std::move(tail)...);
}
#ifdef LOCAL_
#define dump(...) \
DUMPOUT << " " << string(#__VA_ARGS__) << ": " \
<< "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]" << endl \
<< " ", \
dump_func(__VA_ARGS__)
#else
#define dump(...)
#endif
typedef long long int lli;
typedef pair<int, int> ii;
typedef priority_queue<int, vector<int>, greater<int>> heapq;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
};
} aaaaaaa;
// #define int long long int
// struct S{
// bool operator<(const S& x) const {
// return ;
// }
// };
signed main() {
int N;
cin >> N;
cout << (N + 1) * N / 2 - N << endl;
return 0;
}
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i = ((int)((n)-1)); i >= 0; --i)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; --i)
#define rept(n) \
for (int ___i___ = 0, i##_len = (n); ___i___ < i##_len; ++___i___)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define CEIL(x, y) (((x) + (y)-1) / (y))
// vector
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
// pair
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &pair_var) {
os << "(" << pair_var.first << ", " << pair_var.second << ")";
return os;
}
// vector
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
os << "{";
for (int i = 0; i < vec.size(); i++) {
os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
}
os << "}";
return os;
}
// map
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
os << "{";
repi(itr, map_var) {
os << *itr;
itr++;
if (itr != map_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// set
template <typename T> ostream &operator<<(ostream &os, set<T> &set_var) {
os << "{";
repi(itr, set_var) {
os << *itr;
itr++;
if (itr != set_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
#define DUMPOUT cout
void dump_func() { DUMPOUT << endl; }
template <class Head, class... Tail>
void dump_func(Head &&head, Tail &&...tail) {
DUMPOUT << head;
if (sizeof...(Tail) > 0) {
DUMPOUT << ", ";
}
dump_func(std::move(tail)...);
}
#ifdef LOCAL_
#define dump(...) \
DUMPOUT << " " << string(#__VA_ARGS__) << ": " \
<< "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]" << endl \
<< " ", \
dump_func(__VA_ARGS__)
#else
#define dump(...)
#endif
typedef long long int lli;
typedef pair<int, int> ii;
typedef priority_queue<int, vector<int>, greater<int>> heapq;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
};
} aaaaaaa;
#define int long long int
// struct S{
// bool operator<(const S& x) const {
// return ;
// }
// };
signed main() {
int N;
cin >> N;
cout << (N + 1) * N / 2 - N << endl;
return 0;
}
|
[] | 724,320
| 724,321
|
u576106056
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << '\n';
return 0;
}
|
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << '\n';
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,324
| 724,325
|
u596385287
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define m1(x) memset(x, -1, sizeof(x))
const int INF = 1e9 + 1;
const ll MOD = 1e9 + 7;
const double PI = 3.141592653589793;
int main() {
int n;
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define m1(x) memset(x, -1, sizeof(x))
const int INF = 1e9 + 1;
const ll MOD = 1e9 + 7;
const double PI = 3.141592653589793;
int main() {
ll n;
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,326
| 724,327
|
u317379170
|
cpp
|
p02924
|
#include <iostream>
int main() {
int a;
std::cin >> a;
std::cout << (a - 1) * a / 2 << std::endl;
return 0;
}
|
#include <iostream>
int main() {
long long int a;
std::cin >> a;
std::cout << (a - 1) * a / 2 << std::endl;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,335
| 724,336
|
u122743027
|
cpp
|
p02924
|
#include <iostream>
int main() {
int a;
std::cin >> a;
std::cout << (a + 1) * a / 2 << std::endl;
return 0;
}
|
#include <iostream>
int main() {
long long int a;
std::cin >> a;
std::cout << (a - 1) * a / 2 << std::endl;
return 0;
}
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 724,337
| 724,336
|
u122743027
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define ll long long int
#define booga cout << "booga" << endl
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
using namespace std;
int main(int argc, char **argv) {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
cout << n * (n - 1) / 2 << "\n";
return 0;
}
|
#include <bits/stdc++.h>
#define ll long long int
#define booga cout << "booga" << endl
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
using namespace std;
int main(int argc, char **argv) {
ios::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
cout << n * (n - 1) / 2 << "\n";
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,338
| 724,339
|
u389078199
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define ll long long int
#define booga cout << "booga" << endl
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
using namespace std;
int main(int argc, char **argv) {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
cout << n * (n / 2) << "\n";
return 0;
}
|
#include <bits/stdc++.h>
#define ll long long int
#define booga cout << "booga" << endl
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
using namespace std;
int main(int argc, char **argv) {
ios::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
cout << n * (n - 1) / 2 << "\n";
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,340
| 724,339
|
u389078199
|
cpp
|
p02924
|
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
using namespace std;
long long powerexp(long long base, long long exp, int mod) {
long long res = 1;
while (exp > 0) {
if (exp % 2 == 1)
res = (res * base) % mod;
exp = exp >> 1;
base = (base * base) % mod;
}
return res;
}
int gcd(int a, int b) {
int c = a % b;
while (c != 0) {
a = b;
b = c;
c = a % b;
}
return b;
}
void PrintVector(vector<long long int> v, long long int n) {
for (int i = v.size() - 1; i >= 0; i--) {
cout << v[i] << " ";
}
cout << endl;
}
void Takevector(vector<long long int> &v, long long int n) {
for (long long int i = 0; i < n; i++) {
long long int number;
cin >> number;
v.push_back(number);
}
}
typedef long long int ll;
typedef vector<long long int> vi;
#define sci(x) \
int x; \
scanf("%d", &x);
#define scii(x, y) \
int x, y; \
scanf("%d %d", &x, &y);
#define sciii(x, y, z) \
int x, y, z; \
scanf("%d %d %d", &x, &y, &z);
#define scl(x) \
ll x; \
scanf("%lld", &x);
#define scll(x, y) \
ll x, y; \
scanf("%lld %lld", &x, &y);
#define sclll(x, y, z) \
ll x, y, z; \
scanf("%lld %lld %lld", &x, &y, &z);
#define TC(x) \
sci(x); \
while (x--)
#define rep(i, x, y) for (__typeof(x) i = x; i <= y; i++)
#define repi(i, x, y) for (__typeof(x) i = x; i >= y; i--)
#define fore(itr, x) \
for (__typeof(x.begin()) itr = x.begin(); itr != x.end(); itr++)
#define forei(itr, x) \
for (__typeof(x.end()) itr = x.end() - 1; itr != x.begin() - 1; itr--)
#define nl cout << "\n";
int min(int x, int y) { return (x < y) ? x : y; }
int main() {
int flag = 1;
ll sum = 0;
int flag1 = 0;
ll tot = 0;
int ans = 0;
map<int, int> m;
vi v;
set<int> st;
string s;
sci(n);
if (n == 1) {
cout << 0;
} else {
n--;
ans = n * (n + 1) / 2;
cout << ans;
}
return 0;
}
|
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
using namespace std;
long long powerexp(long long base, long long exp, int mod) {
long long res = 1;
while (exp > 0) {
if (exp % 2 == 1)
res = (res * base) % mod;
exp = exp >> 1;
base = (base * base) % mod;
}
return res;
}
int gcd(int a, int b) {
int c = a % b;
while (c != 0) {
a = b;
b = c;
c = a % b;
}
return b;
}
void PrintVector(vector<long long int> v, long long int n) {
for (int i = v.size() - 1; i >= 0; i--) {
cout << v[i] << " ";
}
cout << endl;
}
void Takevector(vector<long long int> &v, long long int n) {
for (long long int i = 0; i < n; i++) {
long long int number;
cin >> number;
v.push_back(number);
}
}
typedef long long int ll;
typedef vector<long long int> vi;
#define sci(x) \
int x; \
scanf("%d", &x);
#define scii(x, y) \
int x, y; \
scanf("%d %d", &x, &y);
#define sciii(x, y, z) \
int x, y, z; \
scanf("%d %d %d", &x, &y, &z);
#define scl(x) \
ll x; \
scanf("%lld", &x);
#define scll(x, y) \
ll x, y; \
scanf("%lld %lld", &x, &y);
#define sclll(x, y, z) \
ll x, y, z; \
scanf("%lld %lld %lld", &x, &y, &z);
#define TC(x) \
sci(x); \
while (x--)
#define rep(i, x, y) for (__typeof(x) i = x; i <= y; i++)
#define repi(i, x, y) for (__typeof(x) i = x; i >= y; i--)
#define fore(itr, x) \
for (__typeof(x.begin()) itr = x.begin(); itr != x.end(); itr++)
#define forei(itr, x) \
for (__typeof(x.end()) itr = x.end() - 1; itr != x.begin() - 1; itr--)
#define nl cout << "\n";
int min(int x, int y) { return (x < y) ? x : y; }
int main() {
int flag = 1;
ll sum = 0;
int flag1 = 0;
ll tot = 0;
ll ans = 0;
map<int, int> m;
vi v;
set<int> st;
string s;
scl(n);
if (n == 1) {
cout << 0;
} else {
n--;
ans = n * (n + 1) / 2;
cout << ans;
}
return 0;
}
|
[
"variable_declaration.type.change",
"identifier.change",
"call.function.change"
] | 724,349
| 724,350
|
u617339064
|
cpp
|
p02924
|
#include "bits/stdc++.h"
#define sp << " "
#define el << "\n"
#define S second
#define F first
#define mp make_pair
#define pb push_back
#define pf push_front
#define pob pop_back
#define obit __builtin_popcount
#define pof pop_front
#define mod (int)1e9 + 7
#define For(i, a, n) for (i = a; i < n; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned short int us;
typedef short int ss;
typedef long double ld;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
/*
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
//*/
int a;
cin >> a;
cout << (a * (a - 1)) / 2;
return 0;
}
|
#include "bits/stdc++.h"
#define sp << " "
#define el << "\n"
#define S second
#define F first
#define mp make_pair
#define pb push_back
#define pf push_front
#define pob pop_back
#define obit __builtin_popcount
#define pof pop_front
#define mod (int)1e9 + 7
#define For(i, a, n) for (i = a; i < n; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned short int us;
typedef short int ss;
typedef long double ld;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
/*
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
//*/
ll a;
cin >> a;
cout << (a * (a - 1)) / 2;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,351
| 724,352
|
u404899607
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,357
| 724,358
|
u534800382
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
long long n;
int main() {
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,359
| 724,360
|
u270272336
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main(void) {
int N;
cin >> N;
long long ans = (N - 1) * N / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main(void) {
long long N;
cin >> N;
long long ans = (N - 1) * N / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,361
| 724,362
|
u150155436
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vin = vector<int>;
using vll = vector<long long>;
using vvin = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vstr = vector<string>;
using vvstr = vector<vector<string>>;
using vch = vector<char>;
using vvch = vector<vector<char>>;
using vbo = vector<bool>;
using vvbo = vector<vector<bool>>;
using vpii = vector<pair<int, int>>;
using pqsin = priority_queue<int, vector<int>, greater<int>>;
#define mp make_pair
#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 all(v) v.begin(), v.end()
#define decp(n) cout << fixed << setprecision((int)n)
const ll inf = 1e9 + 7;
const ll INF = 1e18;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vin = vector<int>;
using vll = vector<long long>;
using vvin = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vstr = vector<string>;
using vvstr = vector<vector<string>>;
using vch = vector<char>;
using vvch = vector<vector<char>>;
using vbo = vector<bool>;
using vvbo = vector<vector<bool>>;
using vpii = vector<pair<int, int>>;
using pqsin = priority_queue<int, vector<int>, greater<int>>;
#define mp make_pair
#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 all(v) v.begin(), v.end()
#define decp(n) cout << fixed << setprecision((int)n)
const ll inf = 1e9 + 7;
const ll INF = 1e18;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,365
| 724,366
|
u919867411
|
cpp
|
p02924
|
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi = vector<vi>;
const int INF = 100010001;
const ll LINF = (ll)INF * INF * 10;
int main() {
ll n;
cin >> n;
cout << (n + 1) * n / 2 << endl;
}
|
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi = vector<vi>;
const int INF = 100010001;
const ll LINF = (ll)INF * INF * 10;
int main() {
ll n;
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 724,369
| 724,370
|
u802434195
|
cpp
|
p02924
|
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n * (n - 1)) / 2;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
cout << (n * (n - 1)) / 2;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,380
| 724,381
|
u014212625
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second);
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) find(all(v), x) != v.end()
#define incls(s, c) s.find(c) != string::npos
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
scanf("%d", &x);
return x;
}
inline ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
inline char chin() {
char x;
scanf("%c", &x);
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
scanf("%lf", &x);
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const v(T) & a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
int n = in();
cout << (n - 1) * n / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second);
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) find(all(v), x) != v.end()
#define incls(s, c) s.find(c) != string::npos
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
scanf("%d", &x);
return x;
}
inline ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
inline char chin() {
char x;
scanf("%c", &x);
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
scanf("%lf", &x);
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const v(T) & a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
ll n = lin();
cout << (n - 1) * n / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change",
"identifier.change",
"call.function.change"
] | 724,382
| 724,383
|
u850516963
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define REP(i, n) FOR(i, 0, (n))
#define REPS(i, n) FOR(i, 1, (n) + 1)
#define RREP(i, n) RFOR(i, 0, (n))
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define DEBUG(x) cout << #x << " = " << (x) << endl;
#define SORT(x) sort(ALL(x));
#define RSORT(x) sort(RALL(x));
#define SUM(x) accumulate(ALL(x), 0);
#define FI first
#define SE second
#define PB push_back
#define EB emplace_back
#define SZ(x) (int)(x).size()
#define BN(x) ((1 << x) - 1)
#define DUP(x, y) (((x) + (y)-1) / (y))
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const ll mod = 1e9 + 7;
const int INF = (1 << 30) - 1;
const ll INFLL = (1LL << 62) - 1;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
// cout << fixed << setprecision(10);
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
int N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define REP(i, n) FOR(i, 0, (n))
#define REPS(i, n) FOR(i, 1, (n) + 1)
#define RREP(i, n) RFOR(i, 0, (n))
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define DEBUG(x) cout << #x << " = " << (x) << endl;
#define SORT(x) sort(ALL(x));
#define RSORT(x) sort(RALL(x));
#define SUM(x) accumulate(ALL(x), 0);
#define FI first
#define SE second
#define PB push_back
#define EB emplace_back
#define SZ(x) (int)(x).size()
#define BN(x) ((1 << x) - 1)
#define DUP(x, y) (((x) + (y)-1) / (y))
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const ll mod = 1e9 + 7;
const int INF = (1 << 30) - 1;
const ll INFLL = (1LL << 62) - 1;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
// cout << fixed << setprecision(10);
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
ll N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,384
| 724,385
|
u850516963
|
cpp
|
p02924
|
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int ans = 0;
ans = (n - 1) * n / 2;
cout << ans << endl;
}
|
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = 0;
ans = (n - 1) * n / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,392
| 724,393
|
u973971669
|
cpp
|
p02924
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define fori(x) for (int i = 0; i < x; ++i)
#define forj(x) for (int j = 0; j < x; ++j)
typedef long long ll;
const int INF = 2e9 + 5;
const int alength = 100100;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2;
}
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define fori(x) for (int i = 0; i < x; ++i)
#define forj(x) for (int j = 0; j < x; ++j)
typedef long long ll;
const int INF = 2e9 + 5;
const int alength = 100100;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2;
}
|
[
"variable_declaration.type.change"
] | 724,394
| 724,395
|
u344810256
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
cout << n * (n + 1) / 2 << endl;
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 724,396
| 724,397
|
u476027087
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
#define ll long long
using namespace std;
int main() {
int n;
cin >> n;
cout << n * (n + 1) / 2 << endl;
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 724,398
| 724,397
|
u476027087
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
ll x = (N * (N - 1)) / 2;
cout << x << endl;
return 0;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
ll x = (N * (N - 1)) / 2;
cout << x << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,399
| 724,400
|
u859566721
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
cout << (ll)n * (n - 1) / 2 << endl;
}
|
[
"type_conversion.add"
] | 724,413
| 724,414
|
u929569377
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,413
| 724,415
|
u929569377
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define LIMIT 1000000007 // 10^9+7
#define rep(i, n) for (int i = 0; i < (int)n; i++)
/* デバッグ */
#define debug(x) cout << #x << " = " << (x) << endl
#define debug2(x, y) \
cout << "(" << #x << "," << #y << ") = (" << (x) << "," << (y) << ")\n"
int main() {
int N;
cin >> N;
cout << (N * (N - 1) / 2) << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define LIMIT 1000000007 // 10^9+7
#define rep(i, n) for (int i = 0; i < (int)n; i++)
/* デバッグ */
#define debug(x) cout << #x << " = " << (x) << endl
#define debug2(x, y) \
cout << "(" << #x << "," << #y << ") = (" << (x) << "," << (y) << ")\n"
int main() {
ll N;
cin >> N;
cout << (N * (N - 1) / 2) << endl;
}
|
[
"variable_declaration.type.change"
] | 724,423
| 724,424
|
u271743799
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,425
| 724,426
|
u448922807
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
int sum = 0;
sum = N * (N - 1) / 2;
cout << sum << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long sum = 0;
sum = N * (N - 1) / 2;
cout << sum << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,431
| 724,432
|
u468440139
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
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;
}
int main() {
int n;
cin >> n;
ll sum = (1 + n - 1) * (n - 1) / 2;
cout << sum << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
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;
}
int main() {
ll n;
cin >> n;
ll sum = (n) * (n - 1) / 2;
cout << sum << endl;
return 0;
}
|
[
"variable_declaration.type.change",
"expression.operation.binary.remove"
] | 724,435
| 724,436
|
u077104253
|
cpp
|
p02924
|
#include <iostream>
int main() {
int N;
std::cin >> N;
std::cout << N * (N - 1) / 2 << std::endl;
}
|
#include <iostream>
int main() {
long long int N;
std::cin >> N;
std::cout << N * (N - 1) / 2 << std::endl;
}
|
[
"variable_declaration.type.widen.change"
] | 724,437
| 724,438
|
u327750344
|
cpp
|
p02924
|
#include "bits/stdc++.h"
#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 namespace std;
const long long INF = 1LL << 61;
int main() {
int N;
cin >> N;
long long ans = N * (N - 1) / 2;
cout << ans;
}
|
#include "bits/stdc++.h"
#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 namespace std;
const long long INF = 1LL << 61;
int main() {
long long N;
cin >> N;
long long ans = N * (N - 1) / 2;
cout << ans;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,439
| 724,440
|
u289578952
|
cpp
|
p02924
|
#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;
N = N * (N - 1) / 2;
cout << N << endl;
return 0;
}
|
#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() {
ll N;
cin >> N;
N = N * (N - 1) / 2;
cout << N << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,441
| 724,442
|
u109380020
|
cpp
|
p02924
|
#include "bits/stdc++.h"
using namespace std;
int main() {
// 0からN-1の和
int N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
#include "bits/stdc++.h"
using namespace std;
int main() {
// 0からN-1の和
long long N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,450
| 724,451
|
u967106822
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#include <cctype>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define pi 3.1415926535897932384
#define E9 1000000000
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
#include <cctype>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define pi 3.1415926535897932384
#define E9 1000000000
int main() {
int64_t N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change"
] | 724,454
| 724,455
|
u474180590
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
cout << n * (n - 1) / 2;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,456
| 724,457
|
u094861294
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change"
] | 724,458
| 724,459
|
u424542120
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
cout << n * (n - 1) / 2;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,462
| 724,463
|
u515923980
|
cpp
|
p02924
|
#include <algorithm>
#include <cstdio>
#include <queue>
#include <vector>
#define rep(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
int main(void) {
int n;
if (!scanf("%d", &n))
return -1;
int sum = (1 + n) * n / 2 - n;
printf("%d\n", sum);
}
|
#include <algorithm>
#include <cstdio>
#include <queue>
#include <vector>
#define rep(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
int main(void) {
long long int n;
if (!scanf("%lld", &n))
return -1;
long long int sum = (1 + n) * n / 2 - n;
printf("%lld\n", sum);
}
|
[
"literal.string.change",
"control_flow.branch.if.condition.change",
"call.arguments.change",
"io.output.change"
] | 724,468
| 724,469
|
u624645160
|
cpp
|
p02924
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,470
| 724,471
|
u868237899
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
signed main() {
int n;
cin >> n;
cout << n * (n - 1) / 2;
}
|
#include <bits/stdc++.h>
using namespace std;
signed main() {
long long n;
cin >> n;
cout << n * (n - 1) / 2;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,472
| 724,473
|
u443151804
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
signed main() {
int n;
cin >> n;
cout << n * floor((n - 1) / 2);
}
|
#include <bits/stdc++.h>
using namespace std;
signed main() {
long long n;
cin >> n;
cout << n * (n - 1) / 2;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"call.remove",
"call.arguments.change"
] | 724,474
| 724,473
|
u443151804
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i, start, end) for (int i = start; i < (int)(end); ++i)
int main() {
int n;
cin >> n;
ll ans = (n - 1) * n / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i, start, end) for (int i = start; i < (int)(end); ++i)
int main() {
ll n;
cin >> n;
ll ans = (n - 1) * n / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,481
| 724,482
|
u382890689
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
const long long INFLL = 1LL << 60;
const int INFI = 1000000000;
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
const long long INFLL = 1LL << 60;
const int INFI = 1000000000;
int main() {
long long N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,492
| 724,493
|
u583701239
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
//#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = mod * mod;
const int INF_N = 1e+9;
typedef pair<int, int> P;
#define stop \
char nyaa; \
cin >> nyaa;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define per1(i, n) for (int i = n; i >= 1; i--)
#define Rep1(i, sta, n) for (int i = sta; i <= n; i++)
#define all(v) (v).begin(), (v).end()
typedef pair<ll, ll> LP;
typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-12;
const ld pi = acos(-1.0);
// typedef vector<vector<ll>> mat;
typedef vector<int> vec;
//繰り返し二乗法
ll mod_pow(ll a, ll n, ll m) {
ll res = 1;
while (n) {
if (n & 1)
res = res * a % m;
a = a * a % m;
n >>= 1;
}
return res;
}
struct modint {
ll n;
modint() : n(0) { ; }
modint(ll m) : n(m) {
if (n >= mod)
n %= mod;
else if (n < 0)
n = (n % mod + mod) % mod;
}
operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
modint operator+=(modint &a, modint b) {
a.n += b.n;
if (a.n >= mod)
a.n -= mod;
return a;
}
modint operator-=(modint &a, modint b) {
a.n -= b.n;
if (a.n < 0)
a.n += mod;
return a;
}
modint operator*=(modint &a, modint b) {
a.n = ((ll)a.n * b.n) % mod;
return a;
}
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, int n) {
if (n == 0)
return modint(1);
modint res = (a * a) ^ (n / 2);
if (n % 2)
res = res * a;
return res;
}
//逆元(Eucledean algorithm)
ll inv(ll a, ll p) { return (a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p); }
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }
const int max_n = 1 << 18;
modint fact[max_n], factinv[max_n];
void init_f() {
fact[0] = modint(1);
for (int i = 0; i < max_n - 1; i++) {
fact[i + 1] = fact[i] * modint(i + 1);
}
factinv[max_n - 1] = modint(1) / fact[max_n - 1];
for (int i = max_n - 2; i >= 0; i--) {
factinv[i] = factinv[i + 1] * modint(i + 1);
}
}
modint comb(int a, int b) {
if (a < 0 || b < 0 || a < b)
return 0;
return fact[a] * factinv[b] * factinv[a - b];
}
using mP = pair<modint, modint>;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
void solve() {
int N;
cin >> N;
ll res = 0;
if (N != 1) {
res = N * (N - 1) / 2;
}
cout << res << endl;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
// cout << fixed << setprecision(10);
// init_f();
// init();
// int t; cin >> t; rep(i, t)solve();
solve();
// stop
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
//#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = mod * mod;
const int INF_N = 1e+9;
typedef pair<int, int> P;
#define stop \
char nyaa; \
cin >> nyaa;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define per1(i, n) for (int i = n; i >= 1; i--)
#define Rep1(i, sta, n) for (int i = sta; i <= n; i++)
#define all(v) (v).begin(), (v).end()
typedef pair<ll, ll> LP;
typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-12;
const ld pi = acos(-1.0);
// typedef vector<vector<ll>> mat;
typedef vector<int> vec;
//繰り返し二乗法
ll mod_pow(ll a, ll n, ll m) {
ll res = 1;
while (n) {
if (n & 1)
res = res * a % m;
a = a * a % m;
n >>= 1;
}
return res;
}
struct modint {
ll n;
modint() : n(0) { ; }
modint(ll m) : n(m) {
if (n >= mod)
n %= mod;
else if (n < 0)
n = (n % mod + mod) % mod;
}
operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
modint operator+=(modint &a, modint b) {
a.n += b.n;
if (a.n >= mod)
a.n -= mod;
return a;
}
modint operator-=(modint &a, modint b) {
a.n -= b.n;
if (a.n < 0)
a.n += mod;
return a;
}
modint operator*=(modint &a, modint b) {
a.n = ((ll)a.n * b.n) % mod;
return a;
}
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, int n) {
if (n == 0)
return modint(1);
modint res = (a * a) ^ (n / 2);
if (n % 2)
res = res * a;
return res;
}
//逆元(Eucledean algorithm)
ll inv(ll a, ll p) { return (a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p); }
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }
const int max_n = 1 << 18;
modint fact[max_n], factinv[max_n];
void init_f() {
fact[0] = modint(1);
for (int i = 0; i < max_n - 1; i++) {
fact[i + 1] = fact[i] * modint(i + 1);
}
factinv[max_n - 1] = modint(1) / fact[max_n - 1];
for (int i = max_n - 2; i >= 0; i--) {
factinv[i] = factinv[i + 1] * modint(i + 1);
}
}
modint comb(int a, int b) {
if (a < 0 || b < 0 || a < b)
return 0;
return fact[a] * factinv[b] * factinv[a - b];
}
using mP = pair<modint, modint>;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
void solve() {
ll N;
cin >> N;
ll res = 0;
if (N != 1) {
res = N * (N - 1) / 2;
}
cout << res << endl;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
// cout << fixed << setprecision(10);
// init_f();
// init();
// int t; cin >> t; rep(i, t)solve();
solve();
// stop
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,494
| 724,495
|
u132371041
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pi 3.14159265359
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pi 3.14159265359
int main() {
ll N;
cin >> N;
cout << (N * (N - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,496
| 724,497
|
u160347785
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_ll(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
typedef long long ll;
typedef unsigned long long u_ll;
typedef pair<int, int> pair_;
const long double PI = (acos(-1));
const int INF = 1001001001;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
ll n;
cin >> n;
/*int test=0;
int root_n = sqrt(n);
for(int i = 2; i<root_n; i++){
if(n%i==0) {
test=i;
break;
}
else continue;
}*/
cout << 0.5 * n * (n - 1);
return 0;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_ll(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
typedef long long ll;
typedef unsigned long long u_ll;
typedef pair<int, int> pair_;
const long double PI = (acos(-1));
const int INF = 1001001001;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
ll n;
cin >> n;
/*int test=0;
int root_n = sqrt(n);
for(int i = 2; i<root_n; i++){
if(n%i==0) {
test=i;
break;
}
else continue;
}*/
cout << n * (n - 1) / 2;
return 0;
}
|
[
"expression.operation.binary.remove"
] | 724,500
| 724,501
|
u364076769
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
cout << (n + (n - 1)) / 2;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
cout << (n * (n - 1)) / 2;
}
|
[
"expression.operator.arithmetic.change",
"io.output.change"
] | 724,504
| 724,505
|
u297195722
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
int main() {
int n;
cin >> n;
ll sum = n * (n / 2);
co(sum);
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
int main() {
ll n;
cin >> n;
ll sum = n * (n - 1) / 2;
co(sum);
}
|
[
"variable_declaration.type.change"
] | 724,508
| 724,509
|
u789075914
|
cpp
|
p02924
|
#include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_ASC;
typedef priority_queue<PII> PQ_DESC_PII;
typedef priority_queue<PII, vector<PII>, greater<PII>> PQ_ASC_PII;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef vector<VVLL> VVVLL;
#define SORT_ASC(c) sort((c).begin(), (c).end())
#define SORT_DESC(c) \
sort((c).begin(), (c).end(), greater<typeof((c).begin())>())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define FORL(i, a, b) for (LL i = (a); i < (b); ++i)
#define REPL(i, n) FORL(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
const double EPS = 1e-10;
const double PI = acos(-1.0);
// debug func
template <typename T> void vprint(vector<T> v) {
for (auto x : v) {
cerr << x << " ";
}
cerr << endl;
}
template <typename T> void vvprint(vector<vector<T>> vv) {
REP(i, vv.size()) {
REP(j, vv[i].size()) { cerr << vv[i][j] << " "; }
cerr << endl;
}
}
template <typename Iterator>
inline bool next_combination(const Iterator first, Iterator k,
const Iterator last) {
/* Credits: Thomas Draper */
if ((first == last) || (first == k) || (last == k))
return false;
Iterator itr1 = first;
Iterator itr2 = last;
++itr1;
if (last == itr1)
return false;
itr1 = last;
--itr1;
itr1 = k;
--itr2;
while (first != itr1) {
if (*--itr1 < *itr2) {
Iterator j = k;
while (!(*itr1 < *j))
++j;
iter_swap(itr1, j);
++itr1;
++j;
itr2 = k;
rotate(itr1, j, last);
while (last != j) {
++j;
++itr2;
}
rotate(k, itr2, last);
return true;
}
}
rotate(first, k, last);
return false;
}
inline double get_time_sec(void) {
return static_cast<double>(chrono::duration_cast<chrono::nanoseconds>(
chrono::steady_clock::now().time_since_epoch())
.count()) /
1000000000;
}
template <typename T> T gcd(T a, T b) {
if (a > b)
swap(a, b);
if (a == 0)
return b;
else
return gcd(b % a, a);
}
template <typename T> T lcm(T a, T b) { return (a / gcd(a, b)) * b; }
template <typename T> map<T, T> prime_list(T n) {
map<T, T> ret;
for (T i = 2; i * i <= n; i++) {
if (n % i == 0) {
ret[i] = 0;
while (n % i == 0) {
n /= i;
ret[i]++;
}
}
}
if (n != 1)
ret[n]++;
return ret;
}
#define MOD 1000000007
LL mypow(LL a, LL n) {
if (n == 0)
return 1;
if (n == 1)
return a % MOD;
if (n % 2 == 1)
return (a * mypow(a, n - 1)) % MOD;
LL t = mypow(a, n / 2);
return (t * t) % MOD;
}
LL mycomb(LL n, LL k) {
if (n == 0 || n == k)
return 1;
LL x = 1, y = 1;
REP(i, k) {
x = x * (n - i) % MOD;
y = y * (i + 1) % MOD;
}
return x * mypow(y, MOD - 2) % MOD;
}
#define INF 1e8
int main(void) {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_ASC;
typedef priority_queue<PII> PQ_DESC_PII;
typedef priority_queue<PII, vector<PII>, greater<PII>> PQ_ASC_PII;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef vector<VVLL> VVVLL;
#define SORT_ASC(c) sort((c).begin(), (c).end())
#define SORT_DESC(c) \
sort((c).begin(), (c).end(), greater<typeof((c).begin())>())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define FORL(i, a, b) for (LL i = (a); i < (b); ++i)
#define REPL(i, n) FORL(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
const double EPS = 1e-10;
const double PI = acos(-1.0);
// debug func
template <typename T> void vprint(vector<T> v) {
for (auto x : v) {
cerr << x << " ";
}
cerr << endl;
}
template <typename T> void vvprint(vector<vector<T>> vv) {
REP(i, vv.size()) {
REP(j, vv[i].size()) { cerr << vv[i][j] << " "; }
cerr << endl;
}
}
template <typename Iterator>
inline bool next_combination(const Iterator first, Iterator k,
const Iterator last) {
/* Credits: Thomas Draper */
if ((first == last) || (first == k) || (last == k))
return false;
Iterator itr1 = first;
Iterator itr2 = last;
++itr1;
if (last == itr1)
return false;
itr1 = last;
--itr1;
itr1 = k;
--itr2;
while (first != itr1) {
if (*--itr1 < *itr2) {
Iterator j = k;
while (!(*itr1 < *j))
++j;
iter_swap(itr1, j);
++itr1;
++j;
itr2 = k;
rotate(itr1, j, last);
while (last != j) {
++j;
++itr2;
}
rotate(k, itr2, last);
return true;
}
}
rotate(first, k, last);
return false;
}
inline double get_time_sec(void) {
return static_cast<double>(chrono::duration_cast<chrono::nanoseconds>(
chrono::steady_clock::now().time_since_epoch())
.count()) /
1000000000;
}
template <typename T> T gcd(T a, T b) {
if (a > b)
swap(a, b);
if (a == 0)
return b;
else
return gcd(b % a, a);
}
template <typename T> T lcm(T a, T b) { return (a / gcd(a, b)) * b; }
template <typename T> map<T, T> prime_list(T n) {
map<T, T> ret;
for (T i = 2; i * i <= n; i++) {
if (n % i == 0) {
ret[i] = 0;
while (n % i == 0) {
n /= i;
ret[i]++;
}
}
}
if (n != 1)
ret[n]++;
return ret;
}
#define MOD 1000000007
LL mypow(LL a, LL n) {
if (n == 0)
return 1;
if (n == 1)
return a % MOD;
if (n % 2 == 1)
return (a * mypow(a, n - 1)) % MOD;
LL t = mypow(a, n / 2);
return (t * t) % MOD;
}
LL mycomb(LL n, LL k) {
if (n == 0 || n == k)
return 1;
LL x = 1, y = 1;
REP(i, k) {
x = x * (n - i) % MOD;
y = y * (i + 1) % MOD;
}
return x * mypow(y, MOD - 2) % MOD;
}
#define INF 1e8
int main(void) {
LL n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,510
| 724,511
|
u637983859
|
cpp
|
p02924
|
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
template <typename T> void vecprint(vector<T> v) {
for (auto x : v) {
cout << x << " ";
}
cout << endl;
}
template <typename T> void qprint(priority_queue<T> q) {
while (!q.empty()) {
cout << q.top() << " ";
q.pop();
}
cout << endl;
}
int main(void) {
int n;
cin >> n;
cout << (n * (n - 1) / 2) << endl;
}
|
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
template <typename T> void vecprint(vector<T> v) {
for (auto x : v) {
cout << x << " ";
}
cout << endl;
}
template <typename T> void qprint(priority_queue<T> q) {
while (!q.empty()) {
cout << q.top() << " ";
q.pop();
}
cout << endl;
}
int main(void) {
ll n;
cin >> n;
cout << (n * (n - 1) / 2) << endl;
}
|
[
"variable_declaration.type.change"
] | 724,512
| 724,513
|
u637983859
|
cpp
|
p02924
|
#include "bits/stdc++.h"
#define rep(i, j) for (long long i = j; i > 0; i--)
using namespace std;
int main() {
int n;
cin >> n;
long long ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include "bits/stdc++.h"
#define rep(i, j) for (long long i = j; i > 0; i--)
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,523
| 724,524
|
u616794313
|
cpp
|
p02924
|
#include "bits/stdc++.h"
#define rep(i, j) for (long long i = j; i > 0; i--)
using namespace std;
int main() {
int n;
cin >> n;
int ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include "bits/stdc++.h"
#define rep(i, j) for (long long i = j; i > 0; i--)
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,526
| 724,524
|
u616794313
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int N;
signed main() {
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
long long N;
signed main() {
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,527
| 724,528
|
u934469795
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
typedef int64_t Int;
int main() {
int N, ans;
cin >> N;
ans = N * (N - 1) / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
typedef int64_t Int;
int main() {
Int N, ans;
cin >> N;
ans = N * (N - 1) / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.change"
] | 724,529
| 724,530
|
u527311983
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define repp(i, n) for (int i = 1; i <= n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define pb push_back
#define mp make_pair
#define riverse(v) reverse((v).begin(), (v).end())
using vi = vector<int>;
using vs = vector<string>;
using vvi = vector<vi>;
using vll = vector<ll>;
const int MOD = 1e9 + 7;
vi alphabet = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int main() {
int N;
cin >> N;
ll ans = N * (N - 1);
cout << ans / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define repp(i, n) for (int i = 1; i <= n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define pb push_back
#define mp make_pair
#define riverse(v) reverse((v).begin(), (v).end())
using vi = vector<int>;
using vs = vector<string>;
using vvi = vector<vi>;
using vll = vector<ll>;
const int MOD = 1e9 + 7;
vi alphabet = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int main() {
ll N;
cin >> N;
ll ans = N * (N - 1);
cout << ans / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,538
| 724,539
|
u587801819
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,540
| 724,541
|
u202813867
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
//最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
//出力系
#define print(x) cout << x << endl
#define prints(x) cout << fixed << setprecision(10) << x << endl
#define printc(x) cout << setw(2) << setfill('0') << x << endl;
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
// begin() end()
#define all(x) (x).begin(), (x).end()
// for
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
//最大公約数
unsigned gcd(unsigned a, unsigned b) {
if (a < b)
return gcd(b, a);
unsigned r;
while ((r = a % b)) {
a = b;
b = r;
}
return b;
}
// 最小公倍数
unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; }
// a = max(a, b), a = min(a, b)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
// 階乗(MODをとる)
ll pow_mod(ll num, ll pow, ll mod) {
ll prod = 1;
num %= mod;
while (pow > 0) {
if (pow & 1)
prod = prod * num % mod;
num = num * num % mod;
pow >>= 1;
}
return prod;
}
// 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度)
// COMinit()
// COM(x, y)
// とコンビで使う
// テーブルを作る前処理
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
// int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
struct UnionFind {
vector<int> par;
vector<int> rank;
vector<ll> Size;
UnionFind(int n = 1) { init(n); }
void init(int n = 1) {
par.resize(n + 1);
rank.resize(n + 1);
Size.resize(n + 1);
for (int i = 0; i <= n; ++i)
par[i] = i, rank[i] = 0, Size[i] = 1;
}
int root(int x) {
if (par[x] == x) {
return x;
} else {
int r = root(par[x]);
return par[x] = r;
}
}
bool issame(int x, int y) { return root(x) == root(y); }
bool merge(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return false;
if (rank[x] < rank[y])
swap(x, y);
if (rank[x] == rank[y])
++rank[x];
par[y] = x;
Size[x] += Size[y];
return true;
}
ll size(int x) { return Size[root(x)]; }
};
#define rrep(i, a, b) for (int i = (a); i > (b); i--)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
struct Mint {
int val;
Mint inv() const {
int tmp, a = val, b = mod, x = 1, y = 0;
while (b)
tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y);
return Mint(x);
}
public:
Mint() : val(0) {}
Mint(ll x) {
if ((val = x % mod) < 0)
val += mod;
}
Mint pow(ll t) {
Mint res = 1, b = *this;
while (t) {
if (t & 1)
res *= b;
b *= b;
t >>= 1;
}
return res;
}
Mint &operator+=(const Mint &x) {
if ((val += x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator-=(const Mint &x) {
if ((val += mod - x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator*=(const Mint &x) {
val = (ll)val * x.val % mod;
return *this;
}
Mint &operator/=(const Mint &x) { return *this *= x.inv(); }
bool operator==(const Mint &x) const { return val == x.val; }
bool operator!=(const Mint &x) const { return val != x.val; }
bool operator<(const Mint &x) const { return val < x.val; }
bool operator<=(const Mint &x) const { return val <= x.val; }
bool operator>(const Mint &x) const { return val > x.val; }
bool operator>=(const Mint &x) const { return val >= x.val; }
Mint operator+(const Mint &x) const { return Mint(*this) += x; }
Mint operator-(const Mint &x) const { return Mint(*this) -= x; }
Mint operator*(const Mint &x) const { return Mint(*this) *= x; }
Mint operator/(const Mint &x) const { return Mint(*this) /= x; }
};
struct factorial {
vector<Mint> Fact, Finv;
public:
factorial(int maxx) {
Fact.resize(maxx + 1), Finv.resize(maxx + 1);
Fact[0] = Mint(1);
rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1);
Finv[maxx] = Mint(1) / Fact[maxx];
rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i;
}
Mint fact(int n, bool inv = 0) {
if (inv)
return Finv[n];
else
return Fact[n];
}
Mint nPr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[n - r];
}
Mint nCr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[r] * Finv[n - r];
}
};
ll modfact(ll n) {
if (n <= 1)
return 1;
return (n * modfact(n - 1)) % MOD;
}
int main() {
int n;
cin >> n;
ll ans = n * (n - 1) / 2;
print(ans);
}
|
#include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
//最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
//出力系
#define print(x) cout << x << endl
#define prints(x) cout << fixed << setprecision(10) << x << endl
#define printc(x) cout << setw(2) << setfill('0') << x << endl;
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
// begin() end()
#define all(x) (x).begin(), (x).end()
// for
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
//最大公約数
unsigned gcd(unsigned a, unsigned b) {
if (a < b)
return gcd(b, a);
unsigned r;
while ((r = a % b)) {
a = b;
b = r;
}
return b;
}
// 最小公倍数
unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; }
// a = max(a, b), a = min(a, b)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
// 階乗(MODをとる)
ll pow_mod(ll num, ll pow, ll mod) {
ll prod = 1;
num %= mod;
while (pow > 0) {
if (pow & 1)
prod = prod * num % mod;
num = num * num % mod;
pow >>= 1;
}
return prod;
}
// 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度)
// COMinit()
// COM(x, y)
// とコンビで使う
// テーブルを作る前処理
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
// int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
struct UnionFind {
vector<int> par;
vector<int> rank;
vector<ll> Size;
UnionFind(int n = 1) { init(n); }
void init(int n = 1) {
par.resize(n + 1);
rank.resize(n + 1);
Size.resize(n + 1);
for (int i = 0; i <= n; ++i)
par[i] = i, rank[i] = 0, Size[i] = 1;
}
int root(int x) {
if (par[x] == x) {
return x;
} else {
int r = root(par[x]);
return par[x] = r;
}
}
bool issame(int x, int y) { return root(x) == root(y); }
bool merge(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return false;
if (rank[x] < rank[y])
swap(x, y);
if (rank[x] == rank[y])
++rank[x];
par[y] = x;
Size[x] += Size[y];
return true;
}
ll size(int x) { return Size[root(x)]; }
};
#define rrep(i, a, b) for (int i = (a); i > (b); i--)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
struct Mint {
int val;
Mint inv() const {
int tmp, a = val, b = mod, x = 1, y = 0;
while (b)
tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y);
return Mint(x);
}
public:
Mint() : val(0) {}
Mint(ll x) {
if ((val = x % mod) < 0)
val += mod;
}
Mint pow(ll t) {
Mint res = 1, b = *this;
while (t) {
if (t & 1)
res *= b;
b *= b;
t >>= 1;
}
return res;
}
Mint &operator+=(const Mint &x) {
if ((val += x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator-=(const Mint &x) {
if ((val += mod - x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator*=(const Mint &x) {
val = (ll)val * x.val % mod;
return *this;
}
Mint &operator/=(const Mint &x) { return *this *= x.inv(); }
bool operator==(const Mint &x) const { return val == x.val; }
bool operator!=(const Mint &x) const { return val != x.val; }
bool operator<(const Mint &x) const { return val < x.val; }
bool operator<=(const Mint &x) const { return val <= x.val; }
bool operator>(const Mint &x) const { return val > x.val; }
bool operator>=(const Mint &x) const { return val >= x.val; }
Mint operator+(const Mint &x) const { return Mint(*this) += x; }
Mint operator-(const Mint &x) const { return Mint(*this) -= x; }
Mint operator*(const Mint &x) const { return Mint(*this) *= x; }
Mint operator/(const Mint &x) const { return Mint(*this) /= x; }
};
struct factorial {
vector<Mint> Fact, Finv;
public:
factorial(int maxx) {
Fact.resize(maxx + 1), Finv.resize(maxx + 1);
Fact[0] = Mint(1);
rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1);
Finv[maxx] = Mint(1) / Fact[maxx];
rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i;
}
Mint fact(int n, bool inv = 0) {
if (inv)
return Finv[n];
else
return Fact[n];
}
Mint nPr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[n - r];
}
Mint nCr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[r] * Finv[n - r];
}
};
ll modfact(ll n) {
if (n <= 1)
return 1;
return (n * modfact(n - 1)) % MOD;
}
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
print(ans);
}
|
[
"variable_declaration.type.change"
] | 724,542
| 724,543
|
u832995587
|
cpp
|
p02924
|
#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--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
#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--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
cout << ((N - 1) * N) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,549
| 724,550
|
u135626132
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF (int)1e9 + 7
#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 vi vector<int>
#define vl vector<ll>
#define vii vector<vector<int>>
#define vll vector<vector<long long>>
#define pii pair<int, int>
#define pll pair<long, long>
#define vpii vector<pii>
#define vpll vector<pll>
#define N 100005
#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795
ll f(ll a) {
ll cnt = 0, i;
if (a == 2)
return 1;
for (i = 2; i * i < a; i++) {
if (a % i == 0)
cnt += 2;
}
if (i * i == a)
cnt++;
return cnt;
}
// vl a(1001);
ll powM(ll a, ll b, ll m) {
ll ans = 1;
while (b > 0) {
if (b & 1)
ans = ans * a % m;
a = a * a % m;
b >>= 1;
}
return ans % m;
}
ll g(ll a, ll n) {
if (a < 0)
return ((a % n) + n) % n;
else
return a % n;
}
char A[51][51] = {0};
char B[51][51] = {0};
ll solve(ll x, ll y, ll na, ll ma, ll nb, ll mb) {
ll cnt = 0;
for (int i = 1; i <= na; i++) {
// ll temp1=x+i;
if (x + i <= 0)
continue;
else if (x + i > nb)
break;
else {
for (int j = 1; j <= ma; j++) {
if (y + j <= 0)
continue;
else if (y + j > mb)
break;
else {
cnt += A[i][j] == '1' && B[i + x][j + y] == '1';
}
}
}
}
return cnt;
}
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1);
n /= 2;
cout << ans << "\n";
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF (int)1e9 + 7
#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 vi vector<int>
#define vl vector<ll>
#define vii vector<vector<int>>
#define vll vector<vector<long long>>
#define pii pair<int, int>
#define pll pair<long, long>
#define vpii vector<pii>
#define vpll vector<pll>
#define N 100005
#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795
ll f(ll a) {
ll cnt = 0, i;
if (a == 2)
return 1;
for (i = 2; i * i < a; i++) {
if (a % i == 0)
cnt += 2;
}
if (i * i == a)
cnt++;
return cnt;
}
// vl a(1001);
ll powM(ll a, ll b, ll m) {
ll ans = 1;
while (b > 0) {
if (b & 1)
ans = ans * a % m;
a = a * a % m;
b >>= 1;
}
return ans % m;
}
ll g(ll a, ll n) {
if (a < 0)
return ((a % n) + n) % n;
else
return a % n;
}
char A[51][51] = {0};
char B[51][51] = {0};
ll solve(ll x, ll y, ll na, ll ma, ll nb, ll mb) {
ll cnt = 0;
for (int i = 1; i <= na; i++) {
// ll temp1=x+i;
if (x + i <= 0)
continue;
else if (x + i > nb)
break;
else {
for (int j = 1; j <= ma; j++) {
if (y + j <= 0)
continue;
else if (y + j > mb)
break;
else {
cnt += A[i][j] == '1' && B[i + x][j + y] == '1';
}
}
}
}
return cnt;
}
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1);
ans /= 2;
cout << ans << "\n";
return 0;
}
|
[
"assignment.variable.change",
"identifier.change"
] | 724,553
| 724,554
|
u499675841
|
cpp
|
p02924
|
#include <iostream>
using namespace std;
int main(void) {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
#include <iostream>
typedef long long ll;
using namespace std;
int main(void) {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,561
| 724,562
|
u998349161
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,563
| 724,564
|
u455696572
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i <= (int)(n); i++)
#define repi(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define uniqueV(x) \
sort(x.begin(), x.end()); \
x.erase(unique(x.begin(), x.end()), x.end());
#define debug(x) cerr << #x << ": " << x << '\n'
#define debug2(x, y) \
cerr << "(" << #x << ", " << #y << ") = " \
<< "(" << x << ", " << y << ")" << '\n'
typedef long long int ll;
typedef pair<int, int> P;
const long long INF = 3e18 + 12;
const int inf = 1e9;
// ----------------------------------------------
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i <= (int)(n); i++)
#define repi(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define uniqueV(x) \
sort(x.begin(), x.end()); \
x.erase(unique(x.begin(), x.end()), x.end());
#define debug(x) cerr << #x << ": " << x << '\n'
#define debug2(x, y) \
cerr << "(" << #x << ", " << #y << ") = " \
<< "(" << x << ", " << y << ")" << '\n'
typedef long long int ll;
typedef pair<int, int> P;
const long long INF = 3e18 + 12;
const int inf = 1e9;
// ----------------------------------------------
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,568
| 724,569
|
u099184991
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define INF 1e9
#define MAXN 100005
#define MAXM 100005
#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define pii pair<int, int>
ll ans = 0;
int N;
void solve() {
ans = N * (N - 1) / 2;
cout << ans << endl;
}
int main() {
cin >> N;
solve();
}
|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define INF 1e9
#define MAXN 100005
#define MAXM 100005
#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define pii pair<int, int>
ll ans = 0;
ll N;
void solve() {
ans = N * (N - 1) / 2;
cout << ans << endl;
}
int main() {
cin >> N;
solve();
}
|
[
"variable_declaration.type.change"
] | 724,570
| 724,571
|
u718394671
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
ll sum = 0;
sum = n * (n - 1) / 2;
cout << sum << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
ll sum = 0;
sum = n * (n - 1) / 2;
cout << sum << endl;
}
|
[
"variable_declaration.type.change"
] | 724,579
| 724,580
|
u497418592
|
cpp
|
p02924
|
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,581
| 724,582
|
u828593789
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define lli long long int
#define MODV 1000000007
#define INF INT_MAX // 2147483647
#define INFLL LLONG_MAX // 9223372036854775807
#define rep(i, n) for (lli i = 0, i##_len = (lli)(n); i < i##_len; i++)
#define repf(i, n) for (lli i = 1, i##_len = (lli)(n + 1); i < i##_len; i++)
#define per(i, n) for (lli i = ((lli)(n)) - 1; i >= 0; i--)
#define perf(i, n) for (lli i = ((lli)(n)); i > 0; i--)
#define all(v) v.begin(), v.end()
#define endl "\n"
#define vi vector<lli>
#define vvi vector<vector<lli>>
#define Yes() cout << "Yes" << endl
#define YES() cout << "YES" << endl
#define No() cout << "No" << endl
#define NO() cout << "NO" << endl
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(0);
lli n;
cin >> n;
cout << (n * (n - 1.0) / 2.0) << endl;
}
|
#include <bits/stdc++.h>
#define lli long long int
#define MODV 1000000007
#define INF INT_MAX // 2147483647
#define INFLL LLONG_MAX // 9223372036854775807
#define rep(i, n) for (lli i = 0, i##_len = (lli)(n); i < i##_len; i++)
#define repf(i, n) for (lli i = 1, i##_len = (lli)(n + 1); i < i##_len; i++)
#define per(i, n) for (lli i = ((lli)(n)) - 1; i >= 0; i--)
#define perf(i, n) for (lli i = ((lli)(n)); i > 0; i--)
#define all(v) v.begin(), v.end()
#define endl "\n"
#define vi vector<lli>
#define vvi vector<vector<lli>>
#define Yes() cout << "Yes" << endl
#define YES() cout << "YES" << endl
#define No() cout << "No" << endl
#define NO() cout << "NO" << endl
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(10);
lli n;
cin >> n;
cout << (n * (n - 1) / 2) << endl;
}
|
[
"literal.number.change",
"io.output.change"
] | 724,583
| 724,584
|
u548791035
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;
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;
}
const ll MOD = 1000000007;
const int INF = 1 << 30;
// const ll INF = (ll)1e18 + 1;
int main() {
int N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
#include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;
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;
}
const ll MOD = 1000000007;
const int INF = 1 << 30;
// const ll INF = (ll)1e18 + 1;
int main() {
ll N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,593
| 724,594
|
u952081880
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repp(i, a, n) for (int i = a; i < (int)(n); i++)
typedef pair<int, int> P;
int main() {
int n;
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repp(i, a, n) for (int i = a; i < (int)(n); i++)
typedef pair<int, int> P;
int main() {
ll n;
cin >> n;
cout << ((n - 1) * n) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,595
| 724,596
|
u872158847
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define All(a) a.begin(), a.end()
#define INF 1000000007
const int MOD = 1000000007;
// accumulate(vec.begin(), vec.end(), 0)
int gcd(int x, int y) {
if (x % y == 0)
return y;
else
return gcd(y, x % y);
}
bool isPrime(int n) {
if (n < 2)
return false;
else if (n == 2)
return true;
else if (n % 2 == 0)
return false;
for (int i = 3; i <= sqrt(n); i++) {
if (n % i == 0)
return false;
}
return true;
}
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define All(a) a.begin(), a.end()
#define INF 1000000007
const int MOD = 1000000007;
// accumulate(vec.begin(), vec.end(), 0)
int gcd(int x, int y) {
if (x % y == 0)
return y;
else
return gcd(y, x % y);
}
bool isPrime(int n) {
if (n < 2)
return false;
else if (n == 2)
return true;
else if (n % 2 == 0)
return false;
for (int i = 3; i <= sqrt(n); i++) {
if (n % i == 0)
return false;
}
return true;
}
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,601
| 724,602
|
u229427161
|
cpp
|
p02924
|
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
int main() {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,614
| 724,615
|
u094654185
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,618
| 724,619
|
u246343119
|
cpp
|
p02924
|
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#define rep(inc, bgn, end) for (int inc = bgn; inc < end; ++inc)
#define repe(inc, bgn, end) for (int inc = bgn; inc <= end; ++inc)
using ll = long long;
using namespace std;
// -d
int main() {
int n;
cin >> n;
ll ans = n * (n - 1);
ans = ans / 2;
printf("%lld\n", ans);
}
|
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#define rep(inc, bgn, end) for (int inc = bgn; inc < end; ++inc)
#define repe(inc, bgn, end) for (int inc = bgn; inc <= end; ++inc)
using ll = long long;
using namespace std;
// -d
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1);
ans = ans / 2;
printf("%lld\n", ans);
}
|
[
"variable_declaration.type.change"
] | 724,624
| 724,625
|
u028176029
|
cpp
|
p02924
|
#define _GLIBCXX_DEBUG
#include "bits/stdc++.h"
using namespace std;
// loops
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define OneToN(i, n) for (ll i = 1; i < (ll)(n + 1); i++)
#define ZeroToN(i, n) for (ll i = 0; i < (ll)(n + 1); i++)
#define AToB(i, a, b) for (ll i = a; i < (ll)(b + 1); i++)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
// bitsearch
#define BITSEARCH(bit, n) for (int bit = 0; bit < (1 << n); ++bit)
#define isOne(bit, i) bit &(1 << i)
// arrays
#define ALL(x) (x).begin(), (x).end() // sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define add push_back
template <typename T>
std::vector<T> slice(std::vector<T> const &v, int m, int n) {
auto first = v.cbegin() + m;
auto last = v.cbegin() + n + 1;
std::vector<T> vec(first, last);
return vec;
}
#define remove_unique(v) v.erase(unique(ALL(v)), v.end())
// comparision
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
// pair
#define fir first
#define sec second
#define mp make_pair
// types
#define ll long long
#define vec vector
#define cord2d pair<int, int>
#define intP pair<int, int>
// UNCOMMENT WHEN NEEDED
//#define int ll
// input
template <class T> T get() {
T s;
cin >> s;
return (s);
}
#define gi get<int>()
#define gs get<string>()
#define gll get<ll>()
template <class T> vector<T> getv(int n) {
vec<T> v(n);
REP(i, n) cin >> v[i];
return v;
}
#define gim(n) getv<int>(n)
#define gsm(n) getv<string>(n)
#define gllm(n) getv<ll>(n)
// output
void print(int a) { cout << a << endl; }
void print(long long a) { cout << a << endl; }
void print(string a) { cout << a << endl; }
void print(char a) { cout << a << endl; }
void print(double a) { cout << a << endl; }
void print(double a, int dig) { cout << std::setprecision(dig) << a << endl; }
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i = 0; i < (int)v.size(); i++)
o << (i > 0 ? ", " : "") << v[i];
o << "}";
return o;
}
template <class T = int> void print(vec<T> v) { cout << v << endl; }
template <class T = int> void print2dVec(vec<vec<T>> v2d) {
for (vec<T> v : v2d) {
print(v);
}
}
void YesNo1(bool i = true) { return print(i ? "Yes" : "No"); }
void YESNO2(bool i = true) { return print(i ? "YES" : "NO"); }
// debug output
#define var_name(var) #var
template <class T> void debug(T &var, int nest = 0, string before = "") {
cout << string(" ", nest) << before;
print(var);
}
// name replacement
#define y0 y0__
#define y1 y1__
#define j0 j0__
#define j1 j1__
// bool lambdas
#define lamb(exp) [](auto i) { return exp; }
#define isEven [](int i) { return i % 2 == 0; }
#define isOdd [](int i) { return i % 2 != 0; }
// constants
const ll INF = 1e18;
const int MOD = 1000000007;
// maths
int factorial(int k) {
int sum = 1;
for (int i = 1; i <= k; ++i) {
sum *= i;
}
return sum;
}
ll gcd(ll a, ll b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
ll temp = gcd(a, b);
return temp ? (a / temp * b) : 0;
}
////////////////////
void Main() {
ll n;
cin >> n;
cout << (n - 1) * n / 2.0 << endl;
return;
}
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
Main();
}
|
#define _GLIBCXX_DEBUG
#include "bits/stdc++.h"
using namespace std;
// loops
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define OneToN(i, n) for (ll i = 1; i < (ll)(n + 1); i++)
#define ZeroToN(i, n) for (ll i = 0; i < (ll)(n + 1); i++)
#define AToB(i, a, b) for (ll i = a; i < (ll)(b + 1); i++)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
// bitsearch
#define BITSEARCH(bit, n) for (int bit = 0; bit < (1 << n); ++bit)
#define isOne(bit, i) bit &(1 << i)
// arrays
#define ALL(x) (x).begin(), (x).end() // sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define add push_back
template <typename T>
std::vector<T> slice(std::vector<T> const &v, int m, int n) {
auto first = v.cbegin() + m;
auto last = v.cbegin() + n + 1;
std::vector<T> vec(first, last);
return vec;
}
#define remove_unique(v) v.erase(unique(ALL(v)), v.end())
// comparision
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
// pair
#define fir first
#define sec second
#define mp make_pair
// types
#define ll long long
#define vec vector
#define cord2d pair<int, int>
#define intP pair<int, int>
// UNCOMMENT WHEN NEEDED
//#define int ll
// input
template <class T> T get() {
T s;
cin >> s;
return (s);
}
#define gi get<int>()
#define gs get<string>()
#define gll get<ll>()
template <class T> vector<T> getv(int n) {
vec<T> v(n);
REP(i, n) cin >> v[i];
return v;
}
#define gim(n) getv<int>(n)
#define gsm(n) getv<string>(n)
#define gllm(n) getv<ll>(n)
// output
void print(int a) { cout << a << endl; }
void print(long long a) { cout << a << endl; }
void print(string a) { cout << a << endl; }
void print(char a) { cout << a << endl; }
void print(double a) { cout << a << endl; }
void print(double a, int dig) { cout << std::setprecision(dig) << a << endl; }
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i = 0; i < (int)v.size(); i++)
o << (i > 0 ? ", " : "") << v[i];
o << "}";
return o;
}
template <class T = int> void print(vec<T> v) { cout << v << endl; }
template <class T = int> void print2dVec(vec<vec<T>> v2d) {
for (vec<T> v : v2d) {
print(v);
}
}
void YesNo1(bool i = true) { return print(i ? "Yes" : "No"); }
void YESNO2(bool i = true) { return print(i ? "YES" : "NO"); }
// debug output
#define var_name(var) #var
template <class T> void debug(T &var, int nest = 0, string before = "") {
cout << string(" ", nest) << before;
print(var);
}
// name replacement
#define y0 y0__
#define y1 y1__
#define j0 j0__
#define j1 j1__
// bool lambdas
#define lamb(exp) [](auto i) { return exp; }
#define isEven [](int i) { return i % 2 == 0; }
#define isOdd [](int i) { return i % 2 != 0; }
// constants
const ll INF = 1e18;
const int MOD = 1000000007;
// maths
int factorial(int k) {
int sum = 1;
for (int i = 1; i <= k; ++i) {
sum *= i;
}
return sum;
}
ll gcd(ll a, ll b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
ll temp = gcd(a, b);
return temp ? (a / temp * b) : 0;
}
////////////////////
void Main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return;
}
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
Main();
}
|
[
"expression.operation.binary.remove",
"literal.number.change",
"io.output.change"
] | 724,628
| 724,629
|
u105001881
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
ll n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,630
| 724,631
|
u758223800
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
long long int res = (N - 1) * N / 2;
cout << res << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int N;
cin >> N;
long long int res = (N - 1) * N / 2;
cout << res << endl;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,635
| 724,636
|
u384300282
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok ? "Yes" : "No");
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> si;
typedef map<string, int> msi;
typedef greater<int> gt;
typedef priority_queue<int, vector<int>, gt> minq;
typedef long long ll;
typedef pair<ll, ll> pll;
const ll LINF = 1e18L + 1;
const int INF = 1e9 + 1;
// clang++ -std=c++11 -stdlib=libc++
int main() {
int n;
cin >> n;
ll ans = n * (n - 1) / 2;
printf("%lld\n", ans);
return 0;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok ? "Yes" : "No");
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> si;
typedef map<string, int> msi;
typedef greater<int> gt;
typedef priority_queue<int, vector<int>, gt> minq;
typedef long long ll;
typedef pair<ll, ll> pll;
const ll LINF = 1e18L + 1;
const int INF = 1e9 + 1;
// clang++ -std=c++11 -stdlib=libc++
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
printf("%lld\n", ans);
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,666
| 724,667
|
u213868052
|
cpp
|
p02924
|
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using std::bitset;
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define reps(i, s, e) for (int i = s; i < (int)e; i++)
typedef long double ld;
typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, ll> pll;
template <class T> using Graph = vector<vector<T>>;
void printFixedDouble(double d, int fix) {
cout << std::fixed;
cout << std::setprecision(fix) << d << endl;
}
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using std::bitset;
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define reps(i, s, e) for (int i = s; i < (int)e; i++)
typedef long double ld;
typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, ll> pll;
template <class T> using Graph = vector<vector<T>>;
void printFixedDouble(double d, int fix) {
cout << std::fixed;
cout << std::setprecision(fix) << d << endl;
}
int main() {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,670
| 724,671
|
u718048349
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
cout << n * (n - 1) << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"expression.operation.binary.add"
] | 724,675
| 724,676
|
u526179183
|
cpp
|
p02924
|
#include <iostream>
#include <sstream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <ctype.h>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long int lli;
#define rep(i, s, N) for (int i = s; i < N; i++)
#define MOD 1000000007
#define more(a, b) (((a) > (b)) ? (a) : (b))
#define less(a, b) (((a) < (b)) ? (a) : (b))
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
using namespace std;
int main(void) {
int N;
cin >> N;
int ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <iostream>
#include <sstream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <ctype.h>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long int lli;
#define rep(i, s, N) for (int i = s; i < N; i++)
#define MOD 1000000007
#define more(a, b) (((a) > (b)) ? (a) : (b))
#define less(a, b) (((a) < (b)) ? (a) : (b))
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
using namespace std;
int main(void) {
lli N;
cin >> N;
lli ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,677
| 724,678
|
u652760628
|
cpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.