Submission #15158243
Source Code Expand
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
std::cin >> n;
vector<int> a(n);
for(int i=0; i<n; i++){
std::cin >> a[i];
}
int ans = 0;
for(int i=0; i<n; i+=2){
if(a[i] % 2 == 1){
ans += 1;
}
}
std::cout << ans << '\n';
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - An Odd Problem |
| User | shrimpName |
| Language | C++ (Clang 10.0.0) |
| Score | 200 |
| Code Size | 331 Byte |
| Status | AC |
| Exec Time | 10 ms |
| Memory | 3164 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 10 ms | 3128 KiB |
| random_02.txt | AC | 4 ms | 3164 KiB |
| random_03.txt | AC | 2 ms | 3048 KiB |
| random_04.txt | AC | 2 ms | 3164 KiB |
| random_05.txt | AC | 3 ms | 3036 KiB |
| sample_01.txt | AC | 2 ms | 3016 KiB |
| sample_02.txt | AC | 4 ms | 3032 KiB |