submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s338643076
p03832
C++
#include <bits/stdc++.h> using namespace std; #define int long long // <-----!!!!!!!!!!!!!!!!!!! #define rep(i,n) for (int i=0;i<(n);i++) #define rep2(i,a,b) for (int i=(a);i<(b);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) #define rrep2(i,a,b) for (int i=(a)-1;i>=b;i--) #define chmin(a,b) (a)=min((a),(b)); #de...
a.cc:196:13: error: redefinition of 'void output()' 196 | inline void output(){ cerr << endl; } | ^~~~~~ a.cc:19:13: note: 'void output()' previously defined here 19 | inline void output(){ cerr << endl; } | ^~~~~~ a.cc:198:13: error: redefinition of 'template<class First, class...
s728117939
p03832
C++
#include <cstdio> #include <algorithm> #include <cmath> #include <queue> #include <vector> #include <map> #include <set> using namespace std; typedef pair<int , int> P2; typedef pair<pair<int , int> , int> P3; typedef pair<pair<int , int> , pair<int , int> > P4; #define Fst first #define Snd second #define PB(a) push...
a.cc:25:9: error: '__int64' does not name a type; did you mean '__int64_t'? 25 | typedef __int64 LL; | ^~~~~~~ | __int64_t a.cc:28:1: error: 'LL' does not name a type 28 | LL mod = 1e9 + 7; | ^~ a.cc:29:1: error: 'LL' does not name a type 29 | LL con[1010][1010]; | ^~ a....
s156588461
p03832
C++
#include<bits/stdc++.h> using namespace std; class combination { public: //Nの最大値がわかれば代入する combination( long long int combinationThreshold = 1e7 ) { (*this).combinationThreshold = combinationThreshold + 2; } //a^p % mod long long int powmod( long long int A, long long int P, long long int M = LLONG_MAX ) { ...
/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
s442036760
p03832
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) ...
a.cc: In function 'll calc(int, ll)': a.cc:85:20: error: call of overloaded 'div(ll&, ll)' is ambiguous 85 | p = div(p, (ll)c); | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, ...
s907933630
p03832
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #includ...
a.cc: In member function 'mint_base<MOD> mint_base<MOD>::operator~() const': a.cc:102:29: error: no matching function for call to 'm_pow(const long long int&, long long int)' 102 | return m_pow(a, (long long)e_phi - 1); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:36:41: note: ca...
s069725901
p03832
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #includ...
a.cc: In member function 'mint_base<MOD> mint_base<MOD>::operator~() const': a.cc:101:30: error: there are no arguments to 'mint' that depend on a template parameter, so a declaration of 'mint' must be available [-fpermissive] 101 | return m_pow(mint(a), (long long)e_phi - 1); | ...
s914577831
p03833
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) using namespace std; typedef pair<int,int> P; typedef long long int ll; #define dame { puts("-1"); retu...
a.cc: In function 'void update_(int, int, int, int, int, int, int)': a.cc:29:17: error: reference to 'data' is ambiguous 29 | data[node_id][mm] = new_value; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, ...
s509620102
p03833
C++
#include <iostream> #include <algorithm> #include <utility> #include <numeric> #include <vector> #include <array> #include <queue> template <class T, class U> inline bool chmin(T &lhs, const U &rhs) { if (lhs > rhs) { lhs = rhs; return true; } return false; } template <class T, class U> inline bool chmax(T &lhs,...
a.cc:102:13: error: 'uint32_t' does not name a type 102 | using u32 = uint32_t; | ^~~~~~~~ a.cc:9:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 8 | #include <queue> +++ |+#include <cstdint> 9 | a.cc:103:13: error: 'uint64_t' ...
s756382918
p03833
C++
5 3 1 2 3 4 10 1 1 1 1 1 1 10 1 1 1 1 1 1 10
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 3 | ^
s044032444
p03833
C++
#include <bits/stdc++.h> using namespace std; // template {{{ #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define lb lower_bound #define ub upper_bound #define f first #define s second #define resz resize #define sz(x) int((x).size()) #define all(x) (x).begin(), (x).end() ...
a.cc:134:21: error: reference to 'monostate' is ambiguous 134 | template<typename W=monostate> struct wedge { | ^~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80, from a.cc:1: /usr/include/c++/14/variant:1237:10: note: candidates are: 'str...
s054208306
p03833
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, int> pii; #define fi first #define se second #define mp make_pair #define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); mt19937 rnd(chrono::steady_clock().now().time_si...
a.cc: In function 'int query(int, int, int, int, int)': a.cc:56:16: warning: overflow in conversion from 'long long int' to 'int' changes value from '-10000000000000000' to '-1874919424' [-Woverflow] 56 | return -inf; | ^~~~ a.cc:58:16: warning: overflow in conversion from 'long long int...
s550815180
p03833
C++
#include <vector> #include <cstdio> #include <stack> #include <string> using namespace std; const int S = (1<<20)+5; char buf[S],*H,*T; inline char Get() { if(H==T) T=(H=buf)+fread(buf,1,S,stdin); if(H==T) return -1;return *H++; } inline int read() { int x=0;char c=Get(); while(!isdigit(c)) c=Get(); ...
a.cc: In function 'int main()': a.cc:36:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 36 | for (register int i = 1;i<shop;++i){ | ^ a.cc:40:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 40 | for (re...
s890890336
p03833
C++
#include <vector> #include <cstdio> #include <stack> #include <string> #define help cout<<"I don't want to die!"<<endl; using namespace std; inline char Get() { if(H==T) T=(H=buf)+fread(buf,1,S,stdin); if(H==T) return -1;return *H++; } inline int read() { int x=0;char c=Get(); while(!isdigit(c)) c=Get()...
a.cc: In function 'char Get()': a.cc:9:8: error: 'H' was not declared in this scope 9 | if(H==T) T=(H=buf)+fread(buf,1,S,stdin); | ^ a.cc:9:11: error: 'T' was not declared in this scope 9 | if(H==T) T=(H=buf)+fread(buf,1,S,stdin); | ^ a.cc:9:19: error: 'buf' was not declared...
s171191419
p03833
C++
N, M = gets.split.map(&:to_i) as = [0] + gets.split.map(&:to_i) + [0] (1...N).each do |i| as[i] += as[i-1] end bs = N.times.map{gets.split.map(&:to_i)} ans = 0 N.times do |l| (l...N).each do |r| result = as[l] - as[r] M.times do |j| result += (l..r).map{|i| bs[i][j]}.max end...
a.cc:3:2: error: too many decimal points in number 3 | (1...N).each do |i| | ^~~~~ a.cc:1:1: error: 'N' does not name a type 1 | N, M = gets.split.map(&:to_i) | ^ a.cc:8:1: error: 'ans' does not name a type 8 | ans = 0 | ^~~ a.cc:13:47: error: expected unqualified-id before '.' token 1...
s072205405
p03833
Java
import java.io.*; import java.util.*; import jdk.internal.jline.internal.InputStreamReader; /* * Heart beats fast * Colors and promises * How to be brave * How can I love when I am afraid... */ public class Main { static class segtree { int n; int[][] tr; void build() { for(int i=n-1;i>0;i--...
Main.java:3: error: package jdk.internal.jline.internal does not exist import jdk.internal.jline.internal.InputStreamReader; ^ 1 error
s046146730
p03833
C++
#include<bits/stdc++.h> #define ll long long using namespace std; int getint() { int i=0,f=1;char c; for(c=getchar();(c!='-')&&(c<'0'||c>'9');c=getchar()); if(c=='-')c=getchar(),f=-1; for(;c>='0'&&c<='9';c=getchar())i=(i<<3)+(i<<1)+c-'0'; return i*f; } const int N=200005,mod=1e9+7; const ll INF=1e18...
a.cc:69:1: error: expected unqualified-id before '--' token 69 | --------------------- | ^~
s772983203
p03833
C++
#include<cstdio> #include<algorithm> using namespace std; typedef long long ll; int n,m,b[5010][210],nxt[5010][210]; ll ans,sum[5010],d[5010]; char buffer[20000010],*head; inline char Getchar(){ return *head++; } inline int rd(){ register int x=0; register char c; do c=Getchar(); while(!isdigit(c)); do{ x=(x<<1...
a.cc: In function 'int rd()': a.cc:12:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 12 | register int x=0; | ^ a.cc:13:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 13 | register char c; ...
s695433900
p03833
C++
#include <bits/stdc++.h> #define ll long long #define INF (1LL << 60) #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i) #define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i) #define each(a,b) for(auto& (a): (b)) #define all(v) (v).beg...
a.cc: In function 'int main()': a.cc:109:30: error: no matching function for call to 'SparseTable<int>::SparseTable(int&)' 109 | SparseTable<int> sp(i); | ^ a.cc:52:5: note: candidate: 'SparseTable<T>::SparseTable(std::vector<_Tp>&) [with T = int]' 52 | SparseTable(ve...
s788306603
p03833
C++
#include<bits/stdc++.h> #define int long long using namespace std; int n,m,a[5001],b[5000][200]; signed main(){ cin>>n>>m; for(int i=1;i<n;i++)cin>>a[i]; for(int i=1;i<n;i++)a[i]+=a[i-1]; for(int i=0;i<n;i++) for(int j=0;j<m;j++)scanf("%lld",&b[i][j]); int ans=0; for(int i=0;i<n;i++){ vector<int>...
a.cc:36:5: error: redefinition of 'long long int n' 36 | int n,m,a[5001],b[5000][200]; | ^ a.cc:4:5: note: 'long long int n' previously declared here 4 | int n,m,a[5001],b[5000][200]; | ^ a.cc:36:7: error: redefinition of 'long long int m' 36 | int n,m,a[5001],b[5000][200]; | ^...
s645346056
p03833
Java
import java.io.*; import java.util.*; public class MainF { static final StdIn in = new StdIn(); static final PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) { int n=in.nextInt(), m=in.nextInt(); long[] a=in.readLongArray(n-1, 0); long[][] b = new long[n][m]; for(int i...
Main.java:4: error: class MainF is public, should be declared in a file named MainF.java public class MainF { ^ 1 error
s238254948
p03833
C++
#include<cstdio> #include<cstring> #include<algorithm> #define ll long long using namespace std; int read(){ int s=0,t=1;char c; while(!isdigit(c=getchar()))if(c=='-')t=-1; do{s=s*10+c-'0';}while(isdigit(c=getchar())); return s*t; } const int maxn=5010; int n,m,a[210][maxn],f[210][maxn],s[maxn],w[maxn]; ll A[maxn],...
a.cc: In function 'int read()': a.cc:8:16: error: 'isdigit' was not declared in this scope 8 | while(!isdigit(c=getchar()))if(c=='-')t=-1; | ^~~~~~~ a.cc:9:32: error: 'isdigit' was not declared in this scope 9 | do{s=s*10+c-'0';}while(isdigit(c=getchar())); | ...
s618324366
p03833
C++
#include <bits/stdc++.h> #define show(x) cerr << #x << " = " << x << endl using namespace std; using ll = long long; template <typename T> constexpr T INF = numeric_limits<T>::max() / 10; using P = pair<ll, int>; struct Max { using T = P; T operator()(const T& a, const T& b) const { return max(a, b); } stat...
a.cc: In function 'int main()': a.cc:2:37: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<std::vector<long long int> >') 2 | #define show(x) cerr << #x << " = " << x << endl | ~~~~~~~~~~~~~~~~~~~ ^~ | | | ...
s396877036
p03833
C++
#include<cmath> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int MAXN = 5005; const int MAXM = 205; int a[MAXN][MAXM], suf[MAXN][MAXM], c[MAXM]; int n, m, i, j, k, LG[MAXN]; long long tot, ans, d[MAXN]; inline int get() { char c; while ((c = getchar()) < 48 || c...
a.cc: In function 'int main()': a.cc:31:42: error: 'f' was not declared in this scope 31 | a[i][j] = get(), f[] | ^ a.cc:31:44: error: expected primary-expression before ']' token 31 | a[i][j] = get(), f[] | ...
s660344301
p03833
C++
#include <bits/stdc++.h> typedef long long ll; const ll maxn = 5e3 + 1e2; const ll maxk = 205; ll val[maxk][maxn]; ll v[maxn]; ll best[maxk]; int main(){ ll n, k; std::cin >> n >> k; for(ll i = 1; i < n; i++){ std::cin >> v[i]; } for(ll i = 0; i < n; i++){ for(ll j = 0; j < k; j++){ std::cin >> val[j][...
a.cc: In function 'int main()': a.cc:30:28: error: 'j' was not declared in this scope 30 | if(j != i){ | ^ a.cc:35:63: error: 'j' was not declared in this scope 35 | if(best[curr_k] < val[curr_k][j]){ | ...
s985345160
p03833
C++
#include<bits/stdc++.h> #define myp pair<int,int> #define ll long long using namespace std; const int N=5010,M=210; int n,m,maxp,pow2[16]; int d[N][M]; ll dis[N],a[N][N],ans=0; myp st[M][N<<1][16]; myp que(int l,int r,int k){ int p=log2(r-l+1); return st[k][l][p].first>st[k][r-pow2[p]+1][p].first?st[k][l][p]:st[k][r-...
a.cc: In function 'int main()': a.cc:55:45: error: 'sum_dis' was not declared in this scope 55 | ans=max(ans,a[i][j]-sum_dis[j]+sum_dis[i-1]); | ^~~~~~~
s997440845
p03833
Java
//通ったことにする。糞問。 #include <cstdio> #include <algorithm> #define Rep(i, n) for (int i = 1; i <= n; i ++) #define Rep0(i, n) for (int i = 0; i <= n; i ++) #define RepG(i, x) for (int i = head[x]; i; i = edge[i].next) using namespace std; typedef long long LL; const int N = 5010; const int M = 210; int n, m, b[N]...
Main.java:3: error: illegal character: '#' #include <cstdio> ^ Main.java:4: error: illegal character: '#' #include <algorithm> ^ Main.java:6: error: illegal character: '#' #define Rep(i, n) for (int i = 1; i <= n; i ++) ^ Main.java:6: error: class, interface, enum, or record expected #define Rep(i, n) for (int i = 1; i...
s578560523
p03833
Java
//通ったことにする。糞問。 #include <cstdio> #include <algorithm> #define Rep(i, n) for (int i = 1; i <= n; i ++) #define Rep0(i, n) for (int i = 0; i <= n; i ++) #define RepG(i, x) for (int i = head[x]; i; i = edge[i].next) using namespace std; typedef long long LL; const int N = 5010; const int M = 210; int n, m, b[N]...
Main.java:3: error: illegal character: '#' #include <cstdio> ^ Main.java:4: error: illegal character: '#' #include <algorithm> ^ Main.java:6: error: illegal character: '#' #define Rep(i, n) for (int i = 1; i <= n; i ++) ^ Main.java:6: error: class, interface, enum, or record expected #define Rep(i, n) for (int i = 1; i...
s279254768
p03833
Java
//通ったことにする。糞問。 #include <cstdio> #include <algorithm> #define Rep(i, n) for (int i = 1; i <= n; i ++) #define Rep0(i, n) for (int i = 0; i <= n; i ++) #define RepG(i, x) for (int i = head[x]; i; i = edge[i].next) using namespace std; typedef long long LL; const int N = 5010; const int M = 210; int n, m, b[N]...
Main.java:3: error: illegal character: '#' #include <cstdio> ^ Main.java:4: error: illegal character: '#' #include <algorithm> ^ Main.java:6: error: illegal character: '#' #define Rep(i, n) for (int i = 1; i <= n; i ++) ^ Main.java:6: error: class, interface, enum, or record expected #define Rep(i, n) for (int i = 1; i...
s577671986
p03833
Java
//通ったことにする。糞問。 #include <cstdio> #include <algorithm> #define Rep(i, n) for (int i = 1; i <= n; i ++) #define Rep0(i, n) for (int i = 0; i <= n; i ++) #define RepG(i, x) for (int i = head[x]; i; i = edge[i].next) using namespace std; typedef long long LL; const int N = 5010; const int M = 210; int n, m, b[N]...
Main.java:3: error: illegal character: '#' #include <cstdio> ^ Main.java:4: error: illegal character: '#' #include <algorithm> ^ Main.java:6: error: illegal character: '#' #define Rep(i, n) for (int i = 1; i <= n; i ++) ^ Main.java:6: error: class, interface, enum, or record expected #define Rep(i, n) for (int i = 1; i...
s091063074
p03833
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <cstring> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <list> #include <algorithm> #include <functional> #include <sstream> #include...
a.cc: In constructor 'rmq_tree<T, Comp>::rmq_tree(size_t)': a.cc:80:63: error: expected ')' before '::' token 80 | rmq_tree(size_t size_) : segtree_base<T>(size_, Comp()::defval) | ^~ a.cc:80:49: note: to match this '(' 80 | rmq_t...
s633933622
p03833
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <cstring> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <list> #include <algorithm> #include <functional> #include <sstream> #include...
a.cc:34:8: error: 'my_greater' is not a class template 34 | struct my_greater<P> : std::greater<P> | ^~~~~~~~~~ a.cc:35:1: error: explicit specialization of non-template 'my_greater' 35 | { | ^ a.cc:115:8: error: 'my_greater' is not a template 115 | struct my_greater : std::greater<T> |...
s892860989
p03833
C++
#include <algorithm> #include <cassert> #include <iostream> #include <vector> #include <cstdio> #include <complex> #include <cstring> using namespace std; typedef long long LL; const int N = 5000 + 5; const int M = 200 + 5; const int INF = 1000000000 + 5; int n, m; int x[N]; int a[M]; LL tag[N << 2]; LL maxv[N ...
a.cc: In function 'void solve()': a.cc:91:36: error: 'j' was not declared in this scope 91 | modify(1, 0, n - 1, st[j].back().second + 1, i, a[j]); | ^ a.cc:95:13: error: 'i' was not declared in this scope 95 | if (i > 0) { | ^ a.cc:98...
s304249722
p03833
C++
#include <algorithm> #include <cassert> #include <iostream> #include <vector> #include <cstdio> #include <complex> #include <cstring> using namespace std; typedef long long LL; const int N = 5000 + 5; const int M = 200 + 5; const int INF = 1000000000 + 5; int n, m; int x[N]; int a[M]; LL tag[N << 2]; LL maxv[N ...
a.cc: In function 'void solve()': a.cc:89:19: error: 'else' without a previous 'if' 89 | } else { | ^~~~ a.cc:93:36: error: 'j' was not declared in this scope 93 | modify(1, 0, n - 1, st[j].back().second + 1, i, a[j]); | ...
s371772368
p03833
Java
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; static void solve() { int n = ...
Main.java:96: error: cannot find symbol long[][] rets = new long[3][m+1]; ^ symbol: variable m location: class Main Main.java:98: error: cannot find symbol for(int i = 1;i <= m;i++){ ^ symbol: variable m location: class Main Main.java:99: error: can...
s316092928
p03833
C++
for( auto i : rnd ){ long long mx[200]={}; int id[200]={}; long long dist = 0; for(int j = i ; j < min(i+200,N) ; ){ for(int k = 0 ; k < M ; k++){ mx[k] = max(mx[k],B[j][k]); } long long sub = 0; for(int k = 0 ; k < M ; k++){ sub += mx[k]; } ans = max(sub-dist,a...
a.cc:1:1: error: expected unqualified-id before 'for' 1 | for( auto i : rnd ){ | ^~~
s068628490
p03833
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 5e3 + 1; int n, m; int d[N]; int a[N]; int c[N][N]; ll f(int s) { for (int i = 0; i < m; i++) { d[i] = 0; } ll sum = 0; ll res = 0; for (int i = s; i < n; i++) { ll t = 0; for (int c...
a.cc: In function 'int main()': a.cc:60:26: error: 'i' was not declared in this scope; did you mean 'it'? 60 | ans = max(ans, f(i)); | ^ | it
s891759178
p03833
C++
#include <bits/stdc++.h> #define N (1<<13) #define ll long long #define M 1000000007 #define INF 1000000007 #define pii pair<int, int> #define pb push_back #define F first #define S second #define L length() - 1 using namespace std; ll a[200][2 * N][13]; ll d[5000]; ínt x[5000]; inline ll query (const int k, const ...
a.cc:17:1: error: '\U000000ednt' does not name a type 17 | ínt x[5000]; | ^~~ a.cc: In function 'long long int query(int, int, int)': a.cc:20:17: error: 'x' was not declared in this scope 20 | int l = x[j - i + 1]; | ^ a.cc: In function 'int main()': a.cc:31:17: error: 'x' was ...
s379255454
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; s[5]=’ ’,s[13]=’ ’; for (int i = 0; i < s.size(); i++) { if ( s.at(i) == ',' ) { s.at(i) = ' '; } } cout << s << endl; } #include <bits/stdc++.h> using namespace std; int main() { stri...
a.cc:10:8: error: extended character ’ is not valid in an identifier 10 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:10:10: error: extended character ’ is not valid in an identifier 10 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:10:18: error: extended character ’ is not valid in an identifier 10 | s[5]=...
s520547852
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; s[5]=’ ’,s[13]=’ ’; for (int i = 0; i < s.size(); i++) { if ( s.at(i) == ',' ) { s.at(i) = ' '; } } cout << s << endl; }
a.cc:10:8: error: extended character ’ is not valid in an identifier 10 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:10:10: error: extended character ’ is not valid in an identifier 10 | s[5]=’ ’,s[13]=’ ’; | ^ a.cc:10:18: error: extended character ’ is not valid in an identifier 10 | s[5]=...
s653680689
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < s.size(); i++) { if ( s.at(i) == "," ) { s.at(i) = " "; } } cout << s << endl; }
a.cc: In function 'int main()': a.cc:11:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if ( s.at(i) == "," ) { | ~~~~~~~~^~~~~~ a.cc:12:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type'...
s696153541
p03834
C++
s = list(input()) s[5] = ' ' s[13] = ' ' print(''.join(s))
a.cc:5:7: error: empty character constant 5 | print(''.join(s)) | ^~ a.cc:1:1: error: 's' does not name a type 1 | s = list(input()) | ^
s849306468
p03834
C++
#include <bits/stdc++.h> using namespace std; string a; int main () { cin >> a; a[5]=' '; a[13]=' '; cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:11: error: 's' was not declared in this scope 10 | cout << s << endl; | ^
s088491887
p03834
C++
#include<stdio.h> #include<string.h> int main() { char s[25]; scanf("%s",&s); s[5]=" "; s[13]=" "; printf("%s",s); }
a.cc: In function 'int main()': a.cc:7:10: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 7 | s[5]=" "; | ^~~ | | | const char* a.cc:8:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | s[13]=" "; | ...
s308395505
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; getline(cin, s); for(i : s){ if(i==',') i=' '; } cout << s; }
a.cc: In function 'int main()': a.cc:8:15: error: found ':' in nested-name-specifier, expected '::' 8 | for(i : s){ | ^ | :: a.cc:8:13: error: 'i' has not been declared 8 | for(i : s){ | ^ a.cc:13:1: error: expected primary-expression bef...
s744780602
p03834
C++
#include <iostream> #include <string> using namespace std; int main() { string s, a, b, c; cin >> s; for (int i = 0; i < 6; i++) a[i] = s[i]; for (int i = 6; i < 14; i++) for (int j = 0; j < 8; j++) b[j] = s[i]; for (int i = 14; i < 19; i++) for (int k = 0; k < 5; k++) c[k] = s[i]; cout << a[i] << b[j...
a.cc: In function 'int main()': a.cc:16:19: error: 'i' was not declared in this scope 16 | cout << a[i] << b[j] << c[k] << "\n"; | ^ a.cc:16:27: error: 'j' was not declared in this scope 16 | cout << a[i] << b[j] << c[k] << "\n"; | ^ a.cc:16:...
s594894806
p03834
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a; cin>>a; for(int i=0;i<19;i++){ if(a,at(i)==',') a,at(i)=' '; } cout<<a; return 0; }
a.cc: In function 'int main()': a.cc:10:10: error: 'at' was not declared in this scope; did you mean 'a'? 10 | if(a,at(i)==',') | ^~ | a
s899507083
p03834
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string s; cin >> s; s.replace(5, 1, " ") s.replace(13, 1, " ") cout << s << "\n"; }
a.cc: In function 'int main()': a.cc:8:29: error: expected ';' before 's' 8 | s.replace(5, 1, " ") | ^ | ; 9 | s.replace(13, 1, " ") | ~
s128317839
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; S.at(5) = ' '; S.at(13) = ' ' cout << S << endl; }
a.cc: In function 'int main()': a.cc:8:19: error: expected ';' before 'cout' 8 | S.at(13) = ' ' | ^ | ; 9 | cout << S << endl; | ~~~~
s857353799
p03834
C++
#include <iostream> #include<String> using namespace std; int main() { char s[19]; for(int i=0;i<19;i++) { cin>>s[i]; if(s[i]==',') { s[i]=' '; } } for(int j=0;j<19;j++) { cout<<s[j]; } return 0; }
a.cc:2:9: fatal error: String: No such file or directory 2 | #include<String> | ^~~~~~~~ compilation terminated.
s663666462
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s = "s1,s2,s3"; cout<<s1<<s2<<s3<<endl; }
a.cc: In function 'int main()': a.cc:5:8: error: 's1' was not declared in this scope; did you mean 's'? 5 | cout<<s1<<s2<<s3<<endl; | ^~ | s a.cc:5:12: error: 's2' was not declared in this scope; did you mean 's'? 5 | cout<<s1<<s2<<s3<<endl; | ^~ | s...
s047281994
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<char> s(19); for (int i = 0; i < 19; i++) { cin >> s.at(i); if (s.at(i) == ',') s.at(i) = ' '; if (i + 1 == 19) { cout << s.at(i) << endl; } else { cout << s.at(i); ...
a.cc: In function 'int main()': a.cc:15:10: error: expected '}' at end of input 15 | } | ^ a.cc:6:34: note: to match this '{' 6 | for (int i = 0; i < 19; i++) { | ^ a.cc:15:10: error: expected '}' at end of input 15 | } | ...
s938721853
p03834
C++
#include <iostream> using namespace std; int main() { string s; cin>>s; s[5]=" "; s[13]=" "; cout<<s; }
a.cc: In function 'int main()': a.cc:7:14: 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:15: error: invalid ...
s614635897
p03834
C++
#include <iostream> using namespace std; int main() { string S; cin >> S; for (int i = 0; i < S.length() - 1; i ++){ if (S[i] == ","){ S[i] == " "; } } cout << S << '\n'; }
a.cc: In function 'int main()': a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if (S[i] == ","){ a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | S[i] == " ";
s070087511
p03834
C++
print(input().replace(',',' '));
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input().replace(',',' ')); | ^
s588112587
p03834
C++
print(input().replace(',',' '))
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input().replace(',',' ')) | ^
s362331983
p03834
C++
#include<iostream> using namespace std; int main(){ string a, b, c; while(cin >> a >> ',' >> b >> ',' >> c){ cout << a << " " << b << " " << c; } }
a.cc: In function 'int main()': a.cc:5:18: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and 'char') 5 | while(cin >> a >> ',' >> b >> ',' >> c){ | ~~~~~~~~ ^~ ~~~ | | | | | char | std::basic_istream<c...
s019665739
p03834
C
#include<iostream> using namespace std; int main(){ string a, b, c; cout << a << " " << b << " " << c; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s710131246
p03834
C++
#include <bits/stdc++.h> 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:7:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | A[5] = " "; | ^~~ | | | const char* a.cc:8:11: error: invalid conversion from ...
s327292646
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; s[6] = s[14] = " "; cout << s; }
a.cc: In function 'int main()': a.cc:6:18: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 6 | s[6] = s[14] = " "; | ^~~ | | | const char*
s978169974
p03834
C++
#include<bits/stdc++.h> using namespace std; int main { string s; cin>>s; s[5]=' '; s[13]=' '; cout<<s<<endl; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main | ^~~~ a.cc:5:16: error: expected primary-expression before 's' 5 | string s; | ^ a.cc:5:16: error: expected '}' before 's' a.cc:4:1: note: to match this '{' 4 | { | ^ a.cc:6:5: error: ...
s734696293
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; s.at(5)==" "; s.at(13)==" "; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:6:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | s.at(5)==" "; | ~~~~~~~^~~~~ a.cc:7:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | s.at(13)==" "; | ~~~~~~~~^~~~~
s066580535
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; s.at(5)==" "; s.at(13)==" "; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:5:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 5 | s.at(5)==" "; | ~~~~~~~^~~~~ a.cc:6:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | s.at(13)==" "; | ~~~~~~~~^~~~~
s542430935
p03834
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define mod 1000000007 int main(){ string s; vector<string> ans; string temp=""; for(int i-0;i<s.length();i++){ if(i==','){ ans.push_back(temp); temp=""; }else{ temp=temp+s[i]; } } for(int i=0;i<ans.si...
a.cc: In function 'int main()': a.cc:14:12: error: expected ';' before '-' token 14 | for(int i-0;i<s.length();i++){ | ^ | ; a.cc:14:27: error: expected ')' before ';' token 14 | for(int i-0;i<s.length();i++){ | ~ ^ | ...
s999839997
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s ; s.at(6) =" "; s.at(14)=" "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:7:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s.at(6) =" "; | ^~~ | | | const char* a.cc:8:14: error: invalid conversi...
s178715799
p03834
C++
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define rep(i, from, to) for (int i = from; i < (to); ++i) #define mp(x,y) make_pair(x,y) #define all(x) (x).begin(),(x).end() #define pb push_back using ll = long long; using vin=vector<int>; using vll=vector<ll>; using vst=vector<string>; using P = ...
a.cc: In function 'int main()': a.cc:28:31: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 28 | if(s[i]=='.')s[i]=" "; | ^~~ | | |...
s833085996
p03834
C++
#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; for(int i = 0; i<s.size(); i++) { cout<<s[i]; if(s[i]==",") { cout<<" "; } } return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(s[i]==",")
s634841019
p03834
C++
#include<bits/stdc++.h> using namespace std; int main(){ stirng s; cin >> s; for(int i=0;i<s.size();i++){ if(s[i]==','){ s[i]=' '; } } cout << s; }
a.cc: In function 'int main()': a.cc:4:3: error: 'stirng' was not declared in this scope 4 | stirng s; | ^~~~~~ a.cc:5:10: error: 's' was not declared in this scope 5 | cin >> s; | ^
s180688847
p03834
C++
#include <stdio.h> int main () { char str [25]; scanf ("%s", str);'' str [5] = ' '; str [13] = ' '; printf("%s\n", str); return 0; }
a.cc:5:27: error: empty character constant 5 | scanf ("%s", str);'' | ^~ a.cc: In function 'int main()': a.cc:5:29: error: expected ';' before 'str' 5 | scanf ("%s", str);'' | ^ | ; 6 | 7...
s285576256
p03834
C++
#include <stdio.h> int main (){ char str [25] scanf ("%s", str) str [5] = ' '; str [13] = ' '; printf("%s\n", str); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: expected initializer before 'scanf' 5 | scanf ("%s", str) | ^~~~~ a.cc:8:9: error: 'str' was not declared in this scope; did you mean 'std'? 8 | str [13] = ' '; | ^~~ | std
s597832262
p03834
C++
#include <stdio.h> #include <string.h> int main(){ char str[25]; scanf("%s", &str); str[5] = ' ' str[13] = ' '; printf("%s", str); return 0; }
a.cc: In function 'int main()': a.cc:8:21: error: expected ';' before 'str' 8 | str[5] = ' ' | ^ | ; 9 | str[13] = ' '; | ~~~
s223548400
p03834
C++
#include <stdio.h> #include <string.h> int main(){ char str[25]; scanf("%s", &str); str[5] = " "; str[13] = " "; printf("%s", str); return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | str[5] = " "; | ^~~ | | | const char* a.cc:9:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive] ...
s204888383
p03834
C++
#include<stdio.h> #include<string.h> int main() { char str[20] int i; scanf("%[^\n]" ,str); for(int i = 0; i < 19 ; i++){ if(str[i] == ','){ printf("%c" , str[i]); } } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: expected initializer before 'int' 6 | int i; | ^~~ a.cc:7:25: error: 'str' was not declared in this scope; did you mean 'std'? 7 | scanf("%[^\n]" ,str); | ^~~ | std
s007533654
p03834
C++
int main() { char str[105] scanf("%s" ,str); for(int i = 0; i < strlen(str); i++){ if(str[i] == ',') { str[i] = " "; } } printf("%s" , str); return 0; }
a.cc: In function 'int main()': a.cc:4:5: error: expected initializer before 'scanf' 4 | scanf("%s" ,str); | ^~~~~ a.cc:6:31: error: 'str' was not declared in this scope; did you mean 'std'? 6 | for(int i = 0; i < strlen(str); i++){ | ^~~ | ...
s447258465
p03834
C++
#include<stdio.h> #include<string.h> int main() { char str[105] scanf("%s" ,str); char character = ' '; for(int i = 0; i < strlen(str); i++){ if(str[i] == ',') str[i] = character; } printf("%s" , str); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: expected initializer before 'scanf' 6 | scanf("%s" ,str); | ^~~~~ a.cc:9:35: error: 'str' was not declared in this scope; did you mean 'std'? 9 | for(int i = 0; i < strlen(str); i++){ | ^~~ ...
s961773232
p03834
C
#include <stdio.h> #include <string.h> int main(){ char string[20]; int i; scanf("%[^\n]", string); for(i = 0; i < 19; i++){ if(str[i] == ','){ printf(" "); }else{ printf("%c", string[i]); } } }
main.c: In function 'main': main.c:13:10: error: 'str' undeclared (first use in this function) 13 | if(str[i] == ','){ | ^~~ main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
s723582475
p03834
C++
#include <stdio.h> int main () { char arr[25]; scanf("%[^\n]", arr); for(int i = 0; arr[i] != '\0'; i++) { if(arr[i] == ',') { arr[i] = ' '; printf("%s\n", arr) } } return 0; }
a.cc: In function 'int main()': a.cc:11:44: error: expected ';' before '}' token 11 | printf("%s\n", arr) | ^ | ; 12 | } | ~
s606324029
p03834
C
#include <stdio.h> int main(){ char a[101]; scanf("%s",&a); for (int i=0;i<0;i++){ if(a[i]==','){ a[i]==''; } } printf("%s",a); puts(""); return 0; }
main.c: In function 'main': main.c:9:23: error: empty character constant 9 | a[i]==''; | ^~
s156969323
p03834
C++
#include <string.h> #include <stdio.h> int main (){ char input[101]; scanf ("%s",input); for (int i=0; i<strlen(input);i++){ if (input[i]== 'a'){ input[i]= " "; } } printf(input); printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:9:35: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 9 | input[i]= " "; | ^~~ | | | const char*
s946342416
p03834
C++
a = input() for i in a: if (i != ','): print(i, end = "") else: print(end=" ") print("");
a.cc:1:1: error: 'a' does not name a type 1 | a = input() | ^
s416943610
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ #include <bits/stdc++.h> typedef long long int ll; using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); string st; cin >> st; string c = ""; for(ll i=0; st[i]; i++){ if(st[i] != ',') c += st[i]; else{ c...
a.cc: In function 'int main()': a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 9 | int main(){ | ^~ a.cc:9:9: note: remove parentheses to default-initialize a variable 9 | int main(){ | ^~ | -- a.cc:9:9: note: or repla...
s647477133
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 19; i++){ if(s.at.(i) == ','){ s.at(i) = ' '; } } cout << s << endl; }
a.cc: In function 'int main()': a.cc:8:10: error: invalid use of member function 'std::__cxx11::basic_string<char>::at' (did you forget the '()' ?) 8 | if(s.at.(i) == ','){ | ~~^~
s057950237
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string = s; cin >> s; for (int i = 0; i < 19; i++){ if(s.at.(i) == ','){ s.at(i) = ' '; } } cout << s << endl; }
a.cc: In function 'int main()': a.cc:5:10: error: expected unqualified-id before '=' token 5 | string = s; | ^ a.cc:6:10: error: 's' was not declared in this scope 6 | cin >> s; | ^ a.cc:8:13: error: expected unqualified-id before '(' token 8 | if(s.at.(i) == ','){ ...
s380286396
p03834
C++
#include <bits/stdc++.h> using namespace std; int main() { string = s; cin >> s; for (int i = 0; i < 19; i++){ if(s.at.(i) == ','){ s.at(i) = ' '; } } cout << s << endl; }
a.cc: In function 'int main()': a.cc:5:10: error: expected unqualified-id before '=' token 5 | string = s; | ^ a.cc:6:10: error: 's' was not declared in this scope 6 | cin >> s; | ^ a.cc:8:13: error: expected unqualified-id before '(' token 8 | if(s.at.(i) == ','){ ...
s354725989
p03834
C
#include <stdio.h> int main(void){ char s[20]; scanf("%s", s); for(int i=0; i<=19; i++){ if (s[i] == ','){ printf("%c",' '; }else{ printf(s[i]); } } return 0; }
main.c: In function 'main': main.c:8:22: error: expected ')' before ';' token 8 | printf("%c",' '; | ~ ^ | ) main.c:8:23: error: expected ';' before '}' token 8 | printf("%c",' '; | ^ | ; ...
s161842012
p03834
C
#include <stdio.h> int main(void){ char s[20]; scanf("%s", s); for(int i=0; i<=19; i++){ if (s[i] == ','){ printf = ' '; }else{ printf(s[i]); } } return 0; }
main.c: In function 'main': main.c:8:14: error: lvalue required as left operand of assignment 8 | printf = ' '; | ^ main.c:10:15: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion] 10 | printf(s[i]); | ~^~~ | ...
s889164508
p03834
C
#include <stdio.h> int main(void){ char s[19]; scanf("%s", s); for(int i=0, i<=19, i++){ if (s[i] == ','){ printf = ' '; }else{ printf(s[i]); } } return 0; }
main.c: In function 'main': main.c:6:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token 6 | for(int i=0, i<=19, i++){ | ^~ main.c:13:3: error: expected expression before 'return' 13 | return 0; | ^~~~~~ main.c:14:1: error: expected expression before '}...
s298418079
p03834
C++
program prob1 implicit none character(19) :: s, t, u, v read(*,*) s, t, u v = trim(adjustl(s)) // ' ' // trim(adjustl(t)) // ' ' // trim(adjustl(u)) write(*,'(a)') v stop contains end program prob1
a.cc:6:13: warning: multi-character character constant [-Wmultichar] 6 | write(*,'(a)') v | ^~~~~ a.cc:1:1: error: 'program' does not name a type 1 | program prob1 | ^~~~~~~
s516518363
p03834
C++
#include <bits/stdc++.h> #include <vector> #include <algorithm> #include <iostream> using namespace std; int main() { string s; cin >> s; s.at(5)=" "; s.at(12)=" "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | s.at(5)=" "; | ^~~ | | | const char* a.cc:11:12: error: invalid conversion...
s359745999
p03834
C++
#include<stdio.h> int main() { int i; char st[25]; gets(st); st[5]=' '; st[13]=' '; printf("%s\n",st); 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(st); | ^~~~ | getw
s021402372
p03834
Java
import java.util.*; public 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:7: error: ')' or ',' expected System.out.println(s.replace(",", " "); ^ 1 error
s939541798
p03834
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s[] = sc.next().split(","); System.out.println(s.join(" ")); } }
Main.java:7: error: cannot find symbol System.out.println(s.join(" ")); ^ symbol: method join(String) location: variable s of type String[] 1 error
s862060471
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:8: error: extended character ’ is not valid in an identifier 7 | S[5]= ’ ’,S[13]=’ ’; | ^ a.cc:7:10: error: extended character ’ is not valid in an identifier 7 | S[5]= ’ ’,S[13]=’ ’; | ^ a.cc:7:18: error: extended character ’ is not valid in an identifier 7 | S[5]= ’ ’...
s824217662
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; S[5] == " "; S[13] == " "; S[19] == " "; cout << S << endl; }
a.cc: In function 'int main()': a.cc:7:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | S[5] == " "; S[13] == " "; S[19] == " "; a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | S[5] == " "; S[13] == " "; S[19] == " "; a.cc:7:36: ...
s158738314
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(void){ string s; cin >> s; int len = s.size(); for(int i=0;i<s;i++){ if(s[i] == ',') s[i] = ' '; cout << s[i]; } cout <<endl; }
a.cc: In function 'int main()': a.cc:9:16: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | for(int i=0;i<s;i++){ | ~^~ | | | | | std::string {aka std::__cxx11::basic_string<char>} ...
s286900444
p03834
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { string s; cin >> s; rep(i,s.size()){ if(s[i] == ",") cout << " " << endl; else cout ...
a.cc: In function 'int main()': a.cc:13:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if(s[i] == ",") cout << " " << endl;
s943635235
p03834
C++
#include <bits/stdc++.h> #include <math.h> #define _GLIBCXX_DEBUG using namespace std; int main() { string S;cin>>S; S[5]=" "; S[13]=" "; cout<<S<<endl; }
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...
s208211334
p03834
C++
string s; cout<<"Enter your string"<<endl;; cin>>s; s[5]=' '; s[13]=' '; cout<<s;
a.cc:1:2: error: 'string' does not name a type 1 | string s; | ^~~~~~ a.cc:2:5: error: 'cout' does not name a type 2 | cout<<"Enter your string"<<endl;; | ^~~~ a.cc:3:3: error: 'cin' does not name a type 3 | cin>>s; | ^~~ a.cc:4:3: error: 's' does not name a type 4 | s[...
s427652874
p03834
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s.at(6)=" "; s.at(14)=" "; cout << s << endl; }
a.cc: In function 'int main()': a.cc:7:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 7 | s.at(6)=" "; | ^~~ | | | const char* a.cc:8:12: error: invalid conversion f...
s356781229
p03834
C++
#include<iostream> #include<string> using namespace std; int main() { string s; cin>>s; for(i=0;i<s.length();i++) { if(s[i]==',') s[i]=' '; } cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | for(i=0;i<s.length();i++) | ^
s324376308
p03834
C++
// #pragma GCC target("avx2") #pragma GCC optimize("O3", "unroll-loops") // #include <bits/extc++.h> // using namespace __gnu_pbds; #include <bits/stdc++.h> using namespace std; #define int long long #define double long double // template <typename T> // using pbds_set = tree<T, null_type, less<T>, rb_tree_tag, tree...
a.cc: In function 'int32_t main()': a.cc:40:26: error: no matching function for call to 'regex_replace(std::string&, const char [2], const char [2])' 40 | cout << regex_replace(s, ",", " ") << "\n"; | ~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/regex:68, ...