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;
int main() {
long long int n;
cin >> n;
long long int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (i % 2 != 0 && a[i] % 2 != 0) {
count = count + 1;
}
}
cout << count << endl;
re... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (i % 2 == 0 && a[i] % 2 != 0) {
count = count + 1;
}
}
cout << count << endl;
re... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60]] | 1 | 107 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n + 1];
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i + 1] = 0;
}
int ans = 0;
for (int i = 1; i <= n; i++) {
if (a[i] % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n + 1];
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i + 1] = 0;
}
int ans = 0;
for (int i = 1; i <= n; i += 2) {
if (a[i] % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 12, 13]] | 1 | 103 |
#include <bits/stdc++.h>
#define LL long long
#define PB push_back
using namespace std;
int main() {
int n, 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 % 2) && (a[i] % 2))
c++;
}
cout << c << endl;
} | #include <bits/stdc++.h>
#define LL long long
#define PB push_back
using namespace std;
int main() {
int n, c = 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) && (a[i] % 2))
c++;
}
cout << c << 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 | 100 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int N = Integer.parseInt(sc.next());
long[] Square = new long[N];
for (int i = 0; i < N; i++) {
Square[i] = Integer.parseInt(sc.next());
}
long... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int N = Integer.parseInt(sc.next());
long[] Square = new long[N];
for (int i = 0; i < N; i++) {
Square[i] = Integer.parseInt(sc.next());
}
long... | [["+", 8, 196, 0, 57, 15, 15, 0, 91, 17, 111], ["+", 0, 57, 15, 15, 0, 91, 439, 23, 0, 24], ["+", 0, 7, 8, 196, 0, 57, 15, 15, 0, 25], ["+", 64, 196, 0, 57, 15, 15, 0, 23, 0, 24], ["+", 64, 196, 0, 57, 15, 15, 0, 23, 0, 25]] | 3 | 154 |
package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
ans := 0
for i := 0; i < n; i++ {
var x int
fmt.Scan(&x)
if i%2 == 1 && x%2 == 1 {
ans++
}
}
fmt.Print(ans)
}
| package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
ans := 0
for i := 1; i <= n; i++ {
var x int
fmt.Scan(&x)
if i%2 == 1 && x%2 == 1 {
ans++
}
}
fmt.Print(ans)
}
| [["-", 0, 7, 0, 430, 10, 431, 12, 432, 0, 433], ["+", 0, 7, 0, 430, 10, 431, 12, 432, 0, 433], ["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]] | 7 | 82 |
print(sum([int(i)%2 for i in input().split()[::2]]))
| input()
print(sum([int(i)%2 for i in input().split()[::2]]))
| [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 29 |
num1 = int(input())
num = (int(x) for x in input().split())
count = 0
for i, name in enumerate(num):
if i % 2 == 1:
if name % 2 == 1:
count = count + 1
print(count) | num1 = int(input())
num = (int(x) for x in input().split())
count = 0
for i, name in enumerate(num):
if i % 2 == 0:
if name % 2 == 1:
count = count + 1
print(count) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 62 |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
int cnt = 0;
for (int i = 1; i <= n; ++i) {
int v;
cin >> v;
if (i & 1 && v & 1)
cnt++;
}
cout << cnt << endl;
return 0;
}
| #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int cnt = 0;
for (int i = 1; i <= n; ++i) {
int v;
cin >> v;
if (i & 1 && v & 1)
cnt++;
}
cout << cnt << endl;
return 0;
}
| [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 69 |
def main():
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i, a in enumerate(A):
if i % 2 == a % 2 == 1:
ans += 1
print(ans)
if __name__ == "__main__":
main()
| def main():
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i, a in enumerate(A):
if i % 2 == 0 and a % 2 == 1:
ans += 1
print(ans)
if __name__ == "__main__":
main()
| [["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355]] | 5 | 71 |
//コンパイラ最適化用
#pragma GCC optimize("Ofast")
//インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <chrono> //実行時間計測
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#in... | //コンパイラ最適化用
#pragma GCC optimize("Ofast")
//インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <chrono> //実行時間計測
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#in... | [["-", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13]] | 1 | 213 |
import java.io.*;
import java.util.*;
public class Main {
static int len;
// sum of divisor
public static void main(String[] args) throws IOException {
sc = new MScanner(System.in);
pw = new PrintWriter(System.out);
int n = sc.nextInt();
int[] arr = sc.intArr(n);
int cnt = 0;
for (int i ... | import java.io.*;
import java.util.*;
public class Main {
static int len;
// sum of divisor
public static void main(String[] args) throws IOException {
sc = new MScanner(System.in);
pw = new PrintWriter(System.out);
int n = sc.nextInt();
int[] arr = sc.intArr(n);
int cnt = 0;
for (int i ... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]] | 3 | 886 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int count = 0;
vector<int> r(n);
for (int i = 0; i < n; i++) {
cin >> r.at(i);
if (r.at(i) % 2 == 1 && i % 2 == 1) {
count++;
}
}
cout << count << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int count = 0;
vector<int> r(n);
for (int i = 0; i < n; i++) {
cin >> r.at(i);
if (r.at(i) % 2 == 1 && (i + 1) % 2 == 1) {
count++;
}
}
cout << count << endl;
} | [["+", 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 | 88 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
int ans = 0;
for (int i = 0; i < n; i++) {
int t;
cin >> t;
if (i % 2 == 1 && t % 2 == 1)
ans++;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
int ans = 0;
for (int i = 1; i <= n; i++) {
int t;
cin >> t;
if (i % 2 == 1 && t % 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 | 75 |
#include <bits/stdc++.h>
#define fastio \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define unmap unordered_map<int, int>... | #include <bits/stdc++.h>
#define fastio \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define unmap unordered_map<int, int>... | [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 12, 13]] | 1 | 130 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long long unsigned int ull;
typedef long double ld;
typedef vector<int> vr;
typedef pair<int, int> pr;
#define pb push_back
#define ff first
#define ss second
#define INF 1999999999
#define MODA 1000000007
#define PI 3.14159265358979323846... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long long unsigned int ull;
typedef long double ld;
typedef vector<int> vr;
typedef pair<int, int> pr;
#define pb push_back
#define ff first
#define ss second
#define INF 1999999999
#define MODA 1000000007
#define PI 3.14159265358979323846... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60]] | 1 | 182 |
#include <bits/stdc++.h>
#define ll uint64_t
#define vi vector<int>
#define vl vector<ll>
#define dl pair<ll, ll>
#define ii pair<ll, ll>
#define vii vector<ii>
#define graph vector<set<int>>
#define inf 1000000000
using namespace std;
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int n... | #include <bits/stdc++.h>
#define ll uint64_t
#define vi vector<int>
#define vl vector<ll>
#define dl pair<ll, ll>
#define ii pair<ll, ll>
#define vii vector<ii>
#define graph vector<set<int>>
#define inf 1000000000
using namespace std;
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int n... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 113 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N);
int ans = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
if (!(i * A.at(i) % 2)) {
ans++;
}
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N);
int ans = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
if ((i + 1) * A.at(i) % 2) {
ans++;
}
}
cout << ans << endl;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25], ["-", 0, 57, 15, 339, 51, 91, 28, 23, 0, 25]] | 1 | 85 |
mass=int(input())
number=list(map(int,input().split()))
cnt = 0
for i in mass:
if (i+1)%2!=0 and number[i]%2!=0:
cnt+=1
print(cnt)
| mass=int(input())
number=list(map(int,input().split()))
cnt = 0
for i in range(mass):
if (i+1)%2!=0 and number[i]%2!=0:
cnt+=1
print(cnt) | [["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 25]] | 5 | 60 |
#include <bits/stdc++.h>
#define test cout << "test ok" << endl;
#define sp << " " <<
using namespace std;
using ll = long long;
ll mod = ll(1e9) + 7;
ll inf = ll(1e18);
void yn(bool b) { cout << (b ? "Yes" : "No") << endl; }
void YN(bool b) { cout << (b ? "YES" : "NO") << endl; }
template <typename T> inline bool chma... | #include <bits/stdc++.h>
#define test cout << "test ok" << endl;
#define sp << " " <<
using namespace std;
using ll = long long;
ll mod = ll(1e9) + 7;
ll inf = ll(1e18);
void yn(bool b) { cout << (b ? "Yes" : "No") << endl; }
void YN(bool b) { cout << (b ? "YES" : "NO") << endl; }
template <typename T> inline bool chma... | [["+", 15, 339, 51, 16, 12, 16, 31, 23, 0, 24], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 23, 0, 25]] | 1 | 298 |
N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(N):
if i*a[i] % 2 == 1:
ans += 1
print(ans) | N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(1,N+1):
if i*a[i-1] % 2 == 1:
ans += 1
print(ans) | [["+", 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], ["+", 0, 657, 31, 657, 12, 206, 206, 657, 17, 33], ["+", 0, 657, 31, 657, 12, 206, 206, 657, 12, 612]] | 5 | 55 |
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define DD long double
#define M 1000000007
#define INF 1e18
void setIO(string s = "") {
cin.sync_with_stdio(0);
cin.tie(0);
if (s.size())
s += ".in", freopen(s.c_str(), "r", stdin);
}
int tt = 1;
void solve() {
int n, a, c = 0;
for (i... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define DD long double
#define M 1000000007
#define INF 1e18
void setIO(string s = "") {
cin.sync_with_stdio(0);
cin.tie(0);
if (s.size())
s += ".in", freopen(s.c_str(), "r", stdin);
}
int tt = 1;
void solve() {
int n, a, c = 0;
cin >>... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]] | 1 | 159 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int i;
int N;
cin >> N;
vector<int> a(N);
for (i = 0; i < N; i++) {
cin >> a[i];
}
int count = 0;
for (i = 0; i < N / 2; i++) {
int ii = 2 * i + 1;
if (a[ii] % 2 == 1)
count++;
}
cout << count << endl;
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int i;
int N;
cin >> N;
vector<int> a(N);
for (i = 0; i < N; i++) {
cin >> a[i];
}
int count = 0;
for (i = 0; i <= N / 2; i++) {
int ii = 2 * i;
if (a[ii] % 2 == 1)
count++;
}
cout << count << endl;
ret... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 109 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
int cnt = 0;
cin >> n;
vector<int> a;
for (int i = 0; i < n; i++) {
int awork;
cin >> awork;
a.push_back(awork);
}
for (int i = 0; i < n; i++) {
if (a.at(i) % 2 != 0 && i % 2 != 0) {
cnt++;
}
}
cout << cnt... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
int cnt = 0;
cin >> n;
vector<int> a;
for (int i = 0; i < n; i++) {
int awork;
cin >> awork;
a.push_back(awork);
}
for (int i = 0; i < n; i++) {
if (a.at(i) % 2 != 0 && (i + 1) % 2 != 0) {
cnt++;
}
}
cout ... | [["+", 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 | 105 |
input()
li = list(map(int, input().split()))
result = 0
for i in range(len(li)):
if i + 1 % 2 == 1:
if li[i] % 2 == 1:
result += 1
print(result)
| input()
li = list(map(int, input().split()))
result = 0
for i in range(len(li)):
if (i + 1) % 2 == 1:
if li[i] % 2 == 1:
result += 1
print(result)
| [["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25]] | 5 | 60 |
#include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int a[N];
for (int i = 0; i < N; i++) {
scanf("%d", a[i]);
}
int sum = 0;
for (int i = 0; i < N; i++) {
if (i % 2 == 0 && a[i] % 2 == 1) {
sum++;
}
}
printf("%d\n", sum);
return 0;
} | #include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int a[N];
for (int i = 0; i < N; i++) {
scanf("%d", &a[i]);
}
int sum = 0;
for (int i = 0; i < N; i++) {
if (i % 2 == 0 && a[i] % 2 == 1) {
sum++;
}
}
printf("%d\n", sum);
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 112 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll arr[n], s = 0;
for (int i = 0; i < n; i++)
cin >> arr[i];
for (int i = 1; i < n; i += 2)
s += (arr[i] & 1);
cout << s << "\n";
} | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll arr[n], s = 0;
for (int i = 0; i < n; i++)
cin >> arr[i];
for (int i = 0; i < n; i += 2)
s += (arr[i] & 1);
cout << s << "\n";
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 87 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
int c = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
if (a[i] % 2 == 1 && i % 2 == 1) {
c++;
}
}
cout << c << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
int c = 0;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
for (int i = 1; i <= n; i++) {
if (a[i] % 2 == 1 && i % 2 == 1) {
c++;
}
}
cout << c << 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 | 97 |
#include <algorithm>
#include <bitset>
#include <climits>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
const ll MOD = 1e9 + 5;
ll mod_pow(ll k, ll p) {
if (k == 0) {
return 1 % p;
}
if (k == 1) {
return 2 % p;
}
if (k % 2 == 0... | #include <algorithm>
#include <bitset>
#include <climits>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
const ll MOD = 1e9 + 5;
ll mod_pow(ll k, ll p) {
if (k == 0) {
return 1 % p;
}
if (k == 1) {
return 2 % p;
}
if (k % 2 == 0... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 294 |
package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
s := make([]int, n)
for i := 0; i < n; i++ {
fmt.Scan(&s[i])
}
var c int
for i,v := range s {
if (i % 2) == 1 && (v % 2) == 1 {
c++
}
}
fmt.Println(c)
}
| package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
s := make([]int, n)
for i := 0; i < n; i++ {
fmt.Scan(&s[i])
}
var c int
for i,v := range s {
if ((i+1) % 2) == 1 && (v % 2) == 1 {
c++
}
}
fmt.Println(c)
}
| [["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 433], ["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 25]] | 7 | 106 |
#include <iostream>
using namespace std;
int main() {
int n, x, i = 0, count = 0;
while (n--) {
i++;
cin >> x;
if ((i & 1) && (x & 1))
count++;
}
cout << count;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, x, i = 0, count = 0;
cin >> n;
while (n--) {
i++;
cin >> x;
if ((i & 1) && (x & 1))
count++;
}
cout << count;
return 0;
}
| [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 63 |
n = int(input())
z = input().split()
odd = 0
for i in range(n):
if i % 2 == 1:
if int(z[i]) % 2 == 1:
odd += 1
print(odd) | n = int(input())
z = input().split()
odd = 0
for i in range(n):
if i % 2 == 0:
if int(z[i]) % 2 == 1:
odd += 1
print(odd) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 55 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a, cnt = 0;
for (int i = 0; i < n; i++) {
cin >> a;
if (i % 2 == 1) {
if (a * a % 2 == 1) {
cnt++;
}
}
}
cout << cnt << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a, cnt = 0;
for (int i = 1; i <= n; i++) {
cin >> a;
if (i % 2 == 1) {
if (a * a % 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], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 80 |
n=int(input())
A=list(map(int,input().split()))
cnt=0
for i in range(n):
if A[i]%2!=i%2:
cnt+=1
print(cnt) | n=int(input())
A=list(map(int,input().split()))
cnt=0
for i in range(n):
if A[i]%2-1==i%2==0:
cnt+=1
print(cnt)
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 55 |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
int ans = 0;
for (int i = 0; i < n; i++) {
... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
int ans = 0;
for (int i = 0; i < n; i++) {
... | [["+", 0, 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, 499], ["+", 0, 16, 12, 16, 31, 16, 31, 23, 0, 25]] | 3 | 141 |
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
typedef long long ll;
using namespace std;
const int INF = 1e9;
int main() {
int n;
cin >> n;
int ans = 0;
rep(i, n) {
int a;
cin >> a;
if (i % 2 && a % 2 == 1)
++ans;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
typedef long long ll;
using namespace std;
const int INF = 1e9;
int main() {
int n;
cin >> n;
int ans = 0;
rep(i, n) {
int a;
cin >> a;
if (i % 2 == 0 && a % 2 == 1)
++ans;
}
cout << ans << endl;
return 0;
} | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 82 |
#include <bits/stdc++.h>
#define repz(i, z, n) for (decltype(n) i = (z); i < (n); i++)
#define rep(i, n) for (decltype(n) i = 0; i < (n); i++)
#define REPZ(i, z, n) for (decltype(n) i = (z); i <= (n); i++)
#define REP(i, n) for (decltype(n) i = 0; i <= (n); i++)
#define ALL(v) v.begin(), v.end()
#define len(v) ((ll)(v... | #include <bits/stdc++.h>
#define repz(i, z, n) for (decltype(n) i = (z); i < (n); i++)
#define rep(i, n) for (decltype(n) i = 0; i < (n); i++)
#define REPZ(i, z, n) for (decltype(n) i = (z); i <= (n); i++)
#define REP(i, n) for (decltype(n) i = 0; i <= (n); i++)
#define ALL(v) v.begin(), v.end()
#define len(v) ((ll)(v... | [["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 386 |
import java.util.ArrayList;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 0;
ArrayList<Integer> ar = new ArrayList<>();
sc.forEachRemaining(e -> ar.add(Integer.parseInt(e)));
for (int i = 1; ... | import java.util.ArrayList;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 0;
ArrayList<Integer> ar = new ArrayList<>();
sc.forEachRemaining(e -> ar.add(Integer.parseInt(e)));
for (int i = 0; ... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 57, 15, 15, 0, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 60]] | 3 | 140 |
n = int(input())
squares = list(map(int, input().split(" ")))
odd = 0
for i in range(n, 2):
if squares[i] % 2 == 1:
odd += 1
print(odd) | n = int(input())
squares = list(map(int, input().split(" ")))
odd = 0
for i in range(0, n, 2):
if squares[i] % 2:
odd += 1
print(odd) | [["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, cnt = 0;
cin >> n;
for (ll i = 0; i < n; i++) {
ll a;
cin >> a;
if (i % 2 == 1 && a % 2 == 1)
cnt++;
}
cout << cnt << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, cnt = 0;
cin >> n;
for (ll i = 0; i < n; i++) {
ll a;
cin >> a;
if (i % 2 == 0 && a % 2 == 1)
cnt++;
}
cout << cnt << endl;
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 74 |
// g++ hello.cpp -o hello & hello
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, k, n) for (int i = k; i <= n; ++i)
#define REPR(i, k, n) for (int i = k; i >= n; --i)
#define MP make_pair
typedef long long ll;
typedef vector<int> vi;
typed... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, k, n) for (int i = k; i <= n; ++i)
#define REPR(i, k, n) for (int i = k; i >= n; --i)
#define MP make_pair
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
void test()... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 169 |
#include <bits/stdc++.h>
#define int long long
#define EB emplace_back
#define MOD 1000000007
#define F first
#define S second
#define endl "\n"
using namespace std;
int32_t main() {
int n;
cin >> n;
int ans = 0;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
if (i % 2 == 1 and x % 2 == 1)
... | #include <bits/stdc++.h>
#define int long long
#define EB emplace_back
#define MOD 1000000007
#define F first
#define S second
#define endl "\n"
using namespace std;
int32_t main() {
int n;
cin >> n;
int ans = 0;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
if (i % 2 == 0 and x % 2 == 1)
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 89 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (n); ++i)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
r... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (n); ++i)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
r... | [["+", 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 | 199 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
in... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
in... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 157 |
#include <bits/stdc++.h>
#define ll long long int
#define ul unsigned long long int
#define mp make_pair
#define endl "\n"
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define lb lower_b... | #include <bits/stdc++.h>
#define ll long long int
#define ul unsigned long long int
#define mp make_pair
#define endl "\n"
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define lb lower_b... | [["+", 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 | 206 |
n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
puts (0...n).filter { |i|
i % 2 == 1 && a[i] % 2 == 1
}.count | n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
puts (0...n).filter { |i|
i % 2 == 0 && a[i] % 2 == 1
}.count | [["-", 196, 196, 8, 734, 0, 738, 31, 738, 12, 612], ["+", 196, 196, 8, 734, 0, 738, 31, 738, 12, 612]] | 4 | 54 |
<?php
# 整数の入力
fscanf(STDIN, "%d", $n);
# スペース区切りの整数の入力を配列で受け取る
$input = explode(' ',trim(fgets(STDIN)));
function result($n, $input) {
$count = 0;
foreach ($input as $key => $num) {
if ($key % 2 != 0) {
if ($num % 2 != 0) {
$count ++;
}
}
}
retur... | <?php
# 整数の入力
fscanf(STDIN, "%d", $n);
# スペース区切りの整数の入力を配列で受け取る
$input = explode(' ',trim(fgets(STDIN)));
function result($n, $input) {
$count = 0;
foreach ($input as $key => $num) {
if (($key + 1) % 2 != 0) {
if ($num % 2 != 0) {
$count ++;
}
}
}
... | [["+", 15, 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, 612], ["+", 15, 23, 0, 16, 31, 16, 31, 23, 0, 25]] | 6 | 104 |
#include <iostream>
using namespace std;
int main() {
int n, p;
p = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
if ((i + 1) % 2 == 0 && a[i] % 2 != 0) {
p = p + 1;
}
}
cout << p;
} | #include <iostream>
using namespace std;
int main() {
int n, p;
p = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
if ((i + 1) % 2 != 0 && a[i] % 2 != 0) {
p = p + 1;
}
}
cout << p;
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79]] | 1 | 87 |
#include <iostream>
using namespace std;
int main() {
int a[100];
int N;
int c = 0;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> a[i];
if (i % 2 == 1 && a[i] % 2 == 1) {
c++;
}
}
cout << c;
} | #include <iostream>
using namespace std;
int main() {
int a[100];
int N;
int c = 0;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> a[i];
if ((i + 1) % 2 == 1 && a[i] % 2 == 1) {
c++;
}
}
cout << c;
} | [["+", 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 | 79 |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int arr[n + 1];
for (int i = 1; i <= n; i++) {
scanf("%d", &arr[i]);
}
int count = 0;
for (int i = 1; i <= n; i++) {
if (arr[i] % 2 != 0 && i % 2 == 0) {
count++;
}
}
printf("%d", count);
return 0;
} | #include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int arr[n + 1];
for (int i = 1; i <= n; i++) {
scanf("%d", &arr[i]);
}
int count = 0;
for (int i = 1; i <= n; i++) {
if (arr[i] % 2 != 0 && i % 2 != 0) {
count++;
}
}
printf("%d", count);
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]] | 1 | 113 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <typename A, typename B> bool chmin(A &a, const B &b) {
return b < a ... |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <typename A, typename B> bool chmin(A &a, const B &b) {
return b < a ... | [["+", 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 | 184 |
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))
counter = 0
for i in range(N):
if i % 2 == 1 and A[i] % 2 == 1:
counter += 1
print(counter)
| # -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))
counter = 0
for i in range(N):
if (i + 1) % 2 == 1 and A[i] % 2 == 1:
counter += 1
print(counter)
| [["+", 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 | 60 |
N = int(input())
A = map(int, input().split())
print(sum((i + 1 * a) % 2 for i, a in enumerate(A))) | # N = int(input())
# A = map(int, input().split())
# cnt = 0
# for i, a in enumerate(A):
# if ((i + 1) * a) % 2:
# cnt += 1
# print(cnt)
N = int(input())
A = map(int, input().split())
print(sum(((i + 1) * a) % 2 for i, a in enumerate(A)))
| [["+", 8, 657, 31, 23, 0, 657, 31, 23, 0, 24], ["+", 8, 657, 31, 23, 0, 657, 31, 23, 0, 25]] | 5 | 46 |
n = input()
a = list(map(int,input().split()))
ans = 0
for i in a[1::2]:
if i % 2 == 1:
ans += 1
print(ans) | n = input()
a = list(map(int,input().split()))
ans = 0
for i in a[::2]:
if i % 2 == 1:
ans += 1
print(ans) | [["-", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612]] | 5 | 50 |
#!/usr/bin/env python3
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collection... | #!/usr/bin/env python3
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collection... | [["+", 8, 196, 0, 57, 15, 657, 31, 23, 0, 24], ["+", 0, 57, 15, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 57, 15, 657, 31, 23, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 657, 31, 23, 0, 25]] | 5 | 152 |
N = int(input())
a = list(map(int, input().split()))
ans = sum(1 for i, j in enumerate(a) if i % 2 == 1 and j % 2 == 1)
print(ans)
| N = int(input())
a = list(map(int, input().split()))
ans = sum(1 for i, j in enumerate(a) if (i + 1) % 2 == 1 and j % 2 == 1)
print(ans)
| [["+", 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 | 56 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef long long ll;
int max(int a, int b) {
if (a > b)
return a;
else
return b;
}
int min(int a, int b) {
if (a < b)
return a;
else
return b;
}
int sort(const void *a, const void *b) { return *(int *)a - *(int *)b;... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef long long ll;
int max(int a, int b) {
if (a > b)
return a;
else
return b;
}
int min(int a, int b) {
if (a < b)
return a;
else
return b;
}
int sort(const void *a, const void *b) { return *(int *)a - *(int *)b;... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 0 | 193 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] a = new int[n];
int out = 0;
for (int i = 0; i < n; i++) {
a[i] = scan.nextInt();
if (i % 2 == 1 && a[i] % 2 == 1)
out++;
}... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] a = new int[n];
int out = 0;
for (int i = 0; i < n; i++) {
a[i] = scan.nextInt();
if (i % 2 == 0 && a[i] % 2 == 1)
out++;
}... | [["-", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499]] | 3 | 122 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int N = 2e5 + 10, mod = 1e9 + 7;
void solve() {
int n;
cin >> n;
int ans = 0;
for (int i = 1; i <= n; ++i) {
int a;
cin >> a;
if (a & 1 && i && 1) {
++ans;
}
}
cout << ans << endl;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int N = 2e5 + 10, mod = 1e9 + 7;
void solve() {
int n;
cin >> n;
int ans = 0;
for (int i = 1; i <= n; ++i) {
int a;
cin >> a;
if (a & 1 && i & 1) {
++ans;
}
}
cout << ans << endl;
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 67]] | 1 | 140 |
N=int(input())
ai=list(map(int,input().split()))
ans=0
for i in range(N):
if i%2==1:
pass
if ai[i] %2==1:
ans+=1
print(ans) | N=int(input())
ai=list(map(int,input().split()))
ans=0
for i in range(N):
if i%2==1:
continue
if ai[i] %2==1:
ans+=1
print(ans)
| [["-", 8, 196, 0, 57, 64, 196, 0, 674, 0, 675], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]] | 5 | 61 |
//-----------------------
// author : xyqkoala
// time : 2020-07-12
//-----------------------
#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typede... | //-----------------------
// author : xyqkoala
// time : 2020-07-12
//-----------------------
#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typede... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 167 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i; i < (int)(n); i++)
#define Rep(i, n) for (int i; i <= (int)(n); i++)
#define all(v) v.begin, v.end
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MX = 1000005;
int main() {
int n, a, cnt = 0;
cin >> n;
for (int i = 0; i < n; ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i; i < (int)(n); i++)
#define Rep(i, n) for (int i; i <= (int)(n); i++)
#define all(v) v.begin, v.end
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MX = 1000005;
int main() {
int n, a, cnt = 0;
cin >> n;
for (int i = 0; i < n; ... | [["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 17, 60], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25]] | 1 | 112 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n - 1];
int ans = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 1; i < n - 1; i += 2) {
if (a[i] % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
int ans = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i += 2) {
if (a[i] % 2 == 1)
ans++;
}
cout << ans << endl;
return 0;
} | [["-", 8, 9, 0, 43, 49, 80, 81, 16, 17, 33], ["-", 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], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 97 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
N := getStdinInt()
a := getStdinIntArr()
cnt := 0
for i := 0; i < N; i++ {
if a[i]%2 == 1 && i%2 == 1 {
cnt++
}
}
fmt.Printf("%d\n", cnt)
}
var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)
func getStdin() string {
re... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
N := getStdinInt()
a := getStdinIntArr()
cnt := 0
for i := 0; i < N; i++ {
if a[i]%2 == 1 && (i+1)%2 == 1 {
cnt++
}
}
fmt.Printf("%d\n", cnt)
}
var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)
func getStdin() string {... | [["+", 15, 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, 433], ["+", 15, 16, 12, 16, 31, 16, 31, 23, 0, 25]] | 7 | 521 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, cnt;
cin >> n;
cnt = 0;
for (int i = 1; i <= n; i++) {
int a;
cin >> a;
if (n % 2 == 1 and a % 2 == 1) {
cnt++;
}
}
cout << cnt << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, cnt;
cin >> n;
cnt = 0;
for (int i = 1; i <= n; i++) {
int a;
cin >> a;
if (i % 2 == 1 and a % 2 == 1) {
cnt++;
}
}
cout << cnt << endl;
} | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22]] | 1 | 73 |
n = gets.to_i
a = gets.split.map(&:to_i)
count = 0
a.each.with_index(1) do |i, k|
count+=1 if k.odd? && i.odd?
puts k
end
puts count | n = gets.to_i
a = gets.split.map(&:to_i)
count = 0
a.each.with_index(1) do |i, k|
count+=1 if k.odd? && i.odd?
end
puts count | [["-", 0, 652, 196, 737, 8, 736, 0, 652, 735, 22], ["-", 196, 737, 8, 736, 0, 652, 3, 4, 0, 22]] | 4 | 49 |
n = int(input())
arr = list(map(int, input().split()))
s = 0
for i in range(0, n, 2):
if arr[i]%2:ans+=1
print(ans) | n = int(input())
arr = list(map(int, input().split()))
ans = 0
for i in range(0, n, 2):
if arr[i]%2:ans+=1
print(ans)
| [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 55 |
package main
import(
"fmt"
"bufio"
"os"
"strconv"
)
var sc=bufio.NewScanner(os.Stdin)
func nextInt() int{
sc.Scan()
i, e :=strconv.Atoi(sc.Text())
if e!=nil{
panic(e)
}
return i
}
func main(){
var i int
sc.Split(bufio.ScanWords)
n:=nextInt()
ans:=0
a:=make([]int, n)
for i=0;i<n;i++{
... | package main
import(
"fmt"
"bufio"
"os"
"strconv"
)
var sc=bufio.NewScanner(os.Stdin)
func nextInt() int{
sc.Scan()
i, e :=strconv.Atoi(sc.Text())
if e!=nil{
panic(e)
}
return i
}
func main(){
var i int
sc.Split(bufio.ScanWords)
n:=nextInt()
ans:=0
a:=make([]int, n)
for i=0;i<n;i++{
... | [["-", 8, 196, 0, 57, 15, 16, 31, 16, 12, 433], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 12, 433]] | 7 | 185 |
// cd Desktop/Prog_Contest
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define rep(i, n) for (i = 0; i < (n); i++)
#define ll long long
#define ull unsigned long long
#define MOD 1000000007
int main() {
int n, a[200] = {}, i, ans = 0;
scanf("%d", &n);
rep(i, n) scanf("%d", &a[i]... | // cd Desktop/Prog_Contest
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define rep(i, n) for (i = 0; i < (n); i++)
#define ll long long
#define ull unsigned long long
#define MOD 1000000007
int main() {
int n, a[200] = {}, i, ans = 0;
scanf("%d", &n);
rep(i, n) scanf("%d", &a[i]... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 7, 15, 16, 12, 16, 31, 16, 17, 85], ["-", 0, 7, 15, 16, 12, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 123 |
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int n = in.nextInt(), c = 0;
int arr[] = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = in.nextInt();
if (arr[i] % 2 != 0 && (i + 1) % 2 != 0) {
c++;
}
... | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int n = in.nextInt(), c = 0;
int arr[] = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = in.nextInt();
if (arr[i] % 2 != 0 && (i + 1) % 2 != 0) {
c++;
}
... | [["+", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46]] | 3 | 121 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
int Ans = 0;
for (int i = 1; i < N; i = i + 2) {
if (A.at(i) % 2) {
Ans++;
}
}
cout << Ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
int Ans = 0;
for (int i = 0; i < N; i = i + 2) {
if (A.at(i) % 2) {
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]] | 1 | 102 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (ll i = ll(a); i < ll(b); i++)
#define irep(i, a, b) for (ll i = ll(a); i >= ll(b); i--)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
... | #include <bits/stdc++.h>
#define rep(i, a, b) for (ll i = ll(a); i < ll(b); i++)
#define irep(i, a, b) for (ll i = ll(a); i >= ll(b); i--)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 240 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int n, c = 0;
cin >> n;
long long int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
if (i % 2 == 1 && a[i] % 2 == 1)
c++;
... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int n, c = 0;
cin >> n;
long long int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
if (i % 2 == 0 && a[i] % 2 == 1)
c++;
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 110 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int n, c = 0, j = 0;
cin >> n;
long long int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i <= n; i++) {
if (i % 2 == 1 && a[i] % 2 == 1)
... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int n, c = 0, j = 0;
cin >> n;
long long 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 && a[i] % 2 == ... | [["+", 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 | 114 |
N, *a = map(int, open(0).read().split())
print(sum(e for e in a[::2] if e % 2 == 1))
| N, *a = map(int, open(0).read().split())
print(sum(1 for e in a[::2] if e % 2 == 1))
| [["-", 0, 652, 3, 4, 0, 652, 3, 668, 8, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 668, 8, 612]] | 5 | 44 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define all(a) (a).begin(), (a).end()
#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++)
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
c... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define all(a) (a).begin(), (a).end()
#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++)
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
c... | [["-", 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 | 157 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N = 0;
int count = 0;
cin >> N;
vector<int> data(N);
for (int i = 0; i < N; i++) {
cin >> data.at(i);
}
for (int i = 0; i < data.size(); i++) {
if (data.at(2 * i) % 2 == 0)
count++;
}
cout << count << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N = 0;
int count = 0;
cin >> N;
vector<int> data(N);
for (int i = 0; i < N; i++) {
cin >> data.at(i);
}
for (int i = 0; i < data.size(); i += 2) {
if (data.at(i) % 2 != 0)
count++;
}
cout << count << endl;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 12, 13], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 31, 13], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 17, 48], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 107 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define _GLIBCXX_DEBUG
#define INF 1e8
typedef long long int ll;
const double PI = acos(-1);
using Graph = vector<vector<int>>;
int main() {
int n;
cin >> n;
vector<int> a(n);
rep(i, n) cin >> a[i];
int ans = 0... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define _GLIBCXX_DEBUG
#define INF 1e8
typedef long long int ll;
const double PI = acos(-1);
using Graph = vector<vector<int>>;
int main() {
int n;
cin >> n;
vector<int> a(n);
rep(i, n) cin >> a[i];
int ans = 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 | 120 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, a;
cin >> N;
int ans = 0;
for (int i = 0; i < N; i++) {
cin >> a;
if (i % 2 == 1) {
break;
}
if (a % 2 == 1) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, a;
cin >> N;
int ans = 0;
for (int i = 1; i <= N; i++) {
cin >> a;
if (i % 2 == 1) {
if (a % 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], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 57, 64, 9, 0, 57, ... | 1 | 77 |
N,*a = map(int,open(0).read().split())
cnt = 0
for i in a[1::2]:
if i % 2 != 0:
cnt += 1
print(cnt) | N,*a = map(int,open(0).read().split())
cnt = 0
for i in a[::2]:
if i % 2 != 0:
cnt += 1
print(cnt) | [["-", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612]] | 5 | 50 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define ll long long
#define P pair<int, int>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pb push_back
#define eb emplace_back
template <class T> void... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define ll long long
#define P pair<int, int>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pb push_back
#define eb emplace_back
template <class T> void... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 620 |
N = int(input())
*A, = map(int, input().split())
ans = 0
for i, a in enumerate(A):
if i & 1 and a & 1:
ans += 1
print(ans)
| N = int(input())
*A, = map(int, input().split())
ans = 0
for i, a in enumerate(A):
if (i + 1) & 1 and a & 1:
ans += 1
print(ans)
| [["+", 0, 57, 15, 679, 31, 657, 31, 23, 0, 24], ["+", 15, 679, 31, 657, 31, 23, 0, 657, 17, 72], ["+", 15, 679, 31, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 57, 15, 679, 31, 657, 31, 23, 0, 25]] | 5 | 53 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> masu;
for (int i = 0; i < n; ++i) {
int ai;
cin >> ai;
masu.push_back(ai);
}
int s = 0;
for (int i = 0; i < masu.size(); ++i) {
if (i % 2 == 1 && masu[i] % 2 == 1)
s++;
}
cout <<... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> masu;
for (int i = 0; i < n; ++i) {
int ai;
cin >> ai;
masu.push_back(ai);
}
int s = 0;
for (int i = 0; i < masu.size(); ++i) {
if ((i + 1) % 2 == 1 && masu[i] % 2 == 1)
s++;
}
c... | [["+", 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 | 109 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, i, p, c = 0;
cin >> n;
for (i = 0; i <= n; i++) {
cin >> p;
if (i % 2 == 1)
if (p % 2 == 1)
c++;
}
cout << c << '\n';
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, i, p, c = 0;
cin >> n;
for (i = 1; i <= n; i++) {
cin >> p;
if (i % 2 == 1)
if (p % 2 == 1)
c++;
}
cout << c << '\n';
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 77 |
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl... | [["-", 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], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 373 |
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int ans = 0;
int a;
for (int i = 0; i < n; i++) {
cin >> a;
if (i % 2 == 1) {
if (a % 2 == 1) {
ans++;
}
}
}
cout << ans << endl;
return 0;
}
| #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int ans = 0;
int a;
for (int i = 1; i < n + 1; i++) {
cin >> a;
if (i % 2 == 1) {
if (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 | 81 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define in insert
#define PI 3.1415926535897932384626433832795
#define MOD 100000007
#define F first
#define S second
#define aLL(str) (str).begin(), (str).end()
#define IOS \
ios::syn... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define in insert
#define PI 3.1415926535897932384626433832795
#define MOD 100000007
#define F first
#define S second
#define aLL(str) (str).begin(), (str).end()
#define IOS \
ios::syn... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]] | 1 | 207 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
vector<ll> a(N);
REP(... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
vector<ll> a(N);
REP(... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 121 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
#define all(a) (a).begin(), (a).end()
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
#define sim template <cla... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
#define all(a) (a).begin(), (a).end()
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
#define sim template <cla... | [["+", 0, 2, 3, 4, 0, 16, 31, 91, 17, 111], ["+", 3, 4, 0, 16, 31, 91, 28, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 91, 28, 23, 0, 25]] | 1 | 407 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int l, r, n, res = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
if (i % 2 != 0 && a[i] % 2 != 0) {
res++;
}
}
cout << res << "\n";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r, n, res = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
if (i % 2 == 0 && a[i] % 2 != 0) {
res++;
}
}
cout << res << "\n";
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60]] | 1 | 89 |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 5;
int a[maxn];
int n;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
int ans = 0;
for (int i = 1; i <= n; i++) {
if ((i & 1) && (a[i] & 1))
++ans;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 5;
int a[maxn];
int n;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
int ans = 0;
for (int i = 1; i <= n; i++) {
if ((i & 1) && (a[i - 1] & 1))
++ans;
}
cout << ans << endl;
return 0;
} | [["+", 0, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 104 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, o, n) for (long long i = o; i < n; i++)
#define oneforall \
ios::sync_with_stdio(false); \
cin.tie(0);
#define all(v) (v).begin(), (v).end()
#defi... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, o, n) for (long long i = o; i < n; i++)
#define oneforall \
ios::sync_with_stdio(false); \
cin.tie(0);
#define all(v) (v).begin(), (v).end()
#defi... | [["-", 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 | 295 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, c = 0;
cin >> n;
for (int i = 0; i < n; i++) {
int t;
cin >> t;
if (i + 1 % 2 == 1 and t % 2 == 1) {
c++;
}
}
cout << c << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, c = 0;
cin >> n;
for (int i = 0; i < n; i++) {
int t;
cin >> t;
if ((i + 1) % 2 == 1 && t % 2 == 1) {
c++;
}
}
cout << c << endl;
} | [["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 355], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 79 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
int N;
cin >> N;
int cnt = 0;
rep(i, N) {
int a;
cin >> a;
if ((i & a) & 1)
++cnt;
}
cout << cnt << endl;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
int N;
cin >> N;
int cnt = 0;
rep(i, N) {
int a;
cin >> a;
if (((i + 1) & a) & 1)
++cnt;
}
cout << cnt << endl;
}
| [["+", 51, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 23, 0, 16, 31, 23, 0, 25]] | 1 | 82 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int64;
typedef vector<int> vec;
typedef vector<int64> vec64;
#define db(x) cout << "> " << #x << ": " << x << "\n";
#define ss cout << " ";
#define ct(x) cout << x;
#define nn cout << "\n";
#define cts(x) cout << x << " ";
#define ctn(x) cout << x << "\n";... | #include <bits/stdc++.h>
using namespace std;
typedef long long int64;
typedef vector<int> vec;
typedef vector<int64> vec64;
#define db(x) cout << "> " << #x << ": " << x << "\n";
#define ss cout << " ";
#define ct(x) cout << x;
#define nn cout << "\n";
#define cts(x) cout << x << " ";
#define ctn(x) cout << x << "\n";... | [["+", 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 | 272 |
N = int(input())
masu = [int(i) for i in input().split(' ')]
count = 0
for i in range(len(masu)):
if (i+1)%2 == 0 and masu[i]%2 == 1:
count += 1
print(count) | N = int(input())
masu = [int(i) for i in input().split(' ')]
count = 0
for i in range(len(masu)):
if (i+1)%2 == 1 and masu[i]%2 == 1:
count += 1
print(count) | [["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]] | 5 | 70 |
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.*;
import java.math.BigInteger;
import java.text.*;
import java.util.*;
public class Main {
// Life's a bitch
public static boolean[] sieve(long n) {
boolean[] prime = new boolean[(i... | import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.*;
import java.math.BigInteger;
import java.text.*;
import java.util.*;
public class Main {
// Life's a bitch
public static boolean[] sieve(long n) {
boolean[] prime = new boolean[(i... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 1,022 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <forward_list>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ll long long
#define v... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <forward_list>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ll long long
#define v... | [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 12, 13]] | 1 | 448 |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
int n = in.nextInt();
int cnt = 0;
for (int i = 0; i < n; i++) {
int temp = in.nextInt();
if (i... |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
int n = in.nextInt();
int cnt = 0;
for (int i = 1; i <= n; i++) {
int temp = in.nextInt();
if (... | [["-", 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 | 778 |
N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(N):
if i%2 != 0:
if a[i]%2 != 0:
ans += 1
print(ans)
| N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(N):
if (i+1)%2 != 0:
if a[i]%2 != 0:
ans += 1
print(ans)
| [["+", 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 | 60 |
n=int(input())
a=list(map(int,input().split()))
c=0
for i in range(1,len(a)+1,2):
if a[i]%2==1:
c+=1
print(c) | n=int(input())
a=list(map(int,input().split()))
c=0
for i in range(0,len(a),2):
if a[i]%2==1:
c+=1
print(c)
| [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 62 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.