Submission #37795291
Source Code Expand
#include <bits/stdc++.h>
#define x first
#define y second
#define IOS ios::sync_with_stdio(false)
#define cit cin.tie(0)
#define cot cout.tie(0)
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;
const int N = 100010, M = 100010, MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const LL LLINF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-8;
void solve();
int main()
{
IOS;
cit, cot;
int T = 1;
cin >> T;
while (T -- ) solve();
return 0;
}
void solve()
{
int n;
cin >> n;
int res = 0;
while (n -- )
{
int t;
cin >> t;
res += t & 1;
}
cout << res << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Multi Test Cases |
| User | hcywoi |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 672 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3564 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt |
| All | 00_sample_00.txt, 01_random_00.txt, 01_random_01.txt, 02_max_00.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 8 ms | 3564 KiB |
| 01_random_00.txt | AC | 5 ms | 3556 KiB |
| 01_random_01.txt | AC | 3 ms | 3504 KiB |
| 02_max_00.txt | AC | 6 ms | 3532 KiB |