submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s872805456
p03834
C++
#include <iostream> #include <string> int main () { std::string s; std::cin >> s; std::replace(s.begin(), s.end(), ',', ' '); std::cout << s << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: 'replace' is not a member of 'std' 9 | std::replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s866932095
p03834
C++
#include <iostream> #include <string> int main () { std::string s; std::cin >> s; std::replace(s.begin(), s.end(), ',', ' '); std::cout << s << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: 'replace' is not a member of 'std' 9 | std::replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s593150321
p03834
C++
#include <iostream> #include <string> int main () { std::string s; std::cin >> s; std::replace(s.begin(), s.end(), ',', ' '); std::cout << s << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: 'replace' is not a member of 'std' 9 | std::replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s990852654
p03834
C
#include<iostream> using namespace std; int main(){ char s[20]; cin>>s; s[5]=' ',s[13]=' '; cout<<s; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s231869261
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; s[5]=" "; s[13]=" "; cout<<s; }
a.cc: In function 'int main()': a.cc:7:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s[5]=" "; | ^~~ | | | const char* a.cc:8:9: error: invalid conversion from 'const cha...
s013518210
p03834
C++
#include <iostream> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) int main() { string s; cin >> s; replace(s.begin(), s.end(), ",", " "); cout << s << "\n"; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:4: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::replace(_FIter, _FIter, const _Tp&, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Tp = char [2]]': a.cc:11:12: requ...
s894268613
p03834
C++
happy,newyear,enjoy
a.cc:1:1: error: 'happy' does not name a type 1 | happy,newyear,enjoy | ^~~~~
s022967728
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { int K,S,X,Y,Z,res=0; cin>>K>>S; for(int i=0;i<=K;i++){ for(int j=0;j<=K;j++){ if(S-i-j<=K&&s-i-j>=0){ res++; } } } cout<<res; }
a.cc: In function 'int main()': a.cc:8:22: error: 's' was not declared in this scope 8 | if(S-i-j<=K&&s-i-j>=0){ | ^
s483865218
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { int K,S,X,Y,Z,res=0; cin>>K>>S; for(int i=0;i<=K;i++){ for(int j=0;j<=K;j++){ if(s-i-j<=k&&s-i-j>=0){ res++; } } } cout<<res; }
a.cc: In function 'int main()': a.cc:8:12: error: 's' was not declared in this scope 8 | if(s-i-j<=k&&s-i-j>=0){ | ^ a.cc:8:19: error: 'k' was not declared in this scope 8 | if(s-i-j<=k&&s-i-j>=0){ | ^
s760945853
p03834
C
#include<stdio.h> int main(){ int i=0; char str[20]; scanf(%s, str); while(str[i]){ if(str[i] == ",") str[i] = " "; printf("%s", str); i++; } return 0; }
main.c: In function 'main': main.c:5:9: error: expected expression before '%' token 5 | scanf(%s, str); | ^ main.c:7:15: warning: comparison between pointer and integer 7 | if(str[i] == ",") | ^~ main.c:8:14: error: assignment to 'char' from 'char *' makes integer from po...
s051847655
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(void){ string s; cin >> s; s[5]=’ ’,s[13]=’ ’; cout << s << endl; }
a.cc:7:9: error: extended character ’ is not valid in an identifier 7 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:7:11: error: extended character ’ is not valid in an identifier 7 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:7:19: error: extended character ’ is not valid in an identifier 7 | s[5...
s787802872
p03834
Java
import java.util.* fun main(args: Array<String>) { val sc = Scanner(System.`in`) val s: String = sc.next() for (i in 0 until s.length) { if (s[i] == ',') { print(' ') } else { print(s[i]) } } println() }
Main.java:1: error: ';' expected import java.util.* ^ Main.java:4: error: illegal character: '`' val sc = Scanner(System.`in`) ^ Main.java:4: error: illegal character: '`' val sc = Scanner(System.`in`) ^ 3 errors
s429104296
p03834
Java
import java.util.*; class Main { public static void main (string args[]){ Scanner sc = new Scanner(System.in); String s = sc.next(); System.out.println(s.replace(","," ")); } }
Main.java:4: error: cannot find symbol public static void main (string args[]){ ^ symbol: class string location: class Main 1 error
s799365750
p03834
C++
#include<iostream> #include<string> using namespace std; int main(){ string S; S[5]=" "; S[13]=" "; cout<<S<<endl; }
a.cc: In function 'int main()': a.cc:9:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 9 | S[5]=" "; | ^~~ | | | const char* a.cc:10:9: error: invalid conversion from 'const ch...
s726071046
p03834
C++
#include <iostream> #include <string> using namespace std; int main(void){ string s; cin >> s; replace(s.begin(),s.end(),',',' '); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'replace' was not declared in this scope 11 | replace(s.begin(),s.end(),',',' '); | ^~~~~~~
s082419087
p03834
Java
import java.util.*; public class Main(){ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int s = sc.nextInt(); int count = 0; for(int x=0; x<=k; x++){ for(int y=0; y<=k-x; y++){ for(int z=0; z<=k-x-y; z++){ ...
Main.java:3: error: '{' expected public class Main(){ ^ 1 error
s166382082
p03834
C++
arr = raw_input().split(",") print (" ").join(arr)
a.cc:1:1: error: 'arr' does not name a type 1 | arr = raw_input().split(",") | ^~~
s458404730
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; s[6] = ' '; s[14] = ' '; cout >> s; }
a.cc: In function 'int main()': a.cc:13:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 13 | cout >> s; | ~~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::basic_s...
s110149460
p03834
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; replace(s.begin(), s.end(), ',', ' '); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'replace' was not declared in this scope 9 | replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s715921311
p03834
C++
#include <iostream> #include <string> int main() { string s; cin >> s; s.replace(s.begin(), s.end(), ',', ' '); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:5:3: 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:4...
s683823222
p03834
C++
#include <iostream> #include <string> int main() { string s; cin >> s; replace(s.begin(), s.end(), ',', ' '); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:5:3: 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:4...
s281050581
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; replace(s.begin(), s.end(), ',', ' ' ) cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:43: error: expected ';' before 'cout' 6 | replace(s.begin(), s.end(), ',', ' ' ) | ^ | ; 7 | cout << s << endl; | ~~~~
s221824546
p03834
C++
#include<bits/stdc++.h> #include<string> using namespace std; int main(){ string s, t, u; cin >> s + "," + t + "," + u; cout << s << " " << t << " " << u << endl; }
a.cc: In function 'int main()': a.cc:7:23: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::__cxx11::basic_string<char>') 7 | string s, t, u; cin >> s + "," + t + "," + u; | ~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~ | ...
s902983534
p03834
C++
#include<bits/stdc++.h> #include<string> using namespace std; int main(){ string s, t, u; cin >> s >> "," >> t >> "," >> u; cout << s << " " << t << " " << u << endl; }
a.cc: In function 'int main()': a.cc:7:28: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and 'const char [2]') 7 | string s, t, u; cin >> s >> "," >> t >> "," >> u; | ~~~~~~~~ ^~ ~~~ | | | | | ...
s791674188
p03834
C++
ource code Copy #include<bits/stdc++.h> using namespace std; int main(){ int x,y,z,k,s,ans=0; cin>>k>>s; for(x=0;x<=k;x++){ for(y=0;y<=k;y++){ z=s-x-y; if(x+y+z==s&&z<=k&&z>=0) ans++; } } cout<<ans; return 0; }
a.cc:1:1: error: 'ource' does not name a type 1 | ource code | ^~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:3: /usr/include...
s070906664
p03834
C++
#include <bits/stdc++.h> #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) typedef long long ll; using namespace std; const int MOD = 1000000007; const int INF = 1010000000; const double EPS = 1e-10; int h,w,x; char s[1000][1000]; bool visited [1000][1000]; pair<int,int> start,goal; queue<pair...
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::replace(_FIter, _FIter, const _Tp&, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterat...
s038774169
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; cout << S.at(0) << S.at(1) << S.at(2) << S.at(3) << S.at(4) << " " << S.at(6) << S.at(7) << S.at(8) << S.at(9) << S.at(10) << S.at(11) << S.at(12) << " " << S.at(14) << S.at(15) << S.at(16) << S.at(17) << S.at(18) << S.at(19) << endl;...
a.cc: In function 'int main()': a.cc:8:5: error: statement cannot resolve address of overloaded function 8 | endl;} | ^ a.cc: At global scope: a.cc:9:1: error: expected declaration before '}' token 9 | } | ^
s815006945
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string S; cin >> S; S.replece(5, 1, " "); S.replace(13, 1, " "); cout << S << endl; }
a.cc: In function 'int main()': a.cc:6:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'replece'; did you mean 'replace'? 6 | S.replece(5, 1, " "); | ^~~~~~~ | replace
s713688477
p03834
C++
using namespace std; int main(){ string s; cin >> s; s[5] = " ", s[13] = " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:3:5: error: 'string' was not declared in this scope 3 | string s; | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | using namespace std; a.cc:4:5: error: ...
s348244536
p03834
C++
using namespace std; int main(){ string s; cin >> s; s[5] = '', s[13] = ''; cout << s << endl; }
a.cc:5:12: error: empty character constant 5 | s[5] = '', s[13] = ''; | ^~ a.cc:5:24: error: empty character constant 5 | s[5] = '', s[13] = ''; | ^~ a.cc: In function 'int main()': a.cc:3:5: error: 'string' was not declared in this scope 3 | string ...
s552768338
p03834
C++
#include<bits/stdc++.h> #include<string> using namespace std; int main(){ string s; cin >> s; s[5] = '', s[13] = ''; cout << s << endl; }
a.cc:7:12: error: empty character constant 7 | s[5] = '', s[13] = ''; | ^~ a.cc:7:24: error: empty character constant 7 | s[5] = '', s[13] = ''; | ^~
s744282550
p03834
C++
#include<bits/stdc++.h> #include<string> using namespace std; int main(){ char s; cin >> s; cout << s[0]+s[1]+s[2]+s[3]+s[4] << " " << s[5]+s[6]+s[7]+s[8]+s[9]+s[10]+s[11] << " " << s[12]+s[13]+s[14]+s[15]+s[16] << endl; }
a.cc: In function 'int main()': a.cc:7:14: error: invalid types 'char[int]' for array subscript 7 | cout << s[0]+s[1]+s[2]+s[3]+s[4] << " " << s[5]+s[6]+s[7]+s[8]+s[9]+s[10]+s[11] << " " << s[12]+s[13]+s[14]+s[15]+s[16] << endl; | ^ a.cc:7:19: error: invalid types 'char[int]' for array subscr...
s009117086
p03834
C++
#include<iostream> #include<string> using namespace std; int main(){ char s; cin >> s; s(5) = " "; s(13) = " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: 's' cannot be used as a function 6 | s(5) = " "; | ~^~~ a.cc:7:6: error: 's' cannot be used as a function 7 | s(13) = " "; | ~^~~~
s913198620
p03834
C++
#include<iostream> #include<string> using namespace std; int main(){ char s; cin >> s; s(5)) = " "; s(13) = " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: 's' cannot be used as a function 6 | s(5)) = " "; | ~^~~ a.cc:7:6: error: 's' cannot be used as a function 7 | s(13) = " "; | ~^~~~
s465669385
p03834
C++
#include<iostream> #include<string> using namespace std; int main(){ char s; cin >> s; s[5] = " "; s[13] = " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: invalid types 'char[int]' for array subscript 6 | s[5] = " "; | ^ a.cc:7:6: error: invalid types 'char[int]' for array subscript 7 | s[13] = " "; | ^
s562906690
p03834
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; s[5] = " "; s[13] = " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:6:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 6 | s[5] = " "; | ^~~ | | | const char* a.cc:7:13: error: invalid conversi...
s536327698
p03834
C++
#include<stdio.h> #include<string.h> int main() { char a[25]; scanf("%s",&a); for(int i=0;i&lt;=18;i++) { if(i==5||i==13) { printf(" "); } else printf("%c",a[i] ); } }
a.cc: In function 'int main()': a.cc:7:23: error: 'lt' was not declared in this scope 7 | for(int i=0;i&lt;=18;i++) | ^~ a.cc:7:26: error: expected primary-expression before '=' token 7 | for(int i=0;i&lt;=18;i++) | ^ a.cc:7:29: error: e...
s421285095
p03834
C++
#include<stdio.h> #include<string.h> int main() { char a[25]; scanf("%s",&a); for(int i=0;i&lt;=18;i++) { if(i==5||i==13) { printf(" "); } else printf("%c",a[i] ); } }
a.cc: In function 'int main()': a.cc:7:23: error: 'lt' was not declared in this scope 7 | for(int i=0;i&lt;=18;i++) | ^~ a.cc:7:26: error: expected primary-expression before '=' token 7 | for(int i=0;i&lt;=18;i++) | ^ a.cc:7:29: error: e...
s620288002
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; s[5]=" ",s[13]=" "; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:6:6: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 6 | s[5]=" ",s[13]=" "; | ^~~ | | | const char* a.cc:6:16: error: invalid conversion from 'const ...
s758970044
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; s[5]=" ",s[13]=" "; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:6:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 6 | s[5]=" ",s[13]=" "; | ^~~ | | | const char* a.cc:6:18: error: invalid conversion from...
s966338873
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; s[5]=" "; s[13]=" "; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:5:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 5 | s[5]=" "; | ^~~ | | | const char* a.cc:6:9: error: invalid conversion from 'const cha...
s280146987
p03834
Java
import java.util.Scanner; public class MAin { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); sc.close(); S = S.replaceAll(",", " "); System.out.println(S); } }
Main.java:3: error: class MAin is public, should be declared in a file named MAin.java public class MAin { ^ 1 error
s898957351
p03834
C++
#! /usr/bin/python3 # Haiku """ s の長さは 19 である。 s の 6 文字目と 14 文字目は , である。 それら以外の s の文字は英小文字である。 """ # s = input() # s = s.replace(',', ' ') print(input().replace(',', ' '))
a.cc:1:2: error: invalid preprocessing directive #! 1 | #! /usr/bin/python3 | ^ a.cc:2:3: error: invalid preprocessing directive #Haiku 2 | # Haiku | ^~~~~ a.cc:4:3: warning: missing terminating " character 4 | """ | ^ a.cc:4:3: error: missing terminating " character a.cc:5:19: error:...
s276677145
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(char &c;s) if(c==',') c=' '; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:8:17: error: 'c' declared as reference but not initialized 8 | for(char &c;s) if(c==',') c=' '; | ^ a.cc:8:19: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 8 | for(char &c;s) if(c==',') c...
s281206007
p03834
C++
#include <bits/stdc++.h>; using namespace std; int main(){ string s; cin>>s; for(char &c;s) if(c==',') c=' '; cout<<s<<endl; }
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include <bits/stdc++.h>; | ^ a.cc: In function 'int main()': a.cc:8:13: error: 'c' declared as reference but not initialized 8 | for(char &c;s) if(c==',') c=' '; | ^ a.cc:8:15: error: could not c...
s164507707
p03834
C
#include<stdio.h> int main { char s[25]; scanf ("%s",&s); s[5]=''; s[13]=''; printf ("%s\n",s); }
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 3 | { | ^ main.c:6:6: error: empty character constant 6 | s[5]=''; | ^~ main.c:7:7: error: empty character constant 7 | s[13]=''; | ^~
s019230828
p03834
C++
#include <stdio.h> #include <stdlib.h> void main() { int A, B,c,d,e; scanf("%d%d", &A, &B); c = A + B; d = c - 24; e = 0; if (c <24) { printf("%d\n", c); } else { if (c == 46) { printf("%d\n",e); } else printf("%d\n", d); } system("pause"); }
a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~
s691439407
p03834
C++
#include<iostream> #include<string> using namespace std; int main() { string S; cin >> S; replace(S.begin(), S.end(), ',', ' '); cout << S << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'replace' was not declared in this scope 7 | replace(S.begin(), S.end(), ',', ' '); | ^~~~~~~
s326136271
p03834
C
include <stdio.h> int main(void) { char s[20]; scanf("%s", s); s[5] = ' '; s[13] = ' '; printf("%s\n", s); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s491429151
p03834
C
#include <stdio.h> in main(){char s[20];scanf("%s",s);s[5]=0;s[13]=0;printf("%s",s);}
main.c:2:1: error: unknown type name 'in'; did you mean 'int'? 2 | in main(){char s[20];scanf("%s",s);s[5]=0;s[13]=0;printf("%s",s);} | ^~ | int
s243611387
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string str; cin >> str; int ix=0; while((ix = str.find(",", ix)) >=0){ str.replace(ix, strlen(","), " ") } cout << str << endl; }
a.cc: In function 'int main()': a.cc:10:38: error: expected ';' before '}' token 10 | str.replace(ix, strlen(","), " ") | ^ | ; 11 | } | ~
s150859967
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(void){ string s; cin >> s; s[5]=" "; s[13]=" "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 6 | s[5]=" "; | ^~~ | | | const char* a.cc:7:9: error: invalid conversion from 'const cha...
s140410582
p03834
C++
#include<iostream> #include<string> using namespace std; int main() { char a[19]; cin >> a; a[5] = " "; a[13] = " "; cout << a; return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 9 | a[5] = " "; | ^~~ | | | const char* a.cc:10:17: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 10 | ...
s701370877
p03834
C++
#include <string> using namespace std; int main() { string str; cin >> str; str.insert(str.begin() + 6, ' '); str.insert(str.begin() + 15, ' '); str.erase(str.begin() + 5); str.erase(str.begin() + 13); cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin >> str; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <string> +++ |+#include <iostream> 2 | using...
s501093834
p03834
C++
#include<iostream> using namespace std; int main(){ string str; cin >> str; for(int i=0;i<str.size();i++){ if(str[i] == ","){ str[i] = " "; } } cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(str[i] == ","){ a.cc:10:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | ...
s177930247
p03834
C++
#include<iostream> using namespace std; int main(){ string str; cin >> str; for(int i=0;i<str..size();i++){ if(str[i] == ','){ str[i] = ' '; } } cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:21: error: expected unqualified-id before '.' token 8 | for(int i=0;i<str..size();i++){ | ^
s900769319
p03834
C++
/* |\_/| |* *| \_+_/ */ #include<bits/stdc++.h> #define endl '\n' using namespace std; int main(){ cin.tie(0); // cout と cin の同期を切る ios::sync_with_stdio(false); /* cの stdioストリーム (printfとか)と*/ string s; cin>>s; for(int i=0;<s.length();i++){ if(s[i]==','){ cout<<' '; }el...
a.cc: In function 'int main()': a.cc:21:15: error: expected primary-expression before '<' token 21 | for(int i=0;<s.length();i++){ | ^
s616090172
p03834
C++
#include <stdio.h> #include <string> #include <iostream> #include <map> using namespace std; int main(void){ string str; cin >> str; str[5]=str[13]=" "; cout << str <<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | str[5]=str[13]=" "; | ^~~ | | | const char*
s989739453
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { /*int a, s, d; cin >> a >> s >> d ; if(a+s==d || a+d==s || s+d==a) cout << "Yes" << endl; else cout << "No" << endl;*/ string s; cin >> s; s[5] == " "; s[13] == " "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:14:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 14 | s[5] == " "; a.cc:15:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 15 | s[13] == " ";
s341943349
p03834
C++
#include <iostream> #include <string> using namespace std; int main(int argc, char const *argv[]) { string s; cin >> s; replace(s.begin(), s.end(), ',',' '); cout << s << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:9:3: error: 'replace' was not declared in this scope 9 | replace(s.begin(), s.end(), ',',' '); | ^~~~~~~
s186163140
p03834
C++
#include <iostream> using namespace std; int main(){ int k=0, s=0; cin >> k >> s; int counter=0; int x=0,y=0,z=0; for(int i=0; i<=k; ++i){ for(int j=i; j<=k; ++j){ x = i;s y = j; z = k - x - y; if(z>=0) ++counter; } } cou...
a.cc: In function 'int main()': a.cc:12:20: error: expected ';' before 'y' 12 | x = i;s | ^ | ; 13 | y = j; | ~
s122705114
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s.at(5) = " "; s.at(13) = " "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s.at(5) = " "; | ^~~ | | | const char* a.cc:9:14: error: invalid conv...
s507493265
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin >> s; for(auto c:s){ if(c == ","){ cout << " "; }else{ cout << c; } } return 0; }
a.cc: In function 'int main()': a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(c == ","){ | ~~^~~~~~
s971933023
p03834
C++
#include <iostream> #include <string> using namespace std; int main(){ string a cin>>a; a[5]=' '; a[13]=' '; cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'cin' 6 | cin>>a; | ^~~ a.cc:7:3: error: 'a' was not declared in this scope 7 | a[5]=' '; | ^
s110315928
p03834
C++
#include <iostream> #include <string> using namespace std; int main(){ string a cin>>a; int a[5]=' ',a[13]=' '; cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'cin' 6 | cin>>a; | ^~~ a.cc:7:12: error: array must be initialized with a brace-enclosed initializer 7 | int a[5]=' ',a[13]=' '; | ^~~ a.cc:7:16: error: conflicting declaration 'int a [13]' 7 | int a...
s172534575
p03834
C++
haiku,atcoder,tasks
a.cc:1:1: error: 'haiku' does not name a type 1 | haiku,atcoder,tasks | ^~~~~
s433819961
p03834
C++
#include <iostream> #include<algorithm> #include<math.h> #include<set> #include<vector> using namespace std; int main() { ll K, S; cin >> K >> S; ll cnt = 0; for (ll x = 0; x <= K; ++x) { for (ll y = 0; y <= K; ++y) { ll z = S - x - y; if (z >= 0 && z <= K) ++cnt; } } cout << cnt << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: 'll' was not declared in this scope 8 | ll K, S; | ^~ a.cc:9:16: error: 'K' was not declared in this scope 9 | cin >> K >> S; | ^ a.cc:9:21: error: 'S' was not declared in this scope 9 | cin >> K >> S...
s260559406
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { int string; cin >> s; for(int i=0;i<s.size();i++) { if(s[i] == ',') cout << " "; else cout << s[i]; } }
a.cc: In function 'int main()': a.cc:8:12: error: 's' was not declared in this scope 8 | cin >> s; | ^
s780572036
p03834
C++
int main(void){ string s; cin >> s; s[5]=’ ’,s[13]=’ ’; cout << s << endl; return 0; }
a.cc:4:8: error: extended character ’ is not valid in an identifier 4 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:4:10: error: extended character ’ is not valid in an identifier 4 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:4:18: error: extended character ’ is not valid in an identifier 4 | s[5]=’ ’...
s411186574
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(void) { string s; cin >> s; s[5] = " "; s[13] = " "; cout << s << endl;}
a.cc: In function 'int main()': a.cc:7:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s[5] = " "; | ^~~ | | | const char* a.cc:8:11: error: invalid conversion from ...
s967549148
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(void) { string s; cin >> s; s.at(5) = " "; s.at(13) = " "; cout << s << endl;}
a.cc: In function 'int main()': a.cc:7:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s.at(5) = " "; | ^~~ | | | const char* a.cc:8:14: error: invalid conv...
s817143665
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(void) { string s,a; cin >> s; a=s; a.at(5) = " "; a.at(13) = " "; cout << a << endl;}
a.cc: In function 'int main()': a.cc:8:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | a.at(5) = " "; | ^~~ | | | const char* a.cc:9:14: error: invalid conv...
s171093214
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s,a; cin >> s; a=s; a.at(5) = " "; a.at(13) = " "; cout << a << endl;}
a.cc: In function 'int main()': a.cc:8:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | a.at(5) = " "; | ^~~ | | | const char* a.cc:9:14: error: invalid conv...
s867226635
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s,a; cin >> s; a=s; a.at(5)=" "; a.at(13)=" "; cout << a << endl;}
a.cc: In function 'int main()': a.cc:8:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | a.at(5)=" "; | ^~~ | | | const char* a.cc:9:12: error: invalid conversion f...
s891969466
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s,a; cin >> s; a=s; s.at(5)=" "; s.at(13)=" "; cout << s << endl;}
a.cc: In function 'int main()': a.cc:8:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s.at(5)=" "; | ^~~ | | | const char* a.cc:9:12: error: invalid conversion f...
s856012960
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s,a; cin >> s; a=s; a.at(5)=" "; a.at(13)=" "; cout << a << endl;}
a.cc: In function 'int main()': a.cc:8:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | a.at(5)=" "; | ^~~ | | | const char* a.cc:9:12: error: invalid conversion f...
s816491839
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string g = s.substr(0,5); string si = s.substr(6,7); string go = s.substr(9,5); cout << g << " " << si << " " << go << endl; return 0; }p
a.cc:12:2: error: 'p' does not name a type 12 | }p | ^
s590318300
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s[5]=" "; s[13]=" "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s[5]=" "; | ^~~ | | | const char* a.cc:9:9: error: invalid conversion from 'const cha...
s393019290
p03834
C++
#include<algorithm> #include <iostream> #include<cstdio> #include<cmath> #include<iomanip> #include<string> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<5;i++){ cout<<s[i]; } cout<<" "; for(int i=6;i<13;i++){ cout<<s[i]; } cout<<" "; for(i...
a.cc: In function 'int main()': a.cc:22:9: error: 'cour' was not declared in this scope 22 | cour<<s[i]<<endl; | ^~~~
s583569941
p03834
C++
#include <sstream> #include <iostream> #include <string> #include <cstring> #include <stdio.h> using namespace std; int main(){ string s; cin >> s; s[5] = " "; s[13] = " "; for (int i = 0; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc: In function 'int main()': a.cc:10:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | s[5] = " "; | ^~~ | | | const char* a.cc:11:11: error: invalid conversion fro...
s829423672
p03834
C++
#include <sstream> #include <iostream> #include <string> #include <cstring> #include <stdio.h> using namespace std; int main(){ char s; cin >> s; s[5] = " "; s[13] = " "; for (int i = 0; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc: In function 'int main()': a.cc:10:4: error: invalid types 'char[int]' for array subscript 10 | s[5] = " "; | ^ a.cc:11:4: error: invalid types 'char[int]' for array subscript 11 | s[13] = " "; | ^ a.cc:13:12: error: invalid types 'char[int]' for array subscript 13 | cout << s[i] ;...
s533623314
p03834
C++
#include <sstream> #include <iostream> #include <string> #include <cstring> #include <stdio.h> using namespace std; int main(){ char s[100]; cin >> s; s[5] = " "; s[13] = " "; for (int i = 0; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc: In function 'int main()': a.cc:10:10: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 10 | s[5] = " "; | ^~~ | | | const char* a.cc:11:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 11 | s[13] = " "; | ...
s668431280
p03834
C++
#include <sstream> #include <iostream> #include <string> #include <cstring> #include <stdio.h> using namespace std; int main(){ char * s[100]; cin >> s; s[5] = " "; s[13] = " "; for (int i; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char* [100]') 9 | cin >> s; | ~~~ ^~ ~ | | | | | char* [100] | std::istream {aka std::basic_istream<char>} In file included f...
s967910676
p03834
C++
#include <sstream> #include <iostream> #include <string> #include <cstring> #include <stdio.h> using namespace std; int main(){ char s[100]; cin >> s; s[5] = " "; s[13] = " "; for (int i; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc: In function 'int main()': a.cc:10:10: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 10 | s[5] = " "; | ^~~ | | | const char* a.cc:11:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 11 | s[13] = " "; | ...
s647368357
p03834
C++
#include <sstream> #include <iostream> #include <string> #include <ctsring> #include <stdio.h> using namespace std; int main(){ char s[100]; cin >> s; s[5] = " "; s[13] = " "; for (int i; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc:4:10: fatal error: ctsring: No such file or directory 4 | #include <ctsring> | ^~~~~~~~~ compilation terminated.
s765556793
p03834
C++
#include <sstream> #include <iostream> #include <string> #include <ctsring> using namespace std; int main(){ char s[100]; cin >> s; s[5] = " "; s[13] = " "; for (int i; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc:4:10: fatal error: ctsring: No such file or directory 4 | #include <ctsring> | ^~~~~~~~~ compilation terminated.
s303009153
p03834
C++
#include <sstream> #include <iostream> #include <string> using namespace std; int main(){ char s[100]; cin >> s; s[5] = " "; s[13] = " "; for (int i; i < 19; i++){ cout << s[i] ; } endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | s[5] = " "; | ^~~ | | | const char* a.cc:9:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 9 | s[13] = " "; | ...
s535545978
p03834
C++
#include <sstream> #include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; s[5] = " "; s[13] = " "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s[5] = " "; | ^~~ | | | const char* a.cc:9:11: error: invalid conversion from ...
s734899596
p03834
C
#include<stdio.h> int main(){ char s[19]; scanf("%s",s); for(int i=0;i<20;i++){ if(s[i]==','){ printf("%c",' '); }else{ printf("%c",s[i]); } } printf("\n); return 0; }
main.c: In function 'main': main.c:12:10: warning: missing terminating " character 12 | printf("\n); | ^ main.c:12:10: error: missing terminating " character 12 | printf("\n); | ^~~~~ main.c:14:2: error: expected expression before 'return' 14 | return 0; | ^~~~~~ main....
s000915517
p03834
C++
#include<iostream> #include<algorithm> #include<math.h> #include<set> #include<vector> #include<map> using namespace std; int main(){ string S; cin>>S; S[5]='',S[13]=''; cout<< S <<endl; }
a.cc:11:6: error: empty character constant 11 | S[5]='',S[13]=''; | ^~ a.cc:11:15: error: empty character constant 11 | S[5]='',S[13]=''; | ^~
s087342074
p03834
C++
use std::cmp::*; use std::io::*; fn main() { let a = read(); let b = read(); let c = read(); let d = read(); let d = a * b; let c = c * d; println!("{}", min(c, d)); } fn read() -> u32 { let s = stdin(); let b = s.bytes() .map(|c| c.unwrap() as char) .take_while(|c|...
a.cc:1:1: error: 'use' does not name a type 1 | use std::cmp::*; | ^~~ a.cc:2:1: error: 'use' does not name a type 2 | use std::io::*; | ^~~ a.cc:3:1: error: 'fn' does not name a type 3 | fn main() { | ^~ a.cc:14:1: error: 'fn' does not name a type 14 | fn read() -> u32 { | ^~
s535024733
p03834
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ for(int z=0; z <= K; ++z){ int total = x + y + z if (total==X) ++res; } } } cout << res <<endl; }
a.cc: In function 'int main()': a.cc:13:1: error: expected ',' or ';' before 'if' 13 | if (total==X) ++res; | ^~
s436653963
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin >> s; s[5]=" "; s[13]=" "; cout << s; return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 8 | s[5]=" "; | ^~~ | | | const char* a.cc:9:9: error: invalid conversion from 'const cha...
s789794998
p03834
C++
#include <cstdio> #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; replace(s.begin(), s.end(), ',', ' '); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'replace' was not declared in this scope 10 | replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s677207613
p03834
C++
include <iostream> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 19; i++) cout << (s.substr(i, 1) == "," ? " " : s.substr(i, 1)); cout << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> s; | ^~~ a.cc:6:10: erro...
s002473215
p03834
C++
include <iostream> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 19; i++) cout << (s.substr(i, 1) == "," ? " " : s.substr(i, 1)); cout << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> s; | ^~~ a.cc:6:10: erro...
s499380646
p03834
C++
include <iostream> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 19; i++) cout << (s.substr(i, 1) == "," ? " " : s.substr(i, 1)); cout << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> s; | ^~~ a.cc:6:10: erro...
s763219412
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { char a; while(a!=EOF) { a=getchar(); if(a==',') cout<<' '; else cout<<a; } return 0;
a.cc: In function 'int main()': a.cc:14:18: error: expected '}' at end of input 14 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s962399469
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; s.at(5) = " "; s.at(13) = " "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s.at(5) = " "; | ^~~ | | | const char* a.cc:8:16: error: inva...
s746864153
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin << s; s.at(5) = " "; s.at(13) = " "; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | cin << s; | ~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::basi...