submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s523512780 | p03992 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string words;
cin >> string;
for (int i = 0; i < 12; ++i)
{
cout << string[i];
if (i == 3)
{
cout << " ";
}
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:22: error: expected primary-expression before ';' token
7 | cin >> string;
| ^
a.cc:10:31: error: expected primary-expression before '[' token
10 | cout << string[i];
| ^
|
s211582426 | p03992 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string words;
cin >> string;
for (int i = 0; i < 12; ++i)
{
cout << string[i]
if (i == 3)
{
cout << " " ;
}
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:22: error: expected primary-expression before ';' token
7 | cin >> string;
| ^
a.cc:10:31: error: expected primary-expression before '[' token
10 | cout << string[i]
| ^
|
s305782395 | p03992 | C | #inlcude<stdio.h>
int main()
{
char s[13],s1[13];
scanf("%4s%8s",s,s1);
printf("%s %s\n",s,s1);
} | main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%4s%8s",s,s1);
| ... |
s880696585 | p03992 | C | #inlcude<stdio.h>
int main()
{
char s[13],s1[13];
scanf("%4s%8s",s,s1);
printf("%s %s\n",s,s1);
return 0;
} | main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%4s%8s",s,s1);
| ... |
s787005306 | p03992 | C | #inlcude<stdio.h>
int main()
{
char s[13],s1[13];
scanf("%4s%8s",s,s1);
printf("%s %s",s,s1);
} | main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%4s%8s",s,s1);
| ... |
s211233846 | p03992 | C++ | #inlcude<stdio.h>
int main()
{
char s[13],s1[13];
scanf("%4s%8s",s,s1);
printf("%s %s",s,s1);
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%4s%8s",s,s1);
| ^~~~~
a.cc:6:9: error: 'printf' was ... |
s334454659 | p03992 | C++ | #include<iostream>
#define rep(i,a,b) for(int i=a;i<b;i++)
using namespace std;
int main() {
char s[13];
cin >> s;
int count = 0;
rep(i, 0, 13) {
if(i!=4) cout << s[count++];
else cout << " ";
}
cout << endl;
return;
} | a.cc: In function 'int main()':
a.cc:15:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
15 | return;
| ^~~~~~
|
s873933481 | p03992 | C++ | #include<iostream>
#define rep(i,a,b) for(int i=a;i<b;i++)
using namespace std
int main() {
char s[13];
cin >> s;
int count = 0;
rep(i, 0, 13) {
if(i!=4) cout << s[count++];
else cout << " ";
}
cout << endl;
return;
} | a.cc:3:20: error: expected ';' before 'int'
3 | using namespace std
| ^
| ;
4 |
5 | int main() {
| ~~~
a.cc: In function 'int main()':
a.cc:15:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
15 ... |
s927819464 | p03992 | C++ | #include<iostream>
#define rep(i,a,b) for(i=a;i<b;i++)
using namespace std
int main() {
char s[13];
cin >> s;
int count = 0;
rep(i, 0, 13) {
if(i!=4) cout << s[count++];
else cout << " ";
}
cout << endl;
return;
} | a.cc:3:20: error: expected ';' before 'int'
3 | using namespace std
| ^
| ;
4 |
5 | int main() {
| ~~~
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
9 | rep(i, 0, 13) {
| ... |
s728796394 | p03992 | C++ | s=input()
print(s[:4]+" "+s[4:]) | a.cc:1:1: error: 's' does not name a type
1 | s=input()
| ^
|
s211549139 | p03992 | C | //# include <stdio.h>
//# include <iostream>
# include <cstdio>
//# include <conio.h>
//using namespace std;
int main ()
{
char s [20];
// cin >> s;
int x = scanf ("%s", s);
for ( int i=0; i < 4; i++ )
// cout << s [i];
printf ("%c", s [i]);
// cout << " ";
printf (" ");
for... | main.c:3:11: fatal error: cstdio: No such file or directory
3 | # include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s541878757 | p03992 | C++ | # include <iostream>
using namespace std;
int Main ()
{
char s [20];
cin >> s;
for ( int i=0; i < 4; i++ )
cout << s [i];
cout << " ";
for ( int i=4; i < 12; i++ )
cout << s [i];
return 0;
}
| /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s543581027 | p03992 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
char a[12];
gets(a);
for(int i=0;i<4;i++) printf("%c",a[i]);
printf(" ");
for(int i=4;i<12;i++) printf("%c",a[i]);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(a);
| ^~~~
| getw
|
s851709051 | p03992 | Java | public class Main {
public static main(String[] args) {
Scanner s = new Scanner(System.in);
if(s.hasNext()) {
String input = s.next();
System.out.println(input.substring(0, 3) + " " + input.substring(4));
}
}
} | Main.java:2: error: invalid method declaration; return type required
public static main(String[] args) {
^
1 error
|
s634689295 | p03992 | C++ | #include <iostream>
#include <cmath>
#include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
char a[12];
gets(a);
for(int i=0;i<4;i++) printf("%c",a[i]);
printf(" ");
for(int i=4;i<12;i++) printf("%c",a[i]);
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
|
s307083122 | p03992 | C++ | #include <iostream>
#include <stdio.h>
#include <cstdio>.
using namespace std;
int main(){
char s[20];
gets(s);
string strS;
strS.append(s);
string result = strS.substr(0,4) + string(" ") + strS.substr(4,11);
printf("%s", result.c_str());
return 0;
} | a.cc:3:18: warning: extra tokens at end of #include directive
3 | #include <cstdio>.
| ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s015814517 | p03992 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
char s[20];
gets(s);
string strS;
strS.append(s);
string result = strS.substr(0,4) + string(" ") + strS.substr(4,11);
printf("%s", result.c_str());
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s623796125 | p03992 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main(int argc, char **argv){
char s[20];
gets(s);
string strS;
strS.append(s);
string result = strS.substr(0,4) + string(" ") + strS.substr(4,11);
printf("%s", result.c_str());
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s786208093 | p03992 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main(int argc, char **argv){
char s[20];
gets_s(s);
string strS;
strS.append(s);
string result = strS.substr(0,4) + string(" ") + strS.substr(4,11);
printf("%s", result.c_str());
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:6:9: error: 'gets_s' was not declared in this scope
6 | gets_s(s);
| ^~~~~~
|
s582752214 | p03992 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin>>s;
s.insert(4, “ “);
cout<<s<<endl;
return 0;
}
| a.cc:7:13: error: extended character “ is not valid in an identifier
7 | s.insert(4, “ “);
| ^
a.cc:7:15: error: extended character “ is not valid in an identifier
7 | s.insert(4, “ “);
| ^
a.cc: In function 'int main()':
a.cc:7:13: error: '\U0000201c' was not declared in t... |
s323548896 | p03992 | C++ | #include<iostream>
#include<conio.h>
#include<string>
using namespace std;
int main(){
string s;
cin>>s;
s.insert(4, “ “);
cout<<s<<endl;
return 0;
}
| a.cc:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s166699127 | p03992 | Java | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
String ret = "";
while(true){
ret += System.... | Main.java:16: error: unreachable statement
System.out.println(ret);
^
1 error
|
s927543984 | p03992 | C++ | #include<iostream>
#include<conio.h>
#include<string>
using namespace std;
int main(){
string s=”CODEFESTIVAL”;
s.insert(4, “ “);
cout<<s;
getch()
return 0;
}
| a.cc:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s147403390 | p03992 | C++ | #include<iostream>
#include<cstring>
using namespace std;
int main(){
char S[12];
cout<<”Enter string:” << endl;
cin.getline(S,12);
Char* point;
point=strtok(S, “.”);
while(point!=NULL){
cout<<point<<endl;
point=strtok(NULL,”.”);
}
Retrun 0;
}
| a.cc:6:7: error: extended character ” is not valid in an identifier
6 | cout<<”Enter string:” << endl;
| ^
a.cc:6:21: error: extended character ” is not valid in an identifier
6 | cout<<”Enter string:” << endl;
| ^
a.cc:9:17: error: extended character “ is not valid in an i... |
s856955706 | p03992 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
if (a == 1)
return 0;
// get two integers separated with half-width break
int[] b = new int[a];
try {
... | Main.java:8: error: incompatible types: unexpected return value
return 0;
^
1 error
|
s278814125 | p03992 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int number;
cin >> number;
string tmp;
cin >> tmp;
int likes[number];
char* pch;
pch = strtok (tmp.c_str()," ");
int pos = 0;
while(pch != NULL){
likes[pos] = atoi(pch);
pch = strtok (tm... | a.cc: In function 'int main()':
a.cc:18:11: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
18 | pch = strtok (tmp.c_str()," ");
| ^~~~~~
| strtoq
|
s005540483 | p03992 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int number;
cin >> number;
string tmp;
cin >> tmp;
int likes[number];
char* pch;
pch = strtok (tmp.c_str()," ");
int pos = 0;
while(pch != null){
likes[pos] = atoi(pch);
pch = strtok (tmp... | a.cc: In function 'int main()':
a.cc:17:11: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
17 | pch = strtok (tmp.c_str()," ");
| ^~~~~~
| strtoq
a.cc:19:18: error: 'null' was not declared in this scope
19 | while(pch != null){
| ... |
s707538082 | p03992 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char s[14];int i=0;
scanf("%s", str);
for(i=12;i>3;i--){
s[i]=s[i-1];
}
s[3]=' ';
printf("%s",s);
return 0;
} | main.c: In function 'main':
main.c:7:21: error: 'str' undeclared (first use in this function)
7 | scanf("%s", str);
| ^~~
main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
|
s412282379 | p03992 | C++ | #include<stdio.h>
using namespace std;
int main(){
char s[11];
scanf( "%c, &s[]");
int i;
for( i= 0; i< 3; i++){
printf( "%c, s[i]");
}
printf( " ");
while( 5<= i){
if( 11< i) break;
else{
i++; printf( "%c, s[i]");
}
printf( \n);
}
return 0;
} | a.cc:31:17: error: stray '\' in program
31 | printf( \n);
| ^
a.cc: In function 'int main()':
a.cc:31:18: error: 'n' was not declared in this scope
31 | printf( \n);
| ^
|
s881389236 | p03992 | C++ | #include<iostream>
using namespace std;
int main()
{
string s;
cin >> s;
cout << st[0] << st[1] << st[2] << st[3] << " " << st[4] << st[5] << st[6] << st[[7] << st[8] << st[9] << st[10] << st[11] ;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:13: error: 'st' was not declared in this scope; did you mean 's'?
8 | cout << st[0] << st[1] << st[2] << st[3] << " " << st[4] << st[5] << st[6] << st[[7] << st[8] << st[9] << st[10] << st[11] ;
| ^~
| s
a.cc:8:85: error: two consecutive... |
s328339148 | p03992 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] s... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s775266077 | p03992 | C++ | #include <iostream>
using namespace std;
int Main()
{
string st;
cin >> st;
for ( int i = 0; i < 3; i ++ )
cout << st[i];
cout << " ";
for ( int i = 3; i < st.length(); i ++ )
cout << st[i];
return 0;
}
| /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s137354916 | p03992 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] s... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s885852554 | p03992 | C | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main(){
char ary1[14];
char ary2[14];
char ary3[14];
int i=0;
scanf("%s",ary1);
for(i=0;i<4;i++) ary3[i]=ary1[i];
for(i=0;i<8;i++) ary2[i]=ary1[4+i];
strcat(ary3," ");
strcat(ary3,ary2);
printf("%s/n",art3);
return 0;
} | main.c: In function 'main':
main.c:15:15: error: 'art3' undeclared (first use in this function); did you mean 'ary3'?
15 | printf("%s/n",art3);
| ^~~~
| ary3
main.c:15:15: note: each undeclared identifier is reported only once for each function it appears in
|
s063964451 | p03992 | C++ | #include<iostream>;
using namespace std;
int main(){
char s[11];
scanf( %s, s[]);
int i;
for( i= 0; i< 3; i++){
printf( %s, s[i]);
}
printf( " ");
while( 5=< i){
i++;
printf( %s, s[i]);
if( 11< i) break;
}
return 0;
} | a.cc:1:19: warning: extra tokens at end of #include directive
1 | #include<iostream>;
| ^
a.cc: In function 'int main()':
a.cc:9:16: error: expected primary-expression before '%' token
9 | scanf( %s, s[]);
| ^
a.cc:9:22: error: expected primary-expression bef... |
s577723308 | p03992 | C | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main(){
char ary1[14];
char ary2[14];
char ary3[14];
int i=0;
scanf_s("%s",ary1);
for(i=0;i<4;i++) ary3[i]=ary1[i];
for(i=0;i<8;i++) ary2[i]=ary1[4+i];
strcat(ary3," ");
strcat(art3,ary2);
printf("%s/n",art3);
return 0;
} | main.c: In function 'main':
main.c:10:1: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
10 | scanf_s("%s",ary1);
| ^~~~~~~
| scanf
main.c:14:8: error: 'art3' undeclared (first use in this function); did you mean 'ary3'?
14 | strcat(art3,ary2)... |
s629148344 | p03992 | C | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <strong.h>
int main(){
char ary1[14];
char ary2[14];
char ary3[14];
int i=0;
scanf_s("%s",ary1);
for(i=0;i<4;i++) ary3[i]=ary1[i];
for(i=0;i<8;i++) ary2[i]=ary1[4+i];
strcat(ary3," ");
strcat(art3,ary2);
printf("%s/n",art3);
return 0;
} | main.c:3:10: fatal error: strong.h: No such file or directory
3 | #include <strong.h>
| ^~~~~~~~~~
compilation terminated.
|
s371251712 | p03992 | C | #include <stdio.h>
#include <stdio.h>
int main(){
char ary1[14];
char ary2[14];
char ary3[14];
int i=0;
scanf_s("%s",ary1);
for(i=0;i<4;i++) ary3[i]=ary1[i];
for(i=0;i<8;i++) ary2[i]=ary1[4+i];
strcat(ary3," ");
strcat(art3,ary2);
printf("%s/n",art3);
return 0;
} | main.c: In function 'main':
main.c:9:1: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scanf_s("%s",ary1);
| ^~~~~~~
| scanf
main.c:12:1: error: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
12 | strcat(ary3... |
s895514817 | p03992 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
// String str = "CODEFESTIVel";
String n = " ";
if (str.length()==12){
System.out.println();
char[] str_a = str.t... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s238445304 | p03992 | C | #include <stdio.h>
#include <iostream>
#include <cstdio>
using namespace std;
int main(void)
{
char s[13];
scanf("%s",s);
printf("%c%c%c%c %c%c%c%c%c%c%c%c\n",s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10],s[11]);
return 0;
}
| main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s110109360 | p03992 | C++ | #include <stdio.h>
int main(void){
char buf[25];
scanf("%s",buf);
char temp;
for(int i=0;i<25;i++){
if(4==i){
temp=buf[i];
buf[i]=" ";
}else if(4 < i){
int t=buf[i];
buf[i] = temp;
temp=t;
}
}
printf(buf... | a.cc: In function 'int main()':
a.cc:11:20: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
11 | buf[i]=" ";
| ^~~
| |
| const char*
|
s785088007 | p03992 | Java | public class Main {
public String A(String str) {
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] str_2 = new char[8];
for (int i=0;i<4;i++){
str_1[i] = str_a[i];
}
for (int i=4;i<str_a.length;i++){
str_2[i-4] = str_a[i];
}
Stri... | Main.java:23: error: class, interface, enum, or record expected
}
^
1 error
|
s724415569 | p03992 | C++ | #include <iostream>
#include <istream>
#include <string>
using namespace std;
int main(){
string src;
int pos = 0;
cin >> src;
string rst(src.length()+2, '');
for(int i = 0; i < src.length() + 2; i++){
if(i == 4){
rst[i] = ' ';
}
else{
rst[i] = ... | a.cc:13:32: error: empty character constant
13 | string rst(src.length()+2, '');
| ^~
|
s517451556 | p03992 | Java | public class Solution {
public String A(String str) {
if (str.length()==12){
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] str_2 = new char[8];
for (int i=1;i<str_a.length;i++){
if (str_a[i]>=55 && str_a[i]<=90){
flag = true;
}
... | Main.java:1: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
1 error
|
s418570238 | p03992 | Java | package testA;
public class main {
public static void main(String[] args) {
// TODO Auto-generated method stub
String str = "CODEFESTIVEL";
if (str.length()==12){
System.out.println();
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] str_2 = new char[8];... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s803163346 | p03992 | Java | package testA;
public class Solution {
public String A(String s) {
if (str.length()==12){
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] str_2 = new char[8];
for (int i=1;i<str_a.length;i++){
if (str_a[i]>=55 && str_a[i]<=90){
flag = true;
... | Main.java:3: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
Main.java:5: error: cannot find symbol
if (str.length()==12){
^
symbol: variable str
location: class Solution
Main.java:6: error: cannot find symbol
char[] str_a = str... |
s930505970 | p03992 | C++ | #include <iostream>
#include <istream>
#include <string>
using namespace std;
void main(){
string str;
cin >> str ;
string rst(str.length(), '');
int pos = 0;
for(int i = 0; i < rst.length(); i++){
if(i == 4){
rst[i] = ' ';
}
else{
rst[i] = str[p... | a.cc:10:30: error: empty character constant
10 | string rst(str.length(), '');
| ^~
a.cc:7:1: error: '::main' must return 'int'
7 | void main(){
| ^~~~
|
s389790540 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int v[N];
int main(int argc, char const *argv[])
{
/* code */
while (cin>>n){
for (int i=1;i<=n;i++) scanf("%d",v+i);
int ans=0;
for (int i=1;i<=n;i++){
int t=v[i];
if (v[t]==i) ans++;
}
cout<<ans/2<<endl;
}
return 0;
} | a.cc: In function 'int main(int, const char**)':
a.cc:10:21: error: 'n' was not declared in this scope
10 | while (cin>>n){
| ^
|
s740768405 | p03992 | Java | public class Solution {
public String A(String s) {
if (str.length()==12){
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] str_2 = new char[8];
for (int i=1;i<str_a.length;i++){
if (str_a[i]>=55 && str_a[i]<=90){
flag = true;
}
else{
... | Main.java:1: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
Main.java:3: error: cannot find symbol
if (str.length()==12){
^
symbol: variable str
location: class Solution
Main.java:4: error: cannot find symbol
char[] str_a = str... |
s010678446 | p03992 | Java | public class Solution {
public String A(String s) {
if (str.length()==12){
char[] str_a = str.toCharArray();
boolean flag = true;
char[] str_1 = new char[4];
char[] str_2 = new char[8];
for (int i=1;i<str_a.length;i++){
if (str_a[i]>=55 && str_a[i]<=90){
flag = true;
}
else{
... | Main.java:28: error: ';' expected
return c
^
1 error
|
s583426768 | p03992 | C++ | #include <algorithm>
#include <cstdio>
#include <map>
using namespace std;
typedef long long ll;
char s[10];
int main() {
gets(s);
for (int i = 0; i < 12; i++) {
if (i == 4) putchar(' ');
putchar(s[i]);
}
putchar('\n');
}
| a.cc: In function 'int main()':
a.cc:12:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(s);
| ^~~~
| getw
|
s994794745 | p03992 | Java |
public class Mainl {
public static void main(String[] args) {
String str = System.console().readLine();
String strFirst = str.substring(0, 4);
String strLast = str.substring(4);
str = strFirst + " " + strLast + "\n";
System.out.print(str);
}
}
| Main.java:2: error: class Mainl is public, should be declared in a file named Mainl.java
public class Mainl {
^
1 error
|
s828109139 | p03992 | C++ | #include <algorithm>
#include <cstdio>
#include <map>
using namespace std;
typedef long long ll;
char s[10];
int main() {
gets(s);
for (int i = 0; i < 12; i++) {
if (i == 4) putchar(' ');
putchar(s[i]);
}
}
| a.cc: In function 'int main()':
a.cc:12:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(s);
| ^~~~
| getw
|
s363632151 | p03992 | Java | import java.util.*;
public class Contest {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.next();
String code = sc.next();
StringBuffer sb = new StringBuffer();
char[] m = code.toCharArray();
for (int i = 0; i < m.length; i++){
... | Main.java:3: error: class Contest is public, should be declared in a file named Contest.java
public class Contest {
^
1 error
|
s123611903 | p03992 | C | #include <stdio.h>
#include <string.h>
mian(){
char ary1[100];
char ary2[100];
char ary3[100];
int i=0;
//fgets(ary1,sizeof(char)*15,stdin);
scanf("%s",ary1);
while(i<4){
ary2[i]=ary1[i];
i++;
}
while(i<8){
ary3[i]=ary1[i+4];
i++;
}
strcat(ary2," ");
strcat(ary2,ary3);
printf("%s\n",ary2);
return 0;
} | main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
4 | mian(){
| ^~~~
|
s773534115 | p03992 | C++ | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <set>
#include <functional>
#include <map>
#include <queue>
#include <cmath>
#include <string>
#include <stack>
using namespace std;
int main(void){
string str;
cin >> str;
cout << str.substr(0,4) << " " << str.subst... | a.cc: In function 'int main()':
a.cc:16:1: error: 'cin' was not declared in this scope
16 | cin >> str;
| ^~~
a.cc:13:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
12 | #include <stack>
+++ |+#include <iostream>
13 | using namespace std;... |
s541834060 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary1[100];
char ary2[100];
char ary3[100];
int i=0;
//fgets(ary1,sizeof(char)*15,stdin);
scanf("%s",ary1);
while(i<4){
ary2[i]=ary1[i];
i++;
}
while(i<8){
ary3[i]=ary1[i+4];
i++;
}
strcat(ary2," ");
strcat(ary2,ary3);
printf("%s\n",ary2);
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s560829554 | p03992 | C++ | #include <iostream>
#include <vector>
template<typename type>
std::vector<type>&& input_value(std::istream& ist)
{
type buffer;
std::vector<type> ret;
while (ist >> buffer) {
ret.push_back(buffer);
}
return ret;
}
int main()
{
int count{ 0 };
std::vector<int> rabbits{ input_value<int>(std::cin) };
for (a... | a.cc: In instantiation of 'std::vector<type>&& input_value(std::istream&) [with type = int; std::istream = std::basic_istream<char>]':
a.cc:20:44: required from here
20 | std::vector<int> rabbits{ input_value<int>(std::cin) };
| ~~~~~~~~~~~~~~~~^~~~~~~~~~
a.cc:14:16:... |
s076508792 | p03992 | C++ | #include <string>
using namespace std;
string insertSpace(string s){
string res = s.insert(4, " ");
res = res.append("\n");
return res;
}; | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s610860813 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary1[14];
char ary2[14];
char ary3[14];
int i=0;
//fgets(ary1,sizeof(char)*15,stdin);
scanf("%s",ary1);
while(i<4){
ary2[i]=ary1[i];
i++;
}
while(i<8){
ary3[i]=ary1[i+4];
i++;
}
strcat(ary2," ");
strcat(ary2,ary3);
printf("%s\n",ary2);
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s176779759 | p03992 | Java | import java.util.*;
Public class Main{
public static void main(String [] args){
Scanner sc = new Scanner (System.in);
String in = sc.next();
return in.substring(0,4) + " " + in.substring(4);
}
} | Main.java:3: error: class, interface, enum, or record expected
Public class Main{
^
1 error
|
s836676374 | p03992 | Java | public class Codefestival {
public static void main(String[] args) {
String str = args[0];
String strFirst = str.substring(0, 4);
String strLast = str.substring(4);
str = strFirst + " " + strLast + "\n";
System.out.print(str);
}
}
| Main.java:1: error: class Codefestival is public, should be declared in a file named Codefestival.java
public class Codefestival {
^
1 error
|
s759606114 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary1[14];
char ary2[14];
char ary3[14];
int i;
fgets(ary1,sizeof(char)*15,stdin);
//scanf("%s",ary1);
while(i<4) ary2[i]=ary1[i];
while(i<8) ary3[i]=ary1[i+4];
strcat(ary2," ");
strcat(ary2,ary3);
printf("%s\n",ary2);
return 0;
} | main.c: In function 'mian':
main.c:9:1: warning: 'fgets' writing 15 bytes into a region of size 14 overflows the destination [-Wstringop-overflow=]
9 | fgets(ary1,sizeof(char)*15,stdin);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:5:6: note: destination object 'ary1' of size 14
5 | char ary1[14];
| ... |
s259103309 | p03992 | C++ | s = raw_input()
print s[:4] + ' ' + s[4:] | a.cc:1:1: error: 's' does not name a type
1 | s = raw_input()
| ^
|
s567206381 | p03992 | Java |
public class codefestival {
public static void main(String[] args) {
String str = args[0];
String strFirst = str.substring(0, 4);
String strLast = str.substring(4);
str = strFirst + " " + strLast + "\n";
System.out.print(str);
}
}
| Main.java:2: error: class codefestival is public, should be declared in a file named codefestival.java
public class codefestival {
^
1 error
|
s044765678 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary1[14];
char ary2[14];
char ary3[14];
int i;
fgets(ary1,sizeof(char)*15,stdin);
//scanf("%s",ary1);
while(i<4) ary2[i]=ary1[i];
while(i<8) ary3[i]=ary1[i+4];
strcat(ary2," ");
strcat(ary2,ary3);
printf("%s\n",ary2);
return 0;
} | main.c: In function 'mian':
main.c:9:1: warning: 'fgets' writing 15 bytes into a region of size 14 overflows the destination [-Wstringop-overflow=]
9 | fgets(ary1,sizeof(char)*15,stdin);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:5:6: note: destination object 'ary1' of size 14
5 | char ary1[14];
| ... |
s602071296 | p03992 | C++ | #include <iostream>
int main() {
string s;
cin >> s;
cout << s.substr(0, 4) << " " << s.substr(4);
return 0;
} | a.cc: In function 'int main()':
a.cc:4:4: error: 'string' was not declared in this scope
4 | string s;
| ^~~~~~
a.cc:4:4: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream... |
s906104216 | p03992 | Java | public class Codefestival {
public static void main(String[] args) {
String str = args[0];
String strFirst = str.substring(0, 3);
String strLast = str.substring(4);
str = strFirst + " " + strLast + "\n";
System.out.print(str);
}
}
| Main.java:1: error: class Codefestival is public, should be declared in a file named Codefestival.java
public class Codefestival {
^
1 error
|
s157536286 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary1[14];
char ary2[14];
char ary3[14];
int i;
scanf("%s",ary1);
while(i<4) ary2[i]=ary1[i];
while(i<8) ary3[i]=ary1[i+4];
strcat(ary2," ");
strcat(ary2,ary3);
printf("%s\n",ary2);
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s649345818 | p03992 | C++ | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <set>
#include <functional>
#include <map>
#include <queue>
#include <cmath>
#include <string>
#include <stack>
using namespace std;
int main(void){
string str;
scanf("%s",str);
cout << str.substr(0,4) << " " << str.... | a.cc: In function 'int main()':
a.cc:17:1: error: 'cout' was not declared in this scope
17 | cout << str.substr(0,4) << " " << str.substr(4,8);
| ^~~~
a.cc:13:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
12 | #include <stack>
+++ |+#inclu... |
s247229332 | p03992 | C | #include <stdlib.h>
#include <stdio.h>
int main (int argc, char *argv[]){
char string[12];
scanf(%s,&string);
int i = 0;
while (i<12){
if (i = 4) printf(" ");
else {
printf("%c",string[i]);
i++;
}
}
return 0;
} | main.c: In function 'main':
main.c:7:15: error: expected expression before '%' token
7 | scanf(%s,&string);
| ^
|
s592001353 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary1[14];
char ary2[14];
char ary3[14];
int i;
scanf("%s",ary1);
while(i<4) ary2[i]=ary1[i];
while(i<8) ary3[i]=ary1[i+4];
strcat(ary2," ");
strcat(ary2,ary3);
printf("%s\n",ary2);
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s172004421 | p03992 | Java | public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
String input = sc.nextLine();
System.out.println(question1(input));
}
public static String question1(String input)
{
String result = input.substring(0, 4) + " " + input.substring(4);
return result;
... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s561617559 | p03992 | C | #include <stdlib.h>
#include <stdio.h>
int main (int argc, char *argv[]){
char* string[12];
scanf(%s,&string);
int i = 0;
while (i<12){
if (i = 4) printf(" ");
else {
printf("%c",&string[i]);
i++;
}
}
return 0;
} | main.c: In function 'main':
main.c:7:15: error: expected expression before '%' token
7 | scanf(%s,&string);
| ^
|
s537455410 | p03992 | C | #include <stdlib.h>
#include <stdio.h>
int main (int argc, char *argv[]){
char* string[12];
scanf(%s,&string);
int i = 0;
while (i<12){
if (i = 4) printf(" ");
else {
printf("%c",string[i]);
i++;
}
}
return 0;
} | main.c: In function 'main':
main.c:7:15: error: expected expression before '%' token
7 | scanf(%s,&string);
| ^
|
s040862809 | p03992 | C | string s1, s2;
s1=LOVE;
s2=EASTASIA;
printf("%s%s\n","%s %s",s1,s2,s1,s2);
return 0;
| main.c:1:1: error: unknown type name 'string'
1 | string s1, s2;
| ^~~~~~
main.c:2:1: warning: data definition has no type or storage class
2 | s1=LOVE;
| ^~
main.c:2:1: error: type defaults to 'int' in declaration of 's1' [-Wimplicit-int]
main.c:2:4: error: 'LOVE' undeclared here (not in a function... |
s879499344 | p03992 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string str;
for (int i = 0; i < 12; ++i){
cin >> str;
if(i==3){
cout << " ";
}
cout << str;
}
}
return 0;
} | a.cc:18:5: error: expected unqualified-id before 'return'
18 | return 0;
| ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s515157186 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary[14];
fgets(ary,sizeof(char)*4,stdin);
strcat(ary," ");
fgets(ary,sizeof(char)*8,stdin);
printf("%s\n",ary);
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s624088118 | p03992 | C++ | #include <string>
string insertSpace(string s){
string res = s.insert(4, " ");
res = res.append("\n");
return res;
} | a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'?
2 | string insertSpace(string s){
| ^~~~~~
| stdin
|
s333214579 | p03992 | C++ | #include <iostream>
#include <string>
using namespace std;
void main() {
char s[100];
string a;
cin >> s;
for (int i = 0; s[i] != '\0'; ++i) {
if (i == 4)
a = a + " ";
a = a + s[i];
}
cout << a;
} | a.cc:5:1: error: '::main' must return 'int'
5 | void main() {
| ^~~~
|
s083009726 | p03992 | C++ | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <set>
#include <functional>
#include <map>
#include <queue>
#include <cmath>
#include <string>
#include <stack>
#define SIZE 12
using namespace std;
typedef long long int ll;
typedef pair <int,int>
int main(void){
s... | a.cc:16:9: error: two or more data types in declaration of 'main'
16 | typedef pair <int,int>
| ^~~~~~~~~~~~~~
|
s197517560 | p03992 | C++ | #include <iostream>
#include <string>
using namespace std;
void main() {
char s[100];
string a;
cin >> s;
for (int i = 0; s[i] != '\0'; ++i) {
if (i == 4)
a = a + " ";
a = a + s[i];
}
cout << a;
} | a.cc:5:1: error: '::main' must return 'int'
5 | void main() {
| ^~~~
|
s755005565 | p03992 | C++ | string insertSpace(string s){
string res = s.insert(4, " ");
res = res.append("\n");
return res;
} | a.cc:1:1: error: 'string' does not name a type
1 | string insertSpace(string s){
| ^~~~~~
|
s293678460 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary[14];
fgets(ary,sizeof(char)*4,stdin);
strcat(ary," ");
fgets(ary,sizeof(char)*8,stdin);
printf("%s\n",ary);
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s963353819 | p03992 | C | int main(){
int num;
int counter=0;
scanf("%d",num);
int array[num];
for (int i=0;i<num;i++){
scanf("%d",&array[i]);
}
for (int i=0;i<num;i++){
if(array[array[i]]=array[i]){
count++;
}
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%d",num);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:5:9: warning: i... |
s969135720 | p03992 | C++ | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <set>
#include <functional>
#include <map>
#include <queue>
#include <cmath>
#include <string>
#include <stack>
#define SIZE 12
using namespace std;
typedef long long int ll;
typedef pair <int,int>
int main(void){
i... | a.cc:16:9: error: two or more data types in declaration of 'main'
16 | typedef pair <int,int>
| ^~~~~~~~~~~~~~
|
s622240440 | p03992 | Java | Public class Main{
import java.util.*;
public static void main(String [] args){
Scanner sc = new Scanner (System.in);
String in = sc.next();
return in.substring(0,4) + " " + in.substring(4);
}
} | Main.java:1: error: class, interface, enum, or record expected
Public class Main{
^
Main.java:3: error: illegal start of type
import java.util.*;
^
Main.java:3: error: <identifier> expected
import java.util.*;
^
3 errors
|
s980381162 | p03992 | Java | import java.util.*;
import java.io.*;
public class Test {// Main
public static void main(String[] args){
String Str = new String("CODEFESTIVAL");
String a = Str.substring(0,4);
String b = Str.substring(3);
a = a.concat(" ");
b = b.concat("\n");
System.out.println(a.concat(b... | Main.java:3: error: class Test is public, should be declared in a file named Test.java
public class Test {// Main
^
1 error
|
s082927017 | p03992 | C | int main(){
int num;
int counter=0;
scanf("%d",num);
int array[num];
for (int i=0;i<num;i++){
scanf("%d",array[i]);
}
for (int i=0;i<num;i++){
if(array[array[i]]=array[i]){
count++;
}
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%d",num);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:5:9: warning: i... |
s687098834 | p03992 | C | #include <stdio.h>
#include <string.h>
int mian(){
char ary[14];
fgets(ary,sizeof(char)*4,stdin);
ary[4]=" ";
fgets(ary,sizeof(char)*8,stdin);
printf("%d\n",ary);
return 0;
} | main.c: In function 'mian':
main.c:6:7: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
6 | ary[4]=" ";
| ^
|
s415817789 | p03992 | C++ | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <set>
#include <functional>
#include <map>
#include <queue>
#include <cmath>
#include <string>
#include <stack>
#define SIZE 12
using namespace std;
typedef long long int ll;
typedef pair <int,int>
int main(){
int s... | a.cc:16:9: error: two or more data types in declaration of 'main'
16 | typedef pair <int,int>
| ^~~~~~~~~~~~~~
|
s119950125 | p03992 | C++ | s = input()
for i in range(12):
if i == 4:
print('', s[i], end = '')
else:
print(s[i], end = '')
print() | a.cc:4:23: error: empty character constant
4 | print('', s[i], end = '')
| ^~
a.cc:4:39: error: empty character constant
4 | print('', s[i], end = '')
| ^~
a.cc:6:35: error: empty character constant
6 | ... |
s448512780 | p03992 | C++ | public class Main {
public static void main(String[] args) {
String firstPart = args[0].substring(0, 4);
String secondPart = args[0].substring(4, 12);
System.out.println(firstPart + " " + secondPart);
}
}
| a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class Main {
| ^~~~~~
|
s679149363 | p03992 | Java | import java.io.*;
import java.util.*;
public class Sample{
public static void main (String[] args) throws IOException {
//BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Scanner s=new Scanner(System.in);
String str=s.nextLine();
for(int i=0;i<12;i++){
... | Main.java:3: error: class Sample is public, should be declared in a file named Sample.java
public class Sample{
^
1 error
|
s770026879 | p03992 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] lst = new char[12];
String tmp = sc.nextLine();
lst = tmp.toCharArray();
String result = "";
for (int i = 0; i < 12; i++) {
result += lst[i];
if (i == 3) {
result += " ";
}
}
System.ou... | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s184911429 | p03992 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string str;
cin >> str;
for (auto itr = str.begin(); itr != str.end(); ++ itr){
if (*(itr - str.begin()) == 4){
cout << " ";
}
cout << *itr;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:13: error: invalid type argument of unary '*' (have '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::difference_type' {aka 'long int'})
12 | if (*(itr - str.begin()) == 4){
| ^~~~~~~~~~~~~~~~~~~~
|
s433597116 | p03992 | C++ | #include<iostream>
using namespace std;
int main()
{
// get a string
string s;
cin >> s;
char *schar = s.c_str();
// output
for(i=0; i<schar.length(); i++)
{
if (i=3)
cout<<' ';
cout<<schar[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:26: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
9 | char *schar = s.c_str();
| ~~~~~~~^~
| |
| const char*
a.cc:13:5: error: 'i' was not declared in this scope
... |
s117312350 | p03992 | C++ | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <set>
#include <functional>
#include <map>
#include <queue>
#include <cmath>
#include <string>
#include <stack>
#define SIZE 12
using namespace std;
typedef long long int ll;
typedef pair <int,int>
int main(){
strin... | a.cc:16:9: error: two or more data types in declaration of 'main'
16 | typedef pair <int,int>
| ^~~~~~~~~~~~~~
|
s250763123 | p03992 | C++ | #include <cstdlib>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <stdio.h>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
#define SIZE(x) (int((x).size()))
#define rep(i,l,r) for (int... | a.cc: In function 'void lemon()':
a.cc:30:24: error: 'gets' was not declared in this scope; did you mean 'getw'?
30 | char buf[100]; gets(buf);
| ^~~~
| getw
|
s824125407 | p03992 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
cin >> str;
for (auto itr = str.begin(); itr != str.end(); ++ itr){
if (*(itr - str.begin()) == 4){
cout << " ";
}
cout << *itr;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: 'str' was not declared in this scope; did you mean 'std'?
10 | cin >> str;
| ^~~
| std
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.