submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s015611027 | p04012 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
string strIn,strOut;
cin>>strIn;
strOut="Yes"
char c=str[0];
int num=0;
if(strIn.size()%2==0){
strOut="No";
}else{
sort(strIn.begin(),strIn.end());
for(auto itr = strIn.begin(); itr != strIn.end(); ++itr) {
if(c!=*itr){
c=*itr;
if(num%2==0){
num=0;
}
else{
strOut="No";
break;
}
}
num++;
}
}
cout<<strOut<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before 'char'
9 | strOut="Yes"
| ^
| ;
10 | char c=str[0];
| ~~~~
a.cc:18:20: error: 'c' was not declared in this scope
18 | if(c!=*itr){
| ^
|
s886420804 | p04012 | C++ | include <iostream>
#include <string>
using namespace std;
int main(){
string w;
cin >> w;
int S = w.size();
for (int i = 0; i < S; i++) {
int sum = -1;
for (int j=0; j < S; j++ ) {
if (w[i] == w[j]) {
sum = sum + 1;
}
}
if (sum % 2 == 0) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/char_traits.h:50:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::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)>
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/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;
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared
144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type
146 | static _GLIBCXX14_CONSTEXPR std::size_t
| ^~~~~~
/usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared
150 | find(const char_type* __s, std::size_t __n, const char_type& __a);
| ^~~
/usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared
153 | move(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared
156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n);
| ^~~
/usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared
159 | assign(char_type* __s, std::size_t __n, char_type __a);
| ^~~
/usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared
187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
| ^~~
/usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)':
/usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~~~~
/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/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'?
189 | for (std::size_t __i = 0; __i < __n; ++__i)
| ^~~
| __n
/usr/include/c++/14/bits/char_traits.h: At global scope:
/usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type
198 | _GLIBCXX14_CONSTEXPR std::size_t
| |
s132736608 | p04012 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
char w[100];
scanf("%s", &w);
int len = strlen(w);
int num = 0;
for(int i=0; i<len; i++){
if( count(w, w+len, w[i]) % 2 == 0){
num ++;
if(num == len)
printf('Yes')
}
else{
printf('No')
break;
}
}
return 0;
} | a.cc:16:16: warning: multi-character character constant [-Wmultichar]
16 | printf('Yes')
| ^~~~~
a.cc:19:14: warning: multi-character character constant [-Wmultichar]
19 | printf('No')
| ^~~~
a.cc: In function 'int main()':
a.cc:16:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
16 | printf('Yes')
| ^~~~~
| |
| int
In file included from /usr/include/c++/14/cstdio:42,
from a.cc:1:
/usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:16:22: error: expected ';' before '}' token
16 | printf('Yes')
| ^
| ;
17 | }
| ~
a.cc:19:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
19 | printf('No')
| ^~~~
| |
| int
/usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:19:19: error: expected ';' before 'break'
19 | printf('No')
| ^
| ;
20 | break;
| ~~~~~
|
s654722185 | p04012 | C++ | #inclde<cstdio>
#inclue<cstring>
#include<algorithm>
int main(){
char w[100];
scanf("%s", &w);
int len = strlen(w);
int num = 0;
for(int i=0; i<len; i++){
if( count(w, w+len, w+i) % 2 == 0){
num ++;
if(num == len)
printf('Yes');
}
else{
printf('No');
break;
}
}
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
1 | #inclde<cstdio>
| ^~~~~~
| include
a.cc:2:2: error: invalid preprocessing directive #inclue; did you mean #include?
2 | #inclue<cstring>
| ^~~~~~
| include
a.cc:15:16: warning: multi-character character constant [-Wmultichar]
15 | printf('Yes');
| ^~~~~
a.cc:18:14: warning: multi-character character constant [-Wmultichar]
18 | printf('No');
| ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
6 | scanf("%s", &w);
| ^~~~~
a.cc:8:13: error: 'strlen' was not declared in this scope
8 | int len = strlen(w);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cstring>
4 | int main(){
a.cc:11:9: error: 'count' was not declared in this scope; did you mean 'std::count'?
11 | if( count(w, w+len, w+i) % 2 == 0){
| ^~~~~
| std::count
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
a.cc:15:9: error: 'printf' was not declared in this scope
15 | printf('Yes');
| ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
3 | #include<algorithm>
+++ |+#include <cstdio>
4 | int main(){
a.cc:18:7: error: 'printf' was not declared in this scope
18 | printf('No');
| ^~~~~~
a.cc:18:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s733258834 | p04012 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
int main(){
char w[100];
scanf("%s", &w);
int len = strlen(w);
int num = 0;
for(int i=0; i<len; i++){
if( count(w, w+len, w[i]) % 2 == 0){
num ++;
if(num == len)
printf('Yes')
}
else{
printf('No')
break;
}
}
return 0;
} | a.cc:15:16: warning: multi-character character constant [-Wmultichar]
15 | printf('Yes')
| ^~~~~
a.cc:18:14: warning: multi-character character constant [-Wmultichar]
18 | printf('No')
| ^~~~
a.cc: In function 'int main()':
a.cc:11:9: error: 'count' was not declared in this scope; did you mean 'std::count'?
11 | if( count(w, w+len, w[i]) % 2 == 0){
| ^~~~~
| std::count
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
a.cc:15:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
15 | printf('Yes')
| ^~~~~
| |
| int
In file included from /usr/include/c++/14/cstdio:42,
from a.cc:1:
/usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:15:22: error: expected ';' before '}' token
15 | printf('Yes')
| ^
| ;
16 | }
| ~
a.cc:18:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
18 | printf('No')
| ^~~~
| |
| int
/usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:18:19: error: expected ';' before 'break'
18 | printf('No')
| ^
| ;
19 | break;
| ~~~~~
|
s425725896 | p04012 | C++ | #inclde<cstdio>
#inclue<cstring>
#include<algorithm>
int main(){
char w[100];
scanf("%s", &w);
int len = strlen(w);
int num = 0;
for(int i=0; i<len; i++){
if( count(w, w+len, w[i]) % 2 == 0){
num ++;
if(num == len)
printf('Yes')
}
else{
printf('No')
break;
}
}
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
1 | #inclde<cstdio>
| ^~~~~~
| include
a.cc:2:2: error: invalid preprocessing directive #inclue; did you mean #include?
2 | #inclue<cstring>
| ^~~~~~
| include
a.cc:15:16: warning: multi-character character constant [-Wmultichar]
15 | printf('Yes')
| ^~~~~
a.cc:18:14: warning: multi-character character constant [-Wmultichar]
18 | printf('No')
| ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
6 | scanf("%s", &w);
| ^~~~~
a.cc:8:13: error: 'strlen' was not declared in this scope
8 | int len = strlen(w);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cstring>
4 | int main(){
a.cc:11:9: error: 'count' was not declared in this scope; did you mean 'std::count'?
11 | if( count(w, w+len, w[i]) % 2 == 0){
| ^~~~~
| std::count
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
a.cc:15:9: error: 'printf' was not declared in this scope
15 | printf('Yes')
| ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
3 | #include<algorithm>
+++ |+#include <cstdio>
4 | int main(){
a.cc:18:7: error: 'printf' was not declared in this scope
18 | printf('No')
| ^~~~~~
a.cc:18:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s446782272 | p04012 | C++ | #inclde<cstdio>
#inclue<cstring>
#include<algorithm>
int main(){
char w[100];
scanf("%s", w);
int len = strlen(w);
int num = 0;
for(int i=0; i<len; i++){
if( count(0, len, w[i]) % 2 == 0){
num ++;
if(num == len)
printf("Yes")
}
else
break;
}
print("No");
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
1 | #inclde<cstdio>
| ^~~~~~
| include
a.cc:2:2: error: invalid preprocessing directive #inclue; did you mean #include?
2 | #inclue<cstring>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
6 | scanf("%s", w);
| ^~~~~
a.cc:8:13: error: 'strlen' was not declared in this scope
8 | int len = strlen(w);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cstring>
4 | int main(){
a.cc:11:9: error: 'count' was not declared in this scope; did you mean 'std::count'?
11 | if( count(0, len, w[i]) % 2 == 0){
| ^~~~~
| std::count
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
a.cc:15:9: error: 'printf' was not declared in this scope
15 | printf("Yes")
| ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
3 | #include<algorithm>
+++ |+#include <cstdio>
4 | int main(){
a.cc:20:3: error: 'print' was not declared in this scope
20 | print("No");
| ^~~~~
|
s543564261 | p04012 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
using namespace std;
#define Ma_PI 3.141592653589793
#define eps 0.00000001
#define LONG_INF 3000000000000000000
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define MOD 998244353
#define REP(i,n) for(long long i = 0;i < n;++i)
#define seg_size 524288
double dot(complex<double> a, complex<double> b) {
return a.real() * b.real() + a.imag() * b.imag();
}
double gyaku_dot(complex<double> a, complex<double> b) {
return a.real() * b.imag() - a.imag() * b.real();
}
double leng(complex<double> a) {
return sqrt(a.real() * a.real() + a.imag() * a.imag());
}
double angles(complex<double> a, complex<double> b) {
double cosine = dot(a, b) / (leng(a) * leng(b));
double sine = gyaku_dot(a, b) / (leng(a) * leng(b));
double kaku = acos(cosine);
if (sine <= 0) {
kaku = 2 * Ma_PI - kaku;
}
return kaku;
}
vector<int> convex_hull(vector<complex<double>> a) {
vector<int> ans;
double now_minnest = a[0].real();
int now_itr = 0;
REP(i, a.size()) {
if (now_minnest > a[i].real()) {
now_minnest = a[i].real();
now_itr = i;
}
}
ans.push_back(now_itr);
complex<double> ba(0, 1);
while (true) {
int now_go = 0;
double now_min = 0;
int starter = ans[ans.size() - 1];
for (int i = 0; i < a.size(); ++i) {
if (i != starter) {
double goa = angles(ba, a[i] - a[starter]);
if (goa > now_min) {
now_min = goa;
now_go = i;
}
}
}
if (now_go == ans[0]) break;
ans.push_back(now_go);
ba = complex<double>(a[now_go] - a[starter]);
}
return ans;
}
long long gcd(long long a, long long b) {
if (b == 0) return a;
return gcd(b, a % b);
}
int bobo[27] = {};
int main() {
string w;
cin >> w;
REP(i, w) {
bobo[w[i] - 'a']++;
}
REP(i, 26) {
if (bobo[i] % 2 == 1) {
cout << "No";
return 0;
}
}
cout << "Yes";
}
| a.cc: In function 'int main()':
a.cc:37:40: error: no match for 'operator<' (operand types are 'long long int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
a.cc:96:9: note: in expansion of macro 'REP'
96 | REP(i, w) {
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from a.cc:3:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::pair<_T1, _T2>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/functional:53,
from a.cc:5:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::tuple<_UTypes ...>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64:
/usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)'
2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::vector<_Tp, _Alloc>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/functional:65:
/usr/include/c++/14/array:339:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> bool std::operator<(const array<_Tp, _Nm>&, const array<_Tp, _Nm>&)'
339 | operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
| ^~~~~~~~
/usr/include/c++/14/array:339:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::array<_Tp, _Nm>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/deque:66,
from /usr/include/c++/14/queue:62,
from a.cc:7:
/usr/include/c++/14/bits/stl_deque.h:2334:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)'
2334 | operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_deque.h:2334:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::deque<_Tp, _Alloc>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/queue:66:
/usr/include/c++/14/bits/stl_queue.h:397:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)'
397 | operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:397:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::queue<_Tp, _Seq>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/stack:63,
from a.cc:8:
/usr/include/c++/14/bits/stl_stack.h:373:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const stack<_Tp, _Seq>&, const stack<_Tp, _Seq>&)'
373 | operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_stack.h:373:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'const std::stack<_Tp, _Seq>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from a.cc:10:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in definition of macro 'REP'
37 | #define REP(i,n) for(long long i = 0;i < n;++i)
| ^
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:96:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long long int'
96 | REP(i, w) {
| ^
a.cc:37:42: note: in defi |
s720932821 | p04012 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string w;
cin>>w;
int l = w.length();
int a[26];
memset(a,0,sizeof(a));
for(int i=0;i<l;i++)
{
int temp = w[i]-97;
a[temp]++;
}
int flag = 0;
for(int i=0;i<26;i++)
{
if(a[i]!=0&& a[i]%2!=0)
{
flag++;
break;
}
}
if(flag)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:5: error: 'memset' was not declared in this scope
10 | memset(a,0,sizeof(a));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 | #include<string>
|
s895240185 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
char s[100];
int alpha[26]={0};
cin>>s;
for(int i=0;i<strlen(s);i++){
alpha[(int)s[i]-(int)'a']++;
}
int u=0;
for(int i=0;i<26;i++){
if(a[i]%2==1)
u=1;
}
if(u==1)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:8: error: 'a' was not declared in this scope
14 | if(a[i]%2==1)
| ^
|
s760256254 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
char A;
int B=0;
int C=1;
cin>>S;
for(int i=0;i<S.size();i++){
A=S.at(i);
for(int j=0;j<s.size();j++){
if(A==S.at(j)){
B++;
}
if(B%2==1){
C=99;
cout<<"No"<<endl;
break;
}
B=0;
}
}
if(C==1){
cout<<"Yes"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:12:19: error: 's' was not declared in this scope
12 | for(int j=0;j<s.size();j++){
| ^
|
s419241650 | p04012 | C++ | #include <iostream>
#include <sstream>
#include <cctype>
#include <string>
using namespace std;
int main()
{
char chara[100];
cin >> chara;
int box[150]={};
for(int i=0;i<strlen(chara);i++){
box[(int)chara[i]] ++;
}
bool check = true;
for(int i=0;i<150;i++){
if(box[i]%2!=0){
check = false;
}
}
if(check){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:19: error: 'strlen' was not declared in this scope
15 | for(int i=0;i<strlen(chara);i++){
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <cctype>
+++ |+#include <cstring>
4 | #include <string>
|
s606695042 | p04012 | C++ | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main()
{
char chara[100];
cin >> chara;
int box[150]={};
for(int i=0;i<strlen(chara);i++){
box[(int)chara[i]] ++;
}
bool check = true;
for(int i=0;i<150;i++){
if(box[i]%2!=0){
check = false;
}
}
if(check){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:19: error: 'strlen' was not declared in this scope
14 | for(int i=0;i<strlen(chara);i++){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <sstream>
+++ |+#include <cstring>
3 | #include <string>
|
s328893032 | p04012 | C++ | #include <iostream>
using namespace std;
int main()
{
char chara[100];
cin >> chara;
int box[150]={};
for(int i=0;i<strlen(chara);i++){
box[(int)chara[i]] ++;
}
bool check = true;
for(int i=0;i<150;i++){
if(box[i]%2!=0){
check = false;
}
}
if(check){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:19: error: 'strlen' was not declared in this scope
12 | for(int i=0;i<strlen(chara);i++){
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | using namespace std;
|
s696253857 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void)
{
string s;
int a[26]={0};
cin>>s;
for(int i=0;i<s.size();i++){
if(s.at(i)>='a'&&s.at(i)<='z')
a[s.size(i)-'a']++;
}
int count=0;
for(int i=0;i<26;i++){
if(a[i]/2!=0)
count++;
}
if(count>0)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
11 | a[s.size(i)-'a']++;
| ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate expects 0 arguments, 1 provided
|
s341793179 | p04012 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
using namespace std;
int main() {
int i;
int v[26] = 0;
string s;
cin >> s;
for (i=0;i>s.size();i++) {
v[(int) s[i] - 97]++;
}
for (i=0;i<26;i++) {
if (v[i] % 2 != 0) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | a.cc: In function 'int main()':
a.cc:14:17: error: array must be initialized with a brace-enclosed initializer
14 | int v[26] = 0;
| ^
|
s267387231 | p04012 | C++ | //Keep working hard :)
#include <bits/stdc++.h>
using namespace std;
//#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const int N = 1e2+5;
int a[N];
int main()
{
IOS;
//fileIO();
string s;
cin >> s;
for(int i = 0; i < s.size();i++)
{
if(s[i] >= 'a' && s[i] <= 'z')a[s[i]-'a']++;
}
for(int i = 0; i < 26; i++)
{
if(a[i]&1)
{
cout <<"NO";
return 0;
}
}
cout <<"YES";
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:9: error: 'IOS' was not declared in this scope
12 | IOS;
| ^~~
|
s073122937 | p04012 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void) {
long c,ans=0,i,j;
string s;
cin >> s;
for(i=0;i<w.size();i++) {
c=0;
for (j=0;j<w.size();j++) {
if (s[i]==s[j]) {
c++;
}
}
if (c%2==1){
ans=1;
}
}
if (ans==0) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:19: error: 'w' was not declared in this scope
9 | for(i=0;i<w.size();i++) {
| ^
|
s252697345 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count = 0;
bool flag = true
for (int i = 0; i < w.size(); i++) {
for (int j = 0; j < w.size(); j++) {
if (w[i] == w[j]) {
count++;
}
}
if (count % 2 == 1) {
flag = false;
break;
}
}
if(flag == true) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'for'
10 | for (int i = 0; i < w.size(); i++) {
| ^~~
a.cc:10:19: error: 'i' was not declared in this scope
10 | for (int i = 0; i < w.size(); i++) {
| ^
|
s225472651 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count = 0;
bool flag = ture
for (int i = 0; i < w.size(); i++) {
for (int j = 0; j < w.size(); j++) {
if (w[i] == w[j]) {
count++;
}
}
if (count % 2 == 1) {
flag = false;
break;
}
}
if(flag == ture) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:15: error: 'ture' was not declared in this scope
8 | bool flag = ture
| ^~~~
a.cc:10:19: error: 'i' was not declared in this scope
10 | for (int i = 0; i < w.size(); i++) {
| ^
|
s013070421 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string w;
cin >> w;
sort(w.begin(), w.end());
char pre=" ";
int count = 0;
for(auto& c : w){
if(c==pre){
count++;
}else{
if(count%2==1){
cout << "No" << endl;
return 0;
}else{
pre = c;
count = 0;
}
}
}
cout << "Yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:12: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
8 | char pre=" ";
| ^~~
| |
| const char*
|
s677573834 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i;
int c[26] = {};
string w;
cin >> w;
for(i=0; i<w.size; i++){
c[(int)w[i]-'a']++;
}
for(i=0; i<26; i++){
if(c[i]%2 == 1){
cout << "No";
return 0;
}
}
cout << "Yes";
return 0;
} | a.cc: In function 'int main()':
a.cc:9:18: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
9 | for(i=0; i<w.size; i++){
| ~~^~~~
| ()
|
s629658801 | p04012 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string S;
cin>>S;
int b=0;
for(auto c:S){
b^=(1<<(c-'a'));
}
cout<<(b?:"No":"Yes")<<endl;
} | a.cc: In function 'int main()':
a.cc:13:11: error: operands to '?:' have different types 'int' and 'const char*'
13 | cout<<(b?:"No":"Yes")<<endl;
| ~^~~~~~
a.cc:13:17: error: expected ')' before ':' token
13 | cout<<(b?:"No":"Yes")<<endl;
| ~ ^
| )
|
s291476916 | p04012 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
//vars;
string w;
int sum;
cin >> w;
if (w.size() % 2 != )cout << "No" << endl;
for (int i = 0; i < w.size()/2 ; i+=2) {
sum += w[i];
}
if (sum % 4 == 0)cout << "Yes" << endl;
for (int i = 1; i < w.size() / 2) {
}
if (sum % 2 == 0)cout << "Yes" << endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:11:29: error: expected primary-expression before ')' token
11 | if (w.size() % 2 != )cout << "No" << endl;
| ^
a.cc:18:41: error: expected ';' before ')' token
18 | for (int i = 1; i < w.size() / 2) {
| ^
| ;
|
s893528496 | p04012 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cmath>
using namespace std;
typedef long long unsigned int ll;
int main() {
string s;
int a,b,c,d,i,j,k;
cin >> s;
vector<int> l(26)
for(i=0; i < s.length() ; i++){
l[int(s[i]-'a')]++;
}
a=0;
while(1){
if(l[a]%2==0){
cout << "No" <<endl;
return 0;
}
a++;
}
cout << "Yes" <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:16:3: error: expected ',' or ';' before 'for'
16 | for(i=0; i < s.length() ; i++){
| ^~~
a.cc:16:32: error: expected ';' before ')' token
16 | for(i=0; i < s.length() ; i++){
| ^
| ;
|
s086557997 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string w;
cin >> w;
int a[26]
for (int i;i<w.size();i++){
a[s[i]-'a']=1-a[s[i]-'a'];
}
a.sort();
if (a[25]=0){
cout << "Yes";
}
else{
cout << "No";
}
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'for'
8 | for (int i;i<w.size();i++){
| ^~~
a.cc:8:14: error: 'i' was not declared in this scope
8 | for (int i;i<w.size();i++){
| ^
a.cc:11:3: error: 'a' was not declared in this scope
11 | a.sort();
| ^
|
s543079745 | p04012 | C++ | #include <iostream>
using namespace std;
int main()
{
string s;
cin >> s;
int cnt, ans = 0;
for (char i = 'a'; i <= 'z'; i++) {
cnt = count(s.begin(), s.end(), i);
if (cnt % 2) ans = 1;
}
if (ans == 0) cout << "YES" << endl;
else cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:12:11: error: 'count' was not declared in this scope; did you mean 'cnt'?
12 | cnt = count(s.begin(), s.end(), i);
| ^~~~~
| cnt
|
s674607123 | p04012 | C | #include<stdio.h>
int main(){
char S[111];
S[0] = '\0';
scanf("%s",S);
int i,N;
while(S[N] != '\0'){
N++;
};
for(i=0;i<=N-1;i++)
S[i] -= 'a';
int count[30] = {0};
for(i=0;i<=N-1;i++)
count[S[i]]++;
for(i=0;i<=26;i++)
if(count%2 == 1){
printf("No");
goto NO;
};
printf("Yes");
NO:;
} | main.c: In function 'main':
main.c:17:13: error: invalid operands to binary % (have 'int *' and 'int')
17 | if(count%2 == 1){
| ~~~~~^
| |
| int *
|
s328267648 | p04012 | C | include<stdio.h>
int main(){
char S[111];
S[0] = '\0';
scanf("%s",S);
int i,N;
while(S[N] != '\0'){
N++;
};
for(i=0;i<=N-1;i++)
S[i] -= 'a';
int count[30] = {0};
for(i=0;i<=N-1;i++)
count[S[i]]++;
for(i=0;i<=26;i++)
if(count%2 == 1){
printf("No");
goto NO;
};
printf("Yes");
NO:;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s857333324 | p04012 | C | include<stdio.h>
int main(){
char S[111];
S[0] = '\0';
scanf("%s",S);
int i,N;
while(S[N]){
N++;
};
for(i=0;i<=N-1;i++)
S[i] -= 'a';
int count[30] = {0};
for(i=0;i<=N-1;i++)
count[S[i]]++;
for(i=0;i<=26;i++)
if(count%2 == 1){
printf("No");
goto NO;
};
printf("Yes");
NO:;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s687963814 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define MOD (1000000007)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
string w;
void input(){
cin >> w;
}
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
input();
map<char, int> cnt;
for(int i=0;i<w.size();i++) map[w[i]]++;
for(auto& e: cnt){
if(e.second % 2 == 1){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | a.cc: In function 'int main()':
a.cc:26:42: error: expected ']' before '[' token
26 | for(int i=0;i<w.size();i++) map[w[i]]++;
| ^
| ]
a.cc:26:46: error: expected initializer before '++' token
26 | for(int i=0;i<w.size();i++) map[w[i]]++;
| ^~
a.cc:26:46: error: expected ';' before '++' token
|
s070535885 | p04012 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <stack>
#include <math.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;}
template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;}
const long long INF = 1LL << 60;
long long c[30][10010];
long long dp[30][10010];
//bucket1
// bool ch[10] = {0};
// bool check(int n){
// while(n!=0){
// if(ch[n%10]) return false;
// n /= 10;
// }
// return true;
// }
// --------write my code!!!!!----------//
int counter[200];
int main(){
bool flag=true;
string s; cin >> s;
for(int i=0; i<200; ++i) counter[i] = 0;
for(int i=0; i<s.length(); ++i){
int chr = (int)s[i]-97;
counter[chr]++;å
if(counter[chr]%2!=0) flag = false;
else flag = true;
}
if(flag) cout << "Yes" <<endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:44:24: error: '\U000000e5' was not declared in this scope
44 | counter[chr]++;å
| ^
a.cc:46:9: error: 'else' without a previous 'if'
46 | else flag = true;
| ^~~~
|
s520682130 | p04012 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string s;
cin >> s;
int alphb[26];
fill_n(alphab, 26, 0);
if(s.size() % 2 != 0){
cout << "No" << endl;
return 0;
}
for(int i = 0; i < s.size(); i++){
alphab[s[i] - '0']++;
}
for(int i = 0; i < 26; i++){
if(alphab[i] % 2 != 0){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
| a.cc: In function 'int main()':
a.cc:11:10: error: 'alphab' was not declared in this scope; did you mean 'alphb'?
11 | fill_n(alphab, 26, 0);
| ^~~~~~
| alphb
|
s734921814 | p04012 | C | √#include <stdio.h>
#include <string.h>
int main(){
char s[101] = {0};
char cmp[101] = {0};
int num[101] = {0};
scanf("%s", s);
for(int cnt = 0; cnt < strlen(s); cnt++){
for(int n = 0; n < strlen(cmp) - 1 ; n++){
if(cmp[n] == s[cnt]){
num[n]++;
}
else if(n == strlen(cmp)){
cmp[n] = s[cnt];
}
}
}
for(int cnt = 0; cnt < strlen(cmp); cnt++){
if(num[cnt] % 2 == 0){
if(cnt == strlen(cmp)-1){
printf("Yes");
}
}else{
printf("No");
break;
}
}
printf("\n");
}
| main.c:1:1: error: stray '\342' in program
1 | <U+221A>#include <stdio.h>
| ^~~~~~~~
main.c:1:2: error: stray '#' in program
1 | √#include <stdio.h>
| ^
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | √#include <stdio.h>
| ^
In file included from main.c:2:
/usr/include/string.h:44:22: error: unknown type name 'size_t'
44 | size_t __n) __THROW __nonnull ((1, 2));
| ^~~~~~
/usr/include/string.h:34:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
33 | #include <stddef.h>
+++ |+#include <stddef.h>
34 |
/usr/include/string.h:47:56: error: unknown type name 'size_t'
47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
| ^~~~~~
/usr/include/string.h:47:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:55:32: error: unknown type name 'size_t'
55 | int __c, size_t __n)
| ^~~~~~
/usr/include/string.h:55:32: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:61:42: error: unknown type name 'size_t'
61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/string.h:61:42: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:64:56: error: unknown type name 'size_t'
64 | extern int memcmp (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:64:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:80:60: error: unknown type name 'size_t'
80 | extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:80:60: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:107:48: error: unknown type name 'size_t'
107 | extern void *memchr (const void *__s, int __c, size_t __n)
| ^~~~~~
/usr/include/string.h:107:48: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:145:53: error: unknown type name 'size_t'
145 | const char *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:145:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:153:23: error: unknown type name 'size_t'
153 | size_t __n) __THROW __nonnull ((1, 2));
| ^~~~~~
/usr/include/string.h:153:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:159:57: error: unknown type name 'size_t'
159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:159:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:166:8: error: unknown type name 'size_t'
166 | extern size_t strxfrm (char *__restrict __dest,
| ^~~~~~
/usr/include/string.h:166:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:167:54: error: unknown type name 'size_t'
167 | const char *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:167:54: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:179:8: error: unknown type name 'size_t'
179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
| ^~~~~~
/usr/include/string.h:179:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:179:59: error: unknown type name 'size_t'
179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
| ^~~~~~
/usr/include/string.h:179:59: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:195:45: error: unknown type name 'size_t'
195 | extern char *strndup (const char *__string, size_t __n)
| ^~~~~~
/usr/include/string.h:195:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:293:8: error: unknown type name 'size_t'
293 | extern size_t strcspn (const char *__s, const char *__reject)
| ^~~~~~
/usr/include/string.h:293:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:297:8: error: unknown type name 'size_t'
297 | extern size_t strspn (const char *__s, const char *__accept)
| ^~~~~~
/usr/include/string.h:297:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:389:46: error: unknown type name 'size_t'
389 | extern void *memmem (const void *__haystack, size_t __haystacklen,
| ^~~~~~
/usr/include/string.h:389:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:390:44: error: unknown type name 'size_t'
390 | const void *__needle, size_t __needlelen)
| ^~~~~~
/usr/include/string.h:390:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:398:55: error: unknown type name 'size_t'
398 | const void *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:398:55: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:401:53: error: unknown type name 'size_t'
401 | const void *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:401:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:407:8: error: unknown type name 'size_t'
407 | extern size_t strlen (const char *__s)
| ^~~~~~
/usr/include/string.h:407:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:413:8: error: unknown type name 'size_t'
413 | extern size_t strnlen (const char *__string, size_t __maxlen)
| ^~~~~~
/usr/include/string.h:413:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:413:46: error: unknown type name 'size_t'
413 | extern size_t strnlen (const char *__string, size_t __maxlen)
| ^~~~~~
/usr/include/string.h:413:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/string.h:26:
/usr/include/string.h:432:12: error: unknown type name 'size_t'
432 | extern int __REDIRECT_NTH (strerror_r,
| ^~~~~~~~~~~~~~
/usr/include/string.h:432:12: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/string.h:462:
/usr/include/strings.h:34:54: error: unknown type name 'size_t'
34 | extern int bcmp (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/strings.h:24:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
23 | #include <stddef.h>
+++ |+#include <stddef.h>
24 |
/usr/include/strings.h:38:53: error: unknown type name 'size_t'
38 | extern void bcopy (const void *__src, void *__dest, size_t __n)
| ^~~~~~
/usr/include/strings.h:38:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:42:31: error: unknown type name 'size_t'
42 | extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/strings.h:42:31: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:120:61: error: unknown type name 'size_t'
120 | extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~
/usr/include/strings.h:120:61: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:134:27: error: unknown type name 'size_t'
134 | size_t __n, locale_t __loc)
| ^~~~~~
/usr/in |
s960081117 | p04012 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin>>s;
int i,j,count=1;
if(s.size()%2!=0){
cout<<"No"<<endl;
return 0;
}
for(i=0;i<s.size();++i){
for(j=0;j<s.size()-i;++j){
if(s[i]==s[i+j]){
count++;
s.erase(s.begin()+(i+j));
}if(count%2!=0){
cout<<"No"<<endl;
return 0;
}else count=1;
}cout<<"Yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s910142302 | p04012 | C | #include<stdio.h>
int main(void)
{
char w[100], test;
int i, j, beau=0;
for(i=0;i<100;i++)
scanf(%c, &w[i]);
i = 0;
while(w[i] = '\n'){
test = w[i];
for(j=0;j=100;j++){
if(w[j] == test)
beau = beau + 1;
}
if(beau % 2 == 1)
printf("No\n");
return 0;
i++;
}
printf("Yes\n");
return 0;
} | main.c: In function 'main':
main.c:7:11: error: expected expression before '%' token
7 | scanf(%c, &w[i]);
| ^
|
s301703762 | p04012 | C | #include<stdio.h>
int main(void)
{
char w[100], test;
int i, j, beau=0;
for(i=0;i<100;i++)
scanf(%c, &w[i]);
i = 0;
while(w[i] = '\n'){
test = w[i];
for(j=0;j=100,j++){
if(w[j] == test)
beau = beau + 1;
}
if(beau % 2 == 1)
printf("No\n");
return 0;
i++
}
printf("Yes\n")
return 0;
} | main.c: In function 'main':
main.c:7:11: error: expected expression before '%' token
7 | scanf(%c, &w[i]);
| ^
main.c:13:22: error: expected ';' before ')' token
13 | for(j=0;j=100,j++){
| ^
| ;
main.c:22:8: error: expected ';' before '}' token
22 | i++
| ^
| ;
23 | }
| ~
main.c:24:18: error: expected ';' before 'return'
24 | printf("Yes\n")
| ^
| ;
25 | return 0;
| ~~~~~~
|
s842777553 | p04012 | C | #include<stdio.h>
int main(void)
{
char w[100], test;
int i, j, beau=0;
for(i=0;i<100;i++)
scanf(%c, &w[i]);
i = 0
while(w[i] = '\n'){
test = w[i];
for(j=0;j=100,j++){
if(w[j] == test)
beau = beau + 1;
}
if(beau % 2 == 1)
printf("No\n");
return 0;
i++
}
printf("Yes\n")
return 0;
} | main.c: In function 'main':
main.c:7:11: error: expected expression before '%' token
7 | scanf(%c, &w[i]);
| ^
main.c:8:8: error: expected ';' before 'while'
8 | i = 0
| ^
| ;
9 | while(w[i] = '\n'){
| ~~~~~
|
s075683490 | p04012 | 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)
//#define int long long
typedef long long ll;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
using namespace std;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)};
signed main() {
string w;
int a[26];rep(i,26)a[i] = 0;
rep(i,w.length()){
a[w-'a']++;
}
rep(i,26){
if(a[i]%2)cout << "No" << endl;
return 0;
}
cout << "Yes" << endl;
}
//1 2 3 4 5 6 7 8 9
//2 5 5 4 5 6 3 7 6
| a.cc: In function 'int main()':
a.cc:17:8: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
17 | a[w-'a']++;
| ~^~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
618 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1790 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
17 | a[w-'a']++;
| ^~~
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:370:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
379 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:379:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
388 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: mismatched types 'const std::complex<_Tp>' and 'char'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)'
465 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided
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:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
17 | a[w-'a']++;
| ^~~
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:17:9: note: mismatched types 'const std::valarray<_Tp>' and 'char'
17 | a[w-'a']++;
| ^~~
|
s792066524 | p04012 | C++ | #include "pch.h"
#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<cmath>
#include<iomanip>
using namespace std;
int main() {
string s;
int count = 0;
int a[30];
cin >> s;
for (int num = 0;num< 30;num++) {
a[num] = 0;
}
for (int i = 0;i < s.size();i++) {
if (s[i] == 'a')
a[0] += 1;
if (s[i] == 'b')
a[1] += 1;
if (s[i] == 'c')
a[2] += 1;
if (s[i] == 'd')
a[3] += 1;
if (s[i] == 'e')
a[4] += 1;
if (s[i] == 'f')
a[5] += 1;
if (s[i] == 'g')
a[6] += 1;
if (s[i] == 'h')
a[7] += 1;
if (s[i] == 'i')
a[8] += 1;
if (s[i] == 'j')
a[9] += 1;
if (s[i] == 'k')
a[10] += 1;
if (s[i] == 'l')
a[11] += 1;
if (s[i] == 'm')
a[12] += 1;
if (s[i] == 'n')
a[13] += 1;
if (s[i] == 'o')
a[14] += 1;
if (s[i] == 'p')
a[15] += 1;
if (s[i] == 'q')
a[16] += 1;
if (s[i] == 'r')
a[17] += 1;
if (s[i] == 's')
a[18] += 1;
if (s[i] == 't')
a[19] += 1;
if (s[i] == 'u')
a[20] += 1;
if (s[i] == 'v')
a[21] += 1;
if (s[i] == 'w')
a[22] += 1;
if (s[i] == 'x')
a[23] += 1;
if (s[i] == 'y')
a[24] += 1;
if (s[i] == 'z')
a[25] += 1;
}
for (int j = 0;j < 26;j++) {
if (a[j] % 2 == 1)
count++;
}
if (count > 0)
cout << "No" << endl;
else
cout << "Yes" << endl;
}
| a.cc:1:10: fatal error: pch.h: No such file or directory
1 | #include "pch.h"
| ^~~~~~~
compilation terminated.
|
s060143890 | p04012 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<math.h>
#include<algorithm>
#include<numeric>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<ULL> VULL;
class MYCP {
public:
//数値を区切って文字列にする
static string MakeString_LongLong(vector<long long> const& numbers, string const& str) {
if (numbers.size() == 0)return "";
string result = "" + to_string(numbers[0]);
for (long long i = 1; i < numbers.size(); i++) {
result += str;
result += to_string(numbers[i]);
}
return result;
}
//空白で区切る為のオーバーロード
static string MakeString_LongLong(vector<long long> const& numbers) {
if (numbers.size() == 0)return "";
string result = "" + to_string(numbers[0]);
for (long long i = 1; i < numbers.size(); i++) {
result += " ";
result += to_string(numbers[i]);
}
return result;
}
//文字列の配列を改行を挟んでまとめる
static string MakeString_VectorString(vector<string> const& str) {
string result = "";
for (long long i = 0; i < str.size(); i++) {
result += str[i] + "\n";
}
return result;
}
//文字列を必要な個数だけ読み取る
static vector<string> MyReadLineSplit(LL n) {
vector<string> str(n);
for (long long i = 0; i < n; i++) {
std::cin >> str[i];
}
return str;
}
//数値を必要な個数だけ読み取る
static vector<long long> ReadInts(long long number) {
vector<long long> a(number);
for (int i = 0; i < number; i++) {
std::cin >> a[i];
}
return a;
}
//渡された自然数が素数ならtureを返す
static bool PrimeCheck_Int(long long number) {
if (number < 2)return false;
for (ULL i = 2; i*i <= number; i++) {
if (number%i == 0)return false;
}
return true;
}
//渡された数値以下の素数表を作る
static vector<long long> MakePrimeList(long long n) {
vector<long long> list;
LL i, j, p;
bool flag;
for (i = 2; i <= n; i++) {
flag = true;
for (j = 0; j < list.size(); j++) {
if (!(list[j] * list[j] <= i))break;
if (i%list[j] == 0) {
flag = false;
break;
}
}
if (flag)list.push_back(i);
}
return list;
}
//文字列の分割
static vector<string> split(string const& str, char sep)
{
vector<std::string> v; // 分割結果を格納するベクター
auto first = str.begin(); // テキストの最初を指すイテレータ
while (first != str.end()) { // テキストが残っている間ループ
auto last = first; // 分割文字列末尾へのイテレータ
while (last != str.end() && *last != sep) // 末尾 or セパレータ文字まで進める
last++;
v.push_back(string(first, last)); // 分割文字を出力
if (last != str.end())
last++;
first = last; // 次の処理のためにイテレータを設定
}
return v;
}
//合計を求める
static LL Sum(vector<LL> a) {
LL i, sum = 0;
for (i = 0; i < a.size(); i++) {
sum += a[i];
}
return sum;
}
//小文字ならtrueを返す
static bool Komoji(char a) {
if (a >= 'a'&&a <= 'z')return true;
return false;
}
//大文字ならtrueを返す
static bool Oomoji(char a) {
if (a >= 'A'&&a <= 'Z')return true;
return false;
}
static LL GreatestCommonFactor(LL a, LL b) {
LL temp;
if (a < b) {
temp = b;
b = a;
a = temp;
}
while (true)
{
temp = a % b;
a = b;
b = temp;
if (b == 0)break;
}
return a;
}
static LL LeastCommonMultiple(LL a, LL b) {
return (a / GreatestCommonFactor(a, b))*b;
}
};
//累積和を求めるクラス
class Syakutori {
private:
vector<LL> list;
public:
void MakeArray(vector<LL> data) {
LL i;
list = data;
list.push_back(0);
list[0] = 0;
for (i = 1; i < list.size(); i++) {
list[i] = list[i - 1] + data[i - 1];
}
}
LL Sum(LL start, LL end) {
if (end < start) {
cout << "startがendより大きいです";
return 0;
}
if (start < 0 || end >= list.size()) {
cout << "範囲が異常";
return 0;
}
return list[end] - list[start];
}
};
string strnum = "0123456789";
string alpS = "abcdefghijklmnopqrstuvwxyz";
string alpL = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int sizealp = (int)(alpS.size());
int mod = 1e9 + 7;
int main(void) {
string s;
cin >> s;
int count = 0;
for (size_t i = 0; i < s.size; i++)
{
for (size_t j = 0; j < s.size; j++)
{
if (s[i] == s[j]) {
count++;
}
}
}
if (count % 2 == 0) {
cout << "Yes" << endl;
}
else
cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:222:34: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
222 | for (size_t i = 0; i < s.size; i++)
| ~~^~~~
| ()
a.cc:224:42: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
224 | for (size_t j = 0; j < s.size; j++)
| ~~^~~~
| ()
|
s620175811 | p04012 | C++ | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define ll long long
using namespace std;
char a[105];
int main()
{
cnt=1;
scanf("%s",a);
if(strlen(a)<2)
{
printf("No\n");
}
else
{
sort(a,a+strlen(a));
for(int i=1;i<strlen(a);i+=2)
{
if(a[i]!=a[i-1])
{
printf("No\n");
break;
cnt=0;
}
}
if(cnt=1)
{
printf("Yes\n");
}
else
{
printf("No\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
11 | cnt=1;
| ^~~
| int
|
s022548396 | p04012 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main() {
string s; cin >> s;
vector<string, int> ans;
for (int i = 0; i < s.length(); i++) {
ans[s[i]] += 1;
}
for (vector<string,int>::iterator i = ans.begin(); i != ans.end(); i++) {
if (ans[i] % 2) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
| In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<std::__cxx11::basic_string<char>, int>':
/usr/include/c++/14/bits/stl_vector.h:428:11: required from 'class std::vector<std::__cxx11::basic_string<char>, int>'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
a.cc:8:22: required from here
8 | vector<string, int> ans;
| ^~~
/usr/include/c++/14/bits/stl_vector.h:87:28: error: 'int' is not a class, struct, or union type
87 | rebind<_Tp>::other _Tp_alloc_type;
| ^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:89:9: error: 'int' is not a class, struct, or union type
89 | pointer;
| ^~~~~~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<std::__cxx11::basic_string<char>, int>':
a.cc:8:22: required from here
8 | vector<string, int> ans;
| ^~~
/usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<std::__cxx11::basic_string<char>, int>::_Base'
518 | using _Base::_M_allocate;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<std::__cxx11::basic_string<char>, int>::_Base'
519 | using _Base::_M_deallocate;
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<std::__cxx11::basic_string<char>, int>::_Base'
521 | using _Base::_M_get_Tp_allocator;
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/requires_hosted.h:31,
from /usr/include/c++/14/iostream:38,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = int]':
a.cc:8:22: required from here
8 | vector<string, int> ans;
| ^~~
/usr/include/c++/14/bits/stl_vector.h:136:24: error: 'int' is not a class, struct, or union type
136 | _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
| ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:20: error: no match for 'operator[]' (operand types are 'std::vector<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
11 | ans[s[i]] += 1;
| ^
a.cc:14:51: error: 'class std::vector<std::__cxx11::basic_string<char>, int>' has no member named 'begin'
14 | for (vector<string,int>::iterator i = ans.begin(); i != ans.end(); i++) {
| ^~~~~
a.cc:14:60: error: 'i' was not declared in this scope
14 | for (vector<string,int>::iterator i = ans.begin(); i != ans.end(); i++) {
| ^
a.cc:14:69: error: 'class std::vector<std::__cxx11::basic_string<char>, int>' has no member named 'end'
14 | for (vector<string,int>::iterator i = ans.begin(); i != ans.end(); i++) {
| ^~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = int]':
/usr/include/c++/14/bits/stl_vector.h:314:7: required from here
314 | _Vector_base() = default;
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:141:26: error: 'int' is not a class, struct, or union type
141 | : _Tp_alloc_type()
| ^
|
s121810146 | p04012 | C++ | # Your code here!
s=gets.chomp
n=s.length
flag=true
for c in 'a'..'z' do
cnt=0
for i in 0..n-1 do
if(s[i]==c)
cnt+=1
end
end
if(cnt%2==1)
flag=false
break
end
end
puts (flag ? "Yes":"No") | a.cc:1:3: error: invalid preprocessing directive #Your
1 | # Your code here!
| ^~~~
a.cc:10:14: error: too many decimal points in number
10 | for i in 0..n-1 do
| ^~~~
a.cc:3:1: error: 's' does not name a type
3 | s=gets.chomp
| ^
|
s714684319 | p04012 | C++ | #include<stdio.h>
#include<string.h>
char a[101];
int b[101];
int main()
{
int i,len,t,n,c,j;
c=0;
n=-1;
gets(a);
len = strlen(a);
if(len % 2 == 0)
{
for(i=0 ; i<len-1 ; i=i+t)
{
n++;
for(j=i+1 ; j<len ; j++)
{
if(a[i] == a[j])
{
b[n]++;
} else t=j;
}
}
for(i=0 ; i<n ; i++)
{
if(b[n] % 2 == 0) c++;
}
if(c==0) printf("YES");
else printf("NO");
}else printf("NO");
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(a);
| ^~~~
| getw
|
s626048532 | p04012 | C++ | #include <bits/stdc++.h>
#define FOR(i, n) for(int i = 0;i <n;i++)
#define RFOR(i, n) for(int i = n;i >= 0;i--)
#define REP(i, m, n) for(int i = m;i < n;i++)
#define RREP(i, m, n) for(int i = m;i >= n;i--)
#define INF 999999999
using namespace std;
int main(int argc, char const *argv[])
{
int a,count[26],i;
string s;
cin >>s;
a = s.size{};
FOR(i,a)
{
count[s[i]-'a']++;
}
FOR(i,a)
{
if(count[i]%2 != 0)
{
cout<<"No"<<endl;
}
}
cout<<"Yes"<<endl;
return 0;
}
| a.cc: In function 'int main(int, const char**)':
a.cc:15:8: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
15 | a = s.size{};
| ^~~~
|
s884432349 | p04012 | C++ | #include <bits/stdc++.h>
#define FOR(i, n) for(int i = 0;i <n;i++)
#define RFOR(i, n) for(int i = n;i >= 0;i--)
#define REP(i, m, n) for(int i = m;i < n;i++)
#define RREP(i, m, n) for(int i = m;i >= n;i--)
#define INF 999999999
using namespace std;
int main(int argc, char const *argv[])
{
int a;
string s;
a = s.size()
if(a%2 != 0)
{
cout<<"No"<<endl;
return 0;
}
cout<<"Yes"<<endl;
return 0;
}
| a.cc: In function 'int main(int, const char**)':
a.cc:13:14: error: expected ';' before 'if'
13 | a = s.size()
| ^
| ;
14 | if(a%2 != 0)
| ~~
|
s594969846 | p04012 | C | #include<stdio.h>
int main(void)
{
int i[26],flag = 0;
char n;
for(;;)
{
scanf("%c",&n);
if(n == '\n'){break;}
i[n - 97] += 1;
}
for(int j = 0;i <= 26; i++)
{
if(i[j] % 2 != 0){flag = 1;}
}
if(flag == 0){printf("Yes");}else{printf("No");}
return 0;
} | main.c: In function 'main':
main.c:14:19: warning: comparison between pointer and integer
14 | for(int j = 0;i <= 26; i++)
| ^~
main.c:14:27: error: lvalue required as increment operand
14 | for(int j = 0;i <= 26; i++)
| ^~
|
s166301992 | p04012 | C++ | #include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#define MP(a, b) make_pair(a, b)
#define MMP(a, b, c) make_pair(make_pair(a, b), c)
#define MAX 1000000000
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define PI 3.14159265359
int main(){
iostream::sync_with_stdio(false);
string w;
cin >> w;
int kai[26] = {};
for(int i=0; i<w.size(); i++){
kai[w[i]-'a']++;
}
for(int i=0; i<26; i++){
if(kai[i]%2 === 1){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:41:23: error: expected primary-expression before '=' token
41 | if(kai[i]%2 === 1){
| ^
|
s371952291 | p04012 | C | #include<stdio.h>
#include<string.h>
using namespace std;
int v[105];
int main()
{char w[105];
int len,cnt,value;
scanf("%s",w);
len=strlen(w);
for(int i=0;i<len;i++)
{value=w[i]-'a';
v[value]++;
}
for(int j=0;j<26;j++)
{
if(v[j]%2==1)
cnt=0;
else if(v[j]%2==0) cnt=1;
}
if(cnt==1) printf("Yes");
else if(cnt==0) printf("No");
return 0;
} | main.c:3:1: error: unknown type name 'using'
3 | using namespace std;
| ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
3 | using namespace std;
| ^~~
|
s033956629 | p04012 | C | #include<stdio.h>
int main(){
int count[30]={0};
int i;
char s[101];
scanf("%s",s);
for(i=0;s[i]!=0;i++){
count[s[i]-'a']++;
}
for(i=0;i<30;i++){
if(count[i]%2==1){
puts("No");
return 0;
}
}
puts("Yes"");
return 0;
} | main.c: In function 'main':
main.c:17:11: warning: missing terminating " character
17 | puts("Yes"");
| ^
main.c:17:11: error: missing terminating " character
17 | puts("Yes"");
| ^~~
main.c:17:11: error: expected ')' before 'return'
17 | puts("Yes"");
| ~ ^
| )
18 | return 0;
| ~~~~~~
main.c:18:10: error: expected ';' before '}' token
18 | return 0;
| ^
| ;
19 | }
| ~
|
s189862885 | p04012 | C++ | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
int num[30];
int main()
{
char s[103];
gets(s);
int l = strlen(s);
for(int i=0;i<l;i++)
{
num[ s[i]-'a' ]++;
}
bool flag = 0;
for(int i=0;i<26;i++)
if(num[i]&1)
{
flag = 1;
break;
}
if(flag)
puts("No");
else puts("Yes");
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(s);
| ^~~~
| getw
|
s504729597 | p04012 | C++ | #include<stdio.h>
#include<string.h>
int num[30];
int main()
{
int s[103];
gets(s);
int l = strlen(s);
for(int i=0;i<l;i++)
{
num[ s[i]-'a' ]++;
}
bool flag = 0;
for(int i=0;i<26;i++)
if(num[i]&1)
{
flag = 1;
break;
}
if(flag)
cout<<"No"<<endl;
else cout<<"Yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
a.cc:8:20: error: cannot convert 'int*' to 'const char*'
8 | int l = strlen(s);
| ^
| |
| int*
In file included from a.cc:2:
/usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
a.cc:21:9: error: 'cout' was not declared in this scope
21 | cout<<"No"<<endl;
| ^~~~
a.cc:21:21: error: 'endl' was not declared in this scope
21 | cout<<"No"<<endl;
| ^~~~
a.cc:22:10: error: 'cout' was not declared in this scope
22 | else cout<<"Yes"<<endl;
| ^~~~
a.cc:22:23: error: 'endl' was not declared in this scope
22 | else cout<<"Yes"<<endl;
| ^~~~
|
s801775470 | p04012 | C++ | #include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <ostream>
#include <fstream>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <math.h>
using namespace std;
const int maxn = 3e2+3;
typedef long long ll;
const ll mod = 1e9 + 7;
int num[30];
int main()
{
int s[maxn];
cin>>s;
int l = strlen(s);
for(int i=0;i<l;i++)
{
num[ s[i]-'a' ]++;
}
bool flag = 0;
for(int i=0;i<26;i++)
if(num[i]&1)
{
flag = 1;
break;
}
if(flag)
cout<<"No"<<endl;
else cout<<"Yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:22:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [303]')
22 | cin>>s;
| ~~~^~~
| | |
| | int [303]
| 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:22:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
22 | cin>>s;
| ^
/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:22:10: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(short int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(short unsigned int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(unsigned int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long unsigned int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long long int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long long unsigned int)((int*)(& s))' 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:22:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
22 | cin>>s;
| ^
/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 [303]' 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 [303]' 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 [303]' 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 [303]' 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 [303]' 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; _Traits = std::char_traits<char>; __istream_type = std::basic_istr |
s082377712 | p04012 | C++ | #include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <ostream>
#include <fstream>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <math.h>
using namespace std;
const int maxn = 3e2+3;
typedef long long ll;
const ll mod = 1e9 + 7;
int num[30];
int main()
{
int s[maxn];
cin>>s;
int l = strlen(s);
for(int i=0;i<l;i++)
{
num[ s[i]-'a' ]++;
}
bool flag = 0;
for(int i=0;i<26;i++)
if(num[i]&1)
{
flag = 1;
break;
}
if(flag)
cout<<"No"<<endl;
else cout<<"Yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:22:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [303]')
22 | cin>>s;
| ~~~^~~
| | |
| | int [303]
| 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:22:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
22 | cin>>s;
| ^
/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:22:10: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(short int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(short unsigned int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(unsigned int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long unsigned int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long long int)((int*)(& s))' 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:22:10: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
22 | cin>>s;
| ^
| |
| int*
a.cc:22:10: error: cannot bind rvalue '(long long unsigned int)((int*)(& s))' 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:22:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
22 | cin>>s;
| ^
/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 [303]' 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 [303]' 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 [303]' 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 [303]' 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 [303]' 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; _Traits = std::char_traits<char>; __istream_type = std::basic_istr |
s496117671 | p04012 | C++ | char w[105];
int flag[27];
int k;
int main()
{
scanf("%s",w);
int len = strlen(w);
for(int i = 0;i < len; i++){
flag[w[i] - 'a']++;
}
for(int i = 0;i < 26;i++){
if(flag[i]%2 != 0) {
printf("NO\n");return 0;
}
}
printf("YES\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf' was not declared in this scope
7 | scanf("%s",w);
| ^~~~~
a.cc:8:19: error: 'strlen' was not declared in this scope
8 | int len = strlen(w);
| ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
+++ |+#include <cstring>
1 | char w[105];
a.cc:14:25: error: 'printf' was not declared in this scope
14 | printf("NO\n");return 0;
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | char w[105];
a.cc:17:9: error: 'printf' was not declared in this scope
17 | printf("YES\n");
| ^~~~~~
a.cc:17:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s444361835 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<int> word(30);
for (int i = 0; i < w.size(); i++) {
word[w[i] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (word[i]%2 != 0) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0:
} | a.cc: In function 'int main()':
a.cc:17:17: error: expected ';' before ':' token
17 | return 0:
| ^
| ;
a.cc:17:17: error: expected primary-expression before ':' token
|
s714117333 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<int> word(30);
for (int i = 0; i < w.size(); i++) {
word[w[i] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (word[i]%2 != 0) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" < endl;
return 0:
} | a.cc: In function 'int main()':
a.cc:16:23: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
16 | cout << "Yes" < endl;
| ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: couldn't deduce template parameter '_Bi_iter'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: couldn't deduce template parameter '_Bi_iter'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
16 | cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: couldn't deduce template parameter '_CharT'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::ba |
s519900771 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<int> word(30);
for (int i = 0; i < w.size(); i++) {
word[w[i] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (word[i]52 != 0) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" < endl;
return 0:
} | a.cc: In function 'int main()':
a.cc:11:28: error: expected ')' before numeric constant
11 | if (word[i]52 != 0) {
| ~ ^~
| )
a.cc:16:23: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
16 | cout << "Yes" < endl;
| ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: couldn't deduce template parameter '_Bi_iter'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: couldn't deduce template parameter '_Bi_iter'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
16 | cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: couldn't deduce template parameter '_CharT'
16 | cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:16:25: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << "Yes" < endl;
| |
s390148021 | p04012 | C++ | #include<cstdio>
#include<string.h>
int main(){
char a[100];
int i=0;
gets(a);
while(a[i]!='\0'){
i++;
}
if(i%2==0){printf("YES\n");}
else {printf("NO\n");}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(a);
| ^~~~
| getw
|
s519239700 | p04012 | C++ | #include<stdio.h>
#include<string.h>
int main(){
char a[100];
int i=0,b;
gets(a);
while(a[i]!='\0'){
i++;
}
if(i%2==0){printf("YES\n");}
else {printf("NO\n");}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(a);
| ^~~~
| getw
|
s137713609 | p04012 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<algorithm>
#include<stdlib.h>
#define _USE_MATH_DEFINES
#include<math.h>
#include<numeric>
#include<iomanip>
using namespace std;
int main() {
string s; cin >> s;
sort(s.begin(), s.end());
int count = 1;
int tmp = 0;
//cout << s << endl;
if (s.size != 1) {
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == s[i + 1]) {
count++;
}
else if (count % 2 == 1) {
tmp++;
break;
}
else {
count = 1;
}
}
}
else {
tmp++;
}
if (tmp == 0) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:21:15: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
21 | if (s.size != 1) {
| ~~^~~~
| ()
|
s407701850 | p04012 | C++ | #include<stdio.h>
int strlng(char a[])
{
int i;
for(i=1; a[i]!='\0'; i++)
{
}
return i;
}
int main()
{
char w[1000];
int i, j, ln, count, flag=0;
scanf("%s", w);
ln = strlng(w);
for(i=0; i<ln; i++)
{
count = 0;
for(j=0; j<ln; j++)
{
if(w[j] == w[i])
{
count++;
}
}
if(count%2 == 0)
{
flag=1;
}
else(count%2 != 0)
{
printf("No\n");
return 0;
}
}
if(flag==1)
{
printf("Yes\n");
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:31:27: error: expected ';' before '{' token
31 | else(count%2 != 0)
| ^
| ;
32 | {
| ~
|
s489144296 | p04012 | C | #include <stdio.h>
main()
{
char w[99],c;
int i = 0,j = 0,k = 0,n[25];
for(i = 0;i <= 25;i++)
{
n[i] = 0;
}
while(scanf("%c",&c),c!='\n')
{
n[c-97]++;
w[i++] = c;
}
w[i] = '\0';
for(i = 0;i <=25;i++)
{
if(n[i] != 1 && n%2 != 1)
{
j++;
}
else if(n[i] == 0)
{
k++;
}
else
{
break;
}
}
if(j+k == 26 && k!= 26)
printf("Yes\n");
else
printf("No\n");
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
main.c: In function 'main':
main.c:18:18: error: invalid operands to binary % (have 'int *' and 'int')
18 | if(n[i] != 1 && n%2 != 1)
| ~~ ^
| |
| int *
|
s069426238 | p04012 | C | #include <stdio.h>
main()
{
char w[99],c;
int i = 0,j = 0,k = 0,n[25];
for(i = 0;i <= 25;i++)
{
n[i] = 0;
}
while(scanf("%c",&c),c!='\n')
{
n[c-97]++;
w[i++] = c;
}
w[i] = '\0';
for(i = 0;i <=25;i++)
{
if(n[i] != 1 && n%2 != 1)
{
j++;
}
else if(n[i] == 0)
{
k++;
}
else
{
break;
}
}
if(m+k == 26 && k!= 26)
printf("Yes\n");
else
printf("No\n");
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
main.c: In function 'main':
main.c:18:18: error: invalid operands to binary % (have 'int *' and 'int')
18 | if(n[i] != 1 && n%2 != 1)
| ~~ ^
| |
| int *
main.c:31:4: error: 'm' undeclared (first use in this function)
31 | if(m+k == 26 && k!= 26)
| ^
main.c:31:4: note: each undeclared identifier is reported only once for each function it appears in
|
s513894243 | p04012 | C++ | #include <iostream>
using namespace std;
int a[26];
int main() {
string a;
int i;
bool flag=true;
cin>>a;
for(i=0;i<a.size();i++)
{
switch(a[i])
case a: a[0]++; break;
case b: a[1]++; break;
case c: a[2]++; break;
case d: a[3]++; break;
case e: a[4]++; break;
case f: a[5]++; break;
case g: a[6]++; break;
case h: a[7]++; break;
case i: a[8]++; break;
case j: a[9]++; break;
case k: a[10]++; break;
case l: a[11]++; break;
case m: a[12]++; break;
case n: a[13]++; break;
case o: a[14]++; break;
case p: a[15]++; break;
case q: a[16]++; break;
case r: a[17]++; break;
case s: a[18]++; break;
case t: a[19]++; break;
case u: a[20]++; break;
case v: a[21]++; break;
case w: a[22]++; break;
case x: a[23]++; break;
case y: a[24]++; break;
case z: a[25]++; break;
}
for(i=0;i<=25;i++)
{
if(a[i]%2!=0) flag=false;
}
if(flag==true) cout<<"Yes";
else cout<<"No";
return 0;
} | a.cc: In function 'int main()':
a.cc:12:14: error: the value of 'a' is not usable in a constant expression
12 | case a: a[0]++; break;
| ^
a.cc:5:12: note: 'a' was not declared 'constexpr'
5 | string a;
| ^
a.cc:12:14: error: could not convert 'a' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
12 | case a: a[0]++; break;
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
a.cc:13:14: error: 'b' was not declared in this scope
13 | case b: a[1]++; break;
| ^
a.cc:13:9: error: case label '<expression error>' not within a switch statement
13 | case b: a[1]++; break;
| ^~~~
a.cc:14:14: error: 'c' was not declared in this scope
14 | case c: a[2]++; break;
| ^
a.cc:14:9: error: case label '<expression error>' not within a switch statement
14 | case c: a[2]++; break;
| ^~~~
a.cc:15:14: error: 'd' was not declared in this scope
15 | case d: a[3]++; break;
| ^
a.cc:15:9: error: case label '<expression error>' not within a switch statement
15 | case d: a[3]++; break;
| ^~~~
a.cc:16:14: error: 'e' was not declared in this scope
16 | case e: a[4]++; break;
| ^
a.cc:16:9: error: case label '<expression error>' not within a switch statement
16 | case e: a[4]++; break;
| ^~~~
a.cc:17:14: error: 'f' was not declared in this scope
17 | case f: a[5]++; break;
| ^
a.cc:17:9: error: case label '<expression error>' not within a switch statement
17 | case f: a[5]++; break;
| ^~~~
a.cc:18:14: error: 'g' was not declared in this scope
18 | case g: a[6]++; break;
| ^
a.cc:18:9: error: case label '<expression error>' not within a switch statement
18 | case g: a[6]++; break;
| ^~~~
a.cc:19:14: error: 'h' was not declared in this scope
19 | case h: a[7]++; break;
| ^
a.cc:19:9: error: case label '<expression error>' not within a switch statement
19 | case h: a[7]++; break;
| ^~~~
a.cc:20:14: error: the value of 'i' is not usable in a constant expression
20 | case i: a[8]++; break;
| ^
a.cc:6:9: note: 'int i' is not const
6 | int i;
| ^
a.cc:20:9: error: case label 'i' not within a switch statement
20 | case i: a[8]++; break;
| ^~~~
a.cc:21:14: error: 'j' was not declared in this scope
21 | case j: a[9]++; break;
| ^
a.cc:21:9: error: case label '<expression error>' not within a switch statement
21 | case j: a[9]++; break;
| ^~~~
a.cc:22:14: error: 'k' was not declared in this scope
22 | case k: a[10]++; break;
| ^
a.cc:22:9: error: case label '<expression error>' not within a switch statement
22 | case k: a[10]++; break;
| ^~~~
a.cc:23:14: error: 'l' was not declared in this scope
23 | case l: a[11]++; break;
| ^
a.cc:23:9: error: case label '<expression error>' not within a switch statement
23 | case l: a[11]++; break;
| ^~~~
a.cc:24:14: error: 'm' was not declared in this scope
24 | case m: a[12]++; break;
| ^
a.cc:24:9: error: case label '<expression error>' not within a switch statement
24 | case m: a[12]++; break;
| ^~~~
a.cc:25:14: error: 'n' was not declared in this scope
25 | case n: a[13]++; break;
| ^
a.cc:25:9: error: case label '<expression error>' not within a switch statement
25 | case n: a[13]++; break;
| ^~~~
a.cc:26:14: error: 'o' was not declared in this scope
26 | case o: a[14]++; break;
| ^
a.cc:26:9: error: case label '<expression error>' not within a switch statement
26 | case o: a[14]++; break;
| ^~~~
a.cc:27:14: error: 'p' was not declared in this scope
27 | case p: a[15]++; break;
| ^
a.cc:27:9: error: case label '<expression error>' not within a switch statement
27 | case p: a[15]++; break;
| ^~~~
a.cc:28:14: error: 'q' was not declared in this scope
28 | case q: a[16]++; break;
| ^
a.cc:28:9: error: case label '<expression error>' not within a switch statement
28 | case q: a[16]++; break;
| ^~~~
a.cc:29:14: error: 'r' was not declared in this scope
29 | case r: a[17]++; break;
| ^
a.cc:29:9: error: case label '<expression error>' not within a switch statement
29 | case r: a[17]++; break;
| ^~~~
a.cc:30:14: error: 's' was not declared in this scope
30 | case s: a[18]++; break;
| ^
a.cc:30:9: error: case label '<expression error>' not within a switch statement
30 | case s: a[18]++; break;
| ^~~~
a.cc:31:14: error: 't' was not declared in this scope
31 | case t: a[19]++; break;
| ^
a.cc:31:9: error: case label '<expression error>' not within a switch statement
31 | case t: a[19]++; break;
| ^~~~
a.cc:32:14: error: 'u' was not declared in this scope
32 | case u: a[20]++; break;
| ^
a.cc:32:9: error: case label '<expression error>' not within a switch statement
32 | case u: a[20]++; break;
| ^~~~
a.cc:33:14: error: 'v' was not declared in this scope
33 | case v: a[21]++; break;
| ^
a.cc:33:9: error: case label '<expression error>' not within a switch statement
33 | case v: a[21]++; break;
| ^~~~
a.cc:34:14: error: 'w' was not declared in this scope
34 | case w: a[22]++; break;
| ^
a.cc:34:9: error: case label '<expression error>' not within a switch statement
34 | case w: a[22]++; break;
| ^~~~
a.cc:35:14: error: 'x' was not declared in this scope
35 | case x: a[23]++; break;
| ^
a.cc:35:9: error: case label '<expression error>' not within a switch statement
35 | case x: a[23]++; break;
| ^~~~
a.cc:36:14: error: 'y' was not declared in this scope
36 | case y: a[24]++; break;
| ^
a.cc:36:9: error: case label '<expression error>' not within a switch statement
36 | case y: a[24]++; break;
| ^~~~
a.cc:37:14: error: 'z' was not declared in this scope
37 | case z: a[25]++; break;
| ^
a.cc:37:9: error: case label '<expression error>' not within a switch statement
37 | case z: a[25]++; break;
| ^~~~
|
s319030649 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int hash[26];
int main(){
int i;
string s;
cin>>s;
for(i=0;i<s.size();i++){
hash[s[i]-'a']++;
}
for(i=1;i<=26;i++){
if(hash[i]%2!=0){
cout<<"No";
return 0;
}
}
cout<<"Yes";
} | a.cc: In function 'int main()':
a.cc:9:17: error: reference to 'hash' is ambiguous
9 | hash[s[i]-'a']++;
| ^~~~
In file included from /usr/include/c++/14/string_view:50,
from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:3:5: note: 'int hash [26]'
3 | int hash[26];
| ^~~~
a.cc:12:20: error: reference to 'hash' is ambiguous
12 | if(hash[i]%2!=0){
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:3:5: note: 'int hash [26]'
3 | int hash[26];
| ^~~~
|
s710693417 | p04012 | C++ | #include <stdio.h>
#include <string.h>
int main(void) {
char w[1000];
int i,a[26]={0},d,l;
gets(w);
l=strlen(w);
for(i=0;i<l;i++){
d=w[i]-97;
a[d]++;
}
for(i=0;i<26;i++){
if(a[i]%2!=0){
printf("No\n");
return 0;
}
}
printf("Yes\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(w);
| ^~~~
| getw
|
s274214577 | p04012 | Java | import java.util.Scanner;
class Main
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String a=sc.next();
int[] cmj=new int[26];
for(int i=0; i<a.length(); i++) {
cmj[a.charAt(i)-97]++;
}
for(int i=0; i<26; i++) {
if(cmj[i]%2==1) {
System.out.println("No");
System.exit(0);
}
}
System.out.println("Yes");
}
} | Main.java:3: error: '{' expected
class Main
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:23: error: class, interface, enum, or record expected
}
^
3 errors
|
s600815488 | p04012 | C++ |
Problem
Status
Contest
User
Group
Forum
Article
Logout
riyad_045
Begin: 2018-07-02 10:00 BST
Long Contest One: 02 July 2018
End: 2018-07-08 09:00 BST
143:00:00
Ended
Overview
Problem
Status
Rank (143:00:00)
0 Comments
Previous12345…Next
Username
Prob
Result
Time
(ms) Mem
(MB) Lang
Submit Time
riyad_045
I
Runtime Error
Bash (GNU bash v4.3.11)
1 days ago
All Copyright Reserved ©2018 Xu Han
Server Time: 2018-09-01 21:20:20 BST
#15764756 | riyad_045's solution for [AtCoder-2036] [Problem I]
Status
Runtime Error
Length
707
Lang
Bash (GNU bash v4.3.11)
Submitted
2018-08-31 10:41:26
Shared
RemoteRunId
3106158
0.0 / 12.0
Select Code
#include<stdio.h>
int main()
{
char a[1000],temp;
int i,j,flag=0,c=0;
scanf("%s",a);
for(i=0;a[i]!='\0';i++)
{
if(a[i]>='a' && a[i]<='z')
{
c++;
temp=a[i];
a[i]='0';
for(j=0;a[j]!='\0';j++)
{
if(a[j]==temp)
{
a[j]=0;
c++;
}
}
if(c%2==0)
{
flag=1;
}
else
{
break;
}
}
}
if(flag==1)
{
printf("Yes\n");
}
else if(flag==0)
{
printf("No\n");
}
return 0;
} | a.cc:13:14: error: invalid digit "8" in octal constant
13 | End: 2018-07-08 09:00 BST
| ^~
a.cc:13:17: error: invalid digit "9" in octal constant
13 | End: 2018-07-08 09:00 BST
| ^~
a.cc:21:1: error: extended character … is not valid in an identifier
21 | Previous12345…Next
| ^
a.cc:33:18: error: too many decimal points in number
33 | Bash (GNU bash v4.3.11)
| ^~~~~
a.cc:36:24: error: extended character © is not valid in an identifier
36 | All Copyright Reserved ©2018 Xu Han
| ^
a.cc:37:19: error: invalid digit "9" in octal constant
37 | Server Time: 2018-09-01 21:20:20 BST
| ^~
a.cc:39:11: error: "|" is not a valid filename
39 | #15764756 | riyad_045's solution for [AtCoder-2036] [Problem I]
| ^
a.cc:39:22: warning: missing terminating ' character
39 | #15764756 | riyad_045's solution for [AtCoder-2036] [Problem I]
| ^
a.cc:45:18: error: too many decimal points in number
45 | Bash (GNU bash v4.3.11)
| ^~~~~
a.cc:47:6: error: invalid digit "8" in octal constant
47 | 2018-08-31 10:41:26
| ^~
a.cc:2:1: error: 'Problem' does not name a type
2 | Problem
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:60:5: error: 'scanf' was not declared in this scope
60 | scanf("%s",a);
| ^~~~~
a.cc:88:9: error: 'printf' was not declared in this scope
88 | printf("Yes\n");
| ^~~~~~
a.cc:55:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
54 | #include<stdio.h>
+++ |+#include <cstdio>
55 |
a.cc:92:9: error: 'printf' was not declared in this scope
92 | printf("No\n");
| ^~~~~~
a.cc:92:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s693695576 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
#define INF 1<<30
#define LINF 1ll<<60ll
#define MOD 1000000007
#define pb(a) push_back(a)
#define _overload3(_1,_2,_3,_4,name,...) name
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(int i=a, i##_len=(b); i<i##_len; ++i)
#define _repis(i,a,b,s) for(int i=a, i##_len(b); i<i##_len; i+=s)
#define REP(...) _overload3(__VA_ARGS__,_repis,_repi,_rep,)(__VA_ARGS__)
#define REPR(i, n) for(int i = n;i >= 0;--i)
#define REPARR(i, v) for(int i = 0;i < sz(v);++i)
#define all(vec) (vec.begin()),(vec.end())
#define sz(x) ((int)(x).size())
#define bit(n) (1ll<<(n))
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
#define YES(n) cout<<((n)?"YES":"NO")<<endl
#define Yes(n) cout<<((n)?"Yes":"No")<<endl
#define yes(n) cout<<((n)?"yes":"no")<<endl
#define poss(n) cout<<((n)?"possible":"impossible")<<endl
#define Poss(n) cout<<((n)?"Possible":"Impossible")<<endl
#define POSS(n) cout<<((n)?"POSSIBLE":"IMPOSSIBLE")<<endl
int main(){
string s;
cin>>s;
vector<bool> x(26);
REPARR(i,s){
x[s[i]-'a']^=1;
}
bool flag=true;
REP(i,26){
if(s[i])flag=false;
}
Yes(flag);
return 0;
} | a.cc: In function 'int main()':
a.cc:48:20: error: no match for 'operator^=' (operand types are 'std::vector<bool>::reference' and 'int')
48 | x[s[i]-'a']^=1;
| ~~~~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:178:3: note: candidate: 'constexpr std::byte& std::operator^=(byte&, byte)'
178 | operator^=(byte& __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:178:20: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::byte&'
178 | operator^=(byte& __l, byte __r) noexcept
| ~~~~~~^~~
In file included from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/bits/ios_base.h:114:3: note: candidate: 'constexpr const std::_Ios_Fmtflags& std::operator^=(_Ios_Fmtflags&, _Ios_Fmtflags)'
114 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:114:29: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::_Ios_Fmtflags&'
114 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:164:3: note: candidate: 'constexpr const std::_Ios_Openmode& std::operator^=(_Ios_Openmode&, _Ios_Openmode)'
164 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:164:29: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::_Ios_Openmode&'
164 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:211:3: note: candidate: 'constexpr const std::_Ios_Iostate& std::operator^=(_Ios_Iostate&, _Ios_Iostate)'
211 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:211:28: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::_Ios_Iostate&'
211 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:176:
/usr/include/c++/14/future:189:18: note: candidate: 'constexpr std::launch& std::operator^=(launch&, launch)'
189 | inline launch& operator^=(launch& __x, launch __y) noexcept
| ^~~~~~~~
/usr/include/c++/14/future:189:37: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::launch&'
189 | inline launch& operator^=(launch& __x, launch __y) noexcept
| ~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:198:
/usr/include/c++/14/charconv:654:3: note: candidate: 'constexpr std::chars_format& std::operator^=(chars_format&, chars_format)'
654 | operator^=(chars_format& __lhs, chars_format __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/charconv:654:28: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::chars_format&'
654 | operator^=(chars_format& __lhs, chars_format __rhs) noexcept
| ~~~~~~~~~~~~~~^~~~~
|
s404782908 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
#define INF 1<<30
#define LINF 1ll<<60ll
#define MOD 1000000007
#define pb(a) push_back(a)
#define _overload3(_1,_2,_3,_4,name,...) name
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(int i=a, i##_len=(b); i<i##_len; ++i)
#define _repis(i,a,b,s) for(int i=a, i##_len(b); i<i##_len; i+=s)
#define REP(...) _overload3(__VA_ARGS__,_repis,_repi,_rep,)(__VA_ARGS__)
#define REPR(i, n) for(int i = n;i >= 0;--i)
#define REPARR(i, v) for(int i = 0;i < sz(v);++i)
#define all(vec) (vec.begin()),(vec.end())
#define sz(x) ((int)(x).size())
#define bit(n) (1ll<<(n))
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
#define YES(n) cout<<((n)?"YES":"NO")<<endl
#define Yes(n) cout<<((n)?"Yes":"No")<<endl
#define yes(n) cout<<((n)?"yes":"no")<<endl
#define poss(n) cout<<((n)?"possible":"impossible")<<endl
#define Poss(n) cout<<((n)?"Possible":"Impossible")<<endl
#define POSS(n) cout<<((n)?"POSSIBLE":"IMPOSSIBLE")<<endl
int main(){
string s;
cin>>s;
vector<bool> x(26);
REPARR(i,s){
x[s[i]-'a']^=1;
}
bool flag=true:
REP(i,26){
if(s[i])flag=false;
}
Yes(flag);
return 0;
} | a.cc: In function 'int main()':
a.cc:48:20: error: no match for 'operator^=' (operand types are 'std::vector<bool>::reference' and 'int')
48 | x[s[i]-'a']^=1;
| ~~~~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:178:3: note: candidate: 'constexpr std::byte& std::operator^=(byte&, byte)'
178 | operator^=(byte& __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:178:20: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::byte&'
178 | operator^=(byte& __l, byte __r) noexcept
| ~~~~~~^~~
In file included from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/bits/ios_base.h:114:3: note: candidate: 'constexpr const std::_Ios_Fmtflags& std::operator^=(_Ios_Fmtflags&, _Ios_Fmtflags)'
114 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:114:29: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::_Ios_Fmtflags&'
114 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:164:3: note: candidate: 'constexpr const std::_Ios_Openmode& std::operator^=(_Ios_Openmode&, _Ios_Openmode)'
164 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:164:29: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::_Ios_Openmode&'
164 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:211:3: note: candidate: 'constexpr const std::_Ios_Iostate& std::operator^=(_Ios_Iostate&, _Ios_Iostate)'
211 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:211:28: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::_Ios_Iostate&'
211 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:176:
/usr/include/c++/14/future:189:18: note: candidate: 'constexpr std::launch& std::operator^=(launch&, launch)'
189 | inline launch& operator^=(launch& __x, launch __y) noexcept
| ^~~~~~~~
/usr/include/c++/14/future:189:37: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::launch&'
189 | inline launch& operator^=(launch& __x, launch __y) noexcept
| ~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:198:
/usr/include/c++/14/charconv:654:3: note: candidate: 'constexpr std::chars_format& std::operator^=(chars_format&, chars_format)'
654 | operator^=(chars_format& __lhs, chars_format __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/charconv:654:28: note: no known conversion for argument 1 from 'std::vector<bool>::reference' to 'std::chars_format&'
654 | operator^=(chars_format& __lhs, chars_format __rhs) noexcept
| ~~~~~~~~~~~~~~^~~~~
a.cc:50:19: error: expected ',' or ';' before ':' token
50 | bool flag=true:
| ^
a.cc:51:9: error: 'i' was not declared in this scope
51 | REP(i,26){
| ^
a.cc:20:48: note: in definition of macro '_repi'
20 | #define _repi(i,a,b) for(int i=a, i##_len=(b); i<i##_len; ++i)
| ^
a.cc:18:42: note: in expansion of macro '_rep'
18 | #define _overload3(_1,_2,_3,_4,name,...) name
| ^~~~
a.cc:51:5: note: in expansion of macro 'REP'
51 | REP(i,26){
| ^~~
a.cc:51:9: error: 'i_len' was not declared in this scope
51 | REP(i,26){
| ^
a.cc:20:50: note: in definition of macro '_repi'
20 | #define _repi(i,a,b) for(int i=a, i##_len=(b); i<i##_len; ++i)
| ^
a.cc:18:42: note: in expansion of macro '_rep'
18 | #define _overload3(_1,_2,_3,_4,name,...) name
| ^~~~
a.cc:51:5: note: in expansion of macro 'REP'
51 | REP(i,26){
| ^~~
|
s772743830 | p04012 | Java |
import java.math.BigDecimal;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String w = sc.next();
String res = "Yes";
for (char c='a'; c<='z'; c++){
int count = 0;
for (int i=0; i<w.length(); i++){
if (w.charAt(i) == c){
count++;
}
}
}
if (count%2 == 1){
res = "No";
}
System.out.println(res);
}
} | Main.java:22: error: cannot find symbol
if (count%2 == 1){
^
symbol: variable count
location: class Main
1 error
|
s542258029 | p04012 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string w;
cin >> w;
string v = w;
sort(v.begin(), v.end());
v.erase(unique(v.begin(), v.end()), v.end());
char t;
int count;
int flag;
for (int i = 0; i < v.size(); i++){
t = v[i];
count = 0;
for (int j = 0; j < w.size(); j++){
if (w[j] == t){
count += 1;
}
}
if ((count % 2) != 0){
cout << "No" << endl;
return 0;
}
}
/*
if (flag == 0){
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
*/
cout << "Yes" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(v.begin(), v.end());
| ^~~~
| short
a.cc:13:11: error: 'unique' was not declared in this scope
13 | v.erase(unique(v.begin(), v.end()), v.end());
| ^~~~~~
|
s076601035 | p04012 | C++ | #include <stdio.h>
#include<stdlib.h>
int main(void) {
// your code goes here
char s[110];
scanf("%s", s);
int l=strlen(s);
int arr[26]={0};
int i;
for(i=0; i<l; ++i){
++arr[s[i]-97];
}
for(i=0; i<26; ++i){
if(arr[i]%2!=0){
break;
}
}
if(i==26) printf("Yes");
else printf("No");
} | a.cc: In function 'int main()':
a.cc:8:15: error: 'strlen' was not declared in this scope
8 | int l=strlen(s);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<stdlib.h>
+++ |+#include <cstring>
3 |
|
s434234577 | p04012 | C++ | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
char s[110];
int c[26],i,t;
memset(c, 0, 26*sizeof(c[0]));
gets(s);
i=0;
while(s[i]!='\0')
{
t=s[i] - 'a';
c[t]++;
i++;
}
for(i=0;i<26;i++)
{
if(c[i]%2!=0)
{
printf("No\n");
return 0;
}
}
printf("Yes\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(s);
| ^~~~
| getw
|
s640805578 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
sort(s.begin(),s.end());
if(w.size()%2 == 0)
{
for(int i=1;i<s.size();i+=2)
{
if(s[i] != s[i-1])
{
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
else
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:12:8: error: 'w' was not declared in this scope
12 | if(w.size()%2 == 0)
| ^
|
s252546685 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string w;
cin >> w;
sort(w.begin(),w.end());
if(w.size()%2 == 0)
{
for(int i=1;i<s.size();i+=2)
{
if(s[i] != s[i-1])
{
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
else
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:14:23: error: 's' was not declared in this scope
14 | for(int i=1;i<s.size();i+=2)
| ^
|
s693385813 | p04012 | C++ | #include <iostream>
#include <Cstring>
using namespace std;
int main() {
char string[100];
int stringlong,n,s;
n = 1;
s = 0;
cin >> string;
stringlong = strlen(string);
for (int i = 0; i < stringlong; ++i) {
for (int j = 0; j < stringlong; ++j) {
if (string[i] == string[j]){
n++;
}
}
if (n % 2 != 0) {
s++;
}
n = 0;
}
if (s > 1){
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
return 0;
} | a.cc:2:10: fatal error: Cstring: No such file or directory
2 | #include <Cstring>
| ^~~~~~~~~
compilation terminated.
|
s084722853 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin >> a;
int arr[1000];
memset(arr,0,sizeof(arr));
for(int i=0;i<a.size();i++){
arr[(int)a[i]]++;
}
int c=0;
for (int i="a";i<="z",i++){
if(arr[i]%2!=0) c++;
}
if (c!=0) cout << "No" <<endl;
else cout << "Yes" << endl;
} | a.cc: In function 'int main()':
a.cc:13:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
13 | for (int i="a";i<="z",i++){
| ^~~
| |
| const char*
a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | for (int i="a";i<="z",i++){
| ~^~~~~
a.cc:13:30: error: expected ';' before ')' token
13 | for (int i="a";i<="z",i++){
| ^
| ;
|
s509614937 | p04012 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Main main=new Main();
main.run();
}
void run() {
Scanner sc=new Scanner(System.in);
String w=sc.next();
MapUtilStringInt data=new MapUtilStringInt();
data.receiveKeys(w);
for(Integer i:data.getValuesAscKey()) {
if(i%2==1) {
System.out.println("No");
return;
}
}
System.out.println("Yes");
}
}
class MapUtilStringInt {
private Map<String,Integer> data;
public MapUtilStringInt() {
data=new HashMap<String,Integer>();
}
public void receiveDataSet(int n,Scanner sc) {
for(int i=0;i<n;i++) {
String bufK=sc.next();
Integer bufV=sc.nextInt();
putWithCheckAndAdd(bufK,bufV);
}
}
public void putWithCheckAndAdd(String key,Integer Value) {
if(data.containsKey(key)) {
data.put(key, data.get(key)+Value);
}else {
data.put(key, 1);
}
}
public void receiveKeys(String s) {
String[] buf=s.split("");
for(int i=0;i<buf.length;i++) {
putWithCheckAndIncrement(buf[i]);
}
}
public void receiveKeys(int n,Scanner sc) {
for(int i=0;i<n;i++) {
String bufK=sc.next();
putWithCheckAndIncrement(bufK);
}
}
public void putWithCheckAndIncrement(String key) {
if(data.containsKey(key)) {
data.put(key, data.get(key)+1);
}else {
data.put(key, 1);
}
}
public Integer getValue(String key) {
return data.get(key);
}
public List<Integer> getValuesAscKey() {
List<Integer> result=new ArrayList<Integer>();
// キーでソートする
Object[] mapkey = data.keySet().toArray();
Arrays.sort(mapkey);
for (Object nKey : mapkey)
{
result.add(data.get(nKey));
}
return result;
}
public List<Integer> getValuesDscKey() {
List<Integer> result=new ArrayList<Integer>();
// キーでソートする
Object[] mapkey = data.keySet().toArray();
Arrays.sort(mapkey, Collections.reverseOrder());
for (Object nKey : mapkey)
{
result.add(data.get(nKey));
}
return result;
}
public Integer getBestN(int n) {
int result=-1;
int index=n-1;
if(index>=0 && index<=data.size()-1) {
result=sortValuesDsc().get(index).getValue();
}
return result;
}
public Integer getWorstN(int n) {
int result=-1;
int index=n-1;
if(index>=0 && index<=data.size()-1) {
result=sortValuesAsc().get(index).getValue();
}
return result;
}
public List<Entry<String, Integer>> sortValuesAsc() {
List<Entry<String, Integer>> list_entries = new ArrayList<Entry<String, Integer>>(data.entrySet());
Collections.sort(list_entries, new Comparator<Entry<String, Integer>>() {
public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
return obj1.getValue().compareTo(obj2.getValue());
}
});
return list_entries;
}
public List<Entry<String, Integer>> sortValuesDsc() {
List<Entry<String, Integer>> list_entries = new ArrayList<Entry<String, Integer>>(data.entrySet());
Collections.sort(list_entries, new Comparator<Entry<String, Integer>>() {
public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
return obj2.getValue().compareTo(obj1.getValue());
}
});
return list_entries;
}
public void print() {
for(Entry<String,Integer> entry:data.entrySet()) {
System.out.println(entry.getKey()+" "+entry.getValue());
}
}
public void printValuesAsc() {
List<Integer> Values=getValuesAscKey();
int counter=1;
for(Integer I:Values) {
System.out.print(I);
if(counter++==Values.size()) {
System.out.println();
}else {
System.out.print(" ");
}
}
}
public void printlnValuesAsc() {
List<Integer> Values=getValuesAscKey();
for(Integer I:Values) {
System.out.println(I);
}
}
public void printValuesDsc() {
List<Integer> Values=getValuesDscKey();
int counter=1;
for(Integer I:Values) {
System.out.print(I);
if(counter++==Values.size()) {
System.out.println();
}else {
System.out.print(" ");
}
}
}
public void printlnValuesDsc() {
List<Integer> Values=getValuesDscKey();
for(Integer I:Values) {
System.out.println(I);
}
}
public void printdataValueSortedDsc() {
for(Entry<String, Integer> entry:sortValuesDsc()) {
System.out.println(entry.getKey()+" "+entry.getValue());
}
}
public void printdataValueSortedAsc() {
for(Entry<String, Integer> entry:sortValuesAsc()) {
System.out.println(entry.getKey()+" "+entry.getValue());
}
}
}
| Main.java:177: error: cannot find symbol
public List<Entry<String, Integer>> sortValuesAsc() {
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:191: error: cannot find symbol
public List<Entry<String, Integer>> sortValuesDsc() {
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:178: error: cannot find symbol
List<Entry<String, Integer>> list_entries = new ArrayList<Entry<String, Integer>>(data.entrySet());
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:178: error: cannot find symbol
List<Entry<String, Integer>> list_entries = new ArrayList<Entry<String, Integer>>(data.entrySet());
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:180: error: cannot find symbol
Collections.sort(list_entries, new Comparator<Entry<String, Integer>>() {
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:181: error: cannot find symbol
public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
^
symbol: class Entry
Main.java:181: error: cannot find symbol
public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
^
symbol: class Entry
Main.java:192: error: cannot find symbol
List<Entry<String, Integer>> list_entries = new ArrayList<Entry<String, Integer>>(data.entrySet());
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:192: error: cannot find symbol
List<Entry<String, Integer>> list_entries = new ArrayList<Entry<String, Integer>>(data.entrySet());
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:194: error: cannot find symbol
Collections.sort(list_entries, new Comparator<Entry<String, Integer>>() {
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:195: error: cannot find symbol
public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
^
symbol: class Entry
Main.java:195: error: cannot find symbol
public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
^
symbol: class Entry
Main.java:208: error: cannot find symbol
for(Entry<String,Integer> entry:data.entrySet()) {
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:264: error: cannot find symbol
for(Entry<String, Integer> entry:sortValuesDsc()) {
^
symbol: class Entry
location: class MapUtilStringInt
Main.java:270: error: cannot find symbol
for(Entry<String, Integer> entry:sortValuesAsc()) {
^
symbol: class Entry
location: class MapUtilStringInt
15 errors
|
s690702951 | p04012 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
using ll =long long;
int main (void) {
int A[26]={0},s,x;
int main (void) {
while(cin >> s) ++A[s-'a'];
for (i=0;i<26;i++) A[i]%2?x=1:0;
cout <<(x?"No":"Yes");
} | a.cc: In function 'int main()':
a.cc:11:19: error: a function-definition is not allowed here before '{' token
11 | int main (void) {
| ^
a.cc:15:4: error: expected '}' at end of input
15 | }
| ^
a.cc:9:17: note: to match this '{'
9 | int main (void) {
| ^
|
s637306736 | p04012 | C++ | hthth
| a.cc:1:1: error: 'hthth' does not name a type
1 | hthth
| ^~~~~
|
s881285539 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
string a;
cin >> a;
vector<char> vector (a.size());
for(int i = 0;i < a.size();i++){
vec.at(i) = a.at(i);
}
sort(vec.begin(),vec.end());
for(int i = 0;i < vec.size();i = i + 2){
if(vec.at(i) == vec.at(i + 1)){
x++;}
}
if (x == vec.size() / 2){
cout << "Yes" << endl;
return 0;
}
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'vec' was not declared in this scope
10 | vec.at(i) = a.at(i);
| ^~~
a.cc:12:8: error: 'vec' was not declared in this scope
12 | sort(vec.begin(),vec.end());
| ^~~
|
s033505424 | p04012 | C++ | #include <stdio.h>
#include <algorithm>
#include<string.h>
using namespace std ;
#define N 110
int main()
{
int i,j,m,flag=1;
char x[N];
gets(x);
m=strlen(x);
int y[26];
memset(y,0,sizeof(y));
for(i=0;i<m;i++)
{
y[x[i]-'a']++;
}
for(j=0;j<26;j++)
{
if(y[j]%2!=0)
{
flag=0;
break;
}
}
if(flag) printf("Yes");
else printf("No");
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:7: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(x);
| ^~~~
| getw
|
s341161046 | p04012 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define MAX_N 105
char str[MAX_N];
int len,t;
bool ok;
int main(){
scanf("%s",str);
ok = true;
t = 1;
len=(int)strlen(str);
if(len == 1){
ok = false;
}
sort(str,str+len);
for(int i = 0;i < len;i++){
if(str[i] == str[i+1]) {
t++;
}
else if(t%2){
ok = false;
break;
}
else{
t = 1;
}
}
if(ok) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(str,str+len);
| ^~~~
| short
|
s696033804 | p04012 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
#define MAX_N 105
char str[MAX_N];
int len,t;
bool ok;
int main(){
scanf("%s",str);
ok = true;
t = 1;
len=(int)strlen(str);
if(len == 1){
ok = false;
}
sort(str,str+len);
for(int i = 0;i < len;i++){
if(str[i] == str[i+1]) {
t++;
}
else if(t%2){
ok = false;
break;
}
else{
t = 1;
}
}
if(ok) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:14: error: 'strlen' was not declared in this scope
15 | len=(int)strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cstdio>
+++ |+#include <cstring>
3 | using namespace std;
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
19 | sort(str,str+len);
| ^~~~
| short
|
s364395860 | p04012 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
getline(cin, str);
auto ary = str.c_str();
bool ret = true;
for (char c = 'a'; c <= 'z'; ++c)
{
ret &=
(count(ary, ary + str.size(), c) % 2 == 0);
if (!ret)
{
break;
}
}
cout << (ret ? "Yes" : "No") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:14: error: 'count' was not declared in this scope
15 | (count(ary, ary + str.size(), c) % 2 == 0);
| ^~~~~
|
s566551174 | p04012 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
using name space std;
string w;
bool f=true;
vector <char> s;
map <char,int> a;
int main(){
cin>>w;
for(int i=0;i<w.length();i++){
if(a[w[i]]==0){
s.push_back(w[i]);
}
a[w[i]]++;
}
for(int i=0;i<s.size();i++){
if(a[s[i]]%2==1){
f=false;
break;
}
}
if(f){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
return 0;
} | a.cc:5:7: error: expected nested-name-specifier before 'name'
5 | using name space std;
| ^~~~
a.cc:6:1: error: 'string' does not name a type; did you mean 'stdin'?
6 | string w;
| ^~~~~~
| stdin
a.cc:8:1: error: 'vector' does not name a type
8 | vector <char> s;
| ^~~~~~
a.cc:9:1: error: 'map' does not name a type
9 | map <char,int> a;
| ^~~
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
12 | cin>>w;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:12:8: error: 'w' was not declared in this scope
12 | cin>>w;
| ^
a.cc:14:8: error: 'a' was not declared in this scope
14 | if(a[w[i]]==0){
| ^
a.cc:15:7: error: 's' was not declared in this scope
15 | s.push_back(w[i]);
| ^
a.cc:17:5: error: 'a' was not declared in this scope
17 | a[w[i]]++;
| ^
a.cc:19:17: error: 's' was not declared in this scope
19 | for(int i=0;i<s.size();i++){
| ^
a.cc:20:8: error: 'a' was not declared in this scope
20 | if(a[s[i]]%2==1){
| ^
a.cc:26:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
26 | cout<<"YES"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:26:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
26 | cout<<"YES"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:28:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
28 | cout<<"NO"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:28:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
28 | cout<<"NO"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s922417422 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map<char,int> ch;
string w;
cin>>w;
int i=0;
for(int i=0;i<w.size();i++)
ch[w[i]]++;
}
bool can=true;
map<char,int>::iterator it;
for(it=ch.begin();it!=ch.end();++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc:15:3: error: expected unqualified-id before 'for'
15 | for(it=ch.begin();it!=ch.end();++it)
| ^~~
a.cc:15:21: error: 'it' does not name a type; did you mean 'int'?
15 | for(it=ch.begin();it!=ch.end();++it)
| ^~
| int
a.cc:15:34: error: expected unqualified-id before '++' token
15 | for(it=ch.begin();it!=ch.end();++it)
| ^~
a.cc:17:3: error: expected unqualified-id before 'if'
17 | if(can)cout<<"Yes"<<endl;
| ^~
a.cc:18:3: error: expected unqualified-id before 'else'
18 | else cout<<"No"<<endl;
| ^~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s158256706 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map<char,int> ch;
string w;
cin>>w;
int i=0;
for(int i=0;i<w.size();i++)
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc:14:3: error: expected unqualified-id before 'for'
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~~
a.cc:14:45: error: 'it' does not name a type; did you mean 'int'?
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~
| int
a.cc:14:58: error: expected unqualified-id before '++' token
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~
a.cc:16:3: error: expected unqualified-id before 'if'
16 | if(can)cout<<"Yes"<<endl;
| ^~
a.cc:17:3: error: expected unqualified-id before 'else'
17 | else cout<<"No"<<endl;
| ^~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s325539668 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map<char,int> ch;
string w;
cin>>w;
int i=0;
for(int i=0;i<strlen(w);i++)
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:10:17: error: 'strlen' was not declared in this scope
10 | for(int i=0;i<strlen(w);i++)
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<map>
+++ |+#include <cstring>
4 | using namespace std;
a.cc: At global scope:
a.cc:14:3: error: expected unqualified-id before 'for'
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~~
a.cc:14:45: error: 'it' does not name a type; did you mean 'int'?
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~
| int
a.cc:14:58: error: expected unqualified-id before '++' token
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~
a.cc:16:3: error: expected unqualified-id before 'if'
16 | if(can)cout<<"Yes"<<endl;
| ^~
a.cc:17:3: error: expected unqualified-id before 'else'
17 | else cout<<"No"<<endl;
| ^~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s633421536 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map<char,int> ch;
string w;
cin>>w;
int i=0;
for(int i=0;i<w.strlen();i++)
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:10:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'strlen'
10 | for(int i=0;i<w.strlen();i++)
| ^~~~~~
a.cc: At global scope:
a.cc:14:3: error: expected unqualified-id before 'for'
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~~
a.cc:14:45: error: 'it' does not name a type; did you mean 'int'?
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~
| int
a.cc:14:58: error: expected unqualified-id before '++' token
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
| ^~
a.cc:16:3: error: expected unqualified-id before 'if'
16 | if(can)cout<<"Yes"<<endl;
| ^~
a.cc:17:3: error: expected unqualified-id before 'else'
17 | else cout<<"No"<<endl;
| ^~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s580931309 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map<char,int> ch;
string w;
cin>>w;
int i=0;
while(true){
if(w[i].empty())break;
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:11:13: error: request for member 'empty' in 'w.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
11 | if(w[i].empty())break;
| ^~~~~
|
s185614322 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map<char,int> ch;
string w;
cin>>w;
int i=0;
while(true){
if(w[i]==null)break;
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end();++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:11:14: error: 'null' was not declared in this scope
11 | if(w[i]==null)break;
| ^~~~
|
s576646909 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map<char,int> ch;
string w;
cin>>w;
int i=0;
while(true){
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:14:57: error: could not convert '(((void)std::operator!=(it, ch.std::map<char, int>::end())), it.std::_Rb_tree_iterator<std::pair<const char, int> >::operator++())' from 'std::_Rb_tree_iterator<std::pair<const char, int> >::_Self' to 'bool'
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ~~~~~~~~~~~~^~~~~
| |
| std::_Rb_tree_iterator<std::pair<const char, int> >::_Self
a.cc:14:62: error: expected ';' before ')' token
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ^
| ;
|
s422776455 | p04012 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
map ch<char,int>;
string w;
cin>>w;
int i=0;
while(true){
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before '<' token
6 | map ch<char,int>;
| ^
a.cc:11:5: error: 'ch' was not declared in this scope
11 | ch[w[i]]++;
| ^~
a.cc:14:34: error: 'ch' was not declared in this scope
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ^~
a.cc:14:62: error: expected ';' before ')' token
14 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ^
| ;
|
s221775222 | p04012 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
map ch<char,int>;
string w;
cin>>w;
int i=0;
while(true){
ch[w[i]]++;
}
bool can=true;
for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
if(it->second%2!=0)can=false;
if(can)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'map' was not declared in this scope
5 | map ch<char,int>;
| ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
1 | #include<iostream>
+++ |+#include <map>
2 | #include<string>
a.cc:10:5: error: 'ch' was not declared in this scope
10 | ch[w[i]]++;
| ^~
a.cc:13:11: error: expected primary-expression before 'char'
13 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ^~~~
a.cc:13:45: error: 'it' was not declared in this scope; did you mean 'i'?
13 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ^~
| i
a.cc:13:49: error: 'ch' was not declared in this scope
13 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ^~
a.cc:13:62: error: expected ';' before ')' token
13 | for(map<char,int>::iterator it=ch.begin();it!=ch.end(),++it)
| ^
| ;
|
s902896474 | p04012 | C++ | #include<iostream>
#include<map>
#include<string>
using namespace std;
int main(){
map<char,int> mp;
string s;
cin>>s;
for(int i=0;i<s.size;i++){
mp[s[i]]++;
}
int total=0;
for(auto itr = mp.begin(); itr != mp.end(); ++itr) {
total+=itr->second;
}
if(total%2==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
9 | for(int i=0;i<s.size;i++){
| ~~^~~~
| ()
|
s305453610 | p04012 | C++ | #include<iostream>
#include<map>
#include<string>
using namespace std;
int main(){
map<char,int> mp;
string s;
cin>>s;
for(int i=0;i<s.size;i++){
mp[char(s.substr(i,1))]++;
}
int total=0;
for(auto itr = mp.begin(); itr != mp.end(); ++itr) {
total+=itr->second;
}
if(total%2==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
9 | for(int i=0;i<s.size;i++){
| ~~^~~~
| ()
a.cc:10:8: error: invalid cast from type 'std::__cxx11::basic_string<char>' to type 'char'
10 | mp[char(s.substr(i,1))]++;
| ^~~~~~~~~~~~~~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.