submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s580492780 | p03698 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#include<cmath>
#define REP(i,n) for (int i = 0; (i) < (n); ++ (i))
using namespace std;
string s;
int a[30];
int main(){
cin >> s;
string ans = "yes";
REP(i,s.size()){
if(a[s[i]-'a'] ==0) a[s[i]-'a']++
else ans = "no";
}
cout << ans << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:24:38: error: expected ';' before 'else'
24 | if(a[s[i]-'a'] ==0) a[s[i]-'a']++
| ^
| ;
25 | else ans = "no";
| ~~~~
|
s529002963 | p03698 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin << S;
bool flag = true;
for(int i = 0; i < S.size() - 1; i++) {
char f = S[i];
for(int j = i; j < S.size(); j++) {
if(f == S[j]) {
flag = false;
break;
}
}
}
if(flag) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10: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>'})
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | 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:10:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
10 | cin << S;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr |
s241836478 | p03698 | C++ | #include<algorithm>
#include<cmath>
#include<cstdio>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<sstream>
#include<stack>
#include<string>
#include<unordered_set>
#include<vector>
#define ll long long
#define P pair<int,int>
#define FOR(i,N) for(int i=0;i<(int)N;i++)
#define FORIN(i,a,b) for(int i=a;i<(int)b;i++)
#define ALL(x) (x).begin(),(x).end()
#define LAST(x) (x)[(x).size()-1]
#define GI(name) int (name);scanf("%d",&(name))
#define GI2(name1,name2) int (name1),(name2);scanf("%d %d",&(name1),&(name2))
#define GI3(name1,name2,name3) int (name1),(name2),(name3);scanf("%d %d %d",&(name1),&(name2),&(name3))
#define GVI(name,size) vector<int> (name)(size);FOR(i,(size))scanf("%d",&(name)[i])
#define MOD 1000000007
using namespace std;
string to_hex(int x){
stringstream ss;
ss<<hex<<x;
return ss.str();
}
inline int get_int(){
int ret;
scanf("%d",&ret);
return ret;
}
inline vector<int> get_ints(int n){
vector<int> ret(n);
FOR(i,n){
scanf("%d",&ret[i]);
}
return ret;
}
inline string get_str(){
string ret;
cin>>ret;
return ret;
}
bool is_prime(int n){
int s=sqrt(n)+1;
for(int i=2;i<=s;++i){
if(n%i==0){
return 0;
}
}
return 1;
}
vector<P> prime_division(int n){
vector<P> ret;
int s=sqrt(n)+1;
int c=0;
for(int i=2;i<=n;++i){
if(n%i==0){
c=0;
do{
++c;
n/=i;
}while(n%i==0);
ret.push_back(P(i,c));
}
}
return ret;
}
string to_string(string s){
return s;
}
template<class T>
string to_string(vector<T> v){
string ret="{";
FOR(i,v.size()-1){
ret+=to_string(v[i])+",";
}
if(v.size()>0){
ret+=to_string(LAST(v));
}
ret+="}";
return ret;
}
void debug_print(){
cerr<<endl;
}
template<class Head,class... Tail>
void debug_print(Head head,Tail... tail){
cerr<<to_string(head)<<" ";
debug_print(tail...);
}
template<class... T>
void debug(T... args){
cerr<<"["<<__LINE__<<"]: ";
debug_print(args...);
}
void print(){
cout<<endl;
}
template<class Head,class... Tail>
void print(Head head,Tail... tail){
cout<<to_string(head);
print(tail...);
}
int main(){
string S=get_str();
unordererd_set<int> list;
FOR(i,S.size()){
if(list.count(S[i])){
print("no");
return 0;
}else{
list.insert(S[i]);
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:126:5: error: 'unordererd_set' was not declared in this scope
126 | unordererd_set<int> list;
| ^~~~~~~~~~~~~~
a.cc:126:20: error: expected primary-expression before 'int'
126 | unordererd_set<int> list;
| ^~~
a.cc:128:12: error: 'list' was not declared in this scope
128 | if(list.count(S[i])){
| ^~~~
a.cc:12:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
11 | #include<unordered_set>
+++ |+#include <list>
12 | #include<vector>
|
s528479878 | p03698 | C++ | #include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<functional>
#include<iomanip>
#include<iostream>
#include<list>
#include<map>
#include<queue>
#include<random>
#include<set>
#include<stack>
#include<string>
#include<utility>
#include<vector>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) FOR(i,0,n)
#define FORR(i,a,b) for(int i=(a);i>=(b);--i)
#define REPR(i,n) FORR(i,n,0)
#define int long long
using namespace std;
typedef pair<int, int> pii;
string s;
int a[30]={0};
signed main() {
cin>>s;
bool f=true;
rep(i,s.length()){
if(a[s[i]-97]!=0){
f=false;
}
a[s[i]-97]++;
}
if(f){
cout<<"yes"<<endl;
}
else{
cout<<"no"<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:45:25: error: expected ';' before '}' token
45 | cout<<"no"<<endl
| ^
| ;
46 | }
| ~
|
s920107369 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
map<char,int> mp;
for(int i=0;i<s.size();i++){
mp[s[i]] ++;
}
for(i=0;i<mp.size();i++){
if(mp[s[i]]>=2){
cout<<"no"<<endl;
}else{
cout<<"yes"<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'i' was not declared in this scope
12 | for(i=0;i<mp.size();i++){
| ^
|
s430920110 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
set<char> ss;
for(int i=0;i<s.size();i++){
ss[i] = s[i]
}
if(s.size() == ss.size()){
cout<<"yes"<<endl;
}else{
cout<<"no"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:11: error: no match for 'operator[]' (operand types are 'std::set<char>' and 'int')
9 | ss[i] = s[i]
| ^
|
s098764214 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
int a[26]={}
for (int i=0;i<S.size();i++){
a[S[i]-'a']+=1;
if (a[S[i]-'a']=2){
cout << "no" <<endl;
return 0;
}
}
cout << "yes" <<endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: expected ',' or ';' before 'for'
8 | for (int i=0;i<S.size();i++){
| ^~~
a.cc:8:20: error: 'i' was not declared in this scope
8 | for (int i=0;i<S.size();i++){
| ^
|
s963630644 | p03698 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(void) {
string s;
cin >> s;
vector<char> check;
for(int i =0; i < s.size(); ++i) {
if(find(s.begin(), s.end(), s[i]) != s.end()) {
cout << "no" << endl;
return 0;
} else {
check.push_back(s[i]);
}
}
cout << "yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:16: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
13 | if(find(s.begin(), s.end(), s[i]) != s.end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
435 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed:
a.cc:13:16: note: '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
13 | if(find(s.begin(), s.end(), s[i]) != s.end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
|
s871519963 | p03698 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
string s;
cin>>s;
char al[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
int cnt[26];
for(int i=0;i<26;i++)cnt[i]=0;
for(int i=0;i<26;i++){
for(int j=0;j<26;j++){
if(s[i]==al[j]){
if(cnt[j]){
cout<<"no"<<endl;
return 0;
}
cnt[j]++;
}
}
cout<<"yes"<<endl;
}
| a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
20 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s363532512 | p03698 | C | #include <stdio.h>
int main(void){
char s[100];
int count,flag=0;
for(count=0;;count++){
if(s[count]==s[count+1]){count++;}
if(s[count]=='\0'){break;}
else{flag=1; break;}
}
if(flag==0){printf("yes\n");}
else{printf("no\n")}
return 0;
} | main.c: In function 'main':
main.c:11:22: error: expected ';' before '}' token
11 | else{printf("no\n")}
| ^
| ;
|
s001494061 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
stirng s; cin >> s;
int a[26];
memset(a, 0);
for (auto c : s) {
a[c - 'a']++;
}
bool ans = true;
for (int i = 0; i < 26; ++i) if (a[i] > 1) ans = false;
cout << (ans ? "yes" : "no") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'stirng' was not declared in this scope
7 | stirng s; cin >> s;
| ^~~~~~
a.cc:7:20: error: 's' was not declared in this scope
7 | stirng s; cin >> s;
| ^
a.cc:9:3: error: 'memset' was not declared in this scope
9 | memset(a, 0);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #include <string>
|
s251253873 | p03698 | C++ | #include<vector>
int main() {
int out=0;
std::string a;
std::cin >> a;
for (int j = 0; j < a.size(); j++) {
for (int i = 0; i < a.size(); i++) {
if (a[i] == a[j]) {
out++;
}
}
}
if (out == a.size()) {
std::cout << "yes" << std::endl;
}
else {
std::cout << "no" << std::endl;
}
} | a.cc: In function 'int main()':
a.cc:5:14: error: 'string' is not a member of 'std'
5 | std::string a;
| ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
1 | #include<vector>
+++ |+#include <string>
2 | int main() {
a.cc:8:14: error: 'cin' is not a member of 'std'
8 | std::cin >> a;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<vector>
+++ |+#include <iostream>
2 | int main() {
a.cc:8:21: error: 'a' was not declared in this scope
8 | std::cin >> a;
| ^
a.cc:21:22: error: 'cout' is not a member of 'std'
21 | std::cout << "yes" << std::endl;
| ^~~~
a.cc:21:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:44: error: 'endl' is not a member of 'std'
21 | std::cout << "yes" << std::endl;
| ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
1 | #include<vector>
+++ |+#include <ostream>
2 | int main() {
a.cc:24:22: error: 'cout' is not a member of 'std'
24 | std::cout << "no" << std::endl;
| ^~~~
a.cc:24:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:43: error: 'endl' is not a member of 'std'
24 | std::cout << "no" << std::endl;
| ^~~~
a.cc:24:43: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s649341382 | p03698 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main() {
int i = 0;
bool a = false;
string S;
cin >> S;
for (i = 1; i < S.size; i++) {
if (S.at(i - 1) == S.at(i)) {
a = true;
}
}
if (a == true) {
cout<<"yes"<<endl;
}
else {
cout << "no" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:27: 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 | for (i = 1; i < S.size; i++) {
| ~~^~~~
| ()
|
s896765869 | p03698 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main() {
int i = 0;
bool a = false;
string S;
cin >> S;
for (i = 1; i < S.length; i++) {
if (S.at(i - 1) == S.at(i)) {
a = true;
}
}
if (a == true) {
cout<<"yes"<<endl;
}
else {
cout << "no" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:27: 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 (i = 1; i < S.length; i++) {
| ~~^~~~~~
| ()
|
s792397129 | p03698 | C++ | #include<iostream>
#include<string>
#include<vector>
#define REP(i,n) for(int i=0;i<(n);++i)
using namespace std;
int main(){
string s;
cin >> s;
vector<char> c;
int n = s.size();
REP(i, n) c.push_back(s[i]);
sort(c.begin(), c.end());
bool jud = true;
for(int i = 1; i < n; ++i){
if(c[i] == c[i - 1]) jud = false;
}
if(jud) cout << "yes" << endl;
else cout << "no" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(c.begin(), c.end());
| ^~~~
| short
|
s282700372 | p03698 | C++ | #include<iostream>
#include<string>
#include<array>
#define REP(i,n) for(int i=0;i<(n);++i)
using namespace std;
int main(){
string s;
cin >> s;
int n = s.size();
array<char, 26> c;
REP(i, n) c[i] = s[i];
sort(c.begin(), c.begin() + n);
bool jud = true;
for(int i = 1; i < n; ++i){
if(c[i] == c[i - 1]) jud = false;
}
if(jud) cout << "yes" << endl;
else cout << "no" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(c.begin(), c.begin() + n);
| ^~~~
| short
|
s908006736 | p03698 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <unordered_map>
void _cin(){} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail){ std::cin >> head; _cin(std::forward<Tail>(tail)...); }
void _cout(){ std::cout << "\n"; } template <class Head, class... Tail> void _cout(Head&& head, Tail&&... tail){ std::cout << head; _cout(std::forward<Tail>(tail)...); }
#define For(i, n) for(int i = 0; i < (n); i ++)
#define Range(c) c.begin(), c.end()
#define RevRange(c) c.rbegin(), c.rend()
#define Contains(c, x) (find(Range(c), x) != c.end())
#define Sort(a) sort(Range(a))
#define DeSort(a) sort(RevRange(a))
#define Vec2(T, n, m, xs) vector<vector<T>> xs(n, vector<T>(m))
#define Sum(a) accumulate(Range(a), 0)
#define Cusum(T, n, xs, sxs) vector<T> sxs(n+1); For(i, n) sxs[i+1] = sxs[i] + xs[i]
#define Cin(T, ...) T __VA_ARGS__; _cin(__VA_ARGS__)
#define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i]
#define Cins2(T, n, xs, ys) vector<T> xs(n), ys(n); For(i, n) cin >> xs[i] >> ys[i]
#define Cins3(T, n, xs, ys, zs) vector<T> xs(n), ys(n), zs(n); For(i, n) cin >> xs[i] >> ys[i] >> zs[i]
#define Cinss(T, n, m, xs) Vec2(T, n, m, xs); For(i, n) For(j, m) cin >> xs[i][j]
#define Cinm(T, n, map) unordered_map<T, int> map; For(i, n){ Cin(T, x); map[x] ++; }
#define Cout(...) _cout(__VA_ARGS__);
#define Couts(xs) for(const auto &e : xs) cout << e << " "; cout << "\n"
#define Coutyn(cond) Cout((cond) ? "yes" : "no")
#define CoutYn(cond) Cout((cond) ? "Yes" : "No")
#define CoutYN(cond) Cout((cond) ? "YES" : "NO")
using namespace std;
using ll = long long;
int main(void){
Cins(string, s);
Sort(s);
Coutyn(unique(Range(s)) == s.end());
}
| a.cc:35:19: error: macro "Cins" requires 3 arguments, but only 2 given
35 | Cins(string, s);
| ^
a.cc:20:9: note: macro "Cins" defined here
20 | #define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i]
| ^~~~
a.cc: In function 'int main()':
a.cc:35:5: error: 'Cins' was not declared in this scope
35 | Cins(string, s);
| ^~~~
a.cc:36:10: error: 's' was not declared in this scope
36 | Sort(s);
| ^
a.cc:11:18: note: in definition of macro 'Range'
11 | #define Range(c) c.begin(), c.end()
| ^
a.cc:36:5: note: in expansion of macro 'Sort'
36 | Sort(s);
| ^~~~
|
s630662499 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
bool itti=false;
for(int i=0;i<s.size();i++){
for(int j=0;j<i;j++){
if(s[j]==s[i]){
itti=true;
}
}
if(itti) cout<<"no"<<endl;
else cout<<"yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:20:4: error: expected '}' at end of input
20 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s598291681 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
bool itti=false;
for(int i=0;i<s.size();i++){
for(int j=0;j<i;j++){
if(s[j]==s[i]){
itti=true;}
}
}
if(itti) cout<<"no"<<endl;
else cout<<"yes"<<endl;
| a.cc: In function 'int main()':
a.cc:19:28: error: expected '}' at end of input
19 | else cout<<"yes"<<endl;
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s646794096 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
bool itti=false;
for(int i=0;i<s.size();i++){
for(int j=0;j<i;j++){
if(s[j]==s[i]){
itti=true;
}
}
if(itti) cout<<"no"<<endl;
else cout<<"yes"<<endl; | a.cc: In function 'int main()':
a.cc:19:28: error: expected '}' at end of input
19 | else cout<<"yes"<<endl;
| ^
a.cc:11:30: note: to match this '{'
11 | for(int i=0;i<s.size();i++){
| ^
a.cc:19:28: error: expected '}' at end of input
19 | else cout<<"yes"<<endl;
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s128238742 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int alf[27]={};
string str;
getline(cin, S);
for(int i=0; i<S.size(); i++){
alf[S[i]-'a']++;
}
for(int i=0; i<27; i++){
if(alf[i] > 1){
cout << "no" << endl;
return 0;
}
}
cout << "yes" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:16: error: 'S' was not declared in this scope
9 | getline(cin, S);
| ^
|
s404391513 | p03698 | C++ |
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i, start, end) for(int i = start; i < end; i++)
#define all(x) (x).begin(), (x).end()
#define debug(x) cout << (x) << endl;
#define INF (1e9)
#define add_mod(a, b, x) ( (ll)(a) + (ll)(b) ) % (ll)(x)
#define mul_mod(a, b, x) ( ((ll)(a) % (ll)(x)) * ((ll)(b) % (ll)(x)) ) % (ll)(x)
ll sub_mod(ll a, ll b, ll x){
ll tmp = (a - b) % x;
if(tmp < 0) tmp += x;
return tmp;
}
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s;
bool outflag = false;
int flag[30] = {0};
for(auto itr = s.begin(); itr != s.end(); itr++){
if(flag[*itr - 'a'] == 0){
flag[*itr - 'a'] = 1;
}else{
outflag = true;
}
}
if(outflag) cout << "no" << endl;
else cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:24:5: error: 'cin' was not declared in this scope
24 | cin.tie(0);
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 |
a.cc:25:5: error: 'ios' has not been declared
25 | ios::sync_with_stdio(false);
| ^~~
a.cc:27:5: error: 'string' was not declared in this scope
27 | 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 |
a.cc:28:12: error: 's' was not declared in this scope
28 | cin >> s;
| ^
a.cc:40:17: error: 'cout' was not declared in this scope
40 | if(outflag) cout << "no" << endl;
| ^~~~
a.cc:40:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:40:33: error: 'endl' was not declared in this scope
40 | if(outflag) cout << "no" << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 |
a.cc:41:10: error: 'cout' was not declared in this scope
41 | else cout << "yes" << endl;
| ^~~~
a.cc:41:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:41:27: error: 'endl' was not declared in this scope
41 | else cout << "yes" << endl;
| ^~~~
a.cc:41:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s495098042 | p03698 | C++ | #include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int l = s.length();
bool flag = true;
for (int i = 0; i <= l; i++) {
for (j = i + 1; j <= l; j++) {
if (s[i] == s[j]) flag = false;
}
}
if (flag = true) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
} | a.cc: In function 'int main()':
a.cc:32:22: error: 'j' was not declared in this scope
32 | for (j = i + 1; j <= l; j++) {
| ^
|
s367013042 | p03698 | C | #include<stdio.h>
check(char s){
}
int main(){
int len = 0, i;
char s[27];
scanf("%s", s);
while(s[len]){
len++;
}
for (i = 0; i < len; i++){
for (j = i + 1; j < len; j++){
if(s[i] == s[j]){
printf("no\n");
return 0;
}
}
}
printf("yes\n");
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | check(char s){
| ^~~~~
main.c: In function 'main':
main.c:15:10: error: 'j' undeclared (first use in this function)
15 | for (j = i + 1; j < len; j++){
| ^
main.c:15:10: note: each undeclared identifier is reported only once for each function it appears in
|
s603418229 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[27];
int main()
{
string s,i;
cin>>s;
for(i=0;i<s.size();i++)
{
if(a[s[i]-97]>=1)
{
cout<<"no";
return 0;
}
switch(s[i])
{
case'a':a[1]++;
case'b':a[2]++;
case'c':a[3]++;
case'd':a[4]++;
case'e':a[5]++;
case'f':a[6]++;
case'g':a[7]++;
case'h':a[8]++;
case'i':a[9]++;
case'j':a[10]++;
case'k':a[11]++;
case'l':a[12]++;
case'm':a[13]++;
case'n':a[14]++;
case'o':a[15]++;
case'p':a[16]++;
case'q':a[17]++;
case'r':a[18]++;
case's':a[19]++;
case't':a[20]++;
case'u':a[21]++;
case'v':a[22]++;
case'w':a[23]++;
case'x':a[24]++;
case'y':a[25]++;
case'z':a[26]++;
}
}
cout<<"yes";
return 0;
} | a.cc: In function 'int main()':
a.cc:8:11: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
8 | for(i=0;i<s.size();i++)
| ^
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:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
817 | operator=(const basic_string& __str)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
828 | operator=(const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
840 | operator=(_CharT __c)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
858 | operator=(basic_string&& __str)
| ^~~~~~~~
a.cc:8:14: error: no match for 'operator<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
8 | for(i=0;i<s.size();i++)
| ~^~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::size_type {aka long unsigned 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:
/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:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for(i=0;i<s.size();i++)
| ^
/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:8:22: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
8 | for(i=0;i<s.size();i++)
| ^
/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:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for(i=0;i<s.size();i++)
| ^
/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:8:22: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
8 | for(i=0;i<s.size();i++)
| ^
/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:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for(i=0;i<s.size();i++)
| ^
/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:8:22: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
8 | for(i=0;i<s.size();i++)
| ^
/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:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for(i=0;i<s.size();i++)
| ^
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:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
8 | for(i=0;i<s.size();i++)
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | for(i=0;i<s.size();i++)
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | for(i=0;i<s.size();i++)
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | for(i=0;i<s.size();i++)
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | for(i=0;i<s.size();i++)
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47:
/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 |
s469397980 | p03698 | C++ | using namespace std;
int a[30]={};
int main(){
string s;
cin>>s;
int d=s.size();
for(int i=0;i<d;i++){
a[s[i]-97]++;
}
for(int i=0;i<26;i++){
if(a[i]>1){cout<<"no"<<endl;return 0;}
}
cout<<"yes"<<endl;
}
| a.cc: In function 'int main()':
a.cc:4:9: 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 | using namespace std;
a.cc:5:9: 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 | using namespace std;
a.cc:5:14: error: 's' was not declared in this scope
5 | cin>>s;
| ^
a.cc:11:20: error: 'cout' was not declared in this scope
11 | if(a[i]>1){cout<<"no"<<endl;return 0;}
| ^~~~
a.cc:11:20: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:32: error: 'endl' was not declared in this scope
11 | if(a[i]>1){cout<<"no"<<endl;return 0;}
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | using namespace std;
a.cc:13:9: error: 'cout' was not declared in this scope
13 | cout<<"yes"<<endl;
| ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:22: error: 'endl' was not declared in this scope
13 | cout<<"yes"<<endl;
| ^~~~
a.cc:13:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s934883755 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
string s;
cin >> s;
int flg=0;
for(int i=0;i<s.size();++i){
char c = s[i];
for(int j=i+1;j<s.size();++j){
if(s[j]==c) flg=1;
}
}
if(flg==1) cout << "no\n";
else cout << "yes\n"; | a.cc: In function 'int main()':
a.cc:15:24: error: expected '}' at end of input
15 | else cout << "yes\n";
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
s722528241 | p03698 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<string> str;
cin >> str;
int i = 0;
while(str[i] != '\0'){
int j = 0;
while(str[j] != '\0'){
if(str[i] == str[j]){
cout << "no" << endl;
return 0;
}
j++;
}
i++;
}
cout << "yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
7 | cin >> str;
| ~~~ ^~ ~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream: |
s912562372 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s;
t = s;
sort(t.begin(), t.end());
t.erase(unique(t.begin(), t.end()), t.end());
cout << (s.size() == t.size() ? "yes" : "no") << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(t.begin(), t.end());
| ^~~~
| short
a.cc:11:13: error: 'unique' was not declared in this scope
11 | t.erase(unique(t.begin(), t.end()), t.end());
| ^~~~~~
|
s748553659 | p03698 | C++ | #include<bits/stdc++.h>
#include<string>
using namespace std;
int main(){
string s; cin >> s;
int n = s.size();
string ans = "yes"
for(int i = 0; i < n; i++){
for(int j=i+1; j < n; j++){
if(s[i] == s[j]) ans = "no";
}
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i = 0; i < n; i++){
| ^~~
a.cc:8:18: error: 'i' was not declared in this scope
8 | for(int i = 0; i < n; i++){
| ^
|
s851912691 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
string s; cin >> s;
int n = s.size();
for(int i = 0; i < n; i++){
for(int j=i+1; j < n; j++){
if(s[i] == s[j]) cout << "yes" << ensl;
else cout << "no" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:10:41: error: 'ensl' was not declared in this scope
10 | if(s[i] == s[j]) cout << "yes" << ensl;
| ^~~~
|
s720599024 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
char s; cin >> s;
int sizea = s.size();
set<char> valu;
for(int i = 0; i < sizea; i++){
valu.insert(s[i]);
}
if(valu.size() == sizea) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: request for member 'size' in 's', which is of non-class type 'char'
7 | int sizea = s.size();
| ^~~~
a.cc:10:18: error: invalid types 'char[int]' for array subscript
10 | valu.insert(s[i]);
| ^
|
s903773016 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
char s1; cin >> s1;
int size1 = size(s1);
set<char> valu;
for(int i = 0; i < size1; i++){
valu.insert(s1[i]);
}
if(valu.size() == size1) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:7:19: error: no matching function for call to 'size(char&)'
7 | int size1 = size(s1);
| ~~~~^~~~
In file included from /usr/include/c++/14/string:53,
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/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&) [with _Container = char]':
a.cc:7:19: required from here
7 | int size1 = size(s1);
| ~~~~^~~~
/usr/include/c++/14/bits/range_access.h:263:24: error: request for member 'size' in '__cont', which is of non-class type 'const char'
263 | -> decltype(__cont.size())
| ~~~~~~~^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: template argument deduction/substitution failed:
a.cc:7:19: note: mismatched types 'const _Tp [_Nm]' and 'char'
7 | int size1 = size(s1);
| ~~~~^~~~
a.cc:10:19: error: invalid types 'char[int]' for array subscript
10 | valu.insert(s1[i]);
| ^
|
s834451550 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
char s1; cin >> s1;
int size1 = size(s1);
set<char> valu;
for(int i = 0; i < size1; i++){
valu.insert(s1[i]);
}
if(valu.size() == size1) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:7:19: error: no matching function for call to 'size(char&)'
7 | int size1 = size(s1);
| ~~~~^~~~
In file included from /usr/include/c++/14/string:53,
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/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&) [with _Container = char]':
a.cc:7:19: required from here
7 | int size1 = size(s1);
| ~~~~^~~~
/usr/include/c++/14/bits/range_access.h:263:24: error: request for member 'size' in '__cont', which is of non-class type 'const char'
263 | -> decltype(__cont.size())
| ~~~~~~~^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: template argument deduction/substitution failed:
a.cc:7:19: note: mismatched types 'const _Tp [_Nm]' and 'char'
7 | int size1 = size(s1);
| ~~~~^~~~
a.cc:10:19: error: invalid types 'char[int]' for array subscript
10 | valu.insert(s1[i]);
| ^
|
s699794928 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
char s1; cin >> s1;
int size1 = s1.size();
set<char> valu;
for(int i = 0; i < size1; i++){
valu.insert(s1[i]);
}
if(valu.size() == size1) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:7:18: error: request for member 'size' in 's1', which is of non-class type 'char'
7 | int size1 = s1.size();
| ^~~~
a.cc:10:19: error: invalid types 'char[int]' for array subscript
10 | valu.insert(s1[i]);
| ^
|
s892250689 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
char s; cin >> s;
int size1 = s.size();
set<char> valu;
for(int i = 0; i < size1; i++){
valu.insert(s[i]);
}
if(valu.size() == size1) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: request for member 'size' in 's', which is of non-class type 'char'
7 | int size1 = s.size();
| ^~~~
a.cc:10:18: error: invalid types 'char[int]' for array subscript
10 | valu.insert(s[i]);
| ^
|
s137217498 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
string s; cin >> s;
int size1 = s.size();
set<string> valu;
for(int i = 0; i < size1; i++){
valu.insert(s[i]);
}
if(valu.size() == size1) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'std::set<std::__cxx11::basic_string<char> >::insert(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
10 | valu.insert(s[i]);
| ~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/set:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:568:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::rebind<std::__cxx11::basic_string<char> >; typename _Alloc::value_type = std::__cxx11::basic_string<char>; value_type = std::__cxx11::basic_string<char>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:511:32: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::set<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::rebind<std::__cxx11::basic_string<char> >; typename _Alloc::value_type = std::__cxx11::basic_string<char>; value_type = std::__cxx11::basic_string<char>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:520:27: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::set<std::__cxx11::basic_string<char> >::value_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; value_type = std::__cxx11::basic_string<char>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; value_type = std::__cxx11::basic_string<char>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:580:43: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::initializer_list<std::__cxx11::basic_string<char> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; insert_return_type = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::insert_return_type; node_type = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:600:26: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::set<std::__cxx11::basic_string<char> >::node_type&&' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::node_type&&'}
600 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_set.h:605:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; node_type = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::node_type]'
605 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:605:7: note: candidate expects 2 arguments, 1 provided
|
s058030693 | p03698 | C++ | #include<bits/stdc++.h>
#include<set>
#include<string>
using namespace std;
int main(){
string s; cin >> s;
int size1 = s.size();
set<string> valu;
for(int i = 0; i < size1; i++){
valu.insert(valu[i]);
}
if(valu.size() == size1) cout << "Yes" << endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:10:21: error: no match for 'operator[]' (operand types are 'std::set<std::__cxx11::basic_string<char> >' and 'int')
10 | valu.insert(valu[i]);
| ^
|
s709349356 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
//cin.tie(0);
//ios::sync_with_stdio(false);
string a;
cin >> a;
int flag = 0;
for(int i = 0;i < a.size();++i){
for(int j = 0;j < a.size();++j){
if(a[i] == a[j]{
flag = 1;
}
}
}
if(flag == 1){
cout << "no" << endl;
}else{
cout << "yes" << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:28: error: expected ')' before '{' token
11 | if(a[i] == a[j]{
| ~ ^
| )
a.cc:14:9: error: expected primary-expression before '}' token
14 | }
| ^
|
s656170168 | p03698 | C++ | #include<cstdio>
#include<string.h>
using namespace std;
bool isUnique3(string s)
{
int check = 0;
int len =s.length();
for(int i = 0;i < len; i++)
{
int v = s[i]-'a';
if (check & (1<<v))
{
return no;
}
check l = (1<<v);}
return yes;}
int main(){
string sl;
while(cin>>s1){
cout<<isUnique1(s1)<<endl;
cout<<isUnique2(s2)<<endl;
cout<<isUnique3(s3)<<endl;
}
return 0;}
| a.cc:4:16: error: 'string' was not declared in this scope
4 | bool isUnique3(string s)
| ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
2 | #include<string.h>
+++ |+#include <string>
3 | using namespace std;
a.cc: In function 'int main()':
a.cc:20:9: error: 'string' was not declared in this scope
20 | string sl;
| ^~~~~~
a.cc:20:9: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:21:15: error: 'cin' was not declared in this scope
21 | while(cin>>s1){
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<string.h>
+++ |+#include <iostream>
3 | using namespace std;
a.cc:21:20: error: 's1' was not declared in this scope
21 | while(cin>>s1){
| ^~
a.cc:22:17: error: 'cout' was not declared in this scope
22 | cout<<isUnique1(s1)<<endl;
| ^~~~
a.cc:22:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:23: error: 'isUnique1' was not declared in this scope; did you mean 'isUnique3'?
22 | cout<<isUnique1(s1)<<endl;
| ^~~~~~~~~
| isUnique3
a.cc:22:38: error: 'endl' was not declared in this scope
22 | cout<<isUnique1(s1)<<endl;
| ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
2 | #include<string.h>
+++ |+#include <ostream>
3 | using namespace std;
a.cc:23:33: error: 's2' was not declared in this scope
23 | cout<<isUnique2(s2)<<endl;
| ^~
a.cc:23:23: error: 'isUnique2' was not declared in this scope; did you mean 'isUnique3'?
23 | cout<<isUnique2(s2)<<endl;
| ^~~~~~~~~
| isUnique3
a.cc:24:33: error: 's3' was not declared in this scope
24 | cout<<isUnique3(s3)<<endl;
| ^~
a.cc:24:35: error: 'isUnique3' cannot be used as a function
24 | cout<<isUnique3(s3)<<endl;
| ^
|
s814800497 | p03698 | C++ | #include<cstdio>
#include<string.h>
using namespace std;
bool isUnique3(string s)
{
int check = 0;
int len =s.length();
for(int i = 0;i < len; i++)
{
int v = s[i]-'a';
if (check & (1<<v))
{
return no;
}
check l = (1<<v);}
return yes;}
int main(){
string sl;
while(cin>>s1){
cout<<isUnique1(s1)<<endl;
cout<<isU#include<cstdio>
int main(){
int a,b;
scanf("%d%d",&a,&b);
if(a+b<10){printf("%d\n",a+b);}
else {printf("error\n");}
return 0;
}nique2(s2)<<endl;
cout<<isUnique3(s3)<<endl;
}
return 0;}
| a.cc:23:26: error: stray '#' in program
23 | cout<<isU#include<cstdio>
| ^
a.cc:4:16: error: 'string' was not declared in this scope
4 | bool isUnique3(string s)
| ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
2 | #include<string.h>
+++ |+#include <string>
3 | using namespace std;
a.cc: In function 'int main()':
a.cc:20:9: error: 'string' was not declared in this scope
20 | string sl;
| ^~~~~~
a.cc:20:9: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:21:15: error: 'cin' was not declared in this scope
21 | while(cin>>s1){
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<string.h>
+++ |+#include <iostream>
3 | using namespace std;
a.cc:21:20: error: 's1' was not declared in this scope
21 | while(cin>>s1){
| ^~
a.cc:22:17: error: 'cout' was not declared in this scope
22 | cout<<isUnique1(s1)<<endl;
| ^~~~
a.cc:22:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:23: error: 'isUnique1' was not declared in this scope; did you mean 'isUnique3'?
22 | cout<<isUnique1(s1)<<endl;
| ^~~~~~~~~
| isUnique3
a.cc:22:38: error: 'endl' was not declared in this scope
22 | cout<<isUnique1(s1)<<endl;
| ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
2 | #include<string.h>
+++ |+#include <ostream>
3 | using namespace std;
a.cc:23:23: error: 'isU' was not declared in this scope
23 | cout<<isU#include<cstdio>
| ^~~
a.cc:30:17: error: 's2' was not declared in this scope
30 | }nique2(s2)<<endl;
| ^~
a.cc:30:10: error: 'nique2' was not declared in this scope
30 | }nique2(s2)<<endl;
| ^~~~~~
a.cc:31:33: error: 's3' was not declared in this scope
31 | cout<<isUnique3(s3)<<endl;
| ^~
a.cc:31:35: error: 'isUnique3' cannot be used as a function
31 | cout<<isUnique3(s3)<<endl;
| ^
|
s158614780 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string n;
cin>>n;
bool p = 1;
for(int k = 0;k<n.size(),k++){
for(int i = 0;k<k;i++){
if(n.at(k) == n.at(i)){
p = 0;
}
}
}
if(p == 1){
cout << "yes" << endl;
}
else{
cout << "no" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:31: error: expected ';' before ')' token
7 | for(int k = 0;k<n.size(),k++){
| ^
| ;
|
s737504786 | p03698 | C++ | #include <algorithm> #include <iostream> using namespace std;
int main(){
string S;
cin >> S;
int N = S.size();
string ans = "yes";
for(int i = 0; i < N; ++i){
for(int j = i + 1; j < N; ++j){
if(S[i] == S[j]){
ans = "no"; }
} }
cout << ans << endl;
} | a.cc:1:22: warning: extra tokens at end of #include directive
1 | #include <algorithm> #include <iostream> using namespace std;
| ^
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
3 | string S;
| ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin >> S;
| ^~~
a.cc:4:12: error: 'S' was not declared in this scope
4 | cin >> S;
| ^
a.cc:6:11: error: expected ';' before 'ans'
6 | string ans = "yes";
| ^~~~
| ;
a.cc:10:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans = "no"; }
| ^~~
| abs
a.cc:12:5: error: 'cout' was not declared in this scope
12 | cout << ans << endl;
| ^~~~
a.cc:12:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | cout << ans << endl;
| ^~~
| abs
a.cc:12:20: error: 'endl' was not declared in this scope
12 | cout << ans << endl;
| ^~~~
|
s841323741 | p03698 | C | #include<stdio.h>
#include<string.h>
char str[27];
int main(void) {
int i, j;
int len;
char tmp;
gets_s(str, 30);
len = strlen(str) - 1;//lenは改行文字を含まない文字長//
//文字列をアルファベット順にソート//
for (i = 0; i < len - 1; i++) {
for (j = i + 1; j < len ; j++) {
if (str[i] > str[j]) {
tmp = str[i];
str[i] = str[j];
str[j] = tmp;
}
}
}
for (i = 0; i < len; i++) {
if (str[i] == str[i + 1]) {
printf("no\n");
return 0;
}
}
printf("yes\n");
return 0;
} | main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
12 | gets_s(str, 30);
| ^~~~~~
|
s491988675 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int N=s.size()
string ans="yes";
for(int i=0;i<N;++i){
for(int j=i+1;j<N;++j){
if(s[i]==s[j]){
ans="no";
}
}
}
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'string'
10 | string ans="yes";
| ^~~~~~
a.cc:15:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | ans="no";
| ^~~
| abs
a.cc:20:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
20 | cout<<ans<<endl;
| ^~~
| abs
|
s473270441 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int N=s.size()
string ans="yes";
for(int i=0;i<N;++i){
for(int j=i+1;j<N;++j){
if(s[i]==s[j])
ans="no";
}
}
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'string'
10 | string ans="yes";
| ^~~~~~
a.cc:15:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | ans="no";
| ^~~
| abs
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
19 | cout<<ans<<endl;
| ^~~
| abs
|
s875001382 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MD 1000000007
typedef long long int ll;
int main(){
string s;
cin>>s;
for(int i=0;i<s.length();i++){
for(int j=i+1;j<s.length();j++){
if(s[i]==s[j]){
cout<<"no"<<endl;
return 0;
}
}
cout<<"yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s251442027 | p03698 | C++ | #include <iostream>
#include <string>
int main() {
std::string S;
std::sin >> S;
std::string ret = "yes";
int size = S.length();
for (int i = 0; i < size; ++i) {
for (int j = i + 1; j < size; ++j) {
if ( S[i] != S[j] ) continue;
ret = "no";
}
}
std::cout << ret << std::endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:8: error: 'sin' is not a member of 'std'; did you mean 'min'?
6 | std::sin >> S;
| ^~~
| min
|
s056925969 | p03698 | C++ | #include <iostream>
#include <vector>
#include <array>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>
#include <cassert>
#pragma GCC optimize("O3")
#pragma comment(linker, "STACK:36777216")
using namespace std;
using i64 = int64_t;
constexpr i64 MOD = 1e9 + 7;
using vi = vector<i64>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
int main() {
string s;
cin >> s;
string t(s);
sort(s.begin(), s.end());
sort(t.begin(), t.end());
erase(unique(t.begin(), t.end()), t.end());
cout << (s == t ? "yes" : "no") << endl;
}
| a.cc: In function 'int main()':
a.cc:26:5: error: 'erase' was not declared in this scope
26 | erase(unique(t.begin(), t.end()), t.end());
| ^~~~~
|
s423486891 | p03698 | C++ | /* goes here */
#include<bits/stdc++.h> // 1
using namespace std; // 2
using int = long long ; //3
#define yes(n) cout << ((n) ? "yes" : "no" ) << endl // 4
long long alphabet[1000]; // 1
int main(){ // 2
string s; //3
cin >> s; // 4
for(char i : s){ // 1
alphabet[i-'a']++; // 2
} //3
for(int i = 0; i < 1000; ++i){ // 4
if(alphabet[i] > 1)return 0 & puts("no"); // 1
} // 2
yes(1333); //3
return 0; // 4
} // 1 end | a.cc:4:7: error: expected nested-name-specifier before 'int'
4 | using int = long long ; //3
| ^~~
|
s320004816 | p03698 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int a[26], i, j;
char c;
bool ans = true;
string s;
cin >> s;
for(i = 0; i < 26; i++) a[i] = 0;
for(i = 0; i < s.length(); i++){
for(c ='a', j = 0; c <= 'z'; c++, j++){
if(c == s[i]) a[j]++;
}
}
for(i = 0; i < 26; i++)
if(a[i] > 1) ans = false;
if(ans) cout << "yes" << endl;
else cout << "no" << emdl;
}
| a.cc: In function 'int main()':
a.cc:20:24: error: 'emdl' was not declared in this scope
20 | else cout << "no" << emdl;
| ^~~~
|
s419752136 | p03698 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
char s[32];
cin >> s;
int len = strlen(s);
for (int i = 0; i < len-1; i++) {
for (int j = i+1; j < len; j++) {
if (s[i] == s[j]) {
cout << "no" << endl;
return 0;
}
}
}
cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:10:19: error: 'strlen' was not declared in this scope
10 | int len = strlen(s);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cstring>
4 | using namespace std;
|
s030153994 | p03698 | C | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <map>
#include <cstring>
using namespace std;
int main()
{
int b[200]= {0};
char s[30];
int t=1,i;
cin >> s;
for(i=0; i<strlen(s); i++)
{
b[s[i]-'a']++;
}
for(i=0;i<26;i++)
if(b[i]>=1)
t=0;
if(t)
printf("Yes\n");
else
printf("No\n");
return 0;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s827545449 | p03698 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 1000000000
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
string S;
string ans = "Yes";
cin >> S;
for(int i=0;i<S.size()-1;i++){
for(int j=i+1;j<S.size();j++0){
if(S[i] == S[j]) ans = "No";
}
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:27:33: error: expected ')' before numeric constant
27 | for(int j=i+1;j<S.size();j++0){
| ~ ^
| )
a.cc:27:34: error: expected ';' before ')' token
27 | for(int j=i+1;j<S.size();j++0){
| ^
| ;
|
s019574414 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int a[26];
int main() {
string s;
cin >> s;
for (char c: s) {
a[c - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (a[i] >= 2) {
cout << "no" << endl; return;
}
}
cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:15:29: error: return-statement with no value, in function returning 'int' [-fpermissive]
15 | cout << "no" << endl; return;
| ^~~~~~
|
s777872459 | p03698 | C++ | #include <iostream>
#include <string>
int a[26];
int main() {
string s;
cin >> s;
for (char c: s) {
a[c - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (a[i] >= 2) {
cout << "no" << endl; return;
}
}
cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
7 | string s;
| ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> s;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:10: error: 's' was not declared in this scope
8 | cin >> s;
| ^
a.cc:14:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout << "no" << endl; return;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout << "no" << endl; return;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:14:29: error: return-statement with no value, in function returning 'int' [-fpermissive]
14 | cout << "no" << endl; return;
| ^~~~~~
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << "yes" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:17:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << "yes" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s820668278 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rp(i,n) for(int i=0;i<n;i++)
#define rep(i,m,n) for(int i=m;i<=n;i++)
#define lrp(i,n) for(long long i=0;i<n;i++)
#define lrep(i,m,n) for(long long i=m;i<=n;i++)
#define ll long long
#define sort(a) sort(a.begin(),a.end())
#define reverse(a) reverse(a.begin(),a.end())
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
#define abs(a,b) (a-b>0?a-b:b-a)
#define size size()
int main(){
string s;
sort(s);
rp(i,s.size()-1){
if(s.at(i)==s.at(i+1)){
cout << "no" << endl;
goto Exit;
}
}
cout << "yes" << endl;
Exit:
;
}
| a.cc: In function 'int main()':
a.cc:19:16: error: expression cannot be used as a function
19 | rp(i,s.size()-1){
| ~~~~~~^~
a.cc:3:31: note: in definition of macro 'rp'
3 | #define rp(i,n) for(int i=0;i<n;i++)
| ^
|
s847819613 | p03698 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string s; cin >> s;
vector<char> sv;
int s_len = s.length();
for (char x : s) sv.push_back(x);
// uniqueで同じ要素を削除する
sv.erase(unique(sv.begin(), sv.end()), sv.end());
if (sv.size() == s_len) cout << "yes" << endl;
else cout << "no" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:16:12: error: 'unique' was not declared in this scope
16 | sv.erase(unique(sv.begin(), sv.end()), sv.end());
| ^~~~~~
|
s957056261 | p03698 | C++ | #include <iostream>
#include <algorithm>
----
int main(void) {
std::string s;
std::cin >> s;
--
std::sort(s.begin(), s.end());
std::cout << s << std::endl;
--
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == s[i+1]) {
std::cout << "no" << std::endl;
return 0;
}
}
std::cout << "yes" << std::endl;
return 0;
} | a.cc:3:1: error: expected unqualified-id before '--' token
3 | ----
| ^~
|
s282304352 | p03698 | C++ | #include <iostream>
#include <argorithm>
int main(void) {
std::string s;
std::cin >> s;
std::sort(s.begin(), s.end());
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == s[i+1]) {
std::cout << "no" << std::endl;
return 0;
}
}
std::cout << "no" << std::endl;
return 0;
} | a.cc:2:10: fatal error: argorithm: No such file or directory
2 | #include <argorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s354736610 | p03698 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;
public class Main {
int[] inputArray;
public static void main(String[] args) throws IOException {
new Main().run();
}
void run() {
Scanner sc = new Scanner(System.in);
char[] array = sc.next().toCharArray();
Set<String> set = new HashSet<>();
for(int i=0; i<array.length; i++){
set.add(array[i]);
}
if(set.size() == array.length) System.out.println("yes");
else System.out.println("no");
}
}
| Main.java:22: error: incompatible types: char cannot be converted to String
set.add(array[i]);
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
|
s376806581 | p03698 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;
public class Main {
int[] inputArray;
public static void main(String[] args) throws IOException {
new Main().run();
}
void run() {
Scanner sc = new Scanner(System.in);
char[] array = sc.next().toCharArray();
Set<String> set = new HashSet<>();
for(int i=0; i<n; i++){
set.add(array[i]);
}
if(set.size() == array.length) System.out.println("yes");
else System.out.println("no");
}
}
| Main.java:21: error: cannot find symbol
for(int i=0; i<n; i++){
^
symbol: variable n
location: class Main
Main.java:22: error: incompatible types: char cannot be converted to String
set.add(array[i]);
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
|
s610395462 | p03698 | C++ | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
int main(void){
string s;
cin >> s;
sort(s.begin(), s.end());
for(int i=0;i<s.length()-1;i++){
if(s.at(i) == s.at(i+1)){
cout << "no" << endl;
return 0;
break;
}
}
cout << "yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
11 | sort(s.begin(), s.end());
| ^~~~
| short
|
s239806943 | p03698 | C++ | #include<iostream>
typedef long long ll;
ll Isprime(ll x) {
ll i;
if (x < 2)return 0;
else if (x == 2) return 1;
if (x % 2 == 0) return 0;
for (i = 3; i*i <= x; i += 2) {
if (x%i == 0) return 0;
}
return 1;
}
using namespace std;
int main() {
string S;
cin>>S;
string x="yes";
for(ll i=0; i<S.size(); ++i){
for(ll j=i+1; j<S.size(); ++j){
if(S[i]==S[j])
x="no"
}
}
cout<<x<<endl;
}
| a.cc: In function 'int main()':
a.cc:21:17: error: expected ';' before '}' token
21 | x="no"
| ^
| ;
22 | }
| ~
|
s027989066 | p03698 | Java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
String Sarray[] = S.split("");
String afromZ = "abcdefghijklnmopqrstuvwxyz";
String afromZ_Array[] = afromZ.split("");
Arrays.sort(Sarray);
// for (String string : afromZ_Array) {
// System.out.println(string);
// }
int iti = 0;
int count = 0;
for(int abc = 0;i < afromZ_Array.length;abc++){
for(int i = 0;i < Sarray.length;i++){
if(afromZ_Array[abc].equals(Sarray[i])){
iti += 1;
if(iti == 2){
System.out.println("No");
System.exit(1);
}
}
}
}
System.out.println("yes");
}
} | Main.java:17: error: cannot find symbol
for(int abc = 0;i < afromZ_Array.length;abc++){
^
symbol: variable i
location: class Main
1 error
|
s264219245 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
L = S.size();
N = 0;
for (int i = 0; i <= L - 1; i++) {
for (int j = i + 1; j <= L - 1; j++) {
if(S.at(i) == S.at(j))
N ++;
}
}
if(N == 0) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'L' was not declared in this scope
7 | L = S.size();
| ^
a.cc:8:3: error: 'N' was not declared in this scope
8 | N = 0;
| ^
|
s776640553 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S >> X;
L = S.size();
N = 0;
for (int i = 0; i <= L - 1; i++) {
for (int j = i + 1; j <= L - 1; j++) {
if(S.at(i) == S.at(j))
N ++;
}
}
if(N == 0) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:6:15: error: 'X' was not declared in this scope
6 | cin >> S >> X;
| ^
a.cc:7:3: error: 'L' was not declared in this scope
7 | L = S.size();
| ^
a.cc:8:3: error: 'N' was not declared in this scope
8 | N = 0;
| ^
|
s170493009 | p03698 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s;
cin >> s;
string tmp = s;
tmp.erase(unique(tmp.begin(), tmp.end()), tmp.end());
if(s.size() == tmp.size()) cout << "yes" << endl;
else cout << "no" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:15: error: 'unique' was not declared in this scope
9 | tmp.erase(unique(tmp.begin(), tmp.end()), tmp.end());
| ^~~~~~
|
s927844997 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pub push_back
#define pob pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define repp(i,a,b) for(int i=a;i<b;i++)
#define repm(i,a,b) for(int i=a;i>b;i--)
#define debug_interval endl
#define dump_interval ' '
#define debug_toggle 0
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
inline int gcd(int a,int b){return a?gcd(b%a,a):b;} //Don't use C++17
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cout<<endl;}
template<class...A> inline void debug_rest() {cout<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cout<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cout<<first,debug_rest(rest...);}
string s;
char m;
main(){
ios::sync_with_stdio(false);
cin>>s;
sort(all(s));
m=s.front();
for(int i=1;i<s.size();i++){
if(m==s[i])dump("no"),return 0;
}
dump("Yes"); | a.cc:31:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
31 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:37:31: error: expected primary-expression before 'return'
37 | if(m==s[i])dump("no"),return 0;
| ^~~~~~
a.cc:39:17: error: expected '}' at end of input
39 | dump("Yes");
| ^
a.cc:31:7: note: to match this '{'
31 | main(){
| ^
|
s117750772 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pub push_back
#define pob pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define repp(i,a,b) for(int i=a;i<b;i++)
#define repm(i,a,b) for(int i=a;i>b;i--)
#define debug_interval endl
#define dump_interval ' '
#define debug_toggle 0
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
inline int gcd(int a,int b){return a?gcd(b%a,a):b;} //Don't use C++17
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cout<<endl;}
template<class...A> inline void debug_rest() {cout<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cout<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cout<<first,debug_rest(rest...);}
string s;
char m;
main(){
ios::sync_with_stdio(false);
cin>>s;
sort(all(s));
m=s.front();
for(int i=1;i<n;i++){
if(m==s[i])dump("no"),return 0;
}
dump("Yes");
}
| a.cc:31:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
31 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:36:19: error: 'n' was not declared in this scope
36 | for(int i=1;i<n;i++){
| ^
a.cc:37:31: error: expected primary-expression before 'return'
37 | if(m==s[i])dump("no"),return 0;
| ^~~~~~
|
s924426894 | p03698 | C++ | #include <iostream>
using namespace std;
int main() {
string S;
bool t=false;
cin >> S;
for (int i =0 ; i < S.size() ; ++i ){
for (int j = i+1; j<S.size() ; ++j){
if (S[i] == S[j]){
t=true;
}
}
}
if (t) {
cout << "yes" << endl;}
else {
cout << "no" << endl;
}
}
}
| a.cc:22:1: error: expected declaration before '}' token
22 | }
| ^
|
s331058619 | p03698 | C++ | #include <iostream>
using namespace std;
int main() {
string S;
bool t=false;
cin >> S;
for (int i =0 ; i < S.size() ; ++i ){
for (int j = i+1; j<S.size() ; ++j){
if (S[i] == S[j]){
t=true;
}
}
}
if (t) {
cout << "yes" << endl;
else {
cout << "no" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:18:3: error: expected '}' before 'else'
18 | else {
| ^~~~
a.cc:16:10: note: to match this '{'
16 | if (t) {
| ^
a.cc: At global scope:
a.cc:22:1: error: expected declaration before '}' token
22 | }
| ^
|
s560918911 | p03698 | C++ | #include <iostream>
using namespace std;
int main() {
string S;
bool t=false;
cin >> S;
for (int i =0 ; i < S.size() ; ++i ){
for (int j = i+1; j<S.size() ; ++j){
if (S[i] == S[j]){
t=true;
}
}
}
if (t) {
cout >> "yes" >> endl;
else {
cout >> "no" >> endl;
}
}
} | a.cc: In function 'int main()':
a.cc:17:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
17 | cout >> "yes" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
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/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:17:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
17 | cout >> "yes" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:17:11: required from here
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:18:3: error: expected '}' before 'else'
18 | else {
| ^~~~
a.cc:16:10: note: to match this '{'
16 | if (t) {
| ^
a.cc:19:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
19 | cout >> "no" >> endl;
| ~~~~ ^~ ~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:19:4: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| |
s059107211 | p03698 | C++ | #include <iostream>
using namespace std;
int main() {
string S;
boolean t=false;
cin >> S;
for (int i =0 ; i < S.size() ; ++i ){
for (int j = i+1; j<S.size() ; ++j){
if (S[i] == S[j]){
t=true;
}
}
}
if (t) {
cout >> "yes" >> endl;
else {
cout >> "no" >> endl;
}
}
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'boolean' was not declared in this scope; did you mean 'bool'?
6 | boolean t=false;
| ^~~~~~~
| bool
a.cc:12:9: error: 't' was not declared in this scope
12 | t=true;
| ^
a.cc:16:7: error: 't' was not declared in this scope
16 | if (t) {
| ^
a.cc:17:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
17 | cout >> "yes" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
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/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:17:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
17 | cout >> "yes" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:17:11: required from here
17 | cout >> "yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:18:3: error: expected '}' before 'else'
18 | else {
| ^~~~
a.cc:16:10: note: to match this '{'
16 | if (t) {
| ^
a.cc:19:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
19 | cout >> "no" >> endl;
| ~~~~ ^~ ~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:19:4: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout >> "no" >> endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:19:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
|
s643383169 | p03698 | C++ | #include <iostream>
using namespace std;
int main() {
string S;
cin >> S;
| a.cc: In function 'int main()':
a.cc:6:12: error: expected '}' at end of input
6 | cin >> S;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s562800383 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin>>s;
int a=0;
std::vector<int> v(26,0);
for(int i=0;i<s.size()<;i++)v[(int)s[i]-97]++;
for(int i=0;i<26;i++)if(v[i]>1)a=1;
if(a)cout<<"no"<<endl;
else cout<<"yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:26: error: expected primary-expression before ';' token
9 | for(int i=0;i<s.size()<;i++)v[(int)s[i]-97]++;
| ^
|
s822993956 | p03698 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#define REP(i,N) for(int i = 0; i < (N); i++)
using namespace std;
string s;
bool ck[26];
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
cin >> s;
REP(i,26) ck[i] = true;
REP(i,s.sized()){
int index = (int)s[i] % 26;
if(ck[index]){
ck[index] = false;
}
else{
cout << "no" << "\n";
return 1;
}
}
cout << "yes" << "\n";
return 1;
} | a.cc: In function 'int main()':
a.cc:19:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sized'; did you mean 'size'?
19 | REP(i,s.sized()){
| ^~~~~
a.cc:4:38: note: in definition of macro 'REP'
4 | #define REP(i,N) for(int i = 0; i < (N); i++)
| ^
|
s206926511 | p03698 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
int N,x[110],y[110],i,j,k;
string str;
cin >> str;
for(i = 0; i<str.length; i++){
for(j = i + 1; j < str.length; j++){
if(str[i] == str[j]){
cout << "no" << endl;
return 0;
}
}
}
cout << "yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:22: 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 '()' ?)
14 | for(i = 0; i<str.length; i++){
| ~~~~^~~~~~
| ()
a.cc:15:32: 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 '()' ?)
15 | for(j = i + 1; j < str.length; j++){
| ~~~~^~~~~~
| ()
|
s466561591 | p03698 | Java | import java.util.*;
public class B63 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String c = sc.next();
boolean a = false;
out:for(int i = 0;i < c.length();i++) {
for(int k = i+1;k < c.length();k++) {
if(c.charAt(i)==c.charAt(k)) {
System.out.println("no");
a = true;
break out;
}
}
}
if(a == false)System.out.println("yes");
}
}
| Main.java:2: error: class B63 is public, should be declared in a file named B63.java
public class B63 {
^
1 error
|
s521397437 | p03698 | Java | import java.util.*;
public class B63 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String c = sc.next();
boolean a = false;
out:for(int i = 0;i < c.length();i++) {
for(int k = i+1;k < c.length();k++) {
if(c.charAt(i)==c.charAt(k)) {
System.out.println("no");
a = true;
break out;
}
}
}
if(a == false)System.out.println("yes");
}
}
| Main.java:2: error: class B63 is public, should be declared in a file named B63.java
public class B63 {
^
1 error
|
s278800948 | p03698 | C++ | #include <stdio.h>
#include <algorithm>
int main()
{
char a[27];
int size=0;
scanf("%s",a);
for(int i=0;a[i]=='\0';++i)size++;
sort(a,a+size);
for(int i=-1;++i-size-1;)if(a[i]==a[i+1]){
printf("no\n");
return 0;
}
printf("yes\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
9 | sort(a,a+size);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
|
s534882671 | p03698 | C++ | #include <stdio.h>
#include <algolithm>
int main()
{
char a[27];
int size=0;
scanf("%s",a);
for(int i=0;a[i]=='\0';++i)size++;
sort(a,a+size);
for(int i=-1;++i-size-1;)if(a[i]==a[i+1]){
printf("no\n");
return 0;
}
printf("yes\n");
return 0;
} | a.cc:2:10: fatal error: algolithm: No such file or directory
2 | #include <algolithm>
| ^~~~~~~~~~~
compilation terminated.
|
s690558869 | p03698 | C++ | #include <iostream>
#include <alforithm>
using namespace std;
int main(){
char S[26];
int i=0;
while(cin>>S[i++]);
sort(S,S+i);
bool ans=true;
for(int j=0; j<i; j++){
if(S[j]==S[j+1])ans=false;
}
if(ans)cout<<"yes\n";
else cout<<"no\n";
return 0;
}
| a.cc:2:10: fatal error: alforithm: No such file or directory
2 | #include <alforithm>
| ^~~~~~~~~~~
compilation terminated.
|
s566266758 | p03698 | C++ | #include <iostream>
#include <string>
#include <string.h>
#include <map>
#include <set>
#include <vector>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
string a;
cin>>a;
char b;
int c=0;
for(int i=0;i<a.size();i++)
{
for(int j=0;j<.size();j++)
if(a[i]!=c[j]){
c[j]=a[i];
c++;
break;}}
if(c!=a.size())
cout<<"no";
else
cout<<"yes";
system("pause");
return 0;
} | a.cc: In function 'int main()':
a.cc:21:15: error: expected primary-expression before '.' token
21 | for(int j=0;j<.size();j++)
| ^
a.cc:22:11: error: invalid types 'int[int]' for array subscript
22 | if(a[i]!=c[j]){
| ^
a.cc:23:2: error: invalid types 'int[int]' for array subscript
23 | c[j]=a[i];
| ^
|
s314469602 | p03698 | C++ | S = input()
if len(S) == len(set(S)):
print("yes")
else:
print("no") | a.cc:1:1: error: 'S' does not name a type
1 | S = input()
| ^
|
s043589525 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string str;
int s;
cin >> str;
s = (int)(str.size());
for(int i = 0; i < s-1; i++){
for(int j = i+1; i < s; j++){
if(size[i] == size[j]){
printf("no\n");
return 0;
}
}
}
printf("yes\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:16:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
16 | if(size[i] == size[j]){
| ^
a.cc:16:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
16 | if(size[i] == size[j]){
| ^
|
s027514598 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string str;
cin >> str;
for(int i = 0; i < str.size()-1; i++){
for(int j = i+1; i < str.size(); j++){
if(size[i] == size[j]){
printf("no\n");
return 0;
}
}
}
printf("yes\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:13:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
13 | if(size[i] == size[j]){
| ^
a.cc:13:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
13 | if(size[i] == size[j]){
| ^
|
s897936754 | p03698 | C++ | #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>
#include <ctype.h>
//#include<bits/stdc++.h>
using namespace std;
int main() {
string p;
cin >> p;
for (int i = 0; i < p.size(); i++) {
for (int j = i + 1; j < p.size(); j++) {
if (p[i] == j[i]) {
cout << "no" << endl;
return 0;
}
}
}
cout << "yes" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:32:38: error: invalid types 'int[int]' for array subscript
32 | if (p[i] == j[i]) {
| ^
|
s807651907 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
set<char> sc;
for (auto c : s) sc.insert(c);
puts(a.size() == b.size() ? "yes" : "no");
} | a.cc: In function 'int main()':
a.cc:10:14: error: 'a' was not declared in this scope
10 | puts(a.size() == b.size() ? "yes" : "no");
| ^
a.cc:10:26: error: 'b' was not declared in this scope
10 | puts(a.size() == b.size() ? "yes" : "no");
| ^
|
s679555616 | p03698 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;
const double PI = acos(-1.0);
const string ALP = "abcdefghijklmnopqrstuvwxyz";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int main(){
string s;
vector<bool> v(26);
cin >> s;
REP(i,26){
v[i] = false
}
REP(i,s.length()){
if(v[i]){
cout << "no";
break;
}
v[ALP.find(s[i])] = true;
if(i== s.length()-1){
cout << "yes";
break;
}
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:18:17: error: expected ';' before '}' token
18 | v[i] = false
| ^
| ;
19 | }
| ~
|
s895199397 | p03698 | C++ | int main() {
char S[32];
scanf("%s", S);
int count['z'+1]={};
for (int i=0; S[i]; ++i)
if (count[S[i]]++)
return !printf("no\n");
printf("yes\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
3 | scanf("%s", S);
| ^~~~~
a.cc:8:15: error: 'printf' was not declared in this scope
8 | return !printf("no\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main() {
a.cc:10:3: error: 'printf' was not declared in this scope
10 | printf("yes\n");
| ^~~~~~
a.cc:10:3: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s039928057 | p03698 | C++ | g#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for(int i = (m); i < (int)(n); ++i)
#define ALL(x) (x).begin(), (x).end()
#define INF 2000000000
#ifdef LOCAL
#define eprintf(...) fprintf(stdout, __VA_ARGS__)
#else
#define eprintf(...) 0
#endif
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef unsigned int uint;
int main() {
string s;
cin >> s;
map<char, int> mp;
REP(i, s.size()) {
char c = s[i];
if(mp[c] == 1) {
cout << "no" << endl;
return 0;
}
mp[c]++;
}
cout << "yes" << endl;
return 0;
return 0;
}
| a.cc:1:2: error: stray '#' in program
1 | g#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'g' does not name a type
1 | g#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:21:3: error: 'string' was not declared in this scope
21 | string s;
| ^~~~~~
a.cc:22:3: error: 'cin' was not declared in this scope
22 | cin >> s;
| ^~~
a.cc:22:10: error: 's' was not declared in this scope
22 | cin >> s;
| ^
a.cc:23:3: error: 'map' was not declared in this scope
23 | map<char, int> mp;
| ^~~
a.cc:23:7: error: expected primary-expression before 'char'
23 | map<char, int> mp;
| ^~~~
a.cc:27:8: error: 'mp' was not declared in this scope
27 | if(mp[c] == 1) {
| ^~
a.cc:28:7: error: 'cout' was not declared in this scope
28 | cout << "no" << endl;
| ^~~~
a.cc:28:23: error: 'endl' was not declared in this scope
28 | cout << "no" << endl;
| ^~~~
a.cc:31:5: error: 'mp' was not declared in this scope
31 | mp[c]++;
| ^~
a.cc:33:3: error: 'cout' was not declared in this scope
33 | cout << "yes" << endl;
| ^~~~
a.cc:33:20: error: 'endl' was not declared in this scope
33 | cout << "yes" << endl;
| ^~~~
|
s094981453 | p03698 | C | #include<stdio.h>
int main(void){
int i,j;
char S[25];
scanf("%s",S);
for(i=0;i<25;i++){
for(j=i;j<25;++j){
if(S[i]==S[j]){
printf(no\n);
break;
}
else if(i==24&&j==24){
printf("yes\n");
break;
}
}
if(S[i]==S[j]){
break;
}
}
return 0;
} | main.c: In function 'main':
main.c:9:27: error: stray '\' in program
9 | printf(no\n);
| ^
main.c:9:25: error: 'no' undeclared (first use in this function)
9 | printf(no\n);
| ^~
main.c:9:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:27: error: expected ')' before 'n'
9 | printf(no\n);
| ~ ^~
| )
|
s318272054 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
stirng s;
map<char, int> mp;
cin >> s;
for (int i = 0; i < s.size(); ++i) {
mp[s[i]]++;
if (mp[s[i]] == 2) {
cout << "no" << endl;
return 0;
}
}
cout << "yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'stirng' was not declared in this scope
5 | stirng s;
| ^~~~~~
a.cc:7:12: error: 's' was not declared in this scope
7 | cin >> s;
| ^
|
s353022273 | p03698 | C | #include <stdio.h>
#include <string.h>
int main(void){
char a[26];
int len, i,j;
scanf("%s"a);
len = strlen(a);
for(i=0;i+1<len;i++){
for(j=i+1;j<len;j++){
if(a[i]==a[j]){
printf("no");
return 0;
}
}
}
printf("yes");
return 0;
} | main.c: In function 'main':
main.c:6:11: error: expected ')' before 'a'
6 | scanf("%s"a);
| ~ ^
| )
|
s538997865 | p03698 | C | #include <stdio.h>
#include <string.h>
int main(void){
char a[26];
int len, i,j;
scanf("%s"a[]);
len = strlen(a);
for(i=0;i+1<len;i++){
for(j=i+1;j<len;j++){
if(a[i]==a[j]){
printf("no");
return 0;
}
}
}
printf("yes");
return 0;
} | main.c: In function 'main':
main.c:6:11: error: expected ')' before 'a'
6 | scanf("%s"a[]);
| ~ ^
| )
|
s391319390 | p03698 | C | #include <stdio.h>
#include <string.h>
int main(void){
char a[26];
int len, i,j;
scanf("%s"&a[]);
len = strlen(a);
for(i=0;i+1<len;i++){
for(j=i+1;j<len;j++){
if(a[i]==a[j]){
printf("no");
return 0;
}
}
}
printf("yes");
return 0;
} | main.c: In function 'main':
main.c:6:14: error: expected expression before ']' token
6 | scanf("%s"&a[]);
| ^
|
s677140213 | p03698 | C | #include <stdio.h>
#include <string.h>
int main(void){
char a[26];
int len, i,j;
scanf("%s"&a);
len = strlen(a);
for(i=0;i+1<len;i++){
for(j=i+1;j<len;j++){
if(a[i]==a[j]){
printf("no");
return 0;
}
}
}
printf("yes");
return 0;
} | main.c: In function 'main':
main.c:6:11: error: invalid operands to binary & (have 'char *' and 'char *')
6 | scanf("%s"&a);
| ~~~~^
| | |
| | char *
| char *
|
s647782651 | p03698 | C++ | #include <iostream>
#include<string>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
string s;
scanf("%s",&s);
ans="yes";
for(int i=0; i<s.size(); ++i){
for(int j=i+1; j<s.size(); ++j){
if(s[i]==s[j])ans="no";
}
}
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | ans="yes";
| ^~~
| abs
|
s150171108 | p03698 | C++ | #include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
using namespace std;
int main() {
string S;
cin >> S;
int i;
int c[26] = {};
for (i = 0; i < S.size(); i++) {
c[S[i] - 'a']++
}
for (i = 0; i < 26; i++) {
if (c[i] > 1){
cout << "no" << endl;
return 0;
}
}
cout << "yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:19:32: error: expected ';' before '}' token
19 | c[S[i] - 'a']++
| ^
| ;
20 | }
| ~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.