submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s449346962
p00100
C++
//AOJ 0100 #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<cctype> using namespace std; #define MAX_N 100 unsigned long long int a[4001] = {0}, b, i, j, k, ans, n; char str[1000]; int sort(const void *a, const void *b){ return *(int*)a - *(int*)b; } int main(){ while(scanf("%lld", &...
a.cc: In function 'int main()': a.cc:34:2: error: expected '}' at end of input 34 | } | ^ a.cc:17:11: note: to match this '{' 17 | int main(){ | ^
s698494865
p00100
C++
#include<iostream> #include<map> using namespace std; int main(){ long long ans[4000]={0}; int n,number,money,many,over_many=0,over[4000]={0}; while(1){ cin >> n; if(n==0)break; over_many=0; memset(over,0,sizeof(over)); memset(ans,0,sizeof(ans)); for(int i=0;i<n;i++){ cin >> number >...
a.cc: In function 'int main()': a.cc:11:5: error: 'memset' was not declared in this scope 11 | memset(over,0,sizeof(over)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<map> +++ |+#include <cstring> 3 ...
s687451707
p00100
C++
#include <fstream> using namespace std; main(){ int n,m=0; int id[4000],tanka[4000],suryou[4000]; cin>>n; while(n!=0){ for(int i=0;i<n;i++){ cin>>id[i]>>tanka[i]>>suryou[i]; } for(int i=0;i<n;i++){ if(tanka[i]*suryou[i]>=1000000){ cout<<id[i]<<endl; m++; } } if(m==0) cout<<"NA"<<endl; cin>>n; }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:1: error: 'cin' was not declared in this scope 8 | cin>>n; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by a...
s273647641
p00100
C++
#include <fstream> using namespace std; main(){ int n,m=0; int id[4000],tanka[4000],suryou[4000]; cin>>n; while(n!=0){ for(int i=0;i<n;i++){ cin>>id[i]>>tanka[i]>>suryou[i]; } for(int i=0;i<n;i++){ if(tanka[i]*suryou[i]>=1000000){ cout<<id[i]<<endl; m++; } if(m==0) cout<<"NA"<<endl; cin>>n; } }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:1: error: 'cin' was not declared in this scope 8 | cin>>n; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by a...
s056554393
p00100
C++
while (n = gets().to_i()) != 0 staff = Array.new(4e3, 0); flag = false n.times() do str = gets().split() id = str[0].to_i() price = str[1].to_i() num = str[2].to_i() staff[id - 1] += price * num end staff.each_with_index() do |total, id| if total >= 1e6 puts(id + 1) flag = ...
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while (n = gets().to_i()) != 0 | ^~~~~ a.cc:3:3: error: 'flag' does not name a type 3 | flag = false | ^~~~
s109980207
p00100
C++
#include <bits/stdc++.h> #define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v) using namespace std; typedef long long int lint; static inline int in(){ int x; scanf("%d", &x); return (x); } static inline lint inl(){ lint x; scanf("lld", &x); return (x); } int main() { list<int> staffList; map<int, lin...
a.cc: In function 'int main()': a.cc:29:37: error: 'lin' was not declared in this scope; did you mean 'sin'? 29 | unitPrice = lin(); | ^~~ | sin
s086965047
p00101
Java
import java.util.Scanner; public class J0101{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int n = Integer.parseInt(s); for(int i=0; i<n; i++){ s = sc.nextLine(); s = s.replaceAll("Hoshino", "Hoshina"); System.out.println(s); } } }...
Main.java:3: error: class J0101 is public, should be declared in a file named J0101.java public class J0101{ ^ 1 error
s803003951
p00101
Java
public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String number = br.readLine(); int n = Integer.parseInt(number); for(int i=0; i<n; i++){ String str = br.readLine(); String[] output = str.split(" ", 0); int j=0; f...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String args[]) throws IOException{ ^ (use --enable-preview to enable unnamed classes) 1 error
s816288374
p00101
Java
import java.io.*; public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String number = br.readLine(); int n = Integer.parseInt(number); for(int i=0; i<n; i++){ String str = br.readLine(); String[] output = str.split(" ", 0...
Main.java:3: error: unnamed classes are a preview feature and are disabled by default. public static void main(String args[]) throws IOException{ ^ (use --enable-preview to enable unnamed classes) 1 error
s419925578
p00101
Java
import java.io.*; public class Main { public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String number = br.readLine(); int n = Integer.parseInt(number); for(int i=0; i<n; i++){ String str = br.readLine(); String[] output...
Main.java:30: error: class, interface, enum, or record expected } ^ 1 error
s292698542
p00101
Java
import java.io.*; public class Volume0101 { public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String number = br.readLine(); int n = Integer.parseInt(number); for(int i=0; i<n; i++){ String str = br.readLine(); String[...
Main.java:3: error: class Volume0101 is public, should be declared in a file named Volume0101.java public class Volume0101 { ^ 1 error
s311152584
p00101
Java
public class AOJ0101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0)System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:1: error: class AOJ0101 is public, should be declared in a file named AOJ0101.java public class AOJ0101 { ^ Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class AOJ0101 Main.java:4: error: cannot find symbol Scanner sc = new Sca...
s169667857
p00101
Java
public class AOJ0101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0) System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:1: error: class AOJ0101 is public, should be declared in a file named AOJ0101.java public class AOJ0101 { ^ Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class AOJ0101 Main.java:4: error: cannot find symbol Scanner sc = new Sca...
s187890162
p00101
Java
public class AOJ0101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); sc.nextLine(); while(t--!=0) System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:1: error: class AOJ0101 is public, should be declared in a file named AOJ0101.java public class AOJ0101 { ^ Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class AOJ0101 Main.java:3: error: cannot find symbol Scanner sc = new Sca...
s775995467
p00101
Java
public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); sc.nextLine(); while(t--!=0) System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:1: error: class main is public, should be declared in a file named main.java public class main { ^ 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....
s282190226
p00101
Java
import java.util.Scanner; public class AOJ0101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0)System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:2: error: class AOJ0101 is public, should be declared in a file named AOJ0101.java public class AOJ0101 { ^ 1 error
s801332990
p00101
Java
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0)System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:2: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s759100538
p00101
Java
import java.util.*; public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0) System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:2: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s645913026
p00101
Java
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0) System.out.println(sc.nextLine().replaceAll("Hoshino", "Hoshina")); } }
Main.java:2: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s532603906
p00101
Java
mport java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(br.readLine()); for(int i = 0; i < n...
Main.java:1: error: class, interface, enum, or record expected mport java.io.BufferedReader; ^ Main.java:2: error: class, interface, enum, or record expected import java.io.IOException; ^ Main.java:3: error: class, interface, enum, or record expected import java.io.InputStreamReader; ^ 3 errors
s897316537
p00101
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class p0101 { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { String strDataNum = br.readLine(); int d...
Main.java:5: error: class p0101 is public, should be declared in a file named p0101.java public class p0101 { ^ 1 error
s054247283
p00101
Java
import java.util.*; public class Hoshina { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i = 0; i < n; i++) { String s = sc.nextLine(); System.out.println(s.replaceAll("Hoshino", "Hoshina")); } return; } }
Main.java:2: error: class Hoshina is public, should be declared in a file named Hoshina.java public class Hoshina { ^ 1 error
s509922820
p00101
Java
import java.util.*; class Main{ public static void main(String[] args){ ArrayList<String> array = new ArrayList<String>(); Scanner in = new Scanner(System.in); int n = in.nextInt(); for(int i = 0; i <= n; i++){ String str = in.nextLine(); String str2 = str.replaceAll("Hoshino", "Hoshina"); array....
Main.java:16: error: reached end of file while parsing } ^ 1 error
s318582951
p00101
Java
import java.util.*; public class AOJ101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int i = sc.nextInt(); sc.nextLine(); for(int j=0;j<i;j++) { String s = sc.nextLine(); System.out.println(s.replaceAll("Hoshino","Hoshina")); } ...
Main.java:2: error: class AOJ101 is public, should be declared in a file named AOJ101.java public class AOJ101 { ^ 1 error
s837016115
p00101
Java
import java.io.*; public class Main { public static void main(String[] args){ try{ BufferedReader b=new BufferedReader(new InputStreamReader(System.in)); int i=Integer.parseInt(b.readLine()); StringBuffer[] str=new StringBuffer[i]; String[] s; for(int j=0;j<i;j++){ str[j]=new StringBuffer(); s...
Main.java:22: error: incompatible types: unexpected return value return 0; ^ 1 error
s221287646
p00101
Java
import java.io.*; public class AizuPR { public satic void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); int N = Integer.parseInt(input.nextLine()); for(int i = 0; i < N; i++) { String s = input.nextLine().replaceAll("Hoshino", Hoshina"); ...
Main.java:4: error: <identifier> expected public satic void main(String[] args) throws Exception { ^ Main.java:10: error: unclosed string literal String s = input.nextLine().replaceAll("Hoshino", Hoshina"); ^ 2 errors
s902719223
p00101
Java
import java.util.*; public class AizuPR { public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); int N = Integer.parseInt(input.nextLine()); for(int i = 0; i < N; i++) { String s = input.nextLine().replaceAll("Hoshino", "Hoshina"); ...
Main.java:3: error: class AizuPR is public, should be declared in a file named AizuPR.java public class AizuPR { ^ 1 error
s019220404
p00101
Java
public class Main { public static void main(String args[]) throws Exception { BufferedReader bn = new BufferedReader(new InputStreamReader(System.in)); String line; for(int i=0; i<Integer.parseInt(bn.readLine()); i++){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); line = br....
Main.java:3: error: cannot find symbol BufferedReader bn = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader bn = new BufferedReader(new InputStreamReader(System.in)); ^ ...
s275040550
p00101
Java
import java.util.Scanner; public class AOJMain { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt();sc.nextLine(); while(n--!=0)System.out.println(sc.nextLine()); str = str.replaceAll("Hoshino", "Hoshina"); System.out.println(s...
Main.java:3: error: class AOJMain is public, should be declared in a file named AOJMain.java public class AOJMain { ^ Main.java:9: error: cannot find symbol str = str.replaceAll("Hoshino", "Hoshina"); ^ symbol: variable str location: class AOJMain Main.java:9: error: can...
s936650733
p00101
Java
import java.util.Scanner; public class AOJMain { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt();sc.nextLine(); while(n--!=0)System.out.println(sc.nextLine()); sc = sc.replaceAll("Hoshino", "Hoshina"); System.out.println(sc)...
Main.java:3: error: class AOJMain is public, should be declared in a file named AOJMain.java public class AOJMain { ^ Main.java:9: error: cannot find symbol sc = sc.replaceAll("Hoshino", "Hoshina"); ^ symbol: method replaceAll(String,String) location: variable sc ...
s407498119
p00101
Java
import java.util.Scanner; //Aizu PR public class AOJ0101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0)System.out.println(sc.nextLine().replaceAll("Hoshino", "Hoshina")); } }
Main.java:4: error: class AOJ0101 is public, should be declared in a file named AOJ0101.java public class AOJ0101 { ^ 1 error
s923861357
p00101
Java
import java.util.Scanner; //Aizu PR public class AOJ0101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();sc.nextLine(); while(t--!=0)System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
Main.java:4: error: class AOJ0101 is public, should be declared in a file named AOJ0101.java public class AOJ0101 { ^ 1 error
s386041662
p00101
C
#include<stdio.h> int main(){ int i,j,n,flag=0; char a[1000]={0}; scanf("%d%*c",&n); for(j=0;j<n;j++){ flag=0; scanf("%c",&a[0]); for(i=1;;i++){ scanf("%c",&a[i]); if(a[i]=='\n'){ a[i]=0; break; } for(i=0;a[i]!=0;i++){ //printf("%d ",flag); ...
main.c: In function 'main': main.c:56:1: error: expected declaration or statement at end of input 56 | } | ^
s243074939
p00101
C
#include<stdio.h> int main(){ int i,j,n,flag=0,d; char a[1000]={0}; scanf("%d%*c",&n); for(j=0;j<n;j++){ flag=0; for(i=0;;i++){ scanf("%c", &a[i]); if(a[i]=='\n'){ a[i]='\0'; d=i; break; } } ...
main.c: In function 'main': main.c:40:1: error: expected declaration or statement at end of input 40 | } | ^ main.c:40:1: error: expected declaration or statement at end of input
s485153737
p00101
C
#include<stdio.h> int main(void){ char str[3000]: int i,j; int n; scanf("%d",&n); for(i = 0;i < n;i++){ fgets(str.3000,stdin); j = 0; while(str[j] != '\0'){ if(str[j] == 'H'){ if(str[j+1] == 'o'){ if(str[j+2] == 's'){ if(str[j+3] == ' h'){ if(str[j+4] == 'i'){ if(str[j+5] == ...
main.c: In function 'main': main.c:3:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 3 | char str[3000]: | ^ main.c:3:23: error: expected expression before ':' token main.c:7:13: error: 'i' undeclared (first use in this function) 7 | for(i...
s214681044
p00101
C
#include<stdio.h> int main(void){ char str[3000]: int i,j; int n; scanf("%d",&n); for(i = 0;i < n;i++){ fgets(str.3000,stdin); j = 0; while(str[j] != '\0'){ if(str[j] == 'H'){ if(str[j+1] == 'o'){ if(str[j+2] == 's'){ if(str[j+3] == ' h'){ if(str[j+4] == 'i'){ if(str[j+5] == ...
main.c: In function 'main': main.c:3:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 3 | char str[3000]: | ^ main.c:3:23: error: expected expression before ':' token main.c:7:13: error: 'i' undeclared (first use in this function) 7 | for(i...
s062161501
p00101
C
#include<stdio.h> int main(void){ char str[3000]: int i,j; int n; scanf("%d",&n); for(i = 0;i < n;i++){ fgets(str,3000,stdin); j = 0; while(str[j] != '\0'){ if(str[j] == 'H'){ if(str[j+1] == 'o'){ if(str[j+2] == 's'){ if(str[j+3] == 'h'){ if(str[j+4] == 'i'){ if(str[j+5] == '...
main.c: In function 'main': main.c:3:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 3 | char str[3000]: | ^ main.c:3:23: error: expected expression before ':' token main.c:7:13: error: 'i' undeclared (first use in this function) 7 | for(i...
s590101825
p00101
C
#include <stdio.h> #include <string.h> int main(void){ int n,l,i; char s[1024],*t; scanf("%d",&n); scanf(" "); for(i=0;i<n;j++){ fgets(s,1001,stdin); l=strlen(s); while(t=strstr(s,"Hoshino"),t!=NULL){ t[6]='a'; } printf("%s",s); } return 0; }
main.c: In function 'main': main.c:8:15: error: 'j' undeclared (first use in this function) 8 | for(i=0;i<n;j++){ | ^ main.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
s963991638
p00101
C
#include <stdio.h> #include <string.h> int main(void){ int n,l,i; char s[1024],*t; scanf("%d\n",&n); for(i=0;i<n;i++){ memset(s,0,sizeof(a)); fgets(s,1001,stdin); while(t=strstr(s,"Hoshino"),t!=NULL){ t[6]='a'; } printf("%s",s); } return 0; }
main.c: In function 'main': main.c:8:23: error: 'a' undeclared (first use in this function) 8 | memset(s,0,sizeof(a)); | ^ main.c:8:23: note: each undeclared identifier is reported only once for each function it appears in
s588196873
p00101
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define text 1002 char *name="Hoshina"; char *wrong_name="Hoshino"; char *delim=" "; char *ctx; int main(void){ int i,j,n,length,count,now; char buf[2]; char istr[text],istr_cpy[text],*next; scanf("%d",&n); fgets(buf,sizeof(buf),stdin); for(i=0;i<n;i++){...
main.c: In function 'main': main.c:28:24: error: implicit declaration of function 'strtok_s'; did you mean 'strtok_r'? [-Wimplicit-function-declaration] 28 | next = strtok_s(istr, delim, &ctx); | ^~~~~~~~ | strtok_r main.c:28:22: error: assign...
s353727222
p00101
C
#include<stdio.h> #include<string.h> int main(){ char s[2000]; int n, i, j, key = 0; scanf("%d ", &n); while( n-- ) { gets(s); for ( i = 0; i < strlen(s); i++ ) { if ( s[i] == 'H' ) { if ( s[i+1] == 'o' && s[i+2] == 's' && s[i+3] == 'h' && s[i+4] == 'i' && s[i...
main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | gets(s); | ^~~~ | fgets
s558133097
p00101
C
#include<stdio.h> #include<string.h> int main(){ char s[2000]; int n, i, j, key = 0; scanf("%d ", &n); while( n-- ) { gets(s); for ( i = 0; i < strlen(s); i++ ) { if ( s[i] == 'H' ) { if ( s[i+1] == 'o' && s[i+2] == 's' && s[i+3] == 'h' && s[i+4] == 'i' && s[i...
main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | gets(s); | ^~~~ | fgets
s434556485
p00101
C
main(){Congrats_AOJ___Tohoku_Be_Strong();}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){Congrats_AOJ___Tohoku_Be_Strong();} | ^~~~ main.c: In function 'main': main.c:1:8: error: implicit declaration of function 'Congrats_AOJ___Tohoku_Be_Strong' [-Wimplicit-function-declaration] 1 | main(){Congrats_AOJ___Tohoku_Be_St...
s240675261
p00101
C
#include <stdio.h> #include <string.h> int main(void){ char Hoshina[1001]; char Block[501][501]; int i; int j; int k; int l; int disp; scanf("%d", &i); while (i >= 0){ gets(Hoshina); j = 0; k = 0; l = 0; while(Hoshina[j] != '\0'){ if (Hoshina[j] != ' '){ Block[k][l] = Hoshina[j];...
main.c: In function 'main': main.c:17:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 17 | gets(Hoshina); | ^~~~ | fgets
s031319924
p00101
C
char*p,s[1005]; main(i){ for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a'); exit(0); }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(i){ | ^~~~ main.c: In function 'main': main.c:2:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:3:14: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration] 3 | for(;fgets(s,1005,s...
s553550920
p00101
C
char*p,s[1005];strstr(); main(i){ for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a'); exit(0); }
main.c:1:16: warning: data definition has no type or storage class 1 | char*p,s[1005];strstr(); | ^~~~~~ main.c:1:16: error: type defaults to 'int' in declaration of 'strstr' [-Wimplicit-int] main.c:1:16: warning: conflicting types for built-in function 'strstr'; expected 'char *(const char *, ...
s552652275
p00101
C
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { int n; List<String> mesList = new ArrayList<String>(); Buffered...
main.c:1:1: error: unknown type name 'import' 1 | import java.io.BufferedReader; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.io.BufferedReader; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.io.IOExc...
s765467382
p00101
C
#include<stdio.h> #include<string.h> int main(void){ int i,n; char *p; char a[1002]; char word[]="hoshino" scanf("%d\n",&n); for(i = 0;i < n;i++){ fgets(a,sizeof(a),stdin); while((p = strstr(a,word))!=NULL){ p[6] = 'a'; } printf("%s",a); } return 0; }
main.c: In function 'main': main.c:11:9: error: expected ',' or ';' before 'scanf' 11 | scanf("%d\n",&n); | ^~~~~
s862221783
p00101
C
#include<stdio.h> #include<string.h> int main(void) { int a,n; char english[1000],correct[]="Hoshino",*b; scanf("%d\n",&n); for(a=0;a<n;a++){ fgets(english,1000,stdin); while((b=strstr(english,correct))=NULL) b[6]='a'; printf("%s",english); } return 0; }
main.c: In function 'main': main.c:12:50: error: lvalue required as left operand of assignment 12 | while((b=strstr(english,correct))=NULL) | ^
s253916583
p00101
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define rep(i,j) for(int i=0;i<(j);i++) int main(){ int n; char s[1001]; char *p; scanf("%d",&n);while(getchar()!='\n'); rep(i,n){ gets(s); p=strstr(s,"Hoshino"); if(p!=NULL)p[6]='a'; puts(s); } return 0; }
main.c: In function 'main': main.c:13:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 13 | gets(s); | ^~~~ | fgets
s548169041
p00101
C
w#include <stdio.h> #include <string.h> #define MAX_LENGTH 1000 int main(void) { int i, n; char sentence[MAX_LENGTH + 1]; char *hoshino = sentence; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%s", sentence); while ((hoshino = strstr(hoshino, "Hoshino")) != NULL) hoshino[6] = 'a'; printf("%...
main.c:1:2: error: stray '#' in program 1 | w#include <stdio.h> | ^ main.c:1:1: error: unknown type name 'w' 1 | w#include <stdio.h> | ^ main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | w#include <stdio.h> | ^ In file included from main.c...
s867781402
p00101
C++
n = int(input()) for _ in range(n): s = input() print(s.replace('Hoshino', 'Hoshina'))
a.cc:4:19: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 4 | print(s.replace('Hoshino', 'Hoshina')) | ^~~~~~~~~ a.cc:4:30: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 4 | print(s.replace('Hoshino', 'Hoshina')) ...
s499397911
p00101
C++
#include <cstdio> #include <string> #include <iostream> using namespace std; string s; signed main() { int n = 0; scanf( "%d\n", &n ); while( 0 < n ) { getline( cin, s ); s = replace( s, "Hoshino", "Hoshina" ); cout << s << endl; n--; } return 0; }
a.cc: In function 'int main()': a.cc:16:13: error: 'replace' was not declared in this scope 16 | s = replace( s, "Hoshino", "Hoshina" ); | ^~~~~~~
s750066226
p00101
C++
#include<bits/stdc++.h> using namespace std; void strReplace(string& str, const string& from, const string& to){ string::size_type pos = 0; while(pos = str.find(from, pos), pos != string::npos){ str.replace(pos, from.length(), to); pos += to.length(); } } int main(){ cin >> n; cin.clear(); cin.ignore(); fo...
a.cc: In function 'int main()': a.cc:13:16: error: 'n' was not declared in this scope; did you mean 'yn'? 13 | cin >> n; | ^ | yn
s630479973
p00101
C++
import java.util.*; public class AOJ0101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); sc.nextLine(); while(t--!=0) System.out.println(sc.nextLine().replace("Hoshino", "Hoshina")); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class AOJ0101 { | ^~~~~~
s080787376
p00101
C++
readline.to_i.times do puts readline.chomp.gsub(/Hoshino/, 'Hoshina') end
a.cc:2:39: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 2 | puts readline.chomp.gsub(/Hoshino/, 'Hoshina') | ^~~~~~~~~ a.cc:1:1: error: 'readline' does not name a type 1 | readline.to_i.times do | ^~~~~~~~
s577017568
p00101
C++
#include<iostream> #include<string> using namespace std; int main (){ int n; int pos; string s; cin >> n; // cin.ignore(); for (int i = 0; i < n ; ++i){ getline(cin, s); while(1){ pos = s.find("Hoshino"); if(pos == -1) break...
a.cc: In function 'int main()': a.cc:21:12: error: expected '}' at end of input 21 | return 0; | ^ a.cc:5:12: note: to match this '{' 5 | int main (){ | ^
s677669278
p00101
C++
#include <iostream> #include <string> int main(){ const std::string correct_word = "Hoshina"; const std::string find_word = "Hoshino"; std::string str; while(std::cin >> str){ std::string::size_type pos = str.find("Hoshino") while(pos != std::string::nops){ std::replace(pos, find_word.length(), corr...
a.cc: In function 'int main()': a.cc:14:17: error: expected ',' or ';' before 'while' 14 | while(pos != std::string::nops){ | ^~~~~
s218217738
p00101
C++
#include <iostream> #include <string> int main(){ const std::string correct_word = "Hoshina"; const std::string find_word = "Hoshino"; std::string str; while(std::cin >> str){ std::string::size_type pos = str.find("Hoshino"); while(pos != std::string::nops){ std::replace(pos, find_word.length(), cor...
a.cc: In function 'int main()': a.cc:14:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'} 14 | while(pos != std::string::nops){ | ^~~~ a.cc:15:31: error: 'replace' is not a member of 'std' 15 | ...
s107223828
p00101
C++
#include <iostream> #include <string> int main(){ const std::string correct_word = "Hoshina"; const std::string find_word = "Hoshino"; std::string str; while(std::cin >> str){ std::string::size_type pos = str.find("Hoshino"); while(pos != std::string::nops){ str.replace(pos, find_word.length(), corr...
a.cc: In function 'int main()': a.cc:14:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'} 14 | while(pos != std::string::nops){ | ^~~~
s197777735
p00101
C++
#include <iostream> #include <string> int main(){ const std::string correct_word = "Hoshina"; const std::string find_word = "Hoshino"; std::string str; int N; std::cin >> N; for(int i = 0; i < N; ++i){ std::cin >> str std::string::size_type pos = str.find("Hoshino"); while(pos != std::string::no...
a.cc: In function 'int main()': a.cc:16:32: error: expected ';' before 'std' 16 | std::cin >> str | ^ | ; 17 | std::string::size_type pos = str.find("Hoshino"); | ~~~ a.cc:1...
s224626395
p00101
C++
#include <iostream> #include <string> int main(){ const std::string correct_word = "Hoshina"; const std::string find_word = "Hoshino"; std::string str; int N; std::cin >> N; for(int i = 0; i < N; ++i){ std::cin >> str; std::string::size_type pos = str.find("Hoshino"); while(pos != std::string::n...
a.cc: In function 'int main()': a.cc:19:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'} 19 | while(pos != std::string::nops){ | ^~~~
s225106608
p00101
C++
#include <iostream> #include <string> int main(){ const std::string correct_word = "Hoshina"; const std::string find_word = "Hoshino"; int N; std::cin >> N; for(int i = 0; i < N; ++i){ std::string str; std::cin >> str; std::string::size_type pos = str.find("Hoshino"); while(pos != std::string::...
a.cc: In function 'int main()': a.cc:20:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'} 20 | while(pos != std::string::nops){ | ^~~~
s263483630
p00101
C++
#include <iostream> #include <string> int main(){ int n; // the number of datasets std::cin >> n; std::cin.ignore(); for(int i = 0; i < n; ++i){ std::string text; std::getline(std::cin, text); // input int text_size = text.size(); int moji = text.find("Hoshino"); while(moji != basic_string::npos){ ...
a.cc: In function 'int main()': a.cc:15:31: error: 'basic_string' has not been declared 15 | while(moji != basic_string::npos){ | ^~~~~~~~~~~~
s420129961
p00101
C++
#include <iostream> #include <string> #include <vector> #include <sstream> #include <algorithm> int main(){ int dataSetNum; std::cin >> dataSetNum; std::vector<string> *str = new std::vector<string>[dataSetNum]; //input & sprit for(int i = 0; i < dataSetNum; ++i){ //input std::string tmp; std::string buf; ...
a.cc:30:32: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 30 | [](string x) { return x == 'Hoshino'; }, 'Hoshina'); | ^~~~~~~~~ a.cc:30:46: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 30 | [](strin...
s493455105
p00101
C++
#include <iostream> #include <string> #include <vector> #include <sstream> #include <algorithm> int main(){ int dataSetNum; std::cin >> dataSetNum; std::vector<string> *str = new std::vector<string>[dataSetNum]; //input & sprit for(int i = 0; i < dataSetNum; ++i){ //input std::string tmp; std::string buf; ...
a.cc:30:32: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 30 | [](string x) { return x == 'Hoshino'; }, 'Hoshina'); | ^~~~~~~~~ a.cc:30:46: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 30 | [](strin...
s740327823
p00101
C++
#include <iostream> #include <string> #include <vector> #include <sstream> #include <algorithm> int main(){ int dataSetNum; std::cin >> dataSetNum; //std::vector<string> *str = new std::vector<string>[dataSetNum]; std::vector< std::vector<string> > str; str.resize(dataSetNum); //input & sprit for(int i = 0; i ...
a.cc:33:32: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 33 | [](string x) { return x == 'Hoshino'; }, 'Hoshina'); | ^~~~~~~~~ a.cc:33:46: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 33 | [](strin...
s413371369
p00101
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> int main(){ std::string correctword = "Hoshina"; int dataSetNum; std::cin >> dataSetNum; std::vector< std::string > str; str.resize(dataSetNum); std::cin.ignore(); //input for(int i = 0; i < dataSetNum; ++i){ ...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of '_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Funct = main()::<lambda(string)>]': a.cc:38:19: ...
s787008476
p00101
C++
n = gets puts $_.gsub("Hoshiro", "Hoshina") while gets
a.cc:1:1: error: 'n' does not name a type 1 | n = gets | ^
s873733391
p00101
C++
#include <iostream> #include <cstdio> #include <string> using namespace std; char str[1001]; char hoshino[] = "Hoshino"; int hlen = strlen(hoshino); void changeHoshino(int len) { for (int i = 0; i <= len - hlen; i++) { int j = 0; while ((j < hlen) && (str[i+j] == hoshino[j])) j++; if (j == hlen) str[i+...
a.cc:9:12: error: 'strlen' was not declared in this scope 9 | int hlen = strlen(hoshino); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> 3 | #include <string> a.cc: ...
s209046058
p00101
C++
#include <iostream> #include <cstdio> #include <string> using namespace std; char str[1001]; char hoshino[] = "Hoshino"; int hlen = strlen(hoshino); void changeHoshino(int len) { for (int i = 0; i <= len - hlen; i++) { int j = 0; while ((j < hlen) && (str[i+j] == hoshino[j])) j++; if (j == hlen) str[i+...
a.cc:9:12: error: 'strlen' was not declared in this scope 9 | int hlen = strlen(hoshino); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> 3 | #include <string> a.cc: ...
s144640552
p00101
C++
#include <iostream> #include <cstdio> #include <string> #include <cstring> using namespace std; string str; string hoshino = "Hoshino"; int hlen = hoshino.length(); void changeHoshino(int len) { for (int i = 0; i <= len - hlen; i++) { int j = 0; while ((j < hlen) && (str[i+j] == hoshino[j])) j++; if (j ==...
a.cc: In function 'int main()': a.cc:25:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 25 | scanf_s("%d\n", &n); | ^~~~~~~ | scanf
s268243672
p00101
C++
#include<iostream> using namespace std; int main(){ int dataN,i,j,tmp; string str; cin>>dataN; for(j=0;j<dataN;j++){ cin>>str; for(i=0;i<str.length;i++){ if(str[i]+str[i+1]+str[i+2]+str[i+3]+str[i+4]+str[i+5]+str[i+6]=="Hoshino"){ str[i+6]='a'; i+=6; } } cout<<str; } return 0; }
a.cc: In function 'int main()': a.cc:11: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...
s392322821
p00101
C++
#include<iostream> #include<string> using namespace std; #define BAD "hoshino" int main(){ int n,i; cin>>n; for(i=0;i<n;i++){ hoge(); } return 0; } int hoge(){ string text; int i; cin>>text; for(i=0;i<text.length();i++){ if(text.substr(i,BAD.length())==BAD){ text[i+BAD.length()-1]='a'; } } ...
a.cc: In function 'int main()': a.cc:12:10: error: 'hoge' was not declared in this scope 12 | hoge(); | ^~~~ a.cc: In function 'int hoge()': a.cc:24:31: error: request for member 'length' in '"hoshino"', which is of non-class type 'const char [8]' 24 | if(text.substr(i,BAD.length(...
s963326745
p00101
C++
#include<iostream> #include<string> using namespace std; #define BAD "hoshino" int hoge(void); int main(){ int n,i; cin>>n; for(i=0;i<n;i++){ hoge(); } return 0; } int hoge(){ string text; int i; cin>>text; for(i=0;i<text.length();i++){ if(text.substr(i,BAD.length())==BAD){ text[i+BAD.length()...
a.cc: In function 'int hoge()': a.cc:26:31: error: request for member 'length' in '"hoshino"', which is of non-class type 'const char [8]' 26 | if(text.substr(i,BAD.length())==BAD){ | ^~~~~~ a.cc:27:22: error: request for member 'length' in '"hoshino"', which is of non-cl...
s285079088
p00101
C++
#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <cstdio> #include <string> #include <cmath> #include <cfloat> #include <map> using namespace std; int main(){ int n; string s; string d="Hoshina"; cin>>n; while(n--){ while(getline(cin,s)!="\n"); while(1){ unsigned i...
a.cc: In function 'int main()': a.cc:18:37: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'const char [2]') 18 | while(getline(cin,s)!="\n"); | ~~~~~~~~~~~~~~^~~~~~ | | | | ...
s778893652
p00101
C++
#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <cstdio> #include <string> #include <cmath> #include <cfloat> #include <map> using namespace std; int main(){ int n; string s; string d="Hoshina"; cin>>n; while(n--){ while(getline(cin,s)!="\n"); while(1){ unsigned i...
a.cc: In function 'int main()': a.cc:18:37: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'const char [2]') 18 | while(getline(cin,s)!="\n"); | ~~~~~~~~~~~~~~^~~~~~ | | | | ...
s975382913
p00101
C++
#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <cstdio> #include <string> #include <cmath> #include <cfloat> #include <map> using namespace std; int main(){ int n; string s; string d="Hoshina"; cin>>n; while(n--){ while(getline(cin,s)!="\n"); while(1){ unsigned i...
a.cc: In function 'int main()': a.cc:18:37: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'const char [2]') 18 | while(getline(cin,s)!="\n"); | ~~~~~~~~~~~~~~^~~~~~ | | | | ...
s552218916
p00101
C++
#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <cstdio> #include <string> #include <cmath> #include <cfloat> #include <map> using namespace std; int main(){ int n; string s; string d="Hoshina"; cin>>n; while(n--){ while(getline(cin,s)!="\n"); while(1){ unsigned i...
a.cc: In function 'int main()': a.cc:18:37: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'const char [2]') 18 | while(getline(cin,s)!="\n"); | ~~~~~~~~~~~~~~^~~~~~ | | | | ...
s453692149
p00101
C++
#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <cstdio> #include <string> #include <cmath> #include <cfloat> #include <map> using namespace std; int main(){ int n; string s; string d="Hoshina"; cin>>n; while(n--){ while(getline(cin,s)!="\n") while(1){ unsigned in...
a.cc: In function 'int main()': a.cc:18:37: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'const char [2]') 18 | while(getline(cin,s)!="\n") | ~~~~~~~~~~~~~~^~~~~~ | | | | ...
s132961986
p00101
C++
#include<iostream> #include<string> using namespace std; int main(){ string text; int n,j; int i; cin>>n; for(j=0;j<n;j++){ cin>>text; while(1){ i=text.find("Hoshino"); if(i!=string::not_found){ text[i+6]='a'; }else{ break; } } cout<<text<<endl; } }
a.cc: In function 'int main()': a.cc:16:25: error: 'not_found' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'} 16 | if(i!=string::not_found){ | ^~~~~~~~~
s473056620
p00101
C++
#include<iostream> using namespace std; int main(){ int n,j; int flg; char c; cin>>n; for(j=0;j<n;j++){ flg=0; while(1){ c=getchar(); if(c==endl){ break; }else{ switch(flg){ case 0: if(c=='H'){flg++;} break; case 1: if(c=='o'){flg++;}else{flg=0;} break; case 2: if(c=='s'){fl...
a.cc: In function 'int main()': a.cc:14:15: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator==' 14 | if(c==endl){ | ~^~~~~~
s819985662
p00101
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ int n,j; int flg; char c; cin>>n; for(j=0;j<n;j++){ //??\???????????? flg=0; while(1){ c=getchar(); if(c==endl){ break; }else{ switch(flg){ case 0: if(c=='H'){flg++;} break; case 1: if(c=='o'){flg++;}else{flg=...
a.cc: In function 'int main()': a.cc:16:15: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator==' 16 | if(c==endl){ | ~^~~~~~
s285723253
p00101
C++
n = int(input()) for i in range(n): l = [s for s in input().split()] for s in l: if 'Hoshino' in s: l[l.index(s)] = s.replace('Hoshino','Hoshina') a = '' for s in l: a += s a += ' ' a = a.rstrip() print(a)
a.cc:5:8: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 5 | if 'Hoshino' in s: | ^~~~~~~~~ a.cc:6:33: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 6 | l[l.index(s)] = s.replace('Hoshino','Hoshina') | ...
s018020629
p00101
C++
using System; class Example { static void Main() { int n = int.Parse(Console.ReadLine()); for (int a = 0; a < n; a++) { string[] input = Console.ReadLine().Split(' '); if (string.IsNullOrEmpty(input[0])) break; for (int i = 0; i < input...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:22:2: error: expected ';' after class definition 22 | } | ^ | ; a.cc: In static member function 'static void Example::Main()': a.cc:6:17: error: expected primary-expression before 'int' 6...
s107737776
p00101
C++
#include<iostream> #include<string> using namespace std; int main(void) { int n; string a; cin >> n; cin.ignore(); for (int i = 0; i < n; ++i){ int x = 0; getline(cin, a); if ((x = a.find("Hoshino")) >= 0) a.replace(x, strlen("Hoshino"), "Hoshina"); cout << a << endl; } return 0; }
a.cc: In function 'int main()': a.cc:18:38: error: 'strlen' was not declared in this scope 18 | a.replace(x, strlen("Hoshino"), "Hoshina"); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#inclu...
s094017074
p00101
C++
#include<iostream> #include<string> using namespace std; int main(void) { int n; string a; cin >> n; cin.ignore(); for (int i = 0; i < n; ++i){ int x = 0; getline(cin, a); if ((x = a.find("Hoshino")) >= 0) a.replace(x, strlen("Hoshino"), "Hoshina"); cout << a << endl; } return 0; }
a.cc: In function 'int main()': a.cc:18:38: error: 'strlen' was not declared in this scope 18 | a.replace(x, strlen("Hoshino"), "Hoshina"); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#inclu...
s073985540
p00101
C++
#include<iostream> #include<string> using namespace std; int main(void) { int n; string a; cin >> n; cin.ignore(); for (int i = 0; i < n; ++i){ int x = 0; getline(cin, a); if ((x = a.find("Hoshino")) >= 0) a.replace(x, strlen("Hoshino"), "Hoshina"); cout << a << endl; } return 0; }
a.cc: In function 'int main()': a.cc:18:38: error: 'strlen' was not declared in this scope 18 | a.replace(x, strlen("Hoshino"), "Hoshina"); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#inclu...
s692450638
p00101
C++
#include<iostream> #include<string> using namespace std; int main(void) { int n; string a; cin >> n; cin.ignore(); for (int i = 0; i < n; ++i){ int x = 0; getline(cin, a); if ((x = a.find("Hoshino")) >= 0) a.replace(x, strlen("Hoshino"), "Hoshina"); cout << a << endl; } return 0; }
a.cc: In function 'int main()': a.cc:18:38: error: 'strlen' was not declared in this scope 18 | a.replace(x, strlen("Hoshino"), "Hoshina"); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#inclu...
s979053478
p00101
C++
#include<iostream> #include<string> #include<cstdio> using namespace std; int main(void) { int n; string a; cin >> n; cin.ignore(); for (int i = 0; i < n; ++i){ int x = 0; getline(cin, a); if ((x = a.find("Hoshino")) >= 0) a.replace(x, strlen("Hoshino"), "Hoshina"); cout << a << endl; } return 0...
a.cc: In function 'int main()': a.cc:19:38: error: 'strlen' was not declared in this scope 19 | a.replace(x, strlen("Hoshino"), "Hoshina"); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#inclu...
s387434090
p00101
C++
##include <iostream> #include <string> int main(){ std::string sent; int gyou,num=0; std::cin >> gyou; getline(std::cin, sent); for(int i=0;i<gyou;++i){ num=0; getline(std::cin, sent); std::string bef="Hoshino",aft="Hoshina"; while(num!=-1){ num=(int)(sent.find(bef)); if(num!=-1...
a.cc:1:1: error: stray '##' in program 1 | ##include <iostream> | ^~ a.cc:1:3: error: 'include' does not name a type 1 | ##include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2...
s646504893
p00101
C++
#include <iostream> #include <string> int main(){ const std::string wrong_word("Hoshino"); const std::string right_word("Hoshina"); int num; std::cin >> num; std::cin.ignore(); // ignore next newline character for(int i = 0; i < num; ++i){ std::string str; std::...
a.cc: In function 'int main()': a.cc:24:14: error: expected '}' at end of input 24 | return 0; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s832916644
p00101
C++
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <vector> #include <algorithm> #include <utility> #include <queue> int n; using namespace std; bool is_change(string& str,int pos, int len){ const char A[] = {'H','o','s','h','i','n','a'}; if(str.substr(pos,len) == "Hoshino"){ fo...
a.cc: In function 'int main()': a.cc:28:28: error: 'change' was not declared in this scope; did you mean 'is_change'? 28 | if(change(str,i,7)){ | ^~~~~~ | is_change
s990437302
p00101
C++
//#include <bits/c++.h> #include <iostream> #include <cstdio> #define rep(i,n) for(int i = 0; i< n; i++) #define MAX_SIZE 1010 using namespace std; int main(){ int n; cin >> n; // cout << n << endl; for(int j = 0; j<= n; j++) { char s[MAX_SIZE] = {}; gets(s); int i = 0; while(*(s+i) != '\0') { //...
a.cc: In function 'int main()': a.cc:18:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 18 | gets(s); | ^~~~ | getw a.cc:43:20: error: 'j' was not declared in this scope 43 | if(j != 0) cout << endl; | ...
s651138578
p00101
C++
//#include <bits/c++.h> #include <iostream> #include <cstdio> #define rep(i,n) for(int i = 0; i< n; i++) #define MAX_SIZE 1010 using namespace std; int main(){ int n; cin >> n; // cout << n << endl; for(int j = 0; j<= n; j++) { char s[MAX_SIZE] = {}; gets(s); int i = 0; while(*(s+i) != '\0') { //...
a.cc: In function 'int main()': a.cc:18:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 18 | gets(s); | ^~~~ | getw a.cc:43:20: error: 'j' was not declared in this scope 43 | if(j != 0) cout << endl; | ...
s387904516
p00101
C++
//#include <bits/c++.h> #include <iostream> #include <cstdio> #define rep(i,n) for(int i = 0; i< n; i++) #define MAX_SIZE 1010 using namespace std; int main(){ int n; cin >> n; // cout << n << endl; for(int j = 0; j<=n; j++) { char s[MAX_SIZE] = {}; gets(s); int i = 0; while(*(s+i) != '\0') { //p...
a.cc: In function 'int main()': a.cc:18:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 18 | gets(s); | ^~~~ | getw a.cc:45:12: error: 'j' was not declared in this scope 45 | if(j == false) | ^
s512205621
p00101
C++
//#include <bits/c++.h> #include <iostream> #include <cstdio> #define rep(i,n) for(int i = 0; i< n; i++) #define MAX_SIZE 1010 using namespace std; int main(){ int n; cin >> n; // cout << n << endl; for(int j = 0; j<=n; j++) { char s[MAX_SIZE] = {}; gets(s); int i = 0; while(*(s+i) != '\0') { //p...
a.cc: In function 'int main()': a.cc:18:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 18 | gets(s); | ^~~~ | getw a.cc:45:12: error: 'j' was not declared in this scope 45 | if(j == false) | ^
s104600718
p00101
C++
//#include <bits/c++.h> #include <iostream> #include <cstdio> #define rep(i,n) for(int i = 0; i< n; i++) #define MAX_SIZE 1010 using namespace std; int main(){ int n; cin >> n; // cout << n << endl; for(int j = 0; j<=n; j++) { char s[MAX_SIZE] = {}; gets(s); int i = 0; while(*(s+i) != '\0') { //p...
a.cc: In function 'int main()': a.cc:18:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 18 | gets(s); | ^~~~ | getw a.cc:45:12: error: 'j' was not declared in this scope 45 | if(j == false) | ^
s741050480
p00101
C++
//#include <bits/c++.h> #include <iostream> #include <cstdio> #define rep(i,n) for(int i = 0; i< n; i++) #define MAX_SIZE 1010 using namespace std; int main(){ int n; cin >> n; // cout << n << endl; int j; bool checking = true; for( j = 0; j<=n; j++) { checking = true; char s[MAX_SIZE] = {}; get...
a.cc: In function 'int main()': a.cc:20:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 20 | gets(s); | ^~~~ | getw
s506934523
p00101
C++
//#include <bits/c++.h> #include <iostream> #include <cstdio> #define rep(i,n) for(int i = 0; i< n; i++) #define MAX_SIZE 1010 using namespace std; int main(){ int n; cin >> n; // cout << n << endl; int j; bool checking = true; for( j = 0; j<=n; j++) { checking = true; char s[MAX_SIZE] = {}; get...
a.cc: In function 'int main()': a.cc:20:24: error: no matching function for call to 'getline(std::istream&, char [1010])' 20 | getline(cin,s); | ~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40...