Submission #1091706


Source Code Expand

#include<bits/stdc++.h>
#define pb push_back
#define PI acos(-1)
#define mp make_pair
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define F first
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y)
#define sdl(x) scanf("%lld",&x)
#define sd2l(x,y) scanf("%lld%lld",&x,&y)
#define maxn 100010
#define S second
#define ll long long int
#define inf 1000002014
#define infl 1000000000000020000ll
#define mod 100000000
#define sz(x) (int) x.size()
#define pi pair< int,int >
#define pii pair<int,pi>
#define pu push
#define ld long double
#define ull unsigned long long int
#define trace1(x)  cerr << #x << ": " << x << endl
#define trace2(x, y)  cerr << #x << ": " << x << " | " << #y << ": " << y << endl
int main(int argc, char const *argv[])
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    int n,x;
    sd(n);
    int ctr = 0;
    for (int i = 0; i < n; ++i)
    {
        sd(x);
        if(x%2==1)
            ++ctr;
    }
    if(ctr%2==0)
        puts("YES");
    else
        puts("NO");
    return 0;
}   

Submission Info

Submission Time
Task A - Addition
User pulkit96
Language C++14 (GCC 5.4.1)
Score 300
Code Size 1123 Byte
Status AC
Exec Time 14 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main(int, const char**)’:
./Main.cpp:30:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     sd(n);
          ^
./Main.cpp:34:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         sd(x);
              ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 14
Set Name Test Cases
Sample sample1.txt, sample2.txt
All sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt
Case Name Status Exec Time Memory
in1.txt AC 14 ms 256 KB
in10.txt AC 14 ms 256 KB
in11.txt AC 2 ms 256 KB
in12.txt AC 2 ms 256 KB
in2.txt AC 14 ms 256 KB
in3.txt AC 14 ms 256 KB
in4.txt AC 14 ms 256 KB
in5.txt AC 14 ms 256 KB
in6.txt AC 14 ms 256 KB
in7.txt AC 14 ms 256 KB
in8.txt AC 14 ms 256 KB
in9.txt AC 14 ms 256 KB
sample1.txt AC 2 ms 256 KB
sample2.txt AC 2 ms 256 KB