submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s855471986 | p03637 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner.in(System.in);
int num = in.nextInt();
int[] count = new int[3];
while(in.hasNextInt()) {
int tmp = in.nextInt() & 3;
if ((tmp & 1) == 1) {
count[0]++;
} else if ((~tmp & 3) == 1) {
count[1]++;
} else {
count[2]++;
}
}
String ans = "Yes";
int t = count[1] > 0 ? 1 : 0;
if (count[2] + 1 < count[0] + t) ans = "No";
System.out.println(ans);
}
} | Main.java:5: error: cannot find symbol
Scanner in = new Scanner.in(System.in);
^
symbol: class in
location: class Scanner
1 error
|
s752647290 | p03637 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner.in(System.in);
int num = in.nextInt();
int[] count = new int[3];
while(in.hasNextInt()) {
int tmp = in.nextInt() & 3;
if ((tmp & 1) == 1) {
count[0]++;
} else if (((tmp ^ 2) & 3) == 1) {
count[1]++;
} else {
count[2]++;
}
}
String ans = "Yes";
int t = count[1] > 0 ? 1 : 0;
if (count[2] + 1 < count[0] + t) ans = "No";
System.out.println(ans);
}
}
| Main.java:5: error: cannot find symbol
Scanner in = new Scanner.in(System.in);
^
symbol: class in
location: class Scanner
1 error
|
s462295653 | p03637 | C++ | #include <iostream>
#include <cstring>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
int a[n], ans=0;
for(i=0; i<n; i++){
cin >> a[i];
if(a[i]%4==0) ans+=2;
else if(a[i]%2==0) ans++;
}
if(ans>=n) cout << "Yes";
else cout << "No";
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:7: error: 'i' was not declared in this scope
12 | for(i=0; i<n; i++){
| ^
|
s107157881 | p03637 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int N;
cin >> N;
vector<int>num(N,0);
for(int i=0;i<N;i++){
cin >> num[i];
}
int mul_4 = 0;
int mul_2 = 0;
for(int i=0;i<N;i++){
if(num[i] % 4 == 0)
mul_4++;
else if(num[i] % 2 == 0)
mul_2++;
}
bool can = false;
if(mul_4 >= N / 2)
can = true;
else if(mul_4 * 2 + mul_2 >= N)
can = true;
if(can)
cout << "Yes" << endl;
else
cout << "No" << endl:
return 0;
}
| a.cc: In function 'int main()':
a.cc:34:25: error: expected ';' before ':' token
34 | cout << "No" << endl:
| ^
| ;
|
s095183780 | p03637 | C++ | #include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define BIG 1000000010
#define repi(i,x,n) for(int i=x;i<n;i++)
#define rep(i,n) repi(i,0,n)
#define repn(i,n) for(int i=n;i>=0;i--)
typedef long long int ll;
int main(){
int n;
int a[100000];
int p=0;
cin>>n;
rep(i,n){
cin>>a[i];
if(a%4==0) a[i]=2;
else if(a%2==0) a[i]=1;
else a[i]=0;
p+=a[i];
}
if(p<n) cout<<"No"<<endl;
else cout<<"Yes"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:18:9: error: invalid operands of types 'int [100000]' and 'int' to binary 'operator%'
18 | if(a%4==0) a[i]=2;
| ~^~
| | |
| | int
| int [100000]
a.cc:19:14: error: invalid operands of types 'int [100000]' and 'int' to binary 'operator%'
19 | else if(a%2==0) a[i]=1;
| ~^~
| | |
| | int
| int [100000]
|
s459442511 | p03637 | C++ | #include<iostream>
using namespace std;
int main()
{int N ; long long A[N];
for(int i = 0; i < N; i++){cin >> A[i];}
if( N == 1 && A[0] % 4 == 0){cout << "Yes" << endl;}
else if( N == 1 && A[0] % 4 != 0){cout << "No" << end;l}
else{
int s = 0;int t = 0; int u = 0;
for(int j = 0; j < N ; j++){
if(A[j] % 4 == 2){ t++;}
else if(A[j] % 4 == 0){s++;}
else{ u++;}}
if( 2*s + t >= N){ cout << "Yes" << endl;}
else{ cout << "No" << endl;}}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:49: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
10 | else if( N == 1 && A[0] % 4 != 0){cout << "No" << end;l}
| ~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
306 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to |
s819895312 | p03637 | C++ | #include<bits/stdc++>
using namespace std;
int main(){
int n;
vector<int> a(n);
int i;
int od=0;
int tw=0;
int fo=0;
for(i=0;i<n;i++){
cin>>a.at(i);
if(a.at(i)%2==0){
if(a.at(i)%4==0){
fo++;
}else{
tw++;
}
}else{
od++;
}
}
if(tw==0){
if((fo+2)>od){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}else{
if(fo>=od){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s015946534 | p03637 | C++ | #include<bits/stdc++>
using namespace std;
int n,x;
int odd,even,fr;
int main(){
cin>>n;
while(n--){
cin>>x;
if(x%4==0) fr++;
else if(x%2==0) even++;
else odd++;
}
string ans;
if(even==0){
if(odd<=fr+1) ans="Yes";
else ans="No";
}else{
if(odd<=fr)ans="Yes";
else ans="No";
}
cout<<ans;
return 0;
} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s048348636 | p03637 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int n;
while(cin>>n){
int cnt=0;
for(int i=0;i<n;i++){
int num;
scanf("%d",&num);
if(num%4==0) cnt++;
}
if(num>=n/2) cout<<"Yes\n";
else cout<<"No\n";
}
} | a.cc: In function 'int main()':
a.cc:12:20: error: 'num' was not declared in this scope; did you mean 'enum'?
12 | if(num>=n/2) cout<<"Yes\n";
| ^~~
| enum
|
s739409308 | p03637 | C++ | #include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<stdlib.h>
using namespace std;
typedef long long ll;
const int maxn=1e6+5;
ll a[maxn];
int main()
{
ll n;
scanf("%lld",&n);
for(ll i=1;i<=n;i++)
scanf("%lld",&a[i]);
ll d=0,k=0;
for(ll i=1;i<=n;i++)
{
if(a[i]%4==0)
d++;
if(a[i]%2==0&&a[i]%4!=0)
k++;
}
ll p;
if(d!=0)
p=n-d*2-1;
else
p=n;
if(p<k||p==0||k==n)
printf("Yes\n");
else
printf("No\n");
return 0;
}#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<stdlib.h>
using namespace std;
typedef long long ll;
const int maxn=1e6+5;
ll a[maxn];
int main()
{
ll n;
scanf("%lld",&n);
for(ll i=1;i<=n;i++)
scanf("%lld",&a[i]);
ll d=0,k=0;
for(ll i=1;i<=n;i++)
{
if(a[i]%4==0)
d++;
if(a[i]%2==0&&a[i]%4!=0)
k++;
}
ll p;
if(d!=0)
p=n-d*2-1;
else
p=n;
if(p<k||p==0||k==n)
printf("Yes\n");
else
printf("No\n");
return 0;
} | a.cc:34:2: error: stray '#' in program
34 | }#include<stdio.h>
| ^
a.cc:34:3: error: 'include' does not name a type
34 | }#include<stdio.h>
| ^~~~~~~
a.cc:41:11: error: redefinition of 'const int maxn'
41 | const int maxn=1e6+5;
| ^~~~
a.cc:8:11: note: 'const int maxn' previously defined here
8 | const int maxn=1e6+5;
| ^~~~
a.cc:42:4: error: redefinition of 'll a [1000005]'
42 | ll a[maxn];
| ^
a.cc:9:4: note: 'll a [1000005]' previously declared here
9 | ll a[maxn];
| ^
a.cc:43:5: error: redefinition of 'int main()'
43 | int main()
| ^~~~
a.cc:10:5: note: 'int main()' previously defined here
10 | int main()
| ^~~~
|
s977334500 | p03637 | C++ | #include<iostream>
using namespace std;
int n,s,x,y,z;
int main(){
cin>>n;
for(int i=0;i<n;i++){
cin>>s;
if(s%4==0)x++;
else if(s%2==0)y++;
else z++;
}
if(x+1=>z)cout<<"Yes"<<"\n";
else if(x>=z)cout<<"Yes"<<"\n";
else cout<<"No"<<"\n";
} | a.cc: In function 'int main()':
a.cc:13:12: error: expected primary-expression before '>' token
13 | if(x+1=>z)cout<<"Yes"<<"\n";
| ^
|
s809641324 | p03637 | C++ | #include<iostream>
using namespace std;
int n,s,x,y,z;
int main(){
cin>>n;
for(int i=0;i<n;i++){
cin>>s;
if(s%4==0)x++;
else if(s%2==0)y++;
else z++;
}
if(x+1>z)cout<<"Yes"<<"\n";
else if(x>z)cout<<"Yes"<<"\n";
else cout<<<"No"<<"\n";
} | a.cc: In function 'int main()':
a.cc:15:16: error: expected primary-expression before '<' token
15 | else cout<<<"No"<<"\n";
| ^
a.cc:15:21: error: invalid operands of types 'const char [3]' and 'const char [2]' to binary 'operator<<'
15 | else cout<<<"No"<<"\n";
| ~~~~^~~~~~
| | |
| | const char [2]
| const char [3]
|
s513946744 | p03637 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end())
#define VRSORT(v) sort(v.rbegin(), v.rend())//vectorの降順ソート
#define ll long long
#define pb(a) push_back(a)
#define INF 1000000000
#define MOD 1000000007
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
typedef vector<unsigned int>vec;
typedef vector<vec> mat;
typedef tuple<ll, ll, ll> T;
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
int n,x=0;
int cnt[3]={0};
bool ans=0;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
cin>>n;
REP(i,n){
int a;cin>>a;
if(a%4==0) ++cnt[0];
else if(a%2==0) ++cnt[1];
else ++cnt[2];
}
if(cnt[0]+cnt[1]==n)ans=1;
if(cnt[1]>0){
x = cnt[1] - 1;
++cnt[2];
}
if(cnt[0]>=cnt[2] && (n-x)%2 == 0) ans=1;
if(cnt[0] + 1 >= cnt[2] && (n-x) % 2 == 1) ans=1;
if(ans) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end())
#define VRSORT(v) sort(v.rbegin(), v.rend())//vectorの降順ソート
#define ll long long
#define pb(a) push_back(a)
#define INF 1000000000
#define MOD 1000000007
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
typedef vector<unsigned int>vec;
typedef vector<vec> mat;
typedef tuple<ll, ll, ll> T;
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
int n,x=0;
int cnt[3]={0};
bool ans=0;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
cin>>n;
REP(i,n){
int a;cin>>a;
if(a%4==0) ++cnt[0];
else if(a%2==0) ++cnt[1];
else ++cnt[2];
}
if(cnt[0]+cnt[1]==n)ans=1;
if(cnt[1]>0){
x = cnt[1] - 1;
++cnt[2];
}
if(cnt[0]>=cnt[2] && (n-x)%2 == 0) ans=1;
if(cnt[0] + 1 >= cnt[2] && (n-x) % 2 == 1) ans=1;
if(ans) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc:46:2: error: stray '#' in program
46 | }#include <bits/stdc++.h>
| ^
a.cc:46:3: error: 'include' does not name a type
46 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:65:5: error: redefinition of 'int dy []'
65 | int dy[]={0, 0, 1, -1, 0};
| ^~
a.cc:20:5: note: 'int dy [5]' previously defined here
20 | int dy[]={0, 0, 1, -1, 0};
| ^~
a.cc:66:5: error: redefinition of 'int dx []'
66 | int dx[]={1, -1, 0, 0, 0};
| ^~
a.cc:21:5: note: 'int dx [5]' previously defined here
21 | int dx[]={1, -1, 0, 0, 0};
| ^~
a.cc:68:5: error: redefinition of 'int n'
68 | int n,x=0;
| ^
a.cc:23:5: note: 'int n' previously declared here
23 | int n,x=0;
| ^
a.cc:68:7: error: redefinition of 'int x'
68 | int n,x=0;
| ^
a.cc:23:7: note: 'int x' previously defined here
23 | int n,x=0;
| ^
a.cc:69:5: error: redefinition of 'int cnt [3]'
69 | int cnt[3]={0};
| ^~~
a.cc:24:5: note: 'int cnt [3]' previously defined here
24 | int cnt[3]={0};
| ^~~
a.cc:70:6: error: redefinition of 'bool ans'
70 | bool ans=0;
| ^~~
a.cc:25:6: note: 'bool ans' previously defined here
25 | bool ans=0;
| ^~~
a.cc:72:5: error: redefinition of 'int main()'
72 | int main(){
| ^~~~
a.cc:27:5: note: 'int main()' previously defined here
27 | int main(){
| ^~~~
|
s463393829 | p03637 | C++ | fe | a.cc:1:1: error: 'fe' does not name a type
1 | fe
| ^~
|
s134175407 | p03637 | Java | #include <cstdio>
int main(void)
{
int a1count=0,a2count=0,a4count=0;
int i,N,x;
scanf("%d",&N);
while(N--)
{
scanf("%d",&x);
if(x%4==0)
a4count++;
else if(x%2==0)
a2count++;
else
a1count++;
}
if(a2count>0 && a1count<=a4count)
printf("Yes\n");
else if(a2count==0 && a1count<=a4count+1)
printf("Yes\n");
else
printf("No\n");
return 0;
} | Main.java:1: error: illegal character: '#'
#include <cstdio>
^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
#include <cstdio>
^
(use --enable-preview to enable unnamed classes)
Main.java:3: error: <identifier> expected
int main(void)
^
Main.java:7: error: illegal start of expression
scanf("%d",&N);
^
Main.java:10: error: illegal start of expression
scanf("%d",&x);
^
5 errors
|
s553728938 | p03637 | C++ | aeg | a.cc:1:1: error: 'aeg' does not name a type
1 | aeg
| ^~~
|
s266438520 | p03637 | C++ | #include<iostream>
using namespace std;
int main(void)
{
int a1=0, a2=0, a4=0;
int i, n,x;
cin >> n;
for (i = 0; i < n; i++)
{
cin >> x;
if (x % 4 == 0)
a4++;
else if (x % 2 == 0)
a2++;
else
a1++;
}
if ((a2 == 0)&& (a4 >= (a1 - 1)))
{
cout << "YES";
}
else if ((a4 >= a1)&&(a2>0))
{
cout << "YES";
}
else
cout << "NO";
return EXIT_SUCCESS;
} | a.cc: In function 'int main()':
a.cc:7:9: error: expected initializer before 'cin'
7 | cin >> n;
| ^~~
a.cc:10:24: error: 'x' was not declared in this scope
10 | cin >> x;
| ^
|
s782400936 | p03637 | C | #include <iostream>
using namespace std;
int main(){
int N,i,a1=0,a2=0,a4=0;
cin>>N;
int a[N];
for(i=0;i<N;i++){
cin>>a[i];
}
for(i=0;i<N;i++){
if(a[i]%4==0){
a4++;
}else if(a[i]%2==0){
a2++;
}else{
a1++;
}
}
// cout<<a4<<" "<<a2<<" "<<a1<<endl;
if(a2==0 && a4>=a1+1){
cout<<"Yes";
}else if(a2>0 && a1<=a4){
cout<<"Yes";
}else{
cout<<"No";
}
return 0;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s550603048 | p03637 | C++ | #include <iostream>
using namespace std;
int main(){
int N,i,a1=0,a2=0,a4=0;
cin>>N;
int a[N];
for(i=0;i<N;i++){
cin>>a[i];
}
for(i=0;i<N;i++){
if(a[i]%4==0){
a4++;
}else if(a[i]%2==0){
a2++;
}else{
a1++;
}
}
// cout<<a4<<" "<<a2<<" "<<a1<<endl;
if(a2==0 && a4=a1+1){
cout<<"Yes";
}else if(a2>0 && a1<=a4){
cout<<"Yes";
}else{
cout<<"No";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:20:14: error: lvalue required as left operand of assignment
20 | if(a2==0 && a4=a1+1){
| ~~~~~~^~~~~
|
s058344719 | p03637 | C++ | #include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <math.h>
using namespace std;
int main(){
int n, n4 = 0, n2 = 0, a;
string ans = "No";
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a;
if(a%4==0)n4++;
else if(a%2==0)n2++;
}
if(n4 * 2 + n2 >= n) ans = "Yes";
cout << ans << endl;
return 0; | a.cc: In function 'int main()':
a.cc:21:14: error: expected '}' at end of input
21 | return 0;
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
s637470407 | p03637 | C++ | #include<bits/stdc++.h>
using namespace std;
int main ()
{
int n,i,j,k,mod2=0,mod4=0,gg=0;
a[100005];
cin>>n;
for(i=0; i<n; i++)
{
cin>>a[i];
if(a[i]%4==0)
mod4++;
else if(a[i]%2==0)
mod2++;
else
gg++;
}
if(mod4>=gg)
cout<<"Yes"<<endl;
else //mod4 < gg
{
if(mod2 == 0)
{
if(mod4+1>=gg)
cout<<"Yes";
else
cout<<"No";
}
else//???????????????
{
if( 2 * mod4 + mod2 < n )
cout<<"No";
else
cout<<"Yes";
}
}
return 0;
}
/*分类讨论下。
显然,任意数和 4 的倍数相乘,其结果仍是 4 的倍数;
显然,若存在任意数量 2 的倍数,两两之间乘起来就是 4 的倍数;
如果存在一个数既不是 4 的倍数,也不是 2 的倍数(即因子里没有 2 ):
放在 2 的倍数旁边,一定不符合要求;
放在 4 的倍数旁边,两两相乘一定是 4 的倍数。
因此符合要求的排列一定是,所有 2 的倍数相邻排在一起,
所有 4 的倍数和剩下的数相间排列,这
些剩下的元素个数不能超过 4 的倍数的数量,不
然所有 4 的倍数都被包起来了。*/
| a.cc: In function 'int main()':
a.cc:7:9: error: 'a' was not declared in this scope
7 | a[100005];
| ^
|
s259125205 | p03637 | C | #include <stdio.h>
int main(){
int n, count = 0, num = 0;
scanf("%d", &n);
int arr[n+1], obs[n+1] = {0};
for(int i = 0; i < n; i++)
scanf("%d", &arr[i]);
for(int i = 0; i < n-1; i++){
for(int j = i+1; j < n; j++){
if(((arr[i]*arr[j]) % 4)!= 0){
count++;
obs[i] = 1;
obs[j] = 1;
}
}
}
for(int i = 0; i < n; i++){
if(obs[i] == 1)
num++;
}
if(count == n-1 && num == n-1)
printf("No");
else if(count >= n)
printf("No");
else
printf("yes");
} | main.c: In function 'main':
main.c:6:34: error: variable-sized object may not be initialized except with an empty initializer
6 | int arr[n+1], obs[n+1] = {0};
| ^
|
s555336801 | p03637 | C++ | #include<cstdio>
int main()
{
int alcout=0,a2count=0,a4count=0;
int i,N,x;
scanf("%d",&N);
while(N--)
{
scanf("%d",&x);
if(x%4==0)
a4count++;
else if(x%2==0)
a2count++;
else
a1count++;
}
if(a2count>0 &&a1count<=a4count)
printf("Yes\n");
else if(a2count==0 && a1count<=a4count+1)
printf("Yes\n");
else
printf("N0\n");
} | a.cc: In function 'int main()':
a.cc:17:25: error: 'a1count' was not declared in this scope; did you mean 'a4count'?
17 | a1count++;
| ^~~~~~~
| a4count
a.cc:20:24: error: 'a1count' was not declared in this scope; did you mean 'a4count'?
20 | if(a2count>0 &&a1count<=a4count)
| ^~~~~~~
| a4count
|
s618657713 | p03637 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int a[n];
int count[3] = {0, 0, 0};
cin >> a;
for (i = 0; i < n; i++) {
if (a[i] % 4 == 0){
count[0]++;
} else if (a[i] % 2 == 0){
count[1]++;
} else {
count[2]++;
}
}
if (count[1] > 0) {
if (count[0] >= count[2]) {
cout << "Yes";
} else {
cout << "No";
}
} else {
if (count[0]+1 >= count[2]) {
cout << "Yes";
} else {
cout << "No";
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [n]')
10 | cin >> a;
| ~~~ ^~ ~
| | |
| | int [n]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
10 | cin >> a;
| ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(short int)((int*)(& a))' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(short unsigned int)((int*)(& a))' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(int)((int*)(& a))' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(unsigned int)((int*)(& a))' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(long int)((int*)(& a))' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(long unsigned int)((int*)(& a))' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(long long int)((int*)(& a))' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
10 | cin >> a;
| ^
| |
| int*
a.cc:10:12: error: cannot bind rvalue '(long long unsigned int)((int*)(& a))' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:12: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
10 | cin >> a;
| ^
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [n]' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [n]' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [n]' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [n]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [n]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; |
s763203929 | p03637 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count4=0;
int count2 =0;
int plus=0;
for(int i = 0; i<n; i++){
long a = sc.nextLong();
if(a%4==0){
count4++;
}else{
count2++;
}
}
if((n-count2+1)%3!=0){
plus=1;
}
if(count>=(n/3)+plus){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} | Main.java:20: error: cannot find symbol
if(count>=(n/3)+plus){
^
symbol: variable count
location: class Main
1 error
|
s608926792 | p03637 | C++ | For each i (1≤i≤N), the squares painted in Color i are 4-connected. That is, every square painted in Color i can be reached from every square painted in Color i by repeatedly traveling to a horizontally or vertically adjacent square painted in Color i. | a.cc:1:13: error: extended character ≤ is not valid in an identifier
1 | For each i (1≤i≤N), the squares painted in Color i are 4-connected. That is, every square painted in Color i can be reached from every square painted in Color i by repeatedly traveling to a horizontally or vertically adjacent square painted in Color i.
| ^
a.cc:1:13: error: extended character ≤ is not valid in an identifier
a.cc:1:1: error: 'For' does not name a type
1 | For each i (1≤i≤N), the squares painted in Color i are 4-connected. That is, every square painted in Color i can be reached from every square painted in Color i by repeatedly traveling to a horizontally or vertically adjacent square painted in Color i.
| ^~~
|
s925685029 | p03637 | C++ | t
Time
(ms) Mem
(MB) Lang
Submit Time
dorpoush
D
Submit Failed
C++
8 hr ago
mostafarastegar
B
Submit Failed
C++
8 hr ago
dorpoush
C
Submit Failed
C++
8 hr ago
Mohmmd_jfz
D
Submit Failed
C++
8 hr ago
Mohmmd_jfz
C
Submit Failed
C++
8 hr ago
mahdivp
C
Submit Failed
C++
8 hr ago
AZARKASB
C
Submit Failed
C++
8 hr ago
alirezakermani
C
Submit Failed
C++
8 hr ago
behnood78
A
Submit Failed
C++
8 hr ago
mostafarastegar
B
Submit Failed
C++
8 hr ago
saleh_p
B
Submit Failed
C++
8 hr ago
mahdivp
B
Submit Failed
C++
8 hr ago
mostafarastegar
B
Submit Failed
C++
8 hr ago
erfan_tamimi
C
Submit Failed
C++
9 hr ago
saleh_p
B
Submit Failed
C++
9 hr ago
aarr
B
Submit Failed
C++
9 hr ago
aarr
B
Submit Failed
C++
9 hr ago
amir_mrd
D
Submit Failed
C++
9 hr ago
saleh_p
D
Submit Failed
C++
9 hr ago
saleh_p
C
Submit Failed
C++
9 hr ago
All Copyright Reserved ©2018 Xu Han
Server Time: 2019-02-12 19:59:39 UTC+3.5
#18205611 | saleh_p's solution for [AtCoder-2686] [Problem C]
Status
Submit Failed
Length
497
Lang
C++14 (GCC 5.3.0)
Submitted
2019-02-12 11:14:08
Shared
Select Code
#include <bits/stdc++.h>
using namespace std;
typedef pair <int, int> pii;
const int maxn = 100001;
int n,a,q,w,e,s;
void input();
void solve();
int main(){
input();
solve();
return 0;
}
void input(){
cin>>n;
for (int i=0;i<n;i++){
cin>>a;
if (a%4==0){
q++;
}
else{
if (a%2==0){
w++;
}
else{
e++;
}
}
s++;
}
}
void solve(){
if (w>0){
e++;
}
while(q>=2 and e>=2){
q-=2;
e-=2;
}
e--;
if (e>q){
cout<<"No";
}
else{
cout<<"Yes";
}
} | a.cc:107:24: error: extended character © is not valid in an identifier
107 | All Copyright Reserved ©2018 Xu Han
| ^
a.cc:110:11: error: "|" is not a valid filename
110 | #18205611 | saleh_p's solution for [AtCoder-2686] [Problem C]
| ^
a.cc:110:20: warning: missing terminating ' character
110 | #18205611 | saleh_p's solution for [AtCoder-2686] [Problem C]
| ^
a.cc:116:12: error: too many decimal points in number
116 | C++14 (GCC 5.3.0)
| ^~~~~
a.cc:118:18: error: invalid digit "8" in octal constant
118 | 2019-02-12 11:14:08
| ^~
a.cc:1:1: error: 't' does not name a type
1 | t
| ^
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:122:
/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)
| |
s450179279 | p03637 | C++ | #include<set>
#include<cmath>
#include<algorithm>
using namespace std;
#define MAXNUM3B 1000000
int main()
{
int lines = 0;
scanf("%d",&lines);
vector<int> allnums;
for (int i = 0; i < lines; ++i)
{
int num = 0;
scanf("%d", &num);
allnums.push_back(num);
}
int test4ok[MAXNUM3B] = { 0 };
int testeachnum[MAXNUM3B] = { 0 };
bool bluck = true;
for (int i = 0; i < lines-1; ++i)
{
//int muti=allnums[i] * allnums[i - 1];
for (int j = i+1; j < lines; ++j)
{
if (testeachnum[j] > 1)//相邻数最多用2次
continue;
int muti = allnums[i] * allnums[j];
if (muti % 4 == 0)
{
//can /4 test next i
test4ok[i] = 1;
testeachnum[j]++;
break;
}
}
}
for (int i = 0; i < lines - 1; ++i)
{
if (test4ok[i] == 0)
bluck = false;
}
if (bluck)
cout << "Yes" << endl;
else
cout << "No" << endl;
system("pause");
}
| a.cc: In function 'int main()':
a.cc:11:9: error: 'scanf' was not declared in this scope
11 | scanf("%d",&lines);
| ^~~~~
a.cc:12:9: error: 'vector' was not declared in this scope
12 | vector<int> allnums;
| ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
3 | #include<algorithm>
+++ |+#include <vector>
4 | using namespace std;
a.cc:12:16: error: expected primary-expression before 'int'
12 | vector<int> allnums;
| ^~~
a.cc:17:17: error: 'allnums' was not declared in this scope
17 | allnums.push_back(num);
| ^~~~~~~
a.cc:30:36: error: 'allnums' was not declared in this scope
30 | int muti = allnums[i] * allnums[j];
| ^~~~~~~
a.cc:50:17: error: 'cout' was not declared in this scope
50 | cout << "Yes" << endl;
| ^~~~
a.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include<algorithm>
+++ |+#include <iostream>
4 | using namespace std;
a.cc:50:34: error: 'endl' was not declared in this scope
50 | cout << "Yes" << endl;
| ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
3 | #include<algorithm>
+++ |+#include <ostream>
4 | using namespace std;
a.cc:52:17: error: 'cout' was not declared in this scope
52 | cout << "No" << endl;
| ^~~~
a.cc:52:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:52:33: error: 'endl' was not declared in this scope
52 | cout << "No" << endl;
| ^~~~
a.cc:52:33: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s556305177 | p03637 | C++ | #include<stdio.h>
int main(void){
int N,k,a[100000],amari,g,tmp;
g=1;
scanf("%d",&N);
for(k=0;k<=N-1;k++){
if(k<N-1){
scanf("%d ",&a[k]);}
else{
scanf("%d",&a[k]);
}
}
for(k=0;k<=N-2;k++){
amari = (a[k]*a[k+1])%4;
for(l=N-1;l>=1;l--){
if(amari!=0){
tmp=a[k];
a[k]=a[l];
a[l]=tmp;
}
}
}
for(k=0;k<=N-2;k++){
amari = (a[k]*a[k+1])%4;
if(amari!=0){
g=0;
}
}
if(g==1){
printf("Yes\n");
}else{
printf("No\n");
}
for(k=0;k<=N-1;k++){
printf("%d ",a[k]);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:23:21: error: 'l' was not declared in this scope
23 | for(l=N-1;l>=1;l--){
| ^
|
s402337399 | p03637 | C++ | #include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
typedef long long ll;
using namespace std;
ll a[100001];
int main(){
int N;
int count = 0;
int count4 = 0;
int tmp = 0;
cin >> N;
for(int i=0;i<N;i++){
cin >> a[i];
tmp = 0;
while(a[i]%2==0){
count++;
tmp ++;
a[i] /=2;
}
if(tmp>=2){
count4++;
}
}
//cout << count << endl;
if(count >= 2*(N-1) || (count4 >= N/3 && count4 >= 1){
cout << "Yes" << endl;
} else{
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:29:56: error: expected ';' before '{' token
29 | if(count >= 2*(N-1) || (count4 >= N/3 && count4 >= 1){
| ^
| ;
a.cc:31:5: error: expected primary-expression before 'else'
31 | } else{
| ^~~~
a.cc:31:4: error: expected ')' before 'else'
31 | } else{
| ^~~~~
| )
a.cc:29:5: note: to match this '('
29 | if(count >= 2*(N-1) || (count4 >= N/3 && count4 >= 1){
| ^
|
s842448827 | p03637 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++){
int n=sc.nextInt();
int n1=0;
int n4=0;
for(int j=0;j<n;j++){
int num=sc.nextInt();
if(num%4==0) n4++;
else if(num%2==1) n1++;
}
if(n1+n4<n&&n1>n4) System.out.println("No");
else System.out.println("Yes");
}
}
}
| Main.java:4: error: illegal character: '\u00a0'
??? public static void main(String[] args){
^
Main.java:4: error: illegal character: '\u00a0'
??? public static void main(String[] args){
^
Main.java:4: error: illegal character: '\u00a0'
??? public static void main(String[] args){
^
Main.java:5: error: illegal character: '\u00a0'
??????? Scanner sc=new Scanner(System.in);
^
Main.java:5: error: illegal character: '\u00a0'
??????? Scanner sc=new Scanner(System.in);
^
Main.java:5: error: illegal character: '\u00a0'
??????? Scanner sc=new Scanner(System.in);
^
Main.java:5: error: illegal character: '\u00a0'
??????? Scanner sc=new Scanner(System.in);
^
Main.java:5: error: illegal character: '\u00a0'
??????? Scanner sc=new Scanner(System.in);
^
Main.java:5: error: illegal character: '\u00a0'
??????? Scanner sc=new Scanner(System.in);
^
Main.java:5: error: illegal character: '\u00a0'
??????? Scanner sc=new Scanner(System.in);
^
Main.java:6: error: illegal character: '\u00a0'
??????? int t=sc.nextInt();
^
Main.java:6: error: illegal character: '\u00a0'
??????? int t=sc.nextInt();
^
Main.java:6: error: illegal character: '\u00a0'
??????? int t=sc.nextInt();
^
Main.java:6: error: illegal character: '\u00a0'
??????? int t=sc.nextInt();
^
Main.java:6: error: illegal character: '\u00a0'
??????? int t=sc.nextInt();
^
Main.java:6: error: illegal character: '\u00a0'
??????? int t=sc.nextInt();
^
Main.java:6: error: illegal character: '\u00a0'
??????? int t=sc.nextInt();
^
Main.java:7: error: illegal character: '\u00a0'
??????? for(int i=0;i<t;i++){
^
Main.java:7: error: illegal character: '\u00a0'
??????? for(int i=0;i<t;i++){
^
Main.java:7: error: illegal character: '\u00a0'
??????? for(int i=0;i<t;i++){
^
Main.java:7: error: illegal character: '\u00a0'
??????? for(int i=0;i<t;i++){
^
Main.java:7: error: illegal character: '\u00a0'
??????? for(int i=0;i<t;i++){
^
Main.java:7: error: illegal character: '\u00a0'
??????? for(int i=0;i<t;i++){
^
Main.java:7: error: illegal character: '\u00a0'
??????? for(int i=0;i<t;i++){
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:8: error: illegal character: '\u00a0'
??????????? int n=sc.nextInt();
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:9: error: illegal character: '\u00a0'
??????????? int n1=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:10: error: illegal character: '\u00a0'
??????????? int n4=0;
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:11: error: illegal character: '\u00a0'
??????????? for(int j=0;j<n;j++){
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:12: error: illegal character: '\u00a0'
??????????????? int num=sc.nextInt();
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:13: error: illegal character: '\u00a0'
??????????????? if(num%4==0) n4++;
^
Main.java:14: error: illegal character: '\u00a0'
??????????????? else if(num%2==1) n1++;
^
Main.java:14: error: illegal character: '\u00a0'
??????????????? else if(num%2==1) n1++;
^
100 errors
only showing the first 100 errors, of 158 total; use -Xmaxerrs if you would like to see more
|
s026959123 | p03637 | C++ | // text3_B.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "iostream"
using namespace std;
int main()
{
int a = 0;
int b = 0;
int i = 0;
int temp = 0;
cin >> a;
int*p = new int[a];
b = (int)getchar();
while (b!=NULL) {
p[i] = b;
i++;
b = (int)getchar();
}
for (int m = 0; m < a; m++) {
for (int n = m; n < a; n++) {
temp = m;
p[m] = p[n];
p[n] = p[temp];
for (int k = 0; k < a-1; k++) {
while (p[k] * p[k + 1] % 4 != 0)
cout<<"No";
}
}
}
cout << "Yes";
delete[] p;
return 0;
}
| a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s306622250 | p03637 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int m, n;
int[] arr;
Scanner sc = new Scanner(System.in);
m = sc.nextInt();
for (int i = 0; i < m; i++) {
n = sc.nextInt();
arr = new int[n];
int c4 = 0, c2 = 0, c1 = 0;
for (int j = 0; j < n; j++) {
arr[j] = Integer.parseInt(sc.next());
if (arr[j] % 4 == 0) c4++;
else if (arr[j] % 2 == 0) c2++;
else c1++;
}
if (c4 >= n / 2 || c4 >= c1) {
System.out.println("Yes");
} else
System.out.println("No");
}
}
} | Main.java:12: error: illegal character: '\uff1b'
arr = new int[n]?
^
1 error
|
s603754281 | p03637 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int m, n;
int[] arr;
Scanner sc = new Scanner(System.in);
m = sc.nextInt();
for (int i = 0; i < m; i++) {
n = sc.nextInt();
arr = new int[n];
int c4 = 0, c2 = 0, c1 = 0;
for (int j = 0; j < n; j++) {
arr[j] = Integer.parseInt(sc.next());
if (arr[j] % 4 == 0) c4++;
else if (arr[j] % 2 == 0) c2++;
else c1++;
}
if (c4 >= n / 2 || c4 >= c1) {
System.out.println("Yes");
} else
System.out.println("No");
}
}
}
| Main.java:12: error: illegal character: '\uff1b'
arr = new int[n]?
^
1 error
|
s440336061 | p03637 | C++ | #include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
using namespace std;
int main() {
int n;cin>>n;int f = 0, o = 0;
rep(i,n){
int aa;cin>>aa;
if(aa % 4 == 0){
f++;
}else if(aa % 2 1 0){
o++;
}
}
if(f >= o){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:16:20: error: expected ')' before numeric constant
16 | }else if(aa % 2 1 0){
| ~ ^~
| )
|
s626853035 | p03637 | C++ | #include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
using namespace std;
int main() {
int n;cin>>n;int f = 0, o = 0;
rep(i,n){
int aa;cin>>aa;
if(a % 4 == 0){
f++;
}else if(a % 2 1 0){
o++;
}
}
if(f >= o){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:8: error: 'a' was not declared in this scope; did you mean 'aa'?
14 | if(a % 4 == 0){
| ^
| aa
a.cc:16:19: error: expected ')' before numeric constant
16 | }else if(a % 2 1 0){
| ~ ^~
| )
|
s494134339 | p03637 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int main(){
ll n; cin >> n;
ll a[n];
vector<ll> v1, v2, v4;
string ans;
for(ll i = 0; i < n; i++){
cin >> a[i];
if(a[i]%4 == 0) v4.push_back(a[i]);
else if(a[i]%2 == 0) v2.push_back(a[i]);
else v4.push_back(a[i]);
}
if(b1.size() <= b4.size()){
ans = "Yes";
} else{
ans = "No";
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:21:8: error: 'b1' was not declared in this scope; did you mean 'v1'?
21 | if(b1.size() <= b4.size()){
| ^~
| v1
a.cc:21:21: error: 'b4' was not declared in this scope; did you mean 'v4'?
21 | if(b1.size() <= b4.size()){
| ^~
| v4
|
s627550705 | p03637 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
static void Main()
{
Scanner cin = new Scanner();
int N = cin.Int();
int[] A = cin.ArrayInt(N);
int odd = 0, num = 0; //odd:奇数の個数,num:4の倍数の個数
foreach(var x in A)
{
if (x % 2 != 0) odd++;
else if (x % 4 == 0) num++;
}
Console.WriteLine(num - 1 >= odd ? "Yes" : "No");
Console.ReadLine();
}
}
class Scanner //標準入力
{
string[] s;
int i;
char[] cs = new char[] { ' ' };
public Scanner()
{
s = new string[0];
i = 0;
}
public string next()
{
if (i < s.Length) return s[i++];
string st = Console.ReadLine();
while (st == "") st = Console.ReadLine();
s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
if (s.Length == 0) return next();
i = 0;
return s[i++];
}
public int Int()
{
return int.Parse(next());
}
public int[] ArrayInt(int N, int add = 0)
{
int[] Array = new int[N];
for (int i = 0; i < N; i++)
{
Array[i] = Int() + add;
}
return Array;
}
public long Long()
{
return long.Parse(next());
}
public long[] ArrayLong(int N, long add = 0)
{
long[] Array = new long[N];
for (int i = 0; i < N; i++)
{
Array[i] = Long() + add;
}
return Array;
}
public double Double()
{
return double.Parse(next());
}
public double[] ArrayDouble(int N, double add = 0)
{
double[] Array = new double[N];
for (int i = 0; i < N; i++)
{
Array[i] = Double() + add;
}
return Array;
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:26:2: error: expected ';' after class definition
26 | }
| ^
| ;
a.cc: In static member function 'static void Program::Main()':
a.cc:11:9: error: 'Scanner' was not declared in this scope
11 | Scanner cin = new Scanner();
| ^~~~~~~
a.cc:12:17: error: 'cin' was not declared in this scope
12 | int N = cin.Int();
| ^~~
a.cc:13:12: error: structured binding declaration cannot have type 'int'
13 | int[] A = cin.ArrayInt(N);
| ^~
a.cc:13:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:12: error: empty structured binding declaration
a.cc:13:15: error: expected initializer before 'A'
13 | int[] A = cin.ArrayInt(N);
| ^
a.cc:16:17: error: 'var' was not declared in this scope
16 | foreach(var x in A)
| ^~~
a.cc:16:9: error: 'foreach' was not declared in this scope
16 | foreach(var x in A)
| ^~~~~~~
a.cc:22:9: error: 'Console' was not declared in this scope
22 | Console.WriteLine(num - 1 >= odd ? "Yes" : "No");
| ^~~~~~~
a.cc: At global scope:
a.cc:30:5: error: 'string' does not name a type
30 | string[] s;
| ^~~~~~
a.cc:33:9: error: expected unqualified-id before '[' token
33 | char[] cs = new char[] { ' ' };
| ^
a.cc:35:11: error: expected ':' before 'Scanner'
35 | public Scanner()
| ^~~~~~~~
| :
a.cc:41:11: error: expected ':' before 'string'
41 | public string next()
| ^~~~~~~
| :
a.cc:41:12: error: 'string' does not name a type
41 | public string next()
| ^~~~~~
a.cc:52:11: error: expected ':' before 'int'
52 | public int Int()
| ^~~~
| :
a.cc:56:11: error: expected ':' before 'int'
56 | public int[] ArrayInt(int N, int add = 0)
| ^~~~
| :
a.cc:56:15: error: expected unqualified-id before '[' token
56 | public int[] ArrayInt(int N, int add = 0)
| ^
a.cc:66:11: error: expected ':' before 'long'
66 | public long Long()
| ^~~~~
| :
a.cc:71:11: error: expected ':' before 'long'
71 | public long[] ArrayLong(int N, long add = 0)
| ^~~~~
| :
a.cc:71:16: error: expected unqualified-id before '[' token
71 | public long[] ArrayLong(int N, long add = 0)
| ^
a.cc:81:11: error: expected ':' before 'double'
81 | public double Double()
| ^~~~~~~
| :
a.cc:87:11: error: expected ':' before 'double'
87 | public double[] ArrayDouble(int N, double add = 0)
| ^~~~~~~
| :
a.cc:87:18: error: expected unqualified-id before '[' token
87 | public double[] ArrayDouble(int N, double add = 0)
| ^
a.cc:96:2: error: expected ';' after class definition
96 | }
| ^
| ;
a.cc: In constructor 'Scanner::Scanner()':
a.cc:37:9: error: 's' was not declared in this scope
37 | s = new string[0];
| ^
a.cc:37:17: error: 'string' does not name a type
37 | s = new string[0];
| ^~~~~~
a.cc: In member function 'int Scanner::Int()':
a.cc:54:16: error: expected primary-expression before 'int'
54 | return int.Parse(next());
| ^~~
a.cc:54:16: error: expected ';' before 'int'
a.cc:54:19: error: expected unqualified-id before '.' token
54 | return int.Parse(next());
| ^
a.cc: In member function 'long int Scanner::Long()':
a.cc:68:16: error: expected primary-expression before 'long'
68 | return long.Parse(next());
| ^~~~
a.cc:68:16: error: expected ';' before 'long'
a.cc:68:20: error: expected unqualified-id before '.' token
68 | return long.Parse(next());
| ^
a.cc: In member function 'double Scanner::Double()':
a.cc:83:16: error: expected primary-expression before 'double'
83 | return double.Parse(next());
| ^~~~~~
a.cc:83:16: error: expected ';' before 'double'
a.cc:83:22: error: expected unqualified-id before '.' token
83 | return double.Parse(next());
| ^
|
s322919417 | p03637 | Java | package sample.code;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class C4Adjancent {
public static void main(String[] args) {
String nStr = "";
List<Integer> a = new ArrayList<Integer>();
try(Scanner sc = new Scanner(System.in)){
// N入力
System.out.println("Please Input N");
nStr = sc.nextLine();
// aスペース区切り入力
System.out.println("Please Input a");
String aIn = sc.nextLine();
for(String aStr : aIn.split(" ")) {
a.add(Integer.valueOf(aStr));
}
}
int n = Integer.valueOf(nStr);
// 前提
if(n != a.size()) {
return;
}
// a要素の4の倍数カウント
int cnt4 = 0;
// a要素の2の倍数カウント
int cnt2 = 0;
for(int i = 0; i < n; i++) {
// 要素が4の倍数
if(a.get(i) % 4 == 0) {
cnt4++;
}
// 要素が2の倍数
else if(a.get(i) % 2 == 0) {
cnt2++;
}
}
// 2の倍数が二つで4の倍数になるので2個につき1つ要素を短縮4の倍数追加
if(cnt2 != 0){
n -= (cnt2 / 2);
cnt4 += (cnt2 / 2);
}
// 4の倍数が要素の半分以上
if((n /2) <= cnt4) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
| Main.java:7: error: class C4Adjancent is public, should be declared in a file named C4Adjancent.java
public class C4Adjancent {
^
1 error
|
s881205799 | p03637 | C++ | #include<bits/stdc++.h>
using namespace std;
#define REP(i,n) for((i)=0;(i)<(int)(n);(i)++)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
int cnt[3];
int main(){
int n;
cin >> n;
for (int i = 0; i < n; i++){
int a;
cin >> a;
if (a % 4 == 0) cnt[2]++;
else if (a & 2 == 0) cnt[1]++;
else cnt[0]++;
}
cout << (cnt[0] <= cnt[2])?"Yes":"No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:21:43: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
21 | cout << (cnt[0] <= cnt[2])?"Yes":"No" << endl;
| ~~~~~^~~~~~~
|
s118255282 | p03637 | C | #include <stdio.h>
int main(){
int n;
scanf("%d",&n);
int a[n],n4=0,no=0;
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
if(a[i]%4==0){
n4++;
}else if(a[i]%2==1){
no++;
}
}
if(n%2==1){
if(n4>=no-1){
printf("Yes");
return 0;
}
printf("No");
return 0;
}else{
if(n4>=no){
printf("Yes");
return -;
}
printf("No");
return 0;
}
} | main.c: In function 'main':
main.c:25:21: error: expected expression before ';' token
25 | return -;
| ^
|
s725639361 | p03637 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define SORT(a) sort(a.begin(),a.end())
using namespace std;
int main(){
//Seiranchan!
int N,F=0,G=0,K=0;
cin >> N;
vector<int> vec(N);
REP(i,N) cin >> vec[i];
REP(i,N){
if(vec[i]%4==0){
F++;
}else if(vec[i]%2==0){
G++;
}else{
K++;
}
}
if(F*3>=N){
cout << "Yes" <<endl;
}else if(F>=K){
cout << "Yes" <<endl;
}else if(F*3>=(N-G){
cout << "Yes"<<endl;
}else{
cout << "No" <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:30:24: error: expected ')' before '{' token
30 | }else if(F*3>=(N-G){
| ~ ^
| )
a.cc:36:1: error: expected primary-expression before '}' token
36 | }
| ^
|
s912862956 | p03637 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define sPRINT(str) printf(#str "\n")
#define yOUT sPRINT(Yes)
#define nOUT sPRINT(No)
#define YOUT sPRINT(YES)
#define NOUT sPRINT(NO)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
using namespace std;
int main(void)
{
int n, cnt=0, cnt2=0;
cin >> n;
vector<int> a(n);
REP(i, n){
cin >> a[i];
if(a[i] % 4 == 0){
cnt1++;
}
else if(a[i] % 2 == 0){
cnt2++;
}
}
cnt1 += cnt2/2;
if(cnt1 >= n/3.0){
yOUT;
}
else{
nOUT;
}
}
| a.cc: In function 'int main()':
a.cc:30:13: error: 'cnt1' was not declared in this scope; did you mean 'cnt2'?
30 | cnt1++;
| ^~~~
| cnt2
a.cc:37:5: error: 'cnt1' was not declared in this scope; did you mean 'cnt2'?
37 | cnt1 += cnt2/2;
| ^~~~
| cnt2
|
s151865376 | p03637 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int countMul4 = 0;
int countEven = 0;
int countOdd = 0;
for(int i = 0; i < n; i++) {
int num = sc.nextInt();
if (num % 4 == 0) {
countMul4++;
} else if (num % 2 == 0) {
countEven++;
} else {
countOdd++;
}
}
if(countOdd <= countMul4) {
System.out.println("Yes");
} else if (n % 2 != 0 && n / 2 == countMul4) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s043523049 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >>N;
vector<int> a(N);
int zeros=0,ones=0,twoes=0;
for(int i=0;i<N;i++){
cin >>a[i];
if(a[i]%2 != 0){
a[i]=0;
zeros++;
}
else if(a[i]%4 != 0){
a[i]=1;
ones++;
}
else{
a[i]=2;
twoes++;
}
if(twoes>=zeros) cout << "Yes" <<endl;
else cout << "No" <<endl;
} | a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s061401143 | p03637 | 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[i];
if(a[i]%2 != 0) a[i]=0;
else if(a[i]%4 != 0) a[i]=1;
else a[i]=2;
}
int zeros=0,twoes=0;
for(int i=0;i<N;i++){
if(a[i] == 0) zeros++;
}
for(int i=0;i<N;i++){
if(a[i] == 2) twoes++;
}
if(twoes>=zeros && ) cout << "Yes" <<endl;
else cout << "No" <<endl;
} | a.cc: In function 'int main()':
a.cc:21:22: error: expected primary-expression before ')' token
21 | if(twoes>=zeros && ) cout << "Yes" <<endl;
| ^
|
s481173247 | p03637 | 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[i];
if(a[i]%2 != 0) a[i]=0;
else if(a[i]%4 != 0) a[i]=1;
else a[i]=2;
}
sort(a.begin(),a.end());
int fir=0,sec=N;
for(int i=0;i<N;i++){
if(a[i] == 0 && a[i+1] == 1) fir = i+1;
}
for(int i=0;i<N;i++){
if(a[i] == 1 && a[i+1] == 2) sec = i+1;
}
if(N-sec>=fir) cout << "Yes" <<endl;
else cout << "No" <<endl;
}
| a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '>' token
5 | int >N;
| ^
a.cc:6:9: error: 'N' was not declared in this scope
6 | cin >>N;
| ^
|
s343146839 | p03637 | C++ | #include <bits.stdc++.h>
using namespace std;
int main(){
int n,array[100000],bai4=0,bai2=0;;
cin>>n;
for(int i=0;i<n;i++){
cin>>array[i];
if(array[i]%4==0){
bai4++;
}else if(array[i]%2==0){
bai2++;
}
}
n-=(bai4*3);
if(bai2%2){
bai2--;
}
cout<<(n-bai2<=0?"Yes":"No")<<endl;
} | a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory
1 | #include <bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s042215008 | p03637 | C++ | #include<iostream>
#include<climits>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<stdio.h>
#include <string>
#include <complex>
#include <functional>
using namespace std;
//typedef pair<string,string> P;
//double dat[100][100];
//int dp[6][1010];//動的計画法
//int prime[10000001];
//char str[1010][1010];
//vector<pair<int,int> > pc[100001];
//int ABS(int a){return max(a,-a);}
//long long num[100000];
int main(){
int n,g=0,k=0,t=0;
cin>>n;
long long a[n];
for(int i=0;i<n;i++) a[i]=0;
for(int i=0;i<n;i++){
cin>>a[i];
if(a[i]%4==0) g++;
else{
k++;
if(a[i]%2==0) t++;
}
}
k=k-t+1
if(g>=k-1) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:33:16: error: expected ';' before 'if'
33 | k=k-t+1
| ^
| ;
34 | if(g>=k-1) cout<<"Yes"<<endl;
| ~~
a.cc:35:9: error: 'else' without a previous 'if'
35 | else cout<<"No"<<endl;
| ^~~~
|
s959621715 | p03637 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int N;
int a[100005];
int A0=0,A4=0;
cin>>N;
for(int i=0;i<N;i++){
cin>>a[i];
if(a[i]%2==1){A0+=1;}
else if(a[i]%4==0){A4+=1;}
}
if(A4>=A0){cout<<"Yes"<<endl;};
if(A4+1==A0 && A4+A0==N){cout<<"Yes"<<endl;};
if(A4<A0){cout<<"No"<<endl;};
}
return 0; | a.cc:18:1: error: expected unqualified-id before 'return'
18 | return 0;
| ^~~~~~
|
s023845131 | p03637 | C++ | #include <iostream>
using namespace std;
int main(){
int n,a[100005];
cin>>n;
for(int i=0;i<n;i++)cin>>a[i];
int two=0,four=0,no=0;
for(int i=0;i<n;i++){
if(a[i]%4==0)four++;
else if(a[i]%2==0)two++;
else no++;
}
no+=two%2;
if(four>=no/2) cout << “Yes”<<endl;
else cout << “No”<<endl;
} | a.cc:16:24: error: extended character “ is not valid in an identifier
16 | if(four>=no/2) cout << “Yes”<<endl;
| ^
a.cc:16:24: error: extended character ” is not valid in an identifier
a.cc:17:14: error: extended character “ is not valid in an identifier
17 | else cout << “No”<<endl;
| ^
a.cc:17:14: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:16:24: error: '\U0000201cYes\U0000201d' was not declared in this scope
16 | if(four>=no/2) cout << “Yes”<<endl;
| ^~~~~
a.cc:17:14: error: '\U0000201cNo\U0000201d' was not declared in this scope
17 | else cout << “No”<<endl;
| ^~~~
|
s988117777 | p03637 | C++ | #include <iostream>
#include <algorithm>
#include<vector>
using namespace std;
int main(void){
int n,y=0,q=0,x;
cin>>n;
for(int i=0;i<n;i++){
cin >> x;
if(x%4 == 0) y++;
if(x%2 == 0) q++;
}
int a = n-y-q;
if(y>=a) cout<<"Yes";
else if(!x&&y == n/2)) cout<<"Yes";
else cout<<"No";
} | a.cc: In function 'int main()':
a.cc:16:26: error: expected primary-expression before ')' token
16 | else if(!x&&y == n/2)) cout<<"Yes";
| ^
|
s045784400 | p03637 | C++ | #include<iostream>
using namespace std;
int main(){
int n,cnt[3]={0},a;
string ans;
cin >> n;
for(int i=0;i<n;i++){
cin >> a;
if(a%2==0){
if(a%4==0){
cnt[0]++;
}else {
cnt[1]++;
}
}else{
cnt[2]++;
}
}
if(cnt[1]>=1){
if(cnt[0]>=cnt[2])ans="Yes";
else ans="No";
}
}else{
if(cnt[0]>=cnt[2]-1)ans="Yes";
else ans = "No";
}
cout << ans<<endl;
}
| a.cc:23:4: error: expected unqualified-id before 'else'
23 | }else{
| ^~~~
a.cc:27:3: error: 'cout' does not name a type
27 | cout << ans<<endl;
| ^~~~
a.cc:28:1: error: expected declaration before '}' token
28 | }
| ^
|
s854272999 | p03637 | C++ | #include <bits/stdc++.h>
typedef unsigned long long int ull;
using namespace std;
int main()
{
int a,b,c=0,d=0;
cin>>a;
int ar[a]=;
for(int i=0;i<a;i++)
{
cin>>ar[i];
if(ar[i]%4==0)
{
c++;
}
if(ar[i]%4!=0)
{
d++;
}
}
if(d%c==0&&d/2==c)
{
cout<<"YES";
}
else
{
cout<<"NO";
}
}
| a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before ';' token
8 | int ar[a]=;
| ^
|
s960111870 | p03637 | C++ | #include<iostream>
using namespace std;
int main(){
int a,i;
vector<int>b(a);
for(i=0;i<a;i++)cin>>b[i];
for(i=0;i<a-1;i++)
if(b[i]*b[i+1]%4!=0){
cout<<"No";
return 0;
}
cout<<"Yes";
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'vector' was not declared in this scope
5 | vector<int>b(a);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | using namespace std;
a.cc:5:16: error: expected primary-expression before 'int'
5 | vector<int>b(a);
| ^~~
a.cc:6:30: error: 'b' was not declared in this scope
6 | for(i=0;i<a;i++)cin>>b[i];
| ^
a.cc:8:12: error: 'b' was not declared in this scope
8 | if(b[i]*b[i+1]%4!=0){
| ^
|
s462226644 | p03637 | C++ | #include <iostream>
using namespace std;
int main(){
int mod0=0,mod2=0;
int n;
cin >> n;
for (int i=0; i<n; i++){
int x;
cin >> x;
if (x%4==2){
mod2++;
}else if (x%4==0){
mod0++;
}
}
if (mod2){
if (n-mod2-mod0<=mod0){
cout << "Yes" << endl;
}else {
cout << "No" << endl;
}
}
else{
if (n/2<=mod0){
cout <<"Yes" << endl;
}else {
cout "No" << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:27:17: error: expected ';' before string constant
27 | cout "No" << endl;
| ^~~~~
| ;
|
s950424449 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = (int)(1e5 + 5);
using ll = long long int;
int n;
ll a[MAX_N];
int over2;
int just1;
int just0;
int main(void){
// Here your code !
scanf("%d", &n);
for (int i = 0; i < n; ++i) {
scanf("%lld\n", &(a[i]));
}
for (int i = 0; i < n; ++i) {
int cnt = 0;
while (true) {
if (a[i] % 2 == 0) {
a[i] /= 2;
cnt += 1;
}
else {
if (cnt >= 2) {
over2 += 1;
}
else if (cnt == 1) {
just1 += 1;
}
else {
just0 += 1;
}
break;
}
}
}
int threshold = (n % 2 == 0) ? n / 2 : (n - 1) / 2;
if ((just1 + over2 + over2) >= n)) {
// cout << over2 << "_" << threshold << "_" << over1 << endl;
printf("Yes\n");
}
else printf("No\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:47:36: error: expected primary-expression before ')' token
47 | if ((just1 + over2 + over2) >= n)) {
| ^
|
s110129211 | p03637 | C++ | #include<iostream>
using namespace std;
int N;
int A[3];
int main(){
A[0] = 0;
A[1] = 0;
A[2] = 0;
cin >> N;
int a;
for(int i = 0; i < N; i++){
cin >> a;
if(a % 4 == 0){
A[0]++;
}else if(a % 2 == 0){
A[1]++;
}else{
A[2]++;
}
}
if(A[1]){
if(A[2] <= A[0]){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}else{
if(A[2] <= A[0] + 1){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
return 0;
}
] | a.cc:43:1: error: expected unqualified-id before ']' token
43 | ]
| ^
|
s325989403 | p03637 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int[] a = new int[N];
int[] count = new int[3];
for (int i = 0; i < N; i++){
a[i] = scanner.nextInt();
}
for (int i = 0; i < N; i++){
if (a[i] % 4 == 1 || a[i] % 4 == 3){
count[0]++;
} else if (a[i] % 4 == 2){
count[1]++;
} else if (a[i] % 4 == 0){
count[2]++;
}
}
if (N >= 4) {
if (count[0] == count[2] || count[0] < count[2]){
System.out.println("Yes");
} else {
System.out.println("No");
}
}
if (N == 3){
if (count[0] == 2 & count[2] == 1){
System.out.println("Yes");
} else if (count[0] == 1 & count[1] == 1 & count[2] == 1){
System.out.println("Yes");
} else if (count[0] == 1 & count[2] == 2){
System.out.println("Yes");
} else if (count[0] == 0){
System.out.println("Yes");
} else if (count[1] == 3){
System.out.println("Yes");
} else {
System.out.println("No");
}
}
if (N == 2){
if (count[0] == 0){
System.out.println("Yes");
} else if (count[0] == 1 & count[2] == 1){
System.out.println("Yes");
} else if (count[1] == 1 & count[2] == 1){
System.out.println("Yes");
} else if (count[2] = 2){
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
}
| Main.java:50: error: incompatible types: int cannot be converted to boolean
} else if (count[2] = 2){
^
1 error
|
s929818056 | p03637 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
using namespace std;
typedef long long ll;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define rrep(i,a,n) for(int i=(a-1);i>=n;i--)
int main(){
ll n;
cin>>n;
ll a[100010];
ll cnt=0;
ll ct=0;
ll c=0;
rep(i,0,n){
cin>>a[i];
if(a[i]%4==0)cnt++;
else if(a[i]%2==0)ct++;
else c++;
}
if(c4<c){
cout<<"No"<<endl;
}
else{
cout<<"Yes"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:25:12: error: 'c4' was not declared in this scope; did you mean 'c'?
25 | if(c4<c){
| ^~
| c
|
s161999884 | p03637 | C | #include <iostream>
using namespace std;
int main() {
int N;
int two = 0, four = 0;
cin >> N;
for(int i = 0; i < N; i++) {
int a;
cin >> a;
if(a % 4 == 2) two++;
if(a % 4 == 0) four++;
}
int odd = N - two - four;
if(two > 0) odd++;
if(odd <= four + 1) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s416058619 | p03637 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N);
int cnt0 = 0, cnt1 = 0, cnt2 = 0;
for(int i = 0; i < N; i++) {
int a;
cin >> a;
int cnt = 0;
while(a % 2 == 0) {
a /= 2;
cnt++;
}
if (cnt == 0) cnt0++;
if (cnt == 1) cnt1++;
if (cnt >= 2) cnt2++;
}
int now = cnt2 > 0 ? 1 : 0;
while(cnt2 >= 0 && now < N) {
now += 2;
cnt2--;
}
while(cnt1 >= 0 && now < N) {
now++;
cnt1--;
}
if (now >= N) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
8 | vector<int> A(N);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
2 |
a.cc:8:10: error: expected primary-expression before 'int'
8 | vector<int> A(N);
| ^~~
|
s119255192 | p03637 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N);
int cnt0 = 0, cnt1 = 0, cnt2 = 0;
for(int i = 0; i < N; i++) {
cin >> A[i];
int cnt = 0;
while(A[i] % 2 == 0) {
A[i] /= 2;
cnt++;
}
if (cnt == 0) cnt0++;
if (cnt == 1) cnt1++;
if (cnt >= 2) cnt2++;
}
int now = cnt2 > 0 ? 1 : 0;
while(cnt2 >= 0 && now < N) {
now += 2;
cnt2--;
}
while(cnt1 >= 0 && now < N) {
now++;
cnt1--;
}
if (now >= N) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
8 | vector<int> A(N);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
2 |
a.cc:8:10: error: expected primary-expression before 'int'
8 | vector<int> A(N);
| ^~~
a.cc:11:12: error: 'A' was not declared in this scope
11 | cin >> A[i];
| ^
|
s743390768 | p03637 | C++ | #include <iostream>;
using namespace std;
cin>>x=4>>;
at least two numbers get four;
cout>>"yes">>; | a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <iostream>;
| ^
a.cc:3:1: error: 'cin' does not name a type
3 | cin>>x=4>>;
| ^~~
a.cc:4:1: error: 'at' does not name a type
4 | at least two numbers get four;
| ^~
a.cc:5:1: error: 'cout' does not name a type
5 | cout>>"yes">>;
| ^~~~
|
s867578441 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n,m[100],a,b;
string s;
cin>>n;
for(int i=0;i<n;i++)
cin>>m[i];
for(int i=0;i<n;i++)
a=m[i]*[i+1];
b=m[i-1]*m[i+1];
if(a%4==1&&b%4==0)
s="NO";
if(a%4==0&&b%4==1)
s="YES";
cout<<s;
}
| a.cc: In function 'int main()':
a.cc:11:18: error: expected ',' before '+' token
11 | a=m[i]*[i+1];
| ^
| ,
a.cc:11:18: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:11:21: error: expected '{' before ';' token
11 | a=m[i]*[i+1];
| ^
a.cc: In function 'int main()':
a.cc:11:15: error: no match for 'operator*' (operand types are 'int' and 'main()::<lambda()>')
11 | a=m[i]*[i+1];
| ~~~~^~~~~~
| | |
| | main()::<lambda()>
| int
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/complex:400:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const complex<_Tp>&)'
400 | operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:400:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: mismatched types 'const std::complex<_Tp>' and 'int'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/complex:409:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const _Tp&)'
409 | operator*(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:409:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: mismatched types 'const std::complex<_Tp>' and 'int'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/complex:418:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const _Tp&, const complex<_Tp>&)'
418 | operator*(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:418:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: 'main()::<lambda()>' is not derived from 'const std::complex<_Tp>'
11 | a=m[i]*[i+1];
| ^
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:11:21: note: 'main()::<lambda()>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const valarray<_Tp>&, const valarray<_Tp>&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:11:21: note: mismatched types 'const std::valarray<_Tp>' and 'int'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:11:21: note: mismatched types 'const std::valarray<_Tp>' and 'int'
11 | a=m[i]*[i+1];
| ^
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:11:21: note: 'main()::<lambda()>' is not derived from 'const std::valarray<_Tp>'
11 | a=m[i]*[i+1];
| ^
a.cc:12:13: error: 'i' was not declared in this scope
12 | b=m[i-1]*m[i+1];
| ^
|
s903490714 | p03637 | C++ | #include<bits/stdc++.h>
#include <conio.h>
#include <string>
using namespace std;
int main(){
long long n ,a ,i ,j=26 ;
cin >>n >>a;
if(a == 14){
cout<<"64509974703297150976";
}
if(a == 15)
cout<<"1677259342285725925376";
if(a == 16)
cout<<"43608742899428874059776";
if(a == 17)
cout<<"1133827315385150725554176";
if(a == 18)
cout<<"29479510200013918864408576";
if(a == 19)
cout<<"766467265200361890474622976";
if(a == 20)
cout<<"19928148895209409152340197376";
if(a == 21)
cout<<"518131871275444637960845131776";
if(a == 22)
cout<<"13471428653161560586981973426176";
if(a < 14){
for(i = 1 ; i < a ; i++){
j*=26;
}
cout<<j;
}
for(i = 0 ; i < n ; i++){
cout<< 0;
}
return 0;
}
| a.cc:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s555298040 | p03637 | C++ | #include<bits/stdc++.h>
#include <conio.h>
#include <string>
using namespace std;
long long s ,n ,m ,a[100001] , dp[100001];
int main(){
int i ,j ;
cin >> n;
dp[0]=1000000;
for(i = 1 ; i <= n ; i++){
cin>>a[i];
}
for(i = 1 ; i <= n ; i++){
for(j = 1 ; j <= n ; j++ ){
if(a[i]*a[j]%4==0&&i!=dp[i-1]&&j!=dp[i-1]){
m++;
dp[i]=j;
break;
}
else{
dp[i]=dp[i-1];
}
//cout << m << " " << dp[i-1] << endl;
}
}
if(m >= n){
cout<<"Yes";
}
else{
cout<<"No";
}
return 0;
}
| a.cc:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s947999302 | p03637 | C++ | #include<bits/stdc++.h>
#include <conio.h>
#include <string>
using namespace std;
long long s ,n ,m ,a[100001] ,dp[100001] ,d[10001];
int main(){
int i ,j ;
cin >> n;
dp[0]=1000000;
for(i = 1 ; i <= n ; i++){
cin>>a[i];
}
for(i = 1 ; i <= n ; i++){
for(j = 1 ; j <= n ; j++ ){
if(a[i]*a[j]%4==0&& i != j&& dp[i-1]!=dp[i-2]){
m++;
dp[i]=j;
break;
}
//cout << m << " " << dp[i-1] << endl;
}
}
if(m+1 >= n){
cout<<"Yes";
}
else{
cout<<"No";
}
return 0;
}
| a.cc:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s816152843 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n,m[100],a,b;
string s;
cin>>n;
for(int i=0;i<n;i++)
cin>>m[i];
for(int i=0;i<n;i++)
a=m[i]*m[i+1];
b=m[i-1]*m[i+1];
if(a%4==1&&b%4==0)
s="NO";
if(a%4==0&&b%4==1)
s="YES";
cout<<s;
}
| a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
12 | b=m[i-1]*m[i+1];
| ^
|
s581827596 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
long long x[100001];
int main() {
long long a, b, c=0, d, n;
cin >> a;
for (int i=0; i < n; i ++){
cin >> x[i];
}
for (int i=0; i < n-1; i ++){
if ((x[i] * x[i+1]) % 4 != 0){
c ++;
}
}
if (c == 0){
cout << "Yes";
}else {
cout << "No"
}
}
| a.cc: In function 'int main()':
a.cc:23:29: error: expected ';' before '}' token
23 | cout << "No"
| ^
| ;
24 | }
| ~
|
s096039198 | p03637 | C++ | #include <iostream>
using namespace std;
long long x[100001];
int main() {
long long a, b, c=0, d;
cin >> a;
for (int i=0; i < n; i ++){
cin >> x[i];
}
for (int i=0; i < n-1; i ++){
if ((x[i] * x[i+1]) % 4 != 0){
c ++;
}
}
if (c == 0){
cout << "Yes";
}else {
cout << "No"
}
}
| a.cc: In function 'int main()':
a.cc:12:27: error: 'n' was not declared in this scope
12 | for (int i=0; i < n; i ++){
| ^
a.cc:15:27: error: 'n' was not declared in this scope
15 | for (int i=0; i < n-1; i ++){
| ^
a.cc:23:29: error: expected ';' before '}' token
23 | cout << "No"
| ^
| ;
24 | }
| ~
|
s484816563 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
long long x[100001];
int main() {
long long a, b, c=0, d;
cin >> a;
for (int i=0; i < n; i ++){
cin >> x[i];
}
for (int i=0; i < n-1; i ++){
if ((x[i] * x[i+1]) % 4 != 0){
c ++;
}
}
if (c == 0){
cout << "Yes";
}else {
cout << "No"
}
}
| a.cc: In function 'int main()':
a.cc:12:27: error: 'n' was not declared in this scope
12 | for (int i=0; i < n; i ++){
| ^
a.cc:15:27: error: 'n' was not declared in this scope
15 | for (int i=0; i < n-1; i ++){
| ^
a.cc:23:29: error: expected ';' before '}' token
23 | cout << "No"
| ^
| ;
24 | }
| ~
|
s549854170 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
long long x[100001];
int main() {
long long a, b, c=0, d;
cin >> a;
for (int i=0; i < n; i ++){
cin >> x[i];
}
for (int i=0; i < n-1; i ++){
if ((x[i] * x[i+1]) % 4 != 0){
c ++;
}
}
if (c == 0){
cout << "Yes";
}else {
cout << "No"
}
}
| a.cc: In function 'int main()':
a.cc:12:27: error: 'n' was not declared in this scope
12 | for (int i=0; i < n; i ++){
| ^
a.cc:15:27: error: 'n' was not declared in this scope
15 | for (int i=0; i < n-1; i ++){
| ^
a.cc:23:29: error: expected ';' before '}' token
23 | cout << "No"
| ^
| ;
24 | }
| ~
|
s077349879 | p03637 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;
int main(){
int n;cin>>n;
vector<int>num(n);
int yon=0,ni=0;
for(int i=0;i<n;i++){
cin>>num[i];
if(num[i]%4==0)yon++;
else if(ni[i]%2==0)ni++;
}
if(yon>=(n)/2-ni/2)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:19:15: error: invalid types 'int[int]' for array subscript
19 | else if(ni[i]%2==0)ni++;
| ^
|
s616700303 | p03637 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int a[N];
int c4 = 0;
int c1 = 0;
int c2=0;
for(int i=0;i<N;i++){
cin >> a[i];
if(a[i]%4==0){
c4++;
} else if(a[i]%2==1) c1++;
else if(a[i]%2==0) c2++;
}
if(c1==0 && (c2>1 || c4>=1)) cout <<"Yes\n";
if(c1==1 && c4>=1) cout <<"Yes\n";
else if(c1>1 && c2==0 && c4>=c1-1) cout <<"Yes\n";
else if(c1>1 && c2>=1 &6 c4>=c1) cout <<"Yes\n";
else cout <<"No\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:22:33: error: expected ')' before 'c4'
22 | else if(c1>1 && c2>=1 &6 c4>=c1) cout <<"Yes\n";
| ~ ^~~
| )
|
s566206797 | p03637 | C++ | // ConsoleApplication12.cpp : アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include<iostream>
#include<vector>
using namespace std;
int main()
{
int N,i,m4,m2,m1;
cin >> N;
m4 = 0;
m2 = 0;
m1 = 0;
vector<int>A(N);
for (i = 0; i < N; i++) {
cin >> A[i];
}
for (i = 0; i < N; i++) {
if (A[i] % 4 == 0)
m4++;
else if (A[i] % 2 == 0)
m2++;
else if (A[i] % 2 == 1)
m1++;
}
if (m4 >= m1)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s281325714 | p03637 | Java | // ------------------------------------
// Date:2018/ 3/13
// Problem:ABC 069 4-Adjacent c.cpp
//
// ------------------------------------
#include <bits/stdc++.h>
using namespace std;
#define EACH(i,a) for (auto&& i : a)
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define debug(x) cerr << #x << ":" << x << endl
typedef long long ll;
static const int MOD = 1000000007;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
int a, four, two, other;
four = two = other = 0;
REP(i, N) {
cin >> a;
if (a % 4 == 0) four++;
else if (a % 2 == 0) two++;
else other++;
}
bool ok = true;
if (two > 0) {
if (other > four) ok = false;
} else {
if (other - 1 > four) ok = false;
}
cout << (ok ? "Yes" : "No") << endl;
return 0;
}
| Main.java:7: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:7: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
^
Main.java:11: error: illegal character: '#'
#define EACH(i,a) for (auto&& i : a)
^
Main.java:11: error: class, interface, enum, or record expected
#define EACH(i,a) for (auto&& i : a)
^
Main.java:12: error: illegal character: '#'
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
^
Main.java:12: error: class, interface, enum, or record expected
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
^
Main.java:12: error: class, interface, enum, or record expected
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
^
Main.java:13: error: illegal character: '#'
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
^
Main.java:13: error: class, interface, enum, or record expected
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
^
Main.java:13: error: class, interface, enum, or record expected
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
^
Main.java:14: error: illegal character: '#'
#define REP(i,n) FOR(i,0,n)
^
Main.java:15: error: illegal character: '#'
#define RREP(i,n) RFOR(i,0,n)
^
Main.java:16: error: illegal character: '#'
#define ALL(a) (a).begin(),(a).end()
^
Main.java:17: error: illegal character: '#'
#define debug(x) cerr << #x << ":" << x << endl
^
Main.java:17: error: illegal character: '#'
#define debug(x) cerr << #x << ":" << x << endl
^
Main.java:21: error: class, interface, enum, or record expected
static const int MOD = 1000000007;
^
Main.java:26: error: not a statement
ios::sync_with_stdio(false);
^
Main.java:29: error: not a statement
cin >> N;
^
Main.java:33: error: not a statement
cin >> a;
^
Main.java:46: error: not a statement
cout << (ok ? "Yes" : "No") << endl;
^
Main.java:23: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
(use --enable-preview to enable unnamed classes)
Main.java:26: error: ';' expected
ios::sync_with_stdio(false);
^
Main.java:32: error: ';' expected
REP(i, N) {
^
23 errors
|
s383278959 | p03637 | Java | import java.io.*;
public class c {
public static void main(String[] args) {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
int f = 0;
int t = 0;
int other = 0;
boolean ok = true;
try {
String str = br.readLine();
int N = Integer.parseInt(str);
str = br.readLine();
String[] data = str.split(" ", 0);
for (int i = 0; i < N; ++i) {
int tmp = Integer.parseInt(data[i]);
if (tmp % 4 == 0) f++;
else if (tmp % 2 == 0) t++;
else other++;
}
if (t > 0) {
if (other > f) ok = false;
} else {
if (other - 1 > f) ok = false;
}
System.out.println((ok ? "Yes" : "No"));
} catch(IOException e) {
} finally {
try {
br.close();
} catch(IOException e) {
} finally {
}
}
}
}
| Main.java:3: error: class c is public, should be declared in a file named c.java
public class c {
^
1 error
|
s313908194 | p03637 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<string>
#include<queue>
#include<vector>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ
#define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
int n;
ll a[100010];
int c[5];
int main(){
cin>>n;
REP(i,n){
cin>>a[i];
if(a[i]%4==0){
a[i]=4;
}else if(a[i]%2==0){
a[i]=2;
}else{
a[i]=1;
}
c[a[i]]++;
}
int f2=0;
if(c[2])f2==1;
if(c[4]==0){
if(c[2]==n)cout<<"Yes";
else cout<<"No";
}else{
if(c[4]+1>=c[1]+f2)cout<<"Yes";
else cout<<"No";
}
| a.cc: In function 'int main()':
a.cc:38:6: error: expected '}' at end of input
38 | }
| ^
a.cc:16:11: note: to match this '{'
16 | int main(){
| ^
|
s043477852 | p03637 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<string>
#include<queue>
#include<vector>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ
#define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
int n;
ll a[100010];
int c[5];
int main(){
cin>>n;
REP(i,n){
cin>>a[i];
if(a[i]%4==0){
a[i]=4;
}else if(a[i]%2==0){
a[i]=2;
}else{
a[i]=1;
}
c[a[i]]++;
}
int f2=0;
if(c[2])f2==1;
if(c[4]==0){
if(c[2]==n)cout<<"Yes";
else cout<<"No";
}else{
if(c[4]+1>=c[1]+k)cout<<"Yes";
else cout<<"No";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:36:25: error: 'k' was not declared in this scope
36 | if(c[4]+1>=c[1]+k)cout<<"Yes";
| ^
|
s129692766 | p03637 | C++ | //#include <bits/stdc++.h>
#include<iostream>
#include<string>
#include<queue>
#include<vector>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ
#define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
int n;
ll a[100010];
int c[5];
int main(){
cin>>n;
REP(i,n){
cin>>a[i];
if(a[i]%4==0){
a[i]=4;
}else if(a[i]%2==0){
a[i]=2;
}else{
a[i]=1;
}
c[a[i]]++;
}
int f2=0;
if(c[2])f2==1;
if(c[4]==0){
if(c[2]==n)cout<<"Yes";
else cout<<"No";
}else{
if(c[4]+1>=c[1]+k)cout<<"Yes";
else cout<<"No";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:36:25: error: 'k' was not declared in this scope
36 | if(c[4]+1>=c[1]+k)cout<<"Yes";
| ^
|
s626697353 | p03637 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<string>
#include<queue>
#include<vector>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ
#define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
int n;
ll a[100010];
int c[5];
int main(){
cin>>n;
REP(i,n){
cin>>a[i];
if(a[i]%4==0){
a[i]=4;
}else if(a[i]%2==0){
a[i]=2;
}else{
a[i]=1;
}
c[a[i]]++;
}
int f2=0;
if(c[2])f2==1;
if(f2){
if(c[0]>=c[1]+c[3])cout<<"Yes";
cout<<"No";
}else{
if(c[0]>=floor(n/2))cout<<"Yes"
else cout<<"No";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:37:40: error: expected ';' before 'else'
37 | if(c[0]>=floor(n/2))cout<<"Yes"
| ^
| ;
38 | else cout<<"No";
| ~~~~
|
s796636901 | p03637 | C++ | //#include <bits/stdc++.h>
#include<iostream>
#include<string>
#include<queue>
#include<vector>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ
#define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
int n;
ll a[100010];
int c[5];
int main(){
cin>>n;
REP(i,n){
cin>>a[i];
if(a[i]%4==0){
a[i]=4;
}else if(a[i]%2==0){
a[i]=2;
}else{
a[i]=1;
}
c[a[i]]++;
}
int f2=0;
if(c[2])f2==1;
if(f2){
if(c[0]>=c[1]+c[3])cout<<"Yes";
cout<<"No";
}else{
if(c[0]>=floor(n/2))cout<<"Yes"
else cout<<"No";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:37:18: error: 'floor' was not declared in this scope
37 | if(c[0]>=floor(n/2))cout<<"Yes"
| ^~~~~
a.cc:37:40: error: expected ';' before 'else'
37 | if(c[0]>=floor(n/2))cout<<"Yes"
| ^
| ;
38 | else cout<<"No";
| ~~~~
|
s524425818 | p03637 | C++ | using namespace std;
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <limits>
#include <climits>
#include <vector>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <map>
#include <numeric>
typedef long long ll;
typedef pair<int,int> p;
int main()
{
int n;
cin >> n;
vector<ll> v(n,0);
int countA = 0;
int countB = 0;
int countC = 0;
for (int i = 0; i < n; i++)
{
cin >> v[i];
if (v[i] % 4 == 0){
countA++;
}else if (v[i] % 2 == 0){
countB++;
}else{
countC++;
}
}
if (conutB == 1)
{
countC++;
}else if (countB > 1)
{
countC += 2;
}
if ((countC <= countA * 2))
{
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:39:7: error: 'conutB' was not declared in this scope; did you mean 'countB'?
39 | if (conutB == 1)
| ^~~~~~
| countB
|
s319301689 | p03637 | C++ | #include <bits/stdc++.h>
#include <vector>
#define REP(i,n) for(int i=0;i<n;i++)
#define MOD 1000000007
using namespace std;
typedef long long ll;
int main(){
ll n;
cin>>n;
ll a[n];
REP(i,n){
cin>>a[i];
}
ll b4,b1;
b4 =0;
b1 =0;
REP(i,n){
if(b%2==1){
b1++;
}else if(b%4==0){
b4++;
}
}
if(b4>=b1){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:19:8: error: 'b' was not declared in this scope
19 | if(b%2==1){
| ^
|
s220293562 | p03637 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int a[] = new int[N];
int re1 = 0,re2=0,re4=0;
int ans = 0;
for (int i = 0; N > i; i++) {
a[i] = sc.nextInt();
if (a[i] % 2 == 0) {
re4++;
}
if (a[i] == 2) {
re2++;
}
}
re1=N-re4;
re4=re4-re2;
if (re1<=re4) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s342012927 | p03637 | C++ | #include <string>
#include <vector>
#include <algorithm>
#include <limits.h>
typedef long long ll;
using namespace std;
int n;
int main(int argc,char const* argv[])
{
cin >> n;
int zerotimes=0,onetimes=0,moretimes=0;
vector<ll> a(n,0);
for(int i=0;i<n;i++)
{
cin >> a[i];
}
for(int i=0;i<n;i++)
{
if(a[i] % 2 ==0 && a[i] % 4 !=0) onetimes++;
else if(a[i] % 4 ==0) moretimes++;
else zerotimes++;
}
if(onetimes==0)
{
if(zerotimes<=(moretimes+1))
{
cout << "Yes" << endl;
return 0;
}
else
{
cout << "No" << endl;
return 0;
}
}
else
{
if(zerotimes<=(moretimes))
{
cout << "Yes" << endl;
return 0;
}
else
{
cout << "No" << endl;
return 0;
}
}
return 0;
}
| a.cc: In function 'int main(int, const char**)':
a.cc:10:3: error: 'cin' was not declared in this scope
10 | cin >> n;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include <limits.h>
+++ |+#include <iostream>
5 | typedef long long ll;
a.cc:27:11: error: 'cout' was not declared in this scope
27 | cout << "Yes" << endl;
| ^~~~
a.cc:27:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:28: error: 'endl' was not declared in this scope
27 | cout << "Yes" << endl;
| ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
4 | #include <limits.h>
+++ |+#include <ostream>
5 | typedef long long ll;
a.cc:32:11: error: 'cout' was not declared in this scope
32 | cout << "No" << endl;
| ^~~~
a.cc:32:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:27: error: 'endl' was not declared in this scope
32 | cout << "No" << endl;
| ^~~~
a.cc:32:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:40:11: error: 'cout' was not declared in this scope
40 | cout << "Yes" << endl;
| ^~~~
a.cc:40:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:40:28: error: 'endl' was not declared in this scope
40 | cout << "Yes" << endl;
| ^~~~
a.cc:40:28: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:45:11: error: 'cout' was not declared in this scope
45 | cout << "No" << endl;
| ^~~~
a.cc:45:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:45:27: error: 'endl' was not declared in this scope
45 | cout << "No" << endl;
| ^~~~
a.cc:45:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s478261689 | p03637 | C++ | #include<iostream>
using namespace std;
#define index 10000
int N = 0;
float an[index+1];
int main(){
cin>>N;
for(int i = 0;i<N;++i){
cin>>an[i];
}
int one=0;
int twn=0;
int forth=0;
for(int i = 0; i<N;++i){
if(an[i]%2==0){
an[i]=an[i]/2;
if(an[i]%2==0){
forth++;
}else{
twn++;
}
}else{
one++;
}
}
if(twn==0&&one<=forth+1){
cout<<"Yes"<<endl;
}else if(one<=forth){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:15:25: error: invalid operands of types 'float' and 'int' to binary 'operator%'
15 | if(an[i]%2==0){
| ~~~~~^~
| | |
| | int
| float
a.cc:17:33: error: invalid operands of types 'float' and 'int' to binary 'operator%'
17 | if(an[i]%2==0){
| ~~~~~^~
| | |
| | int
| float
|
s513034770 | p03637 | C++ | #include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
/*
//#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
*/
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
/*
//#if __cplusplus >= 201103L
#include <array>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
*/
using namespace std;
#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb(s) push_back(s)
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define mp(a,b) make_pair(a,b)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define uni(x) x.erase(unique(all(x)),x.end())
template<class T,class U>inline void chmin(T &t,U f){if(t>f)t=f;}
template<class T,class U>inline void chmax(T &t,U f){if(t<f)t=f;}
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) > (b) ? (b) : (a))
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> PPI;
#define INF INT_MAX/3
#define MAX_N 1000
#define M_INF 1000000000
int n,m,v,i;
void solve(){
cin.tie(0);
ios::sync_with_stdio(false);
cin>>n;
ll l,cnt[4]={0};
rep(i,n){
cin>>l;
cnt[l%4]++;
}
ll sum = cnt[1] + cnt[2] + cnt[3];
if((cnt[0]-cnt[1]-cnt[3]-cnt[2]) == cnt[0]||sum <= cnt[0] * 2 )|| ((cnt[2]-cnt[1]-cnt[3]-cnt[0]) == cnt[2] || cnt[2]-cnt[1]-cnt[3] + cnt[0] == cnt[2] + cnt[0] ) ) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
int main(){
solve();
return 0;
}
| a.cc: In function 'void solve()':
a.cc:123:66: error: expected primary-expression before '||' token
123 | if((cnt[0]-cnt[1]-cnt[3]-cnt[2]) == cnt[0]||sum <= cnt[0] * 2 )|| ((cnt[2]-cnt[1]-cnt[3]-cnt[0]) == cnt[2] || cnt[2]-cnt[1]-cnt[3] + cnt[0] == cnt[2] + cnt[0] ) ) cout<<"Yes"<<endl;
| ^~
|
s068580048 | p03637 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <stack>
#include <array>
#include <queue>
#include <string>
#include <vector>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <new>
#include <map>
#define ESP (1e-13)
#define INF 2000000000
#define ll long long
using namespace std;
int main() {
int N;
int a;
int j1=0,j2=0,j4=0;
for (int i = 0;i < N;i++) {
cin >> a;
if (a % 4 == 0) j4++;
if (a % 4 == 2) j2++;
if (a % 2 == 1) j1++;
}
if (j1<=j4||(j1==j4+1&&j2==0) {
cout << "Yes" << endl;
return 0;
}
else {
cout << "No" << endl;
return 0;
}
}
| a.cc: In function 'int main()':
a.cc:30:38: error: expected ')' before '{' token
30 | if (j1<=j4||(j1==j4+1&&j2==0) {
| ~ ^~
| )
a.cc:39:1: error: expected primary-expression before '}' token
39 | }
| ^
|
s997252871 | p03637 | Java | package CompeteProgramming;
import java.util.Scanner;
public class ABC069C {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int a[] = new int[n];
int b = 0, c = 0;
for (int i = 0; i < n; i++) {
a[i] = scan.nextInt();
if (a[i] % 4 == 0) {
b++;
} else if (a[i] % 2 == 0) {
c++;
}
}
boolean flag = false;
if (n <= b * 2 + 1) {
flag = true;
} else if (n - b * 2 <= c) {
flag = true;
}
if (flag) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
| Main.java:5: error: class ABC069C is public, should be declared in a file named ABC069C.java
public class ABC069C {
^
1 error
|
s438940348 | p03637 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
long long a;
int one = 0, two = 0, four = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a;
if (a % 2 == 0) two++;
else if (a % 4 == 0) four++;
else one++;
}
one = one - four;
if (one < 0) one = 0;
if (one > 0) cout << "No" << endl;
else cout << "Yes" << endl:
return 0;
}
| a.cc: In function 'int main()':
a.cc:22:29: error: expected ';' before ':' token
22 | else cout << "Yes" << endl:
| ^
| ;
|
s883989164 | p03637 | C | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<ctime>
#include<queue>
using namespace std;
int n;
int q[1001];
bool havetwo=0;
int four,one;
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
int shuru;cin>>shuru;if(shuru%4==0)four++;
if(shuru&1)one++;
if(shuru%2==0&&shuru%4!=0)havetwo=1;
}
if(havetwo==0){
if(one<=four+1)cout<<"Yes";
else cout<<"No";
}
else {
if(one<=four)cout<<"Yes";
else cout<<"No";
}
return 0;
}
| main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s038431406 | p03637 | C++ | #include <algorithm>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
void put_yes() {
puts("Yes");
}
void put_no() {
puts("No");
}
int main(int argc, char *argv[])
{
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N; cin.ignore();
// cout << N << endl;
string str;
getline(cin, str);
stringstream ss(str);
vector<int> a_vec;
for (int i; !ss.eof();){
ss >> i;
a_vec.push_back(i);
}
// cout << "a_vec" << endl;
for (auto i: a_vec) {
// cout << i << endl;
}
// いずれかのグループへ分かれる
int divisible_by_four = 0;
int divisible_by_two_excluding_divisiable_by_four = 0;
int divisible_only_by_one = 0;
for (auto i: a_vec) {
if (i%4 == 0) {
divisible_by_four++;
} else if (i%2 == 0) {
divisible_by_two_excluding_divisiable_by_four++;
} else {
divisible_only_by_one++;
}
}
if (divisiable_by_four == 0
&& divisible_by_two_excluding_divisiable_by_four % 2 == 0) {
put_yes();
return 0;
}
/*
cout << "a_vec_grpup" << endl;
cout << "divisiable_by_four : " << divisible_by_four << endl;
cout << "divisiable_by_two : " << divisible_by_two_excluding_divisiable_by_four << endl;
cout << "divisiable_by_one : " << divisible_only_by_one << endl;
*/
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:69:7: error: 'divisiable_by_four' was not declared in this scope; did you mean 'divisible_by_four'?
69 | if (divisiable_by_four == 0
| ^~~~~~~~~~~~~~~~~~
| divisible_by_four
|
s020394691 | p03637 | Java | import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args)
{
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
Scanner sc = new Scanner(System.in);
int n = in.nextInt();
int arr[]= new int[100001];
arr=in.nextIntArray(n);
int oddnum=0,even=0,divide=0;
for(int i=0;i<n;i++)
{
if(arr[i]%2!=0)
oddnum++;
else if(arr[i]%2==0&&arr[i]%4!=0)
even++;
else if(arr[i]%4==0)
divide++;
}
if(even==0)
{
if(oddnum<=divide+1)
System.out.println("Yes");
else
System.out.println("No");
}
else
{
if(oddnum<=divide)
System.out.println("Yes");
else
System.out.println("No");
}
//w.println(n);
w.close();
sc.close();
}
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
public InputReader(InputStream st) {
this.stream = st;
}
public int read() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0)
return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int a[] = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public String readString() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
}
}
public class C69 {
}
| Main.java:145: error: class C69 is public, should be declared in a file named C69.java
public class C69 {
^
1 error
|
s213334100 | p03637 | C++ | #include<iostream>
using namespace std;
int main()
{
int a[100000];
int n,i,four=0,none=0;
cin >> n;
for(i=1;i<=n;i++){
cin >> a[i];
if(a[i]%4==0){four++;}
if(a[i]%2!=0){none++;}
}
if(four*2<n-four){
if(four==0&&none==0){cout << "Yes" <<endl;}
else(four*2>=none){cout << "Yes" <<endl;}
else{cout << "No" <<endl;}
}
if(four*2>=n-four){cout << "Yes" <<endl;}
return 0;
} | a.cc: In function 'int main()':
a.cc:17:35: error: expected ';' before '{' token
17 | else(four*2>=none){cout << "Yes" <<endl;}
| ^
| ;
a.cc:18:17: error: expected '}' before 'else'
18 | else{cout << "No" <<endl;}
| ^~~~
a.cc:15:26: note: to match this '{'
15 | if(four*2<n-four){
| ^
a.cc: At global scope:
a.cc:21:9: error: expected unqualified-id before 'if'
21 | if(four*2>=n-four){cout << "Yes" <<endl;}
| ^~
a.cc:23:9: error: expected unqualified-id before 'return'
23 | return 0;
| ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
24 | }
| ^
|
s628820240 | p03637 | C++ | #include<iostream>
using namespace std;
int main()
{
int a[100000];
int n,i,four=0,none=0,two=0;
cin >> n;
for(i=1;i<=n;i++){
cin >> a[i];
if(a[i]%4==0){four++;}
if(a[i]%2!=0){none++;}
if(a[i]%2==0){two++;}
}
if(four*2<n-four){
if(four*2>=n-two+four){cout << "Yes" <<endl;}
if(none==0){cout << "Yes" <<endl;}
else{cout << "No" <<endl;}
}
if(four*2>=n-four){cout << "Yes" <<endl;}
return 0; | a.cc: In function 'int main()':
a.cc:23:18: error: expected '}' at end of input
23 | return 0;
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s403396363 | p03637 | C++ | #include<iostream>
using namespace std;
int main()
{
int a[100000];
int n,i,four=0,none=0,two=0;
cin >> n;
for(i=1;i<=n;i++){
cin >> a[i];
if(a[i]%4==0){four++;}
if(a[i]%2!=0){none++;}
if(a[i]%2==0){two++;}
}
if(four*2<n-four){
if(four*2<(n-two+four){cout << "Yes" <<endl;}
if(none==0){cout << "Yes" <<endl;}
else{cout << "No" <<endl;}
}
if(four*2>=n-four){cout << "Yes" <<endl;}
return 0; | a.cc: In function 'int main()':
a.cc:17:39: error: expected ')' before '{' token
17 | if(four*2<(n-two+four){cout << "Yes" <<endl;}
| ~ ^
| )
a.cc:20:9: error: expected primary-expression before '}' token
20 | }
| ^
a.cc:23:18: error: expected '}' at end of input
23 | return 0;
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s780178755 | p03637 | C++ | #include<iostream>
using namespace std;
int main()
{
int a[100000];
int n,i,four=0,none=0,two=0;
cin >> n;
for(i=1;i<=n;i++){
cin >> a[i];
if(a[i]%4==0){four++;}
if(a[i]%2!=0){none++;}
if(a[i]%2==0){two++;}
}
if(four*2<n-four){
if(four*2>=(n-two+four)-four){cout << "Yes" <<endl;}
if(none==0){cout << "Yes" <<endl;}
else{cout << "No" <<endl;}
}
if(four*2>=n-four){cout << "Yes" <<endl;}
return 0; | a.cc: In function 'int main()':
a.cc:23:18: error: expected '}' at end of input
23 | return 0;
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s796674045 | p03637 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
int a[100000];
int n;
cin >> n >> a[];
for(i=0;i<=n-1;i++){
if(a[i]*a[i+1]%4!=0){
cout << No << endl;
break;
if(i==n){
cout << Yes << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:23: error: expected primary-expression before ']' token
8 | cin >> n >> a[];
| ^
a.cc:10:13: error: 'i' was not declared in this scope
10 | for(i=0;i<=n-1;i++){
| ^
a.cc:12:25: error: 'No' was not declared in this scope
12 | cout << No << endl;
| ^~
a.cc:15:33: error: 'Yes' was not declared in this scope
15 | cout << Yes << endl;
| ^~~
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.