submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s390313406
p03697
C++
def solve(): a,b=map(int,input().split()) if a+b>=10: print("error") else: print(a+b) if __name__ == "__main__": solve()
a.cc:1:1: error: 'def' does not name a type 1 | def solve(): | ^~~
s108408704
p03697
C++
open Printf open Scanf let () = let solve a b = let x = a + b in if x >= 10 then "error" else x |> string_of_int in scanf "%d %d\n" solve |> printf "%s\n"
a.cc:1:1: error: 'open' does not name a type 1 | open Printf | ^~~~
s785550606
p03697
C++
asdfjklasdilfasdjkkasdjfkjlasdjkflasdkjlfkjasldfkjlaseiuruaasdfsadfasdfasedfasdf
a.cc:1:1: error: 'asdfjklasdilfasdjkkasdjfkjlasdjkflasdkjlfkjasldfkjlaseiuruaasdfsadfasdfasedfasdf' does not name a type 1 | asdfjklasdilfasdjkkasdjfkjlasdjkflasdkjlfkjasldfkjlaseiuruaasdfsadfasdfasedfasdf | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s866904168
p03697
C++
#include <stdio.h> #include <string.h> int main() { char s[30]; int a[26]={0}; // scanf("%s",s); gets(s); int n=strlen(s); for(int i=0;i<n;i++) a[s[i]-'a']++; int dif=0; for(int i=0;i<26;i++) if(a[i]>1){ dif=1; break; } if(dif==0) printf("yes"); else printf("no"); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(s); | ^~~~ | getw
s945037206
p03697
C++
#include <stdio.h> #include <string.h> int main() { char s[30]; int a[26]={0}; // scanf("%s",s); gets(s); int n=strlen(s); for(int i=0;i<n;i++) a[s[i]-'a']++; int dif=0; for(int i=0;i<26;i++) if(a[i]>1){ dif=1; break; } if(dif==0) printf("yes"); else printf("no"); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(s); | ^~~~ | getw
s350384246
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; c=a+b; if(c>=10) cout<<"error"; else cout<<c; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'c' was not declared in this scope 6 | c=a+b; | ^
s384182796
p03697
C++
import java.util.Scanner fun main(args: Array<String>) { val cin = Scanner(System.`in`) val a = cin.nextInt() val b = cin.nextInt() if (a + b in 0..9) { println(a + b) } else { println("error") } cin.close() }
a.cc:4:28: error: stray '`' in program 4 | val cin = Scanner(System.`in`) | ^ a.cc:4:31: error: stray '`' in program 4 | val cin = Scanner(System.`in`) | ^ a.cc:8:16: error: too many decimal points in number 8 | if (a + b in 0..9) { | ^~~~ a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s403444123
p03697
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); if ((A + B) < 10) { System.out.println(A+B); } else System.out.println("error."); } }
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s064683148
p03697
C++
#include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b<10) cout<<a+b<<endl; else cout<<"error"<<endl; return 0;
a.cc: In function 'int main()': a.cc:12:10: error: expected '}' at end of input 12 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s161002168
p03697
C++
#include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b<10) cout<<a+b<<endl; else cout<<"error"<<endl return 0; }
a.cc: In function 'int main()': a.cc:11:20: error: expected ';' before 'return' 11 | cout<<"error"<<endl | ^ | ; 12 | return 0; | ~~~~~~
s095141816
p03697
C++
#include <iostream> #include <set> #include <vector> #include <algorithm> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; int hits = 0; vector<int> healths; while(N--) { int num; cin >> num; healths.push_back(num); } sort(healths.begin(), healths.end()); for(int i=healths.size()-1; i>=1; i--) { if(healths[i] <= B*hits) break; hits += ceil((healths[i]-healths[i-1])/(A-B)); } cout << hits << endl; return 0; }
a.cc: In function 'int main()': a.cc:22:17: error: 'ceil' was not declared in this scope 22 | hits += ceil((healths[i]-healths[i-1])/(A-B)); | ^~~~
s778583856
p03697
C++
#include <iostream> using namespace std; int main(void){ int a, b; cin << a << " " << b; int out = a + b; if(out < 10) cout << out; else cout << "error"; 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 'int') 7 | cin << a << " " << b; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:7:9: note: candidate: 'operator<<(int, int)' (built-in) 7 | cin << a << " " << b; | ~~~~^~~~ a.cc:7:9: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << " " << b; | ^ 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: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:7:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 7 | cin << a << " " << b; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << " " << b; | ^ 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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << " " << b; | ^ /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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << " " << b; | ^ /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/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << " " << b; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << " " << b; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:7:12: required from here 7 | cin << a << " " << b; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s322896410
p03697
C++
#include <cassert> #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> /* //#if __cplusplus >= 201103L #include <ccomplex> #include <cfenv> #include <cinttypes> #include <cstdbool> #include <cstdint> #include <ctgmath> #include <cwchar> #include <cwctype> */ // C++ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> /* //#if __cplusplus >= 201103L #include <array> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <typeindex> #include <type_traits> #include <unordered_map> #include <unordered_set> */ using namespace std; #define fi first #define se second #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define each(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define mmax(x,y) (x>y?x:y) #define mmin(x,y) (x<y?x:y) #define maxch(x,y) x=mmax(x,y) #define minch(x,y) x=mmin(x,y) #define mp(a,b) make_pair(a,b) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<x<<endl #define uni(x) x.erase(unique(all(x)),x.end()) template<class T,class U>inline void chmin(T &t,U f){if(t>f)t=f;} template<class T,class U>inline void chmax(T &t,U f){if(t<f)t=f;} #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) > (b) ? (b) : (a)) typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> P; typedef pair<P, int> PPI; #define INF INT_MAX/3 #define MAX_N 1000 #define M_INF 1000000000 int n,m,v,i; void solve(){ cin.tie(0); ios::sync_with_stdio(false); cin>>n>>m; if(n+m<10) cout<<n+m<<endl; else cout<'error'<<endl; } int main(){ solve(); return 0; }
a.cc:118:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 118 | else cout<'error'<<endl; | ^~~~~~~ a.cc: In function 'void solve()': a.cc:118:20: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 118 | else cout<'error'<<endl; | ~~~~~~~^~~~~~
s577774247
p03697
C++
/* ID:greenty2 LANG:C++ TASK: */ #include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b>=10) { cout<<error<<endl; } else { cout<<a+b<<endl; } }
a.cc: In function 'int main()': a.cc:14:23: error: 'error' was not declared in this scope; did you mean 'perror'? 14 | cout<<error<<endl; | ^~~~~ | perror
s708433631
p03697
C++
a, b = gets.strip.split.map(&:to_i) c = a + b puts c >= 10 ? 'error' : c
a.cc:5:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 5 | puts c >= 10 ? 'error' : c | ^~~~~~~ a.cc:1:1: error: 'a' does not name a type 1 | a, b = gets.strip.split.map(&:to_i) | ^
s957093182
p03697
C
#include <stdio.h> int main(){ int n, i, j, work=0, sum, s[150]; scanf("%d", &n); for (i=0;i<n;i++) { scanf("%d", &s[i]); sum+=s[i]; } i=0; for(i=0;i<n;i++){ for(j=1;j<=;j++){ if(s[i]>s[j]){ work=s[i]; s[i]=s[j]; s[]j=work; } } } while(1){ if(sum%10!=0||sum==0){ break; }else{ sum-=s[i]; i++; } } printf("%d\n", sum); return 0; }
main.c: In function 'main': main.c:13:16: error: expected expression before ';' token 13 | for(j=1;j<=;j++){ | ^ main.c:17:11: error: expected expression before ']' token 17 | s[]j=work; | ^
s740949494
p03697
C
#include <iostream> using namespace std; int main(){ int A, B; cin >> A >> B; if (A + B < 10){ cout << A + B << endl; }else{ cout << "error" << endl; } return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s908671346
p03697
C++
#include<stdio.h> int main(){ int a,b; int c; c=a+b; if(c<10){ printf("%d\n",c); }else{ printf("%s",error); } return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'error' was not declared in this scope; did you mean 'perror'? 9 | printf("%s",error); | ^~~~~ | perror
s665150725
p03697
C++
#include<stdio.h> 2.int main(){ 3. int a,b; 4. int c; 5. c=a+b; 6. if(c<10){ 7. printf("%d\n",c); 8. }else{ 9. printf("%s",error); 10. } 11. return 0; 12.}
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 2.int main(){ | ^~~~~
s589285439
p03697
C++
#include<iostream> using namespace std; int main(){ int a, b; cin >> a >> b; if( a + b > 10 ){ cout << "error" << endl; break; }else{ cout << a + b << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: break statement not within loop or switch 10 | break; | ^~~~~
s251522100
p03697
C++
#include<iostream> using namespace std; int main(){ int a, b; cin >> a >> b; if( a + b > 10 ){ cout << "error" << endl; break; } cout << a + b << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: break statement not within loop or switch 10 | break; | ^~~~~
s095134183
p03697
C++
#include <iostream> #ifdef LOCAL #define debugEcho(expr) cout << expr << "\n"; #else #define debugEcho(expr) #endif using namespace std; #define at ,<=, #define to ,<, #define in , #define forrange(...) forrange1(forrange2, (__VA_ARGS__)) #define forrange1(X, A) X A #define forrange2(i, s, op, e) for (int i = (s); i op (e); i++) int main() { int A; int B; cin >> A; cin >> B; if (A + B >= 10) { cout << "error\n"; } else cout << (A + B) << "\n"; } }
a.cc:29:1: error: expected declaration before '}' token 29 | } | ^
s949956138
p03697
C
#include<stdio.h> int main(void){ int A,B; scanf("%d %d",&A,&B); if(A+B<10){ printf("%d\n",A+B); else{ printf("error\n"); } return 0; }
main.c: In function 'main': main.c:7:9: error: expected '}' before 'else' 7 | else{ | ^~~~
s290069941
p03697
C
#include<stdio.h> int main(void){ int A,B; scanf("%d %d",%A,%B); if(A+B<10){ printf("%d",A+B); }else{ printf("error"); } return 0; }
main.c: In function 'main': main.c:4:23: error: expected expression before '%' token 4 | scanf("%d %d",%A,%B); | ^
s731436701
p03697
C++
#include<iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b; a+b=c; if( c > 10 ){ cout << "error" << endl; } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: lvalue required as left operand of assignment 8 | a+b=c; | ~^~
s118989892
p03697
Java
import java.util.*; public class Main{ public static void main (String [] args){ Scanner in =new Scanner(System.in); int a=0;b=0; a=in.nextInt(); b=in.nextInt(); if(a+b>=10) System.out.println("error"); else System.out.println(a+b); } }
Main.java:5: error: cannot find symbol int a=0;b=0; ^ symbol: variable b location: class Main Main.java:7: error: cannot find symbol b=in.nextInt(); ^ symbol: variable b location: class Main Main.java:8: error: cannot find symbol if(a+b>=10) System.out.println("error"); ^ symbol: variable b location: class Main Main.java:9: error: cannot find symbol else System.out.println(a+b); ^ symbol: variable b location: class Main 4 errors
s890693422
p03697
C
#include<stdio.h> int main(void){ int A,B; scanf("%d %d",%A,%B); if(A+B<10){ printf("%d",A+B); else{ printf("error"); } return 0; }
main.c: In function 'main': main.c:4:19: error: expected expression before '%' token 4 | scanf("%d %d",%A,%B); | ^ main.c:7:5: error: expected '}' before 'else' 7 | else{ | ^~~~
s407945610
p03697
Java
import java.io.*; import java.util.*; import java.math.BigInteger; public class CB063B { public static void main(String[] args) { InputReader in = new InputReader(System.in); PrintWriter w = new PrintWriter(System.out); int sum=in.nextInt()+in.nextInt(); if (sum>=10) w.println("error"); else w.println(sum); w.close(); } static class InputReader { private final InputStream stream; private final byte[] buf = new byte[8192]; private int curChar, snumChars; private SpaceCharFilter filter; public InputReader(InputStream stream) { this.stream = stream; } public int snext() { if (snumChars == -1) throw new InputMismatchException(); if (curChar >= snumChars) { curChar = 0; try { snumChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (snumChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = snext(); while (isSpaceChar(c)) { c = snext(); } int sgn = 1; if (c == '-') { sgn = -1; c = snext(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = snext(); } while (!isSpaceChar(c)); return res * sgn; } public long nextLong() { int c = snext(); while (isSpaceChar(c)) { c = snext(); } int sgn = 1; if (c == '-') { sgn = -1; c = snext(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = snext(); } while (!isSpaceChar(c)); return res * sgn; } public int[] nextIntArray(int n) { int a[] = new int[n]; for (int i = 0; i < n; i++) { a[i] = nextInt(); } return a; } public String readString() { int c = snext(); while (isSpaceChar(c)) { c = snext(); } StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = snext(); } while (!isSpaceChar(c)); return res.toString(); } public String nextLine() { int c = snext(); while (isSpaceChar(c)) c = snext(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = snext(); } while (!isEndOfLine(c)); return res.toString(); } public boolean isSpaceChar(int c) { if (filter != null) return filter.isSpaceChar(c); return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } private boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } public interface SpaceCharFilter { public boolean isSpaceChar(int ch); } } }
Main.java:4: error: class CB063B is public, should be declared in a file named CB063B.java public class CB063B { ^ 1 error
s732298036
p03697
Java
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc= new Scanner(System.in); int N=sc.nextInt(); int M=sc.nextInt(); int sum=N+M; if (sum<10) {System.out.println(sum);} else {System.out.println("error");} }
Main.java:14: error: reached end of file while parsing } ^ 1 error
s360040950
p03697
Java
import java.util.Scanner; public class Restricted { public static void main(String[] args){ Scanner sc= new Scanner(System.in); int N=sc.nextInt(); int M=sc.nextInt(); int sum=N+M; if (sum<10) {System.out.println(sum);} else {System.out.println("error");} } }
Main.java:3: error: class Restricted is public, should be declared in a file named Restricted.java public class Restricted { ^ 1 error
s285102200
p03697
C++
#include<bit/stdc++.h> using namespace std; int main () { int a,b; cin>>a>>b; if((a+b)>=10) cout<<"error"<<endl; else cout<<a+b<<endl; return 0; }
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory 1 | #include<bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s191801523
p03697
C++
#include<iostream> using namespace std; int a,b; int main(){ cin >>a>>b; if (a+b>=10){ cout<<"error"<<endl; return 0; } cout <<a+b<<end; return 0; }
a.cc: In function 'int main()': a.cc:12:11: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | cout <<a+b<<end; | ~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t' 306 | operator<<(nullptr_t) | ^~
s817246505
p03697
C++
#include <cstdio> int main() { int a, b; scanf("%d %d", &a, %b); if (a + b > 9) printf("error\n"); else printf("%d\n", a + b); }
a.cc: In function 'int main()': a.cc:6:24: error: expected primary-expression before '%' token 6 | scanf("%d %d", &a, %b); | ^
s314162233
p03697
C++
A,B=map(int,input().split()) if A+B>=10: print("error") else: print(A+B)
a.cc:1:1: error: 'A' does not name a type 1 | A,B=map(int,input().split()) | ^
s524119304
p03697
Java
package abc075; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class MainA { public static void main(String[] args) throws IOException { BufferedReader input =new BufferedReader (new InputStreamReader (System.in)); String str = input.readLine( ); String[] ab = str.split(" "); int a = Integer.parseInt(ab[0]); int b = Integer.parseInt(ab[1]); if(a+b < 10){ System.out.println(a+b); }else{ System.out.println("error"); } } }
Main.java:8: error: class MainA is public, should be declared in a file named MainA.java public class MainA { ^ 1 error
s067714800
p03697
C++
#include<iosream> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b>=10) cout<<"error"<<endl; else cout<<a+b<<endl; return 0; }
a.cc:1:9: fatal error: iosream: No such file or directory 1 | #include<iosream> | ^~~~~~~~~ compilation terminated.
s073143299
p03697
C++
#include<iostream> int main() { int a,b,c; cin<<a<<b; c=a+b; if(c>=10)cout<<"error"; else cout<<c; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin<<a<<b; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if(c>=10)cout<<"error"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | else cout<<c; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s442274459
p03697
C++
#include <iostream> using namespace std; int main() { int A, B; cin >> A >> B; cout << (A + B < 10) ? A + B : "error" << endl; }
a.cc: In function 'int main()': a.cc:8:44: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | cout << (A + B < 10) ? A + B : "error" << endl; | ~~~~~~~~^~~~~~~
s419831950
p03697
C
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> int main(){ int a, b; scanf(" %d %d", &a, &b); if(a + b >=10){ printf("error"); else{ printf("%d", a+b); } return 0; }
main.c: In function 'main': main.c:12:5: error: expected '}' before 'else' 12 | else{ | ^~~~
s935294584
p03697
C++
#include <cstdio> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <vector> #include <iostream.h> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) int main(){ int a,b; cin >>a>>b; cout << a+b; }
a.cc:7:10: fatal error: iostream.h: No such file or directory 7 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s553698460
p03697
C++
#include<stdio.h> #include<conio.h> #include<iostream> using namespace std; int main(void) { int x,y; cin >> x; cin >> y; if (x + y >= 10) { cout << "error" << endl; } else { cout << x + y << endl; } return(0); }
a.cc:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s180731321
p03697
C
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> int main(){ int a, b; scanf(" %d %d", &a, &b); if(a + b >=10){ printf("error"); else{ printf("%d", a+b); } return 0; } }
main.c: In function 'main': main.c:12:5: error: expected '}' before 'else' 12 | else{ | ^~~~ main.c: At top level: main.c:17:1: error: expected identifier or '(' before '}' token 17 | } | ^
s675867528
p03697
C++
(defun solver () (let ((a (read)) (b (read))) (if (>= (+ a b) 10) (format t "error~%") (format t "~A~%" (+ a b))))) (solver)
a.cc:1:7: error: expected ')' before 'solver' 1 | (defun solver () | ~ ^~~~~~~ | )
s663252070
p03697
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int a, b; cin >> a >> b; cout << (a + b >= 10? "error": a + b) << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:23: error: operands to '?:' have different types 'const char*' and 'int' 10 | cout << (a + b >= 10? "error": a + b) << endl; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~
s309309393
p03697
C
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> int main(){ long long int a, b; scanf(" %d %d", &a, &b); if(a + b >=10){ printf("error"); else{ printf("%d", a+b); } return 0; } }
main.c: In function 'main': main.c:12:5: error: expected '}' before 'else' 12 | else{ | ^~~~ main.c: At top level: main.c:17:1: error: expected identifier or '(' before '}' token 17 | } | ^
s415114971
p03697
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if(a+b>=10){ System.out.println("error"); }else{ System.out.println(a+b); } } }
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s576549697
p03697
C++
#include<bits/stdc++.h> using namespace std; int main() {
a.cc: In function 'int main()': a.cc:4:2: error: expected '}' at end of input 4 | { | ~^
s764128249
p03698
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; for(int i = 0;i < s.size();i++){ for(int j = 0;j < s.size();j++){ if(s.at(i) == s.at(j){ cout << "no"; break; } } if(i == s.at(s.size() - 1)){ cout << "yes"; break; } } }
a.cc: In function 'int main()': a.cc:9:26: error: expected ')' before '{' token 9 | if(s.at(i) == s.at(j){ | ~ ^ | ) a.cc:13:8: error: expected primary-expression before '}' token 13 | } | ^
s599869748
p03698
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = 1; i < (int)(n+1); i++) int main() { string S; cin>>S; bool a=false; sort(S.begin(),S.end()); int a=S.size(); rep(i,a){ if(S[i]==S[i+1]){ a=true; } } if(a==true){ cout<<"no"<<endl; } else { cout<<"yes"<<endl; } }
a.cc: In function 'int main()': a.cc:12:9: error: conflicting declaration 'int a' 12 | int a=S.size(); | ^ a.cc:10:10: note: previous declaration as 'bool a' 10 | bool a=false; | ^
s477705809
p03698
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string ans="yes"; for(int j=0;j<S.size()-1;j++){ for(int i=j+1;i<S.size()-1;i++){ if(S.at(j)==S.at(i)){ ans="no" break; } } } cout <<ans<<endl; }
a.cc: In function 'int main()': a.cc:11:13: error: expected ';' before 'break' 11 | ans="no" | ^ | ; 12 | break; | ~~~~~
s285936559
p03698
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string ans="yes" for(int j=0;j<S.size()-1;j++){ for(int i=j+1;i<S.size()-1;i++){ if(S.at(j)==S.at(i)){ ans="no" break; } } } cout <<ans<<endl; }
a.cc: In function 'int main()': a.cc:8:1: error: expected ',' or ';' before 'for' 8 | for(int j=0;j<S.size()-1;j++){ | ^~~ a.cc:8:13: error: 'j' was not declared in this scope 8 | for(int j=0;j<S.size()-1;j++){ | ^
s219592140
p03698
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <functional> #include <cmath> #define pi 3.14159265358979323846264338327950 int main() { std::string s; std::cin >> s; std::string d = s; std::unique(d.begin(), d.end()); if (d.size() == s.size())std::cout << "yes" << endl; else std::cout << "no" << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:14:20: warning: ignoring return value of '_FIter std::unique(_FIter, _FIter) [with _FIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >]', declared with attribute 'nodiscard' [-Wunused-result] 14 | std::unique(d.begin(), d.end()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:4: /usr/include/c++/14/bits/stl_algo.h:891:5: note: declared here 891 | unique(_ForwardIterator __first, _ForwardIterator __last) | ^~~~~~ a.cc:15:56: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | if (d.size() == s.size())std::cout << "yes" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s386444972
p03698
C
#include <unistd.h> void ft_putchar(char c) { char result; result = write(1, &c, 1); } void ft_putstr(char *str) { while(*str) ft_putchar(*(str++)); } int main() { int i; int j; char *c; (void)ac; read(0, c, 30); i = 0; while (c[i]) { j = i + 1; while (c[j]) { if (c[i] = c[j]) { ft_putstr("no"); return 0; } j++; } i++; } ft_putstr("yes"); return 0; }
main.c: In function 'main': main.c:21:9: error: 'ac' undeclared (first use in this function); did you mean 'c'? 21 | (void)ac; | ^~ | c main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in
s944985181
p03698
C
#include <unistd.h> void ft_putchar(char c) { char result; result = write(1, &c, 1); } void ft_putstr(char *str) { while(*str) ft_putchar(*(str++)); } int main() { int i; int j; char c; (void)ac; read(S, c, 30); i = 0; while (c[i]) { j = i + 1; while (c[j]) { if (c[i] = c[j]) { ft_putstr("no"); return 0; } j++; } i++; } ft_putstr("yes"); return 0; }
main.c: In function 'main': main.c:21:9: error: 'ac' undeclared (first use in this function); did you mean 'c'? 21 | (void)ac; | ^~ | c main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in main.c:22:8: error: 'S' undeclared (first use in this function) 22 | read(S, c, 30); | ^ main.c:22:11: error: passing argument 2 of 'read' makes pointer from integer without a cast [-Wint-conversion] 22 | read(S, c, 30); | ^ | | | char In file included from main.c:1: /usr/include/unistd.h:371:38: note: expected 'void *' but argument is of type 'char' 371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur | ~~~~~~^~~~~ main.c:24:11: error: subscripted value is neither array nor pointer nor vector 24 | while (c[i]) | ^ main.c:27:25: error: subscripted value is neither array nor pointer nor vector 27 | while (c[j]) | ^ main.c:29:16: error: subscripted value is neither array nor pointer nor vector 29 | if (c[i] = c[j]) | ^ main.c:29:23: error: subscripted value is neither array nor pointer nor vector 29 | if (c[i] = c[j]) | ^
s373624279
p03698
C
#include <unistd.h> void ft_putchar(char c) { char result; result = write(1, &c, 1); } void ft_putstr(char *str) { while(*str) ft_putchar(*(str++)); } int main(int ac, char **av) { int i; int j; (void)ac; i = 0; while (av[1][i]) { j = i + 1; while (av[1][j]) { if (av[1][i] = av[1][j]) { ft_putstr("no"); return 0; } j++; } i++; } ft_putstr("yes"); return 0; } #include <unistd.h> void ft_putchar(char c) { char result; result = write(1, &c, 1); } void ft_putstr(char *str) { while(*str) ft_putchar(*(str++)); } int main() { int i; int j; char c; (void)ac; read(S, c, 30); i = 0; while (c[i]) { j = i + 1; while (c[j]) { if (c[i] = c[j]) { ft_putstr("no"); return 0; } j++; } i++; } ft_putstr("yes"); return 0; } 提出情報
main.c:41:6: error: redefinition of 'ft_putchar' 41 | void ft_putchar(char c) | ^~~~~~~~~~ main.c:3:6: note: previous definition of 'ft_putchar' with type 'void(char)' 3 | void ft_putchar(char c) | ^~~~~~~~~~ main.c:47:6: error: redefinition of 'ft_putstr' 47 | void ft_putstr(char *str) | ^~~~~~~~~ main.c:9:6: note: previous definition of 'ft_putstr' with type 'void(char *)' 9 | void ft_putstr(char *str) | ^~~~~~~~~ main.c:53:5: error: redefinition of 'main' 53 | int main() | ^~~~ main.c:15:5: note: previous definition of 'main' with type 'int(int, char **)' 15 | int main(int ac, char **av) | ^~~~ main.c: In function 'main': main.c:54:1: error: number of arguments doesn't match prototype 54 | { | ^ main.c:15:5: error: prototype declaration 15 | int main(int ac, char **av) | ^~~~ main.c:59:9: error: 'ac' undeclared (first use in this function); did you mean 'c'? 59 | (void)ac; | ^~ | c main.c:59:9: note: each undeclared identifier is reported only once for each function it appears in main.c:60:8: error: 'S' undeclared (first use in this function) 60 | read(S, c, 30); | ^ main.c:60:11: error: passing argument 2 of 'read' makes pointer from integer without a cast [-Wint-conversion] 60 | read(S, c, 30); | ^ | | | char In file included from main.c:1: /usr/include/unistd.h:371:38: note: expected 'void *' but argument is of type 'char' 371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur | ~~~~~~^~~~~ main.c:62:11: error: subscripted value is neither array nor pointer nor vector 62 | while (c[i]) | ^ main.c:65:25: error: subscripted value is neither array nor pointer nor vector 65 | while (c[j]) | ^ main.c:67:16: error: subscripted value is neither array nor pointer nor vector 67 | if (c[i] = c[j]) | ^ main.c:67:23: error: subscripted value is neither array nor pointer nor vector 67 | if (c[i] = c[j]) | ^ main.c: At top level: main.c:79:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 79 | 提出情報 | ^~~~~~~~
s295428498
p03698
C
#include <stdio.h> int main(int argc, char *argv[]) { int i = 0; int j; (void)argc; while (*argv[1][i]) { j = i; while (argv[1][j]) { if (argv[1][j] == argv[1][i]) { printf("no"); return (0); } j++; } i++; } printf("yes"); return (0); }
main.c: In function 'main': main.c:9:10: error: invalid type argument of unary '*' (have 'int') 9 | while (*argv[1][i]) | ^~~~~~~~~~~
s484952881
p03698
C
int main() { int i; int j; i = 0; while (S[i]) { j = i + 1; while (S[j]) { if (S[i] = S[j]) { putstr("no"); return ; } j++; } i++; } putstr("yes"); return; }
main.c: In function 'main': main.c:7:10: error: 'S' undeclared (first use in this function) 7 | while (S[i]) | ^ main.c:7:10: note: each undeclared identifier is reported only once for each function it appears in main.c:14:13: error: implicit declaration of function 'putstr' [-Wimplicit-function-declaration] 14 | putstr("no"); | ^~~~~~ main.c:15:13: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 15 | return ; | ^~~~~~ main.c:1:5: note: declared here 1 | int main() | ^~~~ main.c:22:3: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 22 | return; | ^~~~~~ main.c:1:5: note: declared here 1 | int main() | ^~~~
s750415015
p03698
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll ; typedef double db; const double pi = 3.141592654; #define pb push_back #define forab(i,a,b) for(int i=(a);i<=(b);i++) #define CIN ios_base::sync_with_stdio(0); cin.tie(0) #define pcase(z,x) printf("Case %ld: %lld\n",z,x) #define nw "\n" int main(void) { CIN; ll tc,l,k,sum=0,x=0,y,z=0,m=1,n=0,ans=0,cnt=0; map<char,int>mp; char c; while(cin>>c){ mp[c]++; if(mp[c]==2)return cout<<"no",0; } else cout<<"yes"; }
a.cc: In function 'int main()': a.cc:21:9: error: 'else' without a previous 'if' 21 | else cout<<"yes"; | ^~~~
s345210866
p03698
Java
import java.util.*; import java.io.*; import java.math.*; public class Main{ //Don't have to see. start------------------------------------------ static class InputIterator{ ArrayList<String> inputLine = new ArrayList<String>(1024); int index = 0; int max; String read; InputIterator(){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try{ while((read = br.readLine()) != null){ inputLine.add(read); } }catch(IOException e){} max = inputLine.size(); } boolean hasNext(){return (index < max);} String next(){ if(hasNext()){ return inputLine.get(index++); }else{ throw new IndexOutOfBoundsException("There is no more input"); } } } static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>(); static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem. static PrintWriter out = new PrintWriter(System.out); static void flush(){out.flush();} static void myout(Object t){out.println(t);} static void myerr(Object t){System.err.print("debug:");System.err.println(t);} static String next(){return ii.next();} static boolean hasNext(){return ii.hasNext();} static int nextInt(){return Integer.parseInt(next());} static long nextLong(){return Long.parseLong(next());} static double nextDouble(){return Double.parseDouble(next());} static ArrayList<String> nextStrArray(){return myconv(next(), 8);} static ArrayList<String> nextCharArray(){return myconv(next(), 0);} static ArrayList<Integer> nextIntArray(){ ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size()); for(int i = 0; i < input.size(); i++){ ret.add(Integer.parseInt(input.get(i))); } return ret; } static ArrayList<Long> nextLongArray(){ ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size()); for(int i = 0; i < input.size(); i++){ ret.add(Long.parseLong(input.get(i))); } return ret; } static String myconv(Object list, int no){//only join String joinString = CONVSTR.get(no); if(list instanceof String[]){ return String.join(joinString, (String[])list); }else if(list instanceof ArrayList){ return String.join(joinString, (ArrayList)list); }else{ throw new ClassCastException("Don't join"); } } static ArrayList<String> myconv(String str, int no){//only split String splitString = CONVSTR.get(no); return new ArrayList<String>(Arrays.asList(str.split(splitString))); } public static void main(String[] args){ CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, ""); solve();flush(); } //Don't have to see. end------------------------------------------ static void solve(){//Here is the main function ArrayList<Integer> s = nextCharArray(); HashSet<String> set = new HashSet<String>(); for(int i = 0; i < s.size(); i++){ set.add(s.get(i)); } if(s.size() == set.size()){ myout("yes"); }else{ myout("no"); } } //Method addition frame start //Method addition frame end }
Main.java:72: error: incompatible types: ArrayList<String> cannot be converted to ArrayList<Integer> ArrayList<Integer> s = nextCharArray(); ^ Main.java:75: error: incompatible types: Integer cannot be converted to String set.add(s.get(i)); ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 2 errors
s674961014
p03698
C++
cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder kaedetoyokura@KaedenoMacBook-Air ~ % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 4 3 1 2 2 3 1 4 2 2 1 kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 4 3 1 2 2 3 1 4 2 2 1 1 kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 2 5 1 2 2 1 1 2 2 1 1 2 5 5 kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 2 3 abc arc##### #abc# #arc# ##### kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 2 3 abc arc##### #abc# #arc###### kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 2 3 abc arc ##### #abc##arc# ##### kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder ### #z# ##### ## kaedetoyokura@KaedenoMacBook-Air Desktop % #z# zsh: command not found: #z# kaedetoyokura@KaedenoMacBook-Air Desktop % ### zsh: command not found: ### kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 1 1 z### 1 1 z#z1# ### kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 1 1 z### #z# ### kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder 1 1 z ### #z# ### kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder atcoder.cpp:112:9: error: use of undeclared identifier 'yes' yes(); ^ atcoder.cpp:114:9: error: use of undeclared identifier 'no' no(); ^ 2 errors generated. kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder #define Yes() printf("Yes\n") #define No() printf("No\n") no kaedetoyokura@KaedenoMacBook-Air Desktop % #define No() printf("No\n") kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder uncopyrightable yes kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder different no kaedetoyokura@KaedenoMacBook-Air Desktop %
a.cc:2:14: error: stray '@' in program 2 | kaedetoyokura@KaedenoMacBook-Air ~ % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:10:14: error: stray '@' in program 10 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:19:14: error: stray '@' in program 19 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:28:14: error: stray '@' in program 28 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:31:4: error: stray '##' in program 31 | arc##### | ^~ a.cc:31:6: error: stray '##' in program 31 | arc##### | ^~ a.cc:31:8: error: stray '#' in program 31 | arc##### | ^ a.cc:32:2: error: invalid preprocessing directive #abc 32 | #abc# | ^~~ a.cc:34:2: error: invalid preprocessing directive #arc 34 | #arc# | ^~~ a.cc:35:1: error: stray '##' in program 35 | ##### | ^~ a.cc:35:3: error: stray '##' in program 35 | ##### | ^~ a.cc:35:5: error: stray '#' in program 35 | ##### | ^ a.cc:36:14: error: stray '@' in program 36 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:39:4: error: stray '##' in program 39 | arc##### | ^~ a.cc:39:6: error: stray '##' in program 39 | arc##### | ^~ a.cc:39:8: error: stray '#' in program 39 | arc##### | ^ a.cc:40:2: error: invalid preprocessing directive #abc 40 | #abc# | ^~~ a.cc:41:2: error: invalid preprocessing directive #arc 41 | #arc###### | ^~~ a.cc:42:14: error: stray '@' in program 42 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:46:1: error: stray '##' in program 46 | ##### | ^~ a.cc:46:3: error: stray '##' in program 46 | ##### | ^~ a.cc:46:5: error: stray '#' in program 46 | ##### | ^ a.cc:47:2: error: invalid preprocessing directive #abc 47 | #abc##arc# | ^~~ a.cc:48:1: error: stray '##' in program 48 | ##### | ^~ a.cc:48:3: error: stray '##' in program 48 | ##### | ^~ a.cc:48:5: error: stray '#' in program 48 | ##### | ^ a.cc:49:14: error: stray '@' in program 49 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:50:1: error: stray '##' in program 50 | ### | ^~ a.cc:50:3: error: stray '#' in program 50 | ### | ^ a.cc:51:2: error: invalid preprocessing directive #z 51 | #z# | ^ a.cc:52:1: error: stray '##' in program 52 | ##### | ^~ a.cc:52:3: error: stray '##' in program 52 | ##### | ^~ a.cc:52:5: error: stray '#' in program 52 | ##### | ^ a.cc:54:1: error: stray '##' in program 54 | ## | ^~ a.cc:55:14: error: stray '@' in program 55 | kaedetoyokura@KaedenoMacBook-Air Desktop % #z# | ^ a.cc:55:44: error: stray '#' in program 55 | kaedetoyokura@KaedenoMacBook-Air Desktop % #z# | ^ a.cc:55:46: error: stray '#' in program 55 | kaedetoyokura@KaedenoMacBook-Air Desktop % #z# | ^ a.cc:56:25: error: stray '#' in program 56 | zsh: command not found: #z# | ^ a.cc:56:27: error: stray '#' in program 56 | zsh: command not found: #z# | ^ a.cc:57:14: error: stray '@' in program 57 | kaedetoyokura@KaedenoMacBook-Air Desktop % ### | ^ a.cc:57:44: error: stray '##' in program 57 | kaedetoyokura@KaedenoMacBook-Air Desktop % ### | ^~ a.cc:57:46: error: stray '#' in program 57 | kaedetoyokura@KaedenoMacBook-Air Desktop % ### | ^ a.cc:58:25: error: stray '##' in program 58 | zsh: command not found: ### | ^~ a.cc:58:27: error: stray '#' in program 58 | zsh: command not found: ### | ^ a.cc:59:14: error: stray '@' in program 59 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:61:2: error: stray '##' in program 61 | z### | ^~ a.cc:61:4: error: stray '#' in program 61 | z### | ^ a.cc:63:2: error: stray '#' in program 63 | z#z1# | ^ a.cc:63:5: error: stray '#' in program 63 | z#z1# | ^ a.cc:65:1: error: stray '##' in program 65 | ### | ^~ a.cc:65:3: error: stray '#' in program 65 | ### | ^ a.cc:66:14: error: stray '@' in program 66 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:68:2: error: stray '##' in program 68 | z### | ^~ a.cc:68:4: error: stray '#' in program 68 | z### | ^ a.cc:70:2: error: invalid preprocessing directive #z 70 | #z# | ^ a.cc:72:1: error: stray '##' in program 72 | ### | ^~ a.cc:72:3: error: stray '#' in program 72 | ### | ^ a.cc:73:14: error: stray '@' in program 73 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:76:1: error: stray '##' in program 76 | ### | ^~ a.cc:76:3: error: stray '#' in program 76 | ### | ^ a.cc:77:2: error: invalid preprocessing directive #z 77 | #z# | ^ a.cc:78:1: error: stray '##' in program 78 | ### | ^~ a.cc:78:3: error: stray '#' in program 78 | ### | ^ a.cc:79:14: error: stray '@' in program 79 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:80:56: warning: multi-character character constant [-Wmultichar] 80 | atcoder.cpp:112:9: error: use of undeclared identifier 'yes' | ^~~~~ a.cc:83:56: warning: multi-character character constant [-Wmultichar] 83 | atcoder.cpp:114:9: error: use of undeclared identifier 'no' | ^~~~ a.cc:87:14: error: stray '@' in program 87 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:91:14: error: stray '@' in program 91 | kaedetoyokura@KaedenoMacBook-Air Desktop % #define No() printf("No\n") | ^ a.cc:91:44: error: stray '#' in program 91 | kaedetoyokura@KaedenoMacBook-Air Desktop % #define No() printf("No\n") | ^ a.cc:92:14: error: stray '@' in program 92 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:95:14: error: stray '@' in program 95 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^ a.cc:98:14: error: stray '@' in program 98 | kaedetoyokura@KaedenoMacBook-Air Desktop % | ^ a.cc:1:1: error: 'cd' does not name a type 1 | cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder | ^~ a.cc:82:9: error: expected unqualified-id before '^' token 82 | ^ | ^ a.cc:85:9: error: expected unqualified-id before '^' token 85 | ^ | ^
s997443821
p03698
C++
#include <bits/stdc++.h> using namespace std; using ll =long long; #define all(v) v.begin(),v.end() int main() { string S; cin>>S; set<char> A; for(ll i=0;i<S.size();i++) { if(A.count(S[i]) { cout<<"no"<<endl; return 0; } A.insert(S[i]); } cout<<"yes"<<endl; }
a.cc: In function 'int main()': a.cc:11:17: error: expected ';' before '{' token 11 | if(A.count(S[i]) { | ^~ | ; a.cc:15:18: error: expected ')' before ';' token 15 | A.insert(S[i]); | ^ | ) a.cc:11:3: note: to match this '(' 11 | if(A.count(S[i]) { | ^ a.cc:15:12: error: could not convert 'A.std::set<char>::insert((*(const std::set<char>::value_type*)(& S.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i)))))' from 'std::pair<std::_Rb_tree_const_iterator<char>, bool>' to 'bool' 15 | A.insert(S[i]); | ~~~~~~~~^~~~~~ | | | std::pair<std::_Rb_tree_const_iterator<char>, bool>
s726477682
p03698
C
#include<iostream> #include<string> #include<set> using namespace std; int main(){ string s; set<char> set; cin >> s; for (int i=0; i<s.size(); i++){ set.insert(s[i]); } if (set.size() == s.size()) cout << "yes" << endl; else cout << "no" << endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s863610975
p03698
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; map<int, int>mp; for(int i = 0; i < s.size(); ++i){ mp[s[i]-'a']++; if(mps[i]-'a' > 1) { cout << "no" << endl; return 0; } } cout << "yes" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: 'mps' was not declared in this scope; did you mean 'mp'? 9 | if(mps[i]-'a' > 1) { | ^~~ | mp
s859403731
p03698
C++
#include <bits/stdc++.h> using namespace std; #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数 int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} //最小公倍数 int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション int nHr(int a,int b){return nCr(a+b-1,b);} // 重複組み合わせ int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} //階乗 int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗 int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} //数字の各位の和 int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} // b進数の各位の和? int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和 //以下long long ver long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} //double double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} typedef pair<int, int> ii; typedef long long ll; typedef vector<ll> vll; typedef pair<ll,ll> pll; #define forr(i,a,b) for(int i=(a); i<(b); i++) #define clean(arr,val) memset(arr,val,sizeof(arr)) #define forn(i,n) forr(i,0,n) #define PB push_back typedef vector<int> vi; typedef vector<ii> vii; typedef vector<pll> vpll; /*CODE START HERE*/ int main() { string s ; cin >> s; string a = "abcdefghijklmnopqrstuvwxyz" ; vector < pair<char , int> > p(26); forn(i,26) { p.at(i)= make_pair(a.at(i),0); } forn(i,s.size()){ int x,y; tie ( x,y) = p.at(i) y++ ; p.at(i)= make_pair(x,y); } forn(i,26){ int x,y; tie ( x,y) = p.at(i) if (y>1){ cout << "no" << endl; }else cout << "yes" << endl; } }
a.cc: In function 'int main()': a.cc:66:25: error: expected ';' before 'y' 66 | tie ( x,y) = p.at(i) | ^ | ; 67 | y++ ; | ~ a.cc:72:25: error: expected ';' before 'if' 72 | tie ( x,y) = p.at(i) | ^ | ; 73 | if (y>1){ | ~~ a.cc:75:6: error: 'else' without a previous 'if' 75 | }else cout << "yes" << endl; | ^~~~
s843016320
p03698
C++
#include <bits/stdc++.h> using namespace std; #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数 int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} //最小公倍数 int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション int nHr(int a,int b){return nCr(a+b-1,b);} // 重複組み合わせ int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} //階乗 int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗 int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} //数字の各位の和 int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} // b進数の各位の和? int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和 //以下long long ver long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} //double double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} typedef pair<int, int> ii; typedef long long ll; typedef vector<ll> vll; typedef pair<ll,ll> pll; #define forr(i,a,b) for(int i=(a); i<(b); i++) #define clean(arr,val) memset(arr,val,sizeof(arr)) #define forn(i,n) forr(i,0,n) #define PB push_back typedef vector<int> vi; typedef vector<ii> vii; typedef vector<pll> vpll; /*CODE START HERE*/ int main() { string s ; cin >> s; string a = "abcdefghijklmnopqrstuvwxyz" ; vector < pair<char , int> > p(26); forn(i,26) { p.at(i)= make_pair(a.at(i),0); } forn(i,s.size()){ p.at(s.at(i)).at(1)++ ; } forn(i,26){ if (p.at(i).at(1)>1){ cout << "no" << endl; }else cout << "yes" << endl; } }
a.cc: In function 'int main()': a.cc:65:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<char, int> >, std::pair<char, int> >::value_type' {aka 'struct std::pair<char, int>'} has no member named 'at' 65 | p.at(s.at(i)).at(1)++ ; | ^~ a.cc:68:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<char, int> >, std::pair<char, int> >::value_type' {aka 'struct std::pair<char, int>'} has no member named 'at' 68 | if (p.at(i).at(1)>1){ | ^~
s707379326
p03698
C++
#include <bits/stdc++.h> using namespace std; #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数 int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} //最小公倍数 int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション int nHr(int a,int b){return nCr(a+b-1,b);} // 重複組み合わせ int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} //階乗 int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗 int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} //数字の各位の和 int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} // b進数の各位の和? int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和 //以下long long ver long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} //double double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} typedef pair<int, int> ii; typedef long long ll; typedef vector<ll> vll; typedef pair<ll,ll> pll; #define forr(i,a,b) for(int i=(a); i<(b); i++) #define clean(arr,val) memset(arr,val,sizeof(arr)) #define forn(i,n) forr(i,0,n) #define PB push_back typedef vector<int> vi; typedef vector<ii> vii; typedef vector<pll> vpll; /*CODE START HERE*/ int main() { string s ; cin >> s; string a = "abcdefghijklmnopqrstuvwxyz" ; vector < char , int > p(26); forn(i,26) { p.at(i)= make_pair(a.at(i),0); } forn(i,s.size()){ p.at(s.at(i)).at(1)++ ; } forn(i,26){ if (p.at(i).at(1)>1){ cout << "no" << endl; }else cout << "yes" << endl; } }
In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<char, int>': /usr/include/c++/14/bits/stl_vector.h:428:11: required from 'class std::vector<char, int>' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ a.cc:60:28: required from here 60 | vector < char , int > p(26); | ^ /usr/include/c++/14/bits/stl_vector.h:87:28: error: 'int' is not a class, struct, or union type 87 | rebind<_Tp>::other _Tp_alloc_type; | ^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:89:9: error: 'int' is not a class, struct, or union type 89 | pointer; | ^~~~~~~ /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<char, int>': a.cc:60:28: required from here 60 | vector < char , int > p(26); | ^ /usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<char, int>::_Base' 518 | using _Base::_M_allocate; | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<char, int>::_Base' 519 | using _Base::_M_deallocate; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<char, int>::_Base' 521 | using _Base::_M_get_Tp_allocator; | ^~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:62:7: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 62 | p.at(i)= make_pair(a.at(i),0); | ^~ | data a.cc:65:7: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 65 | p.at(s.at(i)).at(1)++ ; | ^~ | data a.cc:68:11: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 68 | if (p.at(i).at(1)>1){ | ^~ | data
s581499093
p03698
C++
#include <bits/stdc++.h> using namespace std; #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数 int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} //最小公倍数 int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション int nHr(int a,int b){return nCr(a+b-1,b);} // 重複組み合わせ int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} //階乗 int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗 int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} //数字の各位の和 int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} // b進数の各位の和? int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和 //以下long long ver long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} //double double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} typedef pair<int, int> ii; typedef long long ll; typedef vector<ll> vll; typedef pair<ll,ll> pll; #define forr(i,a,b) for(int i=(a); i<(b); i++) #define clean(arr,val) memset(arr,val,sizeof(arr)) #define forn(i,n) forr(i,0,n) #define PB push_back typedef vector<int> vi; typedef vector<ii> vii; typedef vector<pll> vpll; /*CODE START HERE*/ int main() { string s ; cin >> s; string a = "abcdefghijklmnopqrstuvwxyz"; vector < char , int > p(26); forn(i,26) { p.at(i)= make_pair(a.at(i),0); } forn(i,s.size()){ p.at(s.at(i)).at(1)++ ; } forn(i,26){ if (p.at(i).at(1)>1){ cout << "No" << endl; }else cout << "Yes" << endl; } }
In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<char, int>': /usr/include/c++/14/bits/stl_vector.h:428:11: required from 'class std::vector<char, int>' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ a.cc:60:28: required from here 60 | vector < char , int > p(26); | ^ /usr/include/c++/14/bits/stl_vector.h:87:28: error: 'int' is not a class, struct, or union type 87 | rebind<_Tp>::other _Tp_alloc_type; | ^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:89:9: error: 'int' is not a class, struct, or union type 89 | pointer; | ^~~~~~~ /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<char, int>': a.cc:60:28: required from here 60 | vector < char , int > p(26); | ^ /usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<char, int>::_Base' 518 | using _Base::_M_allocate; | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<char, int>::_Base' 519 | using _Base::_M_deallocate; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<char, int>::_Base' 521 | using _Base::_M_get_Tp_allocator; | ^~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:62:7: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 62 | p.at(i)= make_pair(a.at(i),0); | ^~ | data a.cc:65:7: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 65 | p.at(s.at(i)).at(1)++ ; | ^~ | data a.cc:68:11: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 68 | if (p.at(i).at(1)>1){ | ^~ | data
s721300439
p03698
C++
#include <bits/stdc++.h> using namespace std; #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数 int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} //最小公倍数 int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション int nHr(int a,int b){return nCr(a+b-1,b);} // 重複組み合わせ int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} //階乗 int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗 int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} //数字の各位の和 int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} // b進数の各位の和? int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和 //以下long long ver long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} //double double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} typedef pair<int, int> ii; typedef long long ll; typedef vector<ll> vll; typedef pair<ll,ll> pll; #define forr(i,a,b) for(int i=(a); i<(b); i++) #define clean(arr,val) memset(arr,val,sizeof(arr)) #define forn(i,n) forr(i,0,n) #define PB push_back typedef vector<int> vi; typedef vector<ii> vii; typedef vector<pll> vpll; /*CODE START HERE*/ int main() { string s ; cin >> s; string a = "abcdefghijklmnopqrstuvwxyz"; vector < char , int > p(26); forn(i,26) { p.at(i)= make_pair(a.at(i),0); } forn(i,s.size()){ p.at(s.at(i)).at(1)++ ; } forn(i,26){ if (p.at(i).at(1)>1){ cout << "No" << endl; }else cout << "Yes" << endl; } } }
In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<char, int>': /usr/include/c++/14/bits/stl_vector.h:428:11: required from 'class std::vector<char, int>' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ a.cc:60:28: required from here 60 | vector < char , int > p(26); | ^ /usr/include/c++/14/bits/stl_vector.h:87:28: error: 'int' is not a class, struct, or union type 87 | rebind<_Tp>::other _Tp_alloc_type; | ^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:89:9: error: 'int' is not a class, struct, or union type 89 | pointer; | ^~~~~~~ /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<char, int>': a.cc:60:28: required from here 60 | vector < char , int > p(26); | ^ /usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<char, int>::_Base' 518 | using _Base::_M_allocate; | ^~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<char, int>::_Base' 519 | using _Base::_M_deallocate; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<char, int>::_Base' 521 | using _Base::_M_get_Tp_allocator; | ^~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:62:7: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 62 | p.at(i)= make_pair(a.at(i),0); | ^~ | data a.cc:65:7: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 65 | p.at(s.at(i)).at(1)++ ; | ^~ | data a.cc:68:11: error: 'class std::vector<char, int>' has no member named 'at'; did you mean 'data'? 68 | if (p.at(i).at(1)>1){ | ^~ | data a.cc: At global scope: a.cc:73:5: error: expected declaration before '}' token 73 | } | ^
s973231868
p03698
C++
#include <bits/stdc++.h> using namespace std; #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数 int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} //最小公倍数 int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション int nHr(int a,int b){return nCr(a+b-1,b);} // 重複組み合わせ int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} //階乗 int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗 int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} //数字の各位の和 int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} // b進数の各位の和? int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和 //以下long long ver long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} //double double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} typedef pair<int, int> ii; typedef long long ll; typedef vector<ll> vll; typedef pair<ll,ll> pll; #define forr(i,a,b) for(int i=(a); i<(b); i++) #define clean(arr,val) memset(arr,val,sizeof(arr)) #define forn(i,n) forr(i,0,n) #define PB push_back typedef vector<int> vi; typedef vector<ii> vii; typedef vector<pll> vpll; /*CODE START HERE*/ int main() { string s ; cin >> s; string a = "abcdefghijklmnopqrstuvwxyz" vector < char , int > p(26); forn(i,26) { p.at(i)= make_pair(a.at(i),0); } forn(i,s.size()){ p.at(s.at(i)).at(1)++ ; } forn(i,26){ if (p.at(i).at(1)>1){ cout << "No" << endl; }else cout << "Yes" << endl; } } }
a.cc: In function 'int main()': a.cc:60:5: error: expected ',' or ';' before 'vector' 60 | vector < char , int > p(26); | ^~~~~~ a.cc:62:5: error: 'p' was not declared in this scope 62 | p.at(i)= make_pair(a.at(i),0); | ^ a.cc:65:5: error: 'p' was not declared in this scope 65 | p.at(s.at(i)).at(1)++ ; | ^ a.cc:68:9: error: 'p' was not declared in this scope 68 | if (p.at(i).at(1)>1){ | ^ a.cc: At global scope: a.cc:73:5: error: expected declaration before '}' token 73 | } | ^
s957809558
p03698
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> p[124,0]; string s; cin >> s ; for ( int i=0 ; i<s.size() ; i++){ p[(int)s.at(i)]++; } for ( int i=0 ; i<125 ; i++){ if (p[i]>2){ cout << "no" << endl; return 0; } } cout << "yes" << endl; }
a.cc: In function 'int main()': a.cc:5:20: error: expected ']' before ',' token 5 | vector<int> p[124,0]; | ^ | ] a.cc:5:21: error: expected unqualified-id before numeric constant 5 | vector<int> p[124,0]; | ^ a.cc:9:5: error: 'p' was not declared in this scope 9 | p[(int)s.at(i)]++; | ^ a.cc:12:9: error: 'p' was not declared in this scope 12 | if (p[i]>2){ | ^
s864050395
p03698
C++
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; const int MOD = 1e9 + 7; int main() { string s; cin >> s; sort(all(s)); for (int i = 1; i < n; i++) { if (s[i - 1] == s[i]) { cout << "no" << endl; return 0; } } cout << "yes" << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:23: error: 'n' was not declared in this scope 11 | for (int i = 1; i < n; i++) { | ^
s782461733
p03698
C++
#include <bits/stdc++.h> using namespace std; #include <string.h> int main() { char str[100]; int i,j,k,flag=1; map<char,int> data; gets(str); for(i=0;i<strlen(str);i++) { data[str[i]]++; } for(i='a';i<'z';i++) { if(data[i]>1) { flag = 0; break; } } if(flag == 1) cout << "yes"; else cout << "no"; }
a.cc: In function 'int main()': a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(str); | ^~~~ | getw
s746377590
p03698
C
#include <stdio.h> #include <string.h> int main(void) { int i,n,a[26]={0}; char s[27]; sacnf("%s",s); n=strlen(s); for(i=0;i<n;i++) a[s[i]-'a']++; for(i=0;i<26;i++) if(a[i]>1){ printf("yes"); return 0; } printf("no"); return 0; }
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 9 | sacnf("%s",s); | ^~~~~ | scanf
s139633084
p03698
C
#include <stdio.h> #include <string.h> int main(void) { int i,n,a[26]={0}; char s[27]; sacnf("%s",s); n=strlen(s); for(i=0;i<n;i++) a[s[i]-'a']++; for(i=0;i<26;i++) if(a[i]>1){ printf("yes"); return 0; } printf("no"); return 0; }
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 9 | sacnf("%s",s); | ^~~~~ | scanf
s123512644
p03698
C
#include <stdio.h> #include <string,h> int main(void) { int i,n,a[26]={0}; char s[27]; sacnf("%s",s); n=strlen(s); for(i=0;i<n;i++) a[s[i]-'a']++; for(i=0;i<26;i++) if(a[i]>1){ printf("yes"); return 0; } printf("no"); return 0; }
main.c:2:10: fatal error: string,h: No such file or directory 2 | #include <string,h> | ^~~~~~~~~~ compilation terminated.
s722627760
p03698
C++
#include <iostream> #include <vector> #include <algorithm> #include <stdio.h> #include <cmath> #include <string.h> #include <string> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; cin >> s; for (int i=0; i<s.length(); i++) { char c = s[i]; for (int j=i+1; j<s.length(); j++) { if (c == s[j]) { cout << "no" << '\n' return 0; } } } cout << "yes" << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:22:37: error: expected ';' before 'return' 22 | cout << "no" << '\n' | ^ | ; 23 | return 0; | ~~~~~~
s317440014
p03698
C++
#include <bits/stdc++.h> using namespace std; using LL = long long; #define REP(i, n) for (LL i = 0; i < (LL)(n); i++) #define FOR(i, m, n) for (LL i = m; i < n; i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define ALL(x) (x).begin(), (x).end() #define SUM(x) accumulate(x.begin(), x.end(),0) #define vLL(v,n) vector<LL> v(n); REP(i,n)cin>>v[i]; #define vstr(v,n) vector<string> v(n); REP(i,n)REP(i,n)cin>>v[i]; #define mina(a,b) a=min(a,b); LL INF = 1e9 + 1; LL MOD = 1e9+7; LL a,b,c,d,e,n,m,l,r,ans=1000; string s,S,t; int main() { ios_base::sync_with_stdio(false); cin >>s; REP(i,s.size){ REP(j,s.size()){ (i!=j){ if(s[i]==s[j]){ cout << "no"<<endl; return 0; } } } } cout << "yes"<<endl; }
a.cc: In function 'int main()': a.cc:20:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 20 | REP(i,s.size){ | ^ a.cc:4:43: note: in definition of macro 'REP' 4 | #define REP(i, n) for (LL i = 0; i < (LL)(n); i++) | ^ a.cc:22:17: error: expected ';' before '{' token 22 | (i!=j){ | ^ | ;
s836089988
p03698
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,b; cin >> a; b = yes; for(int i=0;i<a.size();i++){ if( a.at(i) == a.at(i+1) ){ b = no; } } cout << b << endl; }
a.cc: In function 'int main()': a.cc:9:8: error: 'yes' was not declared in this scope 9 | b = yes; | ^~~ a.cc:15:11: error: 'no' was not declared in this scope 15 | b = no; | ^~
s932514875
p03698
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,b = yes; cin >> a; for(int i=0;i<a.at();i++){ if( a.at(i) == a.at(i+1) ){ b = no; } } cout << b << endl; }
a.cc: In function 'int main()': a.cc:6:17: error: 'yes' was not declared in this scope 6 | string a,b = yes; | ^~~ a.cc:10:22: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()' 10 | for(int i=0;i<a.at();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:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1287 | at(size_type __n) const | ^~ /usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1309 | at(size_type __n) | ^~ /usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate expects 1 argument, 0 provided a.cc:14:11: error: 'no' was not declared in this scope 14 | b = no; | ^~
s742210511
p03698
C++
#include<bts/stdc++.h> using namespace std; int main(){ string S; cin>>S; int K=0; sort(S.begin(),S.end()); for(int i=0; i<S.size()-1;i++){ if(S.at(i)!=S.at(i+1)) K++; else continue; } if(K==S.size()-1) cout<<"yes"<<endl; else cout<<"no"<<endl; }
a.cc:1:9: fatal error: bts/stdc++.h: No such file or directory 1 | #include<bts/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s392333494
p03698
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s;cin>>s; int n = s.size(); sort(s,s+n); rep(i,n-1)if(s[i+1]==s[i]){ cout<<"no"<<endl; return 0; } cout<<"yes"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 9 | sort(s,s+n); | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/bits/stl_algobase.h:67, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)' 627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)' 1798 | operator+(typename move_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 9 | sort(s,s+n); | ^ 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: /usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3616 | operator+(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const _CharT*' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed: a.cc:9:14: note: deduced conflicting types for parameter '_CharT' ('char' and 'int') 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3719 | operator+(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3726 | operator+(_CharT __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)' 3733 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3733:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const _CharT*' and 'int' 9 | sort(s,s+n); | ^ /usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)' 3740 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3740:5: note: template argument deduction/substitution failed: a.cc:9:14: note: deduced conflicting types for parameter '_CharT' ('char' and 'int') 9 | sort(s,s+n); | ^ In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/complex:340:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const complex<_Tp>&)' 340 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:340:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 9 | sort(s,s+n); | ^ /usr/include/c++/14/complex:349:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const _Tp&)' 349 | operator+(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /usr/include/c++/14/complex:349:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp
s941048478
p03698
C++
#include <bits/stdc++.h> using namespace std; int main() { string n; cin >> n; int k=n.size(); vector<char> vec(k+1); for(int i=0;i<k;i++) vec[i+1]=n[i]; bool A=true; int s=1; while(s <= k){ for(int i=0;i<k;i++){ if(vec[s]==n[i]){ A=false; break; } s++; } if(A)cout << "Yes" <<endl; else cout << "No" <<endl; }
a.cc: In function 'int main()': a.cc:24:4: error: expected '}' at end of input 24 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s485922136
p03698
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using P = pair<int,string>; int main() { string s; cin >> s; set<char> a; rep(i,n){ a.insert(s.at(i)); } if(a.size() == s.size()) cout << "yes" << endl; else cout << "no" << endl; }
a.cc: In function 'int main()': a.cc:11:7: error: 'n' was not declared in this scope 11 | rep(i,n){ | ^ a.cc:3:45: note: in definition of macro 'rep' 3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++) | ^
s584369282
p03698
C++
#include<iostream> using namespace std; int main() { long long int a,b,c,x3=0,t; string s;set<char>k; cin>>s; for(int i=0;i<s.size();i++){ k.insert(s[i]);} if(k.size()==s.size())cout<<"yes"; else cout<<"no"; }
a.cc: In function 'int main()': a.cc:7:14: error: 'set' was not declared in this scope 7 | string s;set<char>k; | ^~~ a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 1 | #include<iostream> +++ |+#include <set> 2 | using namespace std; a.cc:7:18: error: expected primary-expression before 'char' 7 | string s;set<char>k; | ^~~~ a.cc:10:9: error: 'k' was not declared in this scope 10 | k.insert(s[i]);} | ^ a.cc:11:8: error: 'k' was not declared in this scope 11 | if(k.size()==s.size())cout<<"yes"; | ^
s700536139
p03698
C++
#include<iostream> using namespace std; int main() { long long int a,b,c,x3=0,t; string s;set<char>k; cin>>s; for(int i=0;i<s.size();i++){ k.insert(s[i]); if(k.size()==s.size())cout<<"yes"; else cout<<"no"; }
a.cc: In function 'int main()': a.cc:7:14: error: 'set' was not declared in this scope 7 | string s;set<char>k; | ^~~ a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 1 | #include<iostream> +++ |+#include <set> 2 | using namespace std; a.cc:7:18: error: expected primary-expression before 'char' 7 | string s;set<char>k; | ^~~~ a.cc:10:9: error: 'k' was not declared in this scope 10 | k.insert(s[i]); | ^ a.cc:13:2: error: expected '}' at end of input 13 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s884931583
p03698
C++
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); i++) #define MOD 1000000007 #define INF 1e9 #define All(x) (x).begin(), (x).end() typedef long long ll; using namespace std; int main() { string s; cin>>s; sort(All(s)); for(int i=0;i<N-1;i++){ if(s[i]==s[i+1]){ cout<<"no\n"; return 0; } } cout<<"yes\n"; return 0; }
a.cc: In function 'int main()': a.cc:14:17: error: 'N' was not declared in this scope 14 | for(int i=0;i<N-1;i++){ | ^
s400454913
p03698
C++
#include <iostream> #include <cmath> #include <vector> #include <map> #include <iomanip> #include <algorithm> #include <sstream> #include <string> #include <math.h> #include <set> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); string s; int a[26] = {}; cin >> s; for (int i = 0 ; i < s.length() ; i++) a[s[i] - 96]++; for (int i = 0 ; i < 26 ; i++) { if (a[i] > 1) { cout << "no\n"; return 0; } } cout << "yes\n";A }
a.cc: In function 'int main()': a.cc:26:25: error: 'A' was not declared in this scope 26 | cout << "yes\n";A | ^
s307329612
p03698
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; map<string,int>Map; for(int i = 0; i < S.size(); i++) { Map[S[i]]++; } for(int i = 0; i < S.size(); i++) { if(Map[S[i]] > 1) { cout << "no" << endl; return 0; } } cout << "yes" << endl; }
a.cc: In function 'int main()': a.cc:9:12: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 9 | Map[S[i]]++; | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from a.cc:1: /usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]' 504 | operator[](const key_type& __k) | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:504:34: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'} 504 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]' 524 | operator[](key_type&& __k) | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'} 524 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~ a.cc:12:15: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 12 | if(Map[S[i]] > 1) { | ^ /usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]' 504 | operator[](const key_type& __k) | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:504:34: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'} 504 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]' 524 | operator[](key_type&& __k) | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'} 524 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~
s580244435
p03698
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; map<string,int>Map; for(int i = 0; i < S.size(); i++) { map[S[i]]++; } for(int i = 0; i < S.size(); i++) { if(map[S[i]] > 1) { cout << "no" << endl; return 0; } } cout << "yes" << endl; }
a.cc: In function 'int main()': a.cc:9:14: error: expected ']' before '[' token 9 | map[S[i]]++; | ^ | ] a.cc:9:18: error: expected initializer before '++' token 9 | map[S[i]]++; | ^~ a.cc:9:18: error: expected ';' before '++' token a.cc:12:15: error: expected unqualified-id before '[' token 12 | if(map[S[i]] > 1) { | ^
s900280799
p03698
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; map<string,int>Map; for(int i = 0; i < S.size(); i++) { map[S[i]]++; } for(int i = 0; i < S.size(); i++) { if(map[i] > 1) { cout << "no" << endl; return 0; } } cout << "yes" << endl; }
a.cc: In function 'int main()': a.cc:9:14: error: expected ']' before '[' token 9 | map[S[i]]++; | ^ | ] a.cc:9:18: error: expected initializer before '++' token 9 | map[S[i]]++; | ^~ a.cc:9:18: error: expected ';' before '++' token a.cc:12:15: error: expected unqualified-id before '[' token 12 | if(map[i] > 1) { | ^
s864644467
p03698
C++
#include <iostream> #include <map> #include <string> using namespace std; int main(){ string data; cin>>data; map<string,int> s; for(int i=0;i<data.size();i++){ s[data[i]]=1; } if(data.size()==s.size()){ cout<<"yes"<<endl; } else if(data.size()!=s.size()){ cout<<"no"<<endl; } }
a.cc: In function 'int main()': a.cc:11:6: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 11 | s[data[i]]=1; | ^ In file included from /usr/include/c++/14/map:63, from a.cc:2: /usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]' 504 | operator[](const key_type& __k) | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:504:34: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'} 504 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]' 524 | operator[](key_type&& __k) | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'} 524 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~
s748057045
p03698
C++
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; #define rep(i,a,b) for (int i = (a); i < (b); i++ ) typedef pair<int,int> P; typedef long long ll; const int INF = 100000000; int main() { string S; cint >> S; set<char> s; rep(i,0,S.size()) { s.insert(S[i]); } if (s.size()==S.size()) { cout << "yes" << endl; } else { cout << "no" << endl; } }
a.cc: In function 'int main()': a.cc:11:5: error: 'cint' was not declared in this scope; did you mean 'uint'? 11 | cint >> S; | ^~~~ | uint
s171965227
p03698
C++
//#include <tourist> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const int INF = 1e9; const ll LINF = ll(1e18); const int MOD = 1000000007; const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0}; const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl #define rep(i, n) for (int i = 0; i < n; i++) #define ALL(v) v.begin(), v.end() #define debug(v) \ cout << #v << ":"; \ for (auto x : v) \ { \ cout << x << ' '; \ } \ cout << endl; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } //cout<<fixed<<setprecision(15);有効数字15桁 //-std=c++14 //-std=gnu++17 ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin>>s; map<char,int>m; rep(i,s.size()){ m[s[i]]++ if(m[s[i]]==2)return cout<<"no"<<"\n",0; } cout<<"yes"<<"\n"; }
a.cc: In function 'int main()': a.cc:57:18: error: expected ';' before 'if' 57 | m[s[i]]++ | ^ | ; 58 | if(m[s[i]]==2)return cout<<"no"<<"\n",0; | ~~
s100908252
p03698
C++
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const long long MOD=1e9+7; int main() { string s; cin>>s; vector<int> abc(26,0); bool ans=true; for(auto c:s){ abc[c-'a']++; if(abs[c-'a']>1) ans=false; } if(ans) cout<<"yes"<<endl; else cout<<"no"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:14:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 14 | if(abs[c-'a']>1) ans=false; | ^
s537325826
p03698
C++
#include<stdio.h> #include<string.h> int main() { char str[27]; int count=0,i,j, length; gets(str); length = strlen(str); for(i=0; i<length; i++){ for(j=0; j<length; j++){ if(str[j]==str[i]) count++; } } if(count>length) printf("no\n"); else printf("yes\n"); return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(str); | ^~~~ | getw
s267175442
p03698
C++
using System; using System.Linq; public class Program { static void Main() { char[] s1 = Console.ReadLine().ToCharArray(); var s2 = s1.Distinct(); Console.WriteLine(s1.Length == s2.Count() ? "yes" : "no"); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Program | ^~~~~~
s658596286
p03698
C++
package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { input := ReadLine() chars := map[string]int{} for _, v := range strings.Split(input, "") { if _, exists := chars[v]; exists { fmt.Println("no") return } chars[v] = 1 } fmt.Println("yes") } ///////////////////////////////////////// func fln(format string, elements ...interface{}) { fmt.Printf(format+"\n", elements...) } var BufReader = bufio.NewReaderSize(os.Stdin, 1e6) func ReadLine() string { a, _, _ := BufReader.ReadLine() return string(a) } func ReadLineInt() (result []int) { in := strings.Split(ReadLine(), " ") result = make([]int, 0, 2) for _, v := range in { t, _ := strconv.Atoi(v) result = append(result, t) } return }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~ a.cc:28:1: error: 'func' does not name a type 28 | func fln(format string, elements ...interface{}) { | ^~~~ a.cc:28:48: error: expected unqualified-id before ')' token 28 | func fln(format string, elements ...interface{}) { | ^ a.cc:33:1: error: 'var' does not name a type 33 | var BufReader = bufio.NewReaderSize(os.Stdin, 1e6) | ^~~ a.cc:40:1: error: 'func' does not name a type 40 | func ReadLineInt() (result []int) { | ^~~~
s919192040
p03698
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int size=s.size(); bool isidentical=false; for(int i=0;i<size;i++){ for(int j=i;j<size;j++){ if(s.at(j)==s.at(i))isidentical=true; } } if(is identical)cout<<"yes"<<endl; else cout<<"no"<<endl; }
a.cc: In function 'int main()': a.cc:14:6: error: 'is' was not declared in this scope; did you mean 's'? 14 | if(is identical)cout<<"yes"<<endl; | ^~ | s a.cc:14:8: error: expected ')' before 'identical' 14 | if(is identical)cout<<"yes"<<endl; | ~ ^~~~~~~~~~ | )
s286821207
p03698
C++
#include<iostream> #include<string.h> using namespace std; #define M 100 int main() { char str1[M],str2[M]; int res; cin>>str1>>str2; strrev(str2); res=strcmp(str1, str2); if(res == 0){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 13 | strrev(str2); | ^~~~~~ | strsep
s820215033
p03698
C++
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0); ios_base::sync_with_stdio(false); string s; cin>>s; char c[30]; for(int i=0;i<s.length();i++){ c[i]=s[i]; } sort(c,c+n); int f=0; for(int i=0;i<s.length()-1;i++){ if(c[i]==c[i+1]){ f++; } } if(f){ cout<<"no"; }else{ cout<<"yes"; } }
a.cc: In function 'int main()': a.cc:13:12: error: 'n' was not declared in this scope 13 | sort(c,c+n); | ^