buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(), x.end()
#define rep(i, j, n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
#define MOD 100... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(), x.end()
#define rep(i, j, n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
#define MOD 100... | [["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25]] | 1 | 180 |
// By TheOneYouWant
#pragma GCC optimize("-O2")
#include <bits/stdc++.h>
using namespace std;
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | // By TheOneYouWant
#pragma GCC optimize("-O2")
#include <bits/stdc++.h>
using namespace std;
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | [["-", 31, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["-", 31, 16, 31, 23, 0, 16, 31, 16, 17, 72], ["-", 31, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["-", 31, 16, 12, 16, 31, 16, 31, 23, 0, 25]] | 1 | 498 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 263 |
#include <bits/stdc++.h>
using namespace std;
typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ldbl;
typedef pair<int, int> pii;
typedef pair<uint, uint> puu;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;
typedef pair<double, double> pdd;
typedef vector<int> vi... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ldbl;
typedef pair<int, int> pii;
typedef pair<uint, uint> puu;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;
typedef pair<double, double> pdd;
typedef vector<int> vi... | [["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25]] | 1 | 531 |
#include <bits/stdc++.h>
#define fo(i, a, b) for ((i) = (a); i <= (b); i++)
#define rfo(i, a, b) for ((i) = (a); i >= (b); i--)
#define inrange(x, y, z) (((x) >= (y)) && ((x) <= (z)))
#define ALL(vec) ((vec).begin(), (vec).end())
#define SOR(vec) sort(ALL(vec))
#define UNI(vec) (vec).erase(unique(ALL(vec)), (vec).end()... | #include <bits/stdc++.h>
#define fo(i, a, b) for ((i) = (a); i <= (b); i++)
#define rfo(i, a, b) for ((i) = (a); i >= (b); i--)
#define inrange(x, y, z) (((x) >= (y)) && ((x) <= (z)))
#define ALL(vec) ((vec).begin(), (vec).end())
#define SOR(vec) sort(ALL(vec))
#define UNI(vec) (vec).erase(unique(ALL(vec)), (vec).end()... | [["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13]] | 1 | 147 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i)
#define ll long long
static const int MAX = 10000;
static const ll INFTY = 1e12;
template <class T> inline bool chmax(T &a, T b) {
if (... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i)
#define ll long long
static const int MAX = 10000;
static const ll INFTY = 1e12;
template <class T> inline bool chmax(T &a, T b) {
if (... | [["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25]] | 1 | 151 |
#include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
#define INF ((i64)(1e18))
#define MOD ((i64)(1e9 + 7))
#define REP(i, n) for (i64 i = 0; i < (n); i++)
#define RREP(i, n) for (i64 i = (n)-1; i >= 0; i--)
#define RANGE(i, a, b) for (i64 i = (a); i < (b); i++)
#define RRANGE(i, a, b) for (i64 i = ... | #include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
#define INF ((i64)(1e18))
#define MOD ((i64)(1e9 + 7))
#define REP(i, n) for (i64 i = 0; i < (n); i++)
#define RREP(i, n) for (i64 i = (n)-1; i >= 0; i--)
#define RANGE(i, a, b) for (i64 i = (a); i < (b); i++)
#define RRANGE(i, a, b) for (i64 i = ... | [["-", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["-", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25], ["-", 0, 16, 31, 16, 12, 16, 12, 23, 0, 25]] | 1 | 165 |
#include <bits/stdc++.h>
using namespace std;
int64_t MOD = 1000000007;
double PI = 3.141592653589793;
int main() {
int L, R, D;
cin >> L >> R >> D;
cout << R / D - L / D;
} | #include <bits/stdc++.h>
using namespace std;
int64_t MOD = 1000000007;
double PI = 3.141592653589793;
int main() {
int L, R, D;
cin >> L >> R >> D;
cout << R / D - (L - 1) / D;
} | [["+", 0, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 16, 12, 16, 12, 16, 31, 23, 0, 25]] | 1 | 47 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, tmp, res = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> tmp;
if (tmp % 2 || (i + 1) % 2) {
res++;
}
}
cout << res << "\n";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, tmp, res = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> tmp;
if (tmp % 2 && (i + 1) % 2) {
res++;
}
}
cout << res << "\n";
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 75 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define po pop_back
#define fi first
#define se second
#define mxn 200001
#define ll long long int
#define ldb long double
#define fr(i, a, b, k) for (ll i = a; i < b; i += k)
#define frr(i, a, b, k) for (ll i = a; i > b; i -= k)
... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define po pop_back
#define fi first
#define se second
#define mxn 200001
#define ll long long int
#define ldb long double
#define fr(i, a, b, k) for (ll i = a; i < b; i += k)
#define frr(i, a, b, k) for (ll i = a; i > b; i -= k)
... | [["+", 8, 9, 0, 43, 49, 80, 81, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 80, 81, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 329 |
#include <bits/stdc++.h>
#define rep(x, n) for (int i = x; i < (n); ++i)
using namespace std;
using ll = long long;
int main(void) {
int n;
cin >> n;
vector<int> a(n);
rep(0, n) cin >> a[i];
int res = 0;
rep(0, (int)a.size()) if (i % 2 == 1 && a.at(i) % 2 == 1)++ res;
cout << res << endl;
} | #include <bits/stdc++.h>
#define rep(x, n) for (int i = x; i < (n); ++i)
using namespace std;
using ll = long long;
int main(void) {
int n;
cin >> n;
vector<int> a(n + 1);
rep(1, n + 1) cin >> a[i];
int res = 0;
rep(1, (int)a.size()) if (i % 2 == 1 && a.at(i) % 2 == 1)++ res;
cout << res << endl;
} | [["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 104 |
#include <iostream>
using namespace std;
int main() {
int n, a[1000], b = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] % 2 == 1 && i % 2 == 1) {
b += 1;
}
}
cout << b;
} | #include <iostream>
using namespace std;
int main() {
int n, a[1000], b = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] % 2 == 1 && (i + 1) % 2 == 1) {
b += 1;
}
}
cout << b;
} | [["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25]] | 1 | 78 |
n=int(input())
a=list(map(int,input().strip().split()))[:n]
counter=0
for i in range (1,n,2):
if(a[i]%2==1):
counter+=1
print(counter) | n=int(input())
a=list(map(int,input().strip().split()))[:n]
counter=0
for i in range (0,n,2):
if(a[i]%2==1):
counter+=1
print(counter) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 67 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, cnt = 0;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> b;
if (b && (i + 1) % 2)
cnt++;
}
cout << cnt << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, cnt = 0;
cin >> a;
for (int i = 0; i < a; i++) {
cin >> b;
if (b % 2 && (i + 1) % 2)
cnt++;
}
cout << cnt << endl;
return 0;
}
| [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 69 |
n= int(input())
li=list(map(int,input().split()))
a=int(0)
for i in range(1,n,2):
if li[i]%2==1:
a+=1
else:
a+=0
print(a)
| n= int(input())
li=list(map(int,input().split()))
a=int(0)
for i in range(0,n,2):
if li[i]%2==1:
a+=1
else:
a+=0
print(a)
| [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 65 |
#include <stdio.h>
int main(void) {
int n, i, a[128], x;
scanf("%d", &n);
x = 0;
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
for (i = 1; i < n; i = i + 2) {
if (a[i] % 2 == 1)
x++;
}
printf("%d\n", x);
}
| #include <stdio.h>
int main(void) {
int n, i, a[128], x;
scanf("%d", &n);
x = 0;
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < n; i = i + 2) {
if (a[i] % 2 == 1) {
x++;
}
}
printf("%d\n", x);
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]] | 0 | 105 |
#include <bits/stdc++.h>
using namespace std;
long long int Exp(long long int exp_n, long long int exp_e, long long exp_mod);
int main() {
int N, a, O = 0;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> a;
if ((i % 2) * (a % 2) == 1) {
O++;
}
}
cout << O << endl;
}
long long int Exp(long ... | #include <bits/stdc++.h>
using namespace std;
long long int Exp(long long int exp_n, long long int exp_e, long long exp_mod);
int main() {
int N, a, O = 0;
cin >> N;
for (int i = 1; i < N + 1; i++) {
cin >> a;
if ((i % 2) * (a % 2) == 1) {
O++;
}
}
cout << O << endl;
}
long long int Exp(l... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 206 |
/*input
5
1 3 4 5 7
*/
// #include<bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#in... | /*input
5
1 3 4 5 7
*/
// #include<bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#in... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 312 |
N = int(input())
li = []
for i in input().split():
li.append(int(i))
a = 1
count = 0
for i in li:
if a % 2 == 1 and li % 2 == 1:
count += 1
a += 1
print(count)
| N = int(input())
li = []
for i in input().split():
li.append(int(i))
a = 1
count = 0
for i in li:
if a % 2 == 1 and i % 2 == 1:
count += 1
a += 1
print(count)
| [["-", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22]] | 5 | 66 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, f1 = 0, f2 = 0, count = 0;
;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
if (i + 1 % 2 == 1)
f1 = 1;
cin >> a[i];
if (a[i] % 2 == 1)
f2 = 1;
if (f1 == 1 && f2 == 1)
count++;
f1 = 0;
f2 = 0;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, f1 = 0, f2 = 0, count = 0;
;
cin >> n;
int a[n];
for (int i = 1; i <= n; i++) {
if (i % 2 == 1)
f1 = 1;
cin >> a[i];
if (a[i] % 2 == 1)
f2 = 1;
if (f1 == 1 && f2 == 1)
count++;
f1 = 0;
f2 = 0;
}
co... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 13]] | 1 | 120 |
n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(1, n, 2):
if a[i] % 2 == 1:
cnt += 1
else:
continue
print(cnt) | n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(0, n, 2):
if a[i] % 2 == 1:
cnt += 1
else:
continue
print(cnt) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 60 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
int ans = 0;
for (int i = 1; i < n; i += 2) {
if (a[i] & 1)
++ans;
}
cout << ans << endl;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
int ans = 0;
for (int i = 0; i < n; i += 2) {
if (a[i] & 1)
++ans;
}
cout << ans << endl;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 88 |
N = int(input())
a = list(map(int, input().split()))
answer = 0
for i, e in enumerate(a):
if i % 2 != 0 and e % 2 != 0:
answer += 1
print(answer) | N = int(input())
a = list(map(int, input().split()))
answer = 0
for i, e in enumerate(a):
i += 1
if i % 2 != 0 and e % 2 != 0:
answer += 1
print(answer) | [["+", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612]] | 5 | 58 |
#include <bits/stdc++.h>
#include <iostream>
#include <sstream>
#define PI 3.14159265358979323846264338327950L
#define ll long long
using namespace std;
int main() {
int a;
cin >> a;
int n[a];
for (int i = 0; i < a; i++) {
cin >> n[i];
}
int ans = 0;
for (int i = 1; i < a; i += 2) {
if (n[i] % 2 ... | #include <bits/stdc++.h>
#include <iostream>
#include <sstream>
#define PI 3.14159265358979323846264338327950L
#define ll long long
using namespace std;
int main() {
int a;
cin >> a;
int n[a];
for (int i = 0; i < a; i++) {
cin >> n[i];
}
int ans = 0;
for (int i = 0; i < a; i += 2) {
if (n[i] % 2 ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
int N;
cin >> N;
vector<int> arr(N);
for (int i = 0; i < N; i++)
cin >> arr[i];
int ans = 0;
for (int j = 0; j < N; j++) {
if (j % 2 == 1 && arr[j] % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
int N;
cin >> N;
vector<int> arr(N);
for (int i = 0; i < N; i++)
cin >> arr[i];
int ans = 0;
for (int j = 0; j < N; j++) {
if ((j + 1) % 2 == 1 && arr[j] % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
}... | [["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25]] | 1 | 107 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
int odd = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] % 2 != 0 && i % 2 != 0) {
odd++;
}
}
cout ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
int odd = 0;
for (int i = 1; i <= n; i++) {
cin >> a[i];
if (a[i] % 2 != 0 && i % 2 != 0) {
odd++;
}
}
cout... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 94 |
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
if (i + 1) % 2 == 0:
if a[i] % 2 == 0:
count += 1
print(count) | n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
if (i + 1) % 2 != 0:
if a[i] % 2 != 0:
count += 1
print(count) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79], ["-", 0, 57, 64, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 667, 79]] | 5 | 64 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UncheckedIOException;
import java.lang.reflect.Array;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.Objects;
import java.util.regex.Pat... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UncheckedIOException;
import java.lang.reflect.Array;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.Objects;
import java.util.regex.Pa... | [["+", 8, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 499], ["+", 8, 16, 31, 16, 31, 16, 31, 23, 0, 25]] | 3 | 811 |
#include <stdio.h>
int main(void) {
int p;
scanf("%d", &p);
int a[p];
int k = 0;
for (int i = 1; i < p; i++) {
scanf("%d", &a[i - 1]);
if (i % 2 == 1 && a[i - 1] % 2 == 1) {
k++;
}
}
printf("%d\n", k);
return 0;
}
| #include <stdio.h>
int main(void) {
int p;
scanf("%d", &p);
int a[p];
int k = 0;
for (int i = 1; i <= p; i++) {
scanf("%d", &a[i - 1]);
if (i % 2 == 1 && a[i - 1] % 2 == 1) {
k++;
}
}
printf("%d\n", k);
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 101 |
#include <stdio.h>
int main() {
int n, c = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
int x;
scanf("%d", &x);
if (i % 2 == 1 || x % 2 == 1)
c++;
}
printf("%d\n", c);
return 0;
} | #include <stdio.h>
int main() {
int n, c = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
int x;
scanf("%d", &x);
if (i % 2 == 1 && x % 2 == 1)
c++;
}
printf("%d\n", c);
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 84 |
#line 2 "../../library/template.hpp"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pl = pair<ll, ll>;
using vl = vector<ll>;
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define rep3(i, l, r) for (ll i = l; i < (ll)r; i++)
#define per(i, n) for (ll i = (ll)n - 1; i >= 0; i--)
#define per... | #line 2 "../../library/template.hpp"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pl = pair<ll, ll>;
using vl = vector<ll>;
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define rep3(i, l, r) for (ll i = l; i < (ll)r; i++)
#define per(i, n) for (ll i = (ll)n - 1; i >= 0; i--)
#define per... | [["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 25]] | 1 | 432 |
n =int(input())
a =list(map(int,input().split()))
#print(a)
cnt = 0
for i in range(n):
#print(i)
if i%2 ==1:
if a[i]%2 ==1:
cnt +=1
print(cnt) | n =int(input())
a =list(map(int,input().split()))
#print(a)
cnt = 0
for i in range(n):
#print(i)
if (i+1)%2 ==1:
if a[i]%2 ==1:
cnt +=1
print(cnt) | [["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25]] | 5 | 62 |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int counter = 0;
for (int i = 1; i < N; i++) {
int a = sc.nextInt();
if (a % 2 != 0 && i % 2 != 0) {
... | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int counter = 0;
for (int i = 1; i < N + 1; i++) {
int a = sc.nextInt();
if (a % 2 != 0 && i % 2 != 0) {
... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 105 |
#include <bits/stdc++.h>
#define ll uint64_t
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
int ans = 0;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
if (i % 2 != 0 && x % 2 != 0)
ans++;
}
cout << ans;
return 0;
}
| #include <bits/stdc++.h>
#define ll uint64_t
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
int ans = 0;
for (int i = 1; i <= n; i++) {
int x;
cin >> x;
if (i % 2 != 0 && x % 2 != 0)
ans++;
}
cout << ans;
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 83 |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int a[n];
for (int i = 0; i < n; i++) {
scanf("%", &a[i]);
}
int ans = 0;
for (int x = 0; x < n; x++) {
if (x % 2 == 1) {
if (a[x] % 2 == 1) {
ans++;
}
}
}
printf("%d", ans);
return 0;
}
| #include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int a[n];
for (int i = 1; i <= n; i++) {
scanf("%d", &a[i]);
}
int ans = 0;
for (int x = 1; x <= n; x++) {
if (x % 2 == 1) {
if (a[x] % 2 == 1) {
ans++;
}
}
}
printf("%d", ans);
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 115 |
n = int(input())
a = [int(i) for i in input().split()]
ans = 0
for i in range(n):
if (i+1) % 2 == 1 and a[i] % 2 == 1:
c += 1
else:
print(ans)
| N = int(input())
A = [int(i) for i in input().split()]
c = 0
for i in range(N):
if (i+1) % 2 == 1 and A[i] % 2 == 1:
c += 1
else:
print(c) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 15, 679, 12, 666, 0, 657, 31, 206, 51, 22], ["+", 15, 679, 12, 666, 0, 657, 31, 206, 51, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], [... | 5 | 66 |
n = int(input())
cnt = 0
arr = [int(x) for x in input().split()]
for i in range(0, len(arr), 2):
if arr[i] % 2 == 0:
cnt += 1
print(cnt)
| n = int(input())
cnt = 0
arr = [int(x) for x in input().split()]
for i in range(0, len(arr), 2):
if arr[i] % 2 != 0:
cnt += 1
print(cnt)
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]] | 5 | 61 |
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner ob = new Scanner(System.in);
int N = ob.nextInt();
int count = 0;
int[] a = new int[N];
for (int i = 0; i < N; i++) {
a[i] = ob.nextInt();
}
for (int j = 0; j < N; j++) {
if ((a[j] % 2 ... | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner ob = new Scanner(System.in);
int N = ob.nextInt();
int count = 0;
int[] a = new int[N];
for (int i = 0; i < N; i++) {
a[i] = ob.nextInt();
}
for (int j = 0; j < N; j++) {
if ((a[j] % 2 ... | [["+", 12, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 499], ["+", 12, 23, 0, 16, 31, 16, 31, 23, 0, 25]] | 3 | 138 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int ans = 0;
rep(i, n) {
int a;
cin >> a;
if (i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int ans = 0;
rep(i, n) {
int a;
cin >> a;
if (i... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 107 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int x, cnt = 0;
for (int i = 1; i <= n; i++) {
cin >> x;
if (i % 2 == 1 && x % 2 == 1)
cnt++;
}
cout << x << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int x, cnt = 0;
for (int i = 1; i <= n; i++) {
cin >> x;
if (i % 2 == 1 && x % 2 == 1)
cnt++;
}
cout << cnt << endl;
return 0;
}
| [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 72 |
n = int(input())
a = list(map(int,input().split()))
cnt=0
for i in range(len(a)):
if (i+1)&1==a[i]==1:
cnt+=1
print(cnt) | n = int(input())
a = list(map(int,input().split()))
cnt=0
for i in range(len(a)):
if (i+1)&1==a[i]&1==1:
cnt+=1
print(cnt) | [["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 67], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 62 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a;
int ans = 0;
for (int i = 0; i < N; i++) {
cin >> a;
if (i % 2 == 1 && a % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a;
int ans = 0;
for (int i = 1; i < N + 1; i++) {
cin >> a;
if (i % 2 == 1 && a % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 73 |
#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 cnt = 0;
vector<int> a(n);
rep(i, n) cin >> a[i];
for (int i = 1; i <= n; i += 2) {
if (a[i] % 2 == 1)
cnt++;
}
cout << cnt << endl;
return 0;
... | #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 cnt = 0;
vector<int> a(n);
rep(i, n) cin >> a[i];
for (int i = 0; i <= n; i += 2) {
if (a[i] % 2 == 1)
cnt++;
}
cout << cnt << endl;
return 0;
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 101 |
n=map(int,input().split())
a=list(map(int,input().split()))
N=0
new_a=a[1::2]
for i in new_a:
if i%2==0:
N += 1
print(len(new_a)-N) | n=map(int,input().split())
a=list(map(int,input().split()))
N=0
new_a=a[::2]
for i in new_a:
if i%2==0:
N += 1
print(len(new_a)-N) | [["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612]] | 5 | 67 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <vector>
// #include <prettyprint.hpp>
using namespace std... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <vector>
// #include <prettyprint.hpp>
using namespace std... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 25]] | 1 | 216 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, i, count = 0;
cin >> n;
for (i = 0; i < n; i++) {
cin >> a;
if (i % 2 == 1 && a % 2 == 1)
count++;
}
cout << count << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, i, count = 0;
cin >> n;
for (i = 1; i <= n; i++) {
cin >> a;
if (i % 2 == 1 && a % 2 == 1)
count++;
}
cout << count << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 72 |
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int N;
cin >> N;
vector<int> a(N);
int count = 0;
for (int i = 0; i < N; i++)
cin >> a[i];
for (int i = 1; i < N; i += 2) {
if (a[i] % 2 == 1)
count++;
}
cout << count << endl;
}
| #include <iostream>
#include <vector>
using namespace std;
int main(void) {
int N;
cin >> N;
vector<int> a(N);
int count = 0;
for (int i = 0; i < N; i++)
cin >> a[i];
for (int i = 0; i < N; i += 2) {
if (a[i] % 2 == 1)
count++;
}
cout << count << endl;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 94 |
/*==========================================================================*/
/*
AUTHOR: BPZ
CREATED: 10.09.2020 14:52:25
*/
/*--------------------------------------------------------------------------*/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.... | /*==========================================================================*/
/*
AUTHOR: BPZ
CREATED: 10.09.2020 14:52:25
*/
/*--------------------------------------------------------------------------*/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.... | [["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 102 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int ans{};
int a;
for (int i = 1; i <= n; i++) {
cin >> a;
if (i % 2 == 1)
continue;
if (a % 2 == 1)
ans++;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int ans{};
int a;
for (int i = 1; i <= n; i++) {
cin >> a;
if (i % 2 != 1)
continue;
if (a % 2 == 1)
ans++;
}
cout << ans << endl;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 74 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, a;
cin >> N;
int total = 0;
vector<int> vec(N);
for (int i = 0; i < N; i++) {
cin >> a;
vec.at(i) = a;
}
for (int j = 0; j < N; j++) {
if (vec.at(j) % 2 == 1 && j % 2 == 1) {
total++;
} else {
continue;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, a;
cin >> N;
int total = 0;
vector<int> vec(N);
for (int i = 0; i < N; i++) {
cin >> a;
vec.at(i) = a;
}
for (int j = 0; j < N; j++) {
if (vec.at(j) % 2 == 1 && j % 2 == 0) {
total++;
} else {
continue;
}
... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 115 |
#include <stdio.h>
#include <string.h>
int main(void) {
int n, a, ans;
ans = 0;
scanf("%d", &n);
for (int i = 1; i < n; i++) {
scanf("%d", &a);
if (i % 2 == 1) {
if (a % 2 == 1) {
ans++;
}
}
}
printf("%d", ans);
return 0;
} | #include <stdio.h>
#include <string.h>
int main(void) {
int n, a, ans;
ans = 0;
scanf("%d", &n);
for (int i = 1; i < n + 1; i++) {
scanf("%d", &a);
if (i % 2 == 1) {
if (a % 2 == 1) {
ans++;
}
}
}
printf("%d", ans);
return 0;
} | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 93 |
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#include <iomanip> // fixed, setprecis... | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#include <iomanip> // fixed, setprecis... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 131 |
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
#define endl '\n';
#define all(v) ((v).begin()), ((v).end())
#define sz(s) (int)s.size()
#define Ceil(x, y) ((x + y - 1) / y)
#define RT(x) return cout << x, 0;
#define mem(x, y) memset(x, y, sizeof(x))
#define vi vector<int>
#define pii ... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
#define endl '\n';
#define all(v) ((v).begin()), ((v).end())
#define sz(s) (int)s.size()
#define Ceil(x, y) ((x + y - 1) / y)
#define RT(x) return cout << x, 0;
#define mem(x, y) memset(x, y, sizeof(x))
#define vi vector<int>
#define pii ... | [["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 233 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
int counter = 0;
for (int i = 1; i < n; i += 2) {
if (v[i] % 2 == 1) {
counter++;
}
}
cout << counter << '\n';
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
int counter = 0;
for (int i = 0; i < n; i += 2) {
if (v[i] % 2 == 1) {
counter++;
}
}
cout << counter << '\n';
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 97 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, s, n) for (int i = (s); i < (n); i++)
#define all(v) v.begin(), v.end()
#define outve(v) \
for (auto i : v) ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, s, n) for (int i = (s); i < (n); i++)
#define all(v) v.begin(), v.end()
#define outve(v) \
for (auto i : v) ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 457 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
int ans = 0;
cin >> n;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
if (i % 2 == 1 && a[i] % 2 == 1) {
ans++;
}
}
cout << ans <... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
int ans = 0;
cin >> n;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
if (i % 2 == 0 && a[i] % 2 == 1) {
ans++;
}
}
cout << ans <... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 103 |
n=int(input())
array=list(map(int,input().split()))
ans=0
for m in range(n):
if m%2==1 and array[m]%2==1:
ans=ans+1
print(ans) | n=int(input())
array=list(map(int,input().split()))
ans=0
for m in range(n):
if m%2==0 and array[m]%2==1:
ans=ans+1
print(ans) | [["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]] | 5 | 61 |
#include <iostream>
using namespace std;
int main() {
int N, count = 0;
cin >> N;
int a[N];
for (int i = 0; i < N; i++)
cin >> a[i];
for (int i = 0; i < N; i++) {
if (i % 2 == 1 and a[i] % 2 == 1) {
count++;
}
}
cout << count << endl;
} | #include <iostream>
using namespace std;
int main() {
int N, count = 0;
cin >> N;
int a[N + 1];
for (int i = 1; i <= N; i++)
cin >> a[i];
for (int i = 1; i <= N; i++) {
if (i % 2 == 1 and a[i] % 2 == 1) {
count++;
}
}
cout << count << endl;
} | [["+", 8, 9, 0, 43, 49, 80, 81, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 80, 81, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 94 |
N=int(input())
a=list(map(int,input().split()))
count=0
for i in range(len(a)):
if (i%2==1)&(a[i]%2==1):
count+=1
print(count) | N=int(input())
a=list(map(int,input().split()))
count=0
for i in range(len(a)):
if ((i+1)%2==1)&(a[i]%2==1):
count+=1
print(count) | [["+", 31, 23, 0, 666, 0, 657, 31, 23, 0, 24], ["+", 0, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 31, 23, 0, 666, 0, 657, 31, 23, 0, 25]] | 5 | 66 |
#include <iostream>
using namespace std;
int main() {
int n, c = 0;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
for (int i = 1; i < n; i += 2) {
if (arr[i - 1] % 2 == 1) {
c++;
}
}
cout << c;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int n, c = 0;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
for (int i = 1; i < n + 1; i += 2) {
if (arr[i - 1] % 2 == 1) {
c++;
}
}
cout << c;
return 0;
}
| [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 94 |
#include <iostream>
using namespace std;
int main() {
int N, cou = 0;
cin >> N;
int arr[N];
for (int i = 0; i < N; i++)
cin >> arr[i];
for (int i = 0; i < N; i++) {
if (arr[i] % 2 != 0 && i % 2 != 0)
cou++;
}
cout << cou << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int N, cou = 0;
cin >> N;
int arr[N];
for (int i = 0; i < N; i++)
cin >> arr[i];
for (int i = 0; i < N; i++) {
// cout << i+1 << " "<< arr[i];
if (arr[i] % 2 != 0 && (i + 1) % 2 != 0)
cou++;
}
cout << cou << endl;
return 0;
}
| [["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25]] | 1 | 95 |
#include <iostream>
using namespace std;
int main() {
int x, c = 0;
cin >> x;
int arr[x];
for (int i = 0; i < x; i++) {
cin >> arr[i];
if (arr[i] % 2 == 1 && i % 2 == 1) {
c++;
}
}
cout << c << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x, c = 0;
cin >> x;
int arr[x];
for (int i = 1; i <= x; i++) {
cin >> arr[i];
if (arr[i] % 2 == 1 && i % 2 == 1) {
c++;
}
}
cout << c << endl;
return 0;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, b, x, m, c = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
if ((i + 1) % 2 != 0 && a[i + 1] % 2 != 0)
c++;
}
cout << c << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, b, x, m, c = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
if ((i + 1) % 2 != 0 && a[i] % 2 != 0)
c++;
}
cout << c << endl;
}
| [["-", 31, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["-", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 105 |
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long c = 0;
long long m;
for (long long i = 0; i < n; i++) {
cin >> m;
if (i % 2 == 1 && m % 2 == 1) {
c++;
}
}
cout << c << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long c = 0;
long long m;
for (long long i = 1; i <= n; i++) {
cin >> m;
if (i % 2 == 1 && m % 2 == 1) {
c++;
}
}
cout << c << endl;
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 79 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> a(N + 1);
for (int i = 1; i <= N; i++) {
cin >> a.at(i);
}
int num = 0;
for (int i = 1; i <= N; i += 2) {
if (((a.at(i) % 2) == 0)) {
num++;
} // if
} // for
cout << num << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> a(N + 1);
for (int i = 1; i <= N; i++) {
cin >> a.at(i);
}
int num = 0;
for (int i = 1; i <= N; i += 2) {
if (((a.at(i) % 2) == 1)) {
num++;
} // if
} // for
cout << num << endl;
} | [["-", 0, 57, 15, 339, 51, 23, 0, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 23, 0, 16, 12, 13]] | 1 | 107 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, f, num = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> f;
if (i % 2 != 0 && f % 2 != 0)
num++;
}
cout << num;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, f, num = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> f;
if ((i + 1) % 2 != 0 && f % 2 != 0)
num++;
}
cout << num;
} | [["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25]] | 1 | 68 |
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int arr[N];
int count = 0;
for (int i = 0; i < N; i++) {
cin >> arr[i];
}
for (int i = 1; i <= N; i++) {
if (i % 2 != 0 && arr[i] % 2 != 0) {
count++;
}
}
cout << count;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int arr[N];
int count = 0;
for (int i = 1; i <= N; i++) {
cin >> arr[i];
}
for (int i = 1; i <= N; i++) {
if (i % 2 != 0 && arr[i] % 2 != 0) {
count++;
}
}
cout << count;
return 0;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 98 |
#include <iostream>
using namespace std;
int main() {
int n, x = 0;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
for (int i = 0; i <= n; i++) {
if (i % 2 == 1 && arr[i] % 2 == 1)
x += 1;
}
cout << x;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, x = 0;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
for (int i = 0; i < n; i++) {
if (i % 2 == 0 && arr[i] % 2 == 1)
x += 1;
}
cout << x;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 96 |
#include <iostream>
using namespace std;
int main() {
int count = 0, k = 1;
int z;
cin >> z;
int N[z];
for (int i = 0; i < z; i++) {
cin >> N[i];
if (k % 2 != 0 && N[i] % 2 != 0) {
count++;
}
k++;
}
cout << k << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int x = 0, l = 1;
int z;
cin >> z;
int N[z];
for (int i = 0; i < z; i++) {
cin >> N[i];
if (l % 2 != 0 && N[i] % 2 != 0) {
x++;
}
l++;
}
cout << x << endl;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 7, 8... | 1 | 91 |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] array = new int[n];
for (int i = 0; i < n; i++) {
array[i] = sc.nextInt();
}
int count = 0;
for ... | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] array = new int[n + 1];
for (int i = 1; i <= n; i++) {
array[i] = sc.nextInt();
}
int count = 0;
... | [["+", 49, 200, 51, 227, 497, 505, 0, 16, 17, 72], ["+", 49, 200, 51, 227, 497, 505, 0, 16, 12, 499], ["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 135 |
#!/usr/bin/env python3
import sys
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate
sys.setrecursionlimit(10**6)
INF = 10**12
m = 10**9 + 7
def main():
N = int(input())
a = list(map(int, input().split()))
ans = 0
... | #!/usr/bin/env python3
import sys
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate
sys.setrecursionlimit(10**6)
INF = 10**12
m = 10**9 + 7
def main():
N = int(input())
a = list(map(int, input().split()))
ans = 0
... | [["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]] | 5 | 117 |
#include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<do... | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<do... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 473 |
N = int(input())
nombres = [int(x) for x in input().split()]
k = 0
for indexe,nombre in enumerate(nombres):
if (indexe%2 == 1 and nombre%2 == 1):
k += 1
print(k) | N = int(input())
nombres = [int(x) for x in input().split()]
k = 0
for indexe,nombre in enumerate(nombres):
if ((indexe + 1)%2 == 1 and nombre%2 == 1):
k += 1
print(k) | [["+", 0, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 679, 31, 666, 0, 657, 31, 23, 0, 25]] | 5 | 61 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int count = 0, n = in.nextInt();
int[] ans = new int[n];
for (int i = 0; i < n; ++i) {
ans[i] = in.nextInt();
if (ans[i] % 2 == 1 && i % 2 == 1) {
count++;
... |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int count = 0, n = in.nextInt();
int[] ans = new int[n];
for (int i = 1; i <= n; ++i) {
ans[i - 1] = in.nextInt();
if (ans[i - 1] % 2 == 1 && i % 2 == 1) {
count... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 12, 499], ["+", 31, 16, 31, 16, 31, 504, 71, 16, 1... | 3 | 117 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
for (int i = 0; i < n; i++) {
int a = sc.nextInt();
if (i % 2 == 1 && a % 2 == 1)
cnt++;
}
System.out.println(cn... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
for (int i = 1; i <= n; i++) {
int a = sc.nextInt();
if (i % 2 == 1 && a % 2 == 1)
cnt++;
}
System.out.println(c... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 106 |
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n)[::2]:
if a[i]%2 != 1:
ans += 1
print(ans) | n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n)[::2]:
# print(a[i])
if a[i]%2 != 0:
ans += 1
print(ans) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 58 |
n = int(input())
a = [int(x) for x in input().split()]
cnt = 0
for a0 in a[::1]:
if a0%2 == 1:
cnt += 1
print(cnt) | n = int(input())
a = [int(x) for x in input().split()]
cnt = 0
for a0 in a[::2]:
if a0%2 == 1:
cnt += 1
print(cnt) | [["-", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612], ["+", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612]] | 5 | 53 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, ans = 0;
cin >> N;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a.at(i);
if (i % 2 == 0 && a.at(i) % 2 == 0)
ans++;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, ans = 0;
cin >> N;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a.at(i);
if (i % 2 == 0 && a.at(i) % 2 != 0)
ans++;
}
cout << ans << endl;
}
| [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]] | 1 | 85 |
<?php
// From https://qiita.com/yoshikyoto/items/6924478283dbdd549e4b
class Scanner
{
private $arr = [];
private $count = 0;
private $pointer = 0;
public function next()
{
if ($this->pointer >= $this->count) {
$str = trim(fgets(STDIN));
$this->arr = explode(' ', $str)... | <?php
// From https://qiita.com/yoshikyoto/items/6924478283dbdd549e4b
class Scanner
{
private $arr = [];
private $count = 0;
private $pointer = 0;
public function next()
{
if ($this->pointer >= $this->count) {
$str = trim(fgets(STDIN));
$this->arr = explode(' ', $str)... | [["-", 36, 36, 0, 493, 0, 7, 0, 11, 12, 612], ["+", 36, 36, 0, 493, 0, 7, 0, 11, 12, 612], ["-", 36, 36, 0, 493, 0, 7, 0, 16, 17, 18], ["+", 36, 36, 0, 493, 0, 7, 0, 16, 17, 19]] | 6 | 266 |
n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(len(a)):
if i %2 == 1 and a[i] %2 ==1:
cnt += 1
print(cnt)
| n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(1,len(a)+1):
if i %2 == 1 and a[i-1] %2 ==1:
cnt += 1
print(cnt)
| [["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 12, 666, 0, 657, 31, 206, 206, 657, 12, 612]] | 5 | 62 |
N = int(input())
list = list(map(int, input().split()))
cnt = 0
li = []
for count, i in enumerate(list):
if count %2 ==1:
li.append(i)
for j in range(len(li)):
if li[j] %2 ==1:
cnt +=1
print(cnt)
| N = int(input())
list = list(map(int, input().split()))
cnt = 0
li = []
for count, i in enumerate(list):
if count %2 ==0:
li.append(i)
for j in range(len(li)):
if li[j] %2 ==1:
cnt +=1
print(cnt)
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 83 |
n=gets.to_i
array = gets.split.map(&:to_i)
c=0
(0..n-1).each do |i|
if i.odd? && array[i].odd?
c += 1
end
end
puts c | n=gets.to_i
array = gets.split.map(&:to_i)
c=0
(0..n-1).each do |i|
if (i+1).odd? && array[i].odd?
c += 1
end
end
puts c | [["+", 0, 121, 15, 738, 31, 652, 486, 739, 0, 24], ["+", 15, 738, 31, 652, 486, 739, 0, 738, 17, 72], ["+", 15, 738, 31, 652, 486, 739, 0, 738, 12, 612], ["+", 0, 121, 15, 738, 31, 652, 486, 739, 0, 25]] | 4 | 50 |
n = int(input())
a = [int(s) for s in input().split()]
ans = 0
for i in range(len(a)):
if a[i] % 2 == 0 and i % 2 == 1:
ans += 1
print(ans) | n = int(input())
a = [int(s) for s in input().split()]
ans = 0
for i in range(len(a)):
if i % 2 == 0 and a[i] % 2 == 1:
ans += 1
print(ans) | [["-", 15, 679, 31, 666, 0, 657, 31, 206, 51, 22], ["-", 15, 679, 31, 666, 0, 657, 31, 206, 0, 70], ["-", 15, 679, 31, 666, 0, 657, 31, 206, 0, 73], ["+", 15, 679, 12, 666, 0, 657, 31, 206, 51, 22], ["+", 15, 679, 12, 666, 0, 657, 31, 206, 0, 70], ["+", 15, 679, 12, 666, 0, 657, 31, 206, 0, 73]] | 5 | 63 |
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
int n, cnt = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
int a;
cin >> a;
if (i % 2 == 1 && a % 2 == 1)
cnt++;
}
cout << cnt << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
int n, cnt = 0;
cin >> n;
for (int i = 1; i <= n; ++i) {
int a;
cin >> a;
if (i % 2 == 1 && a % 2 == 1)
cnt++;
}
cout << cnt << endl;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 90 |
N, *X = map(int, open(0).read().split())
ans = 0
for i in range(N):
if i % 2 == 1 and X[i] % 2 == 1:
ans += 1
print(ans) | N, *X = map(int, open(0).read().split())
ans = 0
for i in range(N):
if (i + 1) % 2 == 1 and X[i] % 2 == 1:
ans += 1
print(ans) | [["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]] | 5 | 56 |
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
/// Info.
///****************************************************************************************************************************************///
/// author : BAHAA El-DEEN OSAMA .
/// Problem name : E - An Odd Prob... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
/// Info.
///****************************************************************************************************************************************///
/// author : BAHAA El-DEEN OSAMA .
/// Problem name : E - An Odd Prob... | [["+", 51, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 23, 0, 16, 31, 23, 0, 25]] | 1 | 84 |
<?php
fscanf(STDIN, '%d', $n);
$nums = explode(' ', trim(fgets(STDIN)));
$bothOddCount = 0;
$i = 1;
while ($i < $n) {
if ($nums[$i] % 2 !== 0) {
$bothOddCount++;
}
$i += 2;
}
echo $bothOddCount; | <?php
fscanf(STDIN, '%d', $n);
$nums = explode(' ', trim(fgets(STDIN)));
$bothOddCount = 0;
$i = 0; // マスの番号は1オリジン
while ($i < $n) {
if ($nums[$i] % 2 !== 0) {
$bothOddCount++;
}
$i += 2;
}
echo $bothOddCount;
| [["-", 36, 36, 0, 493, 0, 1, 0, 11, 12, 612], ["+", 36, 36, 0, 493, 0, 1, 0, 11, 12, 612]] | 6 | 79 |
N = int(input())
n = list(map(int,input().split()))
ans = 0
for i in range(N):
if n[i] % 2 == 0 and (i-1)%2 == 0:
ans += 1
print(ans)
| N = int(input())
n = list(map(int,input().split()))
ans = 0
for i in range(N):
if n[i] % 2 == 1 and (i-1)%2 == 1:
ans += 1
print(ans)
| [["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["-", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 63 |
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int ans;
ans = 0;
for (int i = 0; i < N; i++) {
int p;
cin >> p;
if (i % 2 == 1 && p % 2 == 1) {
ans++;
}
}
cout << ans << endl;
} | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int ans;
ans = 0;
for (int i = 1; i <= N; i++) {
int p;
cin >> p;
if (i % 2 == 1 && p % 2 == 1) {
ans++;
}
}
cout << ans << endl;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 74 |
def solve():
N = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(n):
if i%2==0 and a[i]%2==1:
cnt+=1
print(cnt)
if __name__=='__main__':
solve() | def solve():
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(n):
if i%2==0 and a[i]%2==1:
cnt+=1
print(cnt)
if __name__=='__main__':
solve() | [["-", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22]] | 5 | 74 |
#include <stdio.h>
int main(void) {
int n, count = 0;
scanf("%d", &n);
int a[n];
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
(i + 1 % 2 == 1) && (a[i] % 2 == 1) ? count++ : count;
}
printf("%d\n", count);
return 0;
} | #include <stdio.h>
int main(void) {
int n, count = 0;
scanf("%d", &n);
int a[n];
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
(i + 1) % 2 == 1 && (a[i] % 2 == 1) ? count++ : count;
}
printf("%d\n", count);
return 0;
} | [["+", 15, 16, 31, 16, 31, 16, 31, 23, 0, 25], ["-", 0, 1, 0, 41, 15, 16, 31, 23, 0, 25]] | 0 | 100 |
n=int(input())
l=[0]
c=0
l.append(map(int,input().split()))
try:
for i in range(1,n+1,2):
if l[i]&1:
c+=1
except:
pass
print(c)
| n=int(input())
l=[0]
c=0
l=l+(list(map(int,input().split())))
try:
for i in range(1,n+1,2):
if l[i]&1:
c+=1
except:
pass
print(c) | [["-", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 662, 12, 657, 12, 23, 0, 652, 63, 22], ["+", 12, 657, 12, 23, 0, 652, 3, 4, 0, 24... | 5 | 67 |
N = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(N):
if i%2+a[i]%2 == 2:
count += 1
print(count)
| N = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(N):
if (i+1)%2+a[i]%2 == 2:
count += 1
print(count)
| [["+", 15, 666, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 666, 0, 657, 31, 657, 31, 23, 0, 25]] | 5 | 57 |
n = int(input())
a = map(int, input().split())
ans = 0
i = 0
for x in a:
if i % 2 == x % 2 == 1: ans += 1
i += 1
print(ans) | n = int(input())
a = map(int, input().split())
ans = 0
i = 1
for x in a:
if i % 2 == x % 2 == 1: ans += 1
i += 1
print(ans) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 54 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, count;
vector<int> V;
cin >> N;
while (N--) {
cin >> count;
V.push_back(count);
}
count = 0;
for (int i = 1; i < V.size(); i += 2) {
if (V[i] & 1)
count++;
}
cout << count;
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
long N, count;
vector<long> V;
cin >> N;
while (N--) {
cin >> count;
V.push_back(count);
}
count = 0;
for (long i = 0; i < V.size(); i += 2) {
if (V[i] & 1)
count++;
}
cout << count;
return 0;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 344, 3, 347, 0, 77, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7... | 1 | 91 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a[i];
}
int count = 0;
for (int i = 1; i < N; i += 2) {
if (a[i] % 2 == 1) {
count++;
}
}
cout << count << endl;
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a[i];
}
int count = 0;
for (int i = 0; i < N; i += 2) {
if (a[i] % 2 == 1) {
count++;
}
}
cout << count << endl;
return 0;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 100 |
#include <stdio.h>
int main() {
int n;
int a[101];
int cnt = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", &a[i]);
if (i % 2 == 1) {
if (a[i] % 2 == 1) {
cnt++;
}
}
printf("%d", cnt);
}
} | #include <stdio.h>
int main() {
int n;
int a[101];
int cnt = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", &a[i]);
if (i % 2 == 1) {
if (a[i] % 2 == 1) {
cnt++;
}
}
}
printf("%d", cnt);
} | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 0 | 96 |
#include <stdio.h>
int main() {
int n;
int a[102];
int cnt = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", a[i]);
if (i % 2 == 1 && a[i] % 2 == 1) {
cnt++;
}
}
printf("%d", cnt);
}
| #include <stdio.h>
int main() {
int n;
int a[102];
int cnt = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", &a[i]);
if (i % 2 == 1 && a[i] % 2 == 1) {
cnt++;
}
}
printf("%d", cnt);
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 91 |
var GET = (function() {
function f(s) { return new g(s); }
function g(s) { this._s = s.trim().split("\n"); }
g.prototype.getValue = function(n) { return this._s[n]; };
g.prototype.getArray = function(n) { return this.stoa(this._s[n]); };
g.prototype.slice = function(s, limit) {
return this._s.slice(s, +li... | var GET = (function() {
function f(s) { return new g(s); }
function g(s) { this._s = s.trim().split("\n"); }
g.prototype.getValue = function(n) { return this._s[n]; };
g.prototype.getArray = function(n) { return this.stoa(this._s[n]); };
g.prototype.slice = function(s, limit) {
return this._s.slice(s, +li... | [["-", 8, 556, 0, 7, 10, 198, 0, 200, 51, 555], ["+", 8, 556, 0, 7, 10, 198, 0, 200, 51, 555]] | 2 | 354 |
#! python3
# coding:utf-8
n = int(input())
numlist = list(map(int,input().split()))
cnt=0
for i in range(len(numlist)):
if (i%2==1) and (numlist[i]%2==1):
cnt+=1
print(cnt)
| #! python3
# coding:utf-8
n = int(input())
numlist = list(map(int,input().split()))
cnt=0
for i in range(len(numlist)):
if ((i+1)%2==1) and (numlist[i]%2==1):
cnt+=1
print(cnt)
| [["+", 31, 23, 0, 666, 0, 657, 31, 23, 0, 24], ["+", 0, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 31, 23, 0, 666, 0, 657, 31, 23, 0, 25]] | 5 | 68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.