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> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { int n; cin >> n; int a[n]; rep(i, n) cin >> a[i]; int ans = 0; rep(i, n) { if (i % 2 == 1 && a[i] % 2 == 1) ans++; } cout << ans << endl; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { int n; cin >> n; int a[n]; rep(i, n) cin >> a[i]; int ans = 0; rep(i, n) { if ((i + 1) % 2 == 1 && a[i] % 2 == 1) ans++; } cout << ans << ...
[["+", 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
103
#include <algorithm> #include <bits/stdc++.h> #include <cassert> #include <iostream> #include <string> #include <vector> using namespace std; int main(void) { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; }...
#include <algorithm> #include <bits/stdc++.h> #include <cassert> #include <iostream> #include <string> #include <vector> using namespace std; int main(void) { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; }...
[["+", 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
133
N=int(input()) a=input().split() cnt=0 for i in range(N): if i%2==1 and int(a[i])%2==1: cnt+=1 print(cnt)
N=int(input()) a=input().split() cnt=0 for i in range(N): if i%2==0 and int(a[i])%2==1: cnt+=1 print(cnt)
[["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]]
5
54
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { int n; int cnt = 0; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; for (int i = 1; i <= n; i++) { if (i % 2 == 1) { if (a[i] % 2 == 1) cnt++; } }...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { int n; int cnt = 0; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; for (int i = 1; i <= n; i++) { if (i % 2 == 1) { if (a[i - 1] % 2 == 1) cnt++; }...
[["+", 31, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13]]
1
107
import bisect import sys import math from collections import deque from heapq import heappush, heappop def sRaw(): return input().rstrip("\r") def iRaw(): return int(input()) def ssRaw(): return input().split() def isRaw(): return list(map(int, ssRaw())) INF = 1 << 29 DIV = (10**9) + 7 #DIV = ...
import bisect import sys import math from collections import deque from heapq import heappush, heappop def sRaw(): return input().rstrip("\r") def iRaw(): return int(input()) def ssRaw(): return input().split() def isRaw(): return list(map(int, ssRaw())) INF = 1 << 29 DIV = (10**9) + 7 #DIV = ...
[["-", 12, 658, 8, 41, 0, 679, 31, 666, 0, 612], ["+", 12, 658, 8, 41, 0, 679, 31, 666, 0, 612]]
5
557
def B(): N = int(input()) A = [int(i) for i in input().split()] ans = 0 for i in range(1, N, 2): if A[i]%2 == 1: ans += 1 print(ans) B()
def B(): N = int(input()) A = [int(i) for i in input().split()] ans = 0 for i in range(0, N, 2): if A[i]%2 == 1: ans += 1 print(ans) B()
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
66
#include <bits/stdc++.h> #include <iostream> #define int long long using namespace std; signed main() { int n; cin >> n; int ans = 0; for (int i = 0; i < n; i++) { int x; cin >> x; if (i % 2 && x % 2) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #include <iostream> #define int long long using namespace std; signed main() { int n; cin >> n; int ans = 0; for (int i = 0; i < n; i++) { int x; cin >> x; if ((i + 1) % 2 && x % 2) ans++; } cout << ans << endl; return 0; }
[["+", 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
74
#: Author - Soumya Saurav import sys,io,os,time from collections import defaultdict from collections import OrderedDict from collections import deque from itertools import combinations from itertools import permutations import bisect,math,heapq alphabet = "abcdefghijklmnopqrstuvwxyz" input = sys.stdin.readline ######...
#: Author - Soumya Saurav import sys,io,os,time from collections import defaultdict from collections import OrderedDict from collections import deque from itertools import combinations from itertools import permutations import bisect,math,heapq alphabet = "abcdefghijklmnopqrstuvwxyz" input = sys.stdin.readline ######...
[["+", 15, 679, 31, 657, 31, 206, 206, 657, 17, 33], ["+", 15, 679, 31, 657, 31, 206, 206, 657, 12, 612]]
5
107
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
265
#include <bits/stdc++.h> using namespace std; using ll = long long; // #define int ll typedef vector<int> vi; typedef vector<bool> vb; typedef pair<int, int> pii; typedef vector<pair<int, int>> vpii; typedef vector<vector<bool>> vvb; typedef vector<vector<int>> vvi; typedef map<int, bool> mib; typedef long long ll; t...
#include <bits/stdc++.h> using namespace std; using ll = long long; // #define int ll typedef vector<int> vi; typedef vector<bool> vb; typedef pair<int, int> pii; typedef vector<pair<int, int>> vpii; typedef vector<vector<bool>> vvb; typedef vector<vector<int>> vvi; typedef map<int, bool> mib; typedef long long ll; t...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
892
#pragma GCC optimize("Ofast") #pragma GCC target("sse4") #include <bits/stdc++.h> #define f(i, a, b) for (ll i = a; i < b; i++) #define af(i, a, b) for (ll i = a; i >= b; i--) #define rep(i, a, b, k) for (ll i = a; i < b; i += k) #define arep(i, a, b, k) for (ll i = a; i >= b; i -= k) #define ff first #define ss secon...
#pragma GCC optimize("Ofast") #pragma GCC target("sse4") #include <bits/stdc++.h> #define f(i, a, b) for (ll i = a; i < b; i++) #define af(i, a, b) for (ll i = a; i >= b; i--) #define rep(i, a, b, k) for (ll i = a; i < b; i += k) #define arep(i, a, b, k) for (ll i = a; i >= b; i -= k) #define ff first #define ss secon...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
209
package main import ( "bufio" "fmt" "io" "math" "os" "strconv" "strings" ) func main() { solve(os.Stdin, os.Stdout) } type ReaderEx struct { baseScanner *bufio.Scanner words []string nextWordIdx func() int initWordIdx func(int) } func NewScannerEx(stdin io.Reader) *ReaderEx { var this ReaderEx ...
package main import ( "bufio" "fmt" "io" "math" "os" "strconv" "strings" ) func main() { solve(os.Stdin, os.Stdout) } type ReaderEx struct { baseScanner *bufio.Scanner words []string nextWordIdx func() int initWordIdx func(int) } func NewScannerEx(stdin io.Reader) *ReaderEx { var this ReaderEx ...
[["-", 0, 7, 0, 430, 10, 431, 12, 432, 0, 433], ["+", 0, 7, 0, 430, 10, 431, 12, 432, 0, 433]]
7
964
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; int count = 0; for (int i = 0; i < n; i++) { cin >> a[i]; if (i % 2 == 1 && a[i] % 2 == 1) { count++; } } cout << count << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; int count = 0; for (int i = 0; i < n; i++) { cin >> a[i]; if ((i + 1) % 2 == 1 && a[i] % 2 == 1) { count++; } } cout << count << 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
84
n = gets.to_i a = gets.chomp.split.map &:to_i ans = 0 a.each_with_index do |v,i| ans += 1 if i.odd? && v.odd? end puts ans
n = gets.to_i a = gets.chomp.split.map &:to_i ans = 0 a.each_with_index do |v,i| ans += 1 if i.even? && v.odd? end puts ans
[["-", 8, 736, 0, 751, 15, 738, 31, 652, 735, 22], ["+", 8, 736, 0, 751, 15, 738, 31, 652, 735, 22]]
4
42
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, x) for (int i = 0; i < x; i++) #define put(ans) cout << ans << endl; int main() { int n; cin >> n; int ans(0); rep(i, n) { int x; cin >> x; if (i % 2 == 1 && x % 2 == 1) { ans++; } } cout << ans << e...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, x) for (int i = 0; i < x; i++) #define put(ans) cout << ans << endl; int main() { int n; cin >> n; int ans(0); rep(i, n) { int x; cin >> x; if ((i + 1) % 2 == 1 && x % 2 == 1) { ans++; } } cout << an...
[["+", 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
87
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(1, N+1): if i % 2 == 1: if 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], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
60
#include <bits/stdc++.h> using namespace std; #define lli long long int #define llu unsigned long long int #define sa(a, n, t) \ for (int ii = 0; ii < n; ii++) \ scanf("%" #t "", &(a)[ii]) #define rep(i, n) for ...
#include <bits/stdc++.h> using namespace std; #define lli long long int #define llu unsigned long long int #define sa(a, n, t) \ for (int ii = 0; ii < n; ii++) \ scanf("%" #t "", &(a)[ii]) #define rep(i, n) for ...
[["+", 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
301
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int[] a = new int[n]; int count = 0; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sc.next()); if (a[i] ...
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int[] a = new int[n]; int count = 0; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sc.next()); if (a[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
128
package main import ( "bufio" "fmt" "os" "strconv" ) func main() { N := nextInt() c := 0 for i := 0; i < N; i++ { a := nextInt() if c%2 == 0 && a%2 == 1 { c++ } } fmt.Println(c) } var stdin = initStdin() func initStdin() *bufio.Scanner { bufsize := 1 * 1024 * 1024 // 1 MB var stdin = bufio.Ne...
package main import ( "bufio" "fmt" "os" "strconv" ) func main() { N := nextInt() c := 0 for i := 0; i < N; i++ { a := nextInt() if i%2 == 0 && a%2 == 1 { c++ } } fmt.Println(c) } var stdin = initStdin() func initStdin() *bufio.Scanner { bufsize := 1 * 1024 * 1024 // 1 MB var stdin = bufio.Ne...
[["-", 0, 57, 15, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 16, 31, 16, 31, 16, 31, 22]]
7
271
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); } template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); } typedef long long ll; typedef vector<int> vint; t...
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); } template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); } typedef long long ll; typedef vector<int> vint; t...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
306
#include <bits/stdc++.h> using namespace std; int main() { int n, cnt = 0; cin >> n; vector<int> a(n); 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 main() { int n, cnt = 0; cin >> n; vector<int> a(n); 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
86
#include <bits/stdc++.h> #include <string> #define pii pair<int, int> #define mp make_pair #define ll long long #define ld long double #define pb push_back #define S second #define F first using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int a[...
#include <bits/stdc++.h> #include <string> #define pii pair<int, int> #define mp make_pair #define ll long long #define ld long double #define pb push_back #define S second #define F first using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int 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
139
#include <bits/stdc++.h> #include <vector> using namespace std; int main(int argc, const char *argv[]) { int n; cin >> n; vector<int> va(n); for (int i = 0; i < n; ++i) { cin >> va[i]; } int ans = 0; for (int i = 0; i < n; ++i) { if (va[i] % 2 == 1 && i % 2 == 1) { ans++; } } cou...
#include <bits/stdc++.h> #include <vector> using namespace std; int main(int argc, const char *argv[]) { int n; cin >> n; vector<int> va(n); for (int i = 0; i < n; ++i) { cin >> va[i]; } int ans = 0; for (int i = 0; i < n; ++i) { if (va[i] % 2 == 1 && (i + 1) % 2 == 1) { ans++; } } ...
[["+", 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
116
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; int main() { int N; cin >> N; vector<int> a(N); int cnt = 0; for (int i = 0; i < N; i++) { cin >> a[i]; if ((a[i] % 2 == 1) && (i % 2 == 1)) { cnt++; } } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; int main() { int N; cin >> N; vector<int> a(N); int cnt = 0; for (int i = 0; i < N; i++) { cin >> a[i]; if ((a[i] % 2 == 1) && ((i + 1) % 2 == 1)) { cnt++; } } cout << cnt << endl; }
[["+", 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
101
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 #define YES \ cout << "YES" \ << "\n"; #define NO ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 #define YES \ cout << "YES" \ << "\n"; #define NO ...
[["+", 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
130
// +build ignore package main import ( "bufio" "fmt" "io" "os" "strconv" ) func solve(sc *scanner, wr *bufio.Writer) int { N := sc.i() ans := 0 for i := 0; i < N; i++ { a := sc.i() if i%2 == 1 && a%2 == 1 { ans++ } } fmt.Println(ans) return 0 } func main() { sc := newScanner(os.Stdin) wr := ...
// +build ignore package main import ( "bufio" "fmt" "io" "os" "strconv" ) func solve(sc *scanner, wr *bufio.Writer) int { N := sc.i() ans := 0 for i := 0; i < N; i++ { a := sc.i() if i%2 == 0 && a%2 == 1 { ans++ } } fmt.Println(ans) return 0 } func main() { sc := newScanner(os.Stdin) wr := ...
[["-", 8, 196, 0, 57, 15, 16, 31, 16, 12, 433], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 12, 433]]
7
483
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define modulo ll(1e9 + 7) #define EPS 1e-9 typedef long long ll; typedef pair<int, int> pii; void init() { cin.tie(0); cin.sync_with_stdio(0); } const int N = 1e5, M = 109, OO = 0x3f3f3f3f; const ll llOO = 0x3f3f3f3f3f3f3f3f; void...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define modulo ll(1e9 + 7) #define EPS 1e-9 typedef long long ll; typedef pair<int, int> pii; void init() { cin.tie(0); cin.sync_with_stdio(0); } const int N = 1e5, M = 109, OO = 0x3f3f3f3f; const ll llOO = 0x3f3f3f3f3f3f3f3f; void...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 67]]
1
166
n=int(input()) a=list(map(int,input().split())) ans=0 for num , i in enumerate(a): if num%2==1 and i%2==1: ans+=1 print(ans)
n=int(input()) a=list(map(int,input().split())) ans=0 for num , i in enumerate(a,1): if num%2==1 and i%2==1: ans+=1 print(ans)
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
58
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define rep(i, n) \ ; \ for (long long i = 0; i < (n); i++) using ll = long long; using P = pair<long long, long lon...
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define rep(i, n) \ ; \ for (long long i = 0; i < (n); i++) using ll = long long; using P = pair<long long, long lon...
[["+", 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
133
#!/usr/bin/env python3 input() A = input().split(' ') A = list(map(int, A)) ret = 0 for i, a in enumerate(A): if i % 2 == 1 and a % 2 == 1: ret += 1 print(ret)
#!/usr/bin/env python3 input() A = input().split(' ') A = list(map(int, A)) ret = 0 for i, a in enumerate(A): if i % 2 == 0 and a % 2 == 1: ret += 1 print(ret)
[["-", 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> using namespace std; #ifdef _DEBUG #define dout cout #define debug() if (true) #define dvout(v) vout(v) #else #define dout \ if (false) \ cout #define debug()...
#include <bits/stdc++.h> using namespace std; #ifdef _DEBUG #define dout cout #define debug() if (true) #define dvout(v) vout(v) #else #define dout \ if (false) \ cout #define debug()...
[["+", 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
254
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define pb push_back using namespace std; typedef long long ll; int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; int ans = 0; rep(i, n) { if (i % 2 == 0) continue; if (a[i] % 2 == 1) ans++; } ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define pb push_back using namespace std; typedef long long ll; int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; int ans = 0; rep(i, n) { if (i % 2 == 1) continue; if (a[i] % 2 == 1) ans++; } ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
101
#include <bits/stdc++.h> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> using namespace std; using ll = long long; int main() { int N; cin >> N; vector<int> a(N); int count = 0; for (int i = 1; i < N + 1; i++) { cin >> a.at(i); if (i % 2 == 1 && a.at(i) % 2 == 1) ...
#include <bits/stdc++.h> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> using namespace std; using ll = long long; int main() { int N; cin >> N; vector<int> a(N + 1); int count = 0; for (int i = 1; i < N + 1; i++) { cin >> a.at(i); if (i % 2 == 1 && a.at(i) % 2 == ...
[["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13]]
1
107
n=int(input()) A=[int(i) for i in input().split()] ans=0 for i,a in enumerate(A): if (i+1)%2==0 and a%2==1: ans+=1 print(ans)
n=int(input()) A=[int(i) for i in input().split()] ans=0 for i,a in enumerate(A): if (i+1)%2==1 and a%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
63
n = int(input()) a = [int(i) for i in input().split()] c = 0 for i,v in enumerate(a): if i%2 == 1 and v%2 == 1: c+=1 print(c)
n = int(input()) a = [int(i) for i in input().split()] c = 0 for i,v in enumerate(a): if i%2 == 0 and v%2 == 1: c+=1 print(c)
[["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]]
5
59
import itertools import decimal import math import collections import sys #input = sys.stdin.readline import copy # S=(input()) # N=int(input()) # N,K=map(int,input().split()) # ListA=list(map(int,input().split())) # ListA.sort()#reverse=True) def resolve(): N=int(input()) ListA=list(map(int,input().spli...
import itertools import decimal import math import collections import sys #input = sys.stdin.readline import copy # S=(input()) # N=int(input()) # N,K=map(int,input().split()) # ListA=list(map(int,input().split())) # ListA.sort()#reverse=True) def resolve(): N=int(input()) ListA=list(map(int,input().spli...
[["+", 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
87
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int num; int ans = 0; for (int i = 0; i < n; i++) { cin >> num; if (i % 2 == 1 && num % 2 == 1) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int num; int ans = 0; for (int i = 0; i < n; i++) { cin >> num; if (i % 2 == 0 && num % 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
70
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> moji(N); for (int i = 0; i < N; i++) { cin >> moji.at(i); } int count = 0; for (int i = 0; i < N; i++) { if (moji.at(i) % 2 == 1 && i % 2 == 1) { count++; } } cout << count; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> moji(N); for (int i = 0; i < N; i++) { cin >> moji.at(i); } int count = 0; for (int i = 0; i < N; i++) { if (moji.at(i) % 2 == 1 && (i + 1) % 2 == 1) { count++; } } cout << count; }
[["+", 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
102
#include <bits/stdc++.h> #define int long long #define p pair<int, int> #define endl '\n' const int INF = 1000000001; using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; vector<int> a(n); for (int q = 0; q < n; q++) { cin >> a[q]; ...
#include <bits/stdc++.h> #define int long long #define p pair<int, int> #define endl '\n' const int INF = 1000000001; using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; vector<int> a(n); for (int q = 0; q < n; q++) { cin >> a[q]; ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
139
import sys input = sys.stdin.readline def readstr(): return input().strip() def readint(): return int(input()) def readnums(): return map(int, input().split()) def readstrs(): return input().split() def main(): _ = readint() a = list(readnums()) ans = 0 for i, v in enumerate(a)...
import sys input = sys.stdin.readline def readstr(): return input().strip() def readint(): return int(input()) def readnums(): return map(int, input().split()) def readstrs(): return input().split() def main(): _ = readint() a = list(readnums()) ans = 0 for i, v in enumerate(a)...
[["+", 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
122
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); int n; cin >> n; int ret = 0; for (int i = 0; i < n; i++) { int x; cin >> x; if (i % 2 && x % 2) { ret++; } } cout << ret << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); int n; cin >> n; int ret = 0; for (int i = 1; i <= n; i++) { int x; cin >> x; if (i % 2 && x % 2) { ret++; } } cout << ret << 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
97
import math n = int(input()) aL = list(map(int, input().split(" "))) ans = 0 for index, a in enumerate(aL): if index % 2 == 1 and a % 2 == 1: ans += 1 print(ans)
import math n = int(input()) aL = list(map(int, input().split(" "))) ans = 0 for index, a in enumerate(aL): if (index + 1) % 2 == 1 and a % 2 == 1: ans += 1 print(ans)
[["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
63
#include <stdio.h> #include <stdlib.h> #include <string.h> int compare(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main() { int l, r, d, k = 0, n, a[110] = {0}, ans = 0; char s[3], cas[4][4] = {"AC", "WA", "TLE", "RE"}; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &a[i]...
#include <stdio.h> #include <stdlib.h> #include <string.h> int compare(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main() { int l, r, d, k = 0, n, a[100] = {0}, ans = 0; char s[3], cas[4][4] = {"AC", "WA", "TLE", "RE"}; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &a[i]...
[["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 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
185
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <math.h> #include <queue> #include <string> #include <vector> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < n; i++) #define rep_1 (i, j, n) for (int i = j; i < n; i++) typedef long long ll; typedef ...
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <math.h> #include <queue> #include <string> #include <vector> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < n; i++) #define rep_1 (i, j, n) for (int i = j; i < n; i++) typedef long long ll; typedef ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
186
import sys def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) N = I() a = LI() ans = 0 for i, A in enumerate(a): if i % 2 == 1: i...
import sys def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) N = I() a = LI() ans = 0 for i, A in enumerate(a): if (i+1) % 2 == 1: ...
[["+", 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
136
import sys input = sys.stdin.readline def read(): N = int(input().strip()) A = list(map(int, input().strip().split())) return N, A def solve(N, A): ans = 0 for i in range(N): if i % 2 == 1 and A[i] % 2 == 1: ans += 1 return ans if __name__ == '__main__': inputs = re...
import sys input = sys.stdin.readline def read(): N = int(input().strip()) A = list(map(int, input().strip().split())) return N, A def solve(N, A): ans = 0 for i in range(N): if (i+1) % 2 == 1 and A[i] % 2 == 1: ans += 1 return ans if __name__ == '__main__': inputs ...
[["+", 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
127
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 0; for (int i = 0; i < n; i++) { int a = sc.nextInt(); if (i % 2 == 1 && a % 2 == 1) ans++; } System.out.println(ans); ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 0; for (int i = 1; i <= n; i++) { int a = sc.nextInt(); if (i % 2 == 1 && a % 2 == 1) ans++; } System.out.println(ans); ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
106
n=int(input()) a=list(map(int,input().split())) ans = [] for i in range(n): if (i+1)%2==0 and a[i]%2==1: ans.append(i) print(len(ans))
n=int(input()) a=list(map(int,input().split())) ans = [] for i in range(n): if i%2==0 and a[i]%2==1: ans.append(i) print(len(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
70
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] ai = new int[n]; for (int i = 0; i < n; i++) { ai[i] = in.nextInt(); } int ans = 0; for (int i = 0; i < n; i++) { if (i % 2 =...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] ai = new int[n]; for (int i = 0; i < n; i++) { ai[i] = in.nextInt(); } int ans = 0; for (int i = 0; i < n; i++) { if (i % 2 =...
[["-", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499]]
3
134
/* This Template is property of Pranav Khiste aka desmond_kaneki*/ #include <bits/stdc++.h> using namespace std; #define ll long long int #define fi(x, n) for (ll i = x; i < n; i++) #define fj(x, n) for (ll j = x; j < n; j++) #define vll vector<ll> #define pb push_back #define qll queue<ll> #define mp make_pair #define...
/* This Template is property of Pranav Khiste aka desmond_kaneki*/ #include <bits/stdc++.h> using namespace std; #define ll long long int #define fi(x, n) for (ll i = x; i < n; i++) #define fj(x, n) for (ll j = x; j < n; j++) #define vll vector<ll> #define pb push_back #define qll queue<ll> #define mp make_pair #define...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
156
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; typedef double db; // typedef string str; // // typedef pair<int, int> pi; typedef pair<ll, ll> pl; // typedef pair<db, db> pd; // // typedef vector<int> vi;...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; typedef double db; // typedef string str; // // typedef pair<int, int> pi; typedef pair<ll, ll> pl; // typedef pair<db, db> pd; // // typedef vector<int> vi;...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
736
#include <bits/stdc++.h> using namespace std; bool T = false; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; } int cnt = 0; for (int i = 0; i < N; i++) { if (a[i] % 2 != 0 && (i + 1) % 2 == 0) cnt++; } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; bool T = false; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a[i]; } int cnt = 0; for (int i = 0; i < N; i++) { if (a[i] % 2 != 0 && (i + 1) % 2 != 0) cnt++; } cout << cnt << endl; }
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]]
1
107
#include <bits/stdc++.h> #define int long long #define MOD 1000000007 using namespace std; template <class T> ostream &operator<<(ostream &os, vector<T> V) { os << "[ "; for (auto v : V) os << v << " "; os << "]"; return os; } template <class T> ostream &operator<<(ostream &os, set<T> S) { os << "{ "; ...
#include <bits/stdc++.h> #define int long long #define MOD 1000000007 using namespace std; template <class T> ostream &operator<<(ostream &os, vector<T> V) { os << "[ "; for (auto v : V) os << v << " "; os << "]"; return os; } template <class T> ostream &operator<<(ostream &os, set<T> S) { os << "{ "; ...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
342
#include <bits/stdc++.h> #define int long long #define rep(i, a, b) for (int i = a; i < b; i += 1) #define reps(i, a, b) for (int i = a; i >= b; i -= 1) #define vi vector<int> #define vvi vector<vector<int>> #define pb push_back #define pi pair<int, int> #define mp make_pair #define ff first #define ss second #define i...
#include <bits/stdc++.h> #define int long long #define rep(i, a, b) for (int i = a; i < b; i += 1) #define reps(i, a, b) for (int i = a; i >= b; i -= 1) #define vi vector<int> #define vvi vector<vector<int>> #define pb push_back #define pi pair<int, int> #define mp make_pair #define ff first #define ss second #define i...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
423
def resolve(): import sys input = sys.stdin.readline # 整数 1 つ n = int(input()) # 整数複数個 # a, b = map(int, input().split()) # 整数 N 個 (改行区切り) # N = [int(input()) for i in range(N)] # 整数 N 個 (スペース区切り) A = list(map(int, input().split())) # 整数 (縦 H 横 W の行列) # A = [list(map(int,...
def resolve(): import sys input = sys.stdin.readline # 整数 1 つ n = int(input()) # 整数複数個 # a, b = map(int, input().split()) # 整数 N 個 (改行区切り) # N = [int(input()) for i in range(N)] # 整数 N 個 (スペース区切り) A = list(map(int, input().split())) # 整数 (縦 H 横 W の行列) # A = [list(map(int,...
[["+", 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
84
#include <algorithm> #include <ciso646> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; ll Max = 10 + 1e12; int N = ...
#include <algorithm> #include <ciso646> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; ll Max = 10 + 1e12; int 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
120
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define loop(i, b, n) for (int i = b; i < (n); ++i) #define each(e, v) for (auto &&e : v) #define all(v) (v).begin(), (v).end() #define sz(v) (int)v.size() using uint = unsigned int; using ll = long long; using ull = unsign...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define loop(i, b, n) for (int i = b; i < (n); ++i) #define each(e, v) for (auto &&e : v) #define all(v) (v).begin(), (v).end() #define sz(v) (int)v.size() using uint = unsigned int; using ll = long long; using ull = unsign...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
252
import sys sys.setrecursionlimit(10**6) def main(input, print): N = int(input()) a = list(map(int, input().split())) ans = 0 for i in range(1, N, 2): if(a[i] % 2 == 1): ans += 1 print(ans) if __name__ == '__main__': main(sys.stdin.readline, print)
import sys sys.setrecursionlimit(10**6) def main(input, print): N = int(input()) a = list(map(int, input().split())) ans = 0 for i in range(0, N, 2): if(a[i] % 2 == 1): ans += 1 print(ans) if __name__ == '__main__': main(sys.stdin.readline, print)
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
94
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N, A, Ans = 0; cin >> N; rep(i, N) { cin >> A; if (i % 2 == 1 && A % 2 == 1) { Ans++; } } cout << Ans << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N, A, Ans = 0; cin >> N; rep(i, N) { cin >> A; if (i % 2 == 0 && A % 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
70
#include <bits/stdc++.h> using namespace std; using ll = int64_t; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; int ans = 0; for (int i = 0; i < n; i++) { if (i % 2 == 0) continue; if (a[i] % 2 == 1) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; using ll = int64_t; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; int ans = 0; for (int i = 0; i < n; i++) { if ((i + 1) % 2 == 0) continue; if (a[i] % 2 == 1) ans++; } cout << ans << endl;...
[["+", 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
105
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <vector> #define F first #define S second #define all(a) a.begin(), a.end() #define setDP(arr) memset(arr, -1, sizeof arr) #define ...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <vector> #define F first #define S second #define all(a) a.begin(), a.end() #define setDP(arr) memset(arr, -1, sizeof arr) #define ...
[["-", 0, 1, 0, 11, 12, 23, 0, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 31, 22]]
1
197
import java.util.Scanner; public class Main { // final static int MOD = 1000000007; public static long ans = 0; public static void main(String[] args) { // int ans = 0; Scanner sc = new Scanner(System.in); boolean f = false; // long a = sc.nextLong(); int n = sc.nextInt(); int[] a ...
import java.util.Scanner; public class Main { // final static int MOD = 1000000007; public static long ans = 0; public static void main(String[] args) { // int ans = 0; Scanner sc = new Scanner(System.in); boolean f = false; // long a = sc.nextLong(); int n = sc.nextInt(); int[] a ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
150
#import numpy as np #import functools #import operator #from itertools import combinations as comb #from itertools import combinations_with_replacement as comb_with #from itertools import permutations as perm #import collections as C #most_common #import math #import sympy N = int(input()) #N,K,d= map(int,input().spli...
#import numpy as np #import functools #import operator #from itertools import combinations as comb #from itertools import combinations_with_replacement as comb_with #from itertools import permutations as perm #import collections as C #most_common #import math #import sympy N = int(input()) #N,K,d= map(int,input().spli...
[["+", 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
71
#include <iostream> using namespace std; int main() { int N; cin >> N; int a[N]; for (int i = 0; i < N; i++) cin >> a[i]; int count = 0; for (int i = 0; i < N; i++) { if (i % 2 == 1 && a[i] % 2 == 1) count++; } cout << count << endl; }
#include <iostream> using namespace std; int main() { int N; cin >> N; int a[N]; for (int i = 0; i < N; i++) cin >> a[i]; int count = 0; for (int i = 0; i < N; i++) { if (i % 2 == 0 && a[i] % 2 == 1) count++; } cout << count << endl; }
[["-", 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> #define ll long long #define endl '\n' using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, ans = 0; cin >> n; int ar[n]; for (int i = 0; i < n; i++) { cin >> ar[i]; if ((i & 1) && (ar[i] & 1)) ans++; } cout << ans << endl; return 0;...
#include <bits/stdc++.h> #define ll long long #define endl '\n' using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, ans = 0; cin >> n; int ar[n + 1]; for (int i = 1; i <= n; i++) { cin >> ar[i]; if ((i & 1) && (ar[i] & 1)) ans++; } cout << ans << endl; retu...
[["+", 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
101
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iostream> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll inf = 1000000007; int a[1000005]; int main(void) { int n; cin >> n; ll count = ...
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iostream> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll inf = 1000000007; int a[1000005]; int main(void) { int n; cin >> n; ll count = ...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
124
import math import collections import fractions import itertools import functools import operator def solve(): n = int(input()) a = list(map(int, input().split())) ans = 0 for i in a: if i+1 % 2 == 1 and a[i] % 2 == 1: ans += 1 print(ans) return 0 if __name__ == "__main__":...
import math import collections import fractions import itertools import functools import operator def solve(): n = int(input()) a = list(map(int, input().split())) ans = 0 for i in range(n): if (i+1) % 2 == 1 and a[i] % 2 == 1: ans += 1 print(ans) return 0 if __name__ == "_...
[["-", 0, 656, 0, 14, 8, 196, 0, 7, 12, 22], ["+", 0, 14, 8, 196, 0, 7, 12, 652, 63, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 25], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
87
import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) ans = 0 for i in range(N): if (i % 2 == 1) and (A[i] % 2 == 1): ans += 1 print(ans)
import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) ans = 0 for i in range(N): if (i % 2 == 0) and (A[i] % 2 == 1): ans += 1 print(ans)
[["-", 0, 57, 15, 679, 31, 23, 0, 666, 0, 612], ["+", 0, 57, 15, 679, 31, 23, 0, 666, 0, 612]]
5
72
/******tech_knight18_@11******/ /*I'm_not_the_only_traveller*/ /*who_has_not_repaid_his_debt*/ /*Take_me_back_to_The_Night_We_Met*/ #include <bits/stdc++.h> using namespace std; #define lld long long int #define ld long double #define pb push_back #define ppb pop_back #define mp make_pair #define F first #define S seco...
/******tech_knight18_@11******/ /*I'm_not_the_only_traveller*/ /*who_has_not_repaid_his_debt*/ /*Take_me_back_to_The_Night_We_Met*/ #include <bits/stdc++.h> using namespace std; #define lld long long int #define ld long double #define pb push_back #define ppb pop_back #define mp make_pair #define F first #define S seco...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
311
n=int(input()) a=list(map(int,input().split())) print( sum(i%2==1 and a[i]%2==1 for i in range(n)) )
#b n=int(input()) a=list(map(int,input().split())) print( sum((i+1)%2==1 and a[i]%2==1 for i in range(n)) )
[["+", 8, 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], ["+", 8, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
52
from sys import stdin import sys N = int(input()) a = list(map(int, input().split())) cnt = 0 for i, v in enumerate(a): if i % 2 == 1 and v % 2 == 1: cnt += 1 print(cnt)
from sys import stdin import sys N = int(input()) a = list(map(int, input().split())) cnt = 0 for i, v in enumerate(a): # print(i+1,v) if (i+1) % 2 == 1 and v % 2 == 1: cnt += 1 print(cnt)
[["+", 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
64
#include <bits/stdc++.h> #define int long long #define ld long double #define ri register int #define il inline #define mk make_pair #define pb push_back #define fi first #define se second #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define all(x) x.begin(), x.end() #define rep(i, a, b) fo...
#include <bits/stdc++.h> #define int long long #define ld long double #define ri register int #define il inline #define mk make_pair #define pb push_back #define fi first #define se second #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define all(x) x.begin(), x.end() #define rep(i, a, b) fo...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
221
#include <bits/stdc++.h> using namespace std; inline int ctoi(char c) { if (c < '0' || '9' < c) throw invalid_argument("ctoi error"); return c - '0'; } #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() tem...
#include <bits/stdc++.h> using namespace std; inline int ctoi(char c) { if (c < '0' || '9' < c) throw invalid_argument("ctoi error"); return c - '0'; } #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() tem...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
252
#include <algorithm> #include <array> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <limits> #include <queue> #include <set> #include <stack> #include <string> #include <utility> using namespace std; int main() { int n; cin >> n; deque<int> values(n); for (int i = 0; i < n...
#include <algorithm> #include <array> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <limits> #include <queue> #include <set> #include <stack> #include <string> #include <utility> using namespace std; int main() { int n; cin >> n; deque<int> values(n); for (int i = 0; i < n...
[["+", 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
131
#include <bits/stdc++.h> using namespace std; #define int long long #define pi pair<int, int> #define ff first #define ss second #define boost \ ios::sync_with_stdio(false); \ cin.tie(nullptr) #include "...
#include <bits/stdc++.h> using namespace std; #define int long long #define pi pair<int, int> #define ff first #define ss second #define boost \ ios::sync_with_stdio(false); \ cin.tie(nullptr) #include "...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
87
# -*- coding: utf-8 -*- import bisect import heapq import math import random from collections import Counter, defaultdict, deque from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacement, product, permutations from...
# -*- coding: utf-8 -*- import bisect import heapq import math import random from collections import Counter, defaultdict, deque from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacement, product, permutations from...
[["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 7, 12, 652, 3, 4, 0, 653, 51, 612]]
5
319
import sys import math import statistics import itertools from collections import deque n=int(input()) #l,r,d=map(int,input().split()) lis=list(map(int,input().split())) ans=0 for i in range(n): if i%2==1 and lis[i]%2==1: ans+=1 print(ans)
import sys import math import statistics import itertools from collections import deque n=int(input()) #l,r,d=map(int,input().split()) lis=list(map(int,input().split())) ans=0 for i in range(n): if (i+1)%2==1 and lis[i]%2==1: ans+=1 print(ans)
[["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
72
package main import ( "bufio" "fmt" "math" "os" "strconv" "strings" "flag" "runtime" "runtime/pprof" ) // TODO: 総当り方式の関数 var magic = 1000000007 var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file") var memprofile = flag.String("memprofile", "", "write mem profile to file") func solv...
package main import ( "bufio" "fmt" "math" "os" "strconv" "strings" "flag" "runtime" "runtime/pprof" ) // TODO: 総当り方式の関数 var magic = 1000000007 var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file") var memprofile = flag.String("memprofile", "", "write mem profile to file") func solv...
[["+", 15, 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], ["+", 15, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
7
2,998
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> const double PI = acos(-1); using namespace std; typedef long long ll; typedef long double ld; const ...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> const double PI = acos(-1); using namespace std; typedef long long ll; typedef long double ld; const ...
[["+", 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
1,418
import sys input = sys.stdin.readline #N, K = (int(i) for i in input().split()) #B = [int(x) for x in input().split()] #A = [[int(i) for i in input().split()] for i in range(N)] 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 prin...
import sys input = sys.stdin.readline #N, K = (int(i) for i in input().split()) #B = [int(x) for x in input().split()] #A = [[int(i) for i in input().split()] for i in range(N)] N = int(input()) a = [int(x) for x in input().split()] count = 0 for i in range(N): if (i+1)%2 == 1 and a[i]%2 == 1: count += 1 ...
[["+", 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
72
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vector<ll>> vvll; typedef vector<vector<vector<ll>>> vvvll; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; typedef vector<vector<vector<bool>>> vvvb; typedef pair<ll, ll> pll; typedef vector<pll> vpll...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vector<ll>> vvll; typedef vector<vector<vector<ll>>> vvvll; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; typedef vector<vector<vector<bool>>> vvvb; typedef pair<ll, ll> pll; typedef vector<pll> vpll...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
653
n=int(input()) a=list(map(int,input().split())) cnt=0 for i in range(n): if i%2!=0 and a[i]%2!=0: cnt+=1 print(cnt)
n=int(input()) a=list(map(int,input().split())) cnt=0 for i in range(n): if (i+1)%2!=0 and a[i]%2!=0: cnt+=1 print(cnt)
[["+", 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
59
// include // ------------------------------------------------ #include <bits/stdc++.h> #include <math.h> using namespace std; // func // ------------------------------------------------ int CalcSumOfDigit(int n); // 各桁の和を計算する。 int getDigit(int n); // 数字の桁数を取得する。 string upper(string str); // 英字を大文字に変換する。 strin...
// include // ------------------------------------------------ #include <bits/stdc++.h> #include <math.h> using namespace std; // func // ------------------------------------------------ int CalcSumOfDigit(int n); // 各桁の和を計算する。 int getDigit(int n); // 数字の桁数を取得する。 string upper(string str); // 英字を大文字に変換する。 strin...
[["+", 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
793
/* author : Anubhav Dinesh Patel date : 11.07.2020 12:18:08 IST */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define fast_io \ ios_base::sync_with_stdio(false); ...
/* author : Anubhav Dinesh Patel date : 11.07.2020 12:18:08 IST */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define fast_io \ ios_base::sync_with_stdio(false); ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
957
#include <bits/stdc++.h> using namespace std; #define int long long #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) #define chmin(a, b) \ if ((a) > (b)) ...
#include <bits/stdc++.h> using namespace std; #define int long long #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) #define chmin(a, 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
258
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() typedef long long ll; typedef pair<ll, ll> P; const int mod = 1000000007; //出力は (ans % mod + mod) % mod (負の剰余を正にする) const int inf = 1e9; const long long INF = 1LL << 60; // INF...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() typedef long long ll; typedef pair<ll, ll> P; const int mod = 1000000007; //出力は (ans % mod + mod) % mod (負の剰余を正にする) const int inf = 1e9; const long long INF = 1LL << 60; // INF...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
137
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int cnt = 0; for (int i = 1; i < n; i += 2) { cnt += a[i] % 2 == 1; } cout << cnt << '\n'; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int cnt = 0; for (int i = 0; i < n; i += 2) { cnt += a[i] % 2 == 1; } cout << cnt << '\n'; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
106
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 200010; int a[N]; int n, m; int main() { int t; // while(){ scanf("%d", &n); int cnt = 0; for (int i = 0; i < n; ++i) { scanf("%d", a + i); if (i % 2 && a[i] % 2) ++cnt; } cout << cnt <<...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 200010; int a[N]; int n, m; int main() { int t; // while(){ scanf("%d", &n); int cnt = 0; for (int i = 0; i < n; ++i) { scanf("%d", a + i); if ((i % 2 == 0) && a[i] % 2) ++cnt; } cout <<...
[["+", 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
108
# coding: utf-8 import sys #from operator import itemgetter sysread = sys.stdin.buffer.readline read = sys.stdin.buffer.read #from heapq import heappop, heappush #from collections import defaultdict sys.setrecursionlimit(10**7) #import math #from itertools import product, accumulate, combinations, product #import bisec...
# coding: utf-8 import sys #from operator import itemgetter sysread = sys.stdin.buffer.readline read = sys.stdin.buffer.read #from heapq import heappop, heappush #from collections import defaultdict sys.setrecursionlimit(10**7) #import math #from itertools import product, accumulate, combinations, product #import bisec...
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
100
#include <bits/stdc++.h> using namespace std; #define FAST_INP \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) int main() { FAST_INP; int n; cin >> n; int ans = 0; for (int i = 0; i < n; i++) { ...
#include <bits/stdc++.h> using namespace std; #define FAST_INP \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) int main() { FAST_INP; int n; cin >> n; int ans = 0; for (int i = 1; i <= n; 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
77
#include <bits/stdc++.h> #define ll long long #define ld long double #define all(x) (x.begin()), (x.end()) #define sz(x) ((ll)x.size()) #define FAST_IO \ ios_base ::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); using namespace std; #ifdef L...
#include <bits/stdc++.h> #define ll long long #define ld long double #define all(x) (x.begin()), (x.end()) #define sz(x) ((ll)x.size()) #define FAST_IO \ ios_base ::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); using namespace std; #ifdef L...
[["-", 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 <bits/stdc++.h> using namespace std; template <class T> T input() { T t; cin >> t; return t; } #define FOR(i, a, b) for (ll i = a; i < b; i++) #define REP(i, b) FOR(i, 0, b) #define RFOR(i, a, b) for (ll i = a - 1; i >= b; i--) #define RREP(i, a) RFOR(i, a, 0) #define REPALL(i, x) for (ll i = 0; i < x.si...
#include <bits/stdc++.h> using namespace std; template <class T> T input() { T t; cin >> t; return t; } #define FOR(i, a, b) for (ll i = a; i < b; i++) #define REP(i, b) FOR(i, 0, b) #define RFOR(i, a, b) for (ll i = a - 1; i >= b; i--) #define RREP(i, a) RFOR(i, a, 0) #define REPALL(i, x) for (ll i = 0; i < x.si...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
422
import sys readline = sys.stdin.readline def solve(): N = int(readline()) A = list(map(int, readline().split())) ans = 0 for i, a in enumerate(A): if i % 2 == 1 and a % 2 == 1: ans += 1 print(ans) solve()
import sys readline = sys.stdin.readline def solve(): N = int(readline()) A = list(map(int, readline().split())) ans = 0 for i, a in enumerate(A): if (i + 1) % 2 == 1 and a % 2 == 1: ans += 1 print(ans) solve()
[["+", 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
75
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int INF = 1e9; int main() { int n; const int max_n = 100; int a[101]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; int ans = 0; for (int i = 0; i < n; i++) { if (a[i] % 2 == 1 && i % 2 == 1) ans++; } ...
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int INF = 1e9; int main() { int n; const int max_n = 100; int a[101]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; int ans = 0; for (int i = 0; i < n; i++) { if (a[i] % 2 == 1 && (i + 1) % 2 == 1) ans++;...
[["+", 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
114
#include <bits/stdc++.h> #define F first #define S second using namespace std; #define ll long long #define ld long double #define pb push_back #define eb emplace_back int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll n = 0; cin >> n; ll ar[n]; ll c = 0; for (ll i = 0; i < n; ++i) { cin >> ar[...
#include <bits/stdc++.h> #define F first #define S second using namespace std; #define ll long long #define ld long double #define pb push_back #define eb emplace_back int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll n = 0; cin >> n; ll ar[n]; ll c = 0; for (ll i = 0; i < n; ++i) { cin >> ar[...
[["+", 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
107
#include <iostream> using namespace std; using ll = long long; int main() { ll N, ans{}, a; cin >> N; for (int i = 0; i < N; i++) { cin >> a; if (i % 2 && a % 2) ++ans; } cout << ans << endl; }
#include <iostream> using namespace std; using ll = long long; int main() { ll N, ans{}, a; cin >> N; for (int i = 1; i <= N; i++) { cin >> a; if (i % 2 && a % 2) ++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
70
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define MOD 1000000007LL #define rep(i, n) for (ll(i) = 0LL; (i) < (ll)(n); (i)++) #define rep2(i, s, e) for (ll(i) = (ll)(s); (i) < (ll)(e); (i)++) #define repi(i, n) for (ll(i) = 0LL; (i) <= ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define MOD 1000000007LL #define rep(i, n) for (ll(i) = 0LL; (i) < (ll)(n); (i)++) #define rep2(i, s, e) for (ll(i) = (ll)(s); (i) < (ll)(e); (i)++) #define repi(i, n) for (ll(i) = 0LL; (i) <= ...
[["+", 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
447
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= *$* WRITER:kakitamasziru/OxOmisosiru *$* ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/ #ifdef LOCAL_JUDGE #define _GLIBCXX_DEBUG #endif #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <cstdint> // int64_t, int*_t #include <iomanip> #include ...
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= *$* WRITER:kakitamasziru/OxOmisosiru *$* ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/ #ifdef LOCAL_JUDGE #define _GLIBCXX_DEBUG #endif #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <cstdint> // int64_t, int*_t #include <iomanip> #include ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
395
#include <bits/stdc++.h> using namespace std; #ifdef _DEBUG #include "_DEBUG.hpp" #endif #define int long long const int INF = 1LL << 60; signed main() { int n; cin >> n; int ans = 0; for (int i = 0; i < n; i++) { int a; cin >> a; ans += (i % 2 == 1 && a % 2 == 1); } cout << ans << endl; re...
#include <bits/stdc++.h> using namespace std; #ifdef _DEBUG #include "_DEBUG.hpp" #endif #define int long long const int INF = 1LL << 60; signed main() { int n; cin >> n; int ans = 0; for (int i = 0; i < n; i++) { int a; cin >> a; ans += (i % 2 == 0 && a % 2 == 1); } cout << ans << endl; re...
[["-", 0, 11, 12, 23, 0, 16, 31, 16, 12, 13], ["+", 0, 11, 12, 23, 0, 16, 31, 16, 12, 13]]
1
90
import sys import heapq import math import fractions import bisect import itertools from collections import Counter from collections import deque from operator import itemgetter def input(): return sys.stdin.readline().strip() def mp(): return map(int,input().split()) def lmp(): return list(map(int,input().split())) n...
import sys import heapq import math import fractions import bisect import itertools from collections import Counter from collections import deque from operator import itemgetter def input(): return sys.stdin.readline().strip() def mp(): return map(int,input().split()) def lmp(): return list(map(int,input().split())) n...
[["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]]
5
127