submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s802823643
p03760
C++
#include<bits/stdc++.h> #include<string> #include<cctype> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ string O,E; int i; cin >> O >> E; if(O.size()==E.size()){ rep(i,O.size()){ cout << O[i] << E[i]; } }ekse{ rep(i,E.size()){ cout << O[i] << E[i]; } cout << O[o.size()]; } cout << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:15:4: error: 'ekse' was not declared in this scope 15 | }ekse{ | ^~~~
s156730022
p03760
C++
include <iostream> using namespace std; int main(void){ char ki[50], gu[50], sum[100]; int cki=0, cgu=0; cin >> ki; cin >> gu; for(int i=0; ; i++){ if(i%2 == 0){ sum[i] = ki[cki]; cki++; }else{ sum[i] = gu[cgu]; cgu++; } if(ki[cki]=='\0' && gu[cgu]=='\0') break; } cout << sum << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | cin >> ki; | ^~~ a.cc:22:9: error: 'cout' was not declared in this scope 22 | cout << sum << endl; | ^~~~ a.cc:22:24: error: 'endl' was not declared in this scope 22 | cout << sum << endl; | ^~~~
s828313065
p03760
C++
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include <sstream> #include<iomanip> //#include<bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; for (int i = 0; i < a.size(); i++){ cout << a[i] if(b.size()>i)cout<< b[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:28:29: error: expected ';' before 'if' 28 | cout << a[i] | ^ | ; 29 | if(b.size()>i)cout<< b[i]; | ~~
s161245436
p03760
C++
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include <sstream> #include<iomanip> //#include<bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; for (int i = 0; i < a.size(); i++){ cout << a[i] if(b.size>i)cout<< b[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:28:29: error: expected ';' before 'if' 28 | cout << a[i] | ^ | ; 29 | if(b.size>i)cout<< b[i]; | ~~
s964420663
p03760
C++
#include<iostream> #include<string> using namespace std; int main() { string o, e; cin >> o >> e; for (int i = 0; i < o.size(); i++) { cout << o[i]; if (i < e.size())cout << e[i]; } cout << endl; return 0;
a.cc: In function 'int main()': a.cc:14:18: error: expected '}' at end of input 14 | return 0; | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s453101224
p03760
C++
#include <iostream> #include <cstdio> #include <cmath> #include <string> using namespace std; typedef long long ll; int main(){ string o, e; cin>>o>>e; if(o.size()==e.size()){ for(int i=0; i<o.size(); ++i){ cout<<o[i]<<e[i]; } }else{ for(int i=0; i<e.size(); ++i){ cout<<o[i]<<e[i]; } cout<<o[o.size()-1] } cout<<endl; }
a.cc: In function 'int main()': a.cc:20:24: error: expected ';' before '}' token 20 | cout<<o[o.size()-1] | ^ | ; 21 | } | ~
s862945736
p03760
C++
#include<cstdio> #include<vector> #include<iostream> using namespace std; int gcd(int a,int b){if(a<b){swap(a,b);}if(b==0){return a;}return gcd(a%b,b);} int main(void){ string a,b,c; cin>>a>>b; for(i=0;i<b.size();i++){ c.push_back(a[i]); c.push_back(b[i]); } if(a.size()>b.size()){c.push_back(a.back());} cout<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: 'i' was not declared in this scope 9 | for(i=0;i<b.size();i++){ | ^
s622471779
p03760
C++
#include <iostream> #include <string> using namespace std; int main() { string O; string E; cin >> O; cin >> E; for(int i =0; i <E.size(); i++) { cout<< E[i]; } if{(i < O.size()) c.out << O[i]; } return 0; }
a.cc: In function 'int main()': a.cc:16:3: error: expected '(' before '{' token 16 | if{(i < O.size()) c.out << O[i]; | ^ | (
s378506208
p03760
C++
#include <iostream> #include <string> using namespace std; int main() { string O; string E; cin >> O; cin >> E; for(int i =0; i <E.size(); i++) { cout<< E[i]; } if{(i < O.size()) c.out << O[i]; } return 0; }
a.cc: In function 'int main()': a.cc:16:3: error: expected '(' before '{' token 16 | if{(i < O.size()) c.out << O[i]; | ^ | (
s169040613
p03760
C++
#include <iostream> #include <string> using namespace std; int main() { string O, E; cin >> O >> E; for (int i = 0; i < O.length; i++) { cout << O[i]; if (i < E.length) { cout << E[i]; } } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 9 | for (int i = 0; i < O.length; i++) | ~~^~~~~~ | () a.cc:12:27: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 12 | if (i < E.length) | ~~^~~~~~ | ()
s761422649
p03760
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s1,s2; cin>>s1>>s2; reverse(s2.begin(),s2.end()); s1+=s2; for(int i=0;i<s1.size();i++){ if(i%2)cout<<s[i/2]; else cout<<s[s.size()-1-i/2]; } }
a.cc: In function 'int main()': a.cc:9:14: error: 's' was not declared in this scope 9 | if(i%2)cout<<s[i/2]; | ^ a.cc:10:12: error: 's' was not declared in this scope 10 | else cout<<s[s.size()-1-i/2]; | ^
s288737640
p03760
C++
#include <iostream> #include <string> using namespace std; int main(void){ string odd, even; cin >> odd >> even; string e,o; e = even.size(); o = odd.size(); for(int i = 0; i <= e + o; i++){} return 0; }
a.cc: In function 'int main()': a.cc:12:20: error: no match for 'operator<=' (operand types are 'int' and 'std::__cxx11::basic_string<char>') 12 | for(int i = 0; i <= e + o; i++){} | ~ ^~ ~~~~~ | | | | int std::__cxx11::basic_string<char> In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:469:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 469 | operator<=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:469:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/bits/stl_iterator.h:513:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 513 | operator<=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:513:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/bits/stl_iterator.h:1704:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1704 | operator<=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1704:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/bits/stl_iterator.h:1767:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1767 | operator<=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1767:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1064:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1064 | operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1064:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::pair<_T1, _T2>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:717:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 717 | operator<=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:717:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/string_view:724:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<=(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 724 | operator<=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:724:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/string_view:732:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<=(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 732 | operator<=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:732:5: note: template argument deduction/substitution failed: a.cc:12:27: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/bits/basic_string.h:3956:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3956 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3956:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/bits/basic_string.h:3970:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3970 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3970:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ /usr/include/c++/14/bits/basic_string.h:3983:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3983 | operator<=(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3983:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const _CharT*' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2625:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2625 | operator<=(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2625:5: note: template argument deduction/substitution failed: a.cc:12:27: note: mismatched types 'const std::tuple<_UTypes ...>' and 'int' 12 | for(int i = 0; i <= e + o; i++){} | ^
s989851884
p03760
C++
#include <iostream> #include <string> int main(void) using namespace std; string odd, even; cin >> odd >> even; string e,o; e = even.size(); o = odd.size(); for(int i = 0; i <= e + o; i++) return 0; }
a.cc:7:9: error: expected initializer before 'using' 7 | using namespace std; | ^~~~~ a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'? 8 | string odd, even; | ^~~~~~ | stdin a.cc:9:3: error: 'cin' does not name a type 9 | cin >> odd >> even; | ^~~ a.cc:10:3: error: 'string' does not name a type; did you mean 'stdin'? 10 | string e,o; | ^~~~~~ | stdin a.cc:11:3: error: 'e' does not name a type 11 | e = even.size(); | ^ a.cc:12:3: error: 'o' does not name a type 12 | o = odd.size(); | ^ a.cc:13:3: error: expected unqualified-id before 'for' 13 | for(int i = 0; i <= e + o; i++) | ^~~ a.cc:13:18: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:13:30: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:15:12: error: expected declaration before '}' token 15 | return 0; } | ^
s728920802
p03760
C++
#include <iostream> #include <string> int main(void) using namespace std; string odd, even; cin >> odd >> even; string e, o; e = even.size(); o = odd.size(); for(int i = 0; i <= e + o; i++) { // if(i % 2 == 0){ // cout << odd[i / 2]; } // else{ // cout << even[(i - 1) / 2]; } return 0; }
a.cc:7:9: error: expected initializer before 'using' 7 | using namespace std; | ^~~~~ a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'? 8 | string odd, even; | ^~~~~~ | stdin a.cc:9:3: error: 'cin' does not name a type 9 | cin >> odd >> even; | ^~~ a.cc:10:3: error: 'string' does not name a type; did you mean 'stdin'? 10 | string e, o; | ^~~~~~ | stdin a.cc:11:3: error: 'e' does not name a type 11 | e = even.size(); | ^ a.cc:12:3: error: 'o' does not name a type 12 | o = odd.size(); | ^ a.cc:13:3: error: expected unqualified-id before 'for' 13 | for(int i = 0; i <= e + o; i++) | ^~~ a.cc:13:18: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:13:30: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:20:5: error: expected declaration before '}' token 20 | } | ^ a.cc:21:2: error: expected unqualified-id before 'return' 21 | return 0; } | ^~~~~~ a.cc:21:12: error: expected declaration before '}' token 21 | return 0; } | ^
s229581087
p03760
C++
#include <iostream> #include <string> int main(void) using namespace std; string odd, even; cin >> odd >> even; string e, o; e = even.size(); o = odd.size(); for(int i = 0; i <= e + o; i++) { // if(i % 2 == 0){ // cout << odd[i / 2]; } // else{ // cout << even[(i - 1) / 2]; } return 0; }
a.cc:7:9: error: expected initializer before 'using' 7 | using namespace std; | ^~~~~ a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'? 8 | string odd, even; | ^~~~~~ | stdin a.cc:9:3: error: 'cin' does not name a type 9 | cin >> odd >> even; | ^~~ a.cc:10:3: error: 'string' does not name a type; did you mean 'stdin'? 10 | string e, o; | ^~~~~~ | stdin a.cc:11:3: error: 'e' does not name a type 11 | e = even.size(); | ^ a.cc:12:3: error: 'o' does not name a type 12 | o = odd.size(); | ^ a.cc:13:3: error: expected unqualified-id before 'for' 13 | for(int i = 0; i <= e + o; i++) | ^~~ a.cc:13:18: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:13:30: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:20:5: error: expected declaration before '}' token 20 | } | ^ a.cc:21:2: error: expected unqualified-id before 'return' 21 | return 0; } | ^~~~~~ a.cc:21:12: error: expected declaration before '}' token 21 | return 0; } | ^
s299296937
p03760
C++
#include <iostream> #include <string> int main(void) using namespace std; string odd, even; cin >> odd >> even; string e, o; e = even.size(); o = odd.size(); for(int i = 0; i <= e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc:7:9: error: expected initializer before 'using' 7 | using namespace std; | ^~~~~ a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'? 8 | string odd, even; | ^~~~~~ | stdin a.cc:9:3: error: 'cin' does not name a type 9 | cin >> odd >> even; | ^~~ a.cc:10:3: error: 'string' does not name a type; did you mean 'stdin'? 10 | string e, o; | ^~~~~~ | stdin a.cc:11:3: error: 'e' does not name a type 11 | e = even.size(); | ^ a.cc:12:3: error: 'o' does not name a type 12 | o = odd.size(); | ^ a.cc:13:3: error: expected unqualified-id before 'for' 13 | for(int i = 0; i <= e + o; i++) | ^~~ a.cc:13:18: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:13:30: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^
s321847294
p03760
C++
#include <iostream> #include <string> int main(void) using namespace std; string odd, even; cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i <= e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc:7:9: error: expected initializer before 'using' 7 | using namespace std; | ^~~~~ a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'? 8 | string odd, even; | ^~~~~~ | stdin a.cc:9:3: error: 'cin' does not name a type 9 | cin >> odd >> even; | ^~~ a.cc:11:3: error: 'e' does not name a type 11 | e = even.size(); | ^ a.cc:12:3: error: 'o' does not name a type 12 | o = odd.size(); | ^ a.cc:13:3: error: expected unqualified-id before 'for' 13 | for(int i = 0; i <= e + o; i++) | ^~~ a.cc:13:18: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^ a.cc:13:30: error: 'i' does not name a type 13 | for(int i = 0; i <= e + o; i++) | ^
s804249933
p03760
C++
#include <iostream> #include <string> int main(void) using namespace std; string odd, even; cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc:7:9: error: expected initializer before 'using' 7 | using namespace std; | ^~~~~ a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'? 8 | string odd, even; | ^~~~~~ | stdin a.cc:9:3: error: 'cin' does not name a type 9 | cin >> odd >> even; | ^~~ a.cc:11:3: error: 'e' does not name a type 11 | e = even.size(); | ^ a.cc:12:3: error: 'o' does not name a type 12 | o = odd.size(); | ^ a.cc:13:3: error: expected unqualified-id before 'for' 13 | for(int i = 0; i < e + o; i++) | ^~~ a.cc:13:18: error: 'i' does not name a type 13 | for(int i = 0; i < e + o; i++) | ^ a.cc:13:29: error: 'i' does not name a type 13 | for(int i = 0; i < e + o; i++) | ^
s974310451
p03760
C++
#include <iostream> #include <string> int main(void) { using namespace std; string odd, even; { cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:21:13: error: expected '}' at end of input 21 | return 0; } | ^ a.cc:9:2: note: to match this '{' 9 | { cin >> odd >> even; | ^ a.cc:21:13: error: expected '}' at end of input 21 | return 0; } | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s914422142
p03760
C++
#include <iostream> #include <string> int main(void) { using namespace std; string odd, even; cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:21:13: error: expected '}' at end of input 21 | return 0; } | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s320463658
p03760
C++
#include <iostream> #include <string> using namespace std; { int main() cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc:6:1: error: expected unqualified-id before '{' token 6 | { | ^
s248865730
p03760
C++
#include <iostream> #include <string> using namespace std; int main() { cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: 'odd' was not declared in this scope 8 | cin >> odd >> even; | ^~~ a.cc:8:17: error: 'even' was not declared in this scope 8 | cin >> odd >> even; | ^~~~ a.cc:20:13: error: expected '}' at end of input 20 | return 0; } | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s898292427
p03760
C++
#include <iostream> using namespace std; int main() { cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:7:10: error: 'odd' was not declared in this scope 7 | cin >> odd >> even; | ^~~ a.cc:7:17: error: 'even' was not declared in this scope 7 | cin >> odd >> even; | ^~~~ a.cc:19:13: error: expected '}' at end of input 19 | return 0; } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s979115035
p03760
C++
#include <iostream> using namespace std; int main() { cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:12:10: error: 'odd' was not declared in this scope 12 | cin >> odd >> even; | ^~~ a.cc:12:17: error: 'even' was not declared in this scope 12 | cin >> odd >> even; | ^~~~ a.cc:24:13: error: expected '}' at end of input 24 | return 0; } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s029500974
p03760
C++
#include <iostream> using namespace std; int main() { int main() cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main() | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main() | ^~ | -- a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable a.cc:12:3: error: expected initializer before 'cin' 12 | cin >> odd >> even; | ^~~ a.cc:14:7: error: 'even' was not declared in this scope 14 | e = even.size(); | ^~~~ a.cc:15:7: error: 'odd' was not declared in this scope 15 | o = odd.size(); | ^~~ a.cc:24:13: error: expected '}' at end of input 24 | return 0; } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s358965077
p03760
C++
#include <aiostream> using namespace std; int main() { int main() cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc:1:10: fatal error: aiostream: No such file or directory 1 | #include <aiostream> | ^~~~~~~~~~~ compilation terminated.
s564882228
p03760
C++
#include <stdio.h> using namespace std; int main() { int main() cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main() | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main() | ^~ | -- a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable a.cc:12:3: error: expected initializer before 'cin' 12 | cin >> odd >> even; | ^~~ a.cc:14:7: error: 'even' was not declared in this scope 14 | e = even.size(); | ^~~~ a.cc:15:7: error: 'odd' was not declared in this scope 15 | o = odd.size(); | ^~~ a.cc:19:7: error: 'cout' was not declared in this scope 19 | cout << odd[i / 2]; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | using namespace std; a.cc:22:7: error: 'cout' was not declared in this scope 22 | cout << even[(i - 1) / 2]; | ^~~~ a.cc:22:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:24:13: error: expected '}' at end of input 24 | return 0; } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s844233444
p03760
C++
#include <stdio.h> using namespace std; int main() { int main() cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } } return 0;
a.cc: In function 'int main()': a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main() | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main() | ^~ | -- a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable a.cc:11:3: error: expected initializer before 'cin' 11 | cin >> odd >> even; | ^~~ a.cc:13:7: error: 'even' was not declared in this scope 13 | e = even.size(); | ^~~~ a.cc:14:7: error: 'odd' was not declared in this scope 14 | o = odd.size(); | ^~~ a.cc:18:7: error: 'cout' was not declared in this scope 18 | cout << odd[i / 2]; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | using namespace std; a.cc:21:7: error: 'cout' was not declared in this scope 21 | cout << even[(i - 1) / 2]; | ^~~~ a.cc:21:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:24:12: error: expected '}' at end of input 24 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s638226301
p03760
C++
#include <stdio.h> using namespace std; int main() { string even, odd; int main() { cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++) { if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } } return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'string' was not declared in this scope 7 | string even, odd; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#include <string> 2 | using namespace std; a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main() | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main() | ^~ | -- a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable a.cc:10:1: error: a function-definition is not allowed here before '{' token 10 | { | ^ a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s434226727
p03760
C++
#include<iostream> #include <string> using namespace std; int main(){ string O,E,A,b,c; cin>>O; cin>>E; for(int i=0;O.size() =< i;i++){ b = O.substr(i,1); c = E.substr(i,1); A += b+c; } cout<<A<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:23: error: expected primary-expression before '<' token 8 | for(int i=0;O.size() =< i;i++){ | ^
s558793115
p03760
C++
#include <stdio.h> using namespace std; int main(){ string even, odd; {int main(){ cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++){ if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } } return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'string' was not declared in this scope 6 | string even, odd; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#include <string> 2 | using namespace std; a.cc:8:10: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 8 | {int main(){ | ^~ a.cc:8:10: note: remove parentheses to default-initialize a variable 8 | {int main(){ | ^~ | -- a.cc:8:10: note: or replace parentheses with braces to value-initialize a variable a.cc:8:12: error: a function-definition is not allowed here before '{' token 8 | {int main(){ | ^ a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:8:1: note: to match this '{' 8 | {int main(){ | ^ a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s283215520
p03760
C++
#include <stdio.h> using namespace std; int main(){ string even, odd; int main(){ cin >> odd >> even; int e, o; e = even.size(); o = odd.size(); for(int i = 0; i < e + o; i++){ if(i % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(i - 1) / 2]; } } return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'string' was not declared in this scope 6 | string even, odd; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <stdio.h> +++ |+#include <string> 2 | using namespace std; a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 8 | int main(){ | ^~ a.cc:8:9: note: remove parentheses to default-initialize a variable 8 | int main(){ | ^~ | -- a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable a.cc:8:11: error: a function-definition is not allowed here before '{' token 8 | int main(){ | ^ a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s768929750
p03760
C++
#include <stdio.h> using namespace std; int main(){ cin >> odd >> even; int e, o; a = even.size(); b = odd.size(); for(int a = 0; a < b + a; a++){ if(a % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(a - 1) / 2]; } } return 0 }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> odd >> even; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | using namespace std; a.cc:5:10: error: 'odd' was not declared in this scope 5 | cin >> odd >> even; | ^~~ a.cc:5:17: error: 'even' was not declared in this scope 5 | cin >> odd >> even; | ^~~~ a.cc:7:3: error: 'a' was not declared in this scope 7 | a = even.size(); | ^ a.cc:8:3: error: 'b' was not declared in this scope 8 | b = odd.size(); | ^ a.cc:11:7: error: 'cout' was not declared in this scope 11 | cout << odd[i / 2]; | ^~~~ a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:19: error: 'i' was not declared in this scope 11 | cout << odd[i / 2]; | ^ a.cc:14:7: error: 'cout' was not declared in this scope 14 | cout << even[(a - 1) / 2]; | ^~~~ a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:17:11: error: expected ';' before '}' token 17 | return 0 | ^ | ; 18 | } | ~
s630776075
p03760
C++
#include <stdio.h> using namespace std; int main(){ double a, b; for(int a = 0; a < b + a; a++){ if(a % 2 == 0){ cout << odd[i / 2]; } else{ cout << even[(a - 1) / 2]; } } return 0 }
a.cc: In function 'int main()': a.cc:9:7: error: 'cout' was not declared in this scope 9 | cout << odd[i / 2]; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | using namespace std; a.cc:9:15: error: 'odd' was not declared in this scope 9 | cout << odd[i / 2]; | ^~~ a.cc:9:19: error: 'i' was not declared in this scope 9 | cout << odd[i / 2]; | ^ a.cc:12:7: error: 'cout' was not declared in this scope 12 | cout << even[(a - 1) / 2]; | ^~~~ a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:15: error: 'even' was not declared in this scope 12 | cout << even[(a - 1) / 2]; | ^~~~ a.cc:15:11: error: expected ';' before '}' token 15 | return 0 | ^ | ; 16 | } | ~
s740069088
p03760
C++
#include<iostream> #include <string> using namespace std; int main(){ string O,E,A,b,c; cin>>O; cin>>E; for(i=0;O.size() < i;i++){ b = O.substr(i,1); c = E.substr(i,1); A=A+b+c; } cout<<A<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'i' was not declared in this scope 8 | for(i=0;O.size() < i;i++){ | ^
s131033175
p03760
C
#include<iostream> #include <string> using namespace std; int main(){ string O,E,A,b,c; cin>>O; cin>>E; for(i=0;O.size() < i;i++){ b = O.substr(i,1); c = E.substr(i,1); A=A+b+c; } cout<<A<<endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s494727954
p03760
C++
#include <iostream> using namespace std; int main() { string o, e; char ans[1000]; int i; cin >> o >> e; for (i = 0; i < o.size(); i++){ ans[i * 2] = o[i]; if (i + 1 == o.size() && o.size == e.size() - 1){ ans[i * 2 + 1] = e[i]; } } cout << ans << endl; return(0); }
a.cc: In function 'int main()': a.cc:14:44: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 14 | if (i + 1 == o.size() && o.size == e.size() - 1){ | ~~^~~~ | ()
s059584762
p03760
C++
#include <bits/stdc++.h> using namespace std; int main(){ string O, E; cin >> O; cin >> E; for(int i = 0, i < (O + E).size(), i++){ if(i % 2) cout << O[i / 2]; else cout << E[i / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: expected ';' before '<' token 9 | for(int i = 0, i < (O + E).size(), i++){ | ^~ | ; a.cc:9:20: error: expected primary-expression before '<' token 9 | for(int i = 0, i < (O + E).size(), i++){ | ^ a.cc:9:41: error: expected ';' before ')' token 9 | for(int i = 0, i < (O + E).size(), i++){ | ^ | ;
s749305372
p03760
C++
#include <bits/stdc++.h> using namespace std; int main(){ string O, E; cin >> O; cin >> E; for(int i = 1, i <=(O + E).size(), i++){ if(i % 2) cout << O[i / 2]; else cout << E[i / 2]; } return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: expected ';' before '<=' token 9 | for(int i = 1, i <=(O + E).size(), i++){ | ^~~ | ; a.cc:9:20: error: expected primary-expression before '<=' token 9 | for(int i = 1, i <=(O + E).size(), i++){ | ^~ a.cc:9:41: error: expected ';' before ')' token 9 | for(int i = 1, i <=(O + E).size(), i++){ | ^ | ;
s460974631
p03760
C++
#include<stdio.h> int main(void){ int i; int n=0; char strO[50]; char strE[50]; gets(strO); gets(strE); while (strO[n] != '\0') { n++; } for(i=0;i<n;i++){ printf("%s",strO[i]); printf("%s",strE[i]); } return 0; }
a.cc: In function 'int main()': a.cc:10:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(strO); | ^~~~ | getw
s489956033
p03760
C
#include<stdio.h> int main(void){ int i,j,n; char strO[50]; char strE[50]; scanf("%s",strO); scanf("%s",strE); for(i=0;i<50;i++){ if(strO[i]=='\0'){ n=i; } for(j=0;j<n;j++){ printf("%s",strO[j]); printf("%s",strE[j]); } return 0; }
main.c: In function 'main': main.c:21:1: error: expected declaration or statement at end of input 21 | } | ^
s532346428
p03760
C
#include<stdio.h> int main(void){ int i,j,n; char strO[50]; char strE[50]; scanf("%s",strO); scanf("%s",strE); for(i=0;i<50;i++){ if(arrayO[i]=='\0'){ n=i; } for(j=0;j<n;j++){ printf("%s",strO[j]); printf("%s",strE[j]); } return 0; }
main.c: In function 'main': main.c:11:4: error: 'arrayO' undeclared (first use in this function) 11 | if(arrayO[i]=='\0'){ | ^~~~~~ main.c:11:4: note: each undeclared identifier is reported only once for each function it appears in main.c:21:1: error: expected declaration or statement at end of input 21 | } | ^
s571262845
p03760
C
#include<stdio.h> int main(void){ int i,j,n; char arrayO[50]; char arrayE[50]; scanf("%s",arrayO); scanf("%s",arrayE); for(i=0;i<50;i++){ if(arrayO[i]=='\0'){ n=i; } for(j=0;j<n;J++){ printf("%s",arrayO[j]); printf("%s",arrayE[j]); } return 0; }
main.c: In function 'main': main.c:15:13: error: 'J' undeclared (first use in this function) 15 | for(j=0;j<n;J++){ | ^ main.c:15:13: note: each undeclared identifier is reported only once for each function it appears in main.c:21:1: error: expected declaration or statement at end of input 21 | } | ^
s024828556
p03760
C++
#include <iostream> using namespace std; void main{ return; }
a.cc:4:6: error: variable or field 'main' declared void 4 | void main{ | ^~~~ a.cc:5:1: error: expected primary-expression before 'return' 5 | return; | ^~~~~~ a.cc:5:1: error: expected '}' before 'return' a.cc:4:10: note: to match this '{' 4 | void main{ | ^ a.cc:6:1: error: expected declaration before '}' token 6 | } | ^
s005269392
p03760
C++
int main(){ return; }
a.cc: In function 'int main()': a.cc:2:1: error: return-statement with no value, in function returning 'int' [-fpermissive] 2 | return; | ^~~~~~
s743363876
p03760
C++
#include < iostream > using namespace std ; int main () { string E, O; cin >> E >> O; for (int i=0; i < E. size () ; i++) { cout << E[i]; if(i < O. size () ) cout << O[i]; } return 0; }
a.cc:1:10: fatal error: iostream : No such file or directory 1 | #include < iostream > | ^~~~~~~~~~~~ compilation terminated.
s773743966
p03760
C++
#include<iostream> void main(){ return; }
a.cc:2:1: error: '::main' must return 'int' 2 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:3:1: error: return-statement with no value, in function returning 'int' [-fpermissive] 3 | return; | ^~~~~~
s101115792
p03760
C++
void main(){ return }
a.cc:1:1: error: '::main' must return 'int' 1 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:3:1: error: expected primary-expression before '}' token 3 | } | ^ a.cc:2:7: error: expected ';' before '}' token 2 | return | ^ | ; 3 | } | ~
s135128092
p03760
C
#include<stdio.h> int main() { int i; char a[100], b[100]; scanf_s("%s", a); scanf_s("%s", b); for (i = 0; a[i+1] != '\0' && b[i+1] != '\0'; i++) printf("%c%c", a[i], b[i]); printf("\n"); return 0; }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%s", a); | ^~~~~~~ | scanf
s990160233
p03760
C++
#include <iostream> #include <string> using namespace std; int main() { string o,e; cin>>o>>e; for(int i=0;o[i]!=\0;i++) { cout<<o[i]; if(i%2==1) { cout<<e[i]; } } return 0; }
a.cc:10:23: error: stray '\' in program 10 | for(int i=0;o[i]!=\0;i++) | ^
s341423361
p03760
C
#include<stdio.h> int main(){ char a1[50],a2[50],txt[100]; int i,cnt scanf("%s",a1); scanf("%s",a2); for(i=0;;++i){ if(i%2==0) txt[i]=a1[i]; if(i%2==1) txt[i]=a2[i]; if(a1[i] == '\0' || a2[i] == '\0') break; } printf("%s\n",txt); return 0; }
main.c: In function 'main': main.c:7:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 7 | scanf("%s",a1); | ^~~~~
s839580944
p03760
C
#include<stdio.h> int main(){ char a1[50],a2[50],txt[100]; int i,cnt scanf("%s",a1); scanf("%s",a2); for(i=0;;++i){ if(i\2==0) txt[i]=a1[i]; if(i\2==1) txt[i]=a2[i]; if(a1[i] == '\0' || a2[i] == '\0') break; } printf("%s\n"txt); return 0; }
main.c: In function 'main': main.c:7:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 7 | scanf("%s",a1); | ^~~~~ main.c:11:21: error: stray '\' in program 11 | if(i\2==0) txt[i]=a1[i]; | ^ main.c:11:21: error: expected ')' before numeric constant 11 | if(i\2==0) txt[i]=a1[i]; | ~ ^~ | ) main.c:12:21: error: stray '\' in program 12 | if(i\2==1) txt[i]=a2[i]; | ^ main.c:12:21: error: expected ')' before numeric constant 12 | if(i\2==1) txt[i]=a2[i]; | ~ ^~ | ) main.c:17:22: error: expected ')' before 'txt' 17 | printf("%s\n"txt); | ~ ^~~ | )
s602716284
p03760
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <queue> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); string O,E; cin >> O >> E; int n = O.size(); int m = E.size(); for(int i = 0; i < n; i++){ cout << O[i] << (i != m ? E[i] : ''); } cout << endl; }
a.cc:18:38: error: empty character constant 18 | cout << O[i] << (i != m ? E[i] : ''); | ^~
s560622723
p03760
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String O = sc.nextLine(); String E = sc.nextLine(); for (int i = 0; i < O.length() + E.length() ; i++) { if (i % 2 == 0) { System.out.println(O.charAt(i/2)); } else { Sustem.out.println(E.charAt(i/2)); } } } }
Main.java:14: error: package Sustem does not exist Sustem.out.println(E.charAt(i/2)); ^ 1 error
s185966943
p03760
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String O = sc.nextLine(); String E = sc.nextLine(); for (int i = 0; i < O.length() + E.length() ; i++) { if (i % 2 == 0) { System.out.println(O.charAt(i/2)) } else { Sustem.out.println(E.charAt(i/2)) } } }
Main.java:12: error: ';' expected System.out.println(O.charAt(i/2)) ^ Main.java:14: error: ';' expected Sustem.out.println(E.charAt(i/2)) ^ Main.java:17: error: reached end of file while parsing } ^ 3 errors
s267888160
p03760
C++
#include <iostream> #include <string> using namespace std; int main(){ string s,t; cin>>s>>t; for(int i=0;i<s.size();i++){ cout<<s[i]; if(i<o.size()){ cout<<t[i]; } } return 0; }
a.cc: In function 'int main()': a.cc:16:22: error: 'o' was not declared in this scope 16 | if(i<o.size()){ | ^
s829667574
p03760
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.begin(),X.end() #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) for(int i=0;i<(int)(n);i++) #define pb push_back #define pii pair<int,int> #define mp make_pair #define pi 3.14159265359 #define shosu(X) fixed << setprecision(X) 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(){ string a,b; cin >> a >> b; for(int i = 0; i < a.size()+b.size(); i++){ if(i % 2 == 0) cout << a[i/2]; else cout << b[(i-1)/2]; } cout << endl; } }
a.cc:27:1: error: expected declaration before '}' token 27 | } | ^
s968417387
p03760
C
#include <stdio.h> int main(void) { char O[52],E[52]; int i; scanf ("%s %s",O,E); if (sizeof(O) == sizeof(E)) { for (i = 0;i < sizeof(O);i++) { putc(O[i]); putc(E[i]); } } else { for (i = 0;i < sizeof(O);i++) { if (i != sizeof(O) - 1) { putc(O[i]); putc(E[i]); } else { putc(O[i]); } } } return 0; }
main.c: In function 'main': main.c:9:7: error: too few arguments to function 'putc' 9 | putc(O[i]); | ^~~~ In file included from main.c:1: /usr/include/stdio.h:612:12: note: declared here 612 | extern int putc (int __c, FILE *__stream) __nonnull ((2)); | ^~~~ main.c:10:7: error: too few arguments to function 'putc' 10 | putc(E[i]); | ^~~~ /usr/include/stdio.h:612:12: note: declared here 612 | extern int putc (int __c, FILE *__stream) __nonnull ((2)); | ^~~~ main.c:15:9: error: too few arguments to function 'putc' 15 | putc(O[i]); | ^~~~ /usr/include/stdio.h:612:12: note: declared here 612 | extern int putc (int __c, FILE *__stream) __nonnull ((2)); | ^~~~ main.c:16:9: error: too few arguments to function 'putc' 16 | putc(E[i]); | ^~~~ /usr/include/stdio.h:612:12: note: declared here 612 | extern int putc (int __c, FILE *__stream) __nonnull ((2)); | ^~~~ main.c:18:7: error: too few arguments to function 'putc' 18 | putc(O[i]); | ^~~~ /usr/include/stdio.h:612:12: note: declared here 612 | extern int putc (int __c, FILE *__stream) __nonnull ((2)); | ^~~~
s135885286
p03760
C
#include <stdio.h> int main(void) { char O[52],E[52]; int i; scanf ("%s %s",O,E); if (sizeof(O) == sizeof(E)) { for (i = 0;i < sizeof(O);i++) { printf ("%c%c",&O[i],&S[i]); } } else { for (i = 0;i < sizeof(O);i++) { if (i != sizeof(O) - 1) { printf ("%c%c",&O[i],&S[i]); } else { printf ("%c",&O[i]); } } } return 0; }
main.c: In function 'main': main.c:9:29: error: 'S' undeclared (first use in this function) 9 | printf ("%c%c",&O[i],&S[i]); | ^ main.c:9:29: note: each undeclared identifier is reported only once for each function it appears in
s766227948
p03760
C++
#include <iostream> #include <sstream> #include <vector> #include <cmath> #include <ctime> #include <cassert> #include <iomanip> #include <cstdio> #include <float.h> #include <queue> #include <set> #include <map> #include <fstream> #include <cstdlib> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <stack> #include <functional> using namespace std; #define endl '\n' #define MOD 1000000007 #define INF 1ll<<30 // #define MAX 100010 #define eps 1e-11 #define bit_max 1ll<<32 #define _USE_MATH_DEFINES // long long binpow(long long a,long long b) // { // if (b == 1) return a; // long long res = binpow(a, b/2)%MOD; // if (b % 2) return (res*((res*a)%MOD))%MOD; // else return (res * res)%MOD; // } // long long int fact(long long int a) // { // if(a==0||a==1) // return 1; // long long int ans = 1; // for(int i=a;i>=1;i--) // ans = (ans * i); // return ans; // } // long long int ivmod(long long int a) // { // return binpow(a,MOD-2); // } // long long int ncr(long long int a,long long int b) // { // long long int pans=1; // for(int i =a;i>max(b,a-b);i--) // pans=pans*i; // long long int div = fact(min(b,a-b)); // // cout<<ans<<" "<<div<<endl; // pans = pans/div; // return pans; // } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); // #ifndef ONLINE_JUDGE // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); // #endif string a ,b; cin>>a>>b; string c=""; int x =0,y=0; for(int i=0;i<a.length()+b.length();i++) { if((i+1)%2==0) { cout<<a[x]; x++; } else { cout<<b[z]; z++; } } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:91:21: error: 'z' was not declared in this scope 91 | cout<<b[z]; | ^
s359742628
p03760
Java
import java.util.*; import java.io.*; import java.lang.*; import static java.lang.System.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(in); String odd = sc.nextLine(); String even = sc.nextLine(); char[] result = new char[odd.length()+even.length()]; for (int i = 0; i < odd.length(); i++) { result[i*2] = odd.charAt(i); } for (int i = 0; i < even.length(); i++) { result[i*2+1] = even.charAt(i); } out.println(result); }
Main.java:19: error: reached end of file while parsing } ^ 1 error
s215650382
p03760
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <list> #include <vector> #include <set> #include <stdio.h> #include <queue> #include <stack> #include <deque> #include <math.h> #include <sstream> #include <stdlib.h> #include <functional> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) #define rrep(i,a,n) for(int i = a; i < n; i++) #define INF (1<<29) #define INFL 0x3f3f3f3f3f3f3f3fLL #define MOD 1000000007 #define fi first #define se second #define pb push_back #define PI 3.14159265358979323846 #define all(o) (o).begin(), (o).end() #define rall(x) x.rbegin(),x.rend() typedef double ld; typedef vector<int> vi; typedef vector< vi > vvi; typedef vector<string> vs; typedef vector<char> vc; typedef vector<ld> vd; typedef vector < vc > vvc; typedef long long ll; typedef pair<int, int> pii; typedef unsigned long long int ulli; const int dx[] = { 1, 0, -1, 0 }; const int dy[] = { 0, 1, 0, -1 }; template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); } template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); } const ld eps = 1e-10, pi = acos(-1.0); #define MAX_N 100001 // combination ll fact[MAX_N], factinv[MAX_N]; ll mod_pow(ll n, ll p, ll m) { ll a = n; ll x = 1; while (p) { if (p & 1) x = (x * a) % m; a = (a * a) % m; p >>= 1; } return x; } int extgcd(int a, int b, int& x, int&y) { int d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int mod_inverse(int a, int m) { int x, y; extgcd(a, m, x, y); return (m + x % m) % m; } ll inv(ll n) { return mod_pow(n, MOD - 2, MOD); } void combInit() { fact[0] = 1; rrep(i, 1, MAX_N) fact[i] = fact[i - 1] * i % MOD; factinv[MAX_N - 1] = inv(fact[MAX_N - 1]); for (int i = MAX_N - 2; i >= 0; i--) factinv[i] = factinv[i + 1] * (i + 1) % MOD; } // ダイクストラ /* struct edge { int to, cost; }; vector < vector < edge > > G; vi d; void dijkstra(int s) {priority_queue<pii, vector< pii >, greater<pii> > que;d[s] = 0;que.push(pii(0, s));while (!que.empty()) {pii p = que.top(); que.pop();int v = p.second;if (d[v] < p.first) continue;rep(i, G[v].size()) {edge e = G[v][i];int cost = e.cost;if (d[v] + cost < d[e.to]) {d[e.to] = d[v] + e.cost;que.push(pii(d[e.to], e.to));}}}} */ // Union-Find木 int par[MAX_N], rnk[MAX_N], unionSize[MAX_N]; // はじめは全ての頂点が根 void UnionFindTreeInit(int n) { rep(i, n) { par[i] = i; rnk[i] = 0; unionSize[i] = 1; } } //木の根元を求める int root(int x) { if (par[x] == x) return x; // 根を返す else return par[x] = root(par[x]); } // 連結成分の大きさを取得 int componentSize(int x) { return unionSize[root(x)]; } // xとyが同じ集合に属するか否か bool same(int x, int y) { return root(x) == root(y); } // xとyの属する集合を併合 void unite(int x, int y) { x = root(x); y = root(y); if (x == y) return; if (rnk[x] < rnk[y]) { par[x] = y; unionSize[y] += unionSize[x]; } else { par[y] = x; if (rnk[x] == rnk[y]) rnk[x]++; unionSize[x] += unionSize[y]; } } //----------------------------------------------------------------- //int dx[8] = { -1, 1, 0, 0, 1, 1, -1, -1 }; //int dy[8] = { 0, 0, 1, -1, 1, -1, -1, 1 }; struct edge { int to, cost; }; vector < vector < edge > > G; vi d; void dijkstra(int s) { priority_queue<pii, vector< pii >, greater<pii> > que; d[s] = 0; que.push(pii(0, s)); while (!que.empty()) { pii p = que.top(); que.pop(); int v = p.second; if (d[v] < p.first) continue; rep(i, G[v].size()) { edge e = G[v][i]; int cost = e.cost; if (d[v] + cost < d[e.to]) { d[e.to] = d[v] + e.cost; que.push(pii(d[e.to], e.to)); } } } } //------------------------------------------------------- int main() { ios::sync_with_stdio(0); cin.tie(0); string s1,s2; cin >> s1; cin >> s2; rep(i, s2.size() * 2 + (s1.size() - s2.size()) { if (i % 2 == 0) { cout << s1[(i) / 2] ; } else { cout << s2[(i) / 2]; } } return 0; }
a.cc:189:2: error: unterminated argument list invoking macro "rep" 189 | } | ^ a.cc: In function 'int main()': a.cc:179:9: error: 'rep' was not declared in this scope 179 | rep(i, s2.size() * 2 + (s1.size() - s2.size()) { | ^~~ a.cc:179:12: error: expected '}' at end of input 179 | rep(i, s2.size() * 2 + (s1.size() - s2.size()) { | ^ a.cc:173:12: note: to match this '{' 173 | int main() { | ^
s978504208
p03760
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define rep(i,n) for(i=0;i<n;i++) int in(void){ int i; scanf("%d",&i); return i; } long long llin(void){ long long i; scanf("%lld",&i); return i; } int cmp(const void *a,const void *b){ return *(long long *)a-*(long long *)b; } long long min(long long a,long long b){ return a<b?a:b; } long long max(long long a,long long b){ return a>b?a:b; } void dfs(int now,int sum,int cnt){ int i; if(cnt==n){ ans+=sum==s; return ; } for(i=now;i<10;i++){ dfs(i+1,sum+i,cnt+1); } return ; } int main(void){ int i; char o[50],e[50]; scanf("%s %s",o,e); for(i=0;i<strlen(e);i++){ printf("%c%c",o[i],e[i]); } if(strlen(o)!=strlen(e)) printf("%c",o[i]); puts(""); return 0; }
main.c: In function 'dfs': main.c:28:17: error: 'n' undeclared (first use in this function) 28 | if(cnt==n){ | ^ main.c:28:17: note: each undeclared identifier is reported only once for each function it appears in main.c:29:17: error: 'ans' undeclared (first use in this function); did you mean 'abs'? 29 | ans+=sum==s; | ^~~ | abs main.c:29:27: error: 's' undeclared (first use in this function) 29 | ans+=sum==s; | ^
s625534321
p03760
C++
#include<cstdio> #include<cmath> #include<cstring> #include<cstdlib> #include<algorithm> #include<iostream> using namespace std; int main(){ char a[55],s[55]; char c[150]; int num1=0,num2=0; int lena,lens; gets(a); gets(s); lena=strlen(a); lens=strlen(s); for(int i=0; i<lena+lens; i++){ if(i%2==0){ c[i]=a[num1++]; } else{ c[i]=s[num2++]; } } printf("%s\n",c); return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 13 | gets(a); | ^~~~ | getw
s014870467
p03760
C++
#include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <fstream> #include <iostream> #include <map> #include <math.h> #include <memory> #include <queue> #include <sstream> #include <stdio.h> #include <string> #include <vector> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define POW(n) ((n) * (n)) #define ALL(a) (a).begin(), (a).end() #define dump(v) (cerr << #v << ": " << v << endl) #define cerr \ if (true) \ cerr using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<double> vd; typedef vector<string> vs; typedef vector<unsigned long long> vull; // ll n = to_T<ll>("114514") template <class T> T to_T(const string &s) { istringstream is(s); T res; is >> res; return res; } template <class T> string to_s(const T &a) { ostringstream os; os << a; return os.str(); } void solve(long long N, long long M) { ll ret = min(N, M / 2); M -= ret * 2; ret += M / 4; cout << ret << endl; } int main() { ios::sync_with_stdio(false); string a; string b; cin >> a; cin >> b; int num; num = (int)a.size; a = a + b; string answer; for(int i = 0; i < num; i++){ cout << a[i]; if(i+num<num) cout << a[i+num]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:65:16: 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 '()' ?) 65 | num = (int)a.size; | ~~^~~~ | ()
s224711452
p03760
C++
#include<cstdio> #include<cmath> #include<cstring> #include<cstdlib> #include<algorithm> #include<iostream> using namespace std; int main(){ char a[55],s[55]; char c[150]; int num1=0,num2=0; int lena,lens; gets(a); gets(s); lena=strlen(a); lens=strlen(s); for(int i=0; i<lena+lens; i++){ if(i%2==0){ c[i]=a[num1++]; } else{ c[i]=s[num2++]; } } printf("%s\n",c); return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 13 | gets(a); | ^~~~ | getw
s540553530
p03760
C++
#include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <fstream> #include <iostream> #include <map> #include <math.h> #include <memory> #include <queue> #include <sstream> #include <stdio.h> #include <string> #include <vector> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define POW(n) ((n) * (n)) #define ALL(a) (a).begin(), (a).end() #define dump(v) (cerr << #v << ": " << v << endl) #define cerr \ if (true) \ cerr using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<double> vd; typedef vector<string> vs; typedef vector<unsigned long long> vull; // ll n = to_T<ll>("114514") template <class T> T to_T(const string &s) { istringstream is(s); T res; is >> res; return res; } template <class T> string to_s(const T &a) { ostringstream os; os << a; return os.str(); } void solve(long long N, long long M) { ll ret = min(N, M / 2); M -= ret * 2; ret += M / 4; cout << ret << endl; } int main() { ios::sync_with_stdio(false); string a; string b; cin >> a; cin >> b; int num; num = a.size; a = a + b; string answer; for(int i = 0; i < num; i++){ cout << a[i]; if(i+num<num) cout << a[i+num]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:65:11: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int' 65 | num = a.size; | ^~~~
s772292378
p03760
C++
#include <iostream> #include <cstring> #include <cstdio> using namespace std; int main() { char a[55] = {0}, b[55] = {0}; gets(a); gets(b); for(int i = 0; i < strlen (a);i++) { cout << a[i]; cout << b[i]; } if(strlen (a) > strlen (b))cout << '\0'; cout << endl; 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(a); | ^~~~ | getw
s867337475
p03760
C++
#include <iostream> #include <cstring> #include <cstdio> using namespace std; int main() { char a[55] = {0}, b[55] = {0}; gets(a); gets(b); for(int i = 0; i < strlen (a);i++) { cout << a[i]; cout << b[i]; } if(strlen (a) > strlen (b))cout << '\0'; cout << endl; 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(a); | ^~~~ | getw
s045292862
p03760
C
#include <stdio.h> int main(void){ int i; char o[50],e[50],oe[100]; scanf("%s",&o); scanf("%s",&e); for(i = 0;i < (sizeof o);i++){ oe[2*i] = o[i]; if(e[i]!=null)oe[2*i+1] = e[i]; } printf("%s\n",oe); return 0; }
main.c: In function 'main': main.c:11:14: error: 'null' undeclared (first use in this function) 11 | if(e[i]!=null)oe[2*i+1] = e[i]; | ^~~~ main.c:11:14: note: each undeclared identifier is reported only once for each function it appears in
s958432576
p03760
C++
using namespace std; int main() { string odd; string even; string passwd; cin >> odd >> even; for(int i=0;i<51;i++) { if (i%2==1) { passwd[i] = odd[i / 2]; } else { passwd[i] = even[i / 2]; } } cout << passwd << endl; return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'string' was not declared in this scope 4 | string odd; | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | using namespace std; a.cc:5:15: error: expected ';' before 'even' 5 | string even; | ^~~~~ | ; a.cc:6:15: error: expected ';' before 'passwd' 6 | string passwd; | ^~~~~~~ | ; a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin >> odd >> even; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:7:16: error: 'odd' was not declared in this scope 7 | cin >> odd >> even; | ^~~ a.cc:7:23: error: 'even' was not declared in this scope 7 | cin >> odd >> even; | ^~~~ a.cc:12:25: error: 'passwd' was not declared in this scope 12 | passwd[i] = odd[i / 2]; | ^~~~~~ a.cc:16:25: error: 'passwd' was not declared in this scope 16 | passwd[i] = even[i / 2]; | ^~~~~~ a.cc:20:9: error: 'cout' was not declared in this scope 20 | cout << passwd << endl; | ^~~~ a.cc:20:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:20:17: error: 'passwd' was not declared in this scope 20 | cout << passwd << endl; | ^~~~~~ a.cc:20:27: error: 'endl' was not declared in this scope 20 | cout << passwd << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s684070784
p03760
C
#include<stdio.h> #include<string.h> int main(){ char a[1000],b[1000],c[2000]; while(scanf("%s%s",a,b)!=EOF){ int i,j,k,o=0,ans; i=strlen(a); j=strlen(b); if(i>j) ans=2*j; else ans=2*i; for(k=0;k<=ans-1;k+=2){ c[k]=a[o]; c[k+1]=b[o]; printf("%c",c[k]); printf("%c",c[k+1]); o++; } if(2*j<2*i)printf("%c"a[i-1]); else(2*j>2*i)printf("%c",b[j-1]); printf("\n"); } return 0; }
main.c: In function 'main': main.c:18:39: error: expected ')' before 'a' 18 | if(2*j<2*i)printf("%c"a[i-1]); | ~ ^ | ) main.c:19:30: error: expected ';' before 'printf' 19 | else(2*j>2*i)printf("%c",b[j-1]); | ^~~~~~ | ;
s288505728
p03760
C++
#include<iostream> #include<string.h> using namespace std; int main() { char O[55],E[55]; char x[150]; int i,k=0,m=0,l1,l2; gets(O); gets(E); l1=strlen(O); l2=strlen(E); for (i=0;i<l1+l2;i++) { x[i]=O[k]; i++,k++; x[i]=E[m]; m++; } for (i=0;i<l1+l2;i++) cout << x[i] ; cout << endl; 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(O); | ^~~~ | getw
s750044011
p03760
C++
#include<iostream> #include<string.h> using namespace std; int main() { char O[55],E[55]; char x[150]; int i,k=0,m=0,l1,l2; while (gets(O)) { gets(E); l1=strlen(O); l2=strlen(E); for (i=0;i<l1+l2;i++) { x[i]=O[k]; i++,k++; x[i]=E[m]; m++; } for (i=0;i<l1+l2;i++) cout << x[i] ; cout << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | while (gets(O)) | ^~~~ | getw
s383693831
p03760
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int main(){ char a[55],b[55]; gets(a); gets(b); int len1 = strlen(a); int len2 = strlen(b); for(int i = 0; i < len1; i++) { printf("%c",a[i]); if(i < len2) printf("%c",b[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(a); | ^~~~ | getw
s608680404
p03760
C++
#include<iostream> #include<string> using namespace std; int main(){ string o; string e; cin>>o>>e; int i=0; for(i=0;i!=e.size();i++){ cout<<o[i]<<e[i]; } if(o.size()!=e.size=()){ cout<<o[i+1]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:15:20: 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 '()' ?) 15 | if(o.size()!=e.size=()){ | ~~^~~~ | () a.cc:15:26: error: expected primary-expression before ')' token 15 | if(o.size()!=e.size=()){ | ^
s206871156
p03760
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> using namespace std; int main() { int i,a,b,c; char O[1000]; char E[1000]; char P[1000]; cin >> O >> E; a=strlen(O)+strlen(E); b=0;c=0; for(i=0;i<a;i++){ if((i+1)%2!=0){ P[i]=O[b]; b++; }else{ P[i]=E[c]; c++; } } for(i=0;i<a;i++){ cout << P[i]; } return 0; }
a.cc: In function 'int main()': a.cc:17:11: error: 'strlen' was not declared in this scope 17 | a=strlen(O)+strlen(E); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <vector> +++ |+#include <cstring> 5 |
s264586427
p03760
C++
#include<stdio.h> #include<string.h> int main(){ char a[100],b[100]; memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); gets(a); gets(b); int max = strlen(a)>strlen(b) ?strlen(a):strlen(b); for(int i = 0; i < max; i++){ printf("%c%c",a[i],b[i]); } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(a); | ^~~~ | getw
s839586371
p03760
C++
#include<stdio.h> #include<string.h> int main(){ char a[100],b[100]; memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); gets(a); gets(b); int s=strlen(a),s1=strlen(b),i=0,j=0; while(i<s&&j<s1){ printf("%c",a[i++]); printf("%c",b[j++]); } if(j==s1) for(;i<s;i++) printf("%c",a[i]); else for(;j<s1;j++) printf("%c",b[j]); return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(a); | ^~~~ | getw
s976429078
p03760
Java
import java.util.Scanner; public class AtCoder_Beginner58_B { public static void main(String[] args) { Scanner in = new Scanner(System.in); String O = in.nextLine(); String E = in.nextLine(); String pass = ""; for (int x = 0; x < O.length(); x++) { pass += String.valueOf(O.charAt(x)); if (x == E.length()) { break; } else { pass += String.valueOf(E.charAt(x)); } } System.out.println(pass); } }
Main.java:3: error: class AtCoder_Beginner58_B is public, should be declared in a file named AtCoder_Beginner58_B.java public class AtCoder_Beginner58_B { ^ 1 error
s281918318
p03760
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> using namespace std; char a[55],b[55]; int main(){ gets(a); gets(b); int len1 = strlen(a); int len2 = strlen(b); for(int i = 0; i < len1; i++) { printf("%c",a[i]); if(i < len2) printf("%c",b[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a); | ^~~~ | getw
s509031475
p03760
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ProblemB { public static void main(String[] args) throws IOException { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); String O = input.readLine(); String E = input.readLine(); System.out.println(zip(O, E)); } private static String zip(String first, String second) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < second.length(); i++) { builder.append(first.charAt(i)); builder.append(second.charAt(i)); } if (first.length() > second.length()) { builder.append(first.charAt(first.length() - 1)); } return builder.toString(); } }
Main.java:5: error: class ProblemB is public, should be declared in a file named ProblemB.java public class ProblemB { ^ 1 error
s110417608
p03760
C++
#include<stdio.h> #include<string.h> int main(){ char a[100],b[100]; gets(a); gets(b); int max = strlen(a)>strlen(b) ?strlen(a):strlen(b); for(int i = 0; i < max; i++){ printf("%c%c",a[i],b[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(a); | ^~~~ | getw
s428684082
p03760
C++
#include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> using namespace std; char a[100], b[100]; int main() { gets(a); gets(b); int n = strlen(a); int m = strlen(b); for(int i = 0; i < min(n, m); i++)printf("%c%c", a[i], b[i]); if(n != m) { if(n > m)printf("%c\n",a[n - 1]); else printf("%c\n", b[m - 1]); } }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw
s082839309
p03760
C++
#include<stdio.h> #include<string.h> int main(){ char a[100],b[100]; gets(a); gets(b); int max = strlen(a)>strlen(b) ?strlen(a):strlen(b); for(int i = 0; i < max; i++){ printf("%c%c",a[i],b[i]); } return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(a); | ^~~~ | getw
s247243765
p03760
C++
#include<stdio.h> #include<string.h> int main(){ char a[100],b[100]; gets(a); gets(b); int s=strlen(a),s1=strlen(b),i=0,j=0; while(i<s&&j<s1){ printf("%c",a[i++]); printf("%c",b[j++]); } if(j==s1) for(;i<s;i++) printf("%c",a[i]); else for(;j<s1;j++) printf("%c",b[j]); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(a); | ^~~~ | getw
s135592741
p03760
C++
#include<stdio.h> #include<string.h> int main(){ char a[100],b[100]; gets(a); gets(b); int s=strlen(a),s1=strlen(b),i=0,j=0; while(i<s&&j<s1){ printf("%c",a[i++]); printf("%c",b[j++]); } for(;i<s;i++) printf("%c",a[i]); for(;j<s1;j++) printf("%c",b[j]); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(a); | ^~~~ | getw
s475869172
p03760
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> using namespace std; char a[55],b[55]; int main(){ gets(a); gets(b); int len = strlen(a); for(int i = 0; i < len; i++) { printf("%c%c",a[i],b[i]); } return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a); | ^~~~ | getw
s279316343
p03760
C++
#include <stdio.h> #include <string.h> int main() { char O[51]; char E[51]; gets(O); gets(E); int len1 = strlen(O); int len2 = strlen(E); for (int i = 0; i < len2; i ++) { printf("%c", O[i]); printf("%c", E[i]); } if (len2 < len1) { printf("%c", O[len2]); } puts(""); }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(O); gets(E); | ^~~~ | getw
s646139703
p03760
C++
#include<iostream> using namespace std; int main() { char a[10000]={0},b[10000]={0}; cin>>a>>b; for(int i=0;i<max(strlen(a),strlen(b));i++) cout<<a[i]<<b[i]; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:19: error: 'strlen' was not declared in this scope 7 | for(int i=0;i<max(strlen(a),strlen(b));i++) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std;
s334707641
p03761
C++
// 怪文書 // #17080666 #include <bits/stdc++.h> using namespace std; define rep(i,n) for(int i=0;i<(int)(n);i++) #define reps(i,n) for(int i=1;i<(int)(n);i++) typedef long long ll; using namespace std; int main() { ll n; string s[100]; ll cnt[26]; cin>>n; rep(i,n){ cin>>s[i]; sort(s[i].begin(),s[i].end()); } ll min; for(char l='a';l<='z';l++){ min=1000000; rep(i,n){ ll tmp=0; rep(j,s[i].length()){ if(s[i][j]==l)tmp++; } if(tmp<min)min=tmp; } cnt[l-'a']=min; } rep(i,26){ rep(j,cnt[i]){ printf("%c",'a'+i); } } cout<<endl; return 0; }
a.cc:6:1: error: 'define' does not name a type 6 | define rep(i,n) for(int i=0;i<(int)(n);i++) | ^~~~~~ a.cc:6:29: error: 'i' does not name a type 6 | define rep(i,n) for(int i=0;i<(int)(n);i++) | ^ a.cc:6:40: error: 'i' does not name a type 6 | define rep(i,n) for(int i=0;i<(int)(n);i++) | ^ a.cc: In function 'int main()': a.cc:13:3: error: 'll' was not declared in this scope 13 | ll n; | ^~ a.cc:15:5: error: expected ';' before 'cnt' 15 | ll cnt[26]; | ^~~~ | ; a.cc:16:8: error: 'n' was not declared in this scope 16 | cin>>n; | ^ a.cc:17:7: error: 'i' was not declared in this scope 17 | rep(i,n){ | ^ a.cc:17:3: error: 'rep' was not declared in this scope; did you mean 'reps'? 17 | rep(i,n){ | ^~~ | reps a.cc:21:5: error: expected ';' before 'min' 21 | ll min; | ^~~~ | ; a.cc:23:9: error: overloaded function with no contextual type information 23 | min=1000000; | ^~~~~~~ a.cc:31:5: error: 'cnt' was not declared in this scope; did you mean 'int'? 31 | cnt[l-'a']=min; | ^~~ | int
s598669152
p03761
C++
include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n; cin>>n; int alphabet[26]={0}; for(int i=0; i<n; i++){ int curr[26]={0}; string s; cin>>s; for(int j=0; s[j]; j++) curr[s[j]-'a']++; if(!i){ for(int j=0; j<26; j++) alphabet[j] = curr[j]; } else{ for(int j=0; j<26; j++) alphabet[j] = min(alphabet[j],curr[j]); } } for(int i=0; i<26; i++){ if(alphabet[i]){ for(int j=0; j<alphabet[i]; j++) cout<<(char)('a'+i); } } }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin>>n; | ^~~ a.cc:10:17: error: 'string' was not declared in this scope 10 | string s; | ^~~~~~ a.cc:11:22: error: 's' was not declared in this scope 11 | cin>>s; | ^ a.cc:17:63: error: 'min' was not declared in this scope; did you mean 'main'? 17 | for(int j=0; j<26; j++) alphabet[j] = min(alphabet[j],curr[j]); | ^~~ | main a.cc:22:58: error: 'cout' was not declared in this scope 22 | for(int j=0; j<alphabet[i]; j++) cout<<(char)('a'+i); | ^~~~
s624780345
p03761
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 < (N); i++) #define erep(i,N) for(int i = N - 1; i >= 0; i--) const ll INF = 1000000000; //const ll MOD = 1000000007; const ld PI = (acos(-1)); using Graph = vector<vector<int>>; template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true;} return false;} template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true;} return false;} typedef pair<int, int> P; double rad(double a) {return a * 180 / PI;} struct UnionFind { vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2 UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化 for(int i = 0; i < N; i++) par[i] = i; } int root(int x) { // データxが属する木の根を再帰で得る:root(x) = {xの木の根} if (par[x] == x) return x; return par[x] = root(par[x]); } void unite(int x, int y) { // xとyの木を併合 int rx = root(x); //xの根をrx int ry = root(y); //yの根をry if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時:xの根rxをyの根ryにつける } bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す int rx = root(x); int ry = root(y); return rx == ry; } }; //dpTable int dp[100050]; int main(){ int N; cin >> N; vector<string> S(N); rep (i,N) cin >> S.at(i); vector<vector<int>> cnt(N,vector<int>(26,0)); rep (i,N) { rep (j,S.at(i).size()) { cnt.at(i).at(S.at(i).at(j) - 'a')++; } } vector<int> ans(26,100000000); for (int i = 0; i < N; i++) { for (int j = 0; j < 26; j++) { ans.at(j) = min(ans.at(j),cnt.at(i).at(j)); } } for (int i = 0; i < 26; i++) { for (int j = 0; j < ans.at(i); j++) { cout << (char)(i + 'a'); } } cout << endl; return 0; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s539068782
p03761
C++
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <set> #include <vector> using namespace std; #define rep(i, j, n) for (int i = j; i < (int)n; ++i) int main() { int n; cin >> n; vector<int> cnt(26, INF); rep(i, 0, n) { string s; cin >> s; vector<int> tmp(26); for (char c : s) tmp[c - 'a']++; rep(i, 0, 26) { cnt[i] = min(cnt[i], tmp[i]); } } string ans = ""; rep(i, 0, 26) { rep(j, 0, cnt[i]) ans += (char)(i + 'a'); } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:23: error: 'INF' was not declared in this scope 16 | vector<int> cnt(26, INF); | ^~~
s778374062
p03761
C++
#include <bits/stdc++.h> using ll = long long; using namespace std; #define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++) #define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define repi(i, x) \ for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++) #define all(x) (x).begin(), (x).end() #define F first #define S second #define mp make_pair #define pb push_back #define solve(a) ((a) ? "Yes" : "No") typedef vector<int> Vi; typedef vector<Vi> VVi; typedef pair<int, int> Pi; typedef vector<Pi> VPi; typedef vector<long long> V; typedef vector<V> VV; typedef pair<long long, long long> P; typedef vector<P> VP; template <class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const long long INFLL = 1LL << 60; const int INF = 1 << 30; const double PI = acos(-1); int main() { int n; int ans = 0; cin >> n; map<char, int> dis, tmp; string s; for (char a = 'a'; a <= 'z'; a++) { dis[a] = INF; } rep(i, n) { cin >> s; tmp.clear(); rep(j, s.size()) { tmp[s[j]]++; } for (char a = 'a'; a <= 'z'; a++) { chmin(dis[a], tmp[a]); } } rep(char a = 'a'; a <= 'z'; a++) { rep(i, dis[a]) { cout << a; } } cout << endl; }
a.cc:60:40: error: macro "rep" requires 2 arguments, but only 1 given 60 | rep(char a = 'a'; a <= 'z'; a++) { | ^ a.cc:4:9: note: macro "rep" defined here 4 | #define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++) | ^~~ a.cc: In function 'int main()': a.cc:60:9: error: 'rep' was not declared in this scope 60 | rep(char a = 'a'; a <= 'z'; a++) { | ^~~
s232881149
p03761
C++
a #include <bits/stdc++.h> #include <string.h> #include <vector> //s#define rep(i, n) for (int i = 0; i < (n); i++) #define MAX 10000 using namespace std; #define ll long long #define pb push_back //#define mp make_pair #define all(a) (a).begin(),(a).end() #define rep(i,a,n) for(int i=a; i<n; i++) #define r0 return 0 #define INF (int)1e15 #define MOD 1000000007 map<char,int>mp[100]; map<char,int>::iterator it; int main(){ long long n,c=0,d=0; char ch; string s,s1; cin>>n; for(int i=0;i<n;i++) { cin>>s; if(i == 0)s1 = s; for(int j=0;j<s.length();j++) { mp[i][s[j]]++; } } for(it = mp[0].begin();it!=mp[0].end();++it) { ch = it->first; d = it->second; // cout<<ch<<" ? "<<d<<endl; for(int i=1;i<n;i++){ // cout<<"character "<<mp[i][ch]<<endl; c = mp[i][ch]; if(d>c){ d = c;} } // cout<<ch<<" // "<<d<<endl; for(int j=0;j<d;j++){ cout<<ch; } } return 0; }
a.cc:1:1: error: 'a' does not name a type 1 | a | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:5: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'? 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/cstddef:50, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here 443 | typedef decltype(nullptr) nullptr_t; | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'? 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here 443 | typedef decltype(nullptr) nullptr_t; | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59, from /usr/include/c++/14/bits/stl_algo.h:69, from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/1
s783010793
p03761
C++
#include <iostream> #include <algorithm> #include <string> #include <cstdlib> using namespace std; int main() { int n; cin >> n; string dict[n]; for (int i = 0; i < n; i++) { cin >> dict[i]; sort(dict[i].begin(), dict[i].end); } string c = dict[0]; string d; sort(c.begin(), c.end()); string::iterator it; it = set_intersection(dict[0].begin(), dict[0].end(), c.begin(), c.end(), d.begin()); for (int i = 1; i < n; i++) { it = set_intersection(d.begin(), d.end(), dict[i].begin(), dict[i].end(), d.begin()); } for (auto x = d.begin(); x != it; x++) { cout << *x; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: no matching function for call to 'sort(std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)' 14 | sort(dict[i].begin(), dict[i].end); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >]' 4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4762:63: note: no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)' 4793 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:86: /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)' 292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)' 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate expects 3 arguments, 2 provided
s031086643
p03761
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ int n; cin >> n; string ans = ""; string s[n]; for(int i = 0; i < n; i++){ cin >> s[i]; } string s1 = s[0]; sort(s1.begin(), s1.end()); for(int i = 0; i < s1.size(); i++){ bool find = true; string s2; for(int j = 1; j < n; j++){ s2 = s[j]; if(s2.find(s1[i]) == std::string::npos){ find = false; break; } } if(find == true){ ans.push_back(s1[i]); } } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(s1.begin(), s1.end()); | ^~~~ | short
s424564724
p03761
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0;i < (n);i++) using namespace std; using ll = long long; using pii = pair<int,int>; int main(){ int n; cin >> n; vector<int> alp(26,0); rep(i,n){ string s; cin >> s; vector<int> now(26); rep(j,s.size()) now[s[j] - 'a']++; if(i == 0){ alp[j] = now[j]; } else{ rep(i,26) alp[j] = min(alp[j],now[j]); } } rep(i,26){ cout << string(alp[i],i+'a'); } cout << endl; }
a.cc: In function 'int main()': a.cc:17:17: error: 'j' was not declared in this scope 17 | alp[j] = now[j]; | ^ a.cc:20:27: error: 'j' was not declared in this scope 20 | rep(i,26) alp[j] = min(alp[j],now[j]); | ^
s637088415
p03761
C++
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i ,n) for(int i = 0 ; i < (n) ; i ++ ) #define all(x) (x).begin(),(x).end() using namespace std; using ll = long long; using vin=vector<int>; const int inf=1e9+7; const ll INF=1e18; int main() { int n; cin>>n; vector<string> s(n); rep(i,n) cin>>s[i]; ///// map<char,int> mp; 簡単な方法がわからないめんどい良い良い良い良いい }
a.cc: In function 'int main()': a.cc:18:3: error: '\U00007c21\U00005358\U0000306a\U000065b9\U00006cd5\U0000304c\U0000308f\U0000304b\U00003089\U0000306a\U00003044\U00003081\U00003093\U00003069\U00003044\U0000826f\U00003044\U0000826f\U00003044\U0000826f\U00003044\U0000826f\U00003044\U00003044' was not declared in this scope 18 | 簡単な方法がわからないめんどい良い良い良い良いい | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~