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; #define FOR(i, begin, end) for (ll i = (begin); i < (end); i++) #define REP(i, n) FOR(i, 0, n) #define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--) #define IREP(i, n) IFOR(i, n, 0) #define SORT(a) sort(a.begin(), a.end()) #define ISORT(a) sort(a.begin(), a.en...
#include <bits/stdc++.h> using namespace std; #define FOR(i, begin, end) for (ll i = (begin); i < (end); i++) #define REP(i, n) FOR(i, 0, n) #define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--) #define IREP(i, n) IFOR(i, n, 0) #define SORT(a) sort(a.begin(), a.end()) #define ISORT(a) sort(a.begin(), a.en...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
346
n=int(input()) l=list(map(int,input().split())) l=l[1::2] a=0 for i in l: if(i%2==1): a+=1 print(a)
n=int(input()) l=list(map(int,input().split())) l=l[0::2] a=0 for i in l: if(i%2==1): a+=1 print(a)
[["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612], ["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612]]
5
58
#include <iostream> using namespace std; int main() { int n, cnt = 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) { if ((a[i] % 2) == 1) { cnt++; } } } cout << cnt << endl; return 0; }
#include <iostream> using namespace std; int main() { int n, cnt = 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) == 0) { if ((a[i] % 2) == 1) { cnt++; } } } cout << cnt << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
107
#define _USE_MATH_DEFINES #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <string> #include <unordered_map> #include <vector> #pragma GCC optimize("O3") using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0, l##_len = (n); i < l##_len; ++i) #define repd(i, n) f...
#define _USE_MATH_DEFINES #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <string> #include <unordered_map> #include <vector> #pragma GCC optimize("O3") using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0, l##_len = (n); i < l##_len; ++i) #define repd(i, n) f...
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 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
147
a = list(map(int,input().split())) s = 0 for i in range(len(a))[::2]: if(a[i]%2==1): s = s + 1 print(s)
N=input() a = list(map(int,input().split())) s = 0 for i in range(len(a))[::2]: if(a[i]%2==1): s = s + 1 print(s)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
57
#include <algorithm> #include <cmath> #include <iostream> #include <list> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; using str = string; using vl = vector<ll>; using vs = vector<str>; using listl = list<ll>; #define min(A, B) min(static_cast<ll>(A), static_cast<...
#include <algorithm> #include <cmath> #include <iostream> #include <list> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; using str = string; using vl = vector<ll>; using vs = vector<str>; using listl = list<ll>; #define min(A, B) min(static_cast<ll>(A), static_cast<...
[["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45]]
1
956
N = int(input()) A = list(map(int, input().split())) res = 0 for i in range(1, len(A), 2): res += A[i] % 2 print(res)
N = int(input()) A = list(map(int, input().split())) res = 0 for i in range(0, len(A), 2): res += A[i] % 2 print(res)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
55
#include <cmath> #include <deque> #include <iostream> #include <string> #include <utility> using namespace std; int main() { int N = 0; int ans = 0; cin >> N; int a[N] = {}; for (int i = 0; i < N; i++) { cin >> a[i]; if ((a[i] % 2 != 0) && (i % 2 != 0)) ans++; } cout << ans << endl; ...
#include <cmath> #include <deque> #include <iostream> #include <string> #include <utility> using namespace std; int main() { int N = 0; int ans = 0; cin >> N; int a[N] = {}; for (int i = 0; i < N; i++) { cin >> a[i]; if ((a[i] % 2 != 0) && ((i + 1) % 2 != 0)) ans++; } cout << ans << en...
[["+", 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, 13], ["+", 12, 23, 0, 16, 31, 16, 31, 23, 0, 25]]
1
99
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; #define ll long long int int main() { int n, a; int ac = 0; cin >> n; rep(i, n) { cin >> a; if (i % 2 == 1 && a % 2 == 1) { ...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; #define ll long long int int main() { int n, a; int ac = 0; cin >> n; rep(i, n) { cin >> a; if (i % 2 == 0 && a % 2 == 1) { ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
85
#!/usr/bin/env python """エイシング プログラミング コンテスト 2020: B - An Odd Problem https://atcoder.jp/contests/aising2020/tasks/aising2020_b """ def main(): N = int(input()) As = list(map(int, input().split())) ans = 0 for i in range(N): if i % 2 != 0 and As[i] % 2 != 0: ans += 1 print('{}...
#!/usr/bin/env python """エイシング プログラミング コンテスト 2020: B - An Odd Problem https://atcoder.jp/contests/aising2020/tasks/aising2020_b """ def main(): N = int(input()) As = list(map(int, input().split())) ans = 0 for i in range(N): if (i + 1) % 2 != 0 and As[i] % 2 != 0: ans += 1 pri...
[["+", 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
85
#include <bits/stdc++.h> using namespace std; int main() { int N; int a[110]; cin >> 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 <bits/stdc++.h> using namespace std; int main() { int N; int a[110]; cin >> 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
91
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int x = 0; for (int i = 0; i < n; i++) { int a; cin >> a; if (a % 2 == 0 && (i + 1) % 2 == 0) { x++; } } cout << x; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int x = 0; for (int i = 0; i < n; i++) { int a; cin >> a; if (a % 2 != 0 && (i + 1) % 2 != 0) { x++; } } cout << x; return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]]
1
77
def main(): N = int(input()) A = [int(i) for i in input().split()] ans = 0 for v in A[0::2]: if v % 2 == 1: ans += 1 print(v) print(ans) if __name__ == '__main__': main()
def main(): N = int(input()) # L, R, d = map(int, input().split()) A = [int(i) for i in input().split()] ans = 0 for v in A[0::2]: if v % 2 == 1: ans += 1 print(ans) if __name__ == '__main__': main()
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 14, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24]]
5
73
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(t) (t).begin(), (t).end() typedef long long ll; int main() { int Ans = 0; int N; cin >> N; int a[N]; REP(i, N) { cin >> a[i]; if ((i % 2 == 1) & (a[i] % 2 == 1)) Ans++; } cout << A...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(t) (t).begin(), (t).end() typedef long long ll; int main() { int Ans = 0; int N; cin >> N; int a[N]; REP(i, N) { cin >> a[i]; if (((i + 1) % 2 == 1) && (a[i] % 2 == 1)) Ans++; } co...
[["+", 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], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 67], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
99
#include <bits/stdc++.h> using namespace std; int N; vector<int> a; int main() { cin >> N; a.resize(N); int cnt = 0; for (int i = 0; i < N; i++) { cin >> a[i]; if (i % 2 != 0 && a[i] % 2 != 0) { cnt++; } } cout << cnt << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int N; vector<int> a; int main() { cin >> N; a.resize(N); int cnt = 0; for (int i = 0; i < N; i++) { cin >> a[i]; if ((i + 1) % 2 != 0 && a[i] % 2 != 0) { cnt++; } } cout << cnt << 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
91
package main import "fmt" func main() { var n int fmt.Scanf("%d", &n) nums := make([]int, n) for i := 0; i < n; i++ { fmt.Scanf("%d", &nums[i]) } var ans int for i := 0; i < n; i++ { if i%2 != 0 && nums[i] != 0 && nums[i]%2 != 0 { ans++ } } fmt.Println(ans) }
package main import "fmt" func main() { var n int fmt.Scanf("%d", &n) nums := make([]int, n) for i := 0; i < n; i++ { fmt.Scanf("%d", &nums[i]) } var ans int for i := 0; i < n; i++ { if (i+1)%2 != 0 && nums[i] != 0 && nums[i]%2 != 0 { ans++ } } fmt.Println(ans) }
[["+", 31, 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, 433], ["+", 31, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
7
124
import math import itertools import numpy as np t = int(input()) a=list(map(int, input().split())) num = 0 for i in range(t): if i%2 == 0 and g_all[i]%2 == 1: num+=1 print(num)
import math import itertools import numpy as np t = int(input()) a=list(map(int, input().split())) num = 0 for i in range(t): if i%2 == 0 and a[i]%2 == 1: num+=1 print(num)
[["-", 15, 679, 12, 666, 0, 657, 31, 206, 51, 22], ["+", 15, 679, 12, 666, 0, 657, 31, 206, 51, 22]]
5
67
#include <stdio.h> #include <string.h> int main() { int n = 0, a = 0; int array[101]; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &array[i]); if (((array[i] % 2) == 1) && ((i % 2) == 1)) { a++; } } printf("%d", a); return 0; }
#include <stdio.h> #include <string.h> int main() { int n = 0, a = 0; int array[101]; scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d", &array[i]); if (((array[i] % 2) == 1) && ((i % 2) == 1)) { a++; } } printf("%d", a); 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
106
N = gets.to_i p gets.split.map(&:to_i).map.with_index.count{|i,idx| (idx+1)%3==1 && i%2==1}
N = gets.to_i p gets.split.map(&:to_i).map.with_index.count{|i,idx| (idx+1)%2==1 && i%2==1}
[["-", 8, 734, 0, 738, 31, 738, 31, 738, 12, 612], ["+", 8, 734, 0, 738, 31, 738, 31, 738, 12, 612]]
4
43
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int count = 0; int a[n] = {}; for (int i = 1; i <= n; i++) { cin >> a[i]; if (a[i] % 2 == 1 && n % 2 == 1) count++; } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int count = 0; int a[n] = {}; for (int i = 1; i <= n; i++) { cin >> a[i]; if (a[i] % 2 == 1 && i % 2 == 1) count++; } cout << count << endl; }
[["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]]
1
82
import java.util.*; 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 + 1) % 2 == 0) continue; if (a % 2 == 0) continue; ...
import java.util.*; 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 == 0) continue; if (a % 2 == 0) continue; ...
[["-", 15, 15, 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], ["-", 15, 15, 0, 16, 31, 16, 31, 23, 0, 25]]
3
110
import sys #import string #from collections import defaultdict, deque, Counter #import bisect #import heapq #import math #from itertools import accumulate #from itertools import permutations as perm #from itertools import combinations as comb #from itertools import combinations_with_replacement as combr #from fractions...
import sys #import string #from collections import defaultdict, deque, Counter #import bisect #import heapq #import math #from itertools import accumulate #from itertools import permutations as perm #from itertools import combinations as comb #from itertools import combinations_with_replacement as combr #from fractions...
[["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 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], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
143
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> using namespace std; int main() { int N, a; int ans = 0; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d", &a); if (i % 2 == 1 && a % 2 == 1) ans++; } printf("%d", ans); }
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> using namespace std; int main() { int N, a; int ans = 0; scanf("%d", &N); for (int i = 1; i <= N; i++) { scanf("%d", &a); if (i % 2 == 1 && a % 2 == 1) ans++; } printf("%d", ans); }
[["-", 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
86
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using ll = long long; using vec = vector<int>; using vec2 = vector<vector<int>>; ll inf = pow(2, 62); int main() { int n; cin >> n; vec a...
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using ll = long long; using vec = vector<int>; using vec2 = vector<vector<int>>; ll inf = pow(2, 62); int main() { int n; cin >> n; vec a...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
134
N = int(input()) A = [int(x) for x in input().split()] count = 0 for i in range(N): if i % 2 == 1 and A[i] % 2 == 1: count += 1 print(count)
N = int(input()) A = [int(x) for x in input().split()] count = 0 for i in range(N): if i % 2 == 0 and A[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
60
#include "bits/stdc++.h" #include <set> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--)...
#include "bits/stdc++.h" #include <set> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--)...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
215
n = int(input()) a = list(map(int, input().split())) ans = 0 for i in range(len(a)): if i % 2 == 1 and a[i] % 2 == 1: ans += 1 print(ans)
n = int(input()) a = list(map(int, input().split())) ans = 0 for i in range(len(a)): if i % 2 == 0 and a[i] % 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]]
5
62
n= int(input()) arr = list(map(int,input().split())) c=0 for i in range(1,n,2): if (arr[i])%2==1: c+=1 print(c)
n= int(input()) arr = list(map(int,input().split())) c=0 for i in range(0,n,2): if (arr[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]]
5
59
n=input() x=list(map(int,input().split())) ans=0 for i in x[1::2]: if i%2==1: ans+=1 print(ans)
n=input() x=list(map(int,input().split())) ans=0 for i in x[0::2]: if i%2==1: ans+=1 print(ans)
[["-", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612], ["+", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612]]
5
50
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { int a = sc.nextInt(); if (i % 2 == 1 && a % 2 == 1) { count++; } } System.out.println(cou...
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; for (int i = 1; i <= n; i++) { int a = sc.nextInt(); if (i % 2 == 1 && a % 2 == 1) { count++; } } System.out.println(co...
[["-", 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
101
import math N=int(input()) a=list(map(int,input().split())) ans=0 for i in range(N): if (i%2!=0)and(a[i]%2!=0): ans+=1 print(ans)
import math N=int(input()) a=list(map(int,input().split())) ans=0 for i in range(N): if (i%2==0)and(a[i]%2!=0): ans+=1 #print(i,end='=>') #print(a[i]) print(ans)
[["-", 0, 57, 15, 679, 31, 23, 0, 666, 667, 79], ["+", 0, 57, 15, 679, 31, 23, 0, 666, 667, 60]]
5
65
#include "bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define mod 1000000007 #define deb(x) cout << #x << " " << x << "\n"; #define fo(i, n) for (ll i = 0; i < n; i++) #define Fo(i, k, n) for (ll i = k; i < n; i++) #define ordered_set ...
#include "bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define mod 1000000007 #define deb(x) cout << #x << " " << x << "\n"; #define fo(i, n) for (ll i = 0; i < n; i++) #define Fo(i, k, n) for (ll i = k; i < n; i++) #define ordered_set ...
[["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 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]]
1
152
import java.util.Scanner; 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(); } sc.close(); int cnt = 0; for (int i = 0; i < n; i++) { ...
import java.util.Scanner; 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(); } sc.close(); int cnt = 0; for (int i = 0; i < n; i++) { ...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 79], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60]]
3
144
N=int(input()) A=list(map(int,input().split())) ans=0 for a_idx ,a in enumerate(A): if a_idx%2 !=0 and a%2 !=0: ans+=1 print(ans)
N=int(input()) A=list(map(int,input().split())) ans=0 for a_idx ,a in enumerate(A): if (a_idx+1)%2 !=0 and a%2 !=0: # print(a_idx,a) 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
58
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string.h> #include <string> #include <vector> #define ll long long using namespace std; int main() { int n; cin >> n; int cnt = 0; for (int i = 0; i < n; i++) { int a; cin >> a; if (a % 2 && i % 2) ...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <string.h> #include <string> #include <vector> #define ll long long using namespace std; int main() { int n; cin >> n; int cnt = 0; for (int i = 1; i <= n; i++) { int a; cin >> a; if (a % 2 && i % 2) ...
[["-", 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
81
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() using namespace std; using ll = int64_t; using ld = long double; using P = pair<int, int>; using vs = vector<string>; using vi = vector<int>; using vvi =...
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() using namespace std; using ll = int64_t; using ld = long double; using P = pair<int, int>; using vs = vector<string>; using vi = vector<int>; using vvi =...
[["+", 15, 339, 51, 16, 31, 16, 31, 91, 17, 92]]
1
347
def main(): N = int(input()) a_lst = list(map(int, input().split())) count = 0 for i in range(N): if i % 2 == 0: continue if a_lst[i] % 2 != 0: count += 1 print(count) if __name__ == "__main__": main()
def main(): N = int(input()) a_lst = list(map(int, input().split())) count = 0 for i in range(N): if i % 2 != 0: continue if a_lst[i] % 2 != 0: count += 1 print(count) if __name__ == "__main__": main()
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
76
#include <bits/stdc++.h> typedef long long ll; #define forin(in, n) \ for (int i = 0; i < n; i++) \ cin >> in[i] using namespace std; int main() { int N; cin >> N; int a; int ans = 0; for (int i = 0...
#include <bits/stdc++.h> typedef long long ll; #define forin(in, n) \ for (int i = 0; i < n; i++) \ cin >> in[i] using namespace std; int main() { int N; cin >> N; int a; int ans = 0; for (int i = 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
84
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using pii = pair<int, int...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using pii = pair<int, int...
[["+", 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
161
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; int arr[n]; int count = 0; for (int i = 0; i < n; i++) { cin >> arr[i]; if (i % 2 != 0 && arr[i] % 2 != 0) { count++; } } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; int arr[n]; int count = 0; for (int i = 0; i < n; i++) { cin >> arr[i]; if ((i + 1) % 2 != 0 && arr[i] % 2 != 0) { count++; } } cout << count << endl; }
[["+", 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
84
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, a; cin >> n; ll ans = 0; rep(i, n) { cin >> a; if (i % 2 == 1 && a % 2 == 1) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, a; cin >> n; ll ans = 0; rep(i, n) { cin >> a; if (i % 2 == 0 && a % 2 == 1) ans++; } cout << ans << endl; return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
88
#include <bits/stdc++.h> using namespace std; int main() { int t = 0, ans = 0; cin >> t; for (int i = 0; i < t; i++) { int a; cin >> a; if (a % 2 == 1 && i % 2 == 1) ans++; } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int t = 0, ans = 0; cin >> t; for (int i = 1; i <= t; i++) { int a; cin >> a; if (a % 2 == 1 && i % 2 == 1) 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
72
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> using namespace std; typedef long long ll; const ll mod = 1e9 + 7; int main() { ll n; cin >> n; ll a[200]; ll i, j; ll s = 0; for (i = 0; i < n; i++) { cin >> a[i]...
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> using namespace std; typedef long long ll; const ll mod = 1e9 + 7; int main() { ll n; cin >> n; ll a[200]; ll i, j; ll s = 0; for (i = 0; i < n; i++) { cin >> a[i]...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
112
#include <bits/stdc++.h> using namespace std; int main(void) { int N; cin >> N; int sum = 0, a; for (int i = 0; i < N; ++i) { cin >> a; if ((i % 2 == 1) && (a % 2 == 1)) ++sum; } cout << sum << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int N; cin >> N; int sum = 0, a; for (int i = 1; i <= N; ++i) { cin >> a; if ((i % 2 == 1) && (a % 2 == 1)) ++sum; } cout << sum << 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
77
n=int(input()) *a,=map(int,input().split()) count=0 for i in range(n): if i%2==1 and a[i]%2==1: count+=1 print(count)
n=int(input()) *a,=map(int,input().split()) count=0 for i in range(n): if (i+1)%2==1 and a[i]%2==1: count+=1 print(count)
[["+", 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
58
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.*; public class Main { void solve() throws IOException { int N = ni(); long ans = 0; for (int i = 0; i < N; i++) { int a = ni(); if (i % 2 == 1 && a % 2 =...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.*; public class Main { void solve() throws IOException { int N = ni(); long ans = 0; for (int i = 0; i < N; i++) { int a = ni(); if ((i + 1) % 2 == 1 && a...
[["+", 0, 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], ["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
3
531
#include <bits/stdc++.h> using namespace std; typedef long long ll; const double pi = 3.141592653589793; typedef unsigned long long ull; typedef long double ldouble; const ll INF = 1e18; vector<int> cost(1000000); vector<vector<int>> data(1000000); int main() { int N, answer = 0; cin >> N; for (int i = 0; i < N...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const double pi = 3.141592653589793; typedef unsigned long long ull; typedef long double ldouble; const ll INF = 1e18; vector<int> cost(1000000); vector<vector<int>> data(1000000); int main() { int N, answer = 0; cin >> N; for (int i = 1; i <= ...
[["-", 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
120
#include <stdio.h> int main(void) { int n; int a[101]; int i; int cnt; scanf("%d\n", &n); for (i = 0; i < n; i++) { scanf("%d", &a[i]); } cnt = 0; for (i = 0; i < n; i++) { if (i % 2 == 1 && a[i] % 2 == 1) cnt++; } printf("%d", cnt); return (0); }
#include <stdio.h> int main(void) { int n; int a[102]; int i; int cnt; scanf("%d\n", &n); for (i = 0; i < n; i++) { scanf("%d", &a[i]); } cnt = 0; for (i = 0; i < n; i++) { if (i % 2 == 0 && a[i] % 2 == 1) cnt++; } printf("%d", cnt); return (0); }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 57, 15, 23, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 13]]
0
116
N = int(input().rstrip()) a = input().rstrip().split(' ') num = 0 for i in range(0, N, 1): if int(a[i]) % 2 == 1: num += 1 print(num)
N = int(input().rstrip()) a = input().rstrip().split(' ') num = 0 for i in range(0, N, 2): if int(a[i]) % 2 == 1: num += 1 print(num)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
63
#include <bits/stdc++.h> using namespace std; // (setq-default c-basic-offset 2) int MOD = 1e9 + 7; int main() { int n; cin >> n; // vector<int> a(n); int ret = 0; for (int i = 0; i < n; ++i) { int a; cin >> a; if ((i % 2 == 1) and (a % 2 == 1)) ++ret; } cout << ret << endl; return...
#include <bits/stdc++.h> using namespace std; // (setq-default c-basic-offset 2) int MOD = 1e9 + 7; int main() { int n; cin >> n; // vector<int> a(n); int ret = 0; for (int i = 0; i < n; ++i) { int a; cin >> a; if (((i + 1) % 2 == 1) and (a % 2 == 1)) ++ret; } cout << ret << endl; ...
[["+", 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
86
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(v) v.begin(), v.end() #define mp make_pair #define INF 1e9 void init() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); } int main() { init(); int n...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(v) v.begin(), v.end() #define mp make_pair #define INF 1e9 void init() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); } int main() { init(); int n...
[["+", 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
121
#include <bits/stdc++.h> using namespace std; // DEFINE and // TYPEDEF-------------------------------------------------------------- // For actual content check from line 94 #define FORG(i, a, n) \ for (lld i = (lld)a; a < n ? i < (lld)n : (lld)n < i; ...
#include <bits/stdc++.h> using namespace std; // DEFINE and // TYPEDEF-------------------------------------------------------------- // For actual content check from line 94 #define FORG(i, a, n) \ for (lld i = (lld)a; a < n ? i < (lld)n : (lld)n < i; ...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
714
N = int(input()) a = list(map(int,input().split())) count = 0 for i,j in enumerate(a): if(i%2==1): if(j%2 == 1): count +=1 print(count)
N = int(input()) a = list(map(int,input().split())) count = 0 for i,j in enumerate(a): if((i+1)%2==1): if(j%2 == 1): count +=1 print(count)
[["+", 15, 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], ["+", 15, 23, 0, 666, 0, 657, 31, 23, 0, 25]]
5
63
#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 != 0 && a[i] % 2 != 0) { count++; } } cout << count; return 0; }
#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 != 0 && a[i] % 2 != 0) { count++; } } cout << count; return 0; }
[["+", 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
97
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int i, n, count = 0; scanf("%d", &n); int a[n]; for (i = 0; i < n; i++) { scanf("%d", &a[i]); if (i % 2 == 1 && a[i] % 2 == 1) { count++; } } printf("%d", count); return 0; }
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int i, n, count = 0; scanf("%d", &n); int a[n]; for (i = 0; i < n; i++) { scanf("%d", &a[i]); if ((i + 1) % 2 == 1 && a[i] % 2 == 1) { count++; } } printf("%d", count); return 0; }
[["+", 0, 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], ["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
0
100
import sys N = int(sys.stdin.readline()) #L,R,d = map(int, sys.stdin.readline().split()) ans = 0 for i,n in enumerate(map(int, sys.stdin.readline().split())): if i % 2 == 0: continue if n % 2 == 0: continue ans += 1 print(ans)
import sys N = int(sys.stdin.readline()) #L,R,d = map(int, sys.stdin.readline().split()) ans = 0 for i,n in enumerate(map(int, sys.stdin.readline().split())): if i % 2 != 0: continue if n % 2 == 0: continue ans += 1 print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
66
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define MOD 1000000007; using namespace std; using ll = long long; int main() { int n, 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 << endl; return...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define MOD 1000000007; using namespace std; using ll = long long; int main() { int n, 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 << endl; return...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
93
#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 c = 0; for (int i = 0; i < n; i++) { if (i % 2 == 1 && a.at(i) % 2 == 1) c++; } cout << c << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a.at(i); } int c = 0; for (int i = 0; i < n; i++) { if ((i + 1) % 2 == 1 && a.at(i) % 2 == 1) c++; } cout << c << endl; }
[["+", 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
102
#include <algorithm> #include <iostream> #include <map> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define rep_one(i, n) for (int i = 1; i < n; i++) using namespace std; typedef long long ll; int main() { int n; cin >> n; int a[n], ans = 0; rep(i, n) { ...
#include <algorithm> #include <iostream> #include <map> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define rep_one(i, n) for (int i = 1; i < n; i++) using namespace std; typedef long long ll; int main() { int n; cin >> n; int a[n], ans = 0; rep(i, n) { ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
113
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]; int count = 0; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); } for (int i = 0; i < N; i++) { if (a[i] % 2 == 1...
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]; int count = 0; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); } for (int i = 0; i < N; i++) { if (a[i] % 2 == 1...
[["-", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499]]
3
132
import java.util.Scanner; /* */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); // int R = sc.nextInt(); // int d = sc.nextInt(); int[] n = new int[N]; // int[] B = new int[M]; for (int i = 0; i < N; i++) { ...
import java.util.Scanner; /* */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); // int R = sc.nextInt(); // int d = sc.nextInt(); int[] n = new int[N]; // int[] B = new int[M]; for (int i = 0; i < N; i++) { ...
[["-", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499]]
3
139
import java.util.Scanner; public class Main { public static Scanner scan = new Scanner(System.in); public static void main(String[] args) { int n = nextInt(); int con = 0; int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = nextInt(); } for (int i = 0; i < n; i++) { i...
import java.util.Scanner; public class Main { public static Scanner scan = new Scanner(System.in); public static void main(String[] args) { int n = nextInt(); int con = 0; int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = nextInt(); } for (int i = 0; i < n; i++) { i...
[["+", 15, 15, 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], ["+", 15, 15, 0, 16, 31, 16, 31, 23, 0, 25]]
3
386
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int a[N]; for (int i = 0; i < N; i++) { cin >> a[i]; } int result = 0; for (int i = 0; i < N; i++) { if ((i % 2 == 1) && (a[i] % 2 == 1)) { result += 1; } } cout << result << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int a[N]; for (int i = 0; i < N; i++) { cin >> a[i]; } int result = 0; for (int i = 0; i < N; i++) { if ((i % 2 == 0) && (a[i] % 2 == 1)) { result += 1; } } cout << result << endl; }
[["-", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13]]
1
102
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0; i < ll(n); i++) int main() { int N; cin >> N; int count = 0; REP(i, N) { int ai; cin >> ai; if ((i % 2 == 1) and (ai % 2 == 1))...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0; i < ll(n); i++) int main() { int N; cin >> N; int count = 0; REP(i, N) { int ai; cin >> ai; if (((i + 1) % 2 == 1) and (ai % 2 ...
[["+", 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
93
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; cin >> n; int a; int cnt = 0; rep(i, n) { cin >> a; if (i % 2 == 1 && a % 2 == 1) cnt++; } cout << cnt << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; cin >> n; int a; int cnt = 0; rep(i, n) { cin >> a; if ((i + 1) % 2 == 1 && a % 2 == 1) cnt++; } cout << cnt << endl; return ...
[["+", 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
89
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" const int dx[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1}; const int dy[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}; const ll integer = pow(2, 32) - 1; // 4294967295 #define N 8010000 #define TC ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" const int dx[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1}; const int dy[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}; const ll integer = pow(2, 32) - 1; // 4294967295 #define N 8010000 #define TC ...
[["-", 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
256
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; using namespace std; void solve() {} int ma...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; using namespace std; void solve() {} int ma...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
137
N = int(input()) a = list(map(int,input().split())) ans = 0 for i in range(N): if(i%2==1): 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): if((i+1)%2==1): if(a[i]%2==1): ans += 1 print(ans)
[["+", 15, 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], ["+", 15, 23, 0, 666, 0, 657, 31, 23, 0, 25]]
5
64
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int n; cin >> n; int ans = 0; for (int i = 0; i < n; ++i) { int x; cin >> x; if (i % 2 == 1 && x % 2 == 1) { ++ans; } } cout << ans << endl; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int n; cin >> n; int ans = 0; for (int i = 0; i < n; ++i) { int x; cin >> x; if (i % 2 == 0 && x % 2 == 1) { ++ans; } } cout << ans << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
74
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } int count = 0; for (int i = 0; i < N; i++) { if (i % 2 == 1) { if (vec.at(i) % 2 == 1) { count++; } } } cout << count << en...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } int count = 0; for (int i = 0; i < N; i++) { if ((i + 1) % 2 == 1) { if (vec.at(i) % 2 == 1) { count++; } } } cout << count...
[["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 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]]
1
108
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (int)n; i++) int main() { int n; cin >> n; vector<int> a(n); int ans = 0; rep(i, n) { cin >> a[i]; if (i % 2 == 1 && a[i] % 2 == 1) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (int)n; i++) int main() { int n; cin >> n; vector<int> a(n); int ans = 0; rep(i, n) { cin >> a[i]; if (i % 2 == 0 && a[i] % 2 == 1) ans++; } cout << ans << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
85
n = gets.to_i nums = gets.split(' ').map(&:to_i) count = 0 i = 1 nums.each do |num| i += 1 count += 1 if i.odd? && num.odd? end p count
n = gets.to_i nums = gets.split(' ').map(&:to_i) count = 0 i = 0 nums.each do |num| i += 1 count += 1 if i.odd? && num.odd? end p count
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612]]
4
51
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author Ido Kessler */ #include <algorithm> #include <bitset> #include <cassert> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <qu...
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author Ido Kessler */ #include <algorithm> #include <bitset> #include <cassert> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <qu...
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25]]
1
3,137
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include ...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include ...
[["+", 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
678
n = (int)(input()) a=list(map(int, input().split(" "))) count = 0 for i in range(1, n, 2): if a[i] % 2 == 1: count += 1 print(count)
n = (int)(input()) a=list(map(int, input().split(" "))) count = 0 for i in range(0, n, 2): if a[i] % 2 == 1: count += 1 print(count)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
62
#include <stdio.h> int main() { int n, i; int a[100]; int cnt = 0; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &a[i]); if (a[i] % 2 == 1 && i % 2 == 1) cnt++; } printf("%d", cnt); return 0; }
#include <stdio.h> int main() { int n, i; int a[100]; int cnt = 0; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &a[i]); if (a[i] % 2 == 1 && (i + 1) % 2 == 1) cnt++; } printf("%d", cnt); return 0; }
[["+", 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, 13], ["+", 0, 16, 12, 16, 31, 16, 31, 23, 0, 25]]
0
94
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; int i; int c = 0; for (i = 0; i < n; i++) { cin >> a[i]; } for (i = 0; i < n; i++) { if (i % 2 != 0) { if (a[i] % 2 != 0) c++; } } cout << c; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; int i; int c = 0; for (i = 0; i < n; i++) { cin >> a[i]; } for (i = 0; i < n; i++) { if (i % 2 == 0) { if (a[i] % 2 != 0) c++; } } cout << c; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
98
N = int(input()) a = list(map(int, input().split())) b = a[1::2] ans = 0 for i in range(len(b)): if b[i]%2 == 1: ans += 1 print(ans)
N = int(input()) a = list(map(int, input().split())) b = a[::2] ans = 0 for i in range(len(b)): if b[i]%2 == 1: ans += 1 print(ans)
[["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612]]
5
65
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define repr(i, n) for (int i = n; i > 0; --i) using namespace std; using ll = long...
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define repr(i, n) for (int i = n; i > 0; --i) using namespace std; using ll = long...
[["+", 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
126
/* Author : lifehappy */ #pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> #define mp make_pair #define pb push_back using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; const double pi = acos(-1.0); const double eps = 1e-7; const int inf = 0...
/* Author : lifehappy */ #pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> #define mp make_pair #define pb push_back using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; const double pi = acos(-1.0); const double eps = 1e-7; const int inf = 0...
[["-", 0, 57, 15, 339, 51, 16, 31, 91, 17, 111], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25]]
1
277
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int count = 0; int num; for (int i = 0; i < N; i++) { num = sc.nextInt(); if (i % 2 == 1) { if (num % 2 == 1) { count++; ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int count = 0; int num; for (int i = 1; i <= N; i++) { num = sc.nextInt(); if (i % 2 == 1) { if (num % 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]]
3
108
def main(): n = int(input()) a = list(map(int, input().split())) cnt = 0 for i, e in enumerate(a): if i % 2 == 1 and e % 2 == 1: cnt += 1 print(cnt) if __name__ == '__main__': main()
def main(): n = int(input()) a = list(map(int, input().split())) cnt = 0 for i, e in enumerate(a): if (i+1) % 2 == 1 and e % 2 == 1: cnt += 1 print(cnt) if __name__ == '__main__': main()
[["+", 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
73
n = int(input()) count = 0 arr = [int(i) for i in input().split()] for i in range(n): if i % 2 == 1 and arr[i] % 2 == 1: count += 1 print(count)
n = int(input()) count = 0 arr = [int(i) for i in input().split()] for i in range(1,n+1): if i % 2 == 1 and arr[i-1] % 2 == 1: count += 1 print(count)
[["+", 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
60
n = int(input()) a = list(map(int,input().split())) ans = 0 for i, a in enumerate(a): if i % 2 == 1: if a % 2 == 1: ans += 1 print(ans)
n = int(input()) a = list(map(int,input().split())) ans = 0 for i, a in enumerate(a): if (i + 1) % 2 == 1: if a % 2 == 1: 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
59
N = int(input()) arr = list(map(int, input().split())) count = 0 for i in range(N): if (i%2 == 1) and (arr[i]%2 == 1): count += 1 print(count)
N = int(input()) arr = list(map(int, input().split())) count = 0 for i in range(1, N+1): if (i%2 == 1) and (arr[i-1]%2 == 1): count += 1 print(count)
[["+", 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, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 0, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
63
N = int(input()) ans = 0 Line = [int(s) for s in input().split()] for i,x in enumerate(Line): if i % 2 == 1: # print(x) if x % 2 == 1: ans += 1 print(ans)
N = int(input()) ans = 0 Line = [int(s) for s in input().split()] for i,x in enumerate(Line): if i % 2 == 0: # print(i,x) if x % 2 == 1: 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
61
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { String data1 = scanner.nextLine(); String data2 = scanner.nextLine(); int N = Integer.parseInt(data1); ...
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { String data1 = scanner.nextLine(); String data2 = scanner.nextLine(); int N = Integer.parseInt(data1); ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 530, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 530, 8, 196, 0, 7, 15, 16, 17, 19], ["+", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["+", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]]
3
199
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if len(x) == 0: r...
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if len(x) == 0: r...
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60]]
5
337
#include <bits/stdc++.h> #define arep(a, i, n) for (int i = (a); i < (n); i++) #define rep(i, n) for (int i = 0; i < (n); i++) #define cinf(x, n) \ for (int i = 0; i < (n); i++) \ cin >> x[i]; #define coutf(...
#include <bits/stdc++.h> #define arep(a, i, n) for (int i = (a); i < (n); i++) #define rep(i, n) for (int i = 0; i < (n); i++) #define cinf(x, n) \ for (int i = 0; i < (n); i++) \ cin >> x[i]; #define coutf(...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
125
N = int(input()) A = list(map(int, input().split())) ans = 0 for i in range(N): if A[i] % 2 == 1 and 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): # print(i) if A[i-1] % 2 == 1 and i % 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], ["+", 31, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 31, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
59
#include <bits/stdc++.h> using namespace std; int main() { int n; int a[105]; cin >> n; int ans = 0; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) { if ((i & 1) && a[i] & 1) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; int a[105]; cin >> n; int ans = 0; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) { if ((!(i & 1)) && a[i] & 1) ans++; } cout << ans << endl; }
[["+", 15, 339, 51, 16, 31, 23, 0, 91, 17, 111], ["+", 51, 16, 31, 23, 0, 91, 28, 23, 0, 24], ["+", 51, 16, 31, 23, 0, 91, 28, 23, 0, 25]]
1
91
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define repr(i, n) for (int i = (int)n - 1; i >= 0; --i) #define ALL(a) (a).begin(), (a).end() using ll = long long; using Graph = vector<vector<int>>; using P = p...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define repr(i, n) for (int i = (int)n - 1; i >= 0; --i) #define ALL(a) (a).begin(), (a).end() using ll = long long; using Graph = vector<vector<int>>; using P = p...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
286
#include <bits/stdc++.h> using namespace std; #define read(type) readInt<type>() // Fast read #define ll long long #define nL "\n" #define pb push_back #define mk make_pair #define pii pair<int, int> #define vi vector<int> #define all(x) (x).begin(), (x).end() #define umap unordered_map #define uset unordered_set #defi...
#include <bits/stdc++.h> using namespace std; #define read(type) readInt<type>() // Fast read #define ll long long #define nL "\n" #define pb push_back #define mk make_pair #define pii pair<int, int> #define vi vector<int> #define all(x) (x).begin(), (x).end() #define umap unordered_map #define uset unordered_set #defi...
[["+", 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
136
#include <bits/stdc++.h> using namespace std; typedef long long ll; const long long LINF = 1LL << 60; const long long LMINF = 1LL << 63; const int INF = 1 << 30; #define REP(i, n) for (int i = 0; i < n; ++i) #define REPS(i, x) for (int i = 1; i <= (int)(x); i++) #define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const long long LINF = 1LL << 60; const long long LMINF = 1LL << 63; const int INF = 1 << 30; #define REP(i, n) for (int i = 0; i < n; ++i) #define REPS(i, x) for (int i = 1; i <= (int)(x); i++) #define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i...
[["+", 31, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13]]
1
259
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using names...
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using names...
[["+", 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, 13], ["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 25]]
1
130
n = int(input()) a = input().split() a = list(map(int,a)) s = 0 for i in range(n): if(i%2!=0): if(a[i]%2!=0): s+=1 print(s)
n = int(input()) a = input().split() a = list(map(int,a)) s = 0 for i in range(n): if((i+1)%2!=0): if(a[i]%2!=0): s+=1 print(s)
[["+", 15, 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], ["+", 15, 23, 0, 666, 0, 657, 31, 23, 0, 25]]
5
67
#include <stdio.h> int main() { int i, n, count = 0; scanf("%d", &n); int a[n]; for (i = 0; i < n; i++) { scanf("%d", &a[i]); } for (i = 0; i < n; i++) { if (i % 2 == 1 && a[i] % 2 == 1) count++; } printf("%d", count); return 0; }
#include <stdio.h> int main() { int i, n, count = 0; scanf("%d", &n); int a[n]; for (i = 0; i < n; i++) { scanf("%d", &a[i]); } for (i = 0; i < n; i++) { if (i % 2 == 0 && a[i] % 2 == 1) count++; } printf("%d", count); return 0; }
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 13]]
0
108
#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); } for (int i = 0; i < N; i++) { if (i % 2 == 1 && A.at(i) % 2 == 1) { 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); } for (int i = 0; i < N; i++) { if (i % 2 == 0 && A.at(i) % 2 == 1) { ans++; } } cout << ans << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
103
#include <cstdio> using namespace std; int main() { int n, i, cnt = 0, a; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &a); if (i % 2 != 0 && a % 2 != 0) cnt++; } printf("%d\n", cnt); return 0; }
#include <cstdio> using namespace std; int main() { int n, i, cnt = 0, a; scanf("%d", &n); for (i = 1; i <= n; i++) { scanf("%d", &a); if (i % 2 != 0 && a % 2 != 0) cnt++; } printf("%d\n", cnt); 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
88
N = int(input()) A = list(map(int, input().split())) counter = 0 for i in range(N): checker_1 = i % 2 == 1 checker_2 = A[i] % 2 == 1 if checker_1 & checker_2: counter += 1 print(counter)
N = int(input()) A = list(map(int, input().split())) counter = 0 for i in range(N): checker_1 = (i + 1) % 2 == 1 checker_2 = A[i] % 2 == 1 if checker_1 & checker_2: counter += 1 print(counter)
[["+", 0, 662, 12, 666, 0, 657, 31, 23, 0, 24], ["+", 12, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 12, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 662, 12, 666, 0, 657, 31, 23, 0, 25]]
5
65