submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s157821446
|
p04012
|
C
|
#include<stdio.h>
int main(void){
char a[100],alf[2][30]={{abcdefghijklmnopqrstuvwxyz},{0}};
int cnt=0;
scanf("%s",&a);
for(int i=0;a[i]!='\0';i++){
for(int j=0;alf[1][j]!='\0';j++){
if(a[i]==alf[1][j]){
alf[2][j]++;
}
}
}
i=0;
while(alf[2][i]!='\0'){
if((alf[2][i]%2)==1){
printf("No");
return 1;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:3:28: error: 'abcdefghijklmnopqrstuvwxyz' undeclared (first use in this function)
3 | char a[100],alf[2][30]={{abcdefghijklmnopqrstuvwxyz},{0}};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:3:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:3: error: 'i' undeclared (first use in this function)
14 | i=0;
| ^
|
s728645289
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;
int main(){
string s;
ll b = 0;
vector<ll> a(26, 0);
char f;
f = 'a';
rep(i, 26){
rep(j, s.size()){
if(s[j] == f;)
a[i]++;
}
if(i < 25)
f++;
}
rep(i, 26){
if(a[i] % 2 == 1)
b = 1;
}
if(b)
out("No");
else
out("Yes");
memi;
}
|
a.cc: In function 'int main()':
a.cc:25:20: error: expected primary-expression before ')' token
25 | if(s[j] == f;)
| ^
|
s380911917
|
p04012
|
C++
|
//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
const int INF= 1e9+5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>>vvi;
int main(){
string s=qwertyuiopasdfghjklzxcvbnm;
string w;
cin>>w;
for(int i=0;i<26;i++){
int count=0;
for(int j=0;j<w.size();j++){
if(w[j]==s[i])count++;
}
if(count%2!=0){
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
}
|
a.cc: In function 'int main()':
a.cc:11:12: error: 'qwertyuiopasdfghjklzxcvbnm' was not declared in this scope
11 | string s=qwertyuiopasdfghjklzxcvbnm;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
s002501293
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
main(){
string s;cin<<s;
map<char,int> m;
for(auto e:s)m[e]++;
bool f=0;
for(auto e:m)f|=e.second;
cout>>(f&1 ? "No":"Yes");}
|
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
4 | string s;cin<<s;
| ~~~^~~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::istream {aka std::basic_istream<char>}
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:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:4:10: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
4 | string s;cin<<s;
| ^~~
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:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
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/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
4 | string s;cin<<s;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:4:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
4 | string s;cin<<s;
| ^
/usr/incl
|
s902748693
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int sum;
for(char c = 'a'; c < 'z'; c++){
int count = 0;
for(int i = 0; i < s.size(); s++){
if(s.at(i) == c){
count++;
}
}
if(count%2 = 1){
sum++;
}
}
if(sum == 0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:10:37: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
10 | for(int i = 0; i < s.size(); s++){
| ~^~
a.cc:15:15: error: lvalue required as left operand of assignment
15 | if(count%2 = 1){
| ~~~~~^~
|
s568301069
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int count;
int s = 0;
for(int i=0;i<s.size();i++){
count = 0;
for(int j=i+1;j<s.size();j++){
if(s.at(i)==s.at(j)){
count++;
}
}
if(count%2 ==1){
s = 1;
}
}
if(s==1){
cout << "No" << endl;
}
else{
cout << "Yes" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:8:9: error: conflicting declaration 'int s'
8 | int s = 0;
| ^
a.cc:5:16: note: previous declaration as 'std::string s'
5 | string s;
| ^
a.cc:20:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
20 | if(s==1){
| ~^~~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/regex.h:1199: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>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/regex.h:1274: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>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
20 | if(s==1){
| ^
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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
20 | if(s==1){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
20 | if(s==1){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
20 | if(s==1){
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
20 | if(s==1){
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
20 | if(s==1){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629: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> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:20:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
20 | if(s==1){
| ^
/usr/include/c++/14/str
|
s919881280
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int s = w.length;
string kai = "Yes";
if(s % 2 > 0)
{
kai = "No";
}
else
{
sort(w.begin(),w.end());
for(int i = 0;i < s;i += 2)
{
if(w.at(i) != w.at(i+1))
{
kai = "No";
}
}
}
cout << kai << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:19: error: cannot convert 'std::__cxx11::basic_string<char>::length' 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'
7 | int s = w.length;
| ^~~~~~
|
s446915620
|
p04012
|
C++
|
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#incldue <map>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i=0;i < (int)(n);i++)
int main(){
string s;
cin >> s;
map<char,int> m;
int sum=0;
for (int i =0;i < s.size();i++){
if (m.count(s[i])){
m[s[i]]++;
}
else{
m[s[i]]=1;
}
}
for (auto r: m){
auto val=r.first;
sum+=(int)val;
}
if (sum%2) cout << "No" << endl;
else cout << "Yes" << endl;
return 0;
}
|
a.cc:5:2: error: invalid preprocessing directive #incldue; did you mean #include?
5 | #incldue <map>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:13:3: error: 'map' was not declared in this scope
13 | map<char,int> m;
| ^~~
a.cc:5:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
4 | #include <algorithm>
+++ |+#include <map>
5 | #incldue <map>
a.cc:13:7: error: expected primary-expression before 'char'
13 | map<char,int> m;
| ^~~~
a.cc:16:11: error: 'm' was not declared in this scope
16 | if (m.count(s[i])){
| ^
a.cc:23:16: error: 'm' was not declared in this scope
23 | for (auto r: m){
| ^
|
s855115432
|
p04012
|
C++
|
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i=0;i < (int)(n);i++)
int main(){
string s;
cin >> s;
map<char,int> m;
int sum=0;
for (int i =0;i < s.size();i++){
if (m.count(s[i])){
m[s[i]]++;
}
else{
m[s[i]]=1;
}
}
for (auto r: m){
auto val=r.first;
sum+=(int)val;
}
if (sum%2) cout << "No" << endl;
else cout << "Yes" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:3: error: 'map' was not declared in this scope
12 | map<char,int> m;
| ^~~
a.cc:5:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
4 | #include <algorithm>
+++ |+#include <map>
5 | using namespace std;
a.cc:12:7: error: expected primary-expression before 'char'
12 | map<char,int> m;
| ^~~~
a.cc:15:11: error: 'm' was not declared in this scope
15 | if (m.count(s[i])){
| ^
a.cc:22:16: error: 'm' was not declared in this scope
22 | for (auto r: m){
| ^
|
s346220461
|
p04012
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sin = new Scanner(System.in);
String w = sin.nextLine();
if(w.length%2 == 0){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
Main.java:7: error: cannot find symbol
if(w.length%2 == 0){
^
symbol: variable length
location: variable w of type String
1 error
|
s680393257
|
p04012
|
C++
|
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main(void)
{
string w; cin >> w;
map<char, int> counter;
rep(i, 0, w.length())counter[w[i]]++;
bool flag = true;
map<char, int>::iterator it;
for (it = counter.begin(); it != counter.end(); it++) {
if (it->second % 2 != 0) {
flag = false;
break;
}
}
cout << (flag ? "Yes" : "No") << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
9 | rep(i, 0, w.length())counter[w[i]]++;
| ^
a.cc:9:9: error: 'rep' was not declared in this scope
9 | rep(i, 0, w.length())counter[w[i]]++;
| ^~~
|
s107274213
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int c, d[100];
for(int i = 0; i < 100; i++)
d[i] = 0;
string s;
bool b;
b = true;
cin >> s;
for(int i = 0, i < s.size(); i++){
if(s[i] == '.') continue;
for(int j = i; j < s.size(); j++){
if(s[i] == s[j]){
d[i]++;
s[j] = '.';
}
}
if(d[i] % 2 == 1;)
b = false;
}
if(b)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before '<' token
12 | for(int i = 0, i < s.size(); i++){
| ^~
| ;
a.cc:12:20: error: expected primary-expression before '<' token
12 | for(int i = 0, i < s.size(); i++){
| ^
a.cc:20:22: error: expected primary-expression before ')' token
20 | if(d[i] % 2 == 1;)
| ^
|
s384884585
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
string w;
cin>>w;
map<char,int> m;
for(int i=0;i<w.size();i++){
char x=w.at(i);
if(!m.count(x)){
m.at(x)=1;
}else{
m.at(x)++;
}
}
bool flag=true;
for(int i:m){
if(i%2==1){
flag=false;
break;
}
}
if(falg){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:20:13: error: cannot convert 'std::pair<const char, int>' to 'int' in initialization
20 | for(int i:m){
| ^
a.cc:26:6: error: 'falg' was not declared in this scope; did you mean 'flag'?
26 | if(falg){
| ^~~~
| flag
|
s476285104
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
string w;
cin>>w;
map<char,int> m;
for(int i=0;i<w.size();i++){
char x=w.at(i);
if(!m.count(x)){
m.at(x)=1;
}else{
m.at(x)++;
}
}
flag=true;
for(int i:m){
if(i%2==1){
flag=false;
break;
}
}
if(falg){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:19:3: error: 'flag' was not declared in this scope
19 | flag=true;
| ^~~~
a.cc:20:13: error: cannot convert 'std::pair<const char, int>' to 'int' in initialization
20 | for(int i:m){
| ^
a.cc:26:6: error: 'falg' was not declared in this scope
26 | if(falg){
| ^~~~
|
s859264866
|
p04012
|
C
|
i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
|
main.c:1:1: warning: data definition has no type or storage class
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:1:18: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^~~~~~~
main.c:1:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
+++ |+#include <stdio.h>
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
main.c:1:27: error: expected ';' before ')' token
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^
| ;
main.c:1:28: error: expected expression before '>' token
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^
main.c:1:36: error: expected ';' before ')' token
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^
| ;
main.c:1:36: error: expected statement before ')' token
main.c:1:38: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^~~~
main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'puts'
|
s116239343
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
stirng w; cin >> w;
bool f[256] = {};
for (char c : w) {
f[c] ^= 1;
}
bool ans = 0;
for (int i = 0; i < 256; i++) ans ^= f[i];
cout << (ans ? "No" : "Yes") << endl;
}
|
a.cc: In function 'int main()':
a.cc:4:3: error: 'stirng' was not declared in this scope
4 | stirng w; cin >> w;
| ^~~~~~
a.cc:4:20: error: 'w' was not declared in this scope
4 | stirng w; cin >> w;
| ^
|
s597015187
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
vector<char> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even = true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
break;
}
if(even)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before 'break'
14 | if(!((even))
| ^
| ;
15 | break;
| ~~~~~
a.cc:16:3: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:15:14: error: expected ')' before '}' token
15 | break;
| ^
| )
16 | }
| ~
a.cc:14:7: note: to match this '('
14 | if(!((even))
| ^
a.cc:16:3: error: expected primary-expression before '}' token
16 | }
| ^
|
s223997531
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
vector<char> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
break;
}
if(even)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:10:13: error: expected initializer before '==' token
10 | bool even == true;
| ^~
a.cc:13:7: error: 'even' was not declared in this scope
13 | even = false;
| ^~~~
a.cc:14:11: error: 'even' was not declared in this scope
14 | if(!((even))
| ^~~~
a.cc:16:3: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:15:14: error: expected ')' before '}' token
15 | break;
| ^
| )
16 | }
| ~
a.cc:14:7: note: to match this '('
14 | if(!((even))
| ^
a.cc:16:3: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:17:11: error: 'even' was not declared in this scope
17 | if(even)
| ^~~~
|
s791729497
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
vector<string> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
break;
}
if(even)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:32: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(std::__cxx11::basic_string<char>::size_type, char)'
6 | vector<string> t(s.size(),'a');
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
a.cc:6:32: note: deduced conflicting types for parameter '_InputIterator' ('long unsigned int' and 'char')
6 | vector<string> t(s.size(),'a');
| ^
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'std::initializer_list<std::__cxx11::basic_string<char> >'
678 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::__cxx11::basic_string<char> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'std::vector<std::__cxx11::basic_string<char> >&&'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >; std::true_type = std::true_type]'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::__cxx11::basic_string<char> >]'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'const std::vector<std::__cxx11::basic_string<char> >&'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int; value_type = std::__cxx11::basic_string<char>; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:47: note: no known conversion for argument 2 from 'char' to 'const std::vector<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
569 | vector(size_type __n, const value_type& __value,
| ~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:51: note: no known conversion for argument 2 from 'char' to 'const std::vector<std::__cxx11::basic_string<char> >::allocator_type&' {aka 'const std::allocator<std::__cxx11::basic_string<char> >&'}
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 2 provided
a.cc:8:10: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
8 | t[i] == s[i];
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | t[i] == s[i];
| ^
/usr/include/c++/14/bits/regex.h:1199: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>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
8 | t[i] == s[i];
| ^
/usr/include/c++/14/bits/regex.h:1274: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>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: '__gnu_cxx::__alloc_traits<std::allocato
|
s971054923
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin > s;
vector<string> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
break;
}
if(even)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:5:7: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
5 | cin > s;
| ~~~ ^ ~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::istream {aka std::basic_istream<char>}
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:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/regex.h:1236: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>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/regex.h:1329: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>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > s;
| ^
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:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
5 | cin > s;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin > s;
| ^
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:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin > s;
| ^
/usr/include/c++/14/string_view:702: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> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin > s;
| ^
/usr/include/c++/14/string_view:710: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>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/basic_string.h:3915: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>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin > s;
| ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(c
|
s339070173
|
p04012
|
C++
|
#includ<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin > s;
vector<string> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
break;
}
if(even)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
|
a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ<bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:4:1: error: 'string' was not declared in this scope
4 | string s;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 | #includ<bits/stdc++.h>
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin > s;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #includ<bits/stdc++.h>
a.cc:5:9: error: 's' was not declared in this scope
5 | cin > s;
| ^
a.cc:6:3: error: 'vector' was not declared in this scope
6 | vector<string> t(s.size(),'a');
| ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
+++ |+#include <vector>
1 | #includ<bits/stdc++.h>
a.cc:6:18: error: 't' was not declared in this scope
6 | vector<string> t(s.size(),'a');
| ^
a.cc:9:2: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(t.begin(),t.end());
| ^~~~
| short
a.cc:10:13: error: expected initializer before '==' token
10 | bool even == true;
| ^~
a.cc:13:7: error: 'even' was not declared in this scope
13 | even = false;
| ^~~~
a.cc:14:11: error: 'even' was not declared in this scope
14 | if(!((even))
| ^~~~
a.cc:16:3: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:15:14: error: expected ')' before '}' token
15 | break;
| ^
| )
16 | }
| ~
a.cc:14:7: note: to match this '('
14 | if(!((even))
| ^
a.cc:16:3: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:17:11: error: 'even' was not declared in this scope
17 | if(even)
| ^~~~
a.cc:18:8: error: 'cout' was not declared in this scope
18 | cout << "Yes" << endl;
| ^~~~
a.cc:18:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:25: error: 'endl' was not declared in this scope
18 | cout << "Yes" << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #includ<bits/stdc++.h>
a.cc:20:8: error: 'cout' was not declared in this scope
20 | cout << "No" << endl;
| ^~~~
a.cc:20:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:24: error: 'endl' was not declared in this scope
20 | cout << "No" << endl;
| ^~~~
a.cc:20:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s684057225
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
vector<int> v(26,0);
int main(){
string s;
cin>>s;
for(auto a:s){
v[a-'a']++;
}
for(auto a:v){
if(a&1){
cout<"No";
}
}
cout<<"Yes";
}
|
a.cc: In function 'int main()':
a.cc:14:11: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
14 | cout<"No";
| ~~~~^~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<char>}
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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | cout<"No";
| ^~~~
/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:14:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [3]'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | cout<"No";
| ^~~~
/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:14:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [3]'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | cout<"No";
| ^~~~
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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
14 | cout<"No";
| ^~~~
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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
14 | cout<"No";
| ^~~~
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:14:12: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | cout<"No";
| ^~~~
/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:14:12: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*'
14 | cout<"No";
| ^~~~
/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:14:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
14 | cout<"No";
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::bas
|
s194353113
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v() sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
#ifndef ONLINE_JUDGE
// for getting input from input.txt
freopen("input.txt", "r", stdin);
// for writing output to output.txt
freopen("output.txt", "w", stdout);
#endif
fast();
//ll t;cin>>t;while(t--)
{
ll n,f=0;
string s;
cin>>s;
n=s.length();
map<char,int>m;
for(int i=0;i<n;i++)
{
m[s[i]]++
}
for(auto it=m.begin();it!=m.end();it++)
{
if(it->second&1)
{ f=1;
break;
}
}
if(f)
{
No
}
else
{
Yes
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:49:14: error: expected ';' before '}' token
49 | m[s[i]]++
| ^
| ;
50 | }
| ~
|
s876202348
|
p04012
|
C++
|
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main(){
string w;
cin>>w;
map<char,int>mp;
for(const auto c : w){
++mp[c];
}
for(const auto e : mp){
if(e%2==1){
puts("No");
return 0;
}
}
puts("Yes");
}
|
a.cc: In function 'int main()':
a.cc:13:9: error: no match for 'operator%' (operand types are 'const std::pair<const char, int>' and 'int')
13 | if(e%2==1){
| ~^~
| | |
| | int
| const std::pair<const char, int>
|
s396650764
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
map<char, int> m;
string s;
cin >> s;
for(int i = 0; i < s.size(); ++i){
if(m.count(s[i])) ++s[i];
else m[s[i]] = 1;
}
bool b = 1;
for(char c: m){
if(m[c] % 2 == 1){
b = 0;
break;
}
}
if(b) cout << "Yes" << endl;
else cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:13:15: error: cannot convert 'std::pair<const char, int>' to 'char' in initialization
13 | for(char c: m){
| ^
|
s527711595
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
void solve(){
string w;
cin>>w;
if(int(w.size())%2==0){
cout<<"No"<<endl;
return;
}
sort(w.begin(), w.end());
for(int i=0; i<w.size(); i+=2){
if(w[i]!=[i+1]){
cout<<"No"<<endl;
return;
}
}
cout<<"Yes"<<endl;
}
signed main(){
//while(1)
solve();
}
|
a.cc: In function 'void solve()':
a.cc:15:28: error: expected ',' before '+' token
15 | if(w[i]!=[i+1]){
| ^
| ,
a.cc:15:28: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:15:31: error: expected '{' before ')' token
15 | if(w[i]!=[i+1]){
| ^
a.cc: In function 'void solve()':
a.cc:15:24: error: no match for 'operator!=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'solve()::<lambda()>')
15 | if(w[i]!=[i+1]){
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:1132:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1132 | operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1132:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/regex.h:1212: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>&)'
1212 | operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1212:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/regex.h:1305: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>&)'
1305 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1305:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/regex.h:1379:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1379 | operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1379:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: 'solve()::<lambda()>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/regex.h:1473:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1473 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1473:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/regex.h:1547:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1547 | operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1547:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: 'solve()::<lambda()>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/regex.h:1647:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1647 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1647:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/regex.h:2213:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2213 | operator!=(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2213:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
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:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
455 | operator!=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
500 | operator!=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1686 | operator!=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1753 | operator!=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)'
197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed:
a.cc:15:31: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
15 | if(w[i]!=[i+1]){
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:243:5: note: candidate: 'template<class _T1, class _T2> bool st
|
s085926985
|
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(){
string w;
cin >> w;
int n = w.size();
vector<int> memo(26, 0);
for(int i=0; i<n; i++){
// int t = static_cast<int>(w[i])-97;
// cout << t << endl;
memo[t] += 1;
}
int m = memo.size();
int flag = 1;
for(int k=0; k<m; k++){
cout << memo[k] << endl;
if(memo[k]%2 != 0){
flag = 0;
}
}
if(flag == 1){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:20:14: error: 't' was not declared in this scope
20 | memo[t] += 1;
| ^
|
s695824509
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string.h>
using namespace std;
int main(){
string s;
cin >> s;
bool even = true;
for (char c='a'; c<='z'; c++){
int cnt = 0;
for (int i=0; i<len(s); i++){
if (s[i]==c){
cnt++;
}
}
if (cnt%2==1) even = false;
}
cout << ( even?"Yes":"NO") << endl;
}
|
a.cc: In function 'int main()':
a.cc:14:21: error: 'len' was not declared in this scope
14 | for (int i=0; i<len(s); i++){
| ^~~
|
s404132053
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool even = true;
for (char c='a'; c<='z'; c++){
int cnt = 0;
for (int i=0; i<len(s); i++){
if (s[i]==c){
cnt++;
}
}
if (cnt%2==1) even = false;
}
cout << ( even?"Yes":"NO") << endl;
}
|
a.cc: In function 'int main()':
a.cc:13:21: error: 'len' was not declared in this scope
13 | for (int i=0; i<len(s); i++){
| ^~~
|
s341955825
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool even = true;
for (char c='a'; c<='z'; c++){
int cnt = 0;
for (int i=0; i<lec(s); i++){
if (s[i]==c){
cnt++;
}
}
if (cnt%2==1) even = false;
}
cout << ( even?"Yes":"NO") << endl;
}
|
a.cc: In function 'int main()':
a.cc:13:21: error: 'lec' was not declared in this scope
13 | for (int i=0; i<lec(s); i++){
| ^~~
|
s077272415
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string w;
cin >> w;
int cnta=0;
int cntb=0;
int cntc=0;
int cntd=0;
int cnte=0;
int cntf=0;
int cntg=0;
int cnth=0;
int cnti=0;
int cntj=0;
int cntk=0;
int cntn=0;
int cntm=0;
int cntl=0;
int cnto=0;
int cntp=0;
int cntq=0;
int cntr=0;
int cnts=0;
int cntt=0;
int cntu=0;
int cntv=0;
int cntw=0;
int cntx=0;
int cnty=0;
int cntz=0;
for (int i=0; i<w.size(); i++){
if (w.at(i)== 'a'){
cnta++;
}
if (w.at(i)== 'b'){
cntb++;
}
if (w.at(i)== 'c'){
cntc++;
}
if (w.at(i)== 'e'){
cnte++;
}
if (w.at(i)== 'f'){
cntf++;
}
if (w.at(i)== 'g'){
cntg++;
}
if (w.at(i)== 'h'){
cnth++;
}
if (w.at(i)== 'i'){
cnti++;
}
if (w.at(i)== 'j'){
cntj++;
}
if (w.at(i)== 'k'){
cntk++;
}
if (w.at(i)== 'n'){
cntn++;
}
if (w.at(i)== 'm'){
cntm++;
}
if (w.at(i)== 'l'){
cntl++;
}
if (w.at(i)== 'o'){
cnto++;
}
if (w.at(i)== 'p'){
cntp++;
}
if (w.at(i)== 'q'){
cntq++;
}
if (w.at(i)== 'r'){
cntr++;
}
if (w.at(i)== 's'){
cnts++;
}
if (w.at(i)== 't'){
cntt++;
}
if (w.at(i)== 'u'){
cntu++;
}
if (w.at(i)== 'v'){
cntv++;
}
if (w.at(i)== 'w'){
cntw++;
}
if (w.at(i)== 'x'){
cntx++;
}
if (w.at(i)== 'y'){
cnty++;
}
if (w.at(i)== 'z'){
cntz++;
}
}
if (cnta%2==0 && cntb%2==0 && cntc%2==0 && cntd%2==0 && cnte%2==0){
if (cntf%2==0 && cntg%2==0 && cnth%2==0 && cnti%2==0 && cntj%2==0){
if (cntk%2==0 && cntn%2==0 && cntm%2==0 && cntl%2==0 && cnto%2==0){
if (cntp%2==0 && cntq%2==0 && cntr%2==0 && cnts%2==0 && cntt%2==0){
if (cntu%2==0 && cntv%2==0 && cntw%2==0 && cntx%2==0 && cnty%2==0){
if (cntz%2==0){
cout << "YES" << endl;
}
}
}
}
}
}
else {
cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:131:4: error: expected '}' at end of input
131 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s442536304
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
int m[26] = {0};
for(int i = 0; i < s.size(); i++)
{
m[a[i]-'a']++;
}
bool flag = true;
for(int i = 0; i < 26; i++)
{
if(m[i] % 2 != 0)
{
flag = false;
break;
}
}
if(flag == true)
cout<<"Yes\n";
else
cout<<"No\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:28: error: 's' was not declared in this scope
9 | for(int i = 0; i < s.size(); i++)
| ^
|
s913172435
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
int m[26] = {0};
for(int i = 0; i < s.size(); i++)
{
m[a[i]-'a']++;
}
bool flag = true;
for(int i = 0; i < 26; i++)
{
if(m[i] % 2 != 0)
{
flag = false;
break;
}
}
((flag == true) ? cout<<"Yes\n" : cout<<"No\n");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:28: error: 's' was not declared in this scope
9 | for(int i = 0; i < s.size(); i++)
| ^
|
s718183199
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) x.begin(),x.end()
const int INF = 100100100;
typedef long long ll;
int main() {
string w;
cin >> w;
sort(all(w));
string ans="Yes";
for(int i=0;i<w.size()-1;i+=2){
string s=w.substr(i,2);
if(s[0]!=s[1])
ans="NO";
}
cout << ans << endl;
|
a.cc: In function 'int main()':
a.cc:18:24: error: expected '}' at end of input
18 | cout << ans << endl;
| ^
a.cc:8:12: note: to match this '{'
8 | int main() {
| ^
|
s543116325
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string w;
cin >> w;
vector<int>counter(w.size());
for(int i = 0; i < w.size(); i ++){
for(int j = 0; j <= i; j ++){
if(w.at(i) == w.at(j)){
counter.at(j) ++;
break;
}
}
}
bool hantei = false;
for(int i = 0; i < w.size; i ++){
if(counter.at(i) % 2 == 1){
hantei = true;
break;
}
}
if(hantei){
cout << "No" << endl;
}else{
cout << "Yes" << endl;
}
|
a.cc: In function 'int main()':
a.cc:20:24: 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 '()' ?)
20 | for(int i = 0; i < w.size; i ++){
| ~~^~~~
| ()
a.cc:31:4: error: expected '}' at end of input
31 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s750077085
|
p04012
|
C
|
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SORT(i) sort((i).begin(),(i).end())
constexpr int INF = 2000000000;
constexpr int mod = 1000000007;
template<class T>inline bool chmin(T & a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template<class T>inline bool chmax(T& a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int main() {
string s; cin >> s;
unordered_map<char, int>ump;
rep(i, s.size()) {
ump[s[i]]++;
}
bool a = true;
for (auto p : ump) {
int b = p.second;
if (b % 2)a = false;
}
cout << (a ? "Yes" : "No") << "\n";
return 0;
}
|
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s828335476
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
vector<int> n(100);
for(int i=0; i<s.size(); i++){n.at((int)(s.at(i)))++;}
for(int i-0; i<100; i++){
if(n.at(i)%2==1){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before '-' token
8 | for(int i-0; i<100; i++){
| ^
| ;
a.cc:8:21: error: expected ')' before ';' token
8 | for(int i-0; i<100; i++){
| ~ ^
| )
a.cc:8:23: error: 'i' was not declared in this scope
8 | for(int i-0; i<100; i++){
| ^
|
s788740906
|
p04012
|
C
|
#include<stdio.h>
#include<cstring>
int main(){
int sign[50]={0};
int flag=0;
char a[101];
scanf("%s", a);
for(int i=0;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=0;j<=24;j++){
if(sign[j]%2!=0){
flag++;
break;
}
}
if(flag==0)
printf("Yes");
else
printf("No");
return 0;
}
|
main.c:2:9: fatal error: cstring: No such file or directory
2 | #include<cstring>
| ^~~~~~~~~
compilation terminated.
|
s525501965
|
p04012
|
C
|
#include<stdio.h>
#include<cstring>
int main(){
int sign[50]={0};
int flag=0;
char a[111];
scanf("%s", a);
for(int i=1;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=1;j<=strlen(a);j++){
if(sign[j]%2!=0){
flag=1;
break;
}
}
if(flag==0)
printf("Yes");
else
printf("No");
return 0;
}
|
main.c:2:9: fatal error: cstring: No such file or directory
2 | #include<cstring>
| ^~~~~~~~~
compilation terminated.
|
s252442289
|
p04012
|
C++
|
#include<stdio.h>
#include<cstring>
#include<cmath>
int main(){
int sign[30]={0},flag;
char a[101];
gets(a);
for(int i=1;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=1;j<=strlen(a);j++){
if(sign[j]%2!=0){
flag=1;
}
}
if(flag!=1)
printf("Yes");
else
printf("No");
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(a);
| ^~~~
| getw
|
s392076186
|
p04012
|
C++
|
#include<stdio.h>
#include<cstring>
int main(){
int sign[30]={0},flag;
char a[101];
gets(a);
for(int i=1;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=1;j<=strlen(a);j++){
if(sign[j]%2!=0){
flag=1;
}
}
if(flag!=1)
printf("Yes");
else
printf("No");
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
|
s657405773
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pp() pop_back()
#define V vector
#define P pair
#define V2(a,b,c) V<V<int>> a(b,V<int>(c))
#define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d))
#define incin(a) int a; cin>>a
#define yuko(a) setprecision(a)
#define uni(a) a.erase(unique(a.begin(),a.end()),a.end())
#define pri priority_queue
#define Pri priority_queue<int,vector<int>,greater<int>>
#define ff fi.fi
#define fs fi.se
#define sf se.fi
#define ss se.se
#define all(a) (a).begin(),(a).end()
#define Pi P<int,int>
#define elif else if
//#define min min<int>
//#define max max<int>
int low(V<int> a,int b){
decltype(a)::iterator c=lower_bound(a.begin(),a.end(),b);
int d=c-a.bgn;
return d;
}
int upp(V<int> a,int b){
decltype(a)::iterator c=upper_bound(a.begin(),a.end(),b);
int d=c-a.bgn;
return d;
}
template<class T>
void cou(vector<vector<T>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}
/*template<>
void cou(vector<vector<char>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}*/
int wari(int a,int b) {
if(a%b==0)
return a/b;
else
return a/b+1;
}
int keta(int a){
double b=a;
b=log10(b);
int c=b;
return c+1;
}
int souwa(int a){
return a*(a+1)/2;
}
/*int lcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return d*e/f;
} */
int gcm(int a,int b){
if(a%b==0)
return b;
return gcm(b,a%b);
}
bool prime(int a){
if(a<2)
return false;
else if(a==2)
return true;
else if(a%2==0)
return false;
double b=sqrt(a);
for(int i=3;i<=b;i+=2){
if(a%i==0){
return false;
}
}
return true;
}
struct Union{
vector<int> par;
Union(int a){
par= vector<int>(a,-1);
}
int find(int a){
if(par[a]<0)
return a;
else
return par[a]=find(par[a]);
}
bool same(int a,int b){
return find(a)==find(b);
}
int Size(int a){
return -par[find(a)];
}
void unite(int a,int b){
a=find(a);
b=find(b);
if(a==b)
return;
if(Size(b)>Size(a))
swap<int>(a,b);
par[a]+=par[b];
par[b]=a;
}
};
int ketas(int a){
string b=to_string(a);
int c=0;
fo(i,keta(a)){
c+=b[i]-'0';
}
return c;
}
/*int gcm(int a,int b){
if(b==0)
return a;
return gcm(b,a%b);
}*/
int lcm(int a,int b){
return a/gcm(a,b)*b;
}
/*struct aa{
vector<int> gt;
aa(int n){
gt= vector<int>(n, 1);
}
void c(V<int> d,int b){
if(d[b]==0){
gt[d[b]-1]++;
gt[gt.sz-1]++;
}
else{
gt[d[b]-1]++;
c(d,d[d[b]]-1);
}
}
void cok(int a){
cout<<gt[a-1]<<endl;
fo(i,a-1)
cout<<gt[i]<<endl;
}
};
*/
/*struct dfs(){
}*/
bool fe(int a,int b){
a%=10;
b%=10;
if(a==0)
a=10;
if(b==0)
b=10;
if(a>b)
return true;
else
return false;
}
int INF=1000000007;
struct edge{int s,t,d; };
V<int> mojisyu(string a){
V<int> b(26,0);
fo(i,a.sz){
b[a[i]-'a']++;
}
return b;
}
int wa2(int a){
if(a%2==1)
return a/2;
return a/2-1;
}
/*signed main(){
int a,b,c;
cin>>a>>b>>c;
V<V<edge>> d(a);
fo(i,b){
edge e;
cin>>e.s>>e.t>>e.d;
d[e.s].pb(e);
}
V<int> e(a,INF);
e[c]=0;
priority_queue<P<int,int>,V<P<int,int>>,greater<P<int,int>>> f;
f.push({0,c});
int h=INF;
while(!f.empty()){
P<int,int> g;
g=f.top();
f.pop();
int v = g.second, i = g.first;
for(edge l : d[v]){
if(e[l.t] > i + l.d){
e[l.t] = i + l.d;
f.push({i+l.d , l.t});
}
}
}
fo(i,a){
if(e[i]==INF)
cout<<"INF"<<endl;
else
cout<<e[i]<<endl;
}
}
?*/
signed main(){
string a;
cin>>a;
V<V<int>> b(a,V<int>(4,0));
b[0][0]=
string a;
cin>>a;
Sort(a);
int b=1;
for(int i=0;i<a.sz-1;i+=2){
if(a[i]!=a[i+1])
b=0;
}
if(b&&a.sz%2==0)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
|
a.cc: In function 'int main()':
a.cc:258:28: error: no matching function for call to 'std::vector<std::vector<long long int> >::vector(std::string&, std::vector<long long int>)'
258 | V<V<int>> b(a,V<int>(4,0));
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
a.cc:258:28: note: deduced conflicting types for parameter '_InputIterator' ('std::__cxx11::basic_string<char>' and 'std::vector<long long int>')
258 | V<V<int>> b(a,V<int>(4,0));
| ^
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; allocator_type = std::allocator<std::vector<long long int> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::initializer_list<std::vector<long long int> >'
678 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<long long int> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:23: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<std::vector<long long int> >&&'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; allocator_type = std::allocator<std::vector<long long int> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; allocator_type = std::allocator<std::vector<long long int> >; std::true_type = std::true_type]'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<long long int> >]'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:28: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::vector<std::vector<long long int> >&'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; size_type = long unsigned int; value_type = std::vector<long long int>; allocator_type = std::allocator<std::vector<long long int> >]'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:24: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'}
569 | vector(size_type __n, const value_type& __value,
| ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; size_type = long unsigned int; allocator_type = std::allocator<std::vector<long long int> >]'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:24: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'}
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; allocator_type = std::allocator<std::vector<long long int> >]'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 2 provided
a.cc:280:8: error: expected primary-expression before 'a'
280 | string a;
| ^
a.cc:283:5: error: conflicting declaration 'long long int b'
283 | int b=1;
| ^
a.cc:258:13: note: previous declaration as 'std::vector<std::vector<long long int> > b'
258 | V<V<int>> b(a,V<int>(4,0));
| ^
a.cc:286:7: error: no match for 'operator=' (operand types are 'std::vector<std::vector<long long int> >' and 'int')
286 | b=0;
| ^
In file included from /usr/include/c++/14/vector:72:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<long long int> >&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<long long int> >&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::vector<long long int> >'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:288:5: error: no match for 'operator&&' (operand types are 'std::vector<std::vector<long long int> >' and 'bool')
288 | if(b&&a.sz%2==0)
| ~^~~~~~~~~~~
| | |
| | bool
| std::vector<std::vector<long long in
|
s729720287
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());
for(i=0;i<s.size()-1;i+=2){
if(s[i]!=s[i+1]){
cout<<"No";
return 0;
}
}
cout<<"Yes";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
8 | for(i=0;i<s.size()-1;i+=2){
| ^
|
s425777562
|
p04012
|
C++
|
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
int hash[27] = { 0 };
for (int i = 0; i < s.length(); i++)
{
hash[s[i] - 'a']++;
}
bool valid = true;
for (int i = 0; i < 27; i++)
{
if (hash[i] % 2 != 0) valid = false
}
if (valid) cout << "Yes" << endl;
else cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:20:44: error: expected ';' before '}' token
20 | if (hash[i] % 2 != 0) valid = false
| ^
| ;
21 | }
| ~
|
s805578771
|
p04012
|
C++
|
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
int hash[27] = 0;
for (int i = 0; i < s.length(); i++)
{
hash[s[i] - 'a']++;
}
bool valid = true;
for (int i = 0; i < 27; i++)
{
if (hash[i] % 2 != 0) valid = false
}
if (valid) cout << "Yes" << endl;
else cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:11:18: error: array must be initialized with a brace-enclosed initializer
11 | int hash[27] = 0;
| ^
a.cc:20:44: error: expected ';' before '}' token
20 | if (hash[i] % 2 != 0) valid = false
| ^
| ;
21 | }
| ~
|
s525117090
|
p04012
|
C++
|
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
for (int i = 0; i < s.length(); i++)
{
hash[s[i] - 'a']++;
}
bool valid = true;
for (int i = 0; i < 27; i++)
{
if (hash[i] % 2 != 0) valid = false
}
if (valid) cout << "Yes" << endl;
else cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:13:15: error: expected ']' before '[' token
13 | hash[s[i] - 'a']++;
| ^
| ]
a.cc:13:25: error: expected initializer before '++' token
13 | hash[s[i] - 'a']++;
| ^~
a.cc:13:25: error: expected ';' before '++' token
a.cc:18:17: error: expected unqualified-id before '[' token
18 | if (hash[i] % 2 != 0) valid = false
| ^
a.cc:18:44: error: expected ';' before '}' token
18 | if (hash[i] % 2 != 0) valid = false
| ^
| ;
19 | }
| ~
|
s895139019
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define rep(i, n) for(int i = 0; i < (n); i++)
int int_len(int n) {
int s=0;
while(n!=0) s++, n/=10;
return s;
}
int int_sum(int n) {
int m=0,s=0,a=n;
while(a!=0) s++, a/=10;
for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
return m;
}
int gcd(int a,int b)
{
int r, tmp;
/* 自然数 a > b を確認・入替 */
if(a<b){
tmp = a;
a = b;
b = tmp;
}
/* ユークリッドの互除法 */
r = a % b;
while(r!=0){
a = b;
b = r;
r = a % b;
}
return b;
}
int fac(int n){
int m=1;
while(n>=1) m*=n,n--;
return m;
}
int vec_sum(vector<int> v){
int n=0;
for(int i=0;i<v.size();i++) n+=v[i];
return n;
}
///////////////////////////
int main() {
string s;
cin>>s;
bool flag=true;
map<char,int> mp;
rep(i,s.size()) mp[s[i]]++;
rep(auto a:mp){
if(a.second%2!=0){
flag=false;
break;
}
}
if(flag){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
///////////////////////////
|
a.cc:75:16: error: macro "rep" requires 2 arguments, but only 1 given
75 | rep(auto a:mp){
| ^
a.cc:4:9: note: macro "rep" defined here
4 | #define rep(i, n) for(int i = 0; i < (n); i++)
| ^~~
a.cc: In function 'int main()':
a.cc:75:3: error: 'rep' was not declared in this scope
75 | rep(auto a:mp){
| ^~~
|
s718603979
|
p04012
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main(){
string s;
cin >> s;
vector<int> a(100,0);
for(int i = 0; i < s.size(); i++){
a[s[i] - 'a']++;
}
bool is_ugly = false;
for(int i = 0; i < a.size(); i++){
if(a % 2 == 1){
is_ugly = true;
break;
}
}
if(is_ugly) cout << "Yes";
else cout << "No";
}
|
a.cc: In function 'int main()':
a.cc:16:10: error: no match for 'operator%' (operand types are 'std::vector<int>' and 'int')
16 | if(a % 2 == 1){
| ~ ^ ~
| | |
| | int
| std::vector<int>
|
s716121038
|
p04012
|
Java
|
import java.util.*;
class Main{
static int ugly = 0;
Scanner sc = new Scanner(System.in);
String nyuuryoku = sc.next();
String w = nyuuryoku;
static int wlen = w.length();
String wafter;
int wlenafter;
public static void judge(String okikaeruyatu){
wafter = w.replace(okikaeruyatu,"");
wlenafter = wafter.length();
if((wlen - wlenafter) % 2 == 1){
ugly += 1;
}
}
public static void main(String[] args){
judge("a");judge("b");judge("c");
judge("d");judge("e");judge("f");
judge("g");judge("h");judge("i");
judge("j");judge("k");judge("l");
judge("m");judge("n");judge("o");
judge("p");judge("q");judge("r");
judge("s");judge("t");judge("u");
judge("v");judge("w");judge("x");
judge("y");judge("z");
if(ugly == 0){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
Main.java:8: error: non-static variable w cannot be referenced from a static context
static int wlen = w.length();
^
Main.java:13: error: non-static variable wafter cannot be referenced from a static context
wafter = w.replace(okikaeruyatu,"");
^
Main.java:13: error: non-static variable w cannot be referenced from a static context
wafter = w.replace(okikaeruyatu,"");
^
Main.java:14: error: non-static variable wlenafter cannot be referenced from a static context
wlenafter = wafter.length();
^
Main.java:14: error: non-static variable wafter cannot be referenced from a static context
wlenafter = wafter.length();
^
Main.java:15: error: non-static variable wlenafter cannot be referenced from a static context
if((wlen - wlenafter) % 2 == 1){
^
6 errors
|
s785259500
|
p04012
|
Java
|
import java.util.*;
class Main{
public static void judge(String okikaeruyatu){
wafter = w.replace(okikaeruyatu,"");
wlenafter = wafter.length();
if((wlen - wlenafter) % 2 == 1){
ugly += 1;
}
}
public static void main(String[] args){
int ugly = 0;
Scanner sc = new Scanner(System.in);
String w = sc.next();
int wlen = w.length();
String wafter;
int wlenafter;
judge("a");judge("b");judge("c");
judge("d");judge("e");judge("f");
judge("g");judge("h");judge("i");
judge("j");judge("k");judge("l");
judge("m");judge("n");judge("o");
judge("p");judge("q");judge("r");
judge("s");judge("t");judge("u");
judge("v");judge("w");judge("x");
judge("y");judge("z");
if(ugly == 0){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
Main.java:5: error: cannot find symbol
wafter = w.replace(okikaeruyatu,"");
^
symbol: variable wafter
location: class Main
Main.java:5: error: cannot find symbol
wafter = w.replace(okikaeruyatu,"");
^
symbol: variable w
location: class Main
Main.java:6: error: cannot find symbol
wlenafter = wafter.length();
^
symbol: variable wlenafter
location: class Main
Main.java:6: error: cannot find symbol
wlenafter = wafter.length();
^
symbol: variable wafter
location: class Main
Main.java:7: error: cannot find symbol
if((wlen - wlenafter) % 2 == 1){
^
symbol: variable wlen
location: class Main
Main.java:7: error: cannot find symbol
if((wlen - wlenafter) % 2 == 1){
^
symbol: variable wlenafter
location: class Main
Main.java:8: error: cannot find symbol
ugly += 1;
^
symbol: variable ugly
location: class Main
7 errors
|
s177031939
|
p04012
|
Java
|
import java.util.*;
class Main{
public static void judge(String okikaeruyatu){
wafter = w.replace(okikaeruyatu,"");
wlenafter = wafter.length();
if((wlen - wlenafter) % 2 == 1){
ugly += 1;
}
}
public static void main(String[] args){
int ugly = 0;
Scanner sc = new Scanner(System.in);
String w = sc.next();
int wlen = w.length();
String wafter;
int wlenafter;
judge("a");
judge("b");
judge("c");
judge("d");
judge("e");
judge("f");
judge("g");
judge("h");
judge("i");
judge("j");
judge("k");
judge("l");
judge("m");
judge("n");
judge("o");
judge("p");
judge("q");
judge("r");
judge("s");
judge("t");
judge("u");
judge("v");
judge("w");
judge("x");
judge("y");
judge("z");
if(ugly == 0){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
|
Main.java:51: error: reached end of file while parsing
}
^
1 error
|
s755100424
|
p04012
|
C++
|
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main(){
string w;
cin >> w;
int s = 0;
sort(w.begin(), w.end());
if(w.size()==1){
cout << "No" << endl;
break;
}
for(int i = 1; i < w.size(); i++){
if(w[i-1]==w[i]){
s++;
}
else{
if(s % 2 == 0){
cout << "No" << endl;
break;
}
else{
s = 0;
}
}
if(i == w.size()-1){
cout << "Yes" << endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:13:8: error: break statement not within loop or switch
13 | break;
| ^~~~~
|
s184367349
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int num(char x)
{
return (x-'a');
}
int main()
{
int a[26];
for(int i=0;i<26;i++)
{
a[i]=0;
}
int s;
cin>>s;
for(int i=0;i<s.size();i++)
{
a[num(s[i])]++;
}
for(int i=0;i<26;i++)
{
if(a[i]%2!=0)
{
cout<<"NO";
return 0;
}
}
cout<<"YES";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:18:19: error: request for member 'size' in 's', which is of non-class type 'int'
18 | for(int i=0;i<s.size();i++)
| ^~~~
a.cc:20:12: error: invalid types 'int[int]' for array subscript
20 | a[num(s[i])]++;
| ^
|
s652885581
|
p04012
|
C++
|
#include <bits/stdc++.h>
typedef unsigned long long int ull;
typedef long double ldb;
typedef long long int ll;
#define for01(k,n) for (ll i=k; i<n; i++)
#define for02(k,n) for (ll j=k; j<n; j++)
#define for03(k,n) for (ll k=k; k<n; k++)
#define for11(k,n) for (ll i=k; i<=n; i++)
#define for12(k,n) for (ll j=k; j<=n; j++)
#define for13(k,n) for (ll k=k; k<=n; k++)
#define pb push_back
#define mp make_pair
#define vll vector<ll>
#define F first
#define S second
#define pp pair <ll, ll>
#define lb lower_bound
#define ub upper_bound
#define emp empty()
#define beg begin()
#define en end()
#define si size()
#define bk back()
#define deci(n) fixed<<setprecision(n)
#define p0(a) cout << a << " "
#define p1(a) cout << a << "\n"
#define MAX LLONG_MAX
#define MIN LLONG_MIN
using namespace std;
int main()
{
char alph[30];
for(int i = 0; i < 30; i++)
alph[i] = 0;
int len = w.length();
for(int i = 0; i < len; i++)
{
alph[w[i]-'a']++;
}
for(int i = 0; i < 30; i++)
{
if(alph[i] % 2 != 0)
{
p1("No");
return 0;
}
}
p1("Yes");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:44:15: error: 'w' was not declared in this scope
44 | int len = w.length();
| ^
|
s742517742
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
cin>>str;
for(char i='a';i<='z';i++)
{
int c=0;
for(int j=0;j<str.size();j++)
{
if(str.at(j)==i)
{
c++;
}
}
}
if((c%2!=0)?cout<<"No":cout<<"Yes");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:18:9: error: 'c' was not declared in this scope
18 | if((c%2!=0)?cout<<"No":cout<<"Yes");
| ^
|
s676713989
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define ll long long
#define rep(i,n) for(int i=0 ; (n) >i; i++)
class Solution {
public:
int main() {
string str; cin >> str;
std::vector<int> v(26);
rep(i,str.size()){
int x = str[i] - 'a';
v[x]++;
}
for(int a: v){
if(a&1){
cout << "NO" << endl;
return 0;
}
}
cout <<"YES" << endl;
return 0;
}
};
|
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s851877783
|
p04012
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
if (w.length() % 2 == 1) {
cout << "No" << endl;
return 0;
{
for (int i = 0; i < w.length(); ++i) {
if (w[i * 2] != w[i * 2 + 1]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
|
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:10:34: note: to match this '{'
10 | if (w.length() % 2 == 1) {
| ^
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s945949355
|
p04012
|
C++
|
#include <bits/stdc++>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
for (int i = 0; i < w.length; ++i) {
if (w[i] != w[i + 1]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
|
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
1 | #include <bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s044398114
|
p04012
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
for (int i = 0; i < w.length; ++i) {
if (w[i] != w[i + 1]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
|
a.cc: In function 'int main()':
a.cc:10:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
10 | for (int i = 0; i < w.length; ++i) {
| ~~^~~~~~
| ()
|
s338700739
|
p04012
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(),w.end())
for (int i = 0; i < w.length; ++i) {
if (w[i] != w[i + 1]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
|
a.cc: In function 'int main()':
a.cc:8:32: error: expected ';' before 'for'
8 | sort(w.begin(),w.end())
| ^
| ;
9 |
10 | for (int i = 0; i < w.length; ++i) {
| ~~~
a.cc:10:25: error: 'i' was not declared in this scope
10 | for (int i = 0; i < w.length; ++i) {
| ^
|
s810245707
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
stirng s;
int mp[300] = {};
cin >> s;
for(int i = 0;i < s.size();i++){
mp[s[i]]++;
}
for(int i = 'a';i <= 'z';i++){
if(mp[i]%2 == 1){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
5 | stirng s;
| ^~~~~~
a.cc:7:10: error: 's' was not declared in this scope
7 | cin >> s;
| ^
|
s511816056
|
p04012
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 文字列の入力
List<String> sList = Arrays.asList(sc.next().split(""));
Collections.sort(sList);
int count = 0;
String lastChar = "";
String ans = "Yes";
for(String chara : sList) {
if (!chara.equals(lastChar)) {
if (count % 2 == 0) {
count == 0;
} else {
ans = "No";
break;
}
}
lastChar = chara;
count++;
}
// 出力
System.out.println(ans);
}
}
|
Main.java:15: error: not a statement
count == 0;
^
1 error
|
s536812846
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
string s="";
int main(){
cin>>s;
bool flag=false;
map <char, int>mp;
for(int i=0;i<int(s.size())-1;i++){
mp[s[i]]++;
}
for(auto it=mp.begin();it!=mp.end();++it){if(it->second%2==1){flag=true;break}}
cout<<(flag?"No":"Yes")<<endl;
}
|
a.cc: In function 'int main()':
a.cc:11:82: error: expected ';' before '}' token
11 | for(auto it=mp.begin();it!=mp.end();++it){if(it->second%2==1){flag=true;break}}
| ^
| ;
|
s933359678
|
p04012
|
C++
|
#include <iostream>
#include <string>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
for (int i = 0; i < w.length() / 2; ++i) {
if (w[i * 2 - 1] = l w[i * 2]) cout << "No" << endl; return 0;
}
cout << "Yes" << endl;
}
|
a.cc: In function 'int main()':
a.cc:12:36: error: 'l' was not declared in this scope
12 | if (w[i * 2 - 1] = l w[i * 2]) cout << "No" << endl; return 0;
| ^
a.cc:12:37: error: expected ')' before 'w'
12 | if (w[i * 2 - 1] = l w[i * 2]) cout << "No" << endl; return 0;
| ~ ^~
| )
|
s680451433
|
p04012
|
C++
|
#include <string>
using namespace std;
int main(){
string w;
cin >> w;
int L=w.size()-1;
sort(w.begin(),w.end());
int num=0;
int ans=0;
for(int i=0; i<L; i++){
if(w.at(i)==w.at(i+1)){
num++;
}
else{
if(num%2==0) ans++;
num=0;
}
}
if(ans>0) cout << "No" << endl;
else cout << "Yes" << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> w;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <string>
+++ |+#include <iostream>
2 | using namespace std;
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
8 | sort(w.begin(),w.end());
| ^~~~
| short
a.cc:20:13: error: 'cout' was not declared in this scope
20 | if(ans>0) cout << "No" << endl;
| ^~~~
a.cc:20:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:29: error: 'endl' was not declared in this scope
20 | if(ans>0) cout << "No" << endl;
| ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
1 | #include <string>
+++ |+#include <ostream>
2 | using namespace std;
a.cc:21:8: error: 'cout' was not declared in this scope
21 | else cout << "Yes" << endl;
| ^~~~
a.cc:21:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:25: error: 'endl' was not declared in this scope
21 | else cout << "Yes" << endl;
| ^~~~
a.cc:21:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s660292906
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string>
#include<set>
#include<iterator>
using namespace std;
int freq(set<char>::iterator it,string s)
{
int ans=0;
for(int i=0;i<s.length();i++)
{
if(*it == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;set<char>::iterator it = k.begin();
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for( it=0;it<k.size();it++)
{
f = freq(it,s);.
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.length())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:23:11: error: no match for 'operator=' (operand types are 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} and 'int')
23 | for( it=0;it<k.size();it++)
| ^
In file included from /usr/include/c++/14/map:62,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/include/c++/14/bits/stl_tree.h:324:12: note: candidate: 'constexpr std::_Rb_tree_const_iterator<char>& std::_Rb_tree_const_iterator<char>::operator=(const std::_Rb_tree_const_iterator<char>&)'
324 | struct _Rb_tree_const_iterator
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:324:12: note: no known conversion for argument 1 from 'int' to 'const std::_Rb_tree_const_iterator<char>&'
/usr/include/c++/14/bits/stl_tree.h:324:12: note: candidate: 'constexpr std::_Rb_tree_const_iterator<char>& std::_Rb_tree_const_iterator<char>::operator=(std::_Rb_tree_const_iterator<char>&&)'
/usr/include/c++/14/bits/stl_tree.h:324:12: note: no known conversion for argument 1 from 'int' to 'std::_Rb_tree_const_iterator<char>&&'
a.cc:23:15: error: no match for 'operator<' (operand types are 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} and 'std::set<char>::size_type' {aka 'long unsigned int'})
23 | for( it=0;it<k.size();it++)
| ~~^~~~~~~~~
| | |
| | std::set<char>::size_type {aka long unsigned int}
| std::set<char>::iterator {aka std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::set<char>::size_type' {aka 'long unsigned int'}
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::set<char>::size_type' {aka 'long unsigned int'}
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
23 | for( it=0;it<k.size();it++)
| ^
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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::pair<_T1, _T2>'
23 | for( it=0;it<k.size();it++)
| ^
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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::reverse_iterator<_Iterator>'
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::reverse_iterator<_Iterator>'
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::move_iterator<_IteratorL>'
23 | for( it=0;it<k.size();it++)
| ^
/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:23:23: note: 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} is not derived from 'const std::move_iterator<_IteratorL>'
23 | for( it=0;it<k.size();it++)
| ^
In file included fro
|
s282387908
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string>
#include<set>
#include<iterator>
using namespace std;
int freq(set<char>::iterator it; ptr,string s)
{
int ans=0;
for(int i=0;i<s.length();i++)
{
if(*it == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;set<char>::iterator it = k.begin();
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for( it=k.begin();it =k.end();it++)
{
f = freq(it,s);.
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.length())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc:6:32: error: expected ')' before ';' token
6 | int freq(set<char>::iterator it; ptr,string s)
| ~ ^
| )
a.cc:6:34: error: 'ptr' does not name a type
6 | int freq(set<char>::iterator it; ptr,string s)
| ^~~
a.cc: In function 'int main()':
a.cc:23:24: error: could not convert '(it = k.std::set<char>::end())' from 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} to 'bool'
23 | for( it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| std::set<char>::iterator {aka std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator}
a.cc:25:15: error: too many arguments to function 'int freq(std::set<char>::iterator)'
25 | f = freq(it,s);.
| ~~~~^~~~~~
a.cc:6:5: note: declared here
6 | int freq(set<char>::iterator it; ptr,string s)
| ^~~~
a.cc:25:22: error: expected primary-expression before '.' token
25 | f = freq(it,s);.
| ^
a.cc:26:5: error: expected unqualified-id before 'if'
26 | if(!(f&1))
| ^~
|
s024800890
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int freq(char* ptr,string s)
{
int ans;
for(int i=0;i<s.length();i++)
{
if(*ptr == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for(auto it=k.begin();it =k.end();it++)
{
f = freq(&it,s);.
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.length())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:22:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
22 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| std::_Rb_tree_const_iterator<char>
a.cc:24:16: error: cannot convert 'std::_Rb_tree_const_iterator<char>*' to 'char*'
24 | f = freq(&it,s);.
| ^~~
| |
| std::_Rb_tree_const_iterator<char>*
a.cc:5:16: note: initializing argument 1 of 'int freq(char*, std::string)'
5 | int freq(char* ptr,string s)
| ~~~~~~^~~
a.cc:24:23: error: expected primary-expression before '.' token
24 | f = freq(&it,s);.
| ^
a.cc:25:5: error: expected unqualified-id before 'if'
25 | if(!(f&1))
| ^~
|
s550803907
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int freq(char* ptr,string s)
{
int ans;
for(int i=0;i<s.length();i++)
{
if(*ptr == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for(auto it=k.begin();it =k.end();it++)
{
f = freq(*it,s);
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.length())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:22:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
22 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| std::_Rb_tree_const_iterator<char>
a.cc:24:16: error: invalid conversion from 'char' to 'char*' [-fpermissive]
24 | f = freq(*it,s);
| ^~~
| |
| char
a.cc:5:16: note: initializing argument 1 of 'int freq(char*, std::string)'
5 | int freq(char* ptr,string s)
| ~~~~~~^~~
|
s098274868
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int freq(*ptr,string s)
{
int ans;
for(int i=0;i<s.length();i++)
{
if(*ptr == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for(auto it=k.begin();it =k.end();it++)
{
f = freq(*it,s);
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.length())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc:5:11: error: 'ptr' was not declared in this scope
5 | int freq(*ptr,string s)
| ^~~
a.cc:5:22: error: expected primary-expression before 's'
5 | int freq(*ptr,string s)
| ^
a.cc:5:23: error: expression list treated as compound expression in initializer [-fpermissive]
5 | int freq(*ptr,string s)
| ^
a.cc: In function 'int main()':
a.cc:22:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
22 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| std::_Rb_tree_const_iterator<char>
a.cc:24:15: error: 'freq' cannot be used as a function
24 | f = freq(*it,s);
| ~~~~^~~~~~~
|
s070127450
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for(auto it=k.begin();it =k.end();it++)
{
f = freq(*it,s);
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.length())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
12 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| std::_Rb_tree_const_iterator<char>
a.cc:14:11: error: 'freq' was not declared in this scope; did you mean 'free'?
14 | f = freq(*it,s);
| ^~~~
| free
|
s797073169
|
p04012
|
C++
|
#include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int main()
{
string s;
cin >> s;int freq;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for(auto it=k.begin();it =k.end();it++)
{
f = freq(*it,s);
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.length())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
12 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| std::_Rb_tree_const_iterator<char>
a.cc:14:7: error: 'f' was not declared in this scope
14 | f = freq(*it,s);
| ^
a.cc:14:15: error: 'freq' cannot be used as a function
14 | f = freq(*it,s);
| ~~~~^~~~~~~
|
s384807522
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool beautiful = true;
for(int i = 0; i < s.size(); i++){
int cnt = 0;
for(int j = 0; j < s.size(); j++){
if(s.at(i) == s.at(j)) cnt++;
}
if(cnt % 2 == 1){
beautiful = false;
break;
}
}
if(beautiful) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
|
a.cc: In function 'int main()':
a.cc:20:12: error: expected '}' at end of input
20 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s503901884
|
p04012
|
C++
|
#include <iostream>
using namespace std;
int main ()
{
string s;
cin>>s;
if (s.size()%2==0){
cout<<"Yes";
}
else cout<"No";
}
|
a.cc: In function 'int main()':
a.cc:10:11: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
10 | else cout<"No";
| ~~~~^~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/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:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | else cout<"No";
| ^~~~
/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:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | else cout<"No";
| ^~~~
/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:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | else cout<"No";
| ^~~~
/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:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | else cout<"No";
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string: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:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
10 | else cout<"No";
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/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:10:12: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | else cout<"No";
| ^~~~
/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:10:12: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | else cout<"No";
| ^~~~
/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:10:12: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*'
10 | else cout<"No";
| ^~~~
/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:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
10 | else cout<"No";
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
10 | else cout<"No";
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:10:12: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
10 | else cout<"No";
| ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/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:10:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
10 | else cout<"No";
| ^~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s878993379
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
string w;
int count = 0; ans = 1;
int main () {
cin >> w;
if (w.size % 2 == 1)
cout << "No" << endl;
sort(w.begin(), w.end());
for(int i = 0; i < (w.size / 2); i++){
if(w[2*i] != w[2*i + 1]){
cout << "No" <<endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
|
a.cc:5:16: error: 'ans' does not name a type
5 | int count = 0; ans = 1;
| ^~~
a.cc: In function 'int main()':
a.cc:10:9: 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 '()' ?)
10 | if (w.size % 2 == 1)
| ~~^~~~
| ()
a.cc:14:25: 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 '()' ?)
14 | for(int i = 0; i < (w.size / 2); i++){
| ~~^~~~
| ()
|
s213170175
|
p04012
|
Java
|
import java.util.*;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String W = sc.next();
int count = 0;
for(char i = 'a'; i <='z'; i++) {
for(int x = 0; x < W.length(); x++) {
if(W.charAt(x) == i) {
count += 1;
}
}
if(count % 2 != 0){
System.out.println("No");
return;
}
System.out.println("Yes");
}
}
|
Main.java:19: error: reached end of file while parsing
}
^
1 error
|
s557429095
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string s,ans;
cin >> s;
int n=s.size();
sort(s.begin(),s.end());
int count;
count=1;
for(int i=0;i<n-1;i++){
if(s[i]==s[i+1]){
count++;
}else{
if(count%2==1){
ans="No";
break;
}else{
count=1;
ans="Yes";
}
}
cout<<ans<<endl;
}
|
a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s442144235
|
p04012
|
C++
|
#include <bits/stdc++.h>
#include <set>
#include <tuple>
using namespace std;
int mid(int a,int b,int c){
return a+b+c-max(max(a,b),c)-min(min(a,b),c);
}//三つの要素の中央値を出力
int samecount(string S){
int A = 0;
for(int i = 0;i < S.size();i++){
int QA = 1;
for(int j = i ;j < S.size() - 1;j++){
if(S.at(j) == S.at(j + 1)){
QA++ ;
}
if(S.at(j) != S.at(j + 1)){
break;
}
}
A = max(QA,A);
}
return A;
}//文字列の中の連続する同じ要素の最大値を出力
int main(){
string W;
cin >> W;
string A = "abcdefghijklmnopqrstuvwxyz" ;
bool B = 1;
if(int i = 0;i < 27;i++){
int a = count(W.begin(),W.end(),'W[i]');
if(a % 2 == 1){
B = 0;
}
}
if(B) cout << "Yes" << endl;
else cout << "No" << endl;
}
|
a.cc:32:41: warning: multi-character character constant [-Wmultichar]
32 | int a = count(W.begin(),W.end(),'W[i]');
| ^~~~~~
a.cc: In function 'int main()':
a.cc:31:24: error: expected ')' before ';' token
31 | if(int i = 0;i < 27;i++){
| ~ ^
| )
a.cc:31:25: error: 'i' was not declared in this scope
31 | if(int i = 0;i < 27;i++){
| ^
|
s982214830
|
p04012
|
C++
|
#include <bits/stdc++.h>
#include <set>
#include <tuple>
using namespace std;
int mid(int a,int b,int c){
return a+b+c-max(max(a,b),c)-min(min(a,b),c);
}//三つの要素の中央値を出力
int samecount(string S){
int A = 0;
for(int i = 0;i < S.size();i++){
int QA = 1;
for(int j = i ;j < S.size() - 1;j++){
if(S.at(j) == S.at(j + 1)){
QA++ ;
}
if(S.at(j) != S.at(j + 1)){
break;
}
}
A = max(QA,A);
}
return A;
}//文字列の中の連続する同じ要素の最大値を出力
int main(){
string W;
cin >> W;
string A = "abcdefghijklmnopqrstuvwxyz" ;
bool B = 1;
if(int i = 0;i < 27;i++){
int a = count(W.begin(),W.end(),'W[i]');
if(a % 2 == 1){
B = 0;
}
}
if(B) cout << "Yes" << endl;
else cout << "No" << endl;
}
|
a.cc:32:41: warning: multi-character character constant [-Wmultichar]
32 | int a = count(W.begin(),W.end(),'W[i]');
| ^~~~~~
a.cc: In function 'int main()':
a.cc:31:24: error: expected ')' before ';' token
31 | if(int i = 0;i < 27;i++){
| ~ ^
| )
a.cc:31:25: error: 'i' was not declared in this scope
31 | if(int i = 0;i < 27;i++){
| ^
|
s781314218
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int s[30] ;
for (int i = 0; i < 30; i++){
s[i] = 0;
}
int count, str,
for (int i = 0; i < w.size() ; i++) {
s[w[i]-'a']++;
}
for (int i = 0; i < 30; i++){
if (s[i] %2 != 0){
str == 1;
break;
}
}
if(str == 1){
cout << "No" << endl;
}
else{
cout << "Yes" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:14:7: error: expected unqualified-id before 'for'
14 | for (int i = 0; i < w.size() ; i++) {
| ^~~
a.cc:14:23: error: 'i' was not declared in this scope
14 | for (int i = 0; i < w.size() ; i++) {
| ^
|
s138024414
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count, str, s[30];
for (int i = 0; i < w.size() ; i++) {
s[i] = 0;
s[w[i]-'a']++;
}
for (int i = 0; i < w.size(); i++){
if (a[i] %2 != 0){
str == 1;
break;
}
}
if(str == 1){
cout << "No" << endl;
}
else{
cout << "Yes" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:17:12: error: 'a' was not declared in this scope
17 | if (a[i] %2 != 0){
| ^
|
s769280297
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count, str;
for (int i = 0; i < w.size() ; i++) {
a[w[i]-'a']++;
}
for (int = 0; i < w.size(); i++){
if (a[i] %2 != 0){
str == 1;
break;
}
}
if(str == 1){
cout << "No" << endl;
}
else{
cout << "Yes" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:12:9: error: 'a' was not declared in this scope
12 | a[w[i]-'a']++;
| ^
a.cc:15:12: error: expected unqualified-id before '=' token
15 | for (int = 0; i < w.size(); i++){
| ^
a.cc:15:11: error: expected ';' before '=' token
15 | for (int = 0; i < w.size(); i++){
| ^~
| ;
a.cc:15:12: error: expected primary-expression before '=' token
15 | for (int = 0; i < w.size(); i++){
| ^
a.cc:15:17: error: 'i' was not declared in this scope
15 | for (int = 0; i < w.size(); i++){
| ^
a.cc:15:29: error: expected ')' before ';' token
15 | for (int = 0; i < w.size(); i++){
| ~ ^
| )
a.cc:15:31: error: 'i' was not declared in this scope
15 | for (int = 0; i < w.size(); i++){
| ^
|
s831319072
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<char> vec(w.size());
sort(vec.begin(),vec.end());
int count;
for (int i = 0; i < w.size() ; i++) {
if(w[i-1] != w[i]){
continue;
}
}
if(i % 2 == 0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:19:6: error: 'i' was not declared in this scope
19 | if(i % 2 == 0){
| ^
|
s218923759
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<char> vec(w.size);
sort(vec.begin(),vec.end());
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if ((w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
continue;
}
}
if(count % 2 == 0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:7:22: error: invalid use of non-static 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]'
7 | vector<char> vec(w.size);
| ~~^~~~
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: declared here
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
|
s785426636
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<char> vec(w.size);
sort(vec.begin(),vec.end())
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if ((w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
continue;
}
}
if(count % 2 == 0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:7:22: error: invalid use of non-static 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]'
7 | vector<char> vec(w.size);
| ~~^~~~
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: declared here
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
a.cc:9:32: error: expected ';' before 'int'
9 | sort(vec.begin(),vec.end())
| ^
| ;
10 |
11 | int count;
| ~~~
a.cc:16:18: error: no post-increment operator for type
16 | count++;
| ^~
a.cc:23:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator%'
23 | if(count % 2 == 0){
| ~~~~~~^~~
|
s666049460
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
break;
}
}
if(count % 2 == 0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:15:38: error: expected identifier before '(' token
15 | else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
| ^
|
s926913831
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
break;
}
if(count % 2 == 0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:15:38: error: expected identifier before '(' token
15 | else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s716928513
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
if(count % 2 == 0){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:15:38: error: expected identifier before '(' token
15 | else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:9:43: note: to match this '{'
9 | for (int i = 0; i < w.size() ; i++) {
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s829687083
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
for(int j = 0; j < w.size() ;i++){
if( (w.size()/2 == 0) && (w.at(i) == w.at(j))){
count++;
}
}
}
if((count/4 = 1 )|| (count/4 = 3)){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:17:12: error: lvalue required as left operand of assignment
17 | if((count/4 = 1 )|| (count/4 = 3)){
| ~~~~~^~
a.cc:17:29: error: lvalue required as left operand of assignment
17 | if((count/4 = 1 )|| (count/4 = 3)){
| ~~~~~^~
|
s052042259
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define REP(i,a) for(int i = 0; i < (a); i++)
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int MOD = 1e9 + 7;
signed main(){
string w;
cin >> w;
sort(ALL(w));
if(w.size() % 2 == 1){
cout << "No" << endl;
return 0;
}
for(int i = 0; i < w.length; i += 2){
if(w[i] != w[i + 1]){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
|
a.cc: In function 'int main()':
a.cc:18:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
18 | for(int i = 0; i < w.length; i += 2){
| ~~^~~~~~
| ()
|
s272256836
|
p04012
|
C++
|
#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
int main(){
string w;
cin>>w;
vecter<ll> a(26,0);
for(ll i=0;i<w.size();i++) a[w[i]]++;
for(ll i=0;i<26;i++){
if(a[i]%2!=0){
cout<<"No"<<endl;
break;
}
if(i==25) cout<<"Yes"<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:5: error: 'vecter' was not declared in this scope
9 | vecter<ll> a(26,0);
| ^~~~~~
a.cc:9:14: error: expected primary-expression before '>' token
9 | vecter<ll> a(26,0);
| ^
a.cc:9:16: error: 'a' was not declared in this scope
9 | vecter<ll> a(26,0);
| ^
|
s681099246
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int count[500];
int main(){
string str;
cin >> str;
for(int i=0; i<str.length();i++){
count[str[i]]++;
}
bool No = false;
for(int i='a'; i<='z'; i++){
if(count[i] %2 != 0)
No = true;
}
if(NO) cout << "NO"<<endl;
else cout <<"YES"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:1: error: reference to 'count' is ambiguous
15 | count[str[i]]++;
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4025 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
a.cc:5:5: note: 'int count [500]'
5 | int count[500];
| ^~~~~
a.cc:22:4: error: reference to 'count' is ambiguous
22 | if(count[i] %2 != 0)
| ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4025 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
a.cc:5:5: note: 'int count [500]'
5 | int count[500];
| ^~~~~
a.cc:26:4: error: 'NO' was not declared in this scope; did you mean 'No'?
26 | if(NO) cout << "NO"<<endl;
| ^~
| No
|
s273470090
|
p04012
|
C++
|
#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#define REP(i, n) for (long long i = 0; i < (n); i++)
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;
//arc044_c
// 隣り合う値がx以下
// 左から見ていって、右側を削ればよいのでは 右が0なら左を削る
int main(){
string S;
cin >> S;
ll a[26] = {};
REP(i,S.size())
{
ll tmp = S[i] - 'a';
a[tmp]++;
}
string res = "Yes";
REP(i,26)
{
if(a[tmp] % 2 != 0)
{
res = "No";
break;
}
}
cout << res << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:31:10: error: 'tmp' was not declared in this scope; did you mean 'tm'?
31 | if(a[tmp] % 2 != 0)
| ^~~
| tm
|
s368877888
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int alp[26]={0};
int main(){
string w; cin>>w;
for(int i=0;i<w.length();i++){
alp[w.substr(i,1)-"a"]++;
}
for(int i=0;i<26;i++){
if(alp[i]%2!=0){
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
}
|
a.cc: In function 'int main()':
a.cc:9:22: error: no match for 'operator-' (operand types are 'std::__cxx11::basic_string<char>' and 'const char [2]')
9 | alp[w.substr(i,1)-"a"]++;
| ~~~~~~~~~~~~~^~~~
| | |
| | const char [2]
| 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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::move_iterator<_IteratorL>'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::complex<_Tp>'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::complex<_Tp>'
9 | alp[w.substr(i,1)-"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:9:23: note: mismatched types 'const std::complex<_Tp>' and 'const char [2]'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | alp[w.substr(i,1)-"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:9:23: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'const char [2]'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | alp[w.substr(i,1)-"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:9:23: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'const char [2]'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
9 | alp[w.substr(i,1)-"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:9:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
9 | alp[w.substr(i,1)-"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:9:23: note: mismatched types 'const std::valarray<_Tp>' and 'const char [2]'
9 | alp[w.substr(i,1)-"a"]++;
| ^~~
|
s858023694
|
p04012
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int alp[26]={0};
int main(){
string w; cin>>w;
for(int i=0;i<w.length();i++){
alp[w[i]-"a"]++;
}
for(int i=0;i<26;i++){
if(alp[i]%2!=0){
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
}
|
a.cc: In function 'int main()':
a.cc:9:13: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
9 | alp[w[i]-"a"]++;
|
s620284734
|
p04012
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define ub upper_bound
#define lb upper_bound
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort((c).begin(),(c).end())
#define ve vector
#define vi vector<int>
#define vp vector<pair<int,int>>
#define vvi vector<vector<int>>
using ll = long long;
const ll INF = LLONG_MAX - 100;
ll mod = 1e9 + 7;
int dx[] = {-1,0,1,0}, dy[] = {0,1,0,-1};
vector<ll> prime;
class fact {
public:
int fmod = 1e9+7;
vector<int> fac, inv;
fact (int n, int Mod = 1e9+7) {
fmod = Mod;
fac = vector<int>(n,0);
inv = vector<int>(n,0);
fac[0] = 1; for (int i = 1; i < n; i++) fac[i] = fac[i-1] * i % fmod;
for (int i = 0;i < n;i++) inv[i] = fact::POW(fac[i],fmod-2);
}
ll nCr(ll n, ll r) {return (fac[n] * inv[r] % fmod) * inv[n-r] % fmod;}
ll POW(ll a, ll b) {ll c = 1; while (b > 0) {if (b & 1) {c = a * c%fmod;}a = a * a%fmod; b >>= 1;}return c;}
};
template <class T = ll> T in() {T x; cin >> x; return (x);}
void DEBUG(vector<int> a) {for(int i=0;i<a.size();i++)cout<<a[i]<<" ";cout<<endl;}
void EMP(int x) {cout<<"!!!"<<x<<"!!!"<<endl;}
ll GCD(ll a, ll b) {ll c; while (b != 0) {c = a % b; a = b; b = c;}return a;}
ll LCM(ll a, ll b) {return a * b / GCD(a, b);}
ll POW(ll a, ll b) {ll c = 1; while (b > 0) {if (b & 1) {c = a * c%mod;}a = a * a%mod; b >>= 1;}return c;}
void PRI(ll n) {bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) {a[i] = 1LL;}for (int i = 2; i < n + 1LL; i++) {if (a[i]) {prime.pb(i); ll b = i; while (b <= n) {a[b] = 0; b += i;}}}}
template <typename T> T chmin(T& a, T b) {if(a>b)a=b;return a;}
template <typename T> T chmax(T& a, T b) {if(a<b)a=b;return b;}
bool isSqrt(ll a) {return pow(sqrt(a),2) == a ? 1 : 0;}
bool solve() {
map<char,int> cnt;
string w; cin >> w;
for (auto&& a : w) {
cnt[a]++;
}
bool ok = true;
for (auto&& a : cnt) {
if (a.second & 1) ok = false;
}
cout << ok ? "Yes" : "No" << endl;
}
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
solve();
}
|
a.cc: In function 'bool solve()':
a.cc:63:35: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
63 | cout << ok ? "Yes" : "No" << endl;
| ~~~~~^~~~~~~
a.cc:64:1: warning: no return statement in function returning non-void [-Wreturn-type]
64 | }
| ^
|
s875761998
|
p04012
|
C++
|
/*
*
* 1. sprawdz corner cases
* 2. sprawdz limity, jesli sie da pozamieniaj wszystkie lokalne zmienne na LL!
* 3. MINIMALNE I MAKSYMALNE WEJŚCIE I WYJŚCIE
* 4. lokalne zmienne, iteracja po tablicach dwuwymiarowych uwazaj
* 5. SPRAWDZ CZY input jest POSORTOWANY jaki jest niezmiennik
*
*
*/
#include <algorithm>
#include <cstdio>
#include <iomanip> // std::setprecision
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <unordered_map>
#include <vector>
#include <numeric>
#define FOR(x, y, z) for (int x = (y); x < (z); x++)
#define FORD(x, y, z) for (int x = (y); x >= z; x--)
#define REP(r, n) for (int r = 0; r < (n); r++)
#define MP make_pair
#define ST first
#define ND second
#define SIZE(c) ((int)((c).size()))
#define FOREACH(i, x) for (__typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define ALL(u) (u).begin(), (u).end()
#define RALL(u) (u).rbegin(), (u).rend()
#define PB push_back
#define PF push_front
#define SZ(x) long long((x).size())
#define IS_IN(x, t) (t.find(x) != t.end())
#define BIT(n, i) (((n) >> (i)) & 1)
#ifdef LOCAL
#define LASSERT(X) assert(X)
#else
#define LASSERT(X) \
{ \
}
#endif
#define TYPEMAX(type) std::numeric_limits<type>::max()
#define TYPEMIN(type) std::numeric_limits<type>::min()
using namespace std;
typedef long long LL;
typedef long double LD;
typedef vector<LL> VI;
typedef pair<LL, LL> PR;
inline LL GCD(LL a, LL b)
{
LL r;
while (b) {
r = a % b;
a = b;
b = r;
}
return a;
};
inline LL LCM(LL a, LL b) { return a / GCD(a, b) * b; };
inline LL fpow(LL n, LL k, LL p)
{
LL r = 1;
for (; k; k >>= 1) {
if (k & 1)
r = r * n % p;
n = n * n % p;
}
return r;
};
inline LL inv(LL a, LL p) { return fpow(a, p - 2, p); }
[[maybe_unused]] const LL MOD = (LL)1e9 + 7;
[[maybe_unused]] const LL MAXUS = TYPEMAX(LL);
[[maybe_unused]] const LD PI = acos((LD)-1);
[[maybe_unused]] const LD epsilon = 1e-9;
template <typename T>
T input()
{
T res;
cin >> res;
LASSERT(cin);
return res;
}
template <typename IT>
void input_seq(IT b, IT e)
{
std::generate(b, e, input<typename std::remove_reference<decltype(*b)>::type>);
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
multiset<char> occ(s.begin(), s.end());
for (auto e: occ) {
if (occ.count(occ) % 2 != 0) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:112:20: error: no matching function for call to 'std::multiset<char>::count(std::multiset<char>&)'
112 | if (occ.count(occ) % 2 != 0) {
| ~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/set:64,
from a.cc:19:
/usr/include/c++/14/bits/stl_multiset.h:738:9: note: candidate: 'template<class _Kt> decltype (((const std::multiset<_Key, _Compare, _Alloc>*)this)->std::multiset<_Key, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::multiset<_Key, _Compare, _Alloc>::count(const _Kt&) const [with _Key = char; _Compare = std::less<char>; _Alloc = std::allocator<char>]'
738 | count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x))
| ^~~~~
/usr/include/c++/14/bits/stl_multiset.h:738:9: note: template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_multiset.h: In substitution of 'template<class _Kt> decltype (((const std::multiset<char>*)this)->std::multiset<char>::_M_t.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::_M_count_tr<_Kt, _Req>(__x)) std::multiset<char>::count(const _Kt&) const [with _Kt = std::multiset<char>]':
a.cc:112:20: required from here
112 | if (occ.count(occ) % 2 != 0) {
| ~~~~~~~~~^~~~~
/usr/include/c++/14/bits/stl_multiset.h:738:65: error: no matching function for call to 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::_M_count_tr(const std::multiset<char>&) const'
738 | count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x))
| ~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/map:62,
from a.cc:16:
/usr/include/c++/14/bits/stl_tree.h:1311:9: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_count_tr(const _Kt&) const [with _Req = _Kt; _Key = char; _Val = char; _KeyOfValue = std::_Identity<char>; _Compare = std::less<char>; _Alloc = std::allocator<char>]'
1311 | _M_count_tr(const _Kt& __k) const
| ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:1311:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/string:49,
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/iomanip:42,
from a.cc:13:
/usr/include/c++/14/bits/stl_function.h: In substitution of 'template<class _Func, class _SfinaeType> using std::__has_is_transparent_t = typename std::__has_is_transparent<_Func, _SfinaeType>::type [with _Func = std::less<char>; _SfinaeType = std::multiset<char>]':
/usr/include/c++/14/bits/stl_tree.h:1309:9: required by substitution of 'template<class _Kt> decltype (((const std::multiset<char>*)this)->std::multiset<char>::_M_t.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::_M_count_tr<_Kt, _Req>(__x)) std::multiset<char>::count(const _Kt&) const [with _Kt = std::multiset<char>]'
1309 | typename _Req = __has_is_transparent_t<_Compare, _Kt>>
| ^~~~~~~~
a.cc:112:20: required from here
112 | if (occ.count(occ) % 2 != 0) {
| ~~~~~~~~~^~~~~
/usr/include/c++/14/bits/stl_function.h:1427:11: error: no type named 'type' in 'struct std::__has_is_transparent<std::less<char>, std::multiset<char>, void>'
1427 | using __has_is_transparent_t
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_multiset.h:732:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::count(const key_type&) const [with _Key = char; _Compare = std::less<char>; _Alloc = std::allocator<char>; size_type = long unsigned int; key_type = char]'
732 | count(const key_type& __x) const
| ^~~~~
/usr/include/c++/14/bits/stl_multiset.h:732:29: note: no known conversion for argument 1 from 'std::multiset<char>' to 'const std::multiset<char>::key_type&' {aka 'const char&'}
732 | count(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
|
s025451975
|
p04012
|
C
|
#include <stdio.h>
#include <string.h>
int main(){
char r;
char s[101];
scanf("%s",s);
for(int i=0;i<strlen(s);i++){
for(int j=0;j<strlen(s);j++){
if(s[j]>s[j+1]){
r=s[j];
s[j]=s[j+1];
s[j+1]=r;
}
}
}
for(int i=0;i<strlen(s)-1;i++){
if(s[i]==s[i+1])c++;
else if(c%2==1)c=0;
else {
puts("No");
return 0;
}
}
puts("Yes");
return 0;
}
|
main.c: In function 'main':
main.c:17:21: error: 'c' undeclared (first use in this function)
17 | if(s[i]==s[i+1])c++;
| ^
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
|
s431241478
|
p04012
|
C
|
#include <stdio.h>
#include <string.h>
int main(){
char r;
char s[101];
scanf("%s",s);
for(int i=0;i<strlen(s);i++){
for(int j=0;j<strlen(s);j++){
if(s[j]>s[j+1]){
r=s[j];
s[j]=s[j+1];
s[j+1]=r;
}
}
}
for(int i=0;i<strlen(s)-1;i++){
if(s[i]==i[i+1])c++;
else if(c%2==1)c=0;
else {
puts("No");
return 0;
}
}
puts("Yes");
return 0;
}
|
main.c: In function 'main':
main.c:17:15: error: subscripted value is neither array nor pointer nor vector
17 | if(s[i]==i[i+1])c++;
| ^
main.c:17:21: error: 'c' undeclared (first use in this function)
17 | if(s[i]==i[i+1])c++;
| ^
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
|
s360645746
|
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:10:10: error: 'str' was not declared in this scope; did you mean 'std'?
10 | char c=str[0];
| ^~~
| std
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.