QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#744072 | #8986. Call for Problems | t-aswath | AC ✓ | 0ms | 3680kb | C++14 | 1.1kb | 2024-11-13 20:45:44 | 2024-11-13 20:45:44 |
Judging History
answer
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define deb(x...) 42
#endif
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
void solve(int t) {
ll n;
cin>>n;
ll ans=0;
for(ll i=0;i<n;i++){
ll x;
cin>>x;
ans+=(x%2);
}
cout<<ans<<endl;
}
int main() {
fast_io;
#ifdef LOCAL
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("output.txt", "w", stderr);
#endif
ll t = 1;
//cin >> t;
for(ll i = 0; i < t; i++) {
#ifdef LOCAL
cout << "CASE " << i + 1 << ":\n";
#endif
solve(i);
}
#ifdef LOCAL
cout << endl << "Finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec\n\n";
#endif
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3552kb
input:
2 2 3
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
3 2 4 5
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
1 3
output:
1
result:
ok single line: '1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
4 5 7 8 9
output:
3
result:
ok single line: '3'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
50 4 29 3 10 69 82 74 34 89 62 55 34 30 24 58 81 10 22 39 80 94 29 46 8 18 12 18 87 100 92 21 19 13 92 95 52 30 97 85 71 49 68 42 59 97 44 5 98 42 87
output:
21
result:
ok single line: '21'