Datasets:

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
9 values
p02988
#include <stdio.h> int main(void) { int n, i, d = 0; scanf("%d", &n); int p[n]; for (i == 0; i < n; i++) { scanf("%d", &p[i]); } for (i == 1; i < n - 1; i++) { if ((p[i] <= p[i + 1] && p[i] >= p[i - 1]) || (p[i] >= p[i + 1] && p[i] <= p[i - 1])) { d++; } } printf("%d", d); }
#include <stdio.h> int main(void) { int n, i, d = 0; scanf("%d", &n); int p[n]; for (i = 0; i < n; i++) { scanf("%d", &p[i]); } for (i = 1; i < n - 1; i++) { if ((p[i] <= p[i + 1] && p[i] >= p[i - 1]) || (p[i] >= p[i + 1] && p[i] <= p[i - 1])) { d = d + 1; } } printf("%d", d); }
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo", "assignment.change" ]
796,342
796,343
u222643545
cpp
p02988
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; int p[N + 10]; int count; for (int i = 0; i < N; i++) { cin >> p[i]; } for (int i = 1; i < N - 1; i++) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) { count++; } else if (p[i - 1] > p[i] && p[i] > p[i + 1]) { count++; } } cout << count << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N; cin >> N; int p[N + 10]; int count = 0; for (int i = 0; i < N; i++) { cin >> p[i]; } for (int i = 1; i < N - 1; i++) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) { count++; } else if (p[i - 1] > p[i] && p[i] > p[i + 1]) { count++; } } cout << count << endl; return 0; }
[ "variable_declaration.value.change" ]
796,365
796,366
u661461084
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n, cnt; cin >> n; vector<int> p(n); for (int i = 0; i < n; ++i) { cin >> p[i]; } for (int i = 1; i < n - 1; ++i) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) { ++cnt; } else if (p[i - 1] > p[i] && p[i] > p[i + 1]) { ++cnt; } } cout << cnt << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, cnt = 0; cin >> n; vector<int> p(n); for (int i = 0; i < n; ++i) { cin >> p[i]; } for (int i = 1; i < n - 1; ++i) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) { ++cnt; } else if (p[i - 1] > p[i] && p[i] > p[i + 1]) { ++cnt; } } cout << cnt << endl; return 0; }
[ "variable_declaration.value.change" ]
796,373
796,374
u673281957
cpp
p02988
#include <stdio.h> #define max(a, b) (a < b ? b : a) #define min(a, b) (a < b ? a : b) int main(void) { int N; scanf("%d", &N); int p[20]; for (int i = 0; i < N; i++) { scanf("%d", p[i]); } int cnt = 0; for (int i = 1; i < N - 1; i++) { int ma = max(max(p[i - 1], p[i]), p[i + 1]); int mi = min(min(p[i - 1], p[i]), p[i + 1]); if ((ma != p[i]) && (mi != p[i])) { cnt++; } } printf("%d", cnt); }
#include <stdio.h> #define max(a, b) (a < b ? b : a) #define min(a, b) (a < b ? a : b) int main(void) { int N; scanf("%d", &N); int p[20]; for (int i = 0; i < N; i++) { scanf("%d", &p[i]); } int cnt = 0; for (int i = 1; i < N - 1; i++) { int ma = max(max(p[i - 1], p[i]), p[i + 1]); int mi = min(min(p[i - 1], p[i]), p[i + 1]); if ((ma != p[i]) && (mi != p[i])) { cnt++; } } printf("%d", cnt); }
[ "expression.operation.unary.reference.add" ]
796,385
796,386
u245335950
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n + 1]; for (int i = 1; i <= n; i++) cin >> a[i]; int ans = 0; for (int i = 1; i <= n - 1; i++) if ((a[i - 1] < a[i] && a[i + 1] > a[i]) || (a[i - 1] > a[i] && a[i + 1] < a[i])) ans++; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n + 1]; for (int i = 1; i <= n; i++) cin >> a[i]; int ans = 0; for (int i = 2; i <= n - 1; i++) if ((a[i - 1] < a[i] && a[i + 1] > a[i]) || (a[i - 1] > a[i] && a[i + 1] < a[i])) ans++; cout << ans << endl; }
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
796,394
796,395
u678652070
cpp
p02988
#include "bits/stdc++.h" using namespace std; #define ll long long #define endl '\n' #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = int(a); i < int(b); i++) #define pb emplace_back #define all(x) (x).begin(), (x).end() ll mod = 1e9 + 7; ll mod2 = 998244353; const int INF = 1e9; signed main() { ll n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; ll ans = 0; rep(i, n - 2) { if ((a[i] < a[i + 1] && a[i + 2] < a[i + 1]) || (a[i] > a[i + 1] && a[i + 2] < a[i + 1])) ans++; } cout << ans << endl; } // `.`..`(WNNNNNNMNWWWH9rttwgHM8OtttwwVtttrrtrttrw0rtrtwrrrtrZUAOOrrrXWppHMHyZHpWHMHMkWWVHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`.`..`(WMNMHfWH9ZtrtAdNM8ttttOwVtrrtrrtrrrrrdrrttrZkOrrrrrrXWyrtrrZWWWWMmwXWppWHHMmWHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // .`.```_..(HMfWH9OtttwXWHBrttrOw0rttrOvrrrtrZrrRrtrrrtZHwrrrrrwwZHyrrrrZWWpWMmwWppkWHHMkHNkVWMNNNNN#NN#NN#NN#NN#NN#NN#NN#NN#NN#NNNN // .``.. // ..HNfWW9wtrrOdWHM0trttOdSrtrtwwrtrtrw0twSrtOrrrrZHwtrrrrrXwdWwrrrrXHppWNkXWpkvWH@MkHMHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`. // -jMWWXXwtrttO0d@BrtrttwXVrtrrwVrrrtrtXrrd0rrX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r..` UkWOlllllldW$..?! ` ` // ?@MMHHMM#NMMmMkXXWkHuzuzuWNHSXHHHuuXNSWuzuuzuzuzuWkHNgMkkkMHSuWkqmqHHMNNK // WHMkvvrvrXHHMppHHHMNMTN_``` 4kWOz====vXP` ` ` // ``.HggmgM@MH###NKkkuXWHzzuXHHMzdMHHuzWNXKzuuzuzuzuuHkHHNMkkHHBuzWkHHHHuHMMM // WHHNzvvrvwHMMppHMMMM>.#L`````?kyy====?0S`` ` ` // ``...dmqqqmmHHHMMM#WRSzuzWHuzXHq#uWHHHzuWHXKzuzzuzuzuXHkHWMNkWM#uzuWHHHHSuuWM# // WM@MkwvvrzXMMHpgHMMM[.MN.`````(HXy1???zd.`` ` ` ` // dHkkqkkqkHHHHHHMMWWXzzuzwWwXHHKXMkHHuXMRXSuuuzuuzuzXHkHdHHWHHXuuwWHqHHuXzXWM // XHHMNyrvvwdW@HpHWMHML MM[` ` `.4kGz<<>Or``` ` // `dWpbbbbbHMMbbbHHMXXuzzuzuzXWHHSXMkHHuXMSXuzzuzzuzuzWkkHWMHMSwuzzXHkHHXuzuWd# // dHHH@NyzwwwWHMHHWMMMR dW]`` ` ```(HZx<<<4.```` `` `` // OZppfppppWfpWpK9NKXuuzuuzuXWHHudMqNHXWNuHuzzuzuzuzuHkHXMMBuuuzuuWkHHUuuuXSMS // wWHMMMMkwwvdNpHHHM#MH-jWP``` `` ```7kI<:<h.``````` `` // ,2OWVVyVVyWWWWIdMKWzuuuzzuXHHSwHHHHKXHHXSuuzuuzuzuXHHHXMXuuuuuuXHHHuzuuXSX#X // wdWHMMMMmwXwHbpMNHMM@b.hb``````````` // 7x1_(>_```````````(x7UUUV0XwvCI1dMWKXuzzuzuWHHudMkgkWbMSXuzzzuzzuzuWkHSW#zXwXuXXWHHuuXXuWXWSX // vvXWHMMHWNkvWHbbMWMMMN_JF.```` `` // `````?1_(_.`.`........(<777=<<<><<+dMXUuzuuuuWWMRwMHWMkWHHXSuuzuzuzzuXqHHXMHUXuXXHHHSuuwuXWud8uH // mzzXWH#zHbHkXNbbWMMMMD~(_``````````````` // .~_`.``.`.`.....___(<~(<<(<<dHkkuuuuuXkHHuWMkHkkkHSXXzuuzuuuuzXHHSd#uuXXWHHXuuuZuXSuqHudS // UHzzXWSXXWbbHHHbWHMH#<~...```` ``````````````.```.` // -_____<~~_<_<~~(jMWSuzuzuXWHMHXMHHHkkH#XSuzzuzuzuzuKkHXMQkWHHWUXuXXUuXUuXHuXBu // .(Smd8wSvXbbbbHHHWHW3___.``````` `` // ``````.```.```.`...._.._~~..~_~~(#WuzuuzXXkHMqMMHMkkkMUXuXzuuwuuzuXkHSWMWUUuuuXXUUuXHXXWSuXHXu // .. JKwSvwzWkkkkHHHH5~~..```````````````````.```.````````.` // .........dWSuuzzzdkHMW@MHMkkkHHXXuzuuXSuzuuWWHd#uuuXXkWSuXXWUXXHUXWHuuu // .`(HXSzzzzwWbkWHNHr_...``````````````````.```````.```````.`.`..`.-.(HKuzzuuwHHMNMHHMkkkHHuZuuzuuXuuuuXkHWMHHHUUuXXXWHXXHHUuXW8uuuu // .-MXWwzzzuzXkHHMHHN-.`````````` // ````````````.`.````.``.```.`.`....-dXUXuzuXHWHMMHHBWHMMMSZuzuuzXXzuuXHHMHMHkHHHHHHHWHHSuXkHWSuuuuX // (#XKzzzzzuzuWHHkWHHp // ``.````````````````````````.````````.....-((-(NSXuzzXHW@D:~`(/1- // .kXuzuuzXSuuzXXkHWMHHHHHHHHMWuuuQXUXWuuuXuXH // MXWzuzzzzzuXHHbHNMMMt`.```````````````````````````.`.` ..-J7"!`` // XKuzzuXHHM9;/<-.J-u!JXXuuzuXWuuuuXHHH#WMNHmkkkuXXkWUXXWXXuuuXqHH // XWzzzzuzzwXHHHH#"````<.````````````````````.``.`...-c"7``` ` ` // `(BzuuuXmHH8<!(- ?_!`jWUuzuuuWuuuzXWHNH> ..7WHHqHmQkWWXXuuuuuXWqHH // SwuzzzXuwXHNHY`` `` <,`.`````````````` `` ..J7=``` ` ` `` // ````.#zuzXXHHH$~`` ```(_(HSuuuzuXSuzuuXHHWCi(` ._ ?WggHHHHWkkkkWHHHHMH // zzzuzuzwWHMY!` ` ` `(&.```````````` ..J7^ `` ` ` ` ` `. .HXuuXWHW#!` ` // ```` (WUuzzuXXSzuuudHHXY$. : (..``.THHkqkHHHgHHMHkkk zzzzzzXHWK`` ` `` ` ` ` // TJ.``````..J7=```` ` ` ` ` `` ` `.8zuXXHHW=` `` // ..(XSuuuuuXWuuuuXHWH5~~` .`_?_,-``.TMMMMMMHkkqqHHH zzuuzdHHkN ` ` ` `` ` // ``(Wm,.(J7!``` ` ``` `` `` ` ` ``` .SzuXWHHY `` // .._~<~~(dSuuuzzXHuuuuXHWHD::?C._.( -`(!_1 ,WHqHHHmqHHHHN zuzXXHHkHM;` ` ` ` // `` ` .;jY= ` .``_`` ` ` ` ` `` ` `.dXuXWm@^ // .._~_.~~~~~(d0uuzuuXHUuuuXHWH5:::::::_.<&._4r?_.;WMMM@MMY"<!` zzXHHHHMHMb`` // `` ` `` `` .J! ` ..`_~ ` ` ` `` ` ` ``.JXXXHY! // .__.....~.~~~-d0wuzuXXHSuuuXWWH$::::;:::;:+- ~`(.i +HqHHkkHL..`. XWHHHMMHMHM; // ` ` ` ` ._`` ...(:.=_` ` ` ` ` ```` // .-dVT7^``````......~~~~~_jWuuuuuXHSuzuXHHH3<;:::::;;j<+z ``` -dHNkkMqkkN..`` // HHHMMHHHHNMN.`` ` ` `!`z(. ~..~ ! . ` `` ` ` ` // ..gHr``````````........~~~~_jWuuuuuXkSuuuXHWHC:;::;;:::+v>:((J<!(WHHMkkHNqkM;`.. // HMMkkHHHHM9?b `` ` ` `` .``. ` ` ` ` ``` 4HkkkH, // ``````.`......~~~~_+KuuuzuXHSuuuXHHK<(::::::<;<J+g9>::;< .4NkkqMHqH]..` // MHkHHHMM$<<:?L` `` ` ` ` ``.` ` !`` ` ` ` ` ` // ?HbkkHx``````.`..`...~~~~_jKuuuuuXHSuuuqMHD<:<;:<++ddNMB3:;::;:<` // `,HkkqH@HH].`` kkHHkHY``` (;?h`` ` ` `` ```` ` ` ` ` ` ` ` ` // ```.4XWbHx```..`......~~~~_gKuuuuXWH0uuuXHH3:;++1z<jgMB3<::::::::~` // `jMkqkHMHHF.`. kHHHH=` . ` _<?L ` ` ` ` ` ` ` ` ` ` ` ` ` ` ?kwWHp // .`.......~_~~(dKuuuuXWHUuuXWH9++z1<;+jWB3::::;;;::;:;_`` MNkqkqMNMF..` HHk@!. // ` ` ` ~?L ` ` `` ` `` `` ` ` ` ` ` ` ` ` // -WuXHh..`.....~~~~(dWuuuXXkHUuuXHH9>:<:++YY<:;::::;:::::;:::+.``?HHkHHHM>`.`
#include "bits/stdc++.h" using namespace std; #define ll long long #define endl '\n' #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = int(a); i < int(b); i++) #define pb emplace_back #define all(x) (x).begin(), (x).end() ll mod = 1e9 + 7; ll mod2 = 998244353; const int INF = 1e9; signed main() { ll n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; ll ans = 0; rep(i, n - 2) { if ((a[i] < a[i + 1] && a[i + 2] > a[i + 1]) || (a[i] > a[i + 1] && a[i + 2] < a[i + 1])) ans++; } cout << ans << endl; } // `.`..`(WNNNNNNMNWWWH9rttwgHM8OtttwwVtttrrtrttrw0rtrtwrrrtrZUAOOrrrXWppHMHyZHpWHMHMkWWVHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`.`..`(WMNMHfWH9ZtrtAdNM8ttttOwVtrrtrrtrrrrrdrrttrZkOrrrrrrXWyrtrrZWWWWMmwXWppWHHMmWHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // .`.```_..(HMfWH9OtttwXWHBrttrOw0rttrOvrrrtrZrrRrtrrrtZHwrrrrrwwZHyrrrrZWWpWMmwWppkWHHMkHNkVWMNNNNN#NN#NN#NN#NN#NN#NN#NN#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uzXMKXuzuuzuzzuzdkHHHHHkHWMHHbkWHMMMNXM# // Wg#rvrvrrXmHNpfHHHMMRd-.._4kfyttttllOHWr`` // <udT"""7"""""TMHHMNHHMNgv4HMRXHXHwuzzzuWHHKXHkHzzXMSWzuzzuzuuzudbkHHHHkkHqHuWkWHHMMMNWM // WHNrvrvvvXHmNppgg@MMMHr..` UkWOlllllldW$..?! ` ` // ?@MMHHMM#NMMmMkXXWkHuzuzuWNHSXHHHuuXNSWuzuuzuzuzuWkHNgMkkkMHSuWkqmqHHMNNK // WHMkvvrvrXHHMppHHHMNMTN_``` 4kWOz====vXP` ` ` // ``.HggmgM@MH###NKkkuXWHzzuXHHMzdMHHuzWNXKzuuzuzuzuuHkHHNMkkHHBuzWkHHHHuHMMM // WHHNzvvrvwHMMppHMMMM>.#L`````?kyy====?0S`` ` ` // ``...dmqqqmmHHHMMM#WRSzuzWHuzXHq#uWHHHzuWHXKzuzzuzuzuXHkHWMNkWM#uzuWHHHHSuuWM# // WM@MkwvvrzXMMHpgHMMM[.MN.`````(HXy1???zd.`` ` ` ` // dHkkqkkqkHHHHHHMMWWXzzuzwWwXHHKXMkHHuXMRXSuuuzuuzuzXHkHdHHWHHXuuwWHqHHuXzXWM // XHHMNyrvvwdW@HpHWMHML MM[` ` `.4kGz<<>Or``` ` // `dWpbbbbbHMMbbbHHMXXuzzuzuzXWHHSXMkHHuXMSXuzzuzzuzuzWkkHWMHMSwuzzXHkHHXuzuWd# // dHHH@NyzwwwWHMHHWMMMR dW]`` ` ```(HZx<<<4.```` `` `` // OZppfppppWfpWpK9NKXuuzuuzuXWHHudMqNHXWNuHuzzuzuzuzuHkHXMMBuuuzuuWkHHUuuuXSMS // wWHMMMMkwwvdNpHHHM#MH-jWP``` `` ```7kI<:<h.``````` `` // ,2OWVVyVVyWWWWIdMKWzuuuzzuXHHSwHHHHKXHHXSuuzuuzuzuXHHHXMXuuuuuuXHHHuzuuXSX#X // wdWHMMMMmwXwHbpMNHMM@b.hb``````````` // 7x1_(>_```````````(x7UUUV0XwvCI1dMWKXuzzuzuWHHudMkgkWbMSXuzzzuzzuzuWkHSW#zXwXuXXWHHuuXXuWXWSX // vvXWHMMHWNkvWHbbMWMMMN_JF.```` `` // `````?1_(_.`.`........(<777=<<<><<+dMXUuzuuuuWWMRwMHWMkWHHXSuuzuzuzzuXqHHXMHUXuXXHHHSuuwuXWud8uH // mzzXWH#zHbHkXNbbWMMMMD~(_``````````````` // .~_`.``.`.`.....___(<~(<<(<<dHkkuuuuuXkHHuWMkHkkkHSXXzuuzuuuuzXHHSd#uuXXWHHXuuuZuXSuqHudS // UHzzXWSXXWbbHHHbWHMH#<~...```` ``````````````.```.` // -_____<~~_<_<~~(jMWSuzuzuXWHMHXMHHHkkH#XSuzzuzuzuzuKkHXMQkWHHWUXuXXUuXUuXHuXBu // .(Smd8wSvXbbbbHHHWHW3___.``````` `` // ``````.```.```.`...._.._~~..~_~~(#WuzuuzXXkHMqMMHMkkkMUXuXzuuwuuzuXkHSWMWUUuuuXXUUuXHXXWSuXHXu // .. JKwSvwzWkkkkHHHH5~~..```````````````````.```.````````.` // .........dWSuuzzzdkHMW@MHMkkkHHXXuzuuXSuzuuWWHd#uuuXXkWSuXXWUXXHUXWHuuu // .`(HXSzzzzwWbkWHNHr_...``````````````````.```````.```````.`.`..`.-.(HKuzzuuwHHMNMHHMkkkHHuZuuzuuXuuuuXkHWMHHHUUuXXXWHXXHHUuXW8uuuu // .-MXWwzzzuzXkHHMHHN-.`````````` // ````````````.`.````.``.```.`.`....-dXUXuzuXHWHMMHHBWHMMMSZuzuuzXXzuuXHHMHMHkHHHHHHHWHHSuXkHWSuuuuX // (#XKzzzzzuzuWHHkWHHp // ``.````````````````````````.````````.....-((-(NSXuzzXHW@D:~`(/1- // .kXuzuuzXSuuzXXkHWMHHHHHHHHMWuuuQXUXWuuuXuXH // MXWzuzzzzzuXHHbHNMMMt`.```````````````````````````.`.` ..-J7"!`` // XKuzzuXHHM9;/<-.J-u!JXXuuzuXWuuuuXHHH#WMNHmkkkuXXkWUXXWXXuuuXqHH // XWzzzzuzzwXHHHH#"````<.````````````````````.``.`...-c"7``` ` ` // `(BzuuuXmHH8<!(- ?_!`jWUuzuuuWuuuzXWHNH> ..7WHHqHmQkWWXXuuuuuXWqHH // SwuzzzXuwXHNHY`` `` <,`.`````````````` `` ..J7=``` ` ` `` // ````.#zuzXXHHH$~`` ```(_(HSuuuzuXSuzuuXHHWCi(` ._ ?WggHHHHWkkkkWHHHHMH // zzzuzuzwWHMY!` ` ` `(&.```````````` ..J7^ `` ` ` ` ` `. .HXuuXWHW#!` ` // ```` (WUuzzuXXSzuuudHHXY$. : (..``.THHkqkHHHgHHMHkkk zzzzzzXHWK`` ` `` ` ` ` // TJ.``````..J7=```` ` ` ` ` `` ` `.8zuXXHHW=` `` // ..(XSuuuuuXWuuuuXHWH5~~` .`_?_,-``.TMMMMMMHkkqqHHH zzuuzdHHkN ` ` ` `` ` // ``(Wm,.(J7!``` ` ``` `` `` ` ` ``` .SzuXWHHY `` // .._~<~~(dSuuuzzXHuuuuXHWHD::?C._.( -`(!_1 ,WHqHHHmqHHHHN zuzXXHHkHM;` ` ` ` // `` ` .;jY= ` .``_`` ` ` ` ` `` ` `.dXuXWm@^ // .._~_.~~~~~(d0uuzuuXHUuuuXHWH5:::::::_.<&._4r?_.;WMMM@MMY"<!` zzXHHHHMHMb`` // `` ` `` `` .J! ` ..`_~ ` ` ` `` ` ` ``.JXXXHY! // .__.....~.~~~-d0wuzuXXHSuuuXWWH$::::;:::;:+- ~`(.i +HqHHkkHL..`. XWHHHMMHMHM; // ` ` ` ` ._`` ...(:.=_` ` ` ` ` ```` // .-dVT7^``````......~~~~~_jWuuuuuXHSuzuXHHH3<;:::::;;j<+z ``` -dHNkkMqkkN..`` // HHHMMHHHHNMN.`` ` ` `!`z(. ~..~ ! . ` `` ` ` ` // ..gHr``````````........~~~~_jWuuuuuXkSuuuXHWHC:;::;;:::+v>:((J<!(WHHMkkHNqkM;`.. // HMMkkHHHHM9?b `` ` ` `` .``. ` ` ` ` ``` 4HkkkH, // ``````.`......~~~~_+KuuuzuXHSuuuXHHK<(::::::<;<J+g9>::;< .4NkkqMHqH]..` // MHkHHHMM$<<:?L` `` ` ` ` ``.` ` !`` ` ` ` ` ` // ?HbkkHx``````.`..`...~~~~_jKuuuuuXHSuuuqMHD<:<;:<++ddNMB3:;::;:<` // `,HkkqH@HH].`` kkHHkHY``` (;?h`` ` ` `` ```` ` ` ` ` ` ` ` ` // ```.4XWbHx```..`......~~~~_gKuuuuXWH0uuuXHH3:;++1z<jgMB3<::::::::~` // `jMkqkHMHHF.`. kHHHH=` . ` _<?L ` ` ` ` ` ` ` ` ` ` ` ` ` ` ?kwWHp // .`.......~_~~(dKuuuuXWHUuuXWH9++z1<;+jWB3::::;;;::;:;_`` MNkqkqMNMF..` HHk@!. // ` ` ` ~?L ` ` `` ` `` `` ` ` ` ` ` ` ` ` // -WuXHh..`.....~~~~(dWuuuXXkHUuuXHH9>:<:++YY<:;::::;:::::;:::+.``?HHkHHHM>`.`
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
796,400
796,401
u890465662
cpp
p02988
#include "bits/stdc++.h" using namespace std; #define ll long long #define endl '\n' #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = int(a); i < int(b); i++) #define pb emplace_back #define all(x) (x).begin(), (x).end() ll mod = 1e9 + 7; ll mod2 = 998244353; const int INF = 1e9; signed main() { ll n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; ll ans = 0; rep(i, n - 2) { if ((a[i] < a[i + 1] && a[i + 2] < a[i + 1]) || (a[i] > a[i + 1] && a[i + 2] > a[i + 1])) ans++; } cout << ans << endl; } // `.`..`(WNNNNNNMNWWWH9rttwgHM8OtttwwVtttrrtrttrw0rtrtwrrrtrZUAOOrrrXWppHMHyZHpWHMHMkWWVHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN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]`` ` ```(HZx<<<4.```` `` `` // OZppfppppWfpWpK9NKXuuzuuzuXWHHudMqNHXWNuHuzzuzuzuzuHkHXMMBuuuzuuWkHHUuuuXSMS // wWHMMMMkwwvdNpHHHM#MH-jWP``` `` ```7kI<:<h.``````` `` // ,2OWVVyVVyWWWWIdMKWzuuuzzuXHHSwHHHHKXHHXSuuzuuzuzuXHHHXMXuuuuuuXHHHuzuuXSX#X // wdWHMMMMmwXwHbpMNHMM@b.hb``````````` // 7x1_(>_```````````(x7UUUV0XwvCI1dMWKXuzzuzuWHHudMkgkWbMSXuzzzuzzuzuWkHSW#zXwXuXXWHHuuXXuWXWSX // vvXWHMMHWNkvWHbbMWMMMN_JF.```` `` // `````?1_(_.`.`........(<777=<<<><<+dMXUuzuuuuWWMRwMHWMkWHHXSuuzuzuzzuXqHHXMHUXuXXHHHSuuwuXWud8uH // mzzXWH#zHbHkXNbbWMMMMD~(_``````````````` // .~_`.``.`.`.....___(<~(<<(<<dHkkuuuuuXkHHuWMkHkkkHSXXzuuzuuuuzXHHSd#uuXXWHHXuuuZuXSuqHudS // UHzzXWSXXWbbHHHbWHMH#<~...```` ``````````````.```.` // -_____<~~_<_<~~(jMWSuzuzuXWHMHXMHHHkkH#XSuzzuzuzuzuKkHXMQkWHHWUXuXXUuXUuXHuXBu // .(Smd8wSvXbbbbHHHWHW3___.``````` `` // ``````.```.```.`...._.._~~..~_~~(#WuzuuzXXkHMqMMHMkkkMUXuXzuuwuuzuXkHSWMWUUuuuXXUUuXHXXWSuXHXu // .. JKwSvwzWkkkkHHHH5~~..```````````````````.```.````````.` // .........dWSuuzzzdkHMW@MHMkkkHHXXuzuuXSuzuuWWHd#uuuXXkWSuXXWUXXHUXWHuuu // .`(HXSzzzzwWbkWHNHr_...``````````````````.```````.```````.`.`..`.-.(HKuzzuuwHHMNMHHMkkkHHuZuuzuuXuuuuXkHWMHHHUUuXXXWHXXHHUuXW8uuuu // .-MXWwzzzuzXkHHMHHN-.`````````` // ````````````.`.````.``.```.`.`....-dXUXuzuXHWHMMHHBWHMMMSZuzuuzXXzuuXHHMHMHkHHHHHHHWHHSuXkHWSuuuuX // (#XKzzzzzuzuWHHkWHHp // ``.````````````````````````.````````.....-((-(NSXuzzXHW@D:~`(/1- // .kXuzuuzXSuuzXXkHWMHHHHHHHHMWuuuQXUXWuuuXuXH // MXWzuzzzzzuXHHbHNMMMt`.```````````````````````````.`.` ..-J7"!`` // XKuzzuXHHM9;/<-.J-u!JXXuuzuXWuuuuXHHH#WMNHmkkkuXXkWUXXWXXuuuXqHH // XWzzzzuzzwXHHHH#"````<.````````````````````.``.`...-c"7``` ` ` // `(BzuuuXmHH8<!(- ?_!`jWUuzuuuWuuuzXWHNH> ..7WHHqHmQkWWXXuuuuuXWqHH // SwuzzzXuwXHNHY`` `` <,`.`````````````` `` ..J7=``` ` ` `` // ````.#zuzXXHHH$~`` ```(_(HSuuuzuXSuzuuXHHWCi(` ._ ?WggHHHHWkkkkWHHHHMH // zzzuzuzwWHMY!` ` ` `(&.```````````` ..J7^ `` ` ` ` ` `. .HXuuXWHW#!` ` // ```` (WUuzzuXXSzuuudHHXY$. : (..``.THHkqkHHHgHHMHkkk zzzzzzXHWK`` ` `` ` ` ` // TJ.``````..J7=```` ` ` ` ` `` ` `.8zuXXHHW=` `` // ..(XSuuuuuXWuuuuXHWH5~~` .`_?_,-``.TMMMMMMHkkqqHHH zzuuzdHHkN ` ` ` `` ` // ``(Wm,.(J7!``` ` ``` `` `` ` ` ``` .SzuXWHHY `` // .._~<~~(dSuuuzzXHuuuuXHWHD::?C._.( -`(!_1 ,WHqHHHmqHHHHN zuzXXHHkHM;` ` ` ` // `` ` .;jY= ` .``_`` ` ` ` ` `` ` `.dXuXWm@^ // .._~_.~~~~~(d0uuzuuXHUuuuXHWH5:::::::_.<&._4r?_.;WMMM@MMY"<!` zzXHHHHMHMb`` // `` ` `` `` .J! ` ..`_~ ` ` ` `` ` ` ``.JXXXHY! // .__.....~.~~~-d0wuzuXXHSuuuXWWH$::::;:::;:+- ~`(.i +HqHHkkHL..`. XWHHHMMHMHM; // ` ` ` ` ._`` ...(:.=_` ` ` ` ` ```` // .-dVT7^``````......~~~~~_jWuuuuuXHSuzuXHHH3<;:::::;;j<+z ``` -dHNkkMqkkN..`` // HHHMMHHHHNMN.`` ` ` `!`z(. ~..~ ! . ` `` ` ` ` // ..gHr``````````........~~~~_jWuuuuuXkSuuuXHWHC:;::;;:::+v>:((J<!(WHHMkkHNqkM;`.. // HMMkkHHHHM9?b `` ` ` `` .``. ` ` ` ` ``` 4HkkkH, // ``````.`......~~~~_+KuuuzuXHSuuuXHHK<(::::::<;<J+g9>::;< .4NkkqMHqH]..` // MHkHHHMM$<<:?L` `` ` ` ` ``.` ` !`` ` ` ` ` ` // ?HbkkHx``````.`..`...~~~~_jKuuuuuXHSuuuqMHD<:<;:<++ddNMB3:;::;:<` // `,HkkqH@HH].`` kkHHkHY``` (;?h`` ` ` `` ```` ` ` ` ` ` ` ` ` // ```.4XWbHx```..`......~~~~_gKuuuuXWH0uuuXHH3:;++1z<jgMB3<::::::::~` // `jMkqkHMHHF.`. kHHHH=` . ` _<?L ` ` ` ` ` ` ` ` ` ` ` ` ` ` ?kwWHp // .`.......~_~~(dKuuuuXWHUuuXWH9++z1<;+jWB3::::;;;::;:;_`` MNkqkqMNMF..` HHk@!. // ` ` ` ~?L ` ` `` ` `` `` ` ` ` ` ` ` ` ` // -WuXHh..`.....~~~~(dWuuuXXkHUuuXHH9>:<:++YY<:;::::;:::::;:::+.``?HHkHHHM>`.`
#include "bits/stdc++.h" using namespace std; #define ll long long #define endl '\n' #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = int(a); i < int(b); i++) #define pb emplace_back #define all(x) (x).begin(), (x).end() ll mod = 1e9 + 7; ll mod2 = 998244353; const int INF = 1e9; signed main() { ll n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; ll ans = 0; rep(i, n - 2) { if ((a[i] < a[i + 1] && a[i + 2] > a[i + 1]) || (a[i] > a[i + 1] && a[i + 2] < a[i + 1])) ans++; } cout << ans << endl; } // `.`..`(WNNNNNNMNWWWH9rttwgHM8OtttwwVtttrrtrttrw0rtrtwrrrtrZUAOOrrrXWppHMHyZHpWHMHMkWWVHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`.`..`(WMNMHfWH9ZtrtAdNM8ttttOwVtrrtrrtrrrrrdrrttrZkOrrrrrrXWyrtrrZWWWWMmwXWppWHHMmWHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // .`.```_..(HMfWH9OtttwXWHBrttrOw0rttrOvrrrtrZrrRrtrrrtZHwrrrrrwwZHyrrrrZWWpWMmwWppkWHHMkHNkVWMNNNNN#NN#NN#NN#NN#NN#NN#NN#NN#NN#NNNN // .``.. // ..HNfWW9wtrrOdWHM0trttOdSrtrtwwrtrtrw0twSrtOrrrrZHwtrrrrrXwdWwrrrrXHppWNkXWpkvWH@MkHMHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`. // -jMWWXXwtrttO0d@BrtrttwXVrtrrwVrrrtrtXrrd0rrXrrrrrZWyrrrrrrZXwWyZOrrvWWpWMkZHbkwrdHMMKMMNHkHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`. // v8Xdk9ttttrOwXM0tttrtwXwwrtrw0rrtrrtwKrrd0rrXrtrrrrZHkwrrrrrrXkVkrrrvrZHWpHHkWkwrwvVHHNWMMMMkWMNNNNNNN#NN#NN#NN#NN#NN#NN#NNNN // .. // JHZdbKOrrrtrtwWWOOttrOwSzVrOrw0rrttrrrdRrrdZrrdOrtrtrrZHkXwrrrrrZWXHwwrrrvWWWWNkWkvrrrwWM@RMMMNNmWMNNNNNNNNNNNNNNNNNNNNNNNNNNNN // . // .JGXHStttttrtwW9OrtrrrdSX0rtrdStrtrtrrwHVrrdkrrtSrrrrrrrdMyXrrrrrvXWX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HuXMRXSuuuzuuzuzXHkHdHHWHHXuuwWHqHHuXzXWM // XHHMNyrvvwdW@HpHWMHML MM[` ` `.4kGz<<>Or``` ` // `dWpbbbbbHMMbbbHHMXXuzzuzuzXWHHSXMkHHuXMSXuzzuzzuzuzWkkHWMHMSwuzzXHkHHXuzuWd# // dHHH@NyzwwwWHMHHWMMMR dW]`` ` ```(HZx<<<4.```` `` `` // OZppfppppWfpWpK9NKXuuzuuzuXWHHudMqNHXWNuHuzzuzuzuzuHkHXMMBuuuzuuWkHHUuuuXSMS // wWHMMMMkwwvdNpHHHM#MH-jWP``` `` ```7kI<:<h.``````` `` // ,2OWVVyVVyWWWWIdMKWzuuuzzuXHHSwHHHHKXHHXSuuzuuzuzuXHHHXMXuuuuuuXHHHuzuuXSX#X // wdWHMMMMmwXwHbpMNHMM@b.hb``````````` // 7x1_(>_```````````(x7UUUV0XwvCI1dMWKXuzzuzuWHHudMkgkWbMSXuzzzuzzuzuWkHSW#zXwXuXXWHHuuXXuWXWSX // vvXWHMMHWNkvWHbbMWMMMN_JF.```` `` // `````?1_(_.`.`........(<777=<<<><<+dMXUuzuuuuWWMRwMHWMkWHHXSuuzuzuzzuXqHHXMHUXuXXHHHSuuwuXWud8uH // mzzXWH#zHbHkXNbbWMMMMD~(_``````````````` // .~_`.``.`.`.....___(<~(<<(<<dHkkuuuuuXkHHuWMkHkkkHSXXzuuzuuuuzXHHSd#uuXXWHHXuuuZuXSuqHudS // UHzzXWSXXWbbHHHbWHMH#<~...```` ``````````````.```.` // -_____<~~_<_<~~(jMWSuzuzuXWHMHXMHHHkkH#XSuzzuzuzuzuKkHXMQkWHHWUXuXXUuXUuXHuXBu // .(Smd8wSvXbbbbHHHWHW3___.``````` `` // ``````.```.```.`...._.._~~..~_~~(#WuzuuzXXkHMqMMHMkkkMUXuXzuuwuuzuXkHSWMWUUuuuXXUUuXHXXWSuXHXu // .. JKwSvwzWkkkkHHHH5~~..```````````````````.```.````````.` // .........dWSuuzzzdkHMW@MHMkkkHHXXuzuuXSuzuuWWHd#uuuXXkWSuXXWUXXHUXWHuuu // .`(HXSzzzzwWbkWHNHr_...``````````````````.```````.```````.`.`..`.-.(HKuzzuuwHHMNMHHMkkkHHuZuuzuuXuuuuXkHWMHHHUUuXXXWHXXHHUuXW8uuuu // .-MXWwzzzuzXkHHMHHN-.`````````` // ````````````.`.````.``.```.`.`....-dXUXuzuXHWHMMHHBWHMMMSZuzuuzXXzuuXHHMHMHkHHHHHHHWHHSuXkHWSuuuuX // (#XKzzzzzuzuWHHkWHHp // ``.````````````````````````.````````.....-((-(NSXuzzXHW@D:~`(/1- // .kXuzuuzXSuuzXXkHWMHHHHHHHHMWuuuQXUXWuuuXuXH // MXWzuzzzzzuXHHbHNMMMt`.```````````````````````````.`.` ..-J7"!`` // XKuzzuXHHM9;/<-.J-u!JXXuuzuXWuuuuXHHH#WMNHmkkkuXXkWUXXWXXuuuXqHH // XWzzzzuzzwXHHHH#"````<.````````````````````.``.`...-c"7``` ` ` // `(BzuuuXmHH8<!(- ?_!`jWUuzuuuWuuuzXWHNH> ..7WHHqHmQkWWXXuuuuuXWqHH // SwuzzzXuwXHNHY`` `` <,`.`````````````` `` ..J7=``` ` ` `` // ````.#zuzXXHHH$~`` ```(_(HSuuuzuXSuzuuXHHWCi(` ._ ?WggHHHHWkkkkWHHHHMH // zzzuzuzwWHMY!` ` ` `(&.```````````` ..J7^ `` ` ` ` ` `. .HXuuXWHW#!` ` // ```` (WUuzzuXXSzuuudHHXY$. : (..``.THHkqkHHHgHHMHkkk zzzzzzXHWK`` ` `` ` ` ` // TJ.``````..J7=```` ` ` ` ` `` ` `.8zuXXHHW=` `` // ..(XSuuuuuXWuuuuXHWH5~~` .`_?_,-``.TMMMMMMHkkqqHHH zzuuzdHHkN ` ` ` `` ` // ``(Wm,.(J7!``` ` ``` `` `` ` ` ``` .SzuXWHHY `` // .._~<~~(dSuuuzzXHuuuuXHWHD::?C._.( -`(!_1 ,WHqHHHmqHHHHN zuzXXHHkHM;` ` ` ` // `` ` .;jY= ` .``_`` ` ` ` ` `` ` `.dXuXWm@^ // .._~_.~~~~~(d0uuzuuXHUuuuXHWH5:::::::_.<&._4r?_.;WMMM@MMY"<!` zzXHHHHMHMb`` // `` ` `` `` .J! ` ..`_~ ` ` ` `` ` ` ``.JXXXHY! // .__.....~.~~~-d0wuzuXXHSuuuXWWH$::::;:::;:+- ~`(.i +HqHHkkHL..`. XWHHHMMHMHM; // ` ` ` ` ._`` ...(:.=_` ` ` ` ` ```` // .-dVT7^``````......~~~~~_jWuuuuuXHSuzuXHHH3<;:::::;;j<+z ``` -dHNkkMqkkN..`` // HHHMMHHHHNMN.`` ` ` `!`z(. ~..~ ! . ` `` ` ` ` // ..gHr``````````........~~~~_jWuuuuuXkSuuuXHWHC:;::;;:::+v>:((J<!(WHHMkkHNqkM;`.. // HMMkkHHHHM9?b `` ` ` `` .``. ` ` ` ` ``` 4HkkkH, // ``````.`......~~~~_+KuuuzuXHSuuuXHHK<(::::::<;<J+g9>::;< .4NkkqMHqH]..` // MHkHHHMM$<<:?L` `` ` ` ` ``.` ` !`` ` ` ` ` ` // ?HbkkHx``````.`..`...~~~~_jKuuuuuXHSuuuqMHD<:<;:<++ddNMB3:;::;:<` // `,HkkqH@HH].`` kkHHkHY``` (;?h`` ` ` `` ```` ` ` ` ` ` ` ` ` // ```.4XWbHx```..`......~~~~_gKuuuuXWH0uuuXHH3:;++1z<jgMB3<::::::::~` // `jMkqkHMHHF.`. kHHHH=` . ` _<?L ` ` ` ` ` ` ` ` ` ` ` ` ` ` ?kwWHp // .`.......~_~~(dKuuuuXWHUuuXWH9++z1<;+jWB3::::;;;::;:;_`` MNkqkqMNMF..` HHk@!. // ` ` ` ~?L ` ` `` ` `` `` ` ` ` ` ` ` ` ` // -WuXHh..`.....~~~~(dWuuuXXkHUuuXHH9>:<:++YY<:;::::;:::::;:::+.``?HHkHHHM>`.`
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
796,402
796,401
u890465662
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; char c[n]; for (int i = 0; i < n; i++) cin >> c[i]; for (int i = 1; i < n - 1; i++) if ((c[i] < c[i + 1] && c[i] > c[i - 1]) || (c[i] > c[i + 1] && c[i] < c[i - 1])) ans++; cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; int c[n]; for (int i = 0; i < n; i++) cin >> c[i]; for (int i = 1; i < n - 1; i++) if ((c[i] < c[i + 1] && c[i] > c[i - 1]) || (c[i] > c[i + 1] && c[i] < c[i - 1])) ans++; cout << ans; return 0; }
[ "variable_declaration.type.primitive.change" ]
796,423
796,424
u550538710
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; char c[n]; for (int i = 0; i < n; i++) cin >> c[i]; for (int i = 1; i < n - 1; i++) if ((c[i] <= c[i + 1] && c[i] > c[i - 1]) || (c[i] > c[i + 1] && c[i] <= c[i - 1])) ans++; cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; int c[n]; for (int i = 0; i < n; i++) cin >> c[i]; for (int i = 1; i < n - 1; i++) if ((c[i] < c[i + 1] && c[i] > c[i - 1]) || (c[i] > c[i + 1] && c[i] < c[i - 1])) ans++; cout << ans; return 0; }
[ "variable_declaration.type.primitive.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
796,425
796,424
u550538710
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; char c[n]; for (int i = 0; i < n; i++) cin >> c[i]; for (int i = 1; i < n - 1; i++) if ((c[i] <= c[i + 1] && c[i] >= c[i - 1]) || (c[i] >= c[i + 1] && c[i] <= c[i - 1])) ans++; cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; int c[n]; for (int i = 0; i < n; i++) cin >> c[i]; for (int i = 1; i < n - 1; i++) if ((c[i] < c[i + 1] && c[i] > c[i - 1]) || (c[i] > c[i + 1] && c[i] < c[i - 1])) ans++; cout << ans; return 0; }
[ "variable_declaration.type.primitive.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
796,426
796,424
u550538710
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n, a; cin >> n; int P[n]; a = 0; for (int i = 0; i < n - 1; i++) { cin >> P[i]; } for (int i = 1; i < n - 1; i++) { if ((P[i - 1] < P[i] && P[i] < P[i + 1]) || (P[i - 1] > P[i] && P[i] > P[i + 1])) { a++; } } cout << a << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a; cin >> n; int P[n]; a = 0; for (int i = 0; i < n; i++) { cin >> P[i]; } for (int i = 1; i < n - 1; i++) { if ((P[i - 1] < P[i] && P[i] < P[i + 1]) || (P[i - 1] > P[i] && P[i] > P[i + 1])) { a++; } } cout << a << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
796,429
796,430
u190066528
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n, a; cin >> n; int P[n]; a = 0; for (int i = 0; i < n - 1; i++) { cin >> P[i]; } for (int i = 1; i < n; i++) { if ((P[i - 1] < P[i] && P[i] < P[i + 1]) || (P[i - 1] > P[i] && P[i] > P[i + 1])) { a++; } } cout << a << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a; cin >> n; int P[n]; a = 0; for (int i = 0; i < n; i++) { cin >> P[i]; } for (int i = 1; i < n - 1; i++) { if ((P[i - 1] < P[i] && P[i] < P[i + 1]) || (P[i - 1] > P[i] && P[i] > P[i + 1])) { a++; } } cout << a << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove", "misc.off_by_one" ]
796,431
796,430
u190066528
cpp
p02988
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main() { ll a; vector<ll> arr; ll count = 0; arr.resize(a); for (int x = 0; x < a; x++) { cin >> arr[x]; } for (int x = 1; x < (a - 1); x++) { if (((arr[x] > arr[x - 1]) && (arr[x] < arr[x + 1])) || ((arr[x] < arr[x - 1]) && (arr[x] > arr[x + 1]))) { count += 1; } } cout << count; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main() { ll a; cin >> a; vector<ll> arr; ll count = 0; arr.resize(a); for (int x = 0; x < a; x++) { cin >> arr[x]; } for (int x = 1; x < (a - 1); x++) { if (((arr[x] > arr[x - 1]) && (arr[x] < arr[x + 1])) || ((arr[x] < arr[x - 1]) && (arr[x] > arr[x + 1]))) { count += 1; } } cout << count; }
[]
796,435
796,436
u491044700
cpp
p02988
#include <bits/stdc++.h> using namespace std; typedef long long ll; int sign(int A) { return (A > 0) - (A < 0); } int func() { cin.tie(0); ios_base::sync_with_stdio(false); int n; int p[30] = {0}; cin >> n; for (int i = 0; i < n; i++) cin >> p[i]; int count = 0; for (int i = 0; i < n - 3; i++) { if ((sign(p[i] - p[i + 1]) * sign(p[i + 2] - p[i + 1]) > 0)) { count++; } } return count; } int main() { cout << func() << "\n"; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int sign(int A) { return (A > 0) - (A < 0); } int func() { cin.tie(0); ios_base::sync_with_stdio(false); int n; int p[30] = {0}; cin >> n; for (int i = 0; i < n; i++) cin >> p[i]; int count = 0; for (int i = 0; i < n - 2; i++) { if ((sign(p[i] - p[i + 1]) * sign(p[i + 1] - p[i + 2]) == 1)) { count++; } } return count; } int main() { cout << func() << "\n"; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
796,443
796,444
u773035128
cpp
p02988
#include <bits/stdc++.h> using namespace std; int main() { int n, count = 0; cin >> n; int p[n]; for (int i = 0; i < n; i++) { cin >> p[i]; } for (int i = 2; i < n - 1; i++) { vector<int> v; v.push_back(p[i]); v.push_back(p[i - 1]); v.push_back(p[i + 1]); sort(v.begin(), v.end()); if (v.at(1) == p[i]) count++; } cout << count; }
#include <bits/stdc++.h> using namespace std; int main() { int n, count = 0; cin >> n; int p[n]; for (int i = 0; i < n; i++) { cin >> p[i]; } for (int i = 1; i < n - 1; i++) { vector<int> v; v.push_back(p[i]); v.push_back(p[i - 1]); v.push_back(p[i + 1]); sort(v.begin(), v.end()); if (v.at(1) == p[i]) count++; } cout << count; }
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
796,452
796,453
u477329923
cpp
p02988
#include <algorithm> #include <cstdlib> #include <iostream> #include <iterator> #include <string> #include <vector> using namespace std; int main(void) { int i, j; cin >> j; int a[j]; for (i = 0; i < j; i++) { cin >> a[j]; } int count = 0; for (i = 1; i < j - 1; i++) { int c = i - 1; int d = i + 1; if (((a[c] > a[i]) && (a[i] > a[d])) || ((a[c] < a[i]) && (a[i] < a[d]))) { count++; } } cout << count << endl; return 0; }
#include <algorithm> #include <cstdlib> #include <iostream> #include <iterator> #include <string> #include <vector> using namespace std; int main(void) { int i, j; cin >> j; int a[j]; for (i = 0; i < j; i++) { cin >> a[i]; } int count = 0; for (i = 1; i < j - 1; i++) { int c = i - 1; int d = i + 1; if (((a[c] > a[i]) && (a[i] > a[d])) || ((a[c] < a[i]) && (a[i] < a[d]))) { count++; } } cout << count << endl; return 0; }
[ "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
796,454
796,455
u308077140
cpp
p02988
#include <iostream> #include <vector> using namespace std; int main() { int n; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } int count = 0; for (int i = 1; i < n - 1; i++) { if (vec.at(i) > vec.at(i - 1) && vec.at(i) < vec.at(i + 1)) { count++; } else if (vec.at(i) < vec.at(i - 1) && vec.at(i) > vec.at(i + 1)) { count++; } } cout << count << endl; }
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } int count = 0; for (int i = 1; i < n - 1; i++) { if (vec.at(i) > vec.at(i - 1) && vec.at(i) < vec.at(i + 1)) { count++; } else if (vec.at(i) < vec.at(i - 1) && vec.at(i) > vec.at(i + 1)) { count++; } } cout << count << endl; }
[]
796,456
796,457
u656568465
cpp
p02988
#include "iostream" using namespace std; int main() { int n; int ans = 0; char p[21] = {0}; cin >> n; for (int i = 1; i <= n; i++) { cin >> p[i]; } for (int i = 2; i <= n - 1; i++) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) { ans++; } else if (p[i - 1] > p[i] && p[i] > p[i + 1]) { ans++; } } cout << ans; return 0; }
#include "iostream" using namespace std; int main() { int n; int ans = 0; int p[21] = {0}; cin >> n; for (int i = 1; i <= n; i++) { cin >> p[i]; } for (int i = 2; i <= n - 1; i++) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) { ans++; } else if (p[i - 1] > p[i] && p[i] > p[i + 1]) { ans++; } } cout << ans; return 0; }
[ "variable_declaration.type.primitive.change" ]
796,478
796,479
u362542037
cpp
p02988
#include <bits/stdc++.h> using namespace std; #define MAX_N 20 int n; char a[MAX_N]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } int count = 0; for (int i = 1; i < n - 1; i++) { if ((a[i - 1] < a[i]) && (a[i] < a[i + 1]) || (a[i - 1] > a[i]) && (a[i] > a[i + 1])) { count++; } } printf("%d\n", count); return 0; }
#include <bits/stdc++.h> using namespace std; #define MAX_N 25 int n; int a[MAX_N]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } int count = 0; for (int i = 1; i < n - 1; i++) { if (((a[i - 1] < a[i]) && (a[i] < a[i + 1])) || ((a[i - 1] > a[i]) && (a[i] > a[i + 1]))) { count++; } } printf("%d\n", count); return 0; }
[ "preprocessor.define.value.change", "literal.integer.change", "variable_declaration.type.primitive.change", "control_flow.branch.if.condition.change" ]
796,483
796,484
u508656894
cpp
p02988
#include <bits/stdc++.h> using namespace std; #define MAX_N 20 int n; char a[MAX_N]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } int count = 0; for (int i = 1; i < n - 1; i++) { if (((a[i - 1] < a[i]) && (a[i] < a[i + 1])) || ((a[i - 1] > a[i]) && (a[i] > a[i + 1]))) { count++; } } printf("%d\n", count); return 0; }
#include <bits/stdc++.h> using namespace std; #define MAX_N 25 int n; int a[MAX_N]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } int count = 0; for (int i = 1; i < n - 1; i++) { if (((a[i - 1] < a[i]) && (a[i] < a[i + 1])) || ((a[i - 1] > a[i]) && (a[i] > a[i + 1]))) { count++; } } printf("%d\n", count); return 0; }
[ "preprocessor.define.value.change", "literal.integer.change", "variable_declaration.type.primitive.change" ]
796,485
796,484
u508656894
cpp
p02989
/************************************/ /* NoobM */ /* File Name : chaa.cpp */ /* Date : 13.07.2020 02:37:00 +06 */ /************************************/ #include <bits/stdc++.h> #define rr(i, b) for (int i = 0; i < int(b); i++) #define vi(n, a) \ vector<int> a(n); \ rr(i, n) cin >> a[i] #define pvec(a) \ rr(i, a.size()) cout << a[i] << " "; \ cout << endl #define bug(x) cout << #x << " " << x << endl #define ll long long #define vii vector<int> using namespace std; void solve() { int n; cin >> n; vi(n, a); sort(a.begin(), a.end()); cout << a[n / 2 - 1] - a[n / 2] << endl; } int main() { cin.tie(0); ios_base::sync_with_stdio(false); int t = 1; // cin >> t; while (t--) { solve(); } return 0; }
/************************************/ /* NoobM */ /* File Name : chaa.cpp */ /* Date : 13.07.2020 02:37:00 +06 */ /************************************/ #include <bits/stdc++.h> #define rr(i, b) for (int i = 0; i < int(b); i++) #define vi(n, a) \ vector<int> a(n); \ rr(i, n) cin >> a[i] #define pvec(a) \ rr(i, a.size()) cout << a[i] << " "; \ cout << endl #define bug(x) cout << #x << " " << x << endl #define ll long long #define vii vector<int> using namespace std; void solve() { int n; cin >> n; vi(n, a); sort(a.begin(), a.end()); cout << abs(a[n / 2 - 1] - a[n / 2]) << endl; } int main() { cin.tie(0); ios_base::sync_with_stdio(false); int t = 1; // cin >> t; while (t--) { solve(); } return 0; }
[ "call.add", "call.arguments.change" ]
796,490
796,491
u740401436
cpp
p02989
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { int n; cin >> n; int a[n]; rep(i, n) cin >> a[i]; sort(a, a + n); cout << a[n / 3] - a[n / 3 - 1] << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { int n; cin >> n; int a[n]; rep(i, n) cin >> a[i]; sort(a, a + n); cout << a[n / 2] - a[n / 2 - 1] << endl; return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "io.output.change" ]
796,496
796,497
u534923072
cpp
p02989
/*------------------------------------ ........Bismillahir Rahmanir Rahim.... ..........created by Abdul Aziz....... ------------------------------------*/ #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <unordered_map> #include <vector> #define mod 998244353 #define int long long #define ld long double #define pb push_back #define vi vector<int> #define dbg(x) cerr << #x << " = " << x << '\n' #define sz(x) (int)x.size() #define ff first #define ss second #define pii pair<int, int> using namespace std; inline void solve() { int n; cin >> n; int res[n]; for (int i = 1; i <= n; i++) { cin >> res[i]; } sort(res + 1, res + n + 1); if (res[n / 2] == res[(n / 2) + 1]) cout << 0 << endl; else cout << (res[n / 2 + 1] - res[n / 2]) << endl; } signed main() { int n = 1; // cin>>n; while (n--) solve(); return 0; }
/*------------------------------------ ........Bismillahir Rahmanir Rahim.... ..........created by Abdul Aziz....... ------------------------------------*/ #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <unordered_map> #include <vector> #define mod 998244353 #define int long long #define ld long double #define pb push_back #define vi vector<int> #define dbg(x) cerr << #x << " = " << x << '\n' #define sz(x) (int)x.size() #define ff first #define ss second #define pii pair<int, int> using namespace std; inline void solve() { int n; cin >> n; int res[n + 1]; for (int i = 1; i <= n; i++) { cin >> res[i]; } sort(res + 1, res + n + 1); if (res[n / 2] == res[(n / 2) + 1]) cout << 0 << endl; else cout << (res[n / 2 + 1] - res[n / 2]) << endl; } signed main() { int n = 1; // cin>>n; while (n--) solve(); return 0; }
[ "variable_declaration.array_dimensions.change", "expression.operation.binary.add" ]
796,505
796,506
u931901821
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int X = 0; X < N; X++) { cin >> vec.at(N); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int X = 0; X < N; X++) { cin >> vec.at(X); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1) << endl; }
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
796,514
796,515
u740002394
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N + 1); for (int i = 0; i < N + 1; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[N / 2] == d[N / 2 + 1]) { cout << 0 << endl; } cout << d[N / 2 + 1] - d[N / 2] << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N + 1); for (int i = 0; i < N + 1; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[N / 2] == d[N / 2 + 1]) { cout << 0 << endl; } else { cout << d[N / 2 + 1] - d[N / 2] << endl; } }
[ "control_flow.branch.else.add" ]
796,520
796,521
u991713078
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a.at(i); } sort(a.begin(), a.end()); int med = n / 2; int ans = a.at(med + 1) - a.at(med); cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a.at(i); } sort(a.begin(), a.end()); int med = n / 2; int ans = a.at(med) - a.at(med - 1); cout << ans << endl; }
[ "expression.operation.binary.remove" ]
796,534
796,535
u191114518
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> hako(N - 1); for (int i = 0; i < N; i++) { cin >> hako[i]; } sort(hako.begin(), hako.end()); int A = hako[N / 2 - 1]; int B = hako[N / 2]; cout << B - A << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> hako(N); for (int i = 0; i < N; i++) { cin >> hako[i]; } sort(hako.begin(), hako.end()); int A = hako[N / 2 - 1]; int B = hako[N / 2]; cout << B - A << endl; }
[ "expression.operation.binary.remove" ]
796,548
796,549
u794933113
cpp
p02989
#include <functional> #include <iostream> using namespace std; int main(void) { // Your code here! int n; cin >> n; int d[n]; for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d, d + n); int count = n / 2; int ans = d[count - 1]; cout << ans << endl; }
#include <functional> #include <iostream> using namespace std; int main(void) { // Your code here! int n; cin >> n; int d[n]; for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d, d + n); int count = n / 2; int ans = d[count] - d[count - 1]; cout << ans << endl; }
[ "assignment.change" ]
796,550
796,551
u880629364
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); int n; n = N / 2; if (d.at(n - 1) == d.at(n)) { cout << 0 << endl; } else { cout << d.at(n) - d.at(n - 1) - 1 << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); int n; n = N / 2; if (d.at(n - 1) == d.at(n)) { cout << 0 << endl; } else { cout << d.at(n) - d.at(n - 1) << endl; } }
[ "expression.operation.binary.remove" ]
796,567
796,568
u793154675
cpp
p02989
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; const double pi = 3.141592654; #define pb push_back #define forab(i, a, b) for (int i = (a); i <= (b); i++) #define CIN \ ios_base::sync_with_stdio(0); \ cin.tie(0) #define pcase(z, x) printf("Case %ld: %lld\n", z, x) #define nw "\n" int main(void) { CIN; ll tc, l, k, sum = 0, x = 0, y, z = 0, m = 1, n = 0, ans = 0; cin >> n; int arr[n]; for (auto i : arr) cin >> i; sort(arr, arr + n); cout << arr[n / 2] - arr[n / 2 - 1]; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; const double pi = 3.141592654; #define pb push_back #define forab(i, a, b) for (int i = (a); i <= (b); i++) #define CIN \ ios_base::sync_with_stdio(0); \ cin.tie(0) #define pcase(z, x) printf("Case %ld: %lld\n", z, x) #define nw "\n" int main(void) { CIN; ll tc, l, k, sum = 0, x = 0, y, z = 0, m = 1, n = 0, ans = 0; cin >> n; int arr[n]; for (auto &i : arr) cin >> i; sort(arr, arr + n); cout << arr[n / 2] - arr[n / 2 - 1]; }
[]
796,571
796,572
u228456702
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> i; } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1) << endl; }
[ "call.add", "call.arguments.change" ]
796,587
796,588
u187772564
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); N = N / 2; if (d[N] == d[N - 1]) { cout << 0 << endl; } else { cout << d[N - 1] - d[N] << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); N = N / 2; if (d[N] == d[N - 1]) { cout << 0 << endl; } else { cout << d[N] - d[N - 1] << endl; } }
[ "expression.operation.binary.remove" ]
796,597
796,598
u830770242
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); N = N / 2; if (d[N] == d[N + 1]) { cout << 0 << endl; } else { cout << d[N + 1] - d[N] << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); N = N / 2; if (d[N] == d[N - 1]) { cout << 0 << endl; } else { cout << d[N] - d[N - 1] << endl; } }
[ "misc.opposites", "expression.operator.arithmetic.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
796,599
796,598
u830770242
cpp
p02989
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define sort(s) sort(s.begin(), s.end()) #define reverse(s) reverse(s.begin(), s.end()) #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) const ll mod = 1e9 + 7; //最大公約数 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; } //素数判定 bool isPrime(ll x) { ll i; if (x < 2) return 0; else if (x == 2) return 1; if (x % 2 == 0) return 0; for (i = 3; i * i <= x; i += 2) if (x % i == 0) return 0; return 1; } //桁和 int digsum(ll n) { int res = 0; while (n > 0) { res += n % 10; n /= 10; } return res; } //桁数 int dignum(ll n) { int res = 0; while (n > 0) { res++; n /= 10; } return res; } //文字列中の特定の文字カウント ll stringcount(string s, char c) { return count(s.cbegin(), s.cend(), c); } //階乗 ll ka(ll i) { ll res = 1; while (i > 0) { res = res * i; i--; } return res; } // ncr ll ncr(ll x, ll y) { ll a = x; ll b = 1; if (y > (x / 2)) { y = x - y; } for (ll i = 1; i < y; i++) { a *= x - i; b *= i + 1; } return a / b; } //フィボナッチ数列 -92 ll f(ll x) { ll dp[x + 1]; dp[1] = 1; dp[2] = 1; for (ll i = 3; i <= x; i++) { dp[i] = dp[i - 1] + dp[i - 2]; } return dp[x]; } int main() { int n; cin >> n; vector<int> d(n); rep(i, n) cin >> d[i]; sort(d); int x = d[n / 2 - 1]; int y = d[n / 2]; if (x == y) { cout << 0 << endl; } else { cout << y - x + 1 << endl; } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define sort(s) sort(s.begin(), s.end()) #define reverse(s) reverse(s.begin(), s.end()) #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) const ll mod = 1e9 + 7; //最大公約数 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; } //素数判定 bool isPrime(ll x) { ll i; if (x < 2) return 0; else if (x == 2) return 1; if (x % 2 == 0) return 0; for (i = 3; i * i <= x; i += 2) if (x % i == 0) return 0; return 1; } //桁和 int digsum(ll n) { int res = 0; while (n > 0) { res += n % 10; n /= 10; } return res; } //桁数 int dignum(ll n) { int res = 0; while (n > 0) { res++; n /= 10; } return res; } //文字列中の特定の文字カウント ll stringcount(string s, char c) { return count(s.cbegin(), s.cend(), c); } //階乗 ll ka(ll i) { ll res = 1; while (i > 0) { res = res * i; i--; } return res; } // ncr ll ncr(ll x, ll y) { ll a = x; ll b = 1; if (y > (x / 2)) { y = x - y; } for (ll i = 1; i < y; i++) { a *= x - i; b *= i + 1; } return a / b; } //フィボナッチ数列 -92 ll f(ll x) { ll dp[x + 1]; dp[1] = 1; dp[2] = 1; for (ll i = 3; i <= x; i++) { dp[i] = dp[i - 1] + dp[i - 2]; } return dp[x]; } int main() { int n; cin >> n; vector<int> d(n); rep(i, n) cin >> d[i]; sort(d); int x = d[n / 2 - 1]; int y = d[n / 2]; if (x == y) { cout << 0 << endl; } else { cout << y - x << endl; } }
[ "expression.operation.binary.remove" ]
796,600
796,601
u584787460
cpp
p02989
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using namespace std; int main() { int n = 0; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); int sa = 0; sa = d[n / 2 + 1] - d[n / 2]; cout << sa << endl; }
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using namespace std; int main() { int n = 0; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); int sa = 0; sa = d[n / 2] - d[n / 2 - 1]; cout << sa << endl; }
[ "expression.operation.binary.remove", "assignment.change" ]
796,605
796,606
u831954260
cpp
p02989
#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) << endl int main() { int n; cin >> n; int a[n]; REP(i, n) { cin >> a[i]; } sort(a, a + n); cout << (a[n] - a[n / 2 - 1]) << endl; return 0; }
#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) << endl int main() { int n; cin >> n; int a[n]; REP(i, n) { cin >> a[i]; } sort(a, a + n); cout << (a[n / 2] - a[n / 2 - 1]) << endl; return 0; }
[ "expression.operation.binary.add" ]
796,609
796,610
u459105164
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); cout << d[(N / 2) + 1] - d[N / 2] << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); cout << d[(N / 2)] - d[(N / 2) - 1] << endl; }
[ "expression.operation.binary.remove" ]
796,611
796,612
u016183710
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; int ans = 0; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec[i]; } sort(vec.begin(), vec.end()); for (int i = 0; i <= vec[N]; i++) { if (vec[N / 2 - 1] < i && vec[N / 2] >= i) { ans++; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; int ans = 0; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec[i]; } sort(vec.begin(), vec.end()); for (int i = 0; i <= vec[N - 1]; i++) { if (vec[N / 2 - 1] < i && vec[N / 2] >= i) { ans++; } } cout << ans << endl; }
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
796,615
796,616
u342075214
cpp
p02989
#include "bits/stdc++.h" using namespace std; // template <typename... T> void read(T& ... t){ ((cin >> t), ...); } // template <typename... T> void write(T ... t){ ((cout << t), ...); } //#define int long long #define FAST ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define size(x) (int)x.size() #define all(x) x.begin(), x.end() #define ln '\n' using LL = long long; using pii = pair<int, int>; const int INF = 2e9; const int MAXN = 2e5 + 3; int n; int arr[MAXN]; int32_t main() { FAST; cin >> n; for (int i = 1; i <= n; ++i) cin >> arr[i]; sort(arr + 1, arr + n + 1); int ans = arr[n / 2] - arr[n / 2 - 1]; cout << ans << ln; }
#include "bits/stdc++.h" using namespace std; // template <typename... T> void read(T& ... t){ ((cin >> t), ...); } // template <typename... T> void write(T ... t){ ((cout << t), ...); } //#define int long long #define FAST ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define size(x) (int)x.size() #define all(x) x.begin(), x.end() #define ln '\n' using LL = long long; using pii = pair<int, int>; const int INF = 2e9; const int MAXN = 2e5 + 3; int n; int arr[MAXN]; int32_t main() { FAST; cin >> n; for (int i = 1; i <= n; ++i) cin >> arr[i]; sort(arr + 1, arr + n + 1); int ans = arr[n / 2 + 1] - arr[n / 2]; cout << ans << ln; }
[ "expression.operation.binary.remove" ]
796,621
796,622
u076290325
cpp
p02989
#include <algorithm> #include <bitset> #include <cfloat> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } using namespace std; #define int long long #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define FORR(i, a, b) for (ll i = (a); i <= (b); i++) #define repr(i, n) for (ll i = n; i >= 0; i--) #define P pair<ll, ll> #define sz(x) (ll) x.size() #define ALL(x) (x).begin(), (x).end() #define ALLR(x) (x).rbegin(), (x).rend() #define VE vector<ll> #define COUT(x) cout << (x) << endl #define MA map<ll, ll> #define SE set<ll> #define PQ priority_queue<ll> #define PQR priority_queue<ll, VE, greater<ll>> #define COUT(x) cout << (x) << endl #define YES(n) cout << ((n) ? "YES" : "NO") << endl #define Yes(n) cout << ((n) ? "Yes" : "No") << endl #define EPS (1e-10) #define pb push_back const long long MOD = 1000000007; // const long long MOD = 998244353; const long long INF = 1LL << 60; const double PI = acos(-1.0); long long modinv(long long a, long long m) { long long b = m, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } ll gcd(ll a, ll b) { if (a < b) swap(a, b); if (b == 0) return a; unsigned r; while ((r = a % b)) { a = b; b = r; } return b; } ll lcm(ll a, ll b) { ll g = gcd(a, b); return a * b / g; } bool prime(ll n) { for (ll i = 2; i <= sqrt(n); i++) { if (n % i == 0) return false; } return n != 1; } map<ll, ll> prime_factor(ll n) { map<ll, ll> ret; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { ret[i]++; n /= i; } } if (n != 1) ret[n] = 1; return ret; } const int MAX = 2000005; long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } using Graph = vector<VE>; vector<pair<char, int>> RunLength(string s) { if (s.size() == 0) return {}; vector<pair<char, int>> res(1, pair<char, int>(s[0], 0)); for (char p : s) { if (res.back().first == p) { res.back().second++; } else { res.emplace_back(p, 1); } } return res; } const int mod = 1000000007; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} mint operator-() const { return mint(-x); } mint &operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint &operator-=(const mint a) { if ((x += mod - a.x) >= mod) x -= mod; return *this; } mint &operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { mint res(*this); return res += a; } mint operator-(const mint a) const { mint res(*this); return res -= a; } mint operator*(const mint a) const { mint res(*this); return res *= a; } mint pow(ll t) const { if (!t) return 1; mint a = pow(t >> 1); a *= a; if (t & 1) a *= *this; return a; } // for prime mod mint inv() const { return pow(mod - 2); } mint &operator/=(const mint a) { return (*this) *= a.inv(); } mint operator/(const mint a) const { mint res(*this); return res /= a; } }; struct combination { vector<mint> fact, ifact; combination(int n) : fact(n + 1), ifact(n + 1) { // assert(n < mod); fact[0] = 1; for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i; ifact[n] = fact[n].inv(); for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i; } mint operator()(int n, int k) { if (k < 0 || k > n) return 0; return fact[n] * ifact[k] * ifact[n - k]; } }; // comb(2000005); // KETASUU int GetDigit(int num) { return log10(num) + 1; } int cnt[30]; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; VE d(n); rep(i, n) cin >> d[i]; sort(ALL(d)); cout << d[n / 2] - d[n / 2 - 1] + 1 << endl; return 0; }
#include <algorithm> #include <bitset> #include <cfloat> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } using namespace std; #define int long long #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define FORR(i, a, b) for (ll i = (a); i <= (b); i++) #define repr(i, n) for (ll i = n; i >= 0; i--) #define P pair<ll, ll> #define sz(x) (ll) x.size() #define ALL(x) (x).begin(), (x).end() #define ALLR(x) (x).rbegin(), (x).rend() #define VE vector<ll> #define COUT(x) cout << (x) << endl #define MA map<ll, ll> #define SE set<ll> #define PQ priority_queue<ll> #define PQR priority_queue<ll, VE, greater<ll>> #define COUT(x) cout << (x) << endl #define YES(n) cout << ((n) ? "YES" : "NO") << endl #define Yes(n) cout << ((n) ? "Yes" : "No") << endl #define EPS (1e-10) #define pb push_back const long long MOD = 1000000007; // const long long MOD = 998244353; const long long INF = 1LL << 60; const double PI = acos(-1.0); long long modinv(long long a, long long m) { long long b = m, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } ll gcd(ll a, ll b) { if (a < b) swap(a, b); if (b == 0) return a; unsigned r; while ((r = a % b)) { a = b; b = r; } return b; } ll lcm(ll a, ll b) { ll g = gcd(a, b); return a * b / g; } bool prime(ll n) { for (ll i = 2; i <= sqrt(n); i++) { if (n % i == 0) return false; } return n != 1; } map<ll, ll> prime_factor(ll n) { map<ll, ll> ret; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { ret[i]++; n /= i; } } if (n != 1) ret[n] = 1; return ret; } const int MAX = 2000005; long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } using Graph = vector<VE>; vector<pair<char, int>> RunLength(string s) { if (s.size() == 0) return {}; vector<pair<char, int>> res(1, pair<char, int>(s[0], 0)); for (char p : s) { if (res.back().first == p) { res.back().second++; } else { res.emplace_back(p, 1); } } return res; } const int mod = 1000000007; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} mint operator-() const { return mint(-x); } mint &operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint &operator-=(const mint a) { if ((x += mod - a.x) >= mod) x -= mod; return *this; } mint &operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { mint res(*this); return res += a; } mint operator-(const mint a) const { mint res(*this); return res -= a; } mint operator*(const mint a) const { mint res(*this); return res *= a; } mint pow(ll t) const { if (!t) return 1; mint a = pow(t >> 1); a *= a; if (t & 1) a *= *this; return a; } // for prime mod mint inv() const { return pow(mod - 2); } mint &operator/=(const mint a) { return (*this) *= a.inv(); } mint operator/(const mint a) const { mint res(*this); return res /= a; } }; struct combination { vector<mint> fact, ifact; combination(int n) : fact(n + 1), ifact(n + 1) { // assert(n < mod); fact[0] = 1; for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i; ifact[n] = fact[n].inv(); for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i; } mint operator()(int n, int k) { if (k < 0 || k > n) return 0; return fact[n] * ifact[k] * ifact[n - k]; } }; // comb(2000005); // KETASUU int GetDigit(int num) { return log10(num) + 1; } int cnt[30]; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; VE d(n); rep(i, n) cin >> d[i]; sort(ALL(d)); cout << d[n / 2] - d[n / 2 - 1] << endl; return 0; }
[ "expression.operation.binary.remove" ]
796,625
796,626
u809967037
cpp
p02989
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; ll a[n]; for (ll i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); ll c = a[n / 2] - a[n / 2 - 1]; cout << c; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; ll a[n]; for (ll i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); ll c = a[n / 2] - a[n / 2 - 1]; cout << c; return 0; }
[]
796,627
796,628
u236966848
cpp
p02989
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <vector> #pragma region Macros #define int long long #define double long double constexpr int MOD = 1000000007; constexpr double PI = 3.14159265358979323846; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) #define LAST(x) x[x.size() - 1] #define ALL(x) (x).begin(), (x).end() #define swap(a, b) (a += b, b = a - b, a -= b) #define DIVCEIL(a, b) ((a + b - 1) / b) // int CHMAX int FACT(int a) { if (a == 0) return 1; else return a * FACT(a - 1); } int MODFACT(int a, int mod) { if (a == 0) return 1; else return (a * FACT(a - 1)) % mod; } int nPr(int n, int r) { int s = n - r + 1; int sum = 1; for (int i = s; i <= n; i++) sum *= i; return sum; } int MODnPr(int n, int r, int mod) { int s = n - r + 1; int sum = 1; for (int i = s; i <= n; i++) { sum *= i; sum = sum % MOD; } return sum; } // int nCr(int n, int r) int nCr2(int n, int r) { return FACT(n) / (FACT(r) * FACT(n - r)); } int GCD(int a, int b) { if (a < b) swap(a, b); if (b == 0) return a; if (a % b == 0) return b; return GCD(b, a % b); } int LCM(int a, int b) { return a * b / GCD(a, b); } int NUMOFDIV(int n) { //約数の数(だっけ?) int ans = 0; REP(i, n) { if (n % i == 0) ans++; } return ans; } int CEIL1(int n) { // 1桁目切り上げ return (n + 9) / 10 * 10; } int DIGIT(int n, int k) { // nのk桁目 rep(i, k - 1) n /= 10; return n % 10; } int DIGITSUM(int n) { int sum = 0, dig; while (n) { dig = n % 10; sum += dig; n /= 10; } return sum; } int DIVTIME(int n, int k) { // nをkで何回割れるか的な int div = 0; while (n % k == 0) { div++; n /= k; } return div; } int MODPOW(int a, int n, int mod) { // a^n mod int ans = 1; while (n > 0) { if (n & 1) ans = ans * a % mod; a = a * a % mod; n >>= 1; } return ans; } double LOG(int a, int b) { return log(b) / log(a); } inline bool BETWEEN(int x, int min, int max) { if (min <= x && x <= max) return true; else return false; } inline bool between(int x, int min, int max) { if (min < x && x < max) return true; else return false; } inline bool PRIMEOR(int x) { if (x == 1) return false; if (x == 2) return true; if (x % 2 == 0) return false; double sqrtx = sqrt(x); for (int i = 3; i <= sqrtx; i += 2) { if (x % i == 0) return false; } return true; } bool SQRTOR(int n) { if (sqrt(n) == (int)sqrt(n)) return true; else return false; } // 順位付け using namespace std; #pragma endregion signed main() { int N, a = 0; cin >> N; vector<int> d(N); rep(i, N) cin >> d[i]; sort(ALL(d)); cout << min(a, d[N / 2] - d[(N / 2) - 1]); }
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <vector> #pragma region Macros #define int long long #define double long double constexpr int MOD = 1000000007; constexpr double PI = 3.14159265358979323846; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) #define LAST(x) x[x.size() - 1] #define ALL(x) (x).begin(), (x).end() #define swap(a, b) (a += b, b = a - b, a -= b) #define DIVCEIL(a, b) ((a + b - 1) / b) // int CHMAX int FACT(int a) { if (a == 0) return 1; else return a * FACT(a - 1); } int MODFACT(int a, int mod) { if (a == 0) return 1; else return (a * FACT(a - 1)) % mod; } int nPr(int n, int r) { int s = n - r + 1; int sum = 1; for (int i = s; i <= n; i++) sum *= i; return sum; } int MODnPr(int n, int r, int mod) { int s = n - r + 1; int sum = 1; for (int i = s; i <= n; i++) { sum *= i; sum = sum % MOD; } return sum; } // int nCr(int n, int r) int nCr2(int n, int r) { return FACT(n) / (FACT(r) * FACT(n - r)); } int GCD(int a, int b) { if (a < b) swap(a, b); if (b == 0) return a; if (a % b == 0) return b; return GCD(b, a % b); } int LCM(int a, int b) { return a * b / GCD(a, b); } int NUMOFDIV(int n) { //約数の数(だっけ?) int ans = 0; REP(i, n) { if (n % i == 0) ans++; } return ans; } int CEIL1(int n) { // 1桁目切り上げ return (n + 9) / 10 * 10; } int DIGIT(int n, int k) { // nのk桁目 rep(i, k - 1) n /= 10; return n % 10; } int DIGITSUM(int n) { int sum = 0, dig; while (n) { dig = n % 10; sum += dig; n /= 10; } return sum; } int DIVTIME(int n, int k) { // nをkで何回割れるか的な int div = 0; while (n % k == 0) { div++; n /= k; } return div; } int MODPOW(int a, int n, int mod) { // a^n mod int ans = 1; while (n > 0) { if (n & 1) ans = ans * a % mod; a = a * a % mod; n >>= 1; } return ans; } double LOG(int a, int b) { return log(b) / log(a); } inline bool BETWEEN(int x, int min, int max) { if (min <= x && x <= max) return true; else return false; } inline bool between(int x, int min, int max) { if (min < x && x < max) return true; else return false; } inline bool PRIMEOR(int x) { if (x == 1) return false; if (x == 2) return true; if (x % 2 == 0) return false; double sqrtx = sqrt(x); for (int i = 3; i <= sqrtx; i += 2) { if (x % i == 0) return false; } return true; } bool SQRTOR(int n) { if (sqrt(n) == (int)sqrt(n)) return true; else return false; } // 順位付け using namespace std; #pragma endregion signed main() { int N, a = 0; cin >> N; vector<int> d(N); rep(i, N) cin >> d[i]; sort(ALL(d)); cout << max(a, d[N / 2] - d[(N / 2) - 1]) << endl; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change", "io.output.newline.add" ]
796,629
796,630
u545364250
cpp
p02989
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <forward_list> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i)) using namespace std; using ll = long long; using P = pair<ll, ll>; const ll MOD = 1e9 + 7; const ll INF = (1ll << 60); int main(void) { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); cout << d[n / 2] - d[n / 2 - 1] - 1 << endl; }
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <forward_list> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i)) using namespace std; using ll = long long; using P = pair<ll, ll>; const ll MOD = 1e9 + 7; const ll INF = (1ll << 60); int main(void) { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); cout << d[n / 2] - d[n / 2 - 1] << endl; }
[ "expression.operation.binary.remove" ]
796,631
796,632
u880221923
cpp
p02989
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; int d[n]; for (int i = 0; i < n; i++) cin >> d[i]; sort(d, d + n); int ind = n / 2; int ans = d[ind + 1] - d[ind]; cout << ans << endl; }
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; int d[n]; for (int i = 0; i < n; i++) cin >> d[i]; sort(d, d + n); int ind = n / 2; int ans = d[ind] - d[ind - 1]; cout << ans << endl; }
[ "expression.operation.binary.remove" ]
796,633
796,634
u904995051
cpp
p02989
#include <bits/stdc++.h> using namespace std; namespace FAST_IO { template <typename T> void read(T &a) { a = 0; int f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') { f = -1; } c = getchar(); } while (isdigit(c)) { a = a * 10 + c - '0'; c = getchar(); } a = a * f; } template <typename T> void write(T a) { if (a < 0) { a = -a; putchar('-'); } if (a > 9) { write(a / 10); } putchar(a % 10 + '0'); } template <typename T> void writeln(T a) { write(a); puts(""); } } // namespace FAST_IO int n, a[100006]; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; } sort(a + 1, a + n + 1); cout << a[n / 2] - a[n / 2 - 1]; }
#include <bits/stdc++.h> using namespace std; namespace FAST_IO { template <typename T> void read(T &a) { a = 0; int f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') { f = -1; } c = getchar(); } while (isdigit(c)) { a = a * 10 + c - '0'; c = getchar(); } a = a * f; } template <typename T> void write(T a) { if (a < 0) { a = -a; putchar('-'); } if (a > 9) { write(a / 10); } putchar(a % 10 + '0'); } template <typename T> void writeln(T a) { write(a); puts(""); } } // namespace FAST_IO int n, a[100006]; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; } sort(a + 1, a + n + 1); cout << a[n / 2 + 1] - a[n / 2]; }
[ "expression.operation.binary.remove" ]
796,638
796,639
u207310767
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); cout << d.at(N / 2 + 1) - d.at(N / 2) + 1 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); cout << d.at(N / 2) - d.at(N / 2 - 1) << endl; }
[ "expression.operation.binary.remove", "io.output.change", "call.arguments.change" ]
796,643
796,644
u583628727
cpp
p02989
#define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #include <bits/stdc++.h> using namespace std; int main() { int n, cnt = 0, s; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) cin >> d.at(i); sort(d.begin(), d.end()); for (int i = d[n / 2 - 1]; i <= d[n / 2]; i++) { cnt++; } cout << cnt << endl; }
#define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #include <bits/stdc++.h> using namespace std; int main() { int n, cnt = 0; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) cin >> d.at(i); sort(d.begin(), d.end()); for (int i = d[n / 2 - 1]; i < d[n / 2]; i++) { cnt++; } cout << cnt << endl; }
[ "variable_declaration.remove", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
796,645
796,646
u854685063
cpp
p02989
#include <bits/stdc++.h> #include <stdlib.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> llP; int main() { int n; cin >> n; int d[n]; for (int i = 0; i < n; i++) cin >> d[i]; sort(d, d + n); cout << d[n / 2] - d[n / 2 - 1] + 1 << endl; return 0; }
#include <bits/stdc++.h> #include <stdlib.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> llP; int main() { int n; cin >> n; int d[n]; for (int i = 0; i < n; i++) cin >> d[i]; sort(d, d + n); cout << d[n / 2] - d[n / 2 - 1] << endl; return 0; }
[ "expression.operation.binary.remove" ]
796,648
796,649
u201553784
cpp
p02989
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; typedef double db; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<ld> vd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef priority_queue<int> pqi; typedef priority_queue<int, vi, greater<int>> mpqi; #define IOS \ std::ios::sync_with_stdio(false); \ cin.tie(0); #define F0R(i, a) for (int i = 0; i < a; i++) #define R0F(i, a) for (int i = a - 1; i >= 0; i--) #define pb push_back #define mp make_pair #define ins insert #define ft front() #define bk back() #define f first #define s second #define trav(a, x) for (auto &a : x) #define ALL(x) (x).begin(), (x).end() const int MOD = 1000000007; const int MX = 2e5 + 2; const ll INF = 1000000000000000000; const ld PI = 4 * atan((ld)1); const pi dir[4] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; // ----------- int n; int a[100001]; int main() { IOS; cin >> n; F0R(i, n) { cin >> a[i]; } sort(a, a + n); cout << a[n / 2] << a[(n / 2) - 1]; return 0; // You should actually read the notes to self. } /* NOTES TO SELF: Int overflow? Array bounds? Edge cases? (n = 1, n = 0) Don't be dumbosity please pace yourself. */
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; typedef double db; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<ld> vd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef priority_queue<int> pqi; typedef priority_queue<int, vi, greater<int>> mpqi; #define IOS \ std::ios::sync_with_stdio(false); \ cin.tie(0); #define F0R(i, a) for (int i = 0; i < a; i++) #define R0F(i, a) for (int i = a - 1; i >= 0; i--) #define pb push_back #define mp make_pair #define ins insert #define ft front() #define bk back() #define f first #define s second #define trav(a, x) for (auto &a : x) #define ALL(x) (x).begin(), (x).end() const int MOD = 1000000007; const int MX = 2e5 + 2; const ll INF = 1000000000000000000; const ld PI = 4 * atan((ld)1); const pi dir[4] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; // ----------- int n; int a[100001]; int main() { IOS; cin >> n; F0R(i, n) { cin >> a[i]; } sort(a, a + n); cout << a[n / 2] - a[(n / 2) - 1]; return 0; // You should actually read the notes to self. } /* NOTES TO SELF: Int overflow? Array bounds? Edge cases? (n = 1, n = 0) Don't be dumbosity please pace yourself. */
[ "io.output.change" ]
796,670
796,671
u058597183
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) cin >> vec[i]; sort(vec.begin(), vec.end()); cout << vec[n / 2 + 1] - vec[n / 2] << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) cin >> vec[i]; sort(vec.begin(), vec.end()); cout << vec[n / 2] - vec[n / 2 - 1] << endl; }
[ "expression.operation.binary.remove" ]
796,696
796,697
u868580535
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(100010); for (int i = 0; i < N; ++i) { cin >> d[i]; } sort(d.begin(), d.end()); int K = d[d.size() / 2] - d[d.size() / 2 - 1]; cout << K << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; ++i) { cin >> d[i]; } sort(d.begin(), d.end()); int K = d[d.size() / 2] - d[d.size() / 2 - 1]; cout << K << endl; return 0; }
[ "call.arguments.change", "control_flow.return.add", "control_flow.return.0.add" ]
796,698
796,699
u531523517
cpp
p02989
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { int n; cin >> n; vector<int> v(n); rep(i, n) cin >> v[i]; sort(v.begin(), v.end()); cout << v[n / 2 + 1] - v[n / 2]; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { int n; cin >> n; vector<int> v(n); rep(i, n) cin >> v[i]; sort(v.begin(), v.end()); cout << v[n / 2] - v[n / 2 - 1]; }
[ "expression.operation.binary.remove" ]
796,706
796,707
u983711104
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int X; priority_queue<int> A; for (int i = 0; i < N; i++) { cin >> X; A.push(X); } for (int i = 0; i < (N / 2) - 2; i++) { A.pop(); } int B, C; B = A.top(); A.pop(); C = A.top(); cout << B - C; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int X; priority_queue<int> A; for (int i = 0; i < N; i++) { cin >> X; A.push(X); } for (int i = 0; i < (N / 2) - 1; i++) { A.pop(); } int B, C; B = A.top(); A.pop(); C = A.top(); cout << B - C; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
796,710
796,711
u187417007
cpp
p02989
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define prtd(var, i) cout << fixed << setprecision(i) << var << endl; #define ll long long using namespace std; int main() { int n; cin >> n; vector<int> d(n); rep(i, n) { cin >> d[i]; } sort(d.begin(), d.end()); ll right = d[n / 2]; ll left = d[n / 2 - 1]; cout << left - right << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define prtd(var, i) cout << fixed << setprecision(i) << var << endl; #define ll long long using namespace std; int main() { int n; cin >> n; vector<int> d(n); rep(i, n) { cin >> d[i]; } sort(d.begin(), d.end()); ll right = d[n / 2]; ll left = d[n / 2 - 1]; cout << right - left << endl; }
[ "expression.operation.binary.remove" ]
796,715
796,716
u101048376
cpp
p02989
#include <bits/stdc++.h> using namespace std; #define rep(i, n) \ for (int i = 0; i < n; i++) \ ; using ll = long long; int main() { int N; cin >> N; int a = N / 2; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); int s = 0; int answer = 0; for (int i = d.at(a - 1) + 1; i <= d.at(a); i++) { if (s != d.at(i)) { answer++; s = i; } } cout << answer << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) \ for (int i = 0; i < n; i++) \ ; using ll = long long; int main() { int N; cin >> N; int a = N / 2; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); int s = 0; int answer = 0; for (int i = d.at(a - 1) + 1; i <= d.at(a); i++) { if (s != i) { answer++; s = i; } } cout << answer << endl; }
[ "control_flow.loop.for.condition.change", "call.remove", "control_flow.branch.if.condition.change" ]
796,723
796,724
u983563612
cpp
p02989
//#include <bits/stdc++.h> #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; int main(); using ll = long long; using VB = vector<bool>; using VVB = vector<vector<bool>>; using VC = vector<char>; using VVC = vector<vector<char>>; using VI = vector<int>; using VVI = vector<vector<int>>; using VL = vector<ll>; using VVL = vector<vector<ll>>; using VD = vector<double>; using VVD = vector<vector<double>>; const double PI = 3.14159265358979323846; const int INF = 1 << 29; // INF + N 程度の余裕を残すため、INT_MAXは使用しないこと。 const ll INFLL = 1LL << 61; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, n) for (int i = 1; i <= (int)(n); i++) #define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++) #define REP1LL(i, n) for (ll i = 1; i <= (ll)(n); i++) #define ALL(x) (x).begin(), (x).end() #define SZ(x) ((int)(x).size()) #define LEN(x) ((int)(x).length()) #define ZERO(a) memset(a, 0, sizeof(a)) #define RAD(d) (PI * (d) / 180) #define DEG(r) (180.0 * (r) / PI) #define popcnt(x) __builtin_popcount(x) #define popcnt64(x) __builtin_popcountll(x) #define pb push_back #define mp make_pair #define mt make_tuple #define get0(x) get<0>(x) #define get1(x) get<1>(x) #define get2(x) get<2>(x) #define get3(x) get<3>(x) #define get4(x) get<4>(x) // DP用 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 (b < a) { a = b; return true; } return false; } // ダンプ template <class T> void dump(const vector<T> &v) { if (SZ(v) == 0) return; REP(i, SZ(v) - 1) { cout << v[i] << " "; } cout << v[SZ(v) - 1] << endl; } // ダンプ(2次元) template <class T> void dump(const vector<vector<T>> &v) { REP(j, SZ(v)) { dump(v[j]); } } // ダンプ(2次元) template <class T> void dump(int w, int h, const vector<T> &v) { REP(j, h) { REP(i, w - 1) { cout << v[j * w + i] << " "; } cout << v[j * w + w - 1] << endl; } } // 和 template <class T> T accumulate(const vector<T> &v) { T sum = 0; REP(i, SZ(v)) { sum += v[i]; } return sum; } // 和(範囲指定) template <class T> T accumulate(const vector<T> &v, int start, int length) { T sum = 0; REP(i, length) { sum += v[start + i]; } return sum; } // 平均 template <class T> T average(const vector<T> &v) { return accumulate(v) / SZ(v); } // 行列構造体 template <class T> struct Matrix { T w, h; vector<T> A; Matrix(T w_, T h_) : w(w_), h(h_), A(w * h) {} T get(T x, T y) const { return A[y * w + x]; } }; // 行列への入力 template <class T> void input(Matrix<T> &m) { REP(j, m.h) { REP(i, m.w) { cin >> m.A[j * m.w + i]; } } } // 行列の積算 template <class T> Matrix<T> prod(const Matrix<T> &a, const Matrix<T> &b) { Matrix<T> m(b.w, a.h); REP(j, m.h) { REP(i, m.w) { ll c = 0; REP(k, a.w) { c += a.A[j * a.w + k] * b.A[k * b.w + i]; } m.A[j * m.w + i] = c; } } return m; } // 行列の出力(int) void dump(const Matrix<int> &m) { REP(j, m.h) { REP(i, m.w - 1) { printf("%d ", m.A[j * m.w + i]); } printf("%d\n", m.A[j * m.w + m.w - 1]); } } // 行列の出力(long long) void dump(const Matrix<ll> &m) { REP(j, m.h) { REP(i, m.w - 1) { printf("%lld ", m.A[j * m.w + i]); } printf("%lld\n", m.A[j * m.w + m.w - 1]); } } // 行列の出力(double) void dump(const Matrix<double> &m) { REP(j, m.h) { REP(i, m.w - 1) { printf("%f ", m.A[j * m.w + i]); } printf("%f\n", m.A[j * m.w + m.w - 1]); } } // 文字列の大文字化 string &to_upper(string &s) { REP(i, s.length()) { if ('a' <= s[i] && s[i] <= 'z') { s[i] -= 32; } } return s; } // 文字列の小文字化 string &to_lower(string &s) { REP(i, s.length()) { if ('A' <= s[i] && s[i] <= 'Z') { s[i] += 32; } } return s; } // 素数取得 VB get_prime(int n) { VB prime_flag(n, true); prime_flag[0] = false; prime_flag[1] = false; for (int i = 2; i < n; i++) { if (!prime_flag[i]) continue; for (int j = i * 2; j < n; j += i) prime_flag[j] = false; } return prime_flag; } // 素数判定(エラトステネスのふるい) template <class T> bool is_prime(T value) { for (ll i = 2; i * i <= value; i++) { if (value % i == 0) return false; } return true; } // 約数の列挙 template <class T> vector<T> get_divisors(T n) { vector<T> ret; for (T i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(ALL(ret)); return ret; } // 約数の列挙(1 ~ sqrt(N)まで) template <class T> vector<T> get_divisors2(T n) { vector<T> ret; for (T i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); } } return ret; } // 最大公約数(GCD; Greatest Common Divisor) ※ユークリッドの互除法 template <class T> T gcd(T a, T b) { if (a < b) return gcd(b, a); ll r; while ((r = a % b)) { a = b; b = r; } return b; } // 3数の最大公約数 template <class T> T gcd(T a, T b, T c) { return gcd(gcd(a, b), c); } // 3数以上の最大公約数 template <class T> T gcd(const vector<T> v) { if (SZ(v) == 0) return 0; if (SZ(v) == 1) return v[0]; if (SZ(v) == 2) return gcd(v[0], v[1]); T g = v[0]; for (int i = 1; i < SZ(v); i++) { g = gcd(g, v[i]); } return g; } // 最小公倍数(LCM; Least Common Multiple) template <class T> T lcm(T a, T b) { return a / gcd(a, b) * b; } // MOD計算(べき乗) : a^n % MOD ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } // MOD計算(逆元) : a^(-1) MOD (※拡張ユークリッド互除法) ll modinv(ll a, ll mod) { ll b = mod, u = 1, v = 0; while (b) { ll t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= mod; if (u < 0) u += mod; return u; } // MOD計算 // // modint 構造体を使ってみませんか? (C++) - noshi91のメモ // https://noshi91.hatenablog.com/entry/2019/03/31/174006 // // 使い方: // const int MOD = 1000000007; // using mint = modint<MOD>; // mint a = 1234; // template <std::uint_fast64_t Modulus> class modint { using u64 = std::uint_fast64_t; public: u64 a; constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {} constexpr u64 &value() noexcept { return a; } constexpr const u64 &value() const noexcept { return a; } constexpr modint operator+(const modint rhs) const noexcept { return modint(*this) += rhs; } constexpr modint operator-(const modint rhs) const noexcept { return modint(*this) -= rhs; } constexpr modint operator*(const modint rhs) const noexcept { return modint(*this) *= rhs; } constexpr modint operator/(const modint rhs) const noexcept { return modint(*this) /= rhs; } constexpr modint &operator+=(const modint rhs) noexcept { a += rhs.a; if (a >= Modulus) { a -= Modulus; } return *this; } constexpr modint &operator-=(const modint rhs) noexcept { if (a < rhs.a) { a += Modulus; } a -= rhs.a; return *this; } constexpr modint &operator*=(const modint rhs) noexcept { a = a * rhs.a % Modulus; return *this; } constexpr modint &operator/=(modint rhs) noexcept { u64 exp = Modulus - 2; while (exp) { if (exp % 2) { *this *= rhs; } rhs *= rhs; exp /= 2; } return *this; } }; // DFS 幅優先探索 (A[0] ... A[N] タイプ) #if 0 VI AA(N); void dfs(int index, int size, int start, int end) { if (index == size) { solve(A); // ここで必要な処理を行う } else{ for(int i = start; i <= end; ++i){ A[index] = i; // start <= A[i] <= end (i=0~size-1) の場合 //dfs(index + 1, size, start, end); // start <= A[0] <= A[1] <= ... <= A[size-1] <= end の場合 dfs(index + 1, size, i, end); // start = iを指定することで、次indexの値域を狭める } } } #endif // DFS 幅優先探索 (グラフ問題) // // ■ 解ける問題 // 1.グラフ上の到達可否 // 2.連結成分の数 // 3.二部グラフ判定 → 引数に現在ノードの色を追加する。color[v]が到達済みで、かつ同じ色の場合、二部グラフではない。 // 4.各頂点の深さ → (行きがけ順) // 5.各頂点の部分木サイズ → (帰りがけ順) // 6.サイクル検出(★勉強中) // #if 0 VVI G(N); // グラフ VB seen(N, false); // 到達フラグ VI first_order(N); // 行きがけ順 VI last_order(N); // 帰りがけ順 VI color(N, 0); // 二部グラフ判定用(0:未到達, 1:白, -1:黒) VI depth(N); // 各頂点の深さ VI subtree_size(N); // 各頂点の部分木サイズ void dfs(const VVI &G, int v, int &order, int parent, int d) { first_order[v] = order++; depth[v] = d; seen[v] = true; for(auto nv : G[v]){ if(seen[nv]) continue; dfs(G, nv, order, v, d); } // 部分木サイズ subtree_size[v] = 1; for(auto c : G[v]){ if(c == parent) continue; subtree_size[v] += subtree_size[c]; } last_order[v] = order++; } #endif // DAG(有向無閉路グラフ)のトポロジカルソート // // ■ 応用問題 // 1.依存関係の解決処理 // VI tsort(const VVI &G) { int N = G.size(); VI indeg(N); // 各ノードへの入力辺数 stack<int> S; // indeg(x) == 0 のノード for (auto &v : G) { for (auto &e : v) { indeg[e]++; } } REP(i, N) { if (indeg[i] == 0) S.push(i); } VI ans; while (!S.empty()) { int v = S.top(); S.pop(); ans.pb(v); for (auto &e : G[v]) { indeg[e]--; if (indeg[e] == 0) S.push(e); } } return ans; } // グラフの辺(Edge) typedef pair<ll, int> Edge; // first : コスト, second : 接続先ノード // ダイクストラ法(最短経路問題。コストが負の場合使用できない) vector<ll> dijkstra(const vector<vector<Edge>> &G, int start) { int N = G.size(); priority_queue<Edge, vector<Edge>, greater<Edge>> que; vector<ll> dist(N, INFLL); que.push(mp(0LL, start)); dist[start] = 0; while (!que.empty()) { Edge p = que.top(); que.pop(); if (dist[p.second] < p.first) continue; for (auto &e : G[p.second]) { if (dist[e.second] > dist[p.second] + e.first) { dist[e.second] = dist[p.second] + e.first; que.push(mp(dist[e.second], e.second)); } } } return dist; } // Union-Find木(素集合データ構造) - // グループ分けを木構造で管理する。任意の2要素が同じグループに所属するか判定する struct UnionFind { // 親ノードのインデックス VI parent; UnionFind(int size) { parent.resize(size); REP(i, size) { parent[i] = i; } // 初期状態は自ノードが親ノード(=すべてのノードが独立) } // 木の根(root)を取得する int root(int x) { // 要素xが根の場合 if (parent[x] == x) return x; // 経路圧縮 parent[x] = root(parent[x]); return parent[x]; } // 同じグループかどうか判定する bool same(int x, int y) { return root(x) == root(y); } // 2つのグループを併合する void unite(int x, int y) { x = root(x); y = root(y); if (x != y) parent[x] = y; } }; // 最小全域木(Minimum Spanning Tree) (クラスカル法) typedef tuple<int, int, int> STEdge; // get0 : コスト, get1,2 : 頂点 struct SpanningTree { vector<STEdge> edges; // 辺を追加する(※直接edges変数に追加してもよい。) void add(int cost, int a, int b) { edges.push_back(mt(cost, a, b)); } // 最小全域木を生成し、コストの和を計算する int kuraskal(int size) { sort(ALL(edges)); UnionFind tree(size); int min_cost = 0; REP(i, SZ(edges)) { auto &e = edges[i]; if (!tree.same(get1(e), get2(e))) { min_cost += get0(e); tree.unite(get1(e), get2(e)); } } return min_cost; } }; // よく忘れるSTLの使い方 // // ■ 最小値、最大値 // it = min_element(first, last); // it = min_element(first, last); // // ■ 値の交換 swap(a, b) ※文字列(string)も交換可能。 // // ■ 乱数 // srand((unsigned)time(NULL)); // rand() - 0 ~ 2^31-1 の範囲の乱数(※VSの場合2^15-1。) // // ■ 時間計測 // int t0 = clock(); // double ts = 1.0 * (clock() - t0) / CLOCKS_PER_SEC; // // ■ sort ソート(降順) // sort(first, last, greater<T>()); // 大きい順(降順) // // ■ カウント O(N)、探索 O(N)、二分探索 O(logN) // n = count(first, last, value); // it = find(first, last, value); ※見つからない場合、it == last // i = lower_bound(first, last, value) - first // ★[first, last) 間は小さい順に【 ソート済み 】であること。 // // ■ vector<T> // v{ a, b, c } // 初期値 // v.assign(first, last) ※sizeも変わる // v.assign(N, value) ※sizeも変わる // find(ALL(v)) != v.end() // // ■ stack<T>, queue<T> // ■ priority_queue<T, vector<T>, greater<T>> // 大きい順(降順)の場合、less<T> // (※sortとは逆) s.push(x) s.pop() x = s.top() or x = q.front() // ※queueの場合はfront()。 s.size() s.empty() // // ■ set<T>, multiset<T> // s.insert(x) // s.erase(x) ※multisetではすべてのx // s.erase(it) // s.find(x) == s.end() // s.lower_bound(x) // // ■ map<K, V> // m[K] = V; // 追加 // m.find(K) == m.end() // 探索 // // ■ tuple // tuple<T0, T1, T2, ...> t; // t = mt(v0, v1, v2, ...) // v0 = get0(t) // get0(t) = v0 // // ■ 順列 // do{ // }while(next_permutation(first, last)); // ★[first, last) 間は小さい順に【 ソート済み 】であること。 // // ■ ビットセット // bitset<8> b("10000000"); // bs.size() // b[i] (i = 0 ~ b.size()-1) // b.set(i) or b.reset(i) // b.count(), b.all(), b.any(), b.none() 1の数, すべて1か, いずれか1か, // すべて0か // int main() { int N; cin >> N; VI d(N); REP(i, N) { cin >> d[i]; } sort(ALL(d)); int ks = d[N / 2 + 1] - d[N / 2]; cout << ks << endl; return 0; }
//#include <bits/stdc++.h> #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; int main(); using ll = long long; using VB = vector<bool>; using VVB = vector<vector<bool>>; using VC = vector<char>; using VVC = vector<vector<char>>; using VI = vector<int>; using VVI = vector<vector<int>>; using VL = vector<ll>; using VVL = vector<vector<ll>>; using VD = vector<double>; using VVD = vector<vector<double>>; const double PI = 3.14159265358979323846; const int INF = 1 << 29; // INF + N 程度の余裕を残すため、INT_MAXは使用しないこと。 const ll INFLL = 1LL << 61; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, n) for (int i = 1; i <= (int)(n); i++) #define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++) #define REP1LL(i, n) for (ll i = 1; i <= (ll)(n); i++) #define ALL(x) (x).begin(), (x).end() #define SZ(x) ((int)(x).size()) #define LEN(x) ((int)(x).length()) #define ZERO(a) memset(a, 0, sizeof(a)) #define RAD(d) (PI * (d) / 180) #define DEG(r) (180.0 * (r) / PI) #define popcnt(x) __builtin_popcount(x) #define popcnt64(x) __builtin_popcountll(x) #define pb push_back #define mp make_pair #define mt make_tuple #define get0(x) get<0>(x) #define get1(x) get<1>(x) #define get2(x) get<2>(x) #define get3(x) get<3>(x) #define get4(x) get<4>(x) // DP用 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 (b < a) { a = b; return true; } return false; } // ダンプ template <class T> void dump(const vector<T> &v) { if (SZ(v) == 0) return; REP(i, SZ(v) - 1) { cout << v[i] << " "; } cout << v[SZ(v) - 1] << endl; } // ダンプ(2次元) template <class T> void dump(const vector<vector<T>> &v) { REP(j, SZ(v)) { dump(v[j]); } } // ダンプ(2次元) template <class T> void dump(int w, int h, const vector<T> &v) { REP(j, h) { REP(i, w - 1) { cout << v[j * w + i] << " "; } cout << v[j * w + w - 1] << endl; } } // 和 template <class T> T accumulate(const vector<T> &v) { T sum = 0; REP(i, SZ(v)) { sum += v[i]; } return sum; } // 和(範囲指定) template <class T> T accumulate(const vector<T> &v, int start, int length) { T sum = 0; REP(i, length) { sum += v[start + i]; } return sum; } // 平均 template <class T> T average(const vector<T> &v) { return accumulate(v) / SZ(v); } // 行列構造体 template <class T> struct Matrix { T w, h; vector<T> A; Matrix(T w_, T h_) : w(w_), h(h_), A(w * h) {} T get(T x, T y) const { return A[y * w + x]; } }; // 行列への入力 template <class T> void input(Matrix<T> &m) { REP(j, m.h) { REP(i, m.w) { cin >> m.A[j * m.w + i]; } } } // 行列の積算 template <class T> Matrix<T> prod(const Matrix<T> &a, const Matrix<T> &b) { Matrix<T> m(b.w, a.h); REP(j, m.h) { REP(i, m.w) { ll c = 0; REP(k, a.w) { c += a.A[j * a.w + k] * b.A[k * b.w + i]; } m.A[j * m.w + i] = c; } } return m; } // 行列の出力(int) void dump(const Matrix<int> &m) { REP(j, m.h) { REP(i, m.w - 1) { printf("%d ", m.A[j * m.w + i]); } printf("%d\n", m.A[j * m.w + m.w - 1]); } } // 行列の出力(long long) void dump(const Matrix<ll> &m) { REP(j, m.h) { REP(i, m.w - 1) { printf("%lld ", m.A[j * m.w + i]); } printf("%lld\n", m.A[j * m.w + m.w - 1]); } } // 行列の出力(double) void dump(const Matrix<double> &m) { REP(j, m.h) { REP(i, m.w - 1) { printf("%f ", m.A[j * m.w + i]); } printf("%f\n", m.A[j * m.w + m.w - 1]); } } // 文字列の大文字化 string &to_upper(string &s) { REP(i, s.length()) { if ('a' <= s[i] && s[i] <= 'z') { s[i] -= 32; } } return s; } // 文字列の小文字化 string &to_lower(string &s) { REP(i, s.length()) { if ('A' <= s[i] && s[i] <= 'Z') { s[i] += 32; } } return s; } // 素数取得 VB get_prime(int n) { VB prime_flag(n, true); prime_flag[0] = false; prime_flag[1] = false; for (int i = 2; i < n; i++) { if (!prime_flag[i]) continue; for (int j = i * 2; j < n; j += i) prime_flag[j] = false; } return prime_flag; } // 素数判定(エラトステネスのふるい) template <class T> bool is_prime(T value) { for (ll i = 2; i * i <= value; i++) { if (value % i == 0) return false; } return true; } // 約数の列挙 template <class T> vector<T> get_divisors(T n) { vector<T> ret; for (T i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(ALL(ret)); return ret; } // 約数の列挙(1 ~ sqrt(N)まで) template <class T> vector<T> get_divisors2(T n) { vector<T> ret; for (T i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); } } return ret; } // 最大公約数(GCD; Greatest Common Divisor) ※ユークリッドの互除法 template <class T> T gcd(T a, T b) { if (a < b) return gcd(b, a); ll r; while ((r = a % b)) { a = b; b = r; } return b; } // 3数の最大公約数 template <class T> T gcd(T a, T b, T c) { return gcd(gcd(a, b), c); } // 3数以上の最大公約数 template <class T> T gcd(const vector<T> v) { if (SZ(v) == 0) return 0; if (SZ(v) == 1) return v[0]; if (SZ(v) == 2) return gcd(v[0], v[1]); T g = v[0]; for (int i = 1; i < SZ(v); i++) { g = gcd(g, v[i]); } return g; } // 最小公倍数(LCM; Least Common Multiple) template <class T> T lcm(T a, T b) { return a / gcd(a, b) * b; } // MOD計算(べき乗) : a^n % MOD ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } // MOD計算(逆元) : a^(-1) MOD (※拡張ユークリッド互除法) ll modinv(ll a, ll mod) { ll b = mod, u = 1, v = 0; while (b) { ll t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= mod; if (u < 0) u += mod; return u; } // MOD計算 // // modint 構造体を使ってみませんか? (C++) - noshi91のメモ // https://noshi91.hatenablog.com/entry/2019/03/31/174006 // // 使い方: // const int MOD = 1000000007; // using mint = modint<MOD>; // mint a = 1234; // template <std::uint_fast64_t Modulus> class modint { using u64 = std::uint_fast64_t; public: u64 a; constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {} constexpr u64 &value() noexcept { return a; } constexpr const u64 &value() const noexcept { return a; } constexpr modint operator+(const modint rhs) const noexcept { return modint(*this) += rhs; } constexpr modint operator-(const modint rhs) const noexcept { return modint(*this) -= rhs; } constexpr modint operator*(const modint rhs) const noexcept { return modint(*this) *= rhs; } constexpr modint operator/(const modint rhs) const noexcept { return modint(*this) /= rhs; } constexpr modint &operator+=(const modint rhs) noexcept { a += rhs.a; if (a >= Modulus) { a -= Modulus; } return *this; } constexpr modint &operator-=(const modint rhs) noexcept { if (a < rhs.a) { a += Modulus; } a -= rhs.a; return *this; } constexpr modint &operator*=(const modint rhs) noexcept { a = a * rhs.a % Modulus; return *this; } constexpr modint &operator/=(modint rhs) noexcept { u64 exp = Modulus - 2; while (exp) { if (exp % 2) { *this *= rhs; } rhs *= rhs; exp /= 2; } return *this; } }; // DFS 幅優先探索 (A[0] ... A[N] タイプ) #if 0 VI AA(N); void dfs(int index, int size, int start, int end) { if (index == size) { solve(A); // ここで必要な処理を行う } else{ for(int i = start; i <= end; ++i){ A[index] = i; // start <= A[i] <= end (i=0~size-1) の場合 //dfs(index + 1, size, start, end); // start <= A[0] <= A[1] <= ... <= A[size-1] <= end の場合 dfs(index + 1, size, i, end); // start = iを指定することで、次indexの値域を狭める } } } #endif // DFS 幅優先探索 (グラフ問題) // // ■ 解ける問題 // 1.グラフ上の到達可否 // 2.連結成分の数 // 3.二部グラフ判定 → 引数に現在ノードの色を追加する。color[v]が到達済みで、かつ同じ色の場合、二部グラフではない。 // 4.各頂点の深さ → (行きがけ順) // 5.各頂点の部分木サイズ → (帰りがけ順) // 6.サイクル検出(★勉強中) // #if 0 VVI G(N); // グラフ VB seen(N, false); // 到達フラグ VI first_order(N); // 行きがけ順 VI last_order(N); // 帰りがけ順 VI color(N, 0); // 二部グラフ判定用(0:未到達, 1:白, -1:黒) VI depth(N); // 各頂点の深さ VI subtree_size(N); // 各頂点の部分木サイズ void dfs(const VVI &G, int v, int &order, int parent, int d) { first_order[v] = order++; depth[v] = d; seen[v] = true; for(auto nv : G[v]){ if(seen[nv]) continue; dfs(G, nv, order, v, d); } // 部分木サイズ subtree_size[v] = 1; for(auto c : G[v]){ if(c == parent) continue; subtree_size[v] += subtree_size[c]; } last_order[v] = order++; } #endif // DAG(有向無閉路グラフ)のトポロジカルソート // // ■ 応用問題 // 1.依存関係の解決処理 // VI tsort(const VVI &G) { int N = G.size(); VI indeg(N); // 各ノードへの入力辺数 stack<int> S; // indeg(x) == 0 のノード for (auto &v : G) { for (auto &e : v) { indeg[e]++; } } REP(i, N) { if (indeg[i] == 0) S.push(i); } VI ans; while (!S.empty()) { int v = S.top(); S.pop(); ans.pb(v); for (auto &e : G[v]) { indeg[e]--; if (indeg[e] == 0) S.push(e); } } return ans; } // グラフの辺(Edge) typedef pair<ll, int> Edge; // first : コスト, second : 接続先ノード // ダイクストラ法(最短経路問題。コストが負の場合使用できない) vector<ll> dijkstra(const vector<vector<Edge>> &G, int start) { int N = G.size(); priority_queue<Edge, vector<Edge>, greater<Edge>> que; vector<ll> dist(N, INFLL); que.push(mp(0LL, start)); dist[start] = 0; while (!que.empty()) { Edge p = que.top(); que.pop(); if (dist[p.second] < p.first) continue; for (auto &e : G[p.second]) { if (dist[e.second] > dist[p.second] + e.first) { dist[e.second] = dist[p.second] + e.first; que.push(mp(dist[e.second], e.second)); } } } return dist; } // Union-Find木(素集合データ構造) - // グループ分けを木構造で管理する。任意の2要素が同じグループに所属するか判定する struct UnionFind { // 親ノードのインデックス VI parent; UnionFind(int size) { parent.resize(size); REP(i, size) { parent[i] = i; } // 初期状態は自ノードが親ノード(=すべてのノードが独立) } // 木の根(root)を取得する int root(int x) { // 要素xが根の場合 if (parent[x] == x) return x; // 経路圧縮 parent[x] = root(parent[x]); return parent[x]; } // 同じグループかどうか判定する bool same(int x, int y) { return root(x) == root(y); } // 2つのグループを併合する void unite(int x, int y) { x = root(x); y = root(y); if (x != y) parent[x] = y; } }; // 最小全域木(Minimum Spanning Tree) (クラスカル法) typedef tuple<int, int, int> STEdge; // get0 : コスト, get1,2 : 頂点 struct SpanningTree { vector<STEdge> edges; // 辺を追加する(※直接edges変数に追加してもよい。) void add(int cost, int a, int b) { edges.push_back(mt(cost, a, b)); } // 最小全域木を生成し、コストの和を計算する int kuraskal(int size) { sort(ALL(edges)); UnionFind tree(size); int min_cost = 0; REP(i, SZ(edges)) { auto &e = edges[i]; if (!tree.same(get1(e), get2(e))) { min_cost += get0(e); tree.unite(get1(e), get2(e)); } } return min_cost; } }; // よく忘れるSTLの使い方 // // ■ 最小値、最大値 // it = min_element(first, last); // it = min_element(first, last); // // ■ 値の交換 swap(a, b) ※文字列(string)も交換可能。 // // ■ 乱数 // srand((unsigned)time(NULL)); // rand() - 0 ~ 2^31-1 の範囲の乱数(※VSの場合2^15-1。) // // ■ 時間計測 // int t0 = clock(); // double ts = 1.0 * (clock() - t0) / CLOCKS_PER_SEC; // // ■ sort ソート(降順) // sort(first, last, greater<T>()); // 大きい順(降順) // // ■ カウント O(N)、探索 O(N)、二分探索 O(logN) // n = count(first, last, value); // it = find(first, last, value); ※見つからない場合、it == last // i = lower_bound(first, last, value) - first // ★[first, last) 間は小さい順に【 ソート済み 】であること。 // // ■ vector<T> // v{ a, b, c } // 初期値 // v.assign(first, last) ※sizeも変わる // v.assign(N, value) ※sizeも変わる // find(ALL(v)) != v.end() // // ■ stack<T>, queue<T> // ■ priority_queue<T, vector<T>, greater<T>> // 大きい順(降順)の場合、less<T> // (※sortとは逆) s.push(x) s.pop() x = s.top() or x = q.front() // ※queueの場合はfront()。 s.size() s.empty() // // ■ set<T>, multiset<T> // s.insert(x) // s.erase(x) ※multisetではすべてのx // s.erase(it) // s.find(x) == s.end() // s.lower_bound(x) // // ■ map<K, V> // m[K] = V; // 追加 // m.find(K) == m.end() // 探索 // // ■ tuple // tuple<T0, T1, T2, ...> t; // t = mt(v0, v1, v2, ...) // v0 = get0(t) // get0(t) = v0 // // ■ 順列 // do{ // }while(next_permutation(first, last)); // ★[first, last) 間は小さい順に【 ソート済み 】であること。 // // ■ ビットセット // bitset<8> b("10000000"); // bs.size() // b[i] (i = 0 ~ b.size()-1) // b.set(i) or b.reset(i) // b.count(), b.all(), b.any(), b.none() 1の数, すべて1か, いずれか1か, // すべて0か // int main() { int N; cin >> N; VI d(N); REP(i, N) { cin >> d[i]; } sort(ALL(d)); int ks = d[N / 2] - d[N / 2 - 1]; cout << ks << endl; return 0; }
[ "expression.operation.binary.remove" ]
796,739
796,740
u081029414
cpp
p02989
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define INF 100100100 using namespace std; using ll = long long; using P = pair<int, int>; using Graph = vector<vector<int>>; int main() { int n; cin >> n; vector<int> d(n); rep(i, n) cin >> d[i + 1]; sort(d.begin(), d.end()); int k = d[n / 2 + 1] - d[n / 2]; cout << k << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define INF 100100100 using namespace std; using ll = long long; using P = pair<int, int>; using Graph = vector<vector<int>>; int main() { int n; cin >> n; vector<int> d(n); rep(i, n) cin >> d[i]; sort(d.begin(), d.end()); int k = d[n / 2] - d[n / 2 - 1]; cout << k << endl; return 0; }
[ "expression.operation.binary.remove" ]
796,741
796,742
u637254885
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; for (auto &i : a) cin >> i; sort(a, a + n); int m = (n / 2) - 1; int ans = a[m + 1] - a[m] + 1; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; for (auto &i : a) cin >> i; sort(a, a + n); int m = (n / 2) - 1; int ans = a[m + 1] - a[m]; cout << ans << endl; return 0; }
[ "expression.operation.binary.remove" ]
796,754
796,755
u652712806
cpp
p02989
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main(void) { int N; int K = 0; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[N / 2] < d[N / 2 + 1]) { K = d[N / 2] - d[N / 2 - 1]; } cout << K << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main(void) { int N; int K = 0; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[N / 2 - 1] < d[N / 2]) { K = d[N / 2] - d[N / 2 - 1]; } cout << K << endl; return 0; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
796,772
796,773
u652760628
cpp
p02989
#include <bits/stdc++.h> #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() using namespace std; using lint = long long; using pi = pair<lint, lint>; int main() { int n; cin >> n; vector<int> v(n); for (auto &i : v) scanf("%d", &i); sort(all(v)); printf("%d\n", v[n] - v[n - 1]); }
#include <bits/stdc++.h> #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() using namespace std; using lint = long long; using pi = pair<lint, lint>; int main() { int n; cin >> n; vector<int> v(n); for (auto &i : v) scanf("%d", &i); sort(all(v)); n /= 2; printf("%d\n", v[n] - v[n - 1]); }
[ "assignment.add" ]
796,774
796,775
u329802369
cpp
p02989
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; int main() { int n; cin >> n; vector<int> p(n); rep(i, n) cin >> p[i]; sort(p.begin(), p.end()); int ans = 0; ans = p[n / 2 - 1] - p[n / 2]; cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; using namespace std; int main() { int n; cin >> n; vector<int> p(n); rep(i, n) cin >> p[i]; sort(p.begin(), p.end()); int ans = 0; ans = p[n / 2] - p[n / 2 - 1]; cout << ans << endl; }
[ "assignment.change", "expression.operation.binary.remove" ]
796,780
796,781
u147556624
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; vector<int> D(N); for (int i = 0; i < N; i++) cin >> D.at(i); sort(D.begin(), D.end()); int ans = D.at(N / 2) - D.at(N / 2 - 1); cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> D(N); for (int i = 0; i < N; i++) cin >> D.at(i); sort(D.begin(), D.end()); int ans = D.at(N / 2) - D.at(N / 2 - 1); cout << ans << endl; }
[]
796,782
796,783
u615258936
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; vector<int> d(N); for (int i = 0; i < N; i++) cin >> d.at(i); sort(d.begin(), d.end()); int ans = d.at(N / 2) - d.at(N / 2 - 1); cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) cin >> d.at(i); sort(d.begin(), d.end()); int ans = d.at(N / 2) - d.at(N / 2 - 1); cout << ans << endl; }
[]
796,784
796,785
u615258936
cpp
p02989
#include <bits/stdc++.h> using namespace std; #define rep(j, n) for (int i = (int)(j); i < (int)(n); i++) int main() { int N; cin >> N; vector<int> A(N); rep(0, N) cin >> A[i]; sort(A.begin(), A.end()); int ans = A[N / 2 + 1] - A[N / 2]; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(j, n) for (int i = (int)(j); i < (int)(n); i++) int main() { int N; cin >> N; vector<int> A(N); rep(0, N) cin >> A[i]; sort(A.begin(), A.end()); int ans = A[N / 2] - A[N / 2 - 1]; cout << ans << endl; }
[ "expression.operation.binary.remove" ]
796,786
796,787
u347057617
cpp
p02989
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; const long long INF = 9999999999999999; using ll = long long; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; } sort(a.begin(), a.end()); cout << a[(N / 2)] << a[(N / 2) - 1] << endl; return 0; }
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; const long long INF = 9999999999999999; using ll = long long; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; } sort(a.begin(), a.end()); cout << a[(N / 2)] - a[(N / 2) - 1] << endl; return 0; }
[ "io.output.change" ]
796,802
796,803
u833295869
cpp
p02989
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; const long long INF = 9999999999999999; using ll = long long; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; } sort(a.begin(), a.end()); cout << a[(N / 2) + 1] - a[N / 2] << endl; return 0; }
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; const long long INF = 9999999999999999; using ll = long long; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; } sort(a.begin(), a.end()); cout << a[(N / 2)] - a[(N / 2) - 1] << endl; return 0; }
[ "expression.operation.binary.remove" ]
796,804
796,803
u833295869
cpp
p02989
#include <algorithm> #include <iostream> #include <list> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef list<ll> listl; typedef string str; #define min(A, B) min(static_cast<ll>(A), static_cast<ll>(B)) #define max(A, B) max(static_cast<ll>(A), static_cast<ll>(B)) #define all(x) (x).begin(), (x).end() #define mp make_pair #define _rep(i, m) for (ll i = 0, i_max = m; i < i_max; i++) #define _erep(i, m) for (ll i = 0, i_max = m; i <= i_max; i++) #define _brep(i, b, m) for (ll i = b, i_max = m; i < i_max; i++) #define _ebrep(i, b, m) for (ll i = b, i_max = m; i <= i_max; i++) #define _rrep(i, m) for (ll i = m; i >= 0; i--) #define _rerep(i, b, e) for (ll i = b; i >= e; i--) #define rep(m) _rep(i, m) #define erep(m) _erep(i, m) #define brep(b, m) _brep(i, b, m) #define ebrep(b, m) _ebrep(i, b, m) #define rrep(m) _rrep(i, m) #define rerep(b, e) _rerep(i, b, e) 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); } void in(ll &I) { cin >> I; } void in(vl &I) { for (auto &i : I) { cin >> i; } } void in(listl &I) { for (auto &i : I) { cin >> i; } } void in(str &s) { cin >> s; } void out(ll O) { cout << O; } void out(vl &O) { for (auto &o : O) { cout << o; } } void rout(bool b, str True, str False) { if (b) cout << True.c_str(); else cout << False.c_str(); } int main() { ll n; in(n); vl v(n); in(v); sort(all(v)); cout << v[n / 2 - 1] - v[n / 2]; return 0; }
#include <algorithm> #include <iostream> #include <list> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef list<ll> listl; typedef string str; #define min(A, B) min(static_cast<ll>(A), static_cast<ll>(B)) #define max(A, B) max(static_cast<ll>(A), static_cast<ll>(B)) #define all(x) (x).begin(), (x).end() #define mp make_pair #define _rep(i, m) for (ll i = 0, i_max = m; i < i_max; i++) #define _erep(i, m) for (ll i = 0, i_max = m; i <= i_max; i++) #define _brep(i, b, m) for (ll i = b, i_max = m; i < i_max; i++) #define _ebrep(i, b, m) for (ll i = b, i_max = m; i <= i_max; i++) #define _rrep(i, m) for (ll i = m; i >= 0; i--) #define _rerep(i, b, e) for (ll i = b; i >= e; i--) #define rep(m) _rep(i, m) #define erep(m) _erep(i, m) #define brep(b, m) _brep(i, b, m) #define ebrep(b, m) _ebrep(i, b, m) #define rrep(m) _rrep(i, m) #define rerep(b, e) _rerep(i, b, e) 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); } void in(ll &I) { cin >> I; } void in(vl &I) { for (auto &i : I) { cin >> i; } } void in(listl &I) { for (auto &i : I) { cin >> i; } } void in(str &s) { cin >> s; } void out(ll O) { cout << O; } void out(vl &O) { for (auto &o : O) { cout << o; } } void rout(bool b, str True, str False) { if (b) cout << True.c_str(); else cout << False.c_str(); } int main() { ll n; in(n); vl v(n); in(v); sort(all(v)); cout << v[n / 2] - v[n / 2 - 1]; return 0; }
[ "expression.operation.binary.remove" ]
796,805
796,806
u288035794
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; cin >> n; vector<int> v(n, 0); for (int i = 0; i < 100; i++) { cin >> v[i]; } sort(v.begin(), v.end()); int d = v.size() / 2; int k = v[d - 1] - v[d]; cout << k; }
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; cin >> n; vector<int> v(n, 0); for (int i = 0; i < n; i++) { cin >> v[i]; } sort(v.begin(), v.end()); int d = v.size() / 2; int k = v[d] - v[d - 1]; cout << k; }
[ "identifier.replace.add", "literal.replace.remove", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
796,819
796,818
u422389945
cpp
p02989
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) int main() { int N; cin >> N; vector<int> d(N); REP(i, N) cin >> d[i]; sort(d.begin(), d.end()); cout << d[N / 2 + 1] - d[N / 2] << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) int main() { int N; cin >> N; vector<int> d(N); REP(i, N) cin >> d[i]; sort(d.begin(), d.end()); cout << d[N / 2] - d[N / 2 - 1] << endl; return 0; }
[ "expression.operation.binary.remove" ]
796,826
796,827
u725661271
cpp
p02989
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) int main() { int N; cin >> N; vector<int> d(N); REP(i, N) cin >> d[i]; sort(d.begin(), d.end()); cout << d[N / 2] - d[N / 2 + 1] << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) int main() { int N; cin >> N; vector<int> d(N); REP(i, N) cin >> d[i]; sort(d.begin(), d.end()); cout << d[N / 2] - d[N / 2 - 1] << endl; return 0; }
[ "misc.opposites", "expression.operator.arithmetic.change", "variable_access.subscript.index.change", "io.output.change" ]
796,828
796,827
u725661271
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); cout << d.at(n / 2 + 1) - d.at(n / 2) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d.at(i); } sort(d.begin(), d.end()); cout << d.at(n / 2) - d.at(n / 2 - 1) << endl; }
[ "expression.operation.binary.remove" ]
796,829
796,830
u522993719
cpp
p02989
#include <algorithm> // sort #include <cmath> #include <iostream> #include <vector> using namespace std; int main(void) { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[(n / 2) - 1]) cout << 0; else cout << d[n / 2] - d[n / 2 - 1] + 1; return 0; }
#include <algorithm> // sort #include <cmath> #include <iostream> #include <vector> using namespace std; int main(void) { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[(n / 2) - 1]) cout << 0; else cout << d[n / 2] - d[(n / 2) - 1]; return 0; }
[ "expression.operation.binary.remove" ]
796,835
796,836
u900688325
cpp
p02989
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; int asc(const void *a, const void *b) { return *(int *)b - *(int *)a; } int main() { int n, i = 0; cin >> n; int d[100050]; rep(i, n) cin >> d[i]; qsort(d, n, sizeof(int), asc); cout << d[(n - 1) / 2 + 1] - d[(n - 1) / 2 + 1] << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; int asc(const void *a, const void *b) { return *(int *)b - *(int *)a; } int main() { int n, i = 0; cin >> n; int d[100050]; rep(i, n) cin >> d[i]; qsort(d, n, sizeof(int), asc); cout << abs(d[(n - 1) / 2 + 1] - d[(n - 1) / 2]) << endl; }
[ "call.add", "expression.operation.binary.remove", "call.arguments.change" ]
796,850
796,851
u373164102
cpp
p02989
#include <bits/stdc++.h> using namespace std; template <class T> ostream &operator<<(ostream &o, const vector<T> &v) { o << "{"; for (int i = 0; i < (int)v.size(); i++) o << (i > 0 ? ", " : "") << v[i]; o << "}"; return o; } int main(void) { int n; cin >> n; vector<int> d(n); for (auto &i : d) cin >> i; sort(d.begin(), d.end()); cout << d.at(n / 2 + 1) - d.at(n / 2) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; template <class T> ostream &operator<<(ostream &o, const vector<T> &v) { o << "{"; for (int i = 0; i < (int)v.size(); i++) o << (i > 0 ? ", " : "") << v[i]; o << "}"; return o; } int main(void) { int n; cin >> n; vector<int> d(n); for (auto &i : d) cin >> i; sort(d.begin(), d.end()); cout << (d.at(n / 2) - d.at(n / 2 - 1)) << endl; return 0; }
[ "expression.operation.binary.remove", "call.arguments.add" ]
796,854
796,855
u720447689
cpp
p02989
#include "bits/stdc++.h" using namespace std; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) ((int)(x).size()) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = (int)(n)-1; i >= 0; i--) #define repf(i, x, n) for (int i = (int)(x); i < (int)(n); i++) #define repfr(i, x, n) for (int i = (int)(x)-1; i >= (int)(n); i--) #define INF 1e9 using ll = int64_t; 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 (b < a) { a = b; return true; } return false; } // 10^9 + 7 #define yojo 1000000007 std::int64_t gcd(std::int64_t a, std::int64_t b) { // a >= b && b != 0 std::int64_t c; do { c = a % b; a = b; b = c; } while (c); return a; } std::int64_t gcd_s(std::int64_t aa, std::int64_t bb) { std::int64_t a = max(aa, bb); std::int64_t b = min(aa, bb); std::int64_t c; if (b == 0) { return -1; } do { c = a % b; a = b; b = c; } while (c); return a; } void rle(std::vector<std::pair<char, std::int64_t>> &data, std::string str) { char now = str[0]; std::int64_t count = 0; for (std::int64_t i = 0; i < str.size() + 1; i++) { if (i == str.size()) { data.push_back(make_pair(str[i - 1], count)); break; } else if (now != str[i]) { data.push_back(make_pair(now, count)); now = str[i]; count = 0; } count++; } return; } #define MAX_NUM 200001 void Main() { //自動整形防止用コメント int n; cin >> n; vector<int> d(n, 0); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(all(d)); std::cout << d[(n / 2) + 1] - d[n / 2] << std::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 all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) ((int)(x).size()) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = (int)(n)-1; i >= 0; i--) #define repf(i, x, n) for (int i = (int)(x); i < (int)(n); i++) #define repfr(i, x, n) for (int i = (int)(x)-1; i >= (int)(n); i--) #define INF 1e9 using ll = int64_t; 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 (b < a) { a = b; return true; } return false; } // 10^9 + 7 #define yojo 1000000007 std::int64_t gcd(std::int64_t a, std::int64_t b) { // a >= b && b != 0 std::int64_t c; do { c = a % b; a = b; b = c; } while (c); return a; } std::int64_t gcd_s(std::int64_t aa, std::int64_t bb) { std::int64_t a = max(aa, bb); std::int64_t b = min(aa, bb); std::int64_t c; if (b == 0) { return -1; } do { c = a % b; a = b; b = c; } while (c); return a; } void rle(std::vector<std::pair<char, std::int64_t>> &data, std::string str) { char now = str[0]; std::int64_t count = 0; for (std::int64_t i = 0; i < str.size() + 1; i++) { if (i == str.size()) { data.push_back(make_pair(str[i - 1], count)); break; } else if (now != str[i]) { data.push_back(make_pair(now, count)); now = str[i]; count = 0; } count++; } return; } #define MAX_NUM 200001 void Main() { //自動整形防止用コメント int n; cin >> n; vector<int> d(n, 0); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(all(d)); std::cout << d[(n / 2)] - d[(n / 2) - 1] << std::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; }
[ "expression.operation.binary.remove" ]
796,857
796,858
u395846213
cpp
p02989
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #include <string> using namespace std; int main() { long long n; cin >> n; vector<long long> d(n); rep(i, n) { cin >> d[i]; } sort(d.begin(), d.end()); long long ans = d[(n / 2) + 1] - d[n / 2]; cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #include <string> using namespace std; int main() { long long n; cin >> n; vector<long long> d(n); rep(i, n) { cin >> d[i]; } sort(d.begin(), d.end()); long long ans = d[(n / 2)] - d[(n / 2) - 1]; cout << ans << endl; }
[ "expression.operation.binary.remove" ]
796,861
796,862
u631558039
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[n / 2 - 1]) { cout << 0 << endl; } else { cout << d[n / 2] - d[n / 2 - 1] - 1 << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[n / 2 - 1]) { cout << 0 << endl; } else { cout << d[n / 2] - d[n / 2 - 1] << endl; } }
[ "expression.operation.binary.remove" ]
796,863
796,864
u103850114
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[n / 2 - 1]) { cout << 0 << endl; } else { cout << d[n / 2 - 1] - d[n / 2] - 1 << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> d(n); for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[n / 2 - 1]) { cout << 0 << endl; } else { cout << d[n / 2] - d[n / 2 - 1] << endl; } }
[ "expression.operation.binary.remove" ]
796,865
796,864
u103850114
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2 - 1) - vec.at(N / 2); }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1); }
[ "expression.operation.binary.remove" ]
796,866
796,867
u363369454
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n, ans; cin >> n; vector<int> d(n); for (int i = 0; i < n; ++i) { cin >> d[i]; } //ソートする sort(d.begin(), d.end()); //存在しない場合 if ((d[n / 2] - d[n / 2 - 1]) <= 1) ans = 0; else { ans = d[n / 2] - d[n / 2 - 1]; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, ans; cin >> n; vector<int> d(n); for (int i = 0; i < n; ++i) { cin >> d[i]; } //ソートする sort(d.begin(), d.end()); //存在しない場合 if ((d[n / 2] - d[n / 2 - 1]) < 1) ans = 0; else { ans = d[n / 2] - d[n / 2 - 1]; } cout << ans << endl; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
796,870
796,871
u812874294
cpp
p02989
#include <algorithm> #include <iostream> using namespace std; int main() { int N, cnt = 0; int d[100001]; cin >> N; for (int i = 0; i < N; i++) cin >> d[i]; sort(d, d + N); int m = d[N / 2 - 1], l = d[N / 2]; if (l >= m + 2) { int i = m + 1; while (i != l + 1) { cnt++; i++; } } cout << cnt << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int N, cnt = 0; int d[100001]; cin >> N; for (int i = 0; i < N; i++) cin >> d[i]; sort(d, d + N); int m = d[N / 2 - 1], l = d[N / 2]; if (l > m) { int i = m + 1; while (i != l + 1) { cnt++; i++; } } cout << cnt << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
796,889
796,890
u661853315
cpp
p02989
#include <algorithm> #include <iostream> using namespace std; int main() { int N, cnt = 0; int d[100000]; cin >> N; for (int i = 0; i < N; i++) cin >> d[i]; sort(d, d + N); int m = d[N / 2 - 1], l = d[N / 2]; if (l >= m + 2) { int i = m + 1; while (i != l + 1) { cnt++; i++; } } cout << cnt << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int N, cnt = 0; int d[100001]; cin >> N; for (int i = 0; i < N; i++) cin >> d[i]; sort(d, d + N); int m = d[N / 2 - 1], l = d[N / 2]; if (l > m) { int i = m + 1; while (i != l + 1) { cnt++; i++; } } cout << cnt << endl; return 0; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
796,891
796,890
u661853315
cpp
p02989
#include <bits/stdc++.h> using namespace std; template <class T> using V = vector<T>; template <class S, class T> using P = pair<S, T>; using ll = long long; using ull = unsigned long long; using vll = V<ll>; using vvll = V<vll>; using vvvll = V<vvll>; using pl = P<ll, ll>; using vpl = V<pl>; using vvpl = V<vpl>; using vs = V<string>; using qll = queue<ll>; using qpl = queue<pl>; using mapll = map<ll, ll>; using setll = set<ll>; using pqll = priority_queue<ll>; #define int ll #define fi first #define se second #define mp make_pair #define pb push_back #define pob pop_back() #define pf push_front #define pof pop_front() #define sz size() #define bgn begin() #define en end() #define emp empty() #define fr front() #define bk back() #define res resize #define tp top() #define p_q priority_queue #define inv inverse() #define FOR(i, a, b) for (ll i = (a); i <= (ll)(b); i++) #define rFOR(i, a, b) for (ll i = (b); i >= (ll)(a); i--) #define REP(i, a) FOR((i), 0, (ll)(a)-1) #define REP0(i, a) FOR((i), 0, (ll)(a)) #define REP1(i, a) FOR((i), 1, (ll)(a)) #define rREP(i, a) rFOR((i), 0, (ll)(a)-1) #define rREP0(i, a) rFOR((i), 0, (ll)(a)) #define rREP1(i, a) rFOR((i), 1, (ll)(a)) #define IOTA(a, n) iota((a).bgn, (a).en, (n)) #define SORT(a) sort((a).bgn, (a).en) #define rSORT(a) sort((a).rbegin(), (a).rend()) #define UNIQUE(a) (a).erase(unique((a).bgn, (a).en), (a).en) #define BINS(a, b) binary_search((a).bgn, (a).en, (b)) #define LOWB(a, b) (lower_bound((a).bgn, (a).en, (b)) - (a).bgn) #define UPB(a, b) (upper_bound((a).bgn, (a).en, (b)) - (a).bgn) #define CNT(a, b) count((a).bgn, (a).en, b) #define SUM(a) accumulate((a).bgn, (a).en, 0) #define REV(a) reverse((a).bgn, (a).en) #define yn(a) cout << ((a) ? "yes" : "no") << "\n"; #define Yn(a) cout << ((a) ? "Yes" : "No") << "\n"; #define YN(a) cout << ((a) ? "YES" : "NO") << "\n"; #define imp(a) cout << ((a) ? "possible" : "impossible") << "\n"; #define Imp(a) cout << ((a) ? "Possible" : "Impossible") << "\n"; #define IMP(a) cout << ((a) ? "POSSIBLE" : "IMPOSSIBLE") << "\n"; #define dbg(a) cerr << (#a) << ": " << (a) << "\n"; #define DigN2(a) ((llabs(a) == 0) ? (1) : ((ll)(log2(double(llabs(a)))) + 1)) #define DigN10(a) ((llabs(a) == 0) ? (1) : ((ll)(log10(double(llabs(a)))) + 1)) #define Dig2(a, b) (((a) >> (b)) & 1) #define Dig10(a, b) (ll)(((a) / ((ll)(pow(10.0, (double)(b))))) % 10) #define Pow2(a) ((ll)(1) << (a)) #define Pow10(a) ((ll)(pow(10.0, double(a)))) #define powll(a, b) (ll)(pow((double)(a), (double)(b))) #define li(...) \ ll __VA_ARGS__; \ Input(__VA_ARGS__); #define si(...) \ string __VA_ARGS__; \ Input(__VA_ARGS__); #define vli(size, ...) \ vll __VA_ARGS__; \ vInput(size, __VA_ARGS__); #define vsi(size, ...) \ vs __VA_ARGS__; \ vInput(size, __VA_ARGS__); const ll MOD = 1e9 + 7; // const ll MOD = 998244353; // const ll MOD = 924844033; // const ll MOD = 9007199254740881; const ll INF = 1LL << 60; // 1.15e18 const double PI = acos(-1.0); const string alp = "abcdefghijklmnopqrstuvwxyz"; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; void Input() {} template <class Var, class... Args> void Input(Var &var, Args &...args) { cin >> var; Input(args...); } void vInit(ll size) {} template <class T, class... Args> void vInit(ll size, V<T> &v, Args &...args) { v.res(size); vInit(size, args...); } void vInputNum(ll num) {} template <class T, class... Args> void vInputNum(ll num, V<T> &v, Args &...args) { cin >> v[num]; vInputNum(num, args...); } void vInput(ll size) {} template <class... Args> void vInput(ll size, Args &...args) { vInit(size, args...); REP(i, size) vInputNum(i, args...); } template <class S, class T> ostream &operator<<(ostream &out, const P<S, T> &p) { return out << "[" << p.fi << ", " << p.se << "]"; } template <class T> ostream &operator<<(ostream &out, V<T> &v) { if (v.emp) return out << "{}"; else { auto itr = v.bgn; out << "{" << *itr; itr++; while (itr != v.en) { out << ", " << *itr; itr++; } out << "}"; return out; } } template <class S, class T> ostream &operator<<(ostream &out, const map<S, T> &m) { if (m.emp) return out << "<[]>"; else { auto itr = m.bgn; out << "< [" << (itr->fi) << ": " << (itr->se); itr++; while (itr != m.en) { out << "], [" << (itr->fi) << ": " << (itr->se); itr++; } out << "] >"; return out; } } template <class T> ostream &operator<<(ostream &out, const set<T> &s) { if (s.emp) return out << "<>"; else { auto itr = s.bgn; out << "<" << *itr; itr++; while (itr != s.en) { out << ", " << *itr; itr++; } out << ">"; return out; } } ll gcd(ll a, ll b) { if (a < b) { a ^= b; b ^= a; a ^= b; } return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } struct UFT { public: ll tsize; ll mode; vll par; vll rank; UFT() {} UFT(const UFT &uft) {} UFT(ll tsizeget, ll modeget = 0) { tsize = tsizeget; mode = modeget; par.assign(tsize, -1); if (!mode) rank.res(tsize, 0); } ll root(ll x) { return par[x] < 0 ? x : par[x] = root(par[x]); } bool isRoot(ll x) { return x == root(x); } bool same(ll x, ll y) { return root(x) == root(y); } void merge(ll x, ll y) { x = root(x); y = root(y); if (x == y) return; if (mode) { par[x] += par[y]; par[y] = x; } else { if (rank[x] < rank[y]) { par[y] += par[x]; par[x] = y; } else { par[x] += par[y]; par[y] = x; if (rank[x] == rank[y]) rank[x]++; } } } ll size(ll x) { return -par[root(x)]; } }; ll isP(ll n) { if (n <= 1) return 0; FOR(i, 2, (ll)sqrt(n) + 1) { if (n % i == 0) return 0; } return 1; } vvll CombMemo(1000, vll(1000, -1)); ll Comb(ll n, ll k) { if ((n < 0) || (k < 0)) return 0; if (CombMemo[n][k] == -1) { if (n < k) CombMemo[n][k] = 0; else { if (n == 0) CombMemo[n][k] = 1; else if (k == 0) CombMemo[n][k] = 1; else if (n == k) CombMemo[n][k] = 1; else CombMemo[n][k] = Comb(n - 1, k - 1) + Comb(n - 1, k); } } return CombMemo[n][k]; } void Solve(); signed main() { cin.tie(0); ios::sync_with_stdio(false); cout << setprecision(20) << fixed; Solve(); } void Solve() { li(n); vli(n, d); SORT(d); cout << d[n / 2 + 1] - d[n / 2]; }
#include <bits/stdc++.h> using namespace std; template <class T> using V = vector<T>; template <class S, class T> using P = pair<S, T>; using ll = long long; using ull = unsigned long long; using vll = V<ll>; using vvll = V<vll>; using vvvll = V<vvll>; using pl = P<ll, ll>; using vpl = V<pl>; using vvpl = V<vpl>; using vs = V<string>; using qll = queue<ll>; using qpl = queue<pl>; using mapll = map<ll, ll>; using setll = set<ll>; using pqll = priority_queue<ll>; #define int ll #define fi first #define se second #define mp make_pair #define pb push_back #define pob pop_back() #define pf push_front #define pof pop_front() #define sz size() #define bgn begin() #define en end() #define emp empty() #define fr front() #define bk back() #define res resize #define tp top() #define p_q priority_queue #define inv inverse() #define FOR(i, a, b) for (ll i = (a); i <= (ll)(b); i++) #define rFOR(i, a, b) for (ll i = (b); i >= (ll)(a); i--) #define REP(i, a) FOR((i), 0, (ll)(a)-1) #define REP0(i, a) FOR((i), 0, (ll)(a)) #define REP1(i, a) FOR((i), 1, (ll)(a)) #define rREP(i, a) rFOR((i), 0, (ll)(a)-1) #define rREP0(i, a) rFOR((i), 0, (ll)(a)) #define rREP1(i, a) rFOR((i), 1, (ll)(a)) #define IOTA(a, n) iota((a).bgn, (a).en, (n)) #define SORT(a) sort((a).bgn, (a).en) #define rSORT(a) sort((a).rbegin(), (a).rend()) #define UNIQUE(a) (a).erase(unique((a).bgn, (a).en), (a).en) #define BINS(a, b) binary_search((a).bgn, (a).en, (b)) #define LOWB(a, b) (lower_bound((a).bgn, (a).en, (b)) - (a).bgn) #define UPB(a, b) (upper_bound((a).bgn, (a).en, (b)) - (a).bgn) #define CNT(a, b) count((a).bgn, (a).en, b) #define SUM(a) accumulate((a).bgn, (a).en, 0) #define REV(a) reverse((a).bgn, (a).en) #define yn(a) cout << ((a) ? "yes" : "no") << "\n"; #define Yn(a) cout << ((a) ? "Yes" : "No") << "\n"; #define YN(a) cout << ((a) ? "YES" : "NO") << "\n"; #define imp(a) cout << ((a) ? "possible" : "impossible") << "\n"; #define Imp(a) cout << ((a) ? "Possible" : "Impossible") << "\n"; #define IMP(a) cout << ((a) ? "POSSIBLE" : "IMPOSSIBLE") << "\n"; #define dbg(a) cerr << (#a) << ": " << (a) << "\n"; #define DigN2(a) ((llabs(a) == 0) ? (1) : ((ll)(log2(double(llabs(a)))) + 1)) #define DigN10(a) ((llabs(a) == 0) ? (1) : ((ll)(log10(double(llabs(a)))) + 1)) #define Dig2(a, b) (((a) >> (b)) & 1) #define Dig10(a, b) (ll)(((a) / ((ll)(pow(10.0, (double)(b))))) % 10) #define Pow2(a) ((ll)(1) << (a)) #define Pow10(a) ((ll)(pow(10.0, double(a)))) #define powll(a, b) (ll)(pow((double)(a), (double)(b))) #define li(...) \ ll __VA_ARGS__; \ Input(__VA_ARGS__); #define si(...) \ string __VA_ARGS__; \ Input(__VA_ARGS__); #define vli(size, ...) \ vll __VA_ARGS__; \ vInput(size, __VA_ARGS__); #define vsi(size, ...) \ vs __VA_ARGS__; \ vInput(size, __VA_ARGS__); const ll MOD = 1e9 + 7; // const ll MOD = 998244353; // const ll MOD = 924844033; // const ll MOD = 9007199254740881; const ll INF = 1LL << 60; // 1.15e18 const double PI = acos(-1.0); const string alp = "abcdefghijklmnopqrstuvwxyz"; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; void Input() {} template <class Var, class... Args> void Input(Var &var, Args &...args) { cin >> var; Input(args...); } void vInit(ll size) {} template <class T, class... Args> void vInit(ll size, V<T> &v, Args &...args) { v.res(size); vInit(size, args...); } void vInputNum(ll num) {} template <class T, class... Args> void vInputNum(ll num, V<T> &v, Args &...args) { cin >> v[num]; vInputNum(num, args...); } void vInput(ll size) {} template <class... Args> void vInput(ll size, Args &...args) { vInit(size, args...); REP(i, size) vInputNum(i, args...); } template <class S, class T> ostream &operator<<(ostream &out, const P<S, T> &p) { return out << "[" << p.fi << ", " << p.se << "]"; } template <class T> ostream &operator<<(ostream &out, V<T> &v) { if (v.emp) return out << "{}"; else { auto itr = v.bgn; out << "{" << *itr; itr++; while (itr != v.en) { out << ", " << *itr; itr++; } out << "}"; return out; } } template <class S, class T> ostream &operator<<(ostream &out, const map<S, T> &m) { if (m.emp) return out << "<[]>"; else { auto itr = m.bgn; out << "< [" << (itr->fi) << ": " << (itr->se); itr++; while (itr != m.en) { out << "], [" << (itr->fi) << ": " << (itr->se); itr++; } out << "] >"; return out; } } template <class T> ostream &operator<<(ostream &out, const set<T> &s) { if (s.emp) return out << "<>"; else { auto itr = s.bgn; out << "<" << *itr; itr++; while (itr != s.en) { out << ", " << *itr; itr++; } out << ">"; return out; } } ll gcd(ll a, ll b) { if (a < b) { a ^= b; b ^= a; a ^= b; } return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } struct UFT { public: ll tsize; ll mode; vll par; vll rank; UFT() {} UFT(const UFT &uft) {} UFT(ll tsizeget, ll modeget = 0) { tsize = tsizeget; mode = modeget; par.assign(tsize, -1); if (!mode) rank.res(tsize, 0); } ll root(ll x) { return par[x] < 0 ? x : par[x] = root(par[x]); } bool isRoot(ll x) { return x == root(x); } bool same(ll x, ll y) { return root(x) == root(y); } void merge(ll x, ll y) { x = root(x); y = root(y); if (x == y) return; if (mode) { par[x] += par[y]; par[y] = x; } else { if (rank[x] < rank[y]) { par[y] += par[x]; par[x] = y; } else { par[x] += par[y]; par[y] = x; if (rank[x] == rank[y]) rank[x]++; } } } ll size(ll x) { return -par[root(x)]; } }; ll isP(ll n) { if (n <= 1) return 0; FOR(i, 2, (ll)sqrt(n) + 1) { if (n % i == 0) return 0; } return 1; } vvll CombMemo(1000, vll(1000, -1)); ll Comb(ll n, ll k) { if ((n < 0) || (k < 0)) return 0; if (CombMemo[n][k] == -1) { if (n < k) CombMemo[n][k] = 0; else { if (n == 0) CombMemo[n][k] = 1; else if (k == 0) CombMemo[n][k] = 1; else if (n == k) CombMemo[n][k] = 1; else CombMemo[n][k] = Comb(n - 1, k - 1) + Comb(n - 1, k); } } return CombMemo[n][k]; } void Solve(); signed main() { cin.tie(0); ios::sync_with_stdio(false); cout << setprecision(20) << fixed; Solve(); } void Solve() { li(n); vli(n, d); SORT(d); cout << d[n / 2] - d[n / 2 - 1]; }
[ "expression.operation.binary.remove" ]
796,910
796,911
u172929647
cpp
p02989
#include <algorithm> #include <iostream> using namespace std; int main() { int N; cin >> N; int d[N]; for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d, d + N); if (d[N / 2 - 1] == d[N / 2]) { cout << 0; } else { cout << d[N / 2 - 1] - d[N / 2]; } }
#include <algorithm> #include <iostream> using namespace std; int main() { int N; cin >> N; int d[N]; for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d, d + N); if (d[N / 2 - 1] == d[N / 2]) { cout << 0; } else { cout << -d[N / 2 - 1] + d[N / 2]; } }
[ "expression.operation.unary.add", "misc.opposites", "expression.operator.arithmetic.change", "io.output.change" ]
796,912
796,913
u447485613
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); int ans = 0; for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); for (int i = d[(N / 2) - 1]; i <= d[N / 2]; i++) { ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); int ans = 0; for (int i = 0; i < N; i++) { cin >> d[i]; } sort(d.begin(), d.end()); for (int i = d[(N / 2) - 1] + 1; i <= d[N / 2]; i++) { ans++; } cout << ans << endl; }
[ "control_flow.loop.for.initializer.change" ]
796,924
796,925
u323327162
cpp
p02989
#include <bits/stdc++.h> #define pb push_back #define li long long int using namespace std; int main() { int n; cin >> n; vector<int> a(n + 1); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); if (n % 2 != 0) cout << 0 << endl; else cout << a[n / 2] - a[n / 2 - 1] << endl; }
#include <bits/stdc++.h> #define pb push_back #define li long long int using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); if (n % 2 != 0) cout << 0 << endl; else cout << a[n / 2] - a[n / 2 - 1] << endl; }
[ "expression.operation.binary.remove" ]
796,946
796,947
u968280449
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n, i; cin >> n; int d[n]; for (i = 0; i < n; i++) { cin >> d[i]; } sort(d, d + n); cout << d[n / 2 + 1] - d[n / 2]; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, i; cin >> n; int d[n]; for (i = 0; i < n; i++) { cin >> d[i]; } sort(d, d + n); cout << d[n / 2] - d[n / 2 - 1]; return 0; }
[ "expression.operation.binary.remove" ]
796,950
796,951
u058348416
cpp
p02989
#include <algorithm> #include <iostream> int main() { int n; std::cin >> n; int d[n]; for (int i = 0; i < n; i++) std::cin >> d[i]; std::sort(d, d + n - 1); int lower, upper; lower = d[n / 2 - 1]; upper = d[n / 2]; if (lower == upper) std::cout << 0 << std::endl; else std::cout << upper - lower << std::endl; return 0; }
#include <algorithm> #include <iostream> int main() { int n; std::cin >> n; int d[n]; for (int i = 0; i < n; i++) std::cin >> d[i]; std::sort(d, d + n); int lower, upper; lower = d[n / 2 - 1]; upper = d[n / 2]; if (lower == upper) std::cout << 0 << std::endl; else std::cout << upper - lower << std::endl; return 0; }
[ "expression.operation.binary.remove" ]
796,953
796,954
u408372746
cpp
p02989
#include "bits/stdc++.h" using namespace std; int main() { //ひとまず入力を受け取る int N; cin >> N; int d[100000]; int i = 0; while (i < N) { cin >> d[i]; i++; } //答えを求める sort(d, d + N); cout << d[N / 2] - d[N / 2 - 1] + 1 << endl; }
#include "bits/stdc++.h" using namespace std; int main() { //ひとまず入力を受け取る int N; cin >> N; int d[100000]; int i = 0; while (i < N) { cin >> d[i]; i++; } //答えを求める sort(d, d + N); cout << d[N / 2] - d[N / 2 - 1] << endl; }
[ "expression.operation.binary.remove" ]
796,959
796,960
u422592877
cpp
p02989
#include <bits/stdc++.h> // Remove below header file if c++ version greater than 14 #include <algorithm> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long int #define pb push_back #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); #define endl '\n' #define deb(x) cout << #x << " " << x << endl; #define fo(i, n) for (i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; i < n; i++) using namespace std; using mii = map<int, int>; using mll = map<ll, ll>; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vll = vector<ll>; const int mod = 1000000007; ll desc(ll x, ll y) { return x > y; } int main() { fastIO int n, i; cin >> n; vi arr(n, 0); fo(i, n) { cin >> arr[i]; } sort(arr.begin(), arr.end()); if (n % 2 != 0) cout << 0 << endl; else { int div = n / 2; if ((arr[div] - arr[div - 1]) >= 2) cout << (arr[div] - arr[div - 1]) << endl; else cout << 0 << endl; } return 0; }
#include <bits/stdc++.h> // Remove below header file if c++ version greater than 14 #include <algorithm> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long int #define pb push_back #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); #define endl '\n' #define deb(x) cout << #x << " " << x << endl; #define fo(i, n) for (i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; i < n; i++) using namespace std; using mii = map<int, int>; using mll = map<ll, ll>; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vll = vector<ll>; const int mod = 1000000007; ll desc(ll x, ll y) { return x > y; } int main() { fastIO int n, i; cin >> n; vi arr(n, 0); fo(i, n) { cin >> arr[i]; } sort(arr.begin(), arr.end()); if (n % 2 != 0) cout << 0 << endl; else { int div = n / 2; if ((arr[div] - arr[div - 1]) >= 1) cout << (arr[div] - arr[div - 1]) << endl; else cout << 0 << endl; } return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
796,963
796,964
u059680467
cpp
p02989
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int n; cin >> n; vector<int> d(n); rep(i, n) cin >> d[i]; sort(d.begin(), d.end()); int ans; if (d[n / 2] == d[n / 2 - 1]) { ans = 0; } else { ans = d[n / 2] - d[n / 2 - 1] + 1; } cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int n; cin >> n; vector<int> d(n); rep(i, n) cin >> d[i]; sort(d.begin(), d.end()); int ans; if (d[n / 2] == d[n / 2 - 1]) { ans = 0; } else { ans = d[n / 2] - d[n / 2 - 1]; } cout << ans << endl; }
[ "expression.operation.binary.remove" ]
796,965
796,966
u653482689
cpp
p02989
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; const double PI = acos(-1.0); int main() { int n; vector<int> d(n + 1); d[0] = -1; for (int i = 1; i <= n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); cout << d[n / 2 + 1] - d[n / 2] << endl; return 0; }
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; const double PI = acos(-1.0); int main() { int n; cin >> n; vector<int> d(n + 1); d[0] = -1; for (int i = 1; i <= n; i++) { cin >> d[i]; } sort(d.begin(), d.end()); cout << d[n / 2 + 1] - d[n / 2] << endl; return 0; }
[]
796,973
796,974
u403813525
cpp
p02989
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N, k; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); if (vec.at(N / 2 - 1) != vec.at(N / 2) && vec.at(N / 2 - 1) - vec.at(N / 2) != 1) { k = vec.at(N / 2) - vec.at(N / 2 - 1); cout << k - 1 << endl; } else if (vec.at(N / 2 - 1) == vec.at(N / 2) || vec.at(N / 2 - 1) - vec.at(N / 2) != 1) { cout << 0 << endl; } return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N, k; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); if (vec.at(N / 2 - 1) != vec.at(N / 2) && vec.at(N / 2 - 1) - vec.at(N / 2) != 1) { k = vec.at(N / 2) - vec.at(N / 2 - 1); cout << k << endl; } else if (vec.at(N / 2 - 1) == vec.at(N / 2) || vec.at(N / 2 - 1) - vec.at(N / 2) != 1) { cout << 0 << endl; } return 0; }
[ "expression.operation.binary.remove" ]
796,979
796,980
u927933718
cpp
p02989
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <numeric> #include <string> #include <vector> #define repd(i, a, b) \ ; \ for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) #define ll long long int using namespace std; int main() { int n; cin >> n; int d[n]; rep(i, n) { cin >> d[n]; } sort(d, d + n); cout << d[n / 2] - d[n / 2 - 1]; return 0; }
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <numeric> #include <string> #include <vector> #define repd(i, a, b) \ ; \ for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) #define ll long long int using namespace std; int main() { int n; cin >> n; int d[n]; rep(i, n) { cin >> d[i]; } sort(d, d + n); cout << d[n / 2] - d[n / 2 - 1]; return 0; }
[ "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
797,004
797,005
u478997153
cpp
p02989
#include <algorithm> #include <assert.h> #include <bitset> #include <cctype> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <stdio.h> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) #define TR(i, x) for (__typeof(x.begin()) i = x.begin(); i != x.end(); i++) #define ALL(x) x.begin(), x.end() #define SORT(x) sort(ALL(x)) #define CLEAR(x) memset(x, 0, sizeof(x)) #define FILL(x, c) memset(x, c, sizeof(x)) #define PB push_back #define MP make_pair using namespace std; const double eps = 1e-8; typedef map<int, int> MII; typedef map<string, int> MSI; typedef vector<int> VI; typedef vector<string> VS; typedef vector<long double> VD; typedef pair<int, int> PII; typedef long long int64; typedef long long LL; typedef unsigned int UI; typedef long double LD; int main() { int n; cin >> n; vector<int> d(n, 0); for (int i = 0; i < n; ++i) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[n / 2 - 1]) cout << 0 << endl; cout << d[n / 2] - d[n / 2 - 1] << endl; return 0; }
#include <algorithm> #include <assert.h> #include <bitset> #include <cctype> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <stdio.h> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) #define TR(i, x) for (__typeof(x.begin()) i = x.begin(); i != x.end(); i++) #define ALL(x) x.begin(), x.end() #define SORT(x) sort(ALL(x)) #define CLEAR(x) memset(x, 0, sizeof(x)) #define FILL(x, c) memset(x, c, sizeof(x)) #define PB push_back #define MP make_pair using namespace std; const double eps = 1e-8; typedef map<int, int> MII; typedef map<string, int> MSI; typedef vector<int> VI; typedef vector<string> VS; typedef vector<long double> VD; typedef pair<int, int> PII; typedef long long int64; typedef long long LL; typedef unsigned int UI; typedef long double LD; int main() { int n; cin >> n; vector<int> d(n, 0); for (int i = 0; i < n; ++i) { cin >> d[i]; } sort(d.begin(), d.end()); if (d[n / 2] == d[n / 2 - 1]) cout << 0 << endl; else cout << d[n / 2] - d[n / 2 - 1] << endl; return 0; }
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
797,023
797,024
u655810450
cpp
p02989
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1e9 + 7; const ll maxn = 1000 * 1001; const ll INF = 1e18; ll x[maxn]; bool mark[maxn]; vector<ll> v[maxn]; ll n, k; int main() { cin >> n; ll a[n]; for (ll i = 1; i < n; i++) cin >> a[i]; sort(a, a + n); cout << a[n / 2] - a[n / 2 - 1]; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1e9 + 7; const ll maxn = 1000 * 1001; const ll INF = 1e18; ll x[maxn]; bool mark[maxn]; vector<ll> v[maxn]; ll n, k; int main() { cin >> n; ll a[n]; for (ll i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); cout << a[n / 2] - a[n / 2 - 1]; }
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
797,035
797,036
u923104962
cpp
p02989
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; int *d = new int[n]; for (int i = 0; i < n; i++) cin >> d[i]; sort(d, d + n); int x = d[n / 2], y = d[n / 2 - 1]; cout << y - x << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; int *d = new int[n]; for (int i = 0; i < n; i++) cin >> d[i]; sort(d, d + n); int x = d[n / 2], y = d[n / 2 - 1]; cout << x - y << endl; return 0; }
[ "expression.operation.binary.remove" ]
797,042
797,043
u819611746
cpp
p02989
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a.at(i); } sort(a.begin(), a.end()); cout << a.at(n / 2 + 1) - a.at(n / 2) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a.at(i); } sort(a.begin(), a.end()); cout << a.at(n / 2) - a.at(n / 2 - 1) << endl; }
[ "expression.operation.binary.remove" ]
797,049
797,050
u424602097
cpp
p02989
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; int D[N]; for (int i = 0; i < N; i++) { cin >> D[i]; } sort(D, D + N); cout << D[N / 2 - 1] - D[N / 2] << "\n"; }
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; int D[N]; for (int i = 0; i < N; i++) { cin >> D[i]; } sort(D, D + N); cout << D[N / 2] - D[N / 2 - 1] << "\n"; }
[ "expression.operation.binary.remove" ]
797,062
797,063
u817845505
cpp
p02989
#include "bits/stdc++.h" using namespace std; #define ll long long #define endl '\n' #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = int(a); i < int(b); i++) #define pb emplace_back #define all(x) (x).begin(), (x).end() ll mod = 1e9 + 7; ll mod2 = 998244353; const int INF = 1e9; signed main() { ll n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; sort(all(a)); cout << a[n / 2 + 1] - a[n / 2] << endl; } // `.`..`(WNNNNNNMNWWWH9rttwgHM8OtttwwVtttrrtrttrw0rtrtwrrrtrZUAOOrrrXWppHMHyZHpWHMHMkWWVHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`.`..`(WMNMHfWH9ZtrtAdNM8ttttOwVtrrtrrtrrrrrdrrttrZkOrrrrrrXWyrtrrZWWWWMmwXWppWHHMmWHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // .`.```_..(HMfWH9OtttwXWHBrttrOw0rttrOvrrrtrZrrRrtrrrtZHwrrrrrwwZHyrrrrZWWpWMmwWppkWHHMkHNkVWMNNNNN#NN#NN#NN#NN#NN#NN#NN#NN#NN#NNNN //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uzzuzdkHHHHHkHWMHHbkWHMMMNXM# // Wg#rvrvrrXmHNpfHHHMMRd-.._4kfyttttllOHWr`` // <udT"""7"""""TMHHMNHHMNgv4HMRXHXHwuzzzuWHHKXHkHzzXMSWzuzzuzuuzudbkHHHHkkHqHuWkWHHMMMNWM // WHNrvrvvvXHmNppgg@MMMHr..` UkWOlllllldW$..?! ` ` // ?@MMHHMM#NMMmMkXXWkHuzuzuWNHSXHHHuuXNSWuzuuzuzuzuWkHNgMkkkMHSuWkqmqHHMNNK // WHMkvvrvrXHHMppHHHMNMTN_``` 4kWOz====vXP` ` ` // ``.HggmgM@MH###NKkkuXWHzzuXHHMzdMHHuzWNXKzuuzuzuzuuHkHHNMkkHHBuzWkHHHHuHMMM // WHHNzvvrvwHMMppHMMMM>.#L`````?kyy====?0S`` ` ` // ``...dmqqqmmHHHMMM#WRSzuzWHuzXHq#uWHHHzuWHXKzuzzuzuzuXHkHWMNkWM#uzuWHHHHSuuWM# // WM@MkwvvrzXMMHpgHMMM[.MN.`````(HXy1???zd.`` ` ` ` // dHkkqkkqkHHHHHHMMWWXzzuzwWwXHHKXMkHHuXMRXSuuuzuuzuzXHkHdHHWHHXuuwWHqHHuXzXWM // XHHMNyrvvwdW@HpHWMHML MM[` ` `.4kGz<<>Or``` ` // `dWpbbbbbHMMbbbHHMXXuzzuzuzXWHHSXMkHHuXMSXuzzuzzuzuzWkkHWMHMSwuzzXHkHHXuzuWd# // dHHH@NyzwwwWHMHHWMMMR dW]`` ` ```(HZx<<<4.```` `` `` // OZppfppppWfpWpK9NKXuuzuuzuXWHHudMqNHXWNuHuzzuzuzuzuHkHXMMBuuuzuuWkHHUuuuXSMS // wWHMMMMkwwvdNpHHHM#MH-jWP``` `` ```7kI<:<h.``````` `` // ,2OWVVyVVyWWWWIdMKWzuuuzzuXHHSwHHHHKXHHXSuuzuuzuzuXHHHXMXuuuuuuXHHHuzuuXSX#X // wdWHMMMMmwXwHbpMNHMM@b.hb``````````` // 7x1_(>_```````````(x7UUUV0XwvCI1dMWKXuzzuzuWHHudMkgkWbMSXuzzzuzzuzuWkHSW#zXwXuXXWHHuuXXuWXWSX // vvXWHMMHWNkvWHbbMWMMMN_JF.```` `` // `````?1_(_.`.`........(<777=<<<><<+dMXUuzuuuuWWMRwMHWMkWHHXSuuzuzuzzuXqHHXMHUXuXXHHHSuuwuXWud8uH // mzzXWH#zHbHkXNbbWMMMMD~(_``````````````` // .~_`.``.`.`.....___(<~(<<(<<dHkkuuuuuXkHHuWMkHkkkHSXXzuuzuuuuzXHHSd#uuXXWHHXuuuZuXSuqHudS // UHzzXWSXXWbbHHHbWHMH#<~...```` ``````````````.```.` // -_____<~~_<_<~~(jMWSuzuzuXWHMHXMHHHkkH#XSuzzuzuzuzuKkHXMQkWHHWUXuXXUuXUuXHuXBu // .(Smd8wSvXbbbbHHHWHW3___.``````` `` // ``````.```.```.`...._.._~~..~_~~(#WuzuuzXXkHMqMMHMkkkMUXuXzuuwuuzuXkHSWMWUUuuuXXUUuXHXXWSuXHXu // .. JKwSvwzWkkkkHHHH5~~..```````````````````.```.````````.` // .........dWSuuzzzdkHMW@MHMkkkHHXXuzuuXSuzuuWWHd#uuuXXkWSuXXWUXXHUXWHuuu // .`(HXSzzzzwWbkWHNHr_...``````````````````.```````.```````.`.`..`.-.(HKuzzuuwHHMNMHHMkkkHHuZuuzuuXuuuuXkHWMHHHUUuXXXWHXXHHUuXW8uuuu // .-MXWwzzzuzXkHHMHHN-.`````````` // ````````````.`.````.``.```.`.`....-dXUXuzuXHWHMMHHBWHMMMSZuzuuzXXzuuXHHMHMHkHHHHHHHWHHSuXkHWSuuuuX // (#XKzzzzzuzuWHHkWHHp // ``.````````````````````````.````````.....-((-(NSXuzzXHW@D:~`(/1- // .kXuzuuzXSuuzXXkHWMHHHHHHHHMWuuuQXUXWuuuXuXH // MXWzuzzzzzuXHHbHNMMMt`.```````````````````````````.`.` ..-J7"!`` // XKuzzuXHHM9;/<-.J-u!JXXuuzuXWuuuuXHHH#WMNHmkkkuXXkWUXXWXXuuuXqHH // XWzzzzuzzwXHHHH#"````<.````````````````````.``.`...-c"7``` ` ` // `(BzuuuXmHH8<!(- ?_!`jWUuzuuuWuuuzXWHNH> ..7WHHqHmQkWWXXuuuuuXWqHH // SwuzzzXuwXHNHY`` `` <,`.`````````````` `` ..J7=``` ` ` `` // ````.#zuzXXHHH$~`` ```(_(HSuuuzuXSuzuuXHHWCi(` ._ ?WggHHHHWkkkkWHHHHMH // zzzuzuzwWHMY!` ` ` `(&.```````````` ..J7^ `` ` ` ` ` `. .HXuuXWHW#!` ` // ```` (WUuzzuXXSzuuudHHXY$. : (..``.THHkqkHHHgHHMHkkk zzzzzzXHWK`` ` `` ` ` ` // TJ.``````..J7=```` ` ` ` ` `` ` `.8zuXXHHW=` `` // ..(XSuuuuuXWuuuuXHWH5~~` .`_?_,-``.TMMMMMMHkkqqHHH zzuuzdHHkN ` ` ` `` ` // ``(Wm,.(J7!``` ` ``` `` `` ` ` ``` .SzuXWHHY `` // .._~<~~(dSuuuzzXHuuuuXHWHD::?C._.( -`(!_1 ,WHqHHHmqHHHHN zuzXXHHkHM;` ` ` ` // `` ` .;jY= ` .``_`` ` ` ` ` `` ` `.dXuXWm@^ // .._~_.~~~~~(d0uuzuuXHUuuuXHWH5:::::::_.<&._4r?_.;WMMM@MMY"<!` zzXHHHHMHMb`` // `` ` `` `` .J! ` ..`_~ ` ` ` `` ` ` ``.JXXXHY! // .__.....~.~~~-d0wuzuXXHSuuuXWWH$::::;:::;:+- ~`(.i +HqHHkkHL..`. XWHHHMMHMHM; // ` ` ` ` ._`` ...(:.=_` ` ` ` ` ```` // .-dVT7^``````......~~~~~_jWuuuuuXHSuzuXHHH3<;:::::;;j<+z ``` -dHNkkMqkkN..`` // HHHMMHHHHNMN.`` ` ` `!`z(. ~..~ ! . ` `` ` ` ` // ..gHr``````````........~~~~_jWuuuuuXkSuuuXHWHC:;::;;:::+v>:((J<!(WHHMkkHNqkM;`.. // HMMkkHHHHM9?b `` ` ` `` .``. ` ` ` ` ``` 4HkkkH, // ``````.`......~~~~_+KuuuzuXHSuuuXHHK<(::::::<;<J+g9>::;< .4NkkqMHqH]..` // MHkHHHMM$<<:?L` `` ` ` ` ``.` ` !`` ` ` ` ` ` // ?HbkkHx``````.`..`...~~~~_jKuuuuuXHSuuuqMHD<:<;:<++ddNMB3:;::;:<` // `,HkkqH@HH].`` kkHHkHY``` (;?h`` ` ` `` ```` ` ` ` ` ` ` ` ` // ```.4XWbHx```..`......~~~~_gKuuuuXWH0uuuXHH3:;++1z<jgMB3<::::::::~` // `jMkqkHMHHF.`. kHHHH=` . ` _<?L ` ` ` ` ` ` ` ` ` ` ` ` ` ` ?kwWHp // .`.......~_~~(dKuuuuXWHUuuXWH9++z1<;+jWB3::::;;;::;:;_`` MNkqkqMNMF..` HHk@!. // ` ` ` ~?L ` ` `` ` `` `` ` ` ` ` ` ` ` ` // -WuXHh..`.....~~~~(dWuuuXXkHUuuXHH9>:<:++YY<:;::::;:::::;:::+.``?HHkHHHM>`.`
#include "bits/stdc++.h" using namespace std; #define ll long long #define endl '\n' #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = int(a); i < int(b); i++) #define pb emplace_back #define all(x) (x).begin(), (x).end() ll mod = 1e9 + 7; ll mod2 = 998244353; const int INF = 1e9; signed main() { ll n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; sort(all(a)); cout << a[n / 2] - a[n / 2 - 1] << endl; } // `.`..`(WNNNNNNMNWWWH9rttwgHM8OtttwwVtttrrtrttrw0rtrtwrrrtrZUAOOrrrXWppHMHyZHpWHMHMkWWVHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // `.`.`..`(WMNMHfWH9ZtrtAdNM8ttttOwVtrrtrrtrrrrrdrrttrZkOrrrrrrXWyrtrrZWWWWMmwXWppWHHMmWHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN // .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uzXHkHHMMbkkHkMkkkMMMNUMMN // WHKrrvrrvXqHMpfHHHWkrb...vkHyOrtttttdNXr.`.J>~-((J+ggQkHXHHHmaJz7&JWHMMWkuHXzuuuzzWgHHwHkKuzXMKXuzuuzuzzuzdkHHHHHkHWMHHbkWHMMMNXM# // Wg#rvrvrrXmHNpfHHHMMRd-.._4kfyttttllOHWr`` // <udT"""7"""""TMHHMNHHMNgv4HMRXHXHwuzzzuWHHKXHkHzzXMSWzuzzuzuuzudbkHHHHkkHqHuWkWHHMMMNWM // WHNrvrvvvXHmNppgg@MMMHr..` UkWOlllllldW$..?! ` ` // ?@MMHHMM#NMMmMkXXWkHuzuzuWNHSXHHHuuXNSWuzuuzuzuzuWkHNgMkkkMHSuWkqmqHHMNNK // WHMkvvrvrXHHMppHHHMNMTN_``` 4kWOz====vXP` ` ` // ``.HggmgM@MH###NKkkuXWHzzuXHHMzdMHHuzWNXKzuuzuzuzuuHkHHNMkkHHBuzWkHHHHuHMMM // WHHNzvvrvwHMMppHMMMM>.#L`````?kyy====?0S`` ` ` // ``...dmqqqmmHHHMMM#WRSzuzWHuzXHq#uWHHHzuWHXKzuzzuzuzuXHkHWMNkWM#uzuWHHHHSuuWM# // WM@MkwvvrzXMMHpgHMMM[.MN.`````(HXy1???zd.`` ` ` ` // dHkkqkkqkHHHHHHMMWWXzzuzwWwXHHKXMkHHuXMRXSuuuzuuzuzXHkHdHHWHHXuuwWHqHHuXzXWM // XHHMNyrvvwdW@HpHWMHML MM[` ` `.4kGz<<>Or``` ` // `dWpbbbbbHMMbbbHHMXXuzzuzuzXWHHSXMkHHuXMSXuzzuzzuzuzWkkHWMHMSwuzzXHkHHXuzuWd# // dHHH@NyzwwwWHMHHWMMMR dW]`` ` ```(HZx<<<4.```` `` `` // OZppfppppWfpWpK9NKXuuzuuzuXWHHudMqNHXWNuHuzzuzuzuzuHkHXMMBuuuzuuWkHHUuuuXSMS // wWHMMMMkwwvdNpHHHM#MH-jWP``` `` ```7kI<:<h.``````` `` // ,2OWVVyVVyWWWWIdMKWzuuuzzuXHHSwHHHHKXHHXSuuzuuzuzuXHHHXMXuuuuuuXHHHuzuuXSX#X // wdWHMMMMmwXwHbpMNHMM@b.hb``````````` // 7x1_(>_```````````(x7UUUV0XwvCI1dMWKXuzzuzuWHHudMkgkWbMSXuzzzuzzuzuWkHSW#zXwXuXXWHHuuXXuWXWSX // vvXWHMMHWNkvWHbbMWMMMN_JF.```` `` // `````?1_(_.`.`........(<777=<<<><<+dMXUuzuuuuWWMRwMHWMkWHHXSuuzuzuzzuXqHHXMHUXuXXHHHSuuwuXWud8uH // mzzXWH#zHbHkXNbbWMMMMD~(_``````````````` // .~_`.``.`.`.....___(<~(<<(<<dHkkuuuuuXkHHuWMkHkkkHSXXzuuzuuuuzXHHSd#uuXXWHHXuuuZuXSuqHudS // UHzzXWSXXWbbHHHbWHMH#<~...```` ``````````````.```.` // -_____<~~_<_<~~(jMWSuzuzuXWHMHXMHHHkkH#XSuzzuzuzuzuKkHXMQkWHHWUXuXXUuXUuXHuXBu // .(Smd8wSvXbbbbHHHWHW3___.``````` `` // ``````.```.```.`...._.._~~..~_~~(#WuzuuzXXkHMqMMHMkkkMUXuXzuuwuuzuXkHSWMWUUuuuXXUUuXHXXWSuXHXu // .. JKwSvwzWkkkkHHHH5~~..```````````````````.```.````````.` // .........dWSuuzzzdkHMW@MHMkkkHHXXuzuuXSuzuuWWHd#uuuXXkWSuXXWUXXHUXWHuuu // .`(HXSzzzzwWbkWHNHr_...``````````````````.```````.```````.`.`..`.-.(HKuzzuuwHHMNMHHMkkkHHuZuuzuuXuuuuXkHWMHHHUUuXXXWHXXHHUuXW8uuuu // .-MXWwzzzuzXkHHMHHN-.`````````` // ````````````.`.````.``.```.`.`....-dXUXuzuXHWHMMHHBWHMMMSZuzuuzXXzuuXHHMHMHkHHHHHHHWHHSuXkHWSuuuuX // (#XKzzzzzuzuWHHkWHHp // ``.````````````````````````.````````.....-((-(NSXuzzXHW@D:~`(/1- // .kXuzuuzXSuuzXXkHWMHHHHHHHHMWuuuQXUXWuuuXuXH // MXWzuzzzzzuXHHbHNMMMt`.```````````````````````````.`.` ..-J7"!`` // XKuzzuXHHM9;/<-.J-u!JXXuuzuXWuuuuXHHH#WMNHmkkkuXXkWUXXWXXuuuXqHH // XWzzzzuzzwXHHHH#"````<.````````````````````.``.`...-c"7``` ` ` // `(BzuuuXmHH8<!(- ?_!`jWUuzuuuWuuuzXWHNH> ..7WHHqHmQkWWXXuuuuuXWqHH // SwuzzzXuwXHNHY`` `` <,`.`````````````` `` ..J7=``` ` ` `` // ````.#zuzXXHHH$~`` ```(_(HSuuuzuXSuzuuXHHWCi(` ._ ?WggHHHHWkkkkWHHHHMH // zzzuzuzwWHMY!` ` ` `(&.```````````` ..J7^ `` ` ` ` ` `. .HXuuXWHW#!` ` // ```` (WUuzzuXXSzuuudHHXY$. : (..``.THHkqkHHHgHHMHkkk zzzzzzXHWK`` ` `` ` ` ` // TJ.``````..J7=```` ` ` ` ` `` ` `.8zuXXHHW=` `` // ..(XSuuuuuXWuuuuXHWH5~~` .`_?_,-``.TMMMMMMHkkqqHHH zzuuzdHHkN ` ` ` `` ` // ``(Wm,.(J7!``` ` ``` `` `` ` ` ``` .SzuXWHHY `` // .._~<~~(dSuuuzzXHuuuuXHWHD::?C._.( -`(!_1 ,WHqHHHmqHHHHN zuzXXHHkHM;` ` ` ` // `` ` .;jY= ` .``_`` ` ` ` ` `` ` `.dXuXWm@^ // .._~_.~~~~~(d0uuzuuXHUuuuXHWH5:::::::_.<&._4r?_.;WMMM@MMY"<!` zzXHHHHMHMb`` // `` ` `` `` .J! ` ..`_~ ` ` ` `` ` ` ``.JXXXHY! // .__.....~.~~~-d0wuzuXXHSuuuXWWH$::::;:::;:+- ~`(.i +HqHHkkHL..`. XWHHHMMHMHM; // ` ` ` ` ._`` ...(:.=_` ` ` ` ` ```` // .-dVT7^``````......~~~~~_jWuuuuuXHSuzuXHHH3<;:::::;;j<+z ``` -dHNkkMqkkN..`` // HHHMMHHHHNMN.`` ` ` `!`z(. ~..~ ! . ` `` ` ` ` // ..gHr``````````........~~~~_jWuuuuuXkSuuuXHWHC:;::;;:::+v>:((J<!(WHHMkkHNqkM;`.. // HMMkkHHHHM9?b `` ` ` `` .``. ` ` ` ` ``` 4HkkkH, // ``````.`......~~~~_+KuuuzuXHSuuuXHHK<(::::::<;<J+g9>::;< .4NkkqMHqH]..` // MHkHHHMM$<<:?L` `` ` ` ` ``.` ` !`` ` ` ` ` ` // ?HbkkHx``````.`..`...~~~~_jKuuuuuXHSuuuqMHD<:<;:<++ddNMB3:;::;:<` // `,HkkqH@HH].`` kkHHkHY``` (;?h`` ` ` `` ```` ` ` ` ` ` ` ` ` // ```.4XWbHx```..`......~~~~_gKuuuuXWH0uuuXHH3:;++1z<jgMB3<::::::::~` // `jMkqkHMHHF.`. kHHHH=` . ` _<?L ` ` ` ` ` ` ` ` ` ` ` ` ` ` ?kwWHp // .`.......~_~~(dKuuuuXWHUuuXWH9++z1<;+jWB3::::;;;::;:;_`` MNkqkqMNMF..` HHk@!. // ` ` ` ~?L ` ` `` ` `` `` ` ` ` ` ` ` ` ` // -WuXHh..`.....~~~~(dWuuuXXkHUuuXHH9>:<:++YY<:;::::;:::::;:::+.``?HHkHHHM>`.`
[ "expression.operation.binary.remove" ]
797,072
797,073
u890465662
cpp