submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s056991074 | p03807 | C++ | N = int(input())
A = list(map(int, input().split()))
for i in A:
if i%2 == 0:
A.remove(i)
ans = len(A)
if ans%2 == 0:
print("YES")
else:
print("NO") | a.cc:1:1: error: 'N' does not name a type
1 | N = int(input())
| ^
|
s376222568 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int j,odd=0,even=0;
for(int k = 0; k < N; k++){
cin >> j;
if(j % 2 = 0){
even++;
}
else{
odd++;
}
}
if(odd % 2 == 0){
cout << "YES" << endl;
}
else {
cout << "NO"<< endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:6: error: lvalue required as left operand of assignment
10 | if(j % 2 = 0){
| ~~^~~
|
s408014152 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int even = 0;
int odd = 0;
vector<int> A(N);
int temp;
for (int i = 0; i < N; ++i) {
cin >> temp;
if (temp % 2 == 0) { even++; }
if (temp % 2 != 0) { odd++; }
}
while (1) {
if (odd > 1) {
if (odd % 2 == 0) {
even += odd / 2;
odd = 0;
}
if (odd % 2 == 1) {
odd--;
even += odd / 2;
odd = 1;
}
}
if (odd == 0 || odd == 1) { break; }
}
while (1) {
if (even > 1) {
if (even % 2 == 0) {
even = even / 2;
}
if (even % 2 == 1) {
int a = (even - 1) / 2;
even -= a;
}
}
if (even =< 1 ) {
break;
}
}
int ans = even + odd;
if (ans == 1) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:45:19: error: expected primary-expression before '<' token
45 | if (even =< 1 ) {
| ^
|
s967931098 | p03807 | C++ | #include <bits/stdc++.h>
#define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
using namespace std;
int main() {
int N;
cin >> N;
int A[1000000050];
HAIRETU(<#N#>, <#A#>);
int cnt = 0;
for (int i = 0; i < N; i++) {
if (A[i] % 2 == 0) {
cnt++;
}
}
if (cnt % 2 == 0) {
cout << "NO" << endl;
} else cout << "YES" << endl;
return 0;
}
| a.cc:10:14: error: stray '#' in program
10 | HAIRETU(<#N#>, <#A#>);
| ^
a.cc:2:36: note: in definition of macro 'HAIRETU'
2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
| ^
a.cc:10:16: error: stray '#' in program
10 | HAIRETU(<#N#>, <#A#>);
| ^
a.cc:2:36: note: in definition of macro 'HAIRETU'
2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
| ^
a.cc:10:21: error: stray '#' in program
10 | HAIRETU(<#N#>, <#A#>);
| ^
a.cc:2:49: note: in definition of macro 'HAIRETU'
2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
| ^
a.cc:10:23: error: stray '#' in program
10 | HAIRETU(<#N#>, <#A#>);
| ^
a.cc:2:49: note: in definition of macro 'HAIRETU'
2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
| ^
a.cc: In function 'int main()':
a.cc:10:13: error: expected primary-expression before '<' token
10 | HAIRETU(<#N#>, <#A#>);
| ^
a.cc:2:36: note: in definition of macro 'HAIRETU'
2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
| ^
a.cc:2:37: error: expected primary-expression before ';' token
2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
| ^
a.cc:10:5: note: in expansion of macro 'HAIRETU'
10 | HAIRETU(<#N#>, <#A#>);
| ^~~~~~~
a.cc:10:20: error: expected primary-expression before '<' token
10 | HAIRETU(<#N#>, <#A#>);
| ^
a.cc:2:49: note: in definition of macro 'HAIRETU'
2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
| ^
a.cc: In lambda function:
a.cc:10:26: error: expected '{' before ';' token
10 | HAIRETU(<#N#>, <#A#>);
| ^
|
s152723878 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,count=0;
cin N;
vector<int> num(N);
for(int i=0; i<N; i++){
cin>>num.at(i);
}
for(int i=0; i<N; i++){
if(num.at(i) %2 ==1){
count ++;
}
}
if(count%2 ==1){
cout<< "No"<<endl;
}
else{
cout<<"Yes"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'N'
6 | cin N;
| ^~
| ;
|
s597902027 | p03807 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int N;
cin >> N;
vector A(N);
for(int i = 0; i < N; i++) cin >> A[i];
int oddcounter = 0;
for(int i = 0; i < N; i++){
if(A[i] % 2 == 1) oddcounter++;
}
if(oddcounter % 2 == 0) cout << "Yes";
else cout << "No";
} | a.cc: In function 'int main()':
a.cc:9:13: error: class template argument deduction failed:
9 | vector A(N);
| ^
a.cc:9:13: error: no matching function for call to 'vector(int&)'
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const _Alloc&)-> std::vector<_Tp, _Alloc>'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:7: note: template argument deduction/substitution failed:
a.cc:9:13: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
9 | vector A(N);
| ^
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::false_type)-> std::vector<_Tp, _Alloc>'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::true_type)-> std::vector<_Tp, _Alloc>'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: template argument deduction/substitution failed:
a.cc:9:13: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'int'
9 | vector A(N);
| ^
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: template argument deduction/substitution failed:
a.cc:9:13: note: mismatched types 'const std::vector<_Tp, _Alloc>' and 'int'
9 | vector A(N);
| ^
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Tp&, const _Alloc&)-> std::vector<_Tp, _Alloc>'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Alloc&)-> std::vector<_Tp, _Alloc>'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: template argument deduction/substitution failed:
a.cc:9:13: note: couldn't deduce template parameter '_Tp'
9 | vector A(N);
| ^
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const _Alloc&)-> std::vector<_Tp, _Alloc>'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: template argument deduction/substitution failed:
a.cc:9:13: note: couldn't deduce template parameter '_Tp'
9 | vector A(N);
| ^
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:428:11: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>)-> std::vector<_Tp, _Alloc>'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:428:11: note: template argument deduction/substitution failed:
a.cc:9:13: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'int'
9 | vector A(N);
| ^
/usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate: 'template<class _InputIterator, class _ValT, class _Allocator, class, class> std::vector(_InputIterator, _InputIterator, _Allocator)-> vector<_ValT, _Allocator>'
2033 | vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate expects 2 arguments, 1 provided
|
s211434314 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, ans; cin >> N;
long long a;
for (int i = 0; i<N; i++) {cin >> a; ans+=a%2}
if(ans%2==0) cout << "YES" << "\n";
else cout << "NO" << "\n";
}
| a.cc: In function 'int main()':
a.cc:7:48: error: expected ';' before '}' token
7 | for (int i = 0; i<N; i++) {cin >> a; ans+=a%2}
| ^
| ;
|
s702063090 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fw(p) for(int w=0;w<(p);w++)
#define fx(p) for(int x=0;x<(p);x++)
#define fy(p) for(int y=0;y<(p);y++)
#define fz(p) for(int z=0;z<(p);z++)
#define fyg(p,g) for(int y=(g);y<(p);y++)
#define fzg(p,g) for(int z=(g);z<(p);z++)
#define ce(d) cout<<d<<endl;
#define vecp(p) int aa;cin>>aa;(p).push_back(aa);
#define vecpl(p) long long aa;cin>>aa;(p).push_back(aa);
#define vecps(p) string aa;cin>>aa;(p).push_back(aa);
#define vecp2(p) cin>>aa;(p).push_back(aa);
#define vecpl2(p) long long a b;cin>>ab;(p).push_back(ab);
#define vecps2(p) string ab;cin>>ab;(p).push_back(ab);
#define set0(k,n) for(int nn=0;nn<(n);nn++){ (k).push_back(0); }
#define sorts(c) sort((c).begin(),(c).end());
#define reverses(c) reverse((c).begin(),(c).end());
#define vec(b) vector<int> (b);
#define vecl(b) vector<long long> (b);
#define vecs(b) vector<string> (b);
#define vecsize(b,size) vector<int> (b)((size));
#define pb(b,a) (b).push_back((a));
#define doublece(a,b) cout<<(a)<<' '<<(b)<<endl;
#define pairs(s) vector<pair<int,int>> (s);
#define pairsl(s) vector<pair<ll,ll>> (s);
#define pairss(s) vector<pair<string,string>> (s);
#define pairsp(s) int aa,bb;cin>>aa>>bb;(s).push_back(make_pair(aa,bb));
#define pairspl(s) ll aa,bb;cin>>aa>>bb;(s).push_back(make_pair(aa,bb));
#define pairsps(s) string aa,bb;cin>>aa>>bb;(s).push_back(make_pair(aa,bb));
#define pairsREV(s) (s).push_back(make_pair(bb,aa));
#define pairslREV(s) (s).push_back(make_pair(bb,aa));
#define pairssREV(s) (s).push_back(make_pair(bb,aa));
#define MOD 1000000007
int main() {
int N;
cin>>N;
int odd=0;
fx(N){
int a;
cin>>a;
if(a%2==1){
a++;
}
}
if(a%2==0){
ce("YES")
}else{
ce("NO")
}
}
| a.cc: In function 'int main()':
a.cc:50:4: error: 'a' was not declared in this scope
50 | if(a%2==0){
| ^
|
s049388830 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
cin >> n;
int cnto=0; cnte=0;
for(int i=0; i<n; i++){
int tmp;
cin >> tmp;
if(tmp%2==0)cnte++;
else cnto++;
}
if(cnto%2==1){
cout << "NO";
return 0;
}
if((cnto/2+cnte)%2==1){
cout << "NO";
return 0;
}
else cout << "YES";
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: 'cnte' was not declared in this scope; did you mean 'cnto'?
7 | int cnto=0; cnte=0;
| ^~~~
| cnto
|
s135901439 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
long long int a[n],even=0,,odd=0;
for(int i=0;i<n;i++){
cin>>a[i];
if(a[i]%2==0)
even++;
else odd++;
}
if(odd==1 || odd%2==0)
cout<<"YES";
else cout<<"NO";
} | a.cc: In function 'int main()':
a.cc:7:29: error: expected unqualified-id before ',' token
7 | long long int a[n],even=0,,odd=0;
| ^
|
s734580053 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int n,kisu=0,gusu=0;
cin >> n;
long long int a[i];
for (int i=0;i<n;i++){
cin >> a[i];
if(a[i]%2==1)kisu++;
else gusu++;
}
if (kisu%2==0)cout << "YES" <<endl;
else cout << "NO" <<endl;
} | a.cc: In function 'int main()':
a.cc:6:19: error: 'i' was not declared in this scope
6 | long long int a[i];
| ^
a.cc:8:12: error: 'a' was not declared in this scope
8 | cin >> a[i];
| ^
|
s877976089 | p03807 | C++ | #include<bits/stdc++.h>
const int maxn=1e5+7;
int main()
{
int n,a,cntj=0;
bool o=0;
scanf("%d",&n);
if(n==0)
{
printf("NO")
return 0;
}
for(int i=1;i<=n;i++)
{
scanf("%d",&a);
if(a&1)
cntj++;
else
o=1;
if(cntj==2)
o=1,cntj=0;
}
if(cntj&&o)
printf("NO");
else
printf("YES");
return 0;
} | a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before 'return'
10 | printf("NO")
| ^
| ;
11 | return 0;
| ~~~~~~
|
s186378317 | p03807 | C++ | #include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mood 1000000007
//vector<vector<int> > dp;
//vector<vector<vector<int> > > vvvi;
//dp=vector<vector<int> >(N, vector<int>(M,0));
//vector<pair<int,int> > v;
//v.push_back(make_pair(x,y));
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin>>N;
ll cnt=0;
REP(i,N){
int a;
cin>>a;
if(a%2==1)cnt++;
}
if(a%2==1)cout<<"NO"<<endl;
else cout<<"YES"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:42:12: error: 'a' was not declared in this scope
42 | if(a%2==1)cout<<"NO"<<endl;
| ^
|
s677043516 | p03807 | C++ | #include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mood 1000000007
//vector<vector<int> > dp;
//vector<vector<vector<int> > > vvvi;
//dp=vector<vector<int> >(N, vector<int>(M,0));
//vector<pair<int,int> > v;
//v.push_back(make_pair(x,y));
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin>>N;
REP(i,N){
int a;
cin>>a;
if(a%2==1)cnt++;
}
if(a%2==1)cout<<"NO"<<endl;
else cout<<"YES"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:39:27: error: 'cnt' was not declared in this scope; did you mean 'int'?
39 | if(a%2==1)cnt++;
| ^~~
| int
a.cc:41:12: error: 'a' was not declared in this scope
41 | if(a%2==1)cout<<"NO"<<endl;
| ^
|
s374768370 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[114514]; int n;
signed main() {
cin >> n;
rep(i, n)cin >> a[i];
int ans = 0;
rep(i, n) {
if (a[i] % 2 == 1)ans++;
}
if (ans % 2 == 1)puts("NO");
else puts("YES");
getchar(); getchar(); return 0;
}
| a.cc: In function 'int main()':
a.cc:6:13: error: 'i' was not declared in this scope
6 | rep(i, n)cin >> a[i];
| ^
a.cc:6:9: error: 'rep' was not declared in this scope
6 | rep(i, n)cin >> a[i];
| ^~~
|
s076093830 | p03807 | C++ | #include<bits/stdc++.h>
int a[114514]; int n;
signed main() {
cin >> n;
rep(i, n)cin >> a[i];
int ans = 0;
rep(i, n) {
if (a[i] % 2 == 1)ans++;
}
if (ans % 2 == 1)puts("NO");
else puts("YES");
getchar(); getchar(); return 0;
} | a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin >> n;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:13: error: 'i' was not declared in this scope
5 | rep(i, n)cin >> a[i];
| ^
a.cc:5:9: error: 'rep' was not declared in this scope
5 | rep(i, n)cin >> a[i];
| ^~~
|
s883074519 | p03807 | C | #include<stdio.h>int main(){
long n,a,c=0;
scanf("%ld",&n);
while(n-->0){
scanf("%ld",&a);
c+=a%2;
}
if(c%2==0)puts("YES");
else if(n%2==1)puts("YES");
else puts("NO");
return 0;
} | main.c:1:18: warning: extra tokens at end of #include directive
1 | #include<stdio.h>int main(){
| ^~~
main.c:3:7: error: expected declaration specifiers or '...' before string constant
3 | scanf("%ld",&n);
| ^~~~~
main.c:3:13: error: expected declaration specifiers or '...' before '&' token
3 | scanf("%ld",&n);
| ^
main.c:4:1: error: expected identifier or '(' before 'while'
4 | while(n-->0){
| ^~~~~
main.c:8:1: error: expected identifier or '(' before 'if'
8 | if(c%2==0)puts("YES");
| ^~
main.c:9:1: error: expected identifier or '(' before 'else'
9 | else if(n%2==1)puts("YES");
| ^~~~
main.c:10:1: error: expected identifier or '(' before 'else'
10 | else puts("NO");
| ^~~~
main.c:11:1: error: expected identifier or '(' before 'return'
11 | return 0;
| ^~~~~~
main.c:12:1: error: expected identifier or '(' before '}' token
12 | }
| ^
|
s662462218 | p03807 | C | #include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");return 0;} | main.c:1:18: warning: extra tokens at end of #include directive
1 | #include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");return 0;}
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s262541386 | p03807 | C | #include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");} | main.c:1:18: warning: extra tokens at end of #include directive
1 | #include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");}
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s639583650 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pll;
#define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
#define REP(i, n) FOR(i, n, 0)
#define OF64 std::setprecision(10)
const ll MOD = 1000000007;
const ll INF = (ll)1e15;
ll A[100005];
int main()
{
int N;
cin >> N;
int on = 0 REP(i, N)
{
cin >> A[i];
if (A[i] % 2 == 1)
on++;
}
if (on % 2 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: error: expected ',' or ';' before 'for'
7 | #define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
| ^~~
a.cc:8:19: note: in expansion of macro 'FOR'
8 | #define REP(i, n) FOR(i, n, 0)
| ^~~
a.cc:20:16: note: in expansion of macro 'REP'
20 | int on = 0 REP(i, N)
| ^~~
a.cc:20:20: error: 'i' was not declared in this scope
20 | int on = 0 REP(i, N)
| ^
a.cc:7:41: note: in definition of macro 'FOR'
7 | #define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
| ^
a.cc:20:16: note: in expansion of macro 'REP'
20 | int on = 0 REP(i, N)
| ^~~
|
s128217960 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N,a[1000000000,sum];
cin >> N;
for (int i=0; i<N; ++i) {
cin >> a[i];
sum += a[i];
}
if (sum%2==0) cout << "YES" << endl;
else cout << "NO" <<endl;
}
| a.cc: In function 'int main()':
a.cc:5:23: error: expected ']' before ',' token
5 | int N,a[1000000000,sum];
| ^
| ]
a.cc:5:27: error: expected initializer before ']' token
5 | int N,a[1000000000,sum];
| ^
a.cc:8:16: error: 'a' was not declared in this scope
8 | cin >> a[i];
| ^
a.cc:9:9: error: 'sum' was not declared in this scope
9 | sum += a[i];
| ^~~
a.cc:11:9: error: 'sum' was not declared in this scope
11 | if (sum%2==0) cout << "YES" << endl;
| ^~~
|
s281552238 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N,a[1000000000];
cin >> N;
for (int i=0; i<N; ++i) cin >> a[i];
for (int i=0; i<N; ++i) int sum += a[i];
if (sum%2==0) cout << "YES" << endl;
else cout << "NO" <<endl;
}
| a.cc: In function 'int main()':
a.cc:8:37: error: expected initializer before '+=' token
8 | for (int i=0; i<N; ++i) int sum += a[i];
| ^~
a.cc:9:9: error: 'sum' was not declared in this scope
9 | if (sum%2==0) cout << "YES" << endl;
| ^~~
|
s056210804 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N,a[1000000000];
cin >> N;
for (int i=0; i<N; ++i) cin >> a[i];
int counter =0;
if (a[i]%2!=0) ++counter;
if (counter%2==0) cout << "YES" << endl;
else cout << "NO" <<endl;
} | a.cc: In function 'int main()':
a.cc:9:11: error: 'i' was not declared in this scope
9 | if (a[i]%2!=0) ++counter;
| ^
|
s462699205 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector <int> A(N);
for (int i = 0; i < N; i++)
cin >> A.at(i);
int x = 0;
for (int i = 0; i < N; i++) {
if (A.at(i) % 2 = 0) {}
else
x++;
}
if (x % 2 = 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:12:17: error: lvalue required as left operand of assignment
12 | if (A.at(i) % 2 = 0) {}
| ~~~~~~~~^~~
a.cc:16:9: error: lvalue required as left operand of assignment
16 | if (x % 2 = 0)
| ~~^~~
|
s414370790 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector <int> A(N);
for (int i = 0; i < N; i++;)
cin >> A.at(i);
int x = 0;
for (int i = 0; i < N; i++;) {
if (A.at(i) % 2 = 0) {}
else
x++;
}
if (x % 2 = 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:8:29: error: expected ')' before ';' token
8 | for (int i = 0; i < N; i++;)
| ~ ^
| )
a.cc:8:30: error: expected primary-expression before ')' token
8 | for (int i = 0; i < N; i++;)
| ^
a.cc:11:29: error: expected ')' before ';' token
11 | for (int i = 0; i < N; i++;) {
| ~ ^
| )
a.cc:11:30: error: expected primary-expression before ')' token
11 | for (int i = 0; i < N; i++;) {
| ^
a.cc:16:9: error: lvalue required as left operand of assignment
16 | if (x % 2 = 0)
| ~~^~~
|
s084395146 | p03807 | C++ | #include<iostream>
#include<algorithm>
#include<map>
#include<set>
#include<string>
#include<vector>
using namespace std;
using ll = long long;
using lli = long long int;
ll MM = 1000000000;
ll mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
signed main(){
ll n; cin >> n;
ll a[100001];
ll sum = 0;
string ans = "YES";
vector<ll> b(n), c(n);
for(ll i = 0; i < n; i++){
cin >> a[i];
sum += a[i];
}
if(a[i]%2 != 0) ans = "NO";
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:24:10: error: 'i' was not declared in this scope
24 | if(a[i]%2 != 0) ans = "NO";
| ^
|
s215590392 | p03807 | C++ | #include <bits/stdc++.h>
//author:tourist
//date:2018/11/17
//titile:AGC 010 E
using namespace std;
const int N = 2010;
const int NN = 2010;
unsigned long long one = 1;
unsigned long long g[N][NN];
unsigned long long was[NN];
bool alive[N];
bool can_put[N];
int a[N];
int x[N];
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", a + i);
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
if (__gcd(a[i], a[j]) > 1) {
g[i][j >> 6] |= (one << (j & 63));
g[j][i >> 6] |= (one << (i & 63));
}
int nn = ((n - 1) >> 6) + 1;
for (int i = 0; i < n; i++) {
alive[i] = true;
can_put[i] = true;
}
for (int it = 0; it < n; it++)
for (int i = 0; i < nn; i++) {
was[i] = 0;
}
for (int i = 0; i < n; i++)
if (!alive[i])
was[i >> 6] |= (one << (i & 63));
int best = -1;
for (int i = 0; i < n; i++) {
if (was[i >> 6] & (one << (i & 63)))
continue;
int b = 0, e = 1;
x[0] = i;
was[i >> 6] |= (one << (i & 63));
while (b < e) {
for (int j = 0; j < nn; j++)
if ((g[x[b]][j] & was[j]) != g[x[b]][j])
for (int u = j * 64; u < (j + 1) * 64; u++)
if (g[x[b]][u >> 6] & (one << (u & 63)))
if (!(was[u >> 6] & (one << (u & 63)))) {
was[u >> 6] |= (one << (u & 63));
x[e++] = u;
}
b++;
}
int cur = -1;
for (int j = 0; j < e; j++) {
if (!can_put[x[j]])
continue;
if (cur == -1 || a[x[j]] < a[cur])
cur = x[j];
}
if (best == -1 || (cur != -1 && a[cur] > a[best]))
best = cur;
}
if (it > 0) putchar(' ');
printf("%d", a[best]);
alive[best] = false;
for (int i = 0; i < n; i++) {
if (!alive[i])
continue;
if (g[best][i >> 6] & (one << (i & 63)))
can_put[i] = true;
else {
if (a[best] < a[i])
can_put[i] = false;
}
}
}
printf("\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:77:9: error: 'it' was not declared in this scope; did you mean 'i'?
77 | if (it > 0) putchar(' ');
| ^~
| i
|
s326902209 | p03807 | C++ | #include<bits/stdc++.h>
int main() {
int N,A[100010],ans=0 ;
for (int i = 0; i < 100010; i++) {
A[i] = 0;
}
for (int i = 0; i < N; i++) {
cin >> A[i];
}
for (int i = 0; i < N; i++) {
if (A[i] % 2 != 0) {
ans++;
}
}
if (ans % 2 == 0) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> A[i];
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:16:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
16 | cout << "YES" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:16:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
16 | cout << "YES" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:19:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
19 | cout << "NO" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:19:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
19 | cout << "NO" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s591013075 | p03807 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
using namespace std;
int main(){
int n;
cin >> n;
int a[n];
rep(i,n)cin >> a[i];
int count++;
rep(i,n){
if(a[i]%2==1)count++;
}
if(count%2==1)cout << "NO" << endl;
else cout << "YES" << endl;
return 0;} | a.cc: In function 'int main()':
a.cc:30:16: error: expected initializer before '++' token
30 | int count++;
| ^~
a.cc:32:26: error: no post-increment operator for type
32 | if(a[i]%2==1)count++;
| ^~
a.cc:34:15: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator%'
34 | if(count%2==1)cout << "NO" << endl;
| ~~~~~^~
|
s670907215 | p03807 | C++ | #include<iostream>
using namespace std;
int n;
int a[100001];
int main(){
cin>>n;
int ans=0;
for(int i=0; i<n;i++){
cin>>a[i];
ans=(ans+a[i])%2;
}
if(ans) cout<<"NO"<<endl;
else cout<<"YES"<<endl;
return 0; | a.cc: In function 'int main()':
a.cc:15:10: error: expected '}' at end of input
15 | return 0;
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s848622881 | p03807 | C++ | <iostream>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <math.h>
#include <vector>
using namespace std;
int main() {
int N;
long int tmp;
int e_num=0, o_num=0;
int i;
cin >> N;
for(i=0; i<N; i++){
scanf("%ld",&tmp);
if(tmp%2) o_num++;
else e_num++;
}
if(o_num%2==0 || N==1){
cout << "YES" <<endl;
}else{
cout << "NO" <<endl;
}
return 0;
}
| a.cc:1:2: error: expected unqualified-id before '<' token
1 | <iostream>
| ^
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/bits/stl_algo.h:71,
from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/stdlib.h:98:8: error: 'size_t' does not name a type
98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
| ^~~~~~
/usr/include/stdlib.h:42:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
41 | # include <bits/waitstatus.h>
+++ |+#include <cstddef>
42 |
/usr/include/stdlib.h:278:36: error: 'size_t' has not been declared
278 | extern int strfromd (char *__dest, size_t __size, const char *__format,
| ^~~~~~
/usr/include/stdlib.h:282:36: error: 'size_t' has not been declared
282 | extern int strfromf (char *__dest, size_t __size, const char *__format,
| ^~~~~~
/usr/include/stdlib.h:286:36: error: 'size_t' has not been declared
286 | extern int strfroml (char *__dest, size_t __size, const char *__format,
| ^~~~~~
/usr/include/stdlib.h:298:38: error: 'size_t' has not been declared
298 | extern int strfromf32 (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:304:38: error: 'size_t' has not been declared
304 | extern int strfromf64 (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:310:39: error: 'size_t' has not been declared
310 | extern int strfromf128 (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:316:39: error: 'size_t' has not been declared
316 | extern int strfromf32x (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:322:39: error: 'size_t' has not been declared
322 | extern int strfromf64x (char *__dest, size_t __size, const char * __format,
| ^~~~~~
In file included from /usr/include/stdlib.h:514:
/usr/include/x86_64-linux-gnu/sys/types.h:33:9: error: '__u_char' does not name a type
33 | typedef __u_char u_char;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:34:9: error: '__u_short' does not name a type
34 | typedef __u_short u_short;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:35:9: error: '__u_int' does not name a type
35 | typedef __u_int u_int;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:36:9: error: '__u_long' does not name a type
36 | typedef __u_long u_long;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:37:9: error: '__quad_t' does not name a type
37 | typedef __quad_t quad_t;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:38:9: error: '__u_quad_t' does not name a type
38 | typedef __u_quad_t u_quad_t;
| ^~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:39:9: error: '__fsid_t' does not name a type
39 | typedef __fsid_t fsid_t;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:42:9: error: '__loff_t' does not name a type; did you mean '__locale_t'?
42 | typedef __loff_t loff_t;
| ^~~~~~~~
| __locale_t
/usr/include/x86_64-linux-gnu/sys/types.h:47:9: error: '__ino_t' does not name a type
47 | typedef __ino_t ino_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:54:9: error: '__ino64_t' does not name a type
54 | typedef __ino64_t ino64_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:59:9: error: '__dev_t' does not name a type
59 | typedef __dev_t dev_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:64:9: error: '__gid_t' does not name a type
64 | typedef __gid_t gid_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:69:9: error: '__mode_t' does not name a type; did you mean '__locale_t'?
69 | typedef __mode_t mode_t;
| ^~~~~~~~
| __locale_t
/usr/include/x86_64-linux-gnu/sys/types.h:74:9: error: '__nlink_t' does not name a type
74 | typedef __nlink_t nlink_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:79:9: error: '__uid_t' does not name a type
79 | typedef __uid_t uid_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:97:9: error: '__pid_t' does not name a type
97 | typedef __pid_t pid_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:103:9: error: '__id_t' does not name a type
103 | typedef __id_t id_t;
| ^~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:114:9: error: '__daddr_t' does not name a type
114 | typedef __daddr_t daddr_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:115:9: error: '__caddr_t' does not name a type
115 | typedef __caddr_t caddr_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:121:9: error: '__key_t' does not name a type
121 | typedef __key_t key_t;
| ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:126:
/usr/include/x86_64-linux-gnu/bits/types/clock_t.h:7:9: error: '__clock_t' does not name a type
7 | typedef __clock_t clock_t;
| ^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:128:
/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h:7:9: error: '__clockid_t' does not name a type
7 | typedef __clockid_t clockid_t;
| ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:129:
/usr/include/x86_64-linux-gnu/bits/types/time_t.h:10:9: error: '__time_t' does not name a type
10 | typedef __time_t time_t;
| ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:130:
/usr/include/x86_64-linux-gnu/bits/types/timer_t.h:7:9: error: '__timer_t' does not name a type
7 | typedef __timer_t timer_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:134:9: error: '__useconds_t' does not name a type
134 | typedef __useconds_t useconds_t;
| ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:138:9: error: '__suseconds_t' does not name a type
138 | typedef __suseconds_t suseconds_t;
| ^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:155:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:24:9: error: '__int8_t' does not name a type; did you mean '__int128_t'?
24 | typedef __int8_t int8_t;
| ^~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:25:9: error: '__int16_t' does not name a type; did you mean '__int128_t'?
25 | typedef __int16_t int16_t;
| ^~~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:9: error: '__int32_t' does not name a type; did you mean '__int128_t'?
26 | typedef __int32_t int32_t;
| ^~~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:9: error: '__int64_t' does not name a type; did you mean '__int128_t'?
27 | typedef __int64_t int64_t;
| ^~~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/sys/types.h:158:9: error: '__uint8_t' does not name a type; did you mean '__uint128_t'?
158 | typedef __uint8_t u_int8_t;
| ^~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:159:9: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
159 | typedef __uint16_t u_int16_t;
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:160:9: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
160 | typedef __uint32_t u_int32_t;
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:161:9: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
161 | typedef __uint64_t u_int64_t;
| ^~~~~~~~~~
| __uint128_t
In file included from /usr/include/endian.h:35,
from /usr/include/x86_64-linux-gnu/sys/types.h:176:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:33:17: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
33 | static __inline __uint16_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/byteswap.h:48:17: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
48 | static __inline __uint32_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/byteswap.h:69:31: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
69 | __extension__ static __inline __uint64_t
| ^~~~~~~~~~
| __uint128_t
In file included from /usr/include/endian.h:36:
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:32:17: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
32 | static __inline __uint16_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:38:17: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
38 | static __inline __uint32_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:44:17: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
44 | static __inline __uint64_t
| ^~~~~~~~~~
| __uint128_t
In file included from /usr/include/x86_64-linux-gnu/sys/select.h:37,
from /usr/include/x86_64-linux-gnu/sys/types.h:179:
/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:14:3: error: '__time_t' does not name a type; did you mean '__sigset_t'?
14 | __time_t tv_sec; /* Seconds. */
|
s141726211 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t,n,i;
cin>>n;
vector<int> v(n,0);
for(i=0;i<n;i++)
cin>>v[i];
int cnt=0;
for(i=0;i<n;i++)
{
if(v[i] %2 ==0)
cnt++;
}
if(cnt&1)
cout<<"First\n";
else
cout<<"Second\n";
/*if(n==3 || n==4 )
cout<<"First\n";
else if(n%3 || n%5)
cout<<"Second\n";
else
cout<<"First\n";
return 0;
} | a.cc:22:9: error: unterminated comment
22 | /*if(n==3 || n==4 )
| ^
a.cc: In function 'int main()':
a.cc:21:30: error: expected '}' at end of input
21 | cout<<"Second\n";
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s827194420 | p03807 | C++ | n = input()
v = map(int, raw_input().split(' '))
if sum([i % 2 for i in v]) % 2 == 0:
print "YES"
else:
print "NO" | a.cc:1:1: error: 'n' does not name a type
1 | n = input()
| ^
|
s198606698 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,odd=0,N;
cin >> N;
for(int i=0;i<N:i++){
cin >> a;
if(a%2==1){odd++;}
}
if(odd%2==1){cout << "NO" << endl;}
else{cout << "YES" << endl;}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
7 | for(int i=0;i<N:i++){
| ^
a.cc:7:18: error: found ':' in nested-name-specifier, expected '::'
7 | for(int i=0;i<N:i++){
| ^
| ::
a.cc:7:17: error: 'N' is not a class, namespace, or enumeration
7 | for(int i=0;i<N:i++){
| ^
a.cc:11:3: error: expected primary-expression before 'if'
11 | if(odd%2==1){cout << "NO" << endl;}
| ^~
a.cc:10:4: error: expected ';' before 'if'
10 | }
| ^
| ;
11 | if(odd%2==1){cout << "NO" << endl;}
| ~~
a.cc:11:3: error: expected primary-expression before 'if'
11 | if(odd%2==1){cout << "NO" << endl;}
| ^~
a.cc:10:4: error: expected ')' before 'if'
10 | }
| ^
| )
11 | if(odd%2==1){cout << "NO" << endl;}
| ~~
a.cc:7:6: note: to match this '('
7 | for(int i=0;i<N:i++){
| ^
|
s646803091 | p03807 | C++ | #include<iostream>
using namespace std;
int main()
{
int n,sum=0;
cin>>n;
for(int i=1;i<=n;++i){
int a;
cin>>a;
sun+=a;
}
cout<<(sum&1)?"NO":"YES"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:1: error: 'sun' was not declared in this scope; did you mean 'sum'?
10 | sun+=a;
| ^~~
| sum
a.cc:12:29: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
12 | cout<<(sum&1)?"NO":"YES"<<endl;
| ~~~~~^~~~~~
|
s637503879 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int n,k[112345];
cin>>n;
for(int i=0;i<n;i++){
cin>>k[i];
sum+=k[i];
}
if(sum%2==0) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'sum' was not declared in this scope
8 | sum+=k[i];
| ^~~
a.cc:10:6: error: 'sum' was not declared in this scope
10 | if(sum%2==0) cout<<"YES"<<endl;
| ^~~
|
s508800694 | p03807 | C++ | #include <bits/stdc++.h>
#define pb push_back
#define REP(i, n) for (signed long long i = 0; i < (n); i++)
#define MOD 1000000007
#define bitcnt(a) (ll) __builtin_popcount((a))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main() {
ll n, cnt = 0;
cin >> n;
REP(i, n) {
ll h;
cin >> h;
cnt += (h % 2);
}
cout << (h % 2 ? "NO" : "YES") << endl;
}
| a.cc: In function 'int main()':
a.cc:18:12: error: 'h' was not declared in this scope
18 | cout << (h % 2 ? "NO" : "YES") << endl;
| ^
|
s522720160 | p03807 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<utility>
typedef long long int ll;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<signed(n);i++)
#define EREP(i,n) for(int i=1;i<=signed(n);i++)
#define ALL(a) (a).begin(),(a).end()
using std::cout;
using std::vector;
using std::endl;
using std::cin;
using std::string;
//#define EVEL 1
#ifdef EVEL
#define DEB(X) cout << #X << ":" <<X<<" " ;
#define TF(f) f ? cout<<"true " : cout<<"false ";
#define END cout<<"\n";
#else
#define DEB(X) {}
#define TF(f) {}
#define END {}
#endif
constexpr int MOD = 1000000007;
constexpr ll INF = 50000000000000000;
typedef std::pair<int,int> P;
constexpr ll SIZE= 100010;
ll N,A[100010],B[SIZE];
ll ans=0,sum=0,wa=0;
int main() {
std::ios_base::sync_with_stdio(false);
cin>>N;
REP(i,N){
cin>>A[i];
sum+=A[i];
wa+=i+1;
}
REP(i,N){
B[i]=A[(i+1)%N]-A[i];
}
bool f=true,g=true;
if(sum%wa!=0)g=false;
REP(i,N){
B[i]-=sum/wa;
}
int cnt=0;
REP(i,N){
if(B[(i+1)%N]-B[i]==-N)cnt++;
else if(B[(i+1)%N]-B[i]!=0&&B[(i+1)%N]-B[i]=!N)f=false;
}
if(cnt!=sum/wa)f=false;
cout<<(f&&g?"YES":"NO")<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:58:35: error: lvalue required as left operand of assignment
58 | else if(B[(i+1)%N]-B[i]!=0&&B[(i+1)%N]-B[i]=!N)f=false;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s196996893 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
for(int i = 1;i <= n; i++) {
int x;
cin >> x;
if(x % 2 == 1) cnt ++;
}
if(cnt % 2 == 1) cout << "YES";
else cout << "NO";
return 0;
} | a.cc: In function 'int main()':
a.cc:13:16: error: 'cnt' was not declared in this scope; did you mean 'int'?
13 | if(x % 2 == 1) cnt ++;
| ^~~
| int
a.cc:15:4: error: 'cnt' was not declared in this scope; did you mean 'int'?
15 | if(cnt % 2 == 1) cout << "YES";
| ^~~
| int
|
s410131800 | p03807 | C++ | #pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include<iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll,ll>
const int N = 30000;
const int INF = int(2e9);
const int MOD = int(1e9) + 7;
string s;
int main()
{
freopen("debug.txt","w",stderr);
int n,a[200100];
cin>> n;
int cnt = 0;
for(int i = 1;i <= n;i ++) {
cin >>a[i];
if(a[i] % 2 == 1) {
++ cnt;
}
}
if(cnt % 2 == 0) {
cout <<"YES";
}
else {
cout<< "NO";
}
return 0;
}
Ещё | a.cc:49:1: error: '\U00000415\U00000449\U00000451' does not name a type
49 | Ещё
| ^~~
|
s647173855 | p03807 | C++ | #pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <stdio.h>
#include <string>
#include <bits/stdc++.h>
#include <x86intrin.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll,ll>
const int N = 30000;
const int INF = int(2e9);
const int MOD = int(1e9) + 7;
string s;
int main()
{
freopen("debug.txt","w",stderr);
int n,a[200100];
cin >> n;
int cnt = 0;
for(int i = 1;i <= n;i ++) {
cin >> a[i];
if(a[i] % 2 == 1) {
++ cnt;
}
}
if(cnt % 2 == 0) {
cout << "YES";
}
else {
cout << "NO";
}
return 0;
} | In file included from /usr/include/c++/14/string:43,
from a.cc:6:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
182 | ~allocator() _GLIBCXX_NOTHROW { }
| ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
186 | struct _Alloc_hider : allocator_type // TODO check __is_final
| ^~~~~~~~~~~~
|
s609434578 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
vector<int> vec (N);
int count = 0;
for(int i = 0;i<N;i++){
cin >> vec.at(i);
if(vec.at(i) % 2 = 1){
count++;
}
}
if(count % 2 = 1){
cout << "NO" << endl;
}
else{
cout << "YES" << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:30: error: lvalue required as left operand of assignment
11 | if(vec.at(i) % 2 = 1){
| ~~~~~~~~~~^~~
a.cc:15:18: error: lvalue required as left operand of assignment
15 | if(count % 2 = 1){
| ~~~~~~^~~
|
s248277069 | p03807 | C++ | #include <iostream>
using namespace std;
int n, sum = 0;
int main(void){
// Your code here!
cin >> n;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
sum += a;
}
if (sum % 2 == 0) cout << "YES" << endl;
else (sum % 2 == 1) cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 'cout'
13 | else (sum % 2 == 1) cout << "NO" << endl;
| ^~~~~
| ;
|
s692401163 | p03807 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int A[100000];
for(int i=0;i<n;i++) cin>>A[i];
for(int i=0;i<n;i++) A[i]=A[i]%2;
int num[2];
for(int i=0;i<n;i++) num[A[i]]++;
if(num[1]%2==1) cout<<"YES"
else cout<<"NO"
} | a.cc: In function 'int main()':
a.cc:14:32: error: expected ';' before 'else'
14 | if(num[1]%2==1) cout<<"YES"
| ^
| ;
15 | else cout<<"NO"
| ~~~~
|
s091533392 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int llint;
int main(){
int n, a, i;
ll ans=0;
bool can=false;
cin>>n;
for(i=0; i<n; i++){
cin>>a;
if(a%2==0) ans+=2;
else ans++;
}
while(ans>0){
if(ans==1){
can=true;
break;
}
if(ans%2==0) ans/=2;
else break;
}
can ? cout<<"YES"<<endl : cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'll' was not declared in this scope
7 | ll ans=0;
| ^~
a.cc:12:28: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | if(a%2==0) ans+=2;
| ^~~
| abs
a.cc:13:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | else ans++;
| ^~~
| abs
a.cc:15:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | while(ans>0){
| ^~~
| abs
|
s635233217 | p03807 | C++ | #include <iostream>
using namespace std;
int a,n,cnt=0;
int main(){
cin>>n;
for(int i=-1;++i-n;){
cin>>a;
if(a&1)cnt=cnt&1?0:1;
}
cout<<(cnt&1)?"No":"Yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:10:27: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
10 | cout<<(cnt&1)?"No":"Yes"<<endl;
| ~~~~~^~~~~~
|
s093601314 | p03807 | C++ | #include <iostream>
using namespace std;
int a,n,cnt=0;
int main(){
cin>>n;
for(int i=-1;++i-n;){
cin>>a;
if(a&1)cnt=cnt&1?0:1;
}
cout<<cnt&1?"No":"Yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:10:12: error: no match for 'operator&' (operand types are 'std::basic_ostream<char>' and 'int')
10 | cout<<cnt&1?"No":"Yes"<<endl;
| ~~~~~~~~~^~
| | |
| | int
| std::basic_ostream<char>
a.cc:10:12: note: candidate: 'operator&(int, int)' (built-in)
10 | cout<<cnt&1?"No":"Yes"<<endl;
| ~~~~~~~~~^~
a.cc:10:12: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)'
141 | operator&(byte __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:141:18: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::byte'
141 | operator&(byte __l, byte __r) noexcept
| ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:84:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:134:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:181:26: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~^~~
a.cc:10:25: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
10 | cout<<cnt&1?"No":"Yes"<<endl;
| ~~~~~^~~~~~
|
s930170676 | p03807 | C++ | #include <iostream>
int a,n,cnt=0;
int main(){
cin>>n;
for(int i=-1;++i-n;){
cin>>a;
if(a&1)cnt=cnt&1?0:1;
}
cout<<cnt&1?"No":"Yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout<<cnt&1?"No":"Yes"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout<<cnt&1?"No":"Yes"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s235501458 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
#define ll long long
| a.cc: In function 'int main()':
a.cc:4:2: error: expected '}' at end of input
4 | {
| ~^
|
s215051014 | p03807 | C++ | #include<iostream>
int main(){
}
return 0;
| a.cc:4:1: error: expected unqualified-id before 'return'
4 | return 0;
| ^~~~~~
|
s422135920 | p03807 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n, a[100010];
cin >> n;
for (int i = 0; i < n; i++) cin >> a[i];
int sum = 0;
for (auto i : a) sum += a;
cout << (sum % 2 ? "NO" : "YES") << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:26: error: invalid conversion from 'int*' to 'int' [-fpermissive]
13 | for (auto i : a) sum += a;
| ~~~~^~~~
| |
| int*
|
s759061327 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
using ll=long long;
using vi=vector<int>;
using pii=pair<int,int>;
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)
#define ITR(i,b,e) for(auto i=(b);i!=(e);++i)
#define FORE(x,c) for(auto &x:c)
#define REPF(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define REP(i,n) REPF(i,0,n)
#define REPR(i,n) for(int i=(int)(n);i>=0;--i)
#define SZ(c) ((int)c.size())
#define CONTAIN(c,x) (c.find(x)!=end(c))
#define OUTOFRANGE(y,x,h,w) (y<0||x<0||y>=h||x>=w)
#define dump(...)
#ifdef int
#define INF 1001001001001001001LL
#define stoi stoll
#else
#define INF 1001001001
signed main() {
int n=IN;
int cnt=0;
REP(i,n) {
int a=IN;
cnt+=a%2;
}
cout<<(cnt%2==0?"YES":"NO")<<endl;
return 0;
}
| a.cc:18: error: unterminated #else
18 | #ifdef int
|
s898259895 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
int a;
int cnt=0;
cin >> n;
for(int i = 0; i<n; i++){
cin >> a;
if(a%2) cnt++;
}
if(cnt%2) cout << “NO” << endl;
else cout << “YES” << endl;
return 0;
} | a.cc:15:21: error: extended character “ is not valid in an identifier
15 | if(cnt%2) cout << “NO” << endl;
| ^
a.cc:15:21: error: extended character ” is not valid in an identifier
a.cc:16:16: error: extended character “ is not valid in an identifier
16 | else cout << “YES” << endl;
| ^
a.cc:16:16: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:15:21: error: '\U0000201cNO\U0000201d' was not declared in this scope
15 | if(cnt%2) cout << “NO” << endl;
| ^~~~
a.cc:16:16: error: '\U0000201cYES\U0000201d' was not declared in this scope
16 | else cout << “YES” << endl;
| ^~~~~
|
s345388330 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int odd = 0;
for(int i = 0; i < N; i++){
int a;
cin >> a:
if(a % 2 == 1){
odd++;
}
}
if(odd%2 == 1){
cout << "NO" << endl;
} else {
cout << "YES" << endl;}
} | a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before ':' token
9 | cin >> a:
| ^
| ;
|
s989417707 | p03807 | C++ | #!/usr/bin/env python3
N = int(input())
A = list(map(int, input().split()))
cnt = 0
for a in A:
cnt += a % 2
print('YES' if (cnt % 2 == 0) else 'NO')
| a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python3
| ^
a.cc:10:7: warning: multi-character character constant [-Wmultichar]
10 | print('YES' if (cnt % 2 == 0) else 'NO')
| ^~~~~
a.cc:10:36: warning: multi-character character constant [-Wmultichar]
10 | print('YES' if (cnt % 2 == 0) else 'NO')
| ^~~~
a.cc:3:1: error: 'N' does not name a type
3 | N = int(input())
| ^
|
s237631978 | p03807 | C++ | int main()
{
cout << "YES";
return 0;
} | a.cc: In function 'int main()':
a.cc:3:3: error: 'cout' was not declared in this scope
3 | cout << "YES";
| ^~~~
|
s086079620 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int oddnumbers = 0;
for(int i = 0; i < N; i++){
int input;
cin >> input;
if(input % 2 == 1){
oddnumbers++;
}
}
if(addnumbers % 2 == 0){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:12: error: 'addnumbers' was not declared in this scope; did you mean 'oddnumbers'?
15 | if(addnumbers % 2 == 0){
| ^~~~~~~~~~
| oddnumbers
|
s775333817 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
oddnumbers = 0;
for(int i = 0; i < N; i++){
int input;
cin >> input;
if(input % 2 == 1){
oddnumbers++;
}
}
if(addnumbers % 2 == 0){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'oddnumbers' was not declared in this scope
7 | oddnumbers = 0;
| ^~~~~~~~~~
a.cc:15:12: error: 'addnumbers' was not declared in this scope
15 | if(addnumbers % 2 == 0){
| ^~~~~~~~~~
|
s855133389 | p03807 | C++ | int main() {
long long int n, a[100000], k = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] % 2 == 1) {
k++;
}
}
if (k % 2 == 0) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
3 | cin >> n;
| ^~~
a.cc:11:17: error: 'cout' was not declared in this scope
11 | cout << "YES" << endl;
| ^~~~
a.cc:11:34: error: 'endl' was not declared in this scope
11 | cout << "YES" << endl;
| ^~~~
a.cc:14:17: error: 'cout' was not declared in this scope
14 | cout << "NO" << endl;
| ^~~~
a.cc:14:33: error: 'endl' was not declared in this scope
14 | cout << "NO" << endl;
| ^~~~
|
s392908482 | p03807 | Java |
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N=in.nextInt();
int sum=0;
for (int i = 0; i < N; i++) {
if (in.nextInt()%2==1) {
sum++;
}
}
if(sum%2==0) System.out.println("YES");
else System.out.println("NO");
}
} | Main.java:4: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
1 error
|
s645630505 | p03807 | Java |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N=in.nextInt();
int sum=0;
for (int i = 0; i < N; i++) {
if (in.nextInt()%2==1) {
sum++;
}
}
if(sum%2==0) System.out.println("YES");
else System.out.println("NO");
}
}
}
| Main.java:20: error: class, interface, enum, or record expected
}
^
1 error
|
s952789378 | p03807 | C++ | n = input()
A = map(int, raw_input().strip().split())
A = filter(lambda x: x % 2 == 1, A)
m = len(A)
print "YES" if (m % 2 == 0) else "NO"
| a.cc:1:1: error: 'n' does not name a type
1 | n = input()
| ^
|
s464749127 | p03807 | C++ | #include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<iostream>
#define N 3100
#define inf (1e9)+1
using namespace std;
struct node{int y,nex;}a[2*N];
int f[N],g[N],n,fir[N],len,d[N],num,A[N];
void ins(int x,int y)
{
a[++len].y=y;a[len].nex=fir[x];fir[x]=len;
}
void dfs(int x,int fa)
{
f[x]=d[x];
for(int k=fir[x];k;k=a[k].nex)
{
int y=a[k].y;
if(y==fa) continue;
dfs(y,x);
if(d[x]>f[y]) f[x]=inf;
}
}
void dp(int x,int fa)
{
int cnt=0;
for(int k=fir[x];k;k=a[k].nex)
{
int y=a[k].y;
if(y==fa) continue;
if(d[x]>f[y]) cnt++;
}
if(d[x]>g[fa]) cnt++;
if(cnt) A[++num]=x;
for(int k=fir[x];k;k=a[k].nex)
{
int y=a[k].y;
if(y==fa) continue;
int t=cnt;
if(d[x]>f[y]) t--;
if(t) g[x]=inf;
else g[x]=d[x];
dp(y,x);
}
}
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++) scanf("%d",&d[i]);
for(int i=1;i<n;i++)
{
int x,y;scanf("%d%d",&x,&y);
ins(x,y);ins(y,x);
}
dfs(1,0);
g[0]=inf;
dp(1,0);
sort(A+1,A+num+1);
for(int i=num;i>=1;i--) printf("%d ",A[i]);
return 0;
} | a.cc: In function 'int main()':
a.cc:60:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
60 | sort(A+1,A+num+1);
| ^~~~
| sqrt
|
s206532352 | p03807 | C | #include <stdio.h>
int main(void) {
| main.c: In function 'main':
main.c:2:1: error: expected declaration or statement at end of input
2 | int main(void) {
| ^~~
|
s199192855 | p03807 | C++ | #include<iostream>
using namespace std;
int main() {
int sum = 0;
int n; cin >> n;
for (int i = 0; i < n; i++){
int a; cin >> a;
if (a % 2 == 1)sum++;
}
if (sum % 2 == 1)cout << "NO\n"; else cot << "YES\n";
} | a.cc: In function 'int main()':
a.cc:10:47: error: 'cot' was not declared in this scope
10 | if (sum % 2 == 1)cout << "NO\n"; else cot << "YES\n";
| ^~~
|
s235606565 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 1234567;
int a[N], d[N];
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", a + i);
}
a[n] = a[0];
int mx = 0;
for (int i = 0; i < n; i++) {
d[i] = a[i + 1] - a[i];
mx = max(mx, d[i]);
}
long long sum = 0;
for (int i = 0; i < n; i++) {
sum += a[i];
}
int foo = mx;
for (int i = 0; i < n; i++) {
if ((foo - d[i]) % n) {
puts("NO");
return 0;
}
}
long long bar = n * (long long) (n + 1) / 2;
long long need = foo * bar;
long long useless = n * bar;
if (need > sum || ((total - need) % useless)) {
puts("NO");
return 0;
}
puts("YES");
return 0;
}
| a.cc: In function 'int main()':
a.cc:35:23: error: 'total' was not declared in this scope
35 | if (need > sum || ((total - need) % useless)) {
| ^~~~~
|
s069324426 | p03807 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s099149361 | p03807 | Java | import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Stack;
public class B348 {
/**
* @param args
*/
static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int n=sc.nextInt();
int cnt=0;
for(int i=0;i<n;i++)
{
int s=sc.nextInt();
if(s%2!=0)
cnt++;
}
if(cnt%2!=0)
{
System.out.println("NO");
}
else
System.out.println("YES");
}
}
| Main.java:10: error: class B348 is public, should be declared in a file named B348.java
public class B348 {
^
1 error
|
s620047037 | p03807 | Java | iimport java.util.*;
class Main{
public static void main(String[] args){
//declare
Scanner in = new Scanner(System.in);
ArrayList<Integer> array = new ArrayList<Integer>();
int a,b;
//imput
b = 0;
a = in.nextInt();
for (int i=0;i<a;i++){
b += Integer.parseInt(in.next());
}
//calculaate
if(b % 2 == 0){System.out.println("YES");}
else{System.out.println("NO");}
}
} | Main.java:1: error: class, interface, enum, or record expected
iimport java.util.*;
^
1 error
|
s625904003 | p03807 | Java | import java.util.*;
class Main{
public static void main(String[] args){
//declare
Scanner in = new Scanner(System.in);
ArrayList<Integer> array = new ArrayList<Integer>();
int a,b;
//imput
int b = 0;
a = in.nextInt();
for (int i=0;i<a;i++){
b += Integer.parseIn(in.next));
}
//calculaate
if(b % 2 == 0){System.out.println("YES");}
else{System.ot.println("NO");}
}
} | Main.java:13: error: ';' expected
b += Integer.parseIn(in.next));
^
1 error
|
s412005575 | p03807 | C | #include<stdio.h>
int main()
{
int a,c,d;
int b[];
int tmp;
scanf("%d",&a);
for(c=0;c<a;c++)
{
scanf("%d",&b[c]);
}
for(c=0;c<a;c++)
{
if(b[c]%2==0)
{
d++;
}
}
if(d%2==0)
{
printf("YES");
}
else{
printf("NO");
}
} | main.c: In function 'main':
main.c:6:13: error: array size missing in 'b'
6 | int b[];
| ^
|
s622450726 | p03807 | C++ | #define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
#define CLR(a) memset(a,0,sizeof a)
#define OUT(x) cout<<x<<endl;
#define I(x) int x; scanf_s("%d",&x);
#define LI(x) long long x; scanf_s("%lld",&x);
#define VI(v,n) vector<int> v(n); REP(i,n) scanf_s("%d", &v[i]);
#define VLI(v,n) vector<lint> v(n); REP(i,n) scanf_s("%lld", &v[i]);
#define D(x) double x; scanf_s("%lf",&x);
#define VD(v,n) vector<double> v(n); REP(i,n) scanf_s("%lf", &v[i]);
#define STR(x) string x; cin >> x;
#define INF INT_MAX/3
#define LL long long
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <string>
using namespace std;
int main()
{
I(N);
LL A = 0;
LL C = 0;
REP(i, N) { cin >> A; if (A % 2 != 0) C++; }
if (C % 2 == 0)
{
OUT("YES");
}
else
{
OUT("NO");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
10 | #define I(x) int x; scanf_s("%d",&x);
| ^~~~~~~
a.cc:32:9: note: in expansion of macro 'I'
32 | I(N);
| ^
|
s077545109 | p03807 | C++ | #define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
#define CLR(a) memset(a,0,sizeof a)
#define OUT(x) cout<<x<<endl;
#define I(x) int x; scanf_s("%d",&x);
#define LI(x) long long x; scanf_s("%lld",&x);
#define VI(v,n) vector<int> v(n); REP(i,n) scanf_s("%d", &v[i]);
#define VLI(v,n) vector<lint> v(n); REP(i,n) scanf_s("%lld", &v[i]);
#define D(x) double x; scanf_s("%lf",&x);
#define VD(v,n) vector<double> v(n); REP(i,n) scanf_s("%lf", &v[i]);
#define STR(x) string x; cin >> x;
#define INF INT_MAX/3
#define LL long long
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
void main()
{
I(N);
LL A = 0;
LL C = 0;
REP(i, N) { cin >> A; if (A % 2 != 0) C++; }
if (C % 2 == 0)
{
OUT("YES");
}
else
{
OUT("NO");
}
} | a.cc:29:1: error: '::main' must return 'int'
29 | void main()
| ^~~~
a.cc: In function 'int main()':
a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
10 | #define I(x) int x; scanf_s("%d",&x);
| ^~~~~~~
a.cc:31:9: note: in expansion of macro 'I'
31 | I(N);
| ^
|
s007421572 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
int A[(int)1e5 + 10];
int main() {
int n;
cin >> n;
for(int i=1;i;<=n;i++){
cin >> A[i];
}
bool ok = 1,_ok = 1;
for(int i=1;i<=n;i++){
ok &= (A[i]&1);
_ok &= (A[i]&1==0);
}
if(ok || _ok){
cout << "YES" << endl;
return 0;
}
int cnt = 0;
for(int i=1;i<=n;i++){
cnt += (A[i]&1);
}
if(cnt==2){
cout << "YES" << endl;
return 0;
}
cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before '<=' token
15 | for(int i=1;i;<=n;i++){
| ^~
a.cc:15:22: error: expected ')' before ';' token
15 | for(int i=1;i;<=n;i++){
| ~ ^
| )
a.cc:15:23: error: 'i' was not declared in this scope
15 | for(int i=1;i;<=n;i++){
| ^
|
s243664370 | p03807 | C++ | fsad | a.cc:1:1: error: 'fsad' does not name a type
1 | fsad
| ^~~~
|
s160614456 | p03807 | C++ | atcoder010A.cpp
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++) // ex)REP(i,10) i=0~i=9
#define REPR(i, n) for(int i = n;i >= 0;i--) // ex)REPR(i,10) i=10~i=0
#define FOR(i, m, n) for(int i = m;i < n;i++) //ex)FOR(i,3,10) i=3~i=9
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end()); //
#define llong long long //64bitに拡張
#define pb(a) push_back(a)
#define INF 999999999 //大きな値
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;
//座標上を探索
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
int main(){
int N;
llong A[100000];
int count = 0;
cin >> N;
for(int i=0;i<N;i++){
cin >> A[i];
if(A[i] % 2 == 1){
count++;
}
}
if(count % 2 == 1){
cout << 'NO' << endl;
}else{
cout << 'Yes' << endl;
}
}
| a.cc:10:27: error: extended character is not valid in an identifier
10 | #define pb(a) push_back(a)
| ^
a.cc:33:9: warning: multi-character character constant [-Wmultichar]
33 | cout << 'NO' << endl;
| ^~~~
a.cc:35:9: warning: multi-character character constant [-Wmultichar]
35 | cout << 'Yes' << endl;
| ^~~~~
a.cc:1:1: error: 'atcoder010A' does not name a type
1 | atcoder010A.cpp
| ^~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/cstddef:50,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59,
from /usr/include/c++/14/bits/stl_algo.h:69,
from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| |
s197015791 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n, x,t=0;
cin>>n;
for (i=0;i<n;i++){
cin>>x;
if (x%2)t++;
}
if (t%2)cout<<"NO\n";else cout<<"YES\n";
} | a.cc: In function 'int main()':
a.cc:7:6: error: 'i' was not declared in this scope
7 | for (i=0;i<n;i++){
| ^
|
s435614379 | p03807 | C++ | #include <iostream>
int main() {
int n, m, cnt=0;
std::cin >> n;
for (int i=0; i<n; i++) {
std::cin >> m;
if ( m%2 == 1 ) {
cnt++;
}
}
if ( cnt%2 == 0 ) {
std::cout << "YES" << std::endl;
} else {
std::cout << "NO" << std::endl;
} | a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s599970100 | p03807 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
N = 3;
cin >> N;
unsigned int odd, even;
odd = even = 0;
//vector<int> A;
for(int i = 0;i<N;i++){
int tmp;
cin >> tmp;
if (tmp % 2 == 0)even++;
else odd++;
//A.push_back(tmp);
}
if ((odd % 2) != 0){ cout << "NO" << endl; return; }
else{
even += odd / 2;
int bits = 0;
for (int i = 0; i<32; i++){
if (even > ((even >> 1) << 1) ) bits++;
even = even >> 1;
}
if (bits % 2 == 1){ cout << "NO" << endl; return; }
}
cout << "YES" << endl;
} | a.cc: In function 'int main()':
a.cc:18:52: error: return-statement with no value, in function returning 'int' [-fpermissive]
18 | if ((odd % 2) != 0){ cout << "NO" << endl; return; }
| ^~~~~~
a.cc:26:59: error: return-statement with no value, in function returning 'int' [-fpermissive]
26 | if (bits % 2 == 1){ cout << "NO" << endl; return; }
| ^~~~~~
|
s796645766 | p03807 | C++ | #include <iostream.h>
using namespace std;
int main(){
int N;
cin >> N;
unsigned int odd, even;
odd = even = 0;
//vector<int> A;
for(int i = 0;i<N;i++){
int tmp;
cin >> tmp;
if (tmp % 2 == 0)even++;
else odd++;
//A.push_back(tmp);
}
if (odd % 2 != 0){ cout << "NO" << endl; }
else if ((odd / 2 + even) % 2 == 1){ cout << "NO" << endl; }
else cout << "YES" << endl;
return 1;
} | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s078450124 | p03807 | C++ | #import<iostream>
int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:39: error: lvalue required as left operand of assignment
2 | int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");}
| ~~~^~~
|
s480070893 | p03807 | C++ | #import<iostream>
int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:47: error: expected primary-expression before ';' token
2 | int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");}
| ^
|
s151391752 | p03807 | C++ | #import<iostream>
int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:39: error: lvalue required as left operand of assignment
2 | int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");}
| ~~~~^~~
|
s471968246 | p03807 | C++ | #include<iostream>
int a,f;
int main() {
fgets(&a,5,0);
for (; std::cin>>a; f ^= a & 1);
puts(f?"NO\n":"YES\n");
} | a.cc: In function 'int main()':
a.cc:4:15: error: cannot convert 'int*' to 'char*'
4 | fgets(&a,5,0);
| ^~
| |
| int*
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conversions.h:45,
from /usr/include/c++/14/bits/basic_string.h:4154,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/stdio.h:654:38: note: initializing argument 1 of 'char* fgets(char*, int, FILE*)'
654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ~~~~~~~~~~~~~~~~~^~~
|
s402665802 | p03807 | C++ | #import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
| a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
| ^~~~~~
a.cc:1:19: warning: extra tokens at end of #import directive
1 | #import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s744791730 | p03807 | C++ | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
| a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
| ^~~~~~
a.cc:1:22: warning: extra tokens at end of #import directive
1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
| ^
a.cc:1:8: fatal error: iostream>in: No such file or directory
1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
| ^~~~~~~~~~~~~
compilation terminated.
|
s349272806 | p03807 | C++ | #include<iostream>
int a,f;
int main() {
scanf("%*d");
gets(&a);
for (; std::cin>>a; f ^= a & 1);
puts(f?"NO\n":"YES\n");
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(&a);
| ^~~~
| getw
|
s770417434 | p03807 | C++ | #import<map>
int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<map>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:28: error: 'cin' is not a member of 'std'
2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #import<map>
+++ |+#include <iostream>
2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
a.cc:2:48: error: 'puts' was not declared in this scope
2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
| ^~~~
|
s987673799 | p03807 | C++ | #include<iostream>
#include<set>
#include<iterator>
#include<algorithm>
#include<string>
#include<Windows.h>
#include<map>
#include<vector>
using namespace std;
int main() {
//RECT rc;
//GetClientRect(GetConsoleWindow(), &rc);
//SetWindowPos(GetConsoleWindow(), HWND_TOP, 700, 200, rc.right , rc.bottom, 0x0040);
int n;
cin >> n;
bool y = 1;
int cou = 0;
int a;
for (int i = 0; i < n; i++)
{
cin >> a;
if (a % 2 == 1)
cou++;
}
if (cou % 2 == 1)
y = 0;
if (y)
cout << "YES";
else
cout << "NO";
cout << endl;
return 0;
}
| a.cc:6:9: fatal error: Windows.h: No such file or directory
6 | #include<Windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s248218722 | p03807 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
long long int N;
vector<long long int> a;
long long int b = 0;
long long int sum = 0;
long long int c = 0;
cin >> N;
for(long long int i = 0; i < N; i++){
cin >> b;
a.push_back(b);
sum += b;
}
long long int trial = sum / (N*(N+1)/2);
if (sum % (N*(N+1)/2) != 0){
cout << "NO" << endl;
return 0;
}
for(long long int i = 0; i < N-1; i++){
if(a[i] + trial != a[i+1]){
if((a[i] + trial - a[i+1]) % N != 0){
cout << "NO" << endl;
return 0;
}
else{
c += (a[i] + trial - a[i+1]) / N;
}
}
}
if (a[N-1] + trial != a[0]){
if((a[N-1] + trial - a[0]) % N != 0){
cout << "NO" << endl;
return 0;
}
else{
c += (a[N-1] + trial - a[0]) / N;
}
}
if (c == trial)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:5:1: error: extended character is not valid in an identifier
5 |
| ^
a.cc:12:1: error: extended character is not valid in an identifier
12 |
| ^
a.cc:19:1: error: extended character is not valid in an identifier
19 |
| ^
a.cc:25:1: error: extended character is not valid in an identifier
25 |
| ^
a.cc:37:1: error: extended character is not valid in an identifier
37 |
| ^
a.cc:47:1: error: extended character is not valid in an identifier
47 |
| ^
a.cc:3:1: error: '\U000000a0' does not name a type
3 |
| ^
a.cc:5:1: error: '\U000000a0' does not name a type
5 |
| ^
|
s911627140 | p03807 | C | #include<stdio.h>
int en;
int on;
int N;
void input(){
int i, t;
en = 0;
on = 0;
scanf("%d", &N);
for( i = 0; i < N; i++ ){
scanf("%d", &t);
if( t % 2 ){
en++;
}else{
on++;
}
}
return;
}
int main(){
input();
if( on % 2 == 0 || on == 1 && en == 0) ){
printf("YES\n");
}else{
printf("NO\n");
}
return 0;
}
| main.c: In function 'main':
main.c:25:48: error: expected statement before ')' token
25 | if( on % 2 == 0 || on == 1 && en == 0) ){
| ^
main.c:27:10: error: 'else' without a previous 'if'
27 | }else{
| ^~~~
|
s309768932 | p03807 | C | #include<stdio.h>
int en;
int on;
int N;
void input(){
int i;
en = 0;
on = 0;
scanf("%d", &N);
for( i = 0; i < N; i++ ){
scanf("%d", &t);
if( t % 2 ){
en++;
}else{
on++;
}
}
return;
}
int main(){
input();
if( on > 3 || (on == 1 && en > 0) ){
printf("NO\n");
}else{
printf("YES\n");
}
return 0;
}
| main.c: In function 'input':
main.c:13:30: error: 't' undeclared (first use in this function)
13 | scanf("%d", &t);
| ^
main.c:13:30: note: each undeclared identifier is reported only once for each function it appears in
|
s849060651 | p03807 | C++ | #include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <numeric>
using namespace std;
#define forn(i,n) for (int i = 0; i < int(n); ++i)
#define forsn(i,x,y) for(long long i = (x) ; i <= (y) ; ++i)
typedef long long ll;
typedef long double ld;
int main() {
ll n;
cin >> n;
vector<ll> a;
vector<ll> subs;
ll total = 0;
ll ave = 0;
forn(n0,n) {
ll t;
cin >> t;
a.push_back(t);
total += t;
}
subs.push_back(a[0] - a[a.size()-1]);
for(int i =1 ;i < n; i++) {
subs.push_back(a[i] - a[i-1]);
}
ave = (n * (n+1)) / 2
if(total % ave != 0) {
cout << "NO" << endl;
return 0;
}
ll numadd = total / ave;
ll sub = n-1;
ll num_sub = numadd;
/*
forn(i,n) {
cout << subs[i] << " " ;
}
cout << endl;
cout << "numadd:" << numadd << endl;
*/
for(int i = 0; i < n; i++) {
//cout << "i:" << i << endl;
if((subs[i] - numadd) % n != 0) {
cout << "NO" << endl;
return 0;
}
//cout << (subs[i] - numadd) / n << endl;
num_sub += (subs[i] - numadd) / n;
}
if(true) { //num_sub == 0) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:33:24: error: expected ';' before 'if'
33 | ave = (n * (n+1)) / 2
| ^
| ;
34 | if(total % ave != 0) {
| ~~
|
s273208148 | p03807 | C | #include <stdio.h>
#include <math.h>
int main()
{
int N;
int A;
int odd;
scanf("%d",&N);
for(i=0; i<N; i++)
{
scanf("%d",&A);
if ((A%2)==0) odd++;
}
if(mod(odd%2)==1)
{
printf("YES");
}else{
printf("NO");
}
return 0;
} | main.c: In function 'main':
main.c:12:7: error: 'i' undeclared (first use in this function)
12 | for(i=0; i<N; i++)
| ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:6: error: implicit declaration of function 'mod'; did you mean 'fmod'? [-Wimplicit-function-declaration]
18 | if(mod(odd%2)==1)
| ^~~
| fmod
|
s800218735 | p03807 | C | #include<stdio.h>
int main()
{
int N;
int num[10000];
int i;
scanf("%d",&N);
for(i==0;i<N;i++)
scanf("%d",&num[i]);
int count=0;
for(i==0;i<N;i++)
if(num%2==1)
count++;
if(count%2==0)
printf("YES\n");
else
printf("NO\n");
return 0;
} | main.c: In function 'main':
main.c:12:9: error: invalid operands to binary % (have 'int *' and 'int')
12 | if(num%2==1)
| ~~~^
| |
| int *
|
s356625990 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int e=0;o=0;
for(int i=0;i<n;i++){
int x;
cin>>x;
if(x%2==0){
e++;
}else{
o++;
}
if(o%2==1){
cout<<"NO";
}else{
cout<<"YES";
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:17: error: 'o' was not declared in this scope
7 | int e=0;o=0;
| ^
|
s610229919 | p03807 | Java |
import java.util.Scanner;
/**
* Created by srikanth on 04-02-2017.
*/
public class Addition {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int even=0,odd=0;
int N=scan.nextInt();
while(N-->0){
int i=scan.nextInt();
if(i%2==0){
even++;
}
else{
odd++;
}
}
if(odd%2==1 && even>0)
System.out.println("NO");
else{
System.out.println("YES");
}
}
}
| Main.java:8: error: class Addition is public, should be declared in a file named Addition.java
public class Addition {
^
1 error
|
s679703906 | p03807 | C++ | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def readln(ch):
_res = list(map(int,str(input()).split(ch)))
return _res
n = int(input())
a = readln(' ')
ans = 0
for x in a:
if x % 2 == 1:
ans = ans + 1
if ans % 2 == 1:
print('YES')
else:
print('NO')
| a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python3
| ^
a.cc:2:3: error: invalid preprocessing directive #-
2 | # -*- coding: utf-8 -*-
| ^
a.cc:15:11: warning: multi-character character constant [-Wmultichar]
15 | print('YES')
| ^~~~~
a.cc:17:11: warning: multi-character character constant [-Wmultichar]
17 | print('NO')
| ^~~~
a.cc:4:1: error: 'def' does not name a type
4 | def readln(ch):
| ^~~
|
s847183323 | p03807 | Java | package grand_04_02_17;
import java.util.Scanner;
/**
* Created by srikanth on 04-02-2017.
*/
public class Addition {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int even=0,odd=0;
int N=scan.nextInt();
while(N-->0){
int i=scan.nextInt();
if(i%2==0){
even++;
}
else{
odd++;
}
}
if(odd%2==1 && even>0)
System.out.println("NO");
else{
System.out.println("YES");
}
}
}
| Main.java:8: error: class Addition is public, should be declared in a file named Addition.java
public class Addition {
^
1 error
|
s825171612 | p03807 | C++ | #include<iostream>
int main() {
int n; std::cin >> n; std::cout << (n%2 ? "Yes" : "No") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:60: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
4 | int n; std::cin >> n; std::cout << (n%2 ? "Yes" : "No") << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.