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;
cin >> N;
cout << N * (N + 1) / 2 - N;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N;
cin >> N;
cout << N * (N + 1) / 2 - N;
}
|
[
"variable_declaration.type.primitive.change"
] | 724,681
| 724,682
|
u164730704
|
cpp
|
p02924
|
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.141592653589793238
int main() {
int N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
return 0;
}
|
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.141592653589793238
int main() {
int N;
cin >> N;
cout << (int64_t)(N - 1) * N / 2 << endl;
return 0;
}
|
[
"type_conversion.add"
] | 724,683
| 724,684
|
u906839513
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,685
| 724,686
|
u410878763
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, x, n) for (int i = x; i < (int)(n); i++)
#define sc(x) scanf("%d", &x)
#define scll(x) scanf("%lld", &x)
int main() {
int n;
sc(n);
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, x, n) for (int i = x; i < (int)(n); i++)
#define sc(x) scanf("%d", &x)
#define scll(x) scanf("%lld", &x)
int main() {
ll n;
scll(n);
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change",
"identifier.change",
"call.function.change"
] | 724,687
| 724,688
|
u920543723
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n)-1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n'
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;
}
template <class T> inline void printv(vector<T> &v) {
int n = sz(v);
REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');
}
template <class T> inline void printvv(vector<vector<T>> &v) {
for (auto u : v)
printv(u);
}
template <class T> inline void printlnv(vector<T> &v) {
int n = sz(v);
REP(i, n) cout << v[i] << endl;
}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
void solve();
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(numeric_limits<double>::max_digits10);
solve();
return 0;
}
void solve() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n)-1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n'
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;
}
template <class T> inline void printv(vector<T> &v) {
int n = sz(v);
REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');
}
template <class T> inline void printvv(vector<vector<T>> &v) {
for (auto u : v)
printv(u);
}
template <class T> inline void printlnv(vector<T> &v) {
int n = sz(v);
REP(i, n) cout << v[i] << endl;
}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
void solve();
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(numeric_limits<double>::max_digits10);
solve();
return 0;
}
void solve() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,695
| 724,696
|
u540491484
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define ALL(c) (c).begin(), (c).end()
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 int MOD = 1000000007;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define ALL(c) (c).begin(), (c).end()
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 int MOD = 1000000007;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,697
| 724,698
|
u540491484
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
ll ans = 0;
ll n;
cin >> n;
ans = 0.5 * n * (n - 1);
put(ans);
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
ll ans = 0;
ll n;
cin >> n;
ans = 0.5L * n * (n - 1);
put(ans);
}
|
[
"literal.number.type.widen.change"
] | 724,703
| 724,704
|
u185935459
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
ll ans = 0;
ll n;
cin >> n;
ans = 0.5 * n * (n - 1);
put(ans);
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
ll ans = 0;
ll n;
cin >> n;
ans = n * (n - 1) / 2;
put(ans);
}
|
[
"expression.operation.binary.remove",
"assignment.change"
] | 724,703
| 724,705
|
u185935459
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll zero = 0;
ll INF = 10000000000;
int main() {
ll N;
printf("%lld", N * (N - 1) / 2);
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll zero = 0;
ll INF = 10000000000;
int main() {
ll N;
cin >> N;
printf("%lld", N * (N - 1) / 2);
}
|
[] | 724,706
| 724,707
|
u478462004
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using P = pair<int, int>;
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 * (N - 1) / 2 << endl;
return 0;
}
// Ctrl+Shift+Bでコンパイルと実行を行ってデバッグすること
|
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using P = pair<int, int>;
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 * (N - 1) / 2 << endl;
return 0;
}
// Ctrl+Shift+Bでコンパイルと実行を行ってデバッグすること
|
[
"variable_declaration.type.change"
] | 724,712
| 724,713
|
u717037783
|
cpp
|
p02924
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
long long ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
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,714
| 724,715
|
u605901675
|
cpp
|
p02924
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
/*
long long p[n];
for(int i = 0; i < n; i++) p[i] = (long long) i + 1;
long long maximum = 0;
// O(n!n)
/*
long long a[n];
do {
long long sum = 0;
for(int i = 1; i <= n; i++) {
sum += i % p[i - 1];
}
if(maximum < sum) {
maximum = sum;
for(int i = 0; i < n; i++) a[i] = p[i];
}
} while(next_permutation(p, p + n));
cout << maximum << endl;
*/
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
/*
long long p[n];
for(int i = 0; i < n; i++) p[i] = (long long) i + 1;
long long maximum = 0;
// O(n!n)
/*
long long a[n];
do {
long long sum = 0;
for(int i = 1; i <= n; i++) {
sum += i % p[i - 1];
}
if(maximum < sum) {
maximum = sum;
for(int i = 0; i < n; i++) a[i] = p[i];
}
} while(next_permutation(p, p + n));
cout << maximum << endl;
*/
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,716
| 724,717
|
u272150741
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
ll ans = (ll)n * (n - 1) / 2;
cout << ans << endl;
}
|
[
"type_conversion.add"
] | 724,733
| 724,734
|
u697968316
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
int sum = n * (n - 1) / 2;
cout << sum << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
ll sum = n * (n + 1) / 2 - n;
cout << sum << endl;
}
|
[
"variable_declaration.type.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 724,735
| 724,736
|
u697968316
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
int sum = n * (n + 1) / 2 - n;
cout << sum << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
ll sum = n * (n + 1) / 2 - n;
cout << sum << endl;
}
|
[
"variable_declaration.type.change"
] | 724,737
| 724,736
|
u697968316
|
cpp
|
p02924
|
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
const int mod = 1e9 + 7;
#define rep(i, a, b) for (int i = a; i < b; i++)
int main() {
int n;
cin >> n;
int ans = n * (n - 1);
ans /= 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
const int mod = 1e9 + 7;
#define rep(i, a, b) for (int i = a; i < b; i++)
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change",
"assignment.change"
] | 724,742
| 724,743
|
u870074807
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
scanf("%d", &N);
printf("%d", N * (N - 1) / 2);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
long long N;
scanf("%lld", &N);
printf("%lld", N * (N - 1) / 2);
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 724,747
| 724,748
|
u603067482
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using vpii = vector<pair<int, int>>;
using vpll = vector<pair<ll, ll>>;
// ceil() 切り上げ, floor() 切り捨て
// next_permutation(all(x))
int main(void) {
int N;
cin >> N;
N--;
if (N % 2 == 0)
cout << (1 + N) * N / 2 << endl;
else {
N--;
cout << (1 + N) * N / 2 + N + 1 << endl;
}
}
|
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using vpii = vector<pair<int, int>>;
using vpll = vector<pair<ll, ll>>;
// ceil() 切り上げ, floor() 切り捨て
// next_permutation(all(x))
int main(void) {
ll N;
cin >> N;
N--;
if (N % 2 == 0)
cout << (1 + N) * N / 2 << endl;
else {
N--;
cout << (1 + N) * N / 2 + N + 1 << endl;
}
}
|
[
"variable_declaration.type.change"
] | 724,753
| 724,754
|
u675042710
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int sum = (n) * (n - 1) / 2;
cout << sum << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
int64_t sum = (n) * (n - 1) / 2;
cout << sum << endl;
}
|
[
"variable_declaration.type.primitive.change"
] | 724,759
| 724,760
|
u164352406
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using llong = long long int;
#define rep(i, n) for (int i = 0; i < ((int)n); ++i)
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
const static int MOD = 1000000007;
const static int INF = 1000000000;
const static int dx[4] = {1, 0, -1, 0};
const static int dy[4] = {0, 1, 0, -1};
/* --------------- template start --------------- */
template <class Abel> struct BinaryIndexTree {
vector<Abel> dat[2];
Abel UNITY_SUM = 0; // to be set
/* [1, n] */
BinaryIndexTree(int n) { init(n); }
void init(int n) {
for (int iter = 0; iter < 2; ++iter)
dat[iter].assign(n + 1, UNITY_SUM);
}
/* a, b are 1-indexed, [a, b) */
inline void sub_add(int p, int a, Abel x) {
for (int i = a; i < (int)dat[p].size(); i += i & -i)
dat[p][i] = dat[p][i] + x;
}
inline void add(int a, int b, Abel x) {
sub_add(0, a, x * -(a - 1));
sub_add(1, a, x);
sub_add(0, b, x * (b - 1));
sub_add(1, b, x * (-1));
}
/* a is 1-indexed, [a, b) */
inline Abel sub_sum(int p, int a) {
Abel res = UNITY_SUM;
for (int i = a; i > 0; i -= i & -i)
res = res + dat[p][i];
return res;
}
inline Abel sum(int a, int b) {
return sub_sum(0, b - 1) + sub_sum(1, b - 1) * (b - 1) - sub_sum(0, a - 1) -
sub_sum(1, a - 1) * (a - 1);
}
/* debug */
void print() {
for (int i = 1; i < (int)dat[0].size(); ++i)
cout << sum(i, i + 1) << ",";
cout << endl;
}
};
template <typename T> struct UnionFind {
vector<int> par;
vector<T> sz;
UnionFind(int n) {
par.resize(n);
sz.resize(n);
for (int i = 0; i < n; ++i) {
par[i] = i;
sz[i] = 1;
}
}
int find_root(int x) { return par[x] == x ? x : par[x] = find_root(par[x]); }
bool same(int x, int y) { return find_root(x) == find_root(y); }
void unite(int x, int y) {
x = find_root(x);
y = find_root(y);
if (x == y)
return;
if (sz[x] < sz[y])
swap(x, y);
sz[x] += sz[y];
par[y] = x;
}
T size_of_tree(int x) { return sz[find_root(x)]; }
};
/* --------------- template end --------------- */
/* --------------- function start --------------- */
llong my_gcd(llong a, llong b) { return (a ? my_gcd(b % a, a) : b); }
llong my_lcm(llong a, llong b) { return a * b / my_gcd(a, b); }
llong facmod(llong n) {
if (n == 0)
return 1;
llong res = n;
for (int i = n - 1; i > 0; --i) {
res = (res * i) % MOD;
}
return res;
}
llong powmod(llong a, llong n) {
llong res = 1;
while (n > 0) {
if (n & 1)
res = (res * a) % MOD;
a = (a * a) % MOD;
n >>= 1;
}
return res;
}
llong modinv(llong n) { return powmod(n, MOD - 2); }
llong combmod(llong n, llong k) {
llong res = 1;
for (int i = 0; i < k; ++i) {
res = (res * (n - i)) % MOD;
}
res = (res * modinv(facmod(k))) % MOD;
return res;
}
vector<llong> divisors(llong n) {
vector<llong> ret;
for (llong i = 1; i * i <= n; i++) {
if (n % i == 0) {
ret.push_back(i);
if ((i * i) != n)
ret.push_back(n / i);
}
}
sort(begin(ret), end(ret));
return ret;
}
bool primeNumber(llong n) {
if (n < 2LL)
return false;
else {
for (llong i = 2LL; i * i <= n; i++) {
if (n % i == 0LL)
return false;
}
return true;
}
}
/* --------------- function end --------------- */
int main(int argc, char *argv[]) {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
int k = n - 1;
cout << k * (k + 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
using llong = long long int;
#define rep(i, n) for (int i = 0; i < ((int)n); ++i)
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
const static int MOD = 1000000007;
const static int INF = 1000000000;
const static int dx[4] = {1, 0, -1, 0};
const static int dy[4] = {0, 1, 0, -1};
/* --------------- template start --------------- */
template <class Abel> struct BinaryIndexTree {
vector<Abel> dat[2];
Abel UNITY_SUM = 0; // to be set
/* [1, n] */
BinaryIndexTree(int n) { init(n); }
void init(int n) {
for (int iter = 0; iter < 2; ++iter)
dat[iter].assign(n + 1, UNITY_SUM);
}
/* a, b are 1-indexed, [a, b) */
inline void sub_add(int p, int a, Abel x) {
for (int i = a; i < (int)dat[p].size(); i += i & -i)
dat[p][i] = dat[p][i] + x;
}
inline void add(int a, int b, Abel x) {
sub_add(0, a, x * -(a - 1));
sub_add(1, a, x);
sub_add(0, b, x * (b - 1));
sub_add(1, b, x * (-1));
}
/* a is 1-indexed, [a, b) */
inline Abel sub_sum(int p, int a) {
Abel res = UNITY_SUM;
for (int i = a; i > 0; i -= i & -i)
res = res + dat[p][i];
return res;
}
inline Abel sum(int a, int b) {
return sub_sum(0, b - 1) + sub_sum(1, b - 1) * (b - 1) - sub_sum(0, a - 1) -
sub_sum(1, a - 1) * (a - 1);
}
/* debug */
void print() {
for (int i = 1; i < (int)dat[0].size(); ++i)
cout << sum(i, i + 1) << ",";
cout << endl;
}
};
template <typename T> struct UnionFind {
vector<int> par;
vector<T> sz;
UnionFind(int n) {
par.resize(n);
sz.resize(n);
for (int i = 0; i < n; ++i) {
par[i] = i;
sz[i] = 1;
}
}
int find_root(int x) { return par[x] == x ? x : par[x] = find_root(par[x]); }
bool same(int x, int y) { return find_root(x) == find_root(y); }
void unite(int x, int y) {
x = find_root(x);
y = find_root(y);
if (x == y)
return;
if (sz[x] < sz[y])
swap(x, y);
sz[x] += sz[y];
par[y] = x;
}
T size_of_tree(int x) { return sz[find_root(x)]; }
};
/* --------------- template end --------------- */
/* --------------- function start --------------- */
llong my_gcd(llong a, llong b) { return (a ? my_gcd(b % a, a) : b); }
llong my_lcm(llong a, llong b) { return a * b / my_gcd(a, b); }
llong facmod(llong n) {
if (n == 0)
return 1;
llong res = n;
for (int i = n - 1; i > 0; --i) {
res = (res * i) % MOD;
}
return res;
}
llong powmod(llong a, llong n) {
llong res = 1;
while (n > 0) {
if (n & 1)
res = (res * a) % MOD;
a = (a * a) % MOD;
n >>= 1;
}
return res;
}
llong modinv(llong n) { return powmod(n, MOD - 2); }
llong combmod(llong n, llong k) {
llong res = 1;
for (int i = 0; i < k; ++i) {
res = (res * (n - i)) % MOD;
}
res = (res * modinv(facmod(k))) % MOD;
return res;
}
vector<llong> divisors(llong n) {
vector<llong> ret;
for (llong i = 1; i * i <= n; i++) {
if (n % i == 0) {
ret.push_back(i);
if ((i * i) != n)
ret.push_back(n / i);
}
}
sort(begin(ret), end(ret));
return ret;
}
bool primeNumber(llong n) {
if (n < 2LL)
return false;
else {
for (llong i = 2LL; i * i <= n; i++) {
if (n % i == 0LL)
return false;
}
return true;
}
}
/* --------------- function end --------------- */
int main(int argc, char *argv[]) {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
llong k = n - 1;
cout << k * (k + 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,764
| 724,765
|
u943004959
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,773
| 724,774
|
u650236619
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) rep(i, 0, n)
void solve() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
solve();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) rep(i, 0, n)
void solve() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
solve();
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,775
| 724,776
|
u973991908
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int n;
cin >> n;
cout << (n * (n - 1)) / 2 << '\n';
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
long long n;
cin >> n;
cout << (n * (n - 1)) / 2 << '\n';
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,787
| 724,788
|
u194015723
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,795
| 724,796
|
u483992368
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll ans = 0.5 * (n * (n - 1));
cout << ans << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll ans = (n * (n - 1)) / 2;
cout << ans << endl;
}
|
[
"expression.operation.binary.remove"
] | 724,797
| 724,798
|
u481657940
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll ans = (n * (n + 1)) * 0.5;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll ans = (n * (n - 1)) / 2;
cout << ans << endl;
}
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 724,799
| 724,798
|
u481657940
|
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;
typedef long long ll;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,800
| 724,801
|
u361948770
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
template <class t> using vc = vector<t>;
template <class t> using vvc = vector<vector<t>>;
typedef long long ll;
typedef vc<int> vi;
typedef vvc<int> vvi;
typedef pair<int, int> pi;
#define endl "\n"
#define k first
#define v second
#define pb push_back
#define mp make_pair
#define bg begin()
#define ed end()
#define ALL(a) a.bg, a.ed
template <class t, class u>
ostream &operator<<(ostream &os, const pair<t, u> &p) {
return os << "( " << p.k << ", " << p.v << " )";
}
template <class t> ostream &operator<<(ostream &os, const vc<t> &v) {
os << "[ ";
for (int i = 0; i < v.size(); i++) {
os << v[i];
if (i != v.size() - 1) {
os << ", ";
}
}
return os << " ]";
}
// g++ -std=c++17 -O2 -Wall template.cpp -o template
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
// cout << fixed << setprecision(18);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// Solution
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
template <class t> using vc = vector<t>;
template <class t> using vvc = vector<vector<t>>;
typedef long long ll;
typedef vc<int> vi;
typedef vvc<int> vvi;
typedef pair<int, int> pi;
#define endl "\n"
#define k first
#define v second
#define pb push_back
#define mp make_pair
#define bg begin()
#define ed end()
#define ALL(a) a.bg, a.ed
template <class t, class u>
ostream &operator<<(ostream &os, const pair<t, u> &p) {
return os << "( " << p.k << ", " << p.v << " )";
}
template <class t> ostream &operator<<(ostream &os, const vc<t> &v) {
os << "[ ";
for (int i = 0; i < v.size(); i++) {
os << v[i];
if (i != v.size() - 1) {
os << ", ";
}
}
return os << " ]";
}
// g++ -std=c++17 -O2 -Wall template.cpp -o template
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
// cout << fixed << setprecision(18);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// Solution
long long n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,802
| 724,803
|
u648284535
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep_op(i, a, n) for (int i = a; i < n; i++)
#define rep_d(j, n) for (int j = n; j >= 0; j--)
#define rep_d_op(j, n, a) for (int j = n; j >= a; j--)
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;
}
const int MOD = 1000000007;
const vector<int> dx = {1, 0};
const vector<int> dy = {0, 1};
const ll INF = 1LL << 60;
// int max = *std::max_element(vec.begin(), vec.end());
// int sum = accumulate(list, list + size, 0);
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep_op(i, a, n) for (int i = a; i < n; i++)
#define rep_d(j, n) for (int j = n; j >= 0; j--)
#define rep_d_op(j, n, a) for (int j = n; j >= a; j--)
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;
}
const int MOD = 1000000007;
const vector<int> dx = {1, 0};
const vector<int> dy = {0, 1};
const ll INF = 1LL << 60;
// int max = *std::max_element(vec.begin(), vec.end());
// int sum = accumulate(list, list + size, 0);
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,813
| 724,814
|
u496074393
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep_op(i, a, n) for (int i = a; i < n; i++)
#define rep_d(j, n) for (int j = n; j >= 0; j--)
#define rep_d_op(j, n, a) for (int j = n; j >= a; j--)
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;
}
const int MOD = 1000000007;
const vector<int> dx = {1, 0};
const vector<int> dy = {0, 1};
const ll INF = 1LL << 60;
// int max = *std::max_element(vec.begin(), vec.end());
// int sum = accumulate(list, list + size, 0);
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep_op(i, a, n) for (int i = a; i < n; i++)
#define rep_d(j, n) for (int j = n; j >= 0; j--)
#define rep_d_op(j, n, a) for (int j = n; j >= a; j--)
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;
}
const int MOD = 1000000007;
const vector<int> dx = {1, 0};
const vector<int> dy = {0, 1};
const ll INF = 1LL << 60;
// int max = *std::max_element(vec.begin(), vec.end());
// int sum = accumulate(list, list + size, 0);
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,815
| 724,814
|
u496074393
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#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 ans = (n - 1) * n / 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#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 ans = (n - 1) * n / 2LL;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change",
"literal.number.type.widen.change"
] | 724,822
| 724,823
|
u013803727
|
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() {
long n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.primitive.change"
] | 724,824
| 724,825
|
u294721290
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, r = 0;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.widen.change",
"variable_declaration.remove"
] | 724,844
| 724,843
|
u573433204
|
cpp
|
p02924
|
// common include
#include <bits/stdc++.h>
using namespace std;
// def
#define debug(x) cout << #x << ": " << x << endl
#define out(x) cout << x << endl
#define repeat(i, a, b) for (int i = (a); i < (b); i++)
#define revrepeat(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define revrep(i, n) for (int i = (n)-1; i >= 0; i--)
typedef long long ll;
const int M = 1e9 + 7;
const int INF = 1e9;
int main() {
int n;
cin >> n;
n--;
ll ans = n * (n + 1) / 2;
cout << ans << endl;
}
|
// common include
#include <bits/stdc++.h>
using namespace std;
// def
#define debug(x) cout << #x << ": " << x << endl
#define out(x) cout << x << endl
#define repeat(i, a, b) for (int i = (a); i < (b); i++)
#define revrepeat(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define revrep(i, n) for (int i = (n)-1; i >= 0; i--)
typedef long long ll;
const int M = 1e9 + 7;
const int INF = 1e9;
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 724,847
| 724,848
|
u765690804
|
cpp
|
p02924
|
#include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n;
cin >> n;
ll ans = 0;
ans = (n - 1) * n / 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n;
cin >> n;
ll ans = 0;
ans = (ll)(n - 1) * (ll)n / 2;
cout << ans << endl;
return 0;
}
|
[
"type_conversion.add"
] | 724,867
| 724,868
|
u657208344
|
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 n;
std::cin >> n;
std::cout << n * (n - 1) / 2 << std::endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,873
| 724,874
|
u664394831
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cout << (#x) << " = " << (x) << "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define ALL(r) r.begin(), r.end()
using ll = std::int64_t;
using vint = std::vector<int>;
using vll = std::vector<ll>;
using pint = std::pair<int, int>;
constexpr std::int32_t INF = 1001001001;
void Main() {
int n;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return;
} else {
cout << n * (n - 1) / 2 << endl;
return;
}
}
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
Main();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cout << (#x) << " = " << (x) << "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define ALL(r) r.begin(), r.end()
using ll = std::int64_t;
using vint = std::vector<int>;
using vll = std::vector<ll>;
using pint = std::pair<int, int>;
constexpr std::int32_t INF = 1001001001;
void Main() {
ll n;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return;
} else {
cout << n * (n - 1) / 2 << endl;
return;
}
}
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
Main();
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,875
| 724,876
|
u664394831
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
long long ans;
ans = (N * (N - 1)) / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans;
ans = (N * (N - 1)) / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,887
| 724,888
|
u105533331
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
long long ans;
ans = N * (N - 1) / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans;
ans = (N * (N - 1)) / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 724,889
| 724,888
|
u105533331
|
cpp
|
p02924
|
#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
long long INF = 1000000000000000000;
long long mod = 1000000007;
using namespace std;
int main() {
int N;
cin >> N;
long long ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
long long INF = 1000000000000000000;
long long mod = 1000000007;
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,892
| 724,893
|
u120564432
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const ll LINF = (ll)1e18;
int main() {
int n;
cin >> n;
ll 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++)
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const ll LINF = (ll)1e18;
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.change"
] | 724,894
| 724,895
|
u607594286
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 60)
#define PI 3.14159265358979
typedef long long i64;
typedef pair<i64, i64> P;
inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }
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;
}
int n;
void solve() {
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 60)
#define PI 3.14159265358979
typedef long long i64;
typedef pair<i64, i64> P;
inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }
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;
}
i64 n;
void solve() {
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
|
[
"variable_declaration.type.change",
"expression.operation.binary.remove"
] | 724,898
| 724,899
|
u414947284
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 60)
#define PI 3.14159265358979
typedef long long i64;
typedef pair<i64, i64> P;
inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }
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;
}
int n;
void solve() {
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 60)
#define PI 3.14159265358979
typedef long long i64;
typedef pair<i64, i64> P;
inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }
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;
}
i64 n;
void solve() {
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,898
| 724,900
|
u414947284
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
#define repi(i, a, b) for (int i = a; i <= (b); ++i)
#define rrep(i, n) for (int i = (n - 1); i >= 0; --i)
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define pb push_back
#define mp make_pair
#define to_s to_string
#define sz(v) (int)v.size()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define pr(x) cout << (x) << '\n'
#define debug(x) cout << #x << ": " << (x) << '\n'
#define yes "Yes"
#define no "No"
using namespace std;
using ll = long long;
using Edge = pair<int, long long>;
using Graph = vector<vector<Edge>>;
typedef pair<int, int> P;
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
};
} aaaaaaa;
int MOD = 1e9 + 7;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
int N;
cin >> N;
pr(N * (N - 1) / 2);
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
#define repi(i, a, b) for (int i = a; i <= (b); ++i)
#define rrep(i, n) for (int i = (n - 1); i >= 0; --i)
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define pb push_back
#define mp make_pair
#define to_s to_string
#define sz(v) (int)v.size()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define pr(x) cout << (x) << '\n'
#define debug(x) cout << #x << ": " << (x) << '\n'
#define yes "Yes"
#define no "No"
using namespace std;
using ll = long long;
using Edge = pair<int, long long>;
using Graph = vector<vector<Edge>>;
typedef pair<int, int> P;
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
};
} aaaaaaa;
int MOD = 1e9 + 7;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
ll N;
cin >> N;
pr(N * (N - 1) / 2);
}
|
[
"variable_declaration.type.change"
] | 724,901
| 724,902
|
u281168735
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;
const ll mod = 1e9 + 7;
#define ALL(x) (x).begin(), (x).end()
#define pow(x, y) modpow(x, y)
#define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++)
#define REPS(i, n) for (ll(i) = 1; (i) <= (n); (i)++)
#define RREP(i, n) for (ll(i) = (n - 1); (i) >= 0; (i)--)
#define RREPS(i, n) for (ll(i) = (n); (i) > 0; (i)--)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end());
template <class T = int> T in() {
T x;
cin >> x;
return (x);
}
template <class T> inline void chmin(T &a, T b) {
if (a > b) {
a = b;
}
}
template <class T> inline void chmax(T &a, T b) {
if (a < b) {
a = b;
}
}
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
int N = in();
cout << N * (N - 1) / 2 << "\n";
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;
const ll mod = 1e9 + 7;
#define ALL(x) (x).begin(), (x).end()
#define pow(x, y) modpow(x, y)
#define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++)
#define REPS(i, n) for (ll(i) = 1; (i) <= (n); (i)++)
#define RREP(i, n) for (ll(i) = (n - 1); (i) >= 0; (i)--)
#define RREPS(i, n) for (ll(i) = (n); (i) > 0; (i)--)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end());
template <class T = int> T in() {
T x;
cin >> x;
return (x);
}
template <class T> inline void chmin(T &a, T b) {
if (a > b) {
a = b;
}
}
template <class T> inline void chmax(T &a, T b) {
if (a < b) {
a = b;
}
}
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
ll N = in();
cout << N * (N - 1) / 2 << "\n";
}
|
[
"variable_declaration.type.change"
] | 724,903
| 724,904
|
u017078415
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
int N;
cin >> N;
cout << (N * (N - 1)) / 2;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
ll N;
cin >> N;
cout << (N * (N - 1)) / 2;
}
|
[
"variable_declaration.type.change"
] | 724,905
| 724,906
|
u024191315
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
ll N;
cin >> N;
cout << (N * (N - 1)) / 2;
}
|
[
"variable_declaration.type.change"
] | 724,907
| 724,906
|
u024191315
|
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 rrep(i, n) for (int i = n; i >= 0; i--)
#define REP(i, s, t) for (int i = s; i <= t; i++)
#define RREP(i, s, t) for (int i = s; i >= t; i--)
#define dump(x) cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
#define int long long
signed main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
cout << N * (N - 1) / 2 % mod << endl;
return 0;
}
|
#include "bits/stdc++.h"
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n; i >= 0; i--)
#define REP(i, s, t) for (int i = s; i <= t; i++)
#define RREP(i, s, t) for (int i = s; i >= t; i--)
#define dump(x) cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
#define int long long
signed main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[
"expression.operation.binary.remove"
] | 724,909
| 724,910
|
u965730380
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
void solve();
int main(void) {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
void solve() {}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
void solve();
int main(void) {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
void solve() {}
|
[
"variable_declaration.type.change"
] | 724,911
| 724,912
|
u882620594
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n * n - n) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
cin >> n;
cout << (n * n - n) / 2 << endl;
}
|
[
"variable_declaration.type.widen.change"
] | 724,913
| 724,914
|
u993074316
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
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;
}
typedef long long ll;
typedef pair<int, int> P;
const int MAX = 200005;
const int INF = 1001001001;
const int MOD = 1000000007;
int main() {
int N;
cin >> N;
ll ans = (N - 1) * N / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
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;
}
typedef long long ll;
typedef pair<int, int> P;
const int MAX = 200005;
const int INF = 1001001001;
const int MOD = 1000000007;
int main() {
int N;
cin >> N;
ll ans = (ll)(N - 1) * N / 2;
cout << ans << endl;
}
|
[] | 724,915
| 724,916
|
u992875223
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main(void) {
long n;
cin >> n;
cout << n * (n - 1) / 2 - 1 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main(void) {
long n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"expression.operation.binary.remove"
] | 724,917
| 724,918
|
u088895504
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
const int MOD = 1000000007;
int main() {
ll N;
cout << N * (N - 1) / 2 << 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;
const int MOD = 1000000007;
int main() {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[] | 724,923
| 724,924
|
u370608397
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
const int MOD = 1000000007;
int main() {
ll N;
cout << N * (N - 1) / 2 << 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;
const int MOD = 1000000007;
int main() {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[] | 724,923
| 724,925
|
u370608397
|
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,926
| 724,927
|
u986480146
|
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,928
| 724,927
|
u986480146
|
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>;
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
int solve(ll n) {
if (n == 1)
return 0;
return n * (n - 1) / 2;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
cout << solve(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>;
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
ll solve(ll n) {
if (n == 1)
return 0;
return n * (n - 1) / 2;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
cout << solve(n) << endl;
return 0;
}
|
[] | 724,929
| 724,930
|
u766280310
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1e9 + 7;
const ll INF = LLONG_MAX;
const ll MINF = LLONG_MIN;
const int INT_INF = INT_MAX;
int main() {
int n;
cin >> n;
cout << (n + 1) * n / 2 - n << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1e9 + 7;
const ll INF = LLONG_MAX;
const ll MINF = LLONG_MIN;
const int INT_INF = INT_MAX;
int main() {
ll n;
cin >> n;
cout << (n - 1) * n / 2 << endl;
}
|
[
"variable_declaration.type.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change",
"expression.operation.binary.remove"
] | 724,933
| 724,934
|
u850894780
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const ll MOD = 1000000007, MOD2 = 998244353;
int main() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const ll MOD = 1000000007, MOD2 = 998244353;
int main() {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,935
| 724,936
|
u387221709
|
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() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int N;
cin >> N;
cout << N * (N - 1) / 2 << 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;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll N;
cin >> N;
cout << N * (N - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,937
| 724,938
|
u389577910
|
cpp
|
p02924
|
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define ALL(v) (v.begin(), v.end())
#define COUT(x) cout << (x) << "\n"
int main() {
ll n;
cin >> n;
ll ans = (n - 1) * (n - 2);
ans /= 2;
COUT(ans);
}
|
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define ALL(v) (v.begin(), v.end())
#define COUT(x) cout << (x) << "\n"
int main() {
ll n;
cin >> n;
ll ans = (n) * (n - 1) / 2;
COUT(ans);
}
|
[
"expression.operation.binary.remove",
"literal.number.change",
"expression.operation.binary.change",
"assignment.change"
] | 724,945
| 724,946
|
u459105164
|
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,951
| 724,952
|
u011539601
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, ans = 0;
cin >> N;
ans = (N * (N - 1)) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int N, ans = 0;
cin >> N;
ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,973
| 724,974
|
u919919068
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, ans = 0;
cin >> N;
ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int N, ans = 0;
cin >> N;
ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.widen.change"
] | 724,975
| 724,974
|
u919919068
|
cpp
|
p02924
|
#include <algorithm>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define INF 100000000
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
using P = pair<int, int>;
const int MAX = 1000000;
const int MOD = 1000000007;
/*
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;
//そのまま計算すると負の値になるので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;
}
//二分累乗法
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1) res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
//UnionFind木
struct UnionFind{
vector<long long int> par; //par[i] : iの親の番号
vector<long long int> rnk; //root[i] : iの木のサイズ
//コンストラクタ
UnionFind(long long int n): par(n), rnk(n){
//木の初期化
for(long long int i = 0; i < n; i++){
par[i] = i;
rnk[i] = 1;
}
}
//データxが属する木の根を再帰で取得
long long int root(long long int x){
if(par[x] == x){
return x;
}else{
return par[x] = root(par[x]);
}
}
//xとyが同じ木に属しているかを判定
bool same(long long int x, long long int y){
return root(x) == root(y);
}
//xとyの木を併合
void unite(long long int x, long long int y){
long long int rx = root(x); //xの根
long long int ry = root(y); //yの根
if(rx == ry) return; //根が同じならそのまま
//併合するときにサイズを足し合わせる
if(rnk[rx] < rnk[ry]){
par[rx] = ry;
rnk[ry] += rnk[rx];
}else{
par[ry] = rx;
rnk[rx] += rnk[ry];
}
}
//属している木のサイズを取得
long long int size(long long int x){
return rnk[root(x)];
}
};
typedef struct edge{
int to;
int cost;
} edge;
vector<edge> graph[2010];
long long int d[2010];
void dijkstra(int s){
priority_queue<P, vector<P>, greater<P> > que;
for(int i = 0; i < 2010; i++){
d[i] = INF;
}
d[s] = 0;
que.push(P(s, 0));
while (!que.empty()) {
P p = que.top();
que.pop();
int v = p.first;
if (d[v] < p.second) continue;
for (int i=0; i<graph[v].size(); ++i) {
edge e = graph[v][i];
if (d[e.to] > d[v] + e.cost) {
d[e.to] = d[v] + e.cost;
que.push(P(e.to, d[e.to]));
}
}
}
}
*/
int main() {
int n;
cin >> n;
long long int ans = (n - 1) * n / 2;
cout << ans << endl;
}
|
#include <algorithm>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define INF 100000000
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
using P = pair<int, int>;
const int MAX = 1000000;
const int MOD = 1000000007;
/*
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;
//そのまま計算すると負の値になるので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;
}
//二分累乗法
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1) res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
//UnionFind木
struct UnionFind{
vector<long long int> par; //par[i] : iの親の番号
vector<long long int> rnk; //root[i] : iの木のサイズ
//コンストラクタ
UnionFind(long long int n): par(n), rnk(n){
//木の初期化
for(long long int i = 0; i < n; i++){
par[i] = i;
rnk[i] = 1;
}
}
//データxが属する木の根を再帰で取得
long long int root(long long int x){
if(par[x] == x){
return x;
}else{
return par[x] = root(par[x]);
}
}
//xとyが同じ木に属しているかを判定
bool same(long long int x, long long int y){
return root(x) == root(y);
}
//xとyの木を併合
void unite(long long int x, long long int y){
long long int rx = root(x); //xの根
long long int ry = root(y); //yの根
if(rx == ry) return; //根が同じならそのまま
//併合するときにサイズを足し合わせる
if(rnk[rx] < rnk[ry]){
par[rx] = ry;
rnk[ry] += rnk[rx];
}else{
par[ry] = rx;
rnk[rx] += rnk[ry];
}
}
//属している木のサイズを取得
long long int size(long long int x){
return rnk[root(x)];
}
};
typedef struct edge{
int to;
int cost;
} edge;
vector<edge> graph[2010];
long long int d[2010];
void dijkstra(int s){
priority_queue<P, vector<P>, greater<P> > que;
for(int i = 0; i < 2010; i++){
d[i] = INF;
}
d[s] = 0;
que.push(P(s, 0));
while (!que.empty()) {
P p = que.top();
que.pop();
int v = p.first;
if (d[v] < p.second) continue;
for (int i=0; i<graph[v].size(); ++i) {
edge e = graph[v][i];
if (d[e.to] > d[v] + e.cost) {
d[e.to] = d[v] + e.cost;
que.push(P(e.to, d[e.to]));
}
}
}
}
*/
int main() {
long long int n;
cin >> n;
long long int ans = (n - 1) * n / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.widen.change"
] | 724,987
| 724,988
|
u536712674
|
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;
cout << n * (n - 1) / 2 << endl;
}
|
#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;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 724,989
| 724,990
|
u680046686
|
cpp
|
p02924
|
#import <cstdio>
main() {
int N;
scanf("%d", &N), N--;
printf("%d\n", N * (N + 1) / 2);
}
|
#import <cstdio>
main() {
long N;
scanf("%ld", &N);
N--;
printf("%ld\n", N * (N + 1) / 2);
}
|
[
"variable_declaration.type.primitive.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 724,993
| 724,994
|
u832473530
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n;
cin >> n;
ll ans = (n * (n - 1)) / 2;
cout << ans << ln;
return 0;
}
|
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll n;
cin >> n;
ll ans = (n * (n - 1)) / 2;
cout << ans << ln;
return 0;
}
|
[
"variable_declaration.type.change"
] | 724,996
| 724,997
|
u996290370
|
cpp
|
p02924
|
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
cout << (N - 1 + 1) * (N - 1) / 2;
return 0;
}
|
#include <iostream>
#include <vector>
using namespace std;
int main() {
long N;
cin >> N;
cout << (N - 1 + 1) * (N - 1) / 2;
return 0;
}
|
[
"variable_declaration.type.primitive.change"
] | 725,003
| 725,004
|
u506846578
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = (int)(a); i >= (int)(b); --i)
#define fore(x, a) for (auto &x : a)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define isin(i, a, b) ((a) <= (i) && (i) <= (b))
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define dup(x, y) (((x) + (y)-1) / (y))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(a) ((int)(a).size())
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using ll = long long;
using vi = vector<int>;
using unit = unsigned;
using vl = vector<ll>;
using ull = unsigned long long;
using vvi = vector<vi>;
using P = pair<int, int>;
using vvl = vector<vl>;
using vp = vector<P>;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
template <class T> string join(const v(T) & v) {
stringstream s;
rep(i, 0, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <class T> istream &operator>>(istream &i, v(T) & v) {
fore(x, v) { i >> v; }
return i;
}
template <class T> ostream &operator<<(ostream &o, const v(T) & v) {
o << "[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const deque<T> &v) {
o << "deq[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const unordered_set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T>
ostream &operator<<(ostream &o, const unordered_multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T1, class T2>
ostream &operator<<(ostream &o, const pair<T1, T2> &p) {
o << "(" << p.fi << "," << p.se << ")";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const unordered_map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class T> void YES(T c) {
if (c)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
template <class T> void Yes(T c) {
if (c)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
template <class T> void POSS(T c) {
if (c)
cout << "POSSIBLE" << endl;
else
cout << "IMPOSSIBLE" << endl;
}
template <class T> void Poss(T c) {
if (c)
cout << "Possible" << endl;
else
cout << "Impossible" << endl;
}
template <class T> void chmax(T &a, const T &b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, const T &b) {
if (b < a)
a = b;
}
template <class T> T gcd(T a, T b) { return (b == 0) ? a : gcd(b, a % b); }
template <class T> T lcm(T a, T b) { return a * (b / gcd(a, b)); }
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1001002003;
const ll LINF = 1001002003004005006LL;
const int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
void _main() {
ll N;
cin >> N;
int ans = (N - 1) * N / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = (int)(a); i >= (int)(b); --i)
#define fore(x, a) for (auto &x : a)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define isin(i, a, b) ((a) <= (i) && (i) <= (b))
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define dup(x, y) (((x) + (y)-1) / (y))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(a) ((int)(a).size())
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using ll = long long;
using vi = vector<int>;
using unit = unsigned;
using vl = vector<ll>;
using ull = unsigned long long;
using vvi = vector<vi>;
using P = pair<int, int>;
using vvl = vector<vl>;
using vp = vector<P>;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
template <class T> string join(const v(T) & v) {
stringstream s;
rep(i, 0, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <class T> istream &operator>>(istream &i, v(T) & v) {
fore(x, v) { i >> v; }
return i;
}
template <class T> ostream &operator<<(ostream &o, const v(T) & v) {
o << "[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const deque<T> &v) {
o << "deq[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const unordered_set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T>
ostream &operator<<(ostream &o, const unordered_multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T1, class T2>
ostream &operator<<(ostream &o, const pair<T1, T2> &p) {
o << "(" << p.fi << "," << p.se << ")";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const unordered_map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class T> void YES(T c) {
if (c)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
template <class T> void Yes(T c) {
if (c)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
template <class T> void POSS(T c) {
if (c)
cout << "POSSIBLE" << endl;
else
cout << "IMPOSSIBLE" << endl;
}
template <class T> void Poss(T c) {
if (c)
cout << "Possible" << endl;
else
cout << "Impossible" << endl;
}
template <class T> void chmax(T &a, const T &b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, const T &b) {
if (b < a)
a = b;
}
template <class T> T gcd(T a, T b) { return (b == 0) ? a : gcd(b, a % b); }
template <class T> T lcm(T a, T b) { return a * (b / gcd(a, b)); }
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1001002003;
const ll LINF = 1001002003004005006LL;
const int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
void _main() {
ll N;
cin >> N;
ll ans = (N - 1) * N / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.change"
] | 725,007
| 725,008
|
u430494842
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = (int)(a); i >= (int)(b); --i)
#define fore(x, a) for (auto &x : a)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define isin(i, a, b) ((a) <= (i) && (i) <= (b))
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define dup(x, y) (((x) + (y)-1) / (y))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(a) ((int)(a).size())
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using ll = long long;
using vi = vector<int>;
using unit = unsigned;
using vl = vector<ll>;
using ull = unsigned long long;
using vvi = vector<vi>;
using P = pair<int, int>;
using vvl = vector<vl>;
using vp = vector<P>;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
template <class T> string join(const v(T) & v) {
stringstream s;
rep(i, 0, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <class T> istream &operator>>(istream &i, v(T) & v) {
fore(x, v) { i >> v; }
return i;
}
template <class T> ostream &operator<<(ostream &o, const v(T) & v) {
o << "[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const deque<T> &v) {
o << "deq[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const unordered_set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T>
ostream &operator<<(ostream &o, const unordered_multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T1, class T2>
ostream &operator<<(ostream &o, const pair<T1, T2> &p) {
o << "(" << p.fi << "," << p.se << ")";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const unordered_map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class T> void YES(T c) {
if (c)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
template <class T> void Yes(T c) {
if (c)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
template <class T> void POSS(T c) {
if (c)
cout << "POSSIBLE" << endl;
else
cout << "IMPOSSIBLE" << endl;
}
template <class T> void Poss(T c) {
if (c)
cout << "Possible" << endl;
else
cout << "Impossible" << endl;
}
template <class T> void chmax(T &a, const T &b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, const T &b) {
if (b < a)
a = b;
}
template <class T> T gcd(T a, T b) { return (b == 0) ? a : gcd(b, a % b); }
template <class T> T lcm(T a, T b) { return a * (b / gcd(a, b)); }
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1001002003;
const ll LINF = 1001002003004005006LL;
const int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
void _main() {
int N;
cin >> N;
int ans = (N - 1) * N / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = (int)(a); i >= (int)(b); --i)
#define fore(x, a) for (auto &x : a)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define isin(i, a, b) ((a) <= (i) && (i) <= (b))
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define dup(x, y) (((x) + (y)-1) / (y))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(a) ((int)(a).size())
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using ll = long long;
using vi = vector<int>;
using unit = unsigned;
using vl = vector<ll>;
using ull = unsigned long long;
using vvi = vector<vi>;
using P = pair<int, int>;
using vvl = vector<vl>;
using vp = vector<P>;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
template <class T> string join(const v(T) & v) {
stringstream s;
rep(i, 0, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <class T> istream &operator>>(istream &i, v(T) & v) {
fore(x, v) { i >> v; }
return i;
}
template <class T> ostream &operator<<(ostream &o, const v(T) & v) {
o << "[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const deque<T> &v) {
o << "deq[";
fore(x, v) o << x << ",";
o << "]";
return o;
}
template <class T> ostream &operator<<(ostream &o, const set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const unordered_set<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T> ostream &operator<<(ostream &o, const multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T>
ostream &operator<<(ostream &o, const unordered_multiset<T> &v) {
o << "{";
fore(x, v) o << x << ",";
o << "}";
return o;
}
template <class T1, class T2>
ostream &operator<<(ostream &o, const pair<T1, T2> &p) {
o << "(" << p.fi << "," << p.se << ")";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class TK, class TV>
ostream &operator<<(ostream &o, const unordered_map<TK, TV> &m) {
o << "{";
fore(x, m) o << x.fi << "=>" << x.se << ",";
o << "}";
return o;
}
template <class T> void YES(T c) {
if (c)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
template <class T> void Yes(T c) {
if (c)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
template <class T> void POSS(T c) {
if (c)
cout << "POSSIBLE" << endl;
else
cout << "IMPOSSIBLE" << endl;
}
template <class T> void Poss(T c) {
if (c)
cout << "Possible" << endl;
else
cout << "Impossible" << endl;
}
template <class T> void chmax(T &a, const T &b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, const T &b) {
if (b < a)
a = b;
}
template <class T> T gcd(T a, T b) { return (b == 0) ? a : gcd(b, a % b); }
template <class T> T lcm(T a, T b) { return a * (b / gcd(a, b)); }
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1001002003;
const ll LINF = 1001002003004005006LL;
const int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
void _main() {
ll N;
cin >> N;
ll ans = (N - 1) * N / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.change"
] | 725,009
| 725,008
|
u430494842
|
cpp
|
p02924
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
int ans = (n - 1) * n / 2;
cout << ans << endl;
}
|
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int ans = (n - 1) * n / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.widen.change"
] | 725,014
| 725,015
|
u147762850
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, n, m) for (int i = m; i < (n); ++i)
#define repl(i, n) for (long long i = 0; i < (n); ++i)
#define reppl(i, n, m) for (long long i = m; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int a;
cin >> a;
int s = a * (a - 1) / 2;
cout << s << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, n, m) for (int i = m; i < (n); ++i)
#define repl(i, n) for (long long i = 0; i < (n); ++i)
#define reppl(i, n, m) for (long long i = m; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
ll a;
cin >> a;
ll s = a * (a - 1) / 2;
cout << s << endl;
}
|
[
"variable_declaration.type.change"
] | 725,020
| 725,021
|
u772395065
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end() // 昇順ソート
#define rall(v) (v).rbegin(), (v).rend() // 降順ソート
#define INF 1LL << 60
typedef long long int LL;
typedef long long int ll;
#define pll pair<ll, ll>
#define F first
#define S second
const int MOD = 1000000007;
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;
}
// sort(all(x))とするとソートできるよ
// 10^x は pow(10,(x))
// 任意のlogは 対数の底の変換を使う log(N) / log(任意の底)
int main() {
int N;
cin >> N;
if (N == 1)
cout << 0 << endl;
else if (N % 2 == 0)
cout << (N - 1) * N / 2;
else
cout << N * (N - 1) / 2;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end() // 昇順ソート
#define rall(v) (v).rbegin(), (v).rend() // 降順ソート
#define INF 1LL << 60
typedef long long int LL;
typedef long long int ll;
#define pll pair<ll, ll>
#define F first
#define S second
const int MOD = 1000000007;
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;
}
// sort(all(x))とするとソートできるよ
// 10^x は pow(10,(x))
// 任意のlogは 対数の底の変換を使う log(N) / log(任意の底)
int main() {
LL N;
cin >> N;
if (N == 1)
cout << 0 << endl;
else if (N % 2 == 0)
cout << (N - 1) * N / 2;
else
cout << N * (N - 1) / 2;
}
|
[
"variable_declaration.type.change"
] | 725,022
| 725,023
|
u587857074
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = 1; (i) <= (n); (i++))
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define pb push_back
#define eb emplace_back
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
#define printd(x) printf("%.12f\n", ans);
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void) {
int n;
cin >> n;
cout << n * (n + 1) / 2 - n << endl;
return 0;
}
|
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = 1; (i) <= (n); (i++))
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define pb push_back
#define eb emplace_back
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
#define printd(x) printf("%.12f\n", ans);
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void) {
ll n;
cin >> n;
cout << (ll)n * (n + 1) / 2 - n << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 725,024
| 725,025
|
u174509352
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0; i < (n); i++)
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const ll INF = 1e18;
const int MOD = 1e9 + 7;
const double pi = acos(-1);
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0; i < (n); i++)
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const ll INF = 1e18;
const int MOD = 1e9 + 7;
const double pi = acos(-1);
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 725,029
| 725,030
|
u371149954
|
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() {
int N;
cin >> N;
cout << N * (N - 1) / 2 << "\n";
}
|
#include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
ll N;
cin >> N;
cout << N * (N - 1) / 2 << "\n";
}
|
[
"variable_declaration.type.change"
] | 725,031
| 725,032
|
u555962250
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep2(i, s, n) for (int i = s; i < n; ++i)
#define all(a) a.begin(), a.end()
#define tmax(a, b, c) max(a, max(b, c))
#define tmin(a, b, c) min(a, min(b, c))
#define pb push_back
using namespace std;
using ll = long long;
using P = pair<int, int>;
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 int inf = 1001001001;
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)
#define rep2(i, s, n) for (int i = s; i < n; ++i)
#define all(a) a.begin(), a.end()
#define tmax(a, b, c) max(a, max(b, c))
#define tmin(a, b, c) min(a, min(b, c))
#define pb push_back
using namespace std;
using ll = long long;
using P = pair<int, int>;
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 int inf = 1001001001;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 725,033
| 725,034
|
u853721692
|
cpp
|
p02924
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <new>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, ans;
cin >> n;
ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <new>
#include <string>
#include <vector>
using namespace std;
int main() {
long long n, ans;
cin >> n;
ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 725,041
| 725,042
|
u441865202
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<long long> vll;
typedef vector<pair<int, int>> vp;
typedef pair<int, int> pii;
#define INF (int)(1e9)
#define MAXX 1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#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 FOR(i, k, n) for (int i = (k); i < (int)(n); i++)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.begin(), a.end(), greater<int>()
#define ROT(a) a.begin(), a.begin() + 1, a.end()
#define RROT(a) a.begin(), a.end() - 1, a.end()
#define PB push_back
#define MP make_pair
#define PI acos(-1.0)
#define sz(a) a.size()
const ll MOD = 1e9 + 7;
const int MAX = 10000000;
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <typename T> T gcd(T a, T b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
// cout << 'H' << endl;
// next_permutation(ALL(p));
// typedef priority_queue<int> pque;//これは大きい順
// typedef priority_queue<int, vector<int>, greater<int>> pque;//これは小さい順
// factorizeは、素因数分解用の関数
int main() {
int n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<long long> vll;
typedef vector<pair<int, int>> vp;
typedef pair<int, int> pii;
#define INF (int)(1e9)
#define MAXX 1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#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 FOR(i, k, n) for (int i = (k); i < (int)(n); i++)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.begin(), a.end(), greater<int>()
#define ROT(a) a.begin(), a.begin() + 1, a.end()
#define RROT(a) a.begin(), a.end() - 1, a.end()
#define PB push_back
#define MP make_pair
#define PI acos(-1.0)
#define sz(a) a.size()
const ll MOD = 1e9 + 7;
const int MAX = 10000000;
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <typename T> T gcd(T a, T b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
// cout << 'H' << endl;
// next_permutation(ALL(p));
// typedef priority_queue<int> pque;//これは大きい順
// typedef priority_queue<int, vector<int>, greater<int>> pque;//これは小さい順
// factorizeは、素因数分解用の関数
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 725,061
| 725,062
|
u979966078
|
cpp
|
p02924
|
#include <iostream>
using namespace std;
int n;
int main() {
cin >> n;
cout << n * (n - 1) / 2;
}
|
#include <iostream>
using namespace std;
typedef long long ll;
ll n;
int main() {
cin >> n;
cout << n * (n - 1) / 2;
}
|
[] | 725,076
| 725,077
|
u751537640
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
ll n;
cin >> n;
cout << (n - 1) * (n - 2) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"literal.number.change",
"io.output.change"
] | 725,080
| 725,081
|
u701556979
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(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)
using ll = long long;
int main() {
int N;
cin >> N;
ll ans = (N - 1) * (N) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(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)
using ll = long long;
int main() {
ll N;
cin >> N;
ll ans = (N - 1) * (N) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 725,082
| 725,083
|
u174434198
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, ans = 0;
cin >> N;
ans = N * (N - 1) / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, ans = 0;
cin >> N;
ans = N * (N - 1) / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 725,090
| 725,091
|
u160429264
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 999999999
#define rep(i, n) for (int i = 0; i < n; i++)
const int MOD = 1000000007;
int main() {
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 999999999
#define rep(i, n) for (int i = 0; i < n; i++)
const int MOD = 1000000007;
int main() {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 725,097
| 725,098
|
u179593519
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
int n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
ll n;
cin >> n;
ll ans = n * (n - 1) / 2;
cout << ans << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 725,099
| 725,100
|
u146594935
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define rep2(i, m, n) for (int i = (int)m; i < (int)n; i++)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vii; // 2次元配列
typedef vector<ll> vll;
typedef vector<string> vs;
/*FUNCs=================================================*/
/*MAIN==================================================*/
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false); // cin cout 高速化
int n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define rep2(i, m, n) for (int i = (int)m; i < (int)n; i++)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vii; // 2次元配列
typedef vector<ll> vll;
typedef vector<string> vs;
/*FUNCs=================================================*/
/*MAIN==================================================*/
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false); // cin cout 高速化
ll n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 725,101
| 725,102
|
u457985479
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define rep2(i, m, n) for (int i = (int)m; i < (int)n; i++)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vii; // 2次元配列
typedef vector<ll> vll;
typedef vector<string> vs;
/*FUNCs=================================================*/
/*MAIN==================================================*/
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false); // cin cout 高速化
int n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define rep2(i, m, n) for (int i = (int)m; i < (int)n; i++)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vii; // 2次元配列
typedef vector<ll> vll;
typedef vector<string> vs;
/*FUNCs=================================================*/
/*MAIN==================================================*/
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false); // cin cout 高速化
ll n;
cin >> n;
cout << (n * (n - 1)) / 2 << endl;
}
|
[
"variable_declaration.type.change"
] | 725,103
| 725,102
|
u457985479
|
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"
] | 725,104
| 725,105
|
u729703601
|
cpp
|
p02924
|
#include <bits/stdc++.h>
#define INF 1000000000
using namespace std;
int main() {
int n;
cin >> n;
long long ans = n * (n - 1) / 2;
cout << ans << endl;
}
|
#include <bits/stdc++.h>
#define INF 1000000000
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = n * (n - 1) / 2;
cout << ans << endl;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 725,109
| 725,110
|
u023958502
|
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 n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 725,114
| 725,115
|
u745267317
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << (1 + N - 1) * (N - 1) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll N;
cin >> N;
cout << (1 + N - 1) * (N - 1) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change"
] | 725,120
| 725,121
|
u605685616
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
cout << (1 + n - 1) * (n - 1) / 2 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
long int n;
cin >> n;
cout << (1 + n - 1) * (n - 1) / 2 << endl;
}
|
[
"variable_declaration.type.widen.change"
] | 725,122
| 725,123
|
u297398560
|
cpp
|
p02924
|
#include <iostream>
using namespace std;
int main(void) {
int n;
cin >> n;
cout << n * (n - 1) / 2 << "\n";
return 0;
}
|
#include <iostream>
using namespace std;
int main(void) {
long n;
cin >> n;
cout << n * (n - 1) / 2 << "\n";
return 0;
}
|
[
"variable_declaration.type.primitive.change"
] | 725,132
| 725,133
|
u923519425
|
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"
] | 725,136
| 725,137
|
u168860135
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans = N * (N - 1) / 2;
cout << ans << endl;
return 0;
}
|
[] | 725,138
| 725,139
|
u084218424
|
cpp
|
p02924
|
#include <iostream>
using namespace std;
typedef long long ll;
int main(void) {
ll n;
cin >> n;
cout << n * (n + 1) / 2 << endl;
}
|
#include <iostream>
using namespace std;
typedef long long ll;
int main(void) {
ll n;
cin >> n;
cout << n * (n - 1) / 2 << endl;
}
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 725,140
| 725,141
|
u050428930
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;
const int INF = 1e9;
const ll INFLL = 1e18;
const int MOD = 1e9 + 7;
const int NIL = -1;
const ld PI = acos(-1);
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(n) n.begin(), n.end()
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;
}
#define DEBUG
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
// cout << fixed << setprecision(6);
ll n;
cin >> n;
cout << ((n + 1) * n) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;
const int INF = 1e9;
const ll INFLL = 1e18;
const int MOD = 1e9 + 7;
const int NIL = -1;
const ld PI = acos(-1);
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(n) n.begin(), n.end()
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;
}
#define DEBUG
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
// cout << fixed << setprecision(6);
ll n;
cin >> n;
cout << ((n - 1) * n) / 2 << endl;
return 0;
}
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 725,142
| 725,143
|
u959682820
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;
const int INF = 1e9;
const ll INFLL = 1e18;
const int MOD = 1e9 + 7;
const int NIL = -1;
const ld PI = acos(-1);
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(n) n.begin(), n.end()
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;
}
#define DEBUG
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
// cout << fixed << setprecision(6);
int n;
cin >> n;
cout << ((n + 1) * n) / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;
const int INF = 1e9;
const ll INFLL = 1e18;
const int MOD = 1e9 + 7;
const int NIL = -1;
const ld PI = acos(-1);
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(n) n.begin(), n.end()
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;
}
#define DEBUG
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
// cout << fixed << setprecision(6);
ll n;
cin >> n;
cout << ((n - 1) * n) / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 725,144
| 725,143
|
u959682820
|
cpp
|
p02924
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
cout << (N - 1) * N / 2 << endl;
return 0;
}
|
[
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 725,152
| 725,153
|
u979852867
|
cpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.