submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s416602381 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
String str1 = sc.next();
String str2 = sc.next();
int l1 = str1.length();
int l2 = str2.length();
for(int i=0; i<l2; i++)
print(str1.charAt(i));
print(str2.charAt(i));
... | Main.java:13: error: illegal start of type
if(l1 - l2 == 1){
^
Main.java:13: error: <identifier> expected
if(l1 - l2 == 1){
^
Main.java:13: error: <identifier> expected
if(l1 - l2 == 1){
^
3 errors
|
s399311837 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
String str1 = sc.next();
String str2 = sc.next();
for(int i=0; i<str1.length() - 1; i++)
print(str1.charAt(i));
print(str2.charAt(i));
}
if(str1.length() - str2.length()== 1... | Main.java:11: error: illegal start of type
if(str1.length() - str2.length()== 1){
^
Main.java:11: error: <identifier> expected
if(str1.length() - str2.length()== 1){
^
Main.java:11: error: ';' expected
if(str1.length() - str2.length()== 1){
^
Main.java:13: error: illegal ... |
s857058741 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
String str1 = sc.next();
String str2 = sc.next();
for(int i=0; i<str1.length(); i++)
print(str1.charAt(i));
print(str2.charAt(i));
}
if(str1.length() % 2 == 1){
print(... | Main.java:11: error: illegal start of type
if(str1.length() % 2 == 1){
^
Main.java:11: error: <identifier> expected
if(str1.length() % 2 == 1){
^
Main.java:11: error: ';' expected
if(str1.length() % 2 == 1){
^
3 errors
|
s008096291 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
String str1 = sc.next();
String str2 = sc.next();
for(int i=0; i<str1.length(); i++){
String []word1 = str1.substring(i, i+1);
}
for(int i=0; i<str2.length(); i++){
String [... | Main.java:7: error: incompatible types: String cannot be converted to String[]
String []word1 = str1.substring(i, i+1);
^
Main.java:10: error: incompatible types: String cannot be converted to String[]
String []word2 = str2.substring(i, i+1);
... |
s204235013 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
String []str = sc.next();
for(int i=0; i<str.length()/2; i++){
print( str[i] );
print( str[i+ (str.length()/2) +1 ] );
}
if( str.length() % 2 == 1 ){
print( str[str.le... | Main.java:4: error: incompatible types: String cannot be converted to String[]
String []str = sc.next();
^
Main.java:5: error: cannot find symbol
for(int i=0; i<str.length()/2; i++){
^
symbol: method length()
location: variable str of type String[]
Main.java... |
s140208448 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
int O = sc.next();
int E = sc.next();
for (int i = 0; i < O.length(); i++) {
print(O.charAt(i));
if (i < E.length()) print(E.charAt(i));
}
}
/* 以下、標準出力用関数 */
static pub... | Main.java:4: error: incompatible types: String cannot be converted to int
int O = sc.next();
^
Main.java:5: error: incompatible types: String cannot be converted to int
int E = sc.next();
^
Main.java:6: error: int cannot be dereferenced
for (int i = 0; i < O.length(); i... |
s308345506 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
int O = sc.next();
int E = sc.next();
for (int i = 0; i < O.length; i++) {
print(O.charAt(i));
if (i < E.length) print(E.charAt(i));
}
}
/* 以下、標準出力用関数 */
static public ... | Main.java:4: error: incompatible types: String cannot be converted to int
int O = sc.next();
^
Main.java:5: error: incompatible types: String cannot be converted to int
int E = sc.next();
^
Main.java:6: error: int cannot be dereferenced
for (int i = 0; i < O.length; i++... |
s424419587 | p03760 | C++ | #include<iostream>
using namespace std;
int main(){
char a[100001];
char b[100001];
char c[100001];
cin>>a>>b;
int j=1,k=0,l=1;
for(int i = 0;i<a.length();i++){
c[k]=a[i];
c[l]=b[i];
k+=2;l+=2;
}
for(int i = 0;i<a.length();i++){
cout<<c[i];
}
} | a.cc: In function 'int main()':
a.cc:9:23: error: request for member 'length' in 'a', which is of non-class type 'char [100001]'
9 | for(int i = 0;i<a.length();i++){
| ^~~~~~
a.cc:14:23: error: request for member 'length' in 'a', which is of non-class type 'char [100001]'
14 | ... |
s932186694 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
signed main(){
string o,e; cin>>o>>e;
string ans="";
rep(i,o.size()+e.size()){
ans+=(i%2?e.at(i/2):o.at(i/2));
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
6 | rep(i,o.size()+e.size()){
| ^
a.cc:6:5: error: 'rep' was not declared in this scope
6 | rep(i,o.size()+e.size()){
| ^~~
|
s386797203 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
f(i,t.size()){
cout<<s[i]<<t[i];
}
if(t.size()<s.size()) cout<<s[s.size()-1];
puts("");
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'i' was not declared in this scope
6 | f(i,t.size()){
| ^
a.cc:6:9: error: 'f' was not declared in this scope
6 | f(i,t.size()){
| ^
|
s288357922 | p03760 | C++ | #include<iostream>
using namespace std;
int main(){
string S,T;
cin>>S>>T;
for(auto &x:S,auto &t:T){
cout<<x<<t;
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before 'auto'
7 | for(auto &x:S,auto &t:T){
| ^~~~
a.cc:7:17: error: expected ')' before 'auto'
7 | for(auto &x:S,auto &t:T){
| ~ ^~~~
| )
a.cc:7:24: error: found ':'... |
s783738747 | p03760 | C++ | #include<iostream>
using namespace std;
int main(){
string S,T;
cin>>S>>T;
for(auto &x:S,auto &t:yT){
cout<<x<<t;
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before 'auto'
7 | for(auto &x:S,auto &t:yT){
| ^~~~
a.cc:7:17: error: expected ')' before 'auto'
7 | for(auto &x:S,auto &t:yT){
| ~ ^~~~
| )
a.cc:7:24: error: found '... |
s366951431 | p03760 | C++ | #include <iostream>
#include <array>
#include <vector>
#include <iomanip>
#include <string>
#include <cmath>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long LL;
const LL INF=300000000;
const LL MOD=1000000007;
int main(){
stri... | a.cc: In function 'int main()':
a.cc:25:21: 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 unsig... |
s031879938 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s,t;
cin>>s>>t;
int i,n=s.size(),m=t.size();
for(i=0;i<m+n;i++){
if(i%2==0)
cout<s.at(i/2);
else cout<<t.at((i-1)/2);
}
} | a.cc: In function 'int main()':
a.cc:11:11: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
11 | cout<s.at(i/2);
| ~~~~^~~~~~~~~~
| | |
|... |
s592548700 | p03760 | C++ | #include <iostream>
std::string O, E;
int main() {
std::cin >> O >> E;
for (int i=0; i<E.size(); ++i) {
std::cout << O[i] << E[i];
}
std::cout << ( (O.size() - E.size() == 1) ? O.back() : "" ) << '\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:10:45: error: operands to '?:' have different types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char*'
10 | std::cout << ( (O.size() - E.size() == 1) ? O.back() : "" ) << '\n';
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^... |
s712692180 | p03760 | C | #include<stdio.h>
int main(){
char O[51], E[51], p[101];
int len = 0;
while(E[len]){
len++;
}
for (i = 0; i < len; i++){
p[2*i] = O[i];
p[2*i + 1] = E[i];
}
p[2*i] = '\0';
printf("%s\n", p);
return 0;
} | main.c: In function 'main':
main.c:11:8: error: 'i' undeclared (first use in this function)
11 | for (i = 0; i < len; i++){
| ^
main.c:11:8: note: each undeclared identifier is reported only once for each function it appears in
|
s004772331 | p03760 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<complex>
using namespace std;
int main(){
char a[51], b[51];
cin >> a >> b;
for (int i = 0; i < strlen(a); i++){
cout << a[i];
if (b[i] != '\0'){
cout << b[i];
}
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:29: error: 'strlen' was not declared in this scope
9 | for (int i = 0; i < strlen(a); i++){
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<co... |
s260567882 | p03760 | C++ | //#define _GRIBCXX_DEBUG
#include <bits/stdc++.h>
# define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
template<typename integer>
integer __lcm(integer a, integer b) {
return (a * b) / __gcd(a, b);
}
int main() {
string odd, evn;
cin >> odd >> evn;
size_t t = max(odd.size(), evn... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:11:12: note: to match this '{'
11 | int main() {
| ^
|
s529123905 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[110],b[110],t1=0,t2=0;
scanf("%s%s",a,b);
int len=max(strlen(a),strlen(b));
for(int i=0;i<len*2;i++)
{
if(i%2==0)
if(a[t]!=' ')
cout<<a[t1++];
else if(a[t]!=' ')
cout<<b[t2++];
}
cout<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 't' was not declared in this scope
11 | if(a[t]!=' ')
| ^
|
s173268023 | p03760 | C | #include<stdio.h>
int N, M;
char O[51];
int main(){
c=getchar();
while(c!=10){
O[N]=c;
c=getchar(); N++;
}
c=getchar();
while(c!=10){
putchar(O[M]);
putchar(c);
c=getchar(); M++;
}
if(N!=M){
putchar(O[N-1]);
}
putchar(10);
}
| main.c: In function 'main':
main.c:5:3: error: 'c' undeclared (first use in this function)
5 | c=getchar();
| ^
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
|
s115581535 | p03760 | C++ | ome
Tasks
Submit
Clarifications
Results
Standings
Custom Test
Editorial
Submission #3809874
Source code
Copy
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int main()
{
int i,j,k,as=0,bs=0;
string a,b;
cin>>a>>b;
string c;
for(i=0;i<a.size();i++){
cout<<a[i];
... | a.cc:9:12: error: stray '#' in program
9 | Submission #3809874
| ^
a.cc:1:1: error: 'ome' does not name a type
1 | ome
| ^~~
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-... |
s306245354 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std ;
int main (){
string sa,sb ,sc ;
getline (cin ,sa );
getline (cin,sb);
int i ,j = 0,k = 0 .len ;
len = sa .size()+ sb .size();
for (i = 0 ; i < len ; i ++){
if (i %2 == 1)sc + = sb [ j ++];
else sc + = sa [ k ++];
}
cout << sc ;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:7:29: error: request for member 'len' in '0', which is of non-class type 'int'
7 | int i ,j = 0,k = 0 .len ;
| ^~~
a.cc:8:9: error: 'len' was not declared in this scope
8 | len = sa .size()+ sb .size();
| ^~~
a.... |
s345236092 | p03760 | C++ | #include < bits / stdc ++.h >
using namespace std ;
int main (){
string sa,sb ,sc ;
getline (cin ,sa );
getline (cin,sb);
int i ,j = 0,k = 0 .len ;
len = sa .size()+ sb .size();
for (i = 0 ; i < len ; i ++){
if (i %2 == 1)sc + = sb [ j ++];
else sc + = sa [ k ++];
}
cout << sc ;
return 0 ;
} | a.cc:1:10: fatal error: bits / stdc ++.h : No such file or directory
1 | #include < bits / stdc ++.h >
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s700633455 | p03760 | C++ | #include < bits / stdc ++。h >
using namespace std ;
int main (){
string sa,sb ,sc ;
getline (cin ,sa );
getline (cin,sb);
int i ,j = 0,k = 0 .len ;
len = sa .size()+ sb .size();
for (i = 0 ; i < len ; i ++){
if (i %2 == 1)sc + = sb [ j ++];
else sc + = sa [ k ++];
}
cout << sc ;
return 0 ;
} | a.cc:1:10: fatal error: bits / stdc ++。h : No such file or directory
1 | #include < bits / stdc ++。h >
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s976918928 | p03760 | C++ | #include < bits / stdc ++。h >
使用命名空间std ;
int main (){
string sa ,sb ,sc ;
getline (cin ,sa );
getline (cin ,sb );
int i ,j = 0 ,k = 0 ,len ;
len = sa 。size ()+ sb 。size ();
for (i = 0 ; i < len ; i ++){
if (i %2 == 1 )sc + = sb [ j ++];
else sc + = sa [ k ++];
}
cout << sc ;
返回0 ;
} | a.cc:1:10: fatal error: bits / stdc ++。h : No such file or directory
1 | #include < bits / stdc ++。h >
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s244440871 | p03760 | C++ | using namespace std;
#if __has_include("print.hpp")
#include "print.hpp"
#endif
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
typedef long long ll;
typedef pair<int, int> p;
int main(){
string o, e;
cin >> o >> e;
for (int i = 0; i < int(e.size()); i++) {
cout << o[i] <<... | a.cc:11:9: error: 'pair' does not name a type
11 | typedef pair<int, int> p;
| ^~~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'string' was not declared in this scope
14 | string o, e;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable b... |
s783032363 | p03760 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <utility>
using Int = long long;
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
int main()
{
string O, E; cin >> O >> E;
int m = min(O.size(), E.size());
for (int i = 0; i < m; i++) {
cout << O[i] << E[i];... | a.cc: In function 'int main()':
a.cc:17:19: error: 'i' was not declared in this scope
17 | cout << O[i];
| ^
|
s248432272 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O, E;
cin >> O >> E;
if (O.length() == E.length()) {
for (int i = 0; i < O.length(); i++) {
cout << O[i] << E[i] << flush;
}
} else {
for (int i = 0; i < O.length() - 1; i++) {
cout << O[i] << E[i] << flush;
}
cou... | a.cc: In function 'int main()':
a.cc:15:19: error: no matching function for call to 'size()'
15 | cout << E[size() - 1] << flush;
| ~~~~^~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-... |
s452100103 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O, E;
cin >> O >> E;
E = E +'';
for (int i = 0; i < O.length(); i++) {
cout << O[i] << E[i] << flush;
}
cout << endl;
} | a.cc:7:10: error: empty character constant
7 | E = E +'';
| ^~
|
s832920230 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O, E;
cin >> O >> E;
E +='';
for (int i = 0; i < O.length(); i++) {
cout << O[i] << E[i] << flush;
}
cout << endl;
} | a.cc:7:7: error: empty character constant
7 | E +='';
| ^~
|
s911385252 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O, E;
cin >> O >> E;
E[E.size() - 1] =='';
for (int i = 0; i < O.length(); i++) {
cout << O[i] << E[i] << flush;
}
cout << endl;
} | a.cc:7:21: error: empty character constant
7 | E[E.size() - 1] =='';
| ^~
|
s647010029 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
string a,b;
int main(){
cin>>a>>b;
int len=max(a.length(),b.length());
for(int i=0;i<len;i++)
if(a[i]!='\0')putchar(a[i]);
if(b[i]!='\0')putchar(b[i]);
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: 'i' was not declared in this scope
9 | if(b[i]!='\0')putchar(b[i]);
| ^
a.cc: At global scope:
a.cc:11:5: error: 'cout' does not name a type
11 | cout<<endl;
| ^~~~
a.cc:12:5: error: expected unqualified-id before 'return'... |
s099985306 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string o, e;
cin >> o >> e;
string s = "";
for(int i = 0; i < max(e.size(), o.size(); i++){
s += o[i] + e[i];
}
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:7:44: error: expected ')' before ';' token
7 | for(int i = 0; i < max(e.size(), o.size(); i++){
| ~ ^
| )
|
s241381267 | p03760 | C++ | #include<cstring>
using namespace std;
int main(){
char ch1[50],ch2[50];
while(cin>>ch1>>ch2){
int m=strlen(ch1);
int n=strlen(ch2);
for(int i=0;i<m;i++)
{cout<<ch1[i];
cout<<ch2[i];}
if(m>n)
for(int j=n;j<m;j++)
cout<<ch1[j];
else
for(int k=m;k<n;k++)
cout<<ch2[k];
cout<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | while(cin>>ch1>>ch2){
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<cstring>
+++ |+#include <iostream>
2 | u... |
s519720199 | p03760 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
int main(){
int i , j , h , w;
char lei = '0', a[51][51];
while (cin >> h >> w){
for(i = 0;i < h;i++)
{
for(j = 0;j < w;j++)
cin>>a[i][j];
}
for(i = 0... | a.cc:58:4: error: '\U00009009\U000062e9\U00006587\U00004ef6' does not name a type
58 | 选择文件
| ^~~~~~~~
|
s452830231 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
string s1,s2;
int main(void)
{
getline(cin,s1);
getline(cin,s2);
cout<<s1[0];
for(int i=0;i<s1.size()+s2.size()-1;++i)
i%2?cout<<s1[i/2+1]:s2[i/2+1];
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: operands to '?:' have different types 'std::basic_ostream<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
10 | i%2?cout<<s1[i/2+1]:s2[i/2+1];
|
s597353429 | p03760 | C | #include<stdio.h>
char odd[51], even[51];
int main(void) {
int i;
gets_s(odd, 51);
gets_s(even, 51);
for (i = 0; i <= 50; i++) {
if (odd[i] == '\n') {
printf("\n");
break;
}
putchar(odd[i]);
putchar(even[i]);
}
return 0;
} | main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
9 | gets_s(odd, 51);
| ^~~~~~
|
s256115424 | p03760 | C++ | #include <bits/stdc++.h>
#include <algorithm>
using namespace std;
int main()
{
string o,e;
cin>>o>>e;
for(int i=0;i<o.size();i++){
if(o.size>e.size() && i==o.size-1) cout<<o[i];
else cout<<o[i]<<e[i];
}
} | a.cc: In function 'int main()':
a.cc:10:14: 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 unsig... |
s086611106 | p03760 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<array>
using namespace std;
int main(){
string a,b;
cin >> a >> b;
for(int i = 0;i < b.size;i++){
cout << a[i] << b[i];
}
if(a.size() != b.size())
cout << a[i];
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:11:23: 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 unsig... |
s048245911 | p03760 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<array>
using namespace std;
int main(){
string a,b;
cin >> a >> b;
for(int i = 0;i < b.size;i++){
cout << a[i] << b[i]
}
if(a.size() != b.size())
cout << a[i];
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:11:23: 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 unsig... |
s572545090 | p03760 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<array>
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;
}
| a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before 'if'
12 | cout << a[i]
| ^
| ;
13 | if(b.size() >= i)
| ~~
|
s379302585 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
char a[52],b[52];
int main()
{
cin>>a;
cin>>b;
int i,x=strlen(a),y=strlen(b),l=min(la,lb),k=max(la,lb);
for(i=0;i<=l-1;i++)
cout<<a[i]<<b[i];
if(x>y)
for(i=l;i<=k-1;i++)
cout<<a[i];
else
for(i=l;i<=k-1;i++)
cout<<b[i];
return 0;
}//dasdds... | a.cc: In function 'int main()':
a.cc:8:39: error: 'la' was not declared in this scope; did you mean 'l'?
8 | int i,x=strlen(a),y=strlen(b),l=min(la,lb),k=max(la,lb);
| ^~
| l
a.cc:8:42: error: 'lb' was not declared in this sco... |
s887812451 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
string a,b;
int main(){
cin<<a>>b;
for(int i=0;i<max(a.size(),b.size());i++){
cout<<a[i];
if(b[i]!=0) cout<<b[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:8: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
5 | cin<<a>>b;
| ~~~^~~
| | |
| | std::string {aka std::__cxx11::basic_str... |
s279107536 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define REP(i,n) for(ll i=0;i<n;++i)
#define SORT(name) sort(name.begin(), name.end())
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
#if 1
# define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__)
#else
# ... | a.cc: In function 'int main()':
a.cc:30:31: error: expected ';' before '}' token
30 | printf("%c", O[i])
| ^
| ;
31 | } else {
| ~
|
s427733557 | p03760 | C++ | #include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
int s1=a.size();
int s2=b.size();
if(s1==s2) for(int i=0;i<s1;i++)cout<<a[i]<<b[i];
else
{
for(int i=0;i<s2;i++)cout<<<a[i]<<b[i];
cout<<a[s1-1];
}
cout<<end... | a.cc: In function 'int main()':
a.cc:14:36: error: expected primary-expression before '<' token
14 | for(int i=0;i<s2;i++)cout<<<a[i]<<b[i];
| ^
|
s828557192 | p03760 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<vector>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<queue>
#include<utility>
#include<cstdio>
#include<cstring>
#include<new>
#include<new.h>
#include<float.h>
#include<ctype.h>
#include<cfloat>
#include<cmat... | a.cc:15:9: fatal error: new.h: No such file or directory
15 | #include<new.h>
| ^~~~~~~
compilation terminated.
|
s445375197 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
int len1,len2,minn;
cin>>a>>b;
len1=a.length();
len2=b.length();
minn=min(len1,len2);
maxx=max(len1,len2);
for(int i=0;i<minn;i++)
cout<<a[i]<<b[i];
if(len1>len2)
for(int i=minn;i<maxx;i++)
cout<<a[i];
else for(int i... | a.cc: In function 'int main()':
a.cc:11:9: error: 'maxx' was not declared in this scope
11 | maxx=max(len1,len2);
| ^~~~
|
s106868348 | p03760 | C++ | #include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
char a[51],b[51];
int main()
{
cin>>a>>b;
for (int i=0;i<=strlen(a)-1;i++)
{
cout<<a[i]
if (b[i]!=' ') cout<<b[i];
}
// system("pause");
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:27: error: expected ';' before 'if'
13 | cout<<a[i]
| ^
| ;
14 | if (b[i]!=' ') cout<<b[i];
| ~~
|
s526710682 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O,E,a;
int o,e;
cin >> O >> E;
o=O.size();
e=E.size();
if(o==e){
for(int i=0;i<e;i++){
a+=O.at(i)+E.at(i);
}
}
else{
for(int i=0;i<e;i++){
a+=O.at(i)+E.at(i);
}
a+=O.at(o-1);
}
cout << a << endl;
}
} | a.cc:23:1: error: expected declaration before '}' token
23 | }
| ^
|
s183469416 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O,E,a,o,e;
cin >> O >> E;
o=O.size();
e=E.size();
if(o==e){
for(int i=0;i<e;i++){
a+=O.at(i)+E.at(i);
}
}
else{
for(int i=0;i<e;i++){
a+=O.at(i)+E.at(i);
}
a+=O.at(o-1);
}
cout << a << endl;
}
} | a.cc: In function 'int main()':
a.cc:10:18: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
10 | for(int i=0;i<e;i++){
| ~^~
| | |
| | std::string {aka std::__cxx11::basic_string... |
s064260813 | p03760 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class ABC_058_B {
public static void main(String[] args) throws IOException {
BufferedReader oi = new BufferedReader(new InputStreamReader(System.in));
String[] odd = oi.readLine().split("");
String[] even = oi.r... | Main.java:5: error: class ABC_058_B is public, should be declared in a file named ABC_058_B.java
public class ABC_058_B {
^
1 error
|
s018529637 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
for(int s=0;s<min(a.size(),b.size());s++)
{
cout<<a[s]<<b[s];
}
if(a.size()!=b.size())
{
if(a.size()>b.size())
{
for(int s=min(a.size(),b.size()),s<a.size();s++)
{
cout<<a[s];
}
}
else
for(int s=min(a.size()... | a.cc: In function 'int main()':
a.cc:15:59: error: expected ';' before '<' token
15 | for(int s=min(a.size(),b.size()),s<a.size();s++)
| ^
| ;
a.cc:15:59: error: exp... |
s369405829 | p03760 | C++ | #include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
int main()
{
char a[50],b[50],x,y=0,o,p;
gets(a);
gets(b);
o=strlen(a);
p=strlen(b);
if(o-p==1)
{
y++;
}
for(x=0;x<p;x++)
{
cout<<a[x];
cout<<b[x];
}
if(y==1)
{
cout<<a[o];
}
cout<<endl;... | 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
|
s754491850 | p03760 | C++ | #include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
int main()
{
char a[50],b[50],x,y=0,o,p;
gets(a);
gets(b);
o=strlen(a);
p=strlen(b);
if(o-p==1)
{
y++;
}
for(x=0;x<p;x++)
{
cout<<a[x];
cout<<b[x];
}
if(y==1)
{
cout<<a[o];
}
cout<<endl;... | 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
|
s348043572 | p03760 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Main main=new Main();
main.run();
}
void run() {
Scanner sc=new Scanner(System.in);
String[] Odd=sc.next().split("");
String[] Even=sc.next().split("");
int length=Odd.length+Even.... | 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'
a.cc:6:1: error: expected unqualified-id before 'public'
6 | public class Main {
| ^~~~~~
|
s615649676 | p03760 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
string s, t;
cin >> s >> t;
for (int i = 0; i < t.length(); i++) {
cout << s[i] << t[i];
}
if (s.length() - t.length) cout << s[s.length() - 1] << endl;
}
| a.cc: In function 'int main()':
a.cc:10:24: 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 uns... |
s550215356 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
bool mutch;
if(a.size() == b.size()){
mutch = true;
}
else{
mutch = false;
}
for(int i = 0;i < a.size;i++){
cout << a.at(i);
if(mutch = true || i != a.size()-1)
cout << b.at(i);
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:14:29: 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 unsig... |
s373330269 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
bool mutch;
if(a.size() == b.size()){
mutch = true;
}
else{
mutch = false;
}
for(int i = 0;i < a.size){
cout << a.at(i);
if(mutch = true || i != a.size()-1)
cout << b.at(i);
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:14:29: 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 unsig... |
s696725197 | p03760 | C++ | #include <iostream>
using namespace std;
int main(void){
str a[50];
str b[50];
int l = lenght(str)
for (int i = l; i <= l;i++) {
cout << a[i] << b[i];
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:4:3: error: 'str' was not declared in this scope; did you mean 'std'?
4 | str a[50];
| ^~~
| std
a.cc:5:6: error: expected ';' before 'b'
5 | str b[50];
| ^~
| ;
a.cc:6:11: error: 'lenght' was not declared in this scope
6 | int... |
s540074595 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char a[50],b[50],e[100];
int c = 0,d = 0,f = 0;
cin >> a >> b;
c = strlen(a);
d = strlen(b);
for(int S = 0;S < c;S += 0){
e[S] += a[f];
e[S+1] += b[f];
f++;
S += 2;
}
if(c != d){
e[S] += a[f];
}
for(int S = 0;S < strlen(e);S++){
... | a.cc: In function 'int main()':
a.cc:18:5: error: 'S' was not declared in this scope
18 | e[S] += a[f];
| ^
|
s315768273 | p03760 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include<cstdio>
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
int main (void) {
string O,E;
string ans;
cin >> O;
cin >> E;
for (int i;i<O.size();i++){
ans += O[i];
if (E[i]='') {
... | a.cc:18:14: error: empty character constant
18 | if (E[i]='') {
| ^~
|
s778865160 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std ;
int main()
{
string s,c;
cin>>s>>c;
for(int i=0;i<s.size();i++)
{
cout<<s[i];
if(i<O.size())cout<<c[i];
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:14: error: 'O' was not declared in this scope
10 | if(i<O.size())cout<<c[i];
| ^
|
s981028644 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
string a,b;
int sa,sb;
int main()
{
cin>>a>>b;
sa=a.length();
sb=b.length();
if(sa==sb)
{
for(i=1;i<=sa;i++)
cout<<a[i]<<b[i];
}
else
{
for(i=1;i<=sb;i++)
cout<<a[i]<<b[i];
cout<<a[sa];
}
cout<<endl;
return... | a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
12 | for(i=1;i<=sa;i++)
| ^
a.cc:17:13: error: 'i' was not declared in this scope
17 | for(i=1;i<=sb;i++)
| ^
|
s429003805 | p03760 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
char a[60],b[60];
int lena,lenb,lenn,lenx;
int main()
{
cin>>a>>b;
lena=strlen(a);
lenb=strlen(b);
lenn=min(lena,lenb);
lenx=max(lena,lenb);
for(int i=0;i<=lenn-1;i++)
cout<<a[i]<<b[i];
if(lena>lenb)
for(int i=lenn;i<=lenx-1;i++)
cout<<a[i];
else ... | a.cc: In function 'int main()':
a.cc:9:14: error: 'strlen' was not declared in this scope
9 | lena=strlen(a);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include <cstring>
... |
s345272919 | p03760 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
string a,b;
int main()
{
int l;
cin>>a>>b;
l=strlen(a);
for(int i=0;i<l;i++)
cout<<a[i]<<b[i];
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
13 | l=strlen(a);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/... |
s042604830 | p03760 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String O = sc.next();
String E = sc.next();
for(int i = 0; i < O.length() - 1; i++) {
char o = O.charAt(i);
char e = E.charAt(i);
System.out.pr... | Main.java:16: error: ')' or ',' expected
if(E.length() == O.length()) System.out.println(E.charAt(E.length() - 1);
^
1 error
|
s272604173 | p03760 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
string o,e;
cin>>o>>e;
for(int i=0;i<o.length();i++)
cout<<o[i]<<b[i];
system ("pause");
return 0;
} | a.cc: In function 'int main()':
a.cc:10:13: error: 'b' was not declared in this scope
10 | cout<<o[i]<<b[i];
| ^
|
s109008094 | p03760 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<ll, int> P;
#define MOD (1000000007ll)
#define l_ength size
ll sq(ll x){
return x*x;
}
void mul_mod(ll& a, ll b){
a *= b;
a %= MOD;
}
bool isvowel(char c){
int i;
string v="aeiou";
for(i... | a.cc: In function 'int main()':
a.cc:59:14: 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 uns... |
s263481673 | p03760 | C++ |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <functional>
#include <math.h>
#include <stdlib.h>
#include <map>
#include <deque>
#include <sys/timeb.h>
#include <fstream>
using namespace std;
#define repr(i,a,b) for(int i=(int)(a);i<(int)(b);i... | a.cc: In function 'int main()':
a.cc:98:35: error: 'i' was not declared in this scope
98 | cout << s[i + 1];
| ^
a.cc: At global scope:
a.cc:103:9: error: expected unqualified-id before 'return'
103 | return 0;
| ^~~~~~
a.cc:104:... |
s718871954 | p03760 | C++ | #include<string>
#include<vector>
#include<math.h>
#include<map>
using namespace std;
int main(void){
string a,b;
cin>>a>>b;
if(a.size()>b.size()) cout<<"GREATER"<<endl;
else if(a.size()<b.size()) cout<<"LESS"<<endl;
else if(a>b) cout<<"GREATER"<<endl;
else if(a<b) cout<<"LESS"<<endl;
else i... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin>>a>>b;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include<map>
+++ |+#include <iostream>
5 | using namespace st... |
s566577840 | p03760 | C++ | #include <iostream>
#include <string>
using namespace std;
string a,b;
int main() {
cin >> a >> b;
string c(a.size() + b.size());
for(int i = 0; i < a.size(); ++i) {
c[i * 2] = a[i];
}
for(int i = 0; i < b.size(); ++i) {
c[i * 2 + 1] = b[i];
}
cout << c << endl;
} | a.cc: In function 'int main()':
a.cc:8:31: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(std::__cxx11::basic_string<char>::size_type)'
8 | string c(a.size() + b.size());
| ^
In file included from /usr/include/c++/14/string:54,
... |
s423338191 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
char o[50]= {'\0'},f[50]= {'\0'};
int i,a=0,b=0,u,p;
while(~scanf("%s%s",o,f))
{
getchar();
u=strlen(o);
p=strlen(f);
if(u==p||u-p==1)
{
for(i=0; i<50; i++)
{
printf("%c%c",o... | main.c: In function 'main':
main.c:24:15: error: expected ';' before '}' token
24 | }a
| ^
| ;
25 | }
| ~
|
s218919423 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
int i;
char c;
char str1[20],str2[20],str3[40];
gets(str1);
gets(str2);
for(i=0;(c=str1[i]!='\0');i++)
{
strcpy(str3[2*i],str1[i]);
strcpy(str3[2*i+1],str2[i]);
}
str3[2i]='\0';
... | main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | gets(str1);
| ^~~~
| fgets
main.c:12:28: error: passing argument 1 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion... |
s194396673 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
int i;
char c;
char str1[20],str2[20],str3[40];
gets(str1);
gets(str2);
for(i=0;(c=str1[i]!='\0');i++)
{
strcpy(str3[2*i],str1[i]);
strcpy(str3[2*i+1],str2[i]);
}
str3[2i]='\0';
... | main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | gets(str1);
| ^~~~
| fgets
main.c:12:28: error: passing argument 1 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion... |
s851650100 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
char o[50]= {'\0'},f[50]= {'\0'};
int i,a=0,b=0,u,i;
while(~scanf("%s%s",o,f))
{
getchar();
u=strlen(o);i=strlen(f);
if(u==i||u-i==1)
{
for(i=0; i<50; i++)
{
printf("%c",o[i]);
... | main.c: In function 'main':
main.c:6:21: error: redeclaration of 'i' with no linkage
6 | int i,a=0,b=0,u,i;
| ^
main.c:6:9: note: previous declaration of 'i' with type 'int'
6 | int i,a=0,b=0,u,i;
| ^
|
s391991639 | p03760 | C++ | #include<stdio.h>
int main()
{
char O[510], E[500], a[1010], c;
int i, j;
scanf("%s%s", O, E);
j = 0;
int lo=strlen(O);
int le=strlen(E);
for(i = 0; i<lo; i++)
{
a[j] = O[i];
j += 2;
}
j = 1;
for(i = 0; i<le; i++)
{
a[j] = E[i];
j += 2;
... | a.cc: In function 'int main()':
a.cc:8:12: error: 'strlen' was not declared in this scope
8 | int lo=strlen(O);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<stdio.h>
+++ |+#include <cstring>
2 ... |
s087957921 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
int i,x,y,len,len1,len2;
char a[51],b[51];
while(scanf("%s",a)!=EOF)
{
x=0;y=0;
getchar()
scanf("%s",b);
getchar()
len1=strlen(a);
len2=strlen(b);
len=len1+len2;
for(i=0;i<len2;i++)
{
if(i%2==0)
printf("%c",a[x++]);
else
printf("%... | main.c: In function 'main':
main.c:10:26: error: expected ';' before 'scanf'
10 | getchar()
| ^
| ;
11 | scanf("%s",b);
| ~~~~~
main.c:12:26: error: expected ';' before 'len1'
12 | ... |
s548223088 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
int i,x,y,len,len1,len2;
char a[51],b[51];
while(scanf("%s",a)!=EOF)
{
x=0;y=0;
getchar()
scanf("%s",f);
getchar()
len1=strlen(a);
len2=strlen(b);
len=len1+len2;
for(i=0;i<len;i++)
{
if(i%2==0)
printf("%c",a[x++]);
else
printf("%c... | main.c: In function 'main':
main.c:10:26: error: expected ';' before 'scanf'
10 | getchar()
| ^
| ;
11 | scanf("%s",f);
| ~~~~~
main.c:12:26: error: expected ';' before 'len1'
12 | ... |
s285334924 | p03760 | C | #include<stdio.h>
int main()
{
char O[50],E[50];
scanf("%s%s",&O,&E);
strlen(O)-strlen(E)=1||0;
int i;
for(i=0;i<50;i++)
printf("%c%c",O[i],E[i]);
}
| main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
6 | strlen(O)-strlen(E)=1||0;
| ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
1 | #include<stdio.h>
+++ |+#include <string.h>
2 | in... |
s067054952 | p03760 | C | #include
<stdio.h>
int main()
{
char o[100]= {'\0'},f[100]= {'\0'};
int i,a=0,b=0;
while(1)
{
scanf("%s",o);
getchar();
scanf("%s",f);
getchar();
for(i=0; i<100000; i++)
{
printf("%c",o[i]);
printf("%c",f[i]);
if... | main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
main.c:2:1: error: expected identifier or '(' before '<' token
2 | <stdio.h>
| ^
|
s685027304 | p03760 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(... | a.cc: In function 'int main()':
a.cc:17:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
17 | cout >> o[i] >> e[i];
a.cc:17:10: note: candidate: 'operator>>(int, int)' (bui... |
s600088455 | p03760 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
for(int i=0;i<s.size();i++){
cout<<s[i];
if(i==s.size-1 && s.size()>t.size())cout<<t[i]<<endl;
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:25: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig... |
s459296438 | p03760 | C++ | #include <iostream>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b;
for(int i=0;i<b.size();i++){
c+=a[i];
c+=b[i];
}
}
if(a.size()>b.size()){
c+=a[a.size()-1];
}
cout<<c<<endl;
return 0;
} | a.cc:11:9: error: expected unqualified-id before 'if'
11 | if(a.size()>b.size()){
| ^~
a.cc:14:9: error: 'cout' does not name a type
14 | cout<<c<<endl;
| ^~~~
a.cc:15:9: error: expected unqualified-id before 'return'
15 | return 0;
| ^~~~~~
a.c... |
s210428505 | p03760 | C++ | #include <iostream>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b;
for(int i=0;i<b.size();i++){
c+=a[i];
c+=b[i];
}
}
if(a.size()>b.size()){
c+=a[i+1];
}
cout<<c<<endl;
return 0;
} | a.cc:11:9: error: expected unqualified-id before 'if'
11 | if(a.size()>b.size()){
| ^~
a.cc:14:9: error: 'cout' does not name a type
14 | cout<<c<<endl;
| ^~~~
a.cc:15:9: error: expected unqualified-id before 'return'
15 | return 0;
| ^~~~~~
a.c... |
s833611012 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E,M;
cin >> O >> E;
for(int i=0;i<O.size();i++)
{
M[i]=O[i];
}
for(int i=1;i<E.size();i+2)
M[i]=E[i];
}
cout << M << endl;
return 0;
} | a.cc:16:2: error: 'cout' does not name a type
16 | cout << M << endl;
| ^~~~
a.cc:18:3: error: expected unqualified-id before 'return'
18 | return 0;
| ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s871057400 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E,M;
cin >> O >> E;
for(int i=0;i<O.size(),i++)
{
M[i]=O[i];
}
for(int i=1;i<E.size(),i+2)
M[i]=E[i];
}
cout << M << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before ')' token
8 | for(int i=0;i<O.size(),i++)
| ^
| ;
a.cc:12:28: error: expected ';' before ')' token
12 | for(int i=1;i<E.size(),i+2)
| ^
... |
s288752839 | p03760 | C++ | > xyz
> abc#include <iostream>
#include <stdio.h>
#include <string>
#include <cstdlib>
#include <cmath>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
string o, e;
cin >> o;
cin >> e;
for(int i=0; i<o.length()-1; i++){
cout << o.at(i) << e.at(i);
}
if(e.length() == ... | a.cc:2:6: error: stray '#' in program
2 | > abc#include <iostream>
| ^
a.cc:1:1: error: expected unqualified-id before '>' token
1 | > xyz
| ^
In file included from /usr/include/wchar.h:53,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/posty... |
s930901006 | p03760 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <sstream>
#include <algorithm>
#include <bitset>
#include <limits>
#include <map>
#include <set>
#include <iomanip>
#include <cmath>
using namespace std;
typedef long long int ll;
typedef std::numeric_limits<double> dbl;
const long long int LL_INF=1LL<<6... | a.cc: In function 'int main()':
a.cc:38:17: error: 'i2' was not declared in this scope; did you mean 'i1'?
38 | int i1 = 0; i2 = 0;
| ^~
| i1
|
s101570866 | p03760 | C++ | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
namespace AtCoder {
class MainClass {
int a, b, c;
void Solve() {
a = io.nextInt();
b = io.nextInt();
c = io... | 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.Collections;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collectio... |
s058891715 | p03760 | C | #include<stdio.h>
#include<string.h>
int main(void){
char O[51], E[51], A[102];
int i;
scanf("%s", O);
scanf("%s", E);
j = strlen(O);
for(i = 0; i < j; i++){
A[i * 2] = O[i];
A[i * 2 + 1] = E[i];
}
printf("%s\n", A);
return 0;
} | main.c: In function 'main':
main.c:10:3: error: 'j' undeclared (first use in this function)
10 | j = strlen(O);
| ^
main.c:10:3: note: each undeclared identifier is reported only once for each function it appears in
|
s185237701 | p03760 | Java | import java.util.Scanner;
public class {
public static void main (String[] args){
Scanner scan = new Scanner(System.in);
String kisupas = scan.nextLine();
String gusupas = scan.nextLine();
String[] kisu = kisupas.split("", 0);
String[] gusu = gusupas.split("", 0);
for(int i=0; i<kisu.length; i++){
System.o... | Main.java:3: error: <identifier> expected
public class {
^
1 error
|
s931220563 | p03760 | Java | import java.util.Scanner;
public class d{
public static void main (String[] args){
Scanner scan = new Scanner(System.in);
String kisupas = scan.nextLine();
String gusupas = scan.nextLine();
String[] kisu = kisupas.split("", 0);
String[] gusu = gusupas.split("", 0);
for(int i=0; i<kisu.length; i++){
System.... | Main.java:3: error: class d is public, should be declared in a file named d.java
public class d{
^
1 error
|
s742057434 | p03760 | Java | import java.util.Scanner;
public class d{
public static void main (String[] args){
Scanner scan = new Scanner(System.in);
String kisupas = scan.nextLine();
String gusupas = scan.nextLine();
String[] kisu = kisupas.split("", 0);
String[] gusu = gusupas.split("", 0);
for(int i=0; i<kisu.length; i++){
System.... | Main.java:3: error: class d is public, should be declared in a file named d.java
public class d{
^
1 error
|
s454307234 | p03760 | Java | import java.util.Scanner;
public class d{
public static void main (String[] args){
Scanner scan = new Scanner(System.in);
String kisupas = scan.nextLine();
String gusupas = scan.nextLine();
String[] kisu = kisupas.split("", 0);
String[] gusu = gusupas.split("", 0);
for(int i=0; i<kisu.length; i++){
System.... | Main.java:3: error: class d is public, should be declared in a file named d.java
public class d{
^
1 error
|
s453371465 | p03760 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b;
if(a.size()==b.size()){
for(int i=0;i<a.size();i++){
c=c+a[i];
c=c+b[i];
}
}
if(a.size()!=b.size()){
for(int i=0;i<b.size();i++){
c=c+a[i];
c=c+b[i];
}
c=c+a[a.size-1];
}
cout<<c<<endl;
} | a.cc: In function 'int main()':
a.cc:18:17: 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 unsig... |
s248558724 | p03760 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
for(int i=0;i<a.size();i++){
cout<<a[i];
cout<<b[i]:
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:27: error: expected ';' before ':' token
10 | cout<<b[i]:
| ^
| ;
|
s601022922 | p03760 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
for(int i=0;i<a;i++){
cout<<a[i];
cout<<b[i]:
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:22: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
8 | for(int i=0;i<a;i++){
| ~^~
| | |
| | std::string {aka std::__cxx1... |
s750665450 | p03760 | C++ | #include <iostream>
using namespace std;
int main(){
string a, b;
cin >> a >> b;
queue<char> q1, q2;
for(char c : a) q1.push(c);
for(char c : b) q2.push(c);
string ans;
for(int i = 0; ; i++){
if(q1.size() == 0 && q2.size() == 0) break;
if(i % 2 == 0) ans += q1.front(), q1.po... | a.cc: In function 'int main()':
a.cc:7:5: error: 'queue' was not declared in this scope
7 | queue<char> q1, q2;
| ^~~~~
a.cc:2:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
1 | #include <iostream>
+++ |+#include <queue>
2 | using ... |
s008466363 | p03760 | C++ | # -*- coding: utf-8 -*-
import sys
import subprocess
import json
import time
import math
import re
import sqlite3
O = input()
E = input()
res = ""
for i in range(len(O)):
res += O[i]
if i < len(E): res += E[i]
print(res)
| a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:3:1: error: 'import' does not name a type
3 | import sys
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
|
s607013523 | 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];
}
... | a.cc: In function 'int main()':
a.cc:15:4: error: 'ekse' was not declared in this scope
15 | }ekse{
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.