submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s456383944
p03854
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string ss{"dream","dreamer","erase","eraser"}; for (auto& s:ss) reverse(s.begin(),s.end()); string s;cin>>s; reverse(s.begin(),s.end()); for (int i=0;i<s.size();) { int f=1; for (auto t:ss) ...
a.cc: In function 'int main()': a.cc:6:49: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(<brace-enclosed initializer list>)' 6 | string ss{"dream","dreamer","erase","eraser"}; | ^ In file included from /usr/include/c...
s009832268
p03854
C++
#include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; typedef long long ll; const int MOD=1000000007; const int INF=0x3f3f3f3f; const ll INFL=0x3f3f3f3f3f3f3f3f; int main(){ //input cin.tie(nullptr); ios::sync_with_stdio(false); scanf("%s",s); reverse(s.begin(),s.end())...
a.cc: In function 'int main()': a.cc:15:14: error: 's' was not declared in this scope 15 | scanf("%s",s); | ^
s746741472
p03854
C++
#include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; typedef long long ll; const int MOD=1000000007; const int INF=0x3f3f3f3f; const ll INFL=0x3f3f3f3f3f3f3f3f; int main(){ //input cin.tie(nullptr); ios::sync_with_stdio(false); scanf("s%",s); reverse(s.begin(),s.end())...
a.cc: In function 'int main()': a.cc:15:14: error: 's' was not declared in this scope 15 | scanf("s%",s); | ^
s777217217
p03854
C++
#include <iostream> #include <string> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main() { string S; cin >> S; reverse(S.begin(), S.end()); for(int i = 0; i < 4; ++i) reverse(divide[i].begin(), divide[i].end()); bool can = true; for(int i = 0;...
a.cc: In function 'int main()': a.cc:11:5: error: 'reverse' was not declared in this scope 11 | reverse(S.begin(), S.end()); | ^~~~~~~
s113465016
p03854
C++
#include <string> #include <algorithm> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main() { string S; cin >> S; reverse(S.begin(), S.end()); for(int i = 0; i < 4; ++i) reverse(divide[i].begin(), divide[i].end()); bool can = true; for(int i = 0...
a.cc: In function 'int main()': a.cc:9:5: error: 'cin' was not declared in this scope 9 | cin >> S; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <algorithm> +++ |+#include <iostream> 3 | using namesp...
s868672524
p03854
C++
#include <iostream> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main() { string S; cin >> S; reverse(S.begin(),S.end()); for(int i=0;i<4;++i) reverse(divide[i].begin(), divide[i].end()); bool can = true; for(int i =0 ; i < S.size() ; ++i){ bool can2 =...
a.cc: In function 'int main()': a.cc:11:3: error: 'reverse' was not declared in this scope 11 | reverse(S.begin(),S.end()); | ^~~~~~~
s547443585
p03854
C++
#include<algorithm>//sort(all(変数),greater<型名>()) で降順に #include<cmath>//切り上げceil(値) #include<deque> #include<iomanip>//setprecision(数字) #include<iostream> #include<list> #include<map> #include<numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd #include<queue> #include<set> #include<stack> #include<string> #include<ve...
a.cc: In function 'int main()': a.cc:23:20: error: request for member 'begin' in 't', which is of non-class type 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'} 23 | #define all(x) (x).begin(),(x).end() | ^~~~~ a.cc:33:13: note: in expansion of macro 'all' 33 | reverse(...
s569644214
p03854
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String s=sc.next(); boolean isOK=false; sc.close(); while(s!=null){ cut(s); if(s="wrong"){ System.out.println("NO"); return; } } System.out.pr...
Main.java:10: error: incompatible types: String cannot be converted to boolean if(s="wrong"){ ^ 1 error
s477537214
p03854
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String s=sc.next(); boolean isOK=false; sc.close(); while(s!=null){ cut(s); if(s="wrong"){ System.out.println("NO"); return; } } System.out.pr...
Main.java:10: error: incompatible types: String cannot be converted to boolean if(s="wrong"){ ^ 1 error
s004585105
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string divide[4]={"dream","deramer","erase","eraser"}; int main(){ string S;cin>>S; reverse(S.begin(),S.end()); for (int i=0;i<4;++i){ reverse(divide[i].begin(),divide[i].end()); } bool can =ture; for (int i=0;i<S.size();)...
a.cc: In function 'int main()': a.cc:14:13: error: 'ture' was not declared in this scope 14 | bool can =ture; | ^~~~ a.cc:24:9: error: 'cans' was not declared in this scope; did you mean 'can2'? 24 | if(!cans){ | ^~~~ | can2
s160392301
p03854
C++
#include<bits/stdc++.h> using namespace std; char s[10000000000]; int lo; bool flag=false; int main() { cin>>s; lo=strlen(s); if(lo<5) { cout<<"NO"; return 0; } if(s[lo-1]=='m') if(s[lo-2]=='a') if(s[lo-3]=='e') if(s[lo-4]=='r') if(s[lo-5]=='d') flag=tru...
/tmp/cct9ynZr.o: in function `main': a.cc:(.text+0x2e): relocation truncated to fit: R_X86_64_PC32 against symbol `lo' defined in .bss section in /tmp/cct9ynZr.o a.cc:(.text+0x34): relocation truncated to fit: R_X86_64_PC32 against symbol `lo' defined in .bss section in /tmp/cct9ynZr.o a.cc:(.text+0x62): relocation tru...
s814476686
p03854
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(),s.end()); int i=0; bool sw = true; while(i < s.size()){ if(s.size()-i < 5){ sw = false; break; } string t = s.substr(i,5); ...
a.cc: In function 'int main()': a.cc:9:5: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(),s.end()); | ^~~~~~~
s082233483
p03854
C++
// C - 白昼夢 / Daydream #include <bits/stdc++.h> using namespace std; int solve(); string S; vector<string> st = {"dream", "dreamer", "erase", "eraser"}; int main(){ cin >> S; solve(); } int solve(){ reverse(S.begin(), S.end()); for(int i = 0; i<4;i++){ reverse(st.at(i).begin(), st.at(i).end()); } b...
a.cc: In function 'int solve()': a.cc:23:28: error: expected ';' before ')' token 23 | for(int i = 0; i<S.size()){ | ^ | ; a.cc:41:1: warning: no return statement in function returning non-void [-Wreturn-type] 41 | } | ^
s616910308
p03854
C++
#include <bits/stdc++.h> using namespace std; int main(){ string divide[4] = {"dream", "dreamer", "erase", "eraser"}; string S; cin >> S; reverse(S.begin(), S.end()); for(int i = 0; i < 4; ++i) reverse(divide[i].begin(), divide[i].end()); bool can = true; for(int i = 0; i < S.size();){ bool can2 =...
a.cc: In function 'int main()': a.cc:28:28: error: 'ednl' was not declared in this scope 28 | if(can) cout << "Yes" << ednl; | ^~~~
s359500011
p03854
C++
#include<bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define int long long #define vec(a,n) vector<int> (a)((n)); #define Vec(a,n) vector<string> (a)((n)); #define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0)); #define Twovec(a,n,m) vecto...
a.cc:19:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts' 19 | void Debug(auto a); | ^~~~ a.cc:20:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts' 20 | int nibul(auto a,auto b); | ...
s037024289
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string divide[4] ={"dream", "dreamer","erase","eraser"}; reverse(S.begin(),S.end()); for(int i=0; i < 4; i++){ reverse(divede[i].begin(),divide[i].end()); } bool can = true; for(int i = 0; i < S...
a.cc: In function 'int main()': a.cc:11:17: error: 'divede' was not declared in this scope; did you mean 'divide'? 11 | reverse(divede[i].begin(),divide[i].end()); | ^~~~~~ | divide
s429322861
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { String S; cin >> S; String divide[4] ={"dream", "dreamer","erase","eraser"}; reverse(S.begin(),S.end()); for(int i=0; i < 4; i++){ reverse(divede[i].begin(),divide[i].end()); } bool can = true; for(int i = 0; i < S...
a.cc: In function 'int main()': a.cc:5:5: error: 'String' was not declared in this scope 5 | String S; | ^~~~~~ a.cc:6:12: error: 'S' was not declared in this scope 6 | cin >> S; | ^ a.cc:7:11: error: expected ';' before 'divide' 7 | String divide[4] ={"dream", "dreame...
s167833546
p03854
C++
#include <iostream> using namespace std; int main(){ string S; cin >> S; string A[4] = {"dream", "dreamer", "erase", "eraser"}; int k = 0; bool a = true; bool b = false; reverse(S.begin(), S.end()); for(int i = 0; i < 4; i++){ reverse(A[i].begin(), A[i].end()); } for...
a.cc: In function 'int main()': a.cc:13:5: error: 'reverse' was not declared in this scope 13 | reverse(S.begin(), S.end()); | ^~~~~~~
s714180158
p03854
C++
#include <iostream> using namespace std; int main(){ string S; cin >> S; string A[4] = {"dream", "dreamer", "erase", "eraser"}; int k = 0; bool a = true; bool b = false; reverse(S.begin(), S.end()); for(int i = 0; i < 4; i++){ reverse(A[i].begin(), A[i].end()); } for...
a.cc: In function 'int main()': a.cc:13:5: error: 'reverse' was not declared in this scope 13 | reverse(S.begin(), S.end()); | ^~~~~~~
s962369498
p03854
C++
#include<bits/stdc++.h> using namespace std; string devide[4] = {"dream","dreamer","erase","eraser"}; int main(){ string S; cin >> S; reverse (S.begin(),S.end()); for(int i=0;i<4;++i){ reverse(divide[i].begin(),devide[i].end()); } bool can = true; for(int i=0;i<S.size());{ bool can2 =false...
a.cc: In function 'int main()': a.cc:12:13: error: 'divide' was not declared in this scope; did you mean 'devide'? 12 | reverse(divide[i].begin(),devide[i].end()); | ^~~~~~ | devide a.cc:16:25: error: expected ';' before ')' token 16 | for(int i=0;i<S.size());{ | ...
s057103555
p03854
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int i=0; char s[100001]={0}; int slong; char d[]="dream"; char dr[]="dreamer"; char e[]="erase"; char er[]="eraser"; scanf("%s",s); slong=strlen(s); while(1) { int hantei=i; if(!strncmp(s+i,d,5)) if(!strncmp(s+i,dr,7) &&...
a.cc: In function 'int main()': a.cc:18:15: error: 'strlen' was not declared in this scope 18 | slong=strlen(s); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#include <cstring> ...
s073363523
p03854
C++
#include<bits/stdc++.h> using namespace std; int main() { string s[] = {"dreamer","dream","eraser","erase"}; string t; cin>>t; int i=0; for(;i<t.size();) { bool flag = false; for(auto l:s) { if(i+l.length()>=t.size()) break; if(strcmp(t.substr(i,l.length()),l)==0) { ...
a.cc: In function 'int main()': a.cc:17:25: error: cannot convert 'std::__cxx11::basic_string<char>' to 'const char*' 17 | if(strcmp(t.substr(i,l.length()),l)==0) | ~~~~~~~~^~~~~~~~~~~~~~ | | | std::__cxx11::basic_string<char> In...
s328299281
p03854
C++
#include <iostream> #include <string> using namespace std; int main(){ string s[4] = { "dream", "dreamer", "erase", "eraser" }; for (int i = 0; i < 4; ++i){ std::reverse(s[i].begin(), s[i].end()); } string t; cin >> t; std::reverse(t.begin(), t.end()); int offset = 0; bool compare_flg = false; while (offse...
a.cc: In function 'int main()': a.cc:9:22: error: 'reverse' is not a member of 'std' 9 | std::reverse(s[i].begin(), s[i].end()); | ^~~~~~~ a.cc:13:14: error: 'reverse' is not a member of 'std' 13 | std::reverse(t.begin(), t.end()); | ^~~~~~~
s339997444
p03854
C++
#include <iostream> #include <string> using namespace std; int main(){ string s[4] = { "dream", "dreamer", "erase", "eraser" }; for (int i = 0; i < 4; ++i){ reverse(s[i].begin(), s[i].end()); } string t; cin >> t; reverse(t.begin(), t.end()); int offset = 0; bool compare_flg = false; while(offset < t.size(...
a.cc: In function 'int main()': a.cc:9:17: error: 'reverse' was not declared in this scope 9 | reverse(s[i].begin(), s[i].end()); | ^~~~~~~ a.cc:13:9: error: 'reverse' was not declared in this scope 13 | reverse(t.begin(), t.end()); | ^~~~~~~
s721049732
p03854
C++
#include <iostream> #include <string> using namespace std; int main(){ string s[4] = { "dream", "dreamer", "erase", "eraser" }; for (int i = 0; i < 4; ++i){ reverse(s[i].begin(), s[i].end()); } string t; cin >> t; reverse(t.begin(), t.end()); int offset = 0; bool compare_flg = false; while(offset < t.size(...
a.cc: In function 'int main()': a.cc:9:17: error: 'reverse' was not declared in this scope 9 | reverse(s[i].begin(), s[i].end()); | ^~~~~~~ a.cc:13:9: error: 'reverse' was not declared in this scope 13 | reverse(t.begin(), t.end()); | ^~~~~~~
s529650404
p03854
C++
function Main(input){ var S = input[0].toString(); var revS = S.split('').reverse().join(''); var divide = ['dream', 'dreamer', 'erase', 'eraser'].map(s => { return s.split('').reverse().join(''); }); var stringN = 0; while(stringN < revS.length){ var word = divide.find(w => { return ...
a.cc:4:22: error: empty character constant 4 | var revS = S.split('').reverse().join(''); | ^~ a.cc:4:41: error: empty character constant 4 | var revS = S.split('').reverse().join(''); | ^~ a.cc:5:17: warning: multi-character literal w...
s429310745
p03854
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; // Problem https://atcoder.jp/contests/abc049/tasks/arc065_a int main(void){ string S,answer; vector<string> strs(4); answer = "YES"; strs.at(0)="dream"; strs.at(1)="dreamer"; strs.at(2)="erase"; ...
a.cc: In function 'int main()': a.cc:30:18: error: initializer in range-based 'for' loop 30 | for(int k=0:k<4;k++){ | ^ a.cc:30:24: error: expected ')' before ';' token 30 | for(int k=0:k<4;k++){ | ~ ^ | ) a.cc:30:25: e...
s681779392
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); for (int i=0; i<4; i++) reverse(divide[i].begin(), divide[i].end()); bool can =true; for (int i=0; i<s.size;){ bool can2 = false; ...
a.cc: In function 'int main()': a.cc:14:21: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s963387255
p03854
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main() { char s[]; scanf("%s", s); string S = s; // 後ろから解くかわりにすべての文字列を「左右反転」する reverse(S.begin(), S.end()); for(int i = 0; i < 4; ++i) reverse(divide[i].begin(), ...
a.cc: In function 'int main()': a.cc:9:8: error: storage size of 's' isn't known 9 | char s[]; | ^
s300079595
p03854
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main() { char s; scanf("%s", s); string S = s; // 後ろから解くかわりにすべての文字列を「左右反転」する reverse(S.begin(), S.end()); for(int i = 0; i < 4; ++i) reverse(divide[i].begin(), di...
a.cc: In function 'int main()': a.cc:11:14: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 11 | string S = s; | ^
s571544665
p03854
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string d[4]={"dream","dreamer","erase","eraser"}; reverse(s.begin(),s.end()); for(int i = 0; i < 4; ++i) reverse(d[i].begin(),d[i].end()); bool can = true; for(int i = 0; i < s.size();){ bool anko = false; for(int j = 0; ...
a.cc: In function 'int main()': a.cc:14:31: error: could not convert 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int](((std::__cxx11::basic_string<char>::size_type...
s858939363
p03854
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string d[4]={"dream","dreamer","erase","eraser"}; reverse(s.begin(),s.end()); for(int i = 0; i < 4; ++i) reverse(d[i].begin(),d[i].end()); bool can = true; for(int i = 0; i < s.size();){ bool anko = false; for(int j = 0; ...
a.cc: In function 'int main()': a.cc:14:33: error: no match for 'operator=' (operand types are 'std::__cxx11::basic_string<char>' and 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'}) 14 | if(s.substr(i,t.size()) = d){ | ^ In file included from /usr/include/c...
s790572591
p03854
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string d[4]={"dream","dreamer","erase","eraser"}; reverse(s.begin(),s.end()); for(int i = 0; i < 4; ++i) reverse(d[i].begin(),d[i].end()); bool can = true; for(int i = 0; i < s.size();){ bool anko = false; for(int j = 0; ...
a.cc: In function 'int main()': a.cc:14:31: error: could not convert 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int](((std::__cxx11::basic_string<char>::size_type...
s518961376
p03854
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string d[4]={"dream","dreamer","erase","eraser"}; reverse(s.begin(),s.end()); for(int i = 0; i < 4; ++i) reverse(d[i].begin(),d[i].end()); bool can = true; for(int i = 0; i < s.size();){ bool anko = false; for(int j = 0; ...
a.cc: In function 'int main()': a.cc:14:33: error: no match for 'operator=' (operand types are 'std::__cxx11::basic_string<char>' and 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'}) 14 | if(s.substr(i,t.size()) = d){ | ^ In file included from /usr/include/c...
s795888716
p03854
C++
#include<bits/stdc++.h> using namespace std; template<typename T>inline void read(T &x){ register short f=1;x=0;char c=getchar(); while(!isdigit(c)){ if(c=='-')f=-1;c=getchar();} while(isdigit(c))x=(x<<3)+(x<<1)+(c^48),c=getchar(); x*=f; } template<typename T>inline void write(T x){ if(x<0)putchar('-'),x=-x; if(x...
a.cc: In function 'void read(T&)': a.cc:4:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 4 | register short f=1;x=0;char c=getchar(); | ^ a.cc: In function 'int main()': a.cc:24:92: error: expected primary-expression before 'break' 24 | ...
s904603399
p03854
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) REP(i, 0, n) #define all(x) (x).begin(), (x).end() typedef long long ll; typedef unsigned long long ull; const string YES = "YES", NO = "NO"; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; ...
a.cc: In function 'int main()': a.cc:36:34: error: no match for 'operator<<' (operand types are 'const std::string' {aka 'const std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>') 36 | cout << canDivide ? YES : NO << endl; | ~~~^~~~~~~ In file inclu...
s314331358
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4]={"dream","dreamer","erase","eraser"}; int main(){ string s; cin>>s; reverse(s.begin(),s.end()); for(int i=0;i<4;i++)reverse(divide[i].begin(),devide[i].end()); bool can = true; for(int i=0;i<s.size();){ bool can2=false; for(int j=0;...
a.cc: In function 'int main()': a.cc:9:49: error: 'devide' was not declared in this scope; did you mean 'divide'? 9 | for(int i=0;i<4;i++)reverse(divide[i].begin(),devide[i].end()); | ^~~~~~ | divide
s510720433
p03854
C++
#include <bits/stdc++.h> using namespace std; #define INF 1<<30 #define endl '\n' #define maxn 100005 #define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); typedef long long ll; const double PI = acos(-1.0); #define dbg(x) cerr << #x << " = " << x << endl; #define dbg2(x, y) cerr << #x << " = " << x...
a.cc:56:21: error: stray '#' in program 56 | if(!ok){#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:56:22: error: 'include' was not declared in this scope 56 | if(!ok){#include <bits/stdc++.h> | ^~~~~~~ a.cc:56:31: err...
s515304646
p03854
C++
#include <bits/stdc++.h> using namespace std; #define INF 1<<30 #define endl '\n' #define maxn 100005 #define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); typedef long long ll; const double PI = acos(-1.0); #define dbg(x) cerr << #x << " = " << x << endl; #define dbg2(x, y) cerr << #x << " = " << x...
a.cc:56:21: error: stray '#' in program 56 | if(!ok){#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:56:22: error: 'include' was not declared in this scope 56 | if(!ok){#include <bits/stdc++.h> | ^~~~~~~ a.cc:56:31: err...
s826523435
p03854
C++
#include <bits/stdc++.h> using namespace std; #define INF 1<<30 #define endl '\n' #define maxn 100005 #define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); typedef long long ll; const double PI = acos(-1.0); #define dbg(x) cerr << #x << " = " << x << endl; #define dbg2(x, y) cerr << #x << " = " << x...
a.cc:56:21: error: stray '#' in program 56 | if(!ok){#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:56:22: error: 'include' was not declared in this scope 56 | if(!ok){#include <bits/stdc++.h> | ^~~~~~~ a.cc:56:31: err...
s763041992
p03854
C
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) #define MOD 1e9+7 using namespace std; typedef long long ll; int main(){ string s; cin >> s; ll len = s.size() - 1; while (1){ if (len < 4) break; if (s.substr(len - 4, 5) == "dream" || s.substr(len - 4, 5) == "e...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s715202247
p03854
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; while }
a.cc: In function 'int main()': a.cc:8:1: error: expected '(' before '}' token 8 | } | ^ | ( a.cc:8:1: error: expected primary-expression before '}' token a.cc:7:8: error: expected ')' before '}' token 7 | while | ^ | ) 8 | } | ~ a.cc:8:1: error: expected...
s614803549
p03854
C++
#include <iostream> #include <string> using namespace std; int main() { string str[4] {"maerd","remaerd","esare","resare"}; string S; cin>>S; reverse(S.begin(), S.end()); bool a = true; for (int i=0;i<S.size();) { bool b=false; for (int j=0;j<4;j++) { string d = str[j]; if (S....
a.cc: In function 'int main()': a.cc:12:3: error: 'reverse' was not declared in this scope 12 | reverse(S.begin(), S.end()); | ^~~~~~~
s923783229
p03854
C++
#include <iostream> #include <string> using namespace std; int main() { string str[4] {"maerd","remaerd","esare","resare"}; string S; cin>>S; reverse(S.begin(),S.end()); bool a = true; for (int i=0;i<S.size;) { bool b=false; for (int j=0;j<4;j++) { string d = str[j]; if (S.sub...
a.cc: In function 'int main()': a.cc:12:3: error: 'reverse' was not declared in this scope 12 | reverse(S.begin(),S.end()); | ^~~~~~~ a.cc:15:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size()...
s246845288
p03854
C++
#include <iostream> #include <string> using namespace std; int main() { string str[4] {"maerd","remaerd","esare","resare"}; int S; cin>>S; reverse(S.begin(),S.end()); bool a = true; for (int i=0;i<S.size;) { bool b=false; for (int j=0;j<4;j++) { string d = str[j]; if (S.substr...
a.cc: In function 'int main()': a.cc:12:13: error: request for member 'begin' in 'S', which is of non-class type 'int' 12 | reverse(S.begin(),S.end()); | ^~~~~ a.cc:12:23: error: request for member 'end' in 'S', which is of non-class type 'int' 12 | reverse(S.begin(),S.end()); | ...
s840307484
p03854
C++
#include <iostream> using namespace std; int main() { string str[4] {"maerd","remaerd","esare","resare"}; int S; cin>>S; reverse(S.begin(),S.end()); bool a = true; for (int i=0;i<S.size;) { bool b=false; for (int j=0;j<4;j++) { string d = str[j]; if (S.substr(i,d.size())==d) {...
a.cc: In function 'int main()': a.cc:11:13: error: request for member 'begin' in 'S', which is of non-class type 'int' 11 | reverse(S.begin(),S.end()); | ^~~~~ a.cc:11:23: error: request for member 'end' in 'S', which is of non-class type 'int' 11 | reverse(S.begin(),S.end()); | ...
s916795411
p03854
C++
#include <iostream> using namespace std; int main() { string str(4) {"maerd","remaerd","esare","resare"}; int S; cin>>S; reverse(S.begin(),S.end()); bool a = true; for (int i=0;i<S.size;) { bool b=false; for (int j=0;j<4;j++) { string d = str[j]; if (S.substr(i,d.size())==d) {...
a.cc: In function 'int main()': a.cc:6:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 6 | string str(4) {"maerd","remaerd","esare","resare"}; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bi...
s095444662
p03854
C++
#include <iostream> #include <string> using namespace std; int main() { string str(4) {"maerd""remaerd""esare""resare"}; int S; cin>>S; reverse(S.begin(),S.end()); bool a = true; for (int i=0;i<S.size;) { bool b=false; for (int j=0;j<4;j++) { string d = str[j]; if (S.substr(i,...
a.cc: In function 'int main()': a.cc:7:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 7 | string str(4) {"maerd""remaerd""esare""resare"}; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/...
s592888214
p03854
C++
#include <iostream> using namespace std; int main() { string str(4) {"maerd""remaerd""esare""resare"}; int S; cin>>S; reverse(S.begin(),S.end()); bool a = true; for (int i=0;i<S.size;) { bool b=false; for (int j=0;j<4;j++) { string d = str[j]; if (S.substr(i,d.size())==d) { ...
a.cc: In function 'int main()': a.cc:6:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 6 | string str(4) {"maerd""remaerd""esare""resare"}; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/...
s260616320
p03854
C++
#include <iostream> using namespace std; int main() { vector<string> vec(4) {"maerd""remaerd""esare""resare"}; int S; cin>>S; reverse(S.begin(),S.end()); bool a = true; for (int i=0;i<S.size;) { bool b=false; for (int j=0;j<4;j++) { string d = vec.at(j); if (S.substr(i,d.size(...
a.cc: In function 'int main()': a.cc:6:3: error: 'vector' was not declared in this scope 6 | vector<string> vec(4) {"maerd""remaerd""esare""resare"}; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> ...
s682823069
p03854
C++
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(void){ // Your code here! string S; cin >> S; int tail = S.length(); for(int i = 0 ;i < S.length(); i++){ if(tail <= 0){ cout << "YES"; break; }else if(6 <= tail && S.subst...
a.cc:26:1: error: expected declaration before '}' token 26 | } | ^
s354155104
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main(){ string S; cin >> S; reverse(S.begin(),S.end()); for (int i = 0; i < 4; i++)reverse(divide[i].begin(),divide[i].end); bool can = true; for (int i = 0; i ...
a.cc: In function 'int main()': a.cc:13:37: error: no matching function for call to 'reverse(std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)' 13 | for (int i = 0; i < 4; i++)reverse(divide[i].begin(),divide[i].end); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~...
s461122546
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main(){ string S; cin >> S; reverse(S.begin(),S.end()); for (int i = 0; i < 4; i++)reverse(divide[i].begin(),devide[i].end); bool can = true; for (int i = 0; i ...
a.cc: In function 'int main()': a.cc:13:56: error: 'devide' was not declared in this scope; did you mean 'divide'? 13 | for (int i = 0; i < 4; i++)reverse(divide[i].begin(),devide[i].end); | ^~~~~~ | ...
s814841502
p03854
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; int endflg =0; int ookisa = S.size() for(int i=0;i<ookisa;i++){ if(S[i]=='d'){ if(S[i+1=='r']&&S[i+2=='e']&&S[i+3=='a']&&S[i+4=='m']){ if(S[i+5=='r']){ i+=5; }else{ i+=4; } }else{ endflg =1; b...
a.cc: In function 'int main()': a.cc:15:9: error: expected ',' or ';' before 'for' 15 | for(int i=0;i<ookisa;i++){ | ^~~ a.cc:15:21: error: 'i' was not declared in this scope 15 | for(int i=0;i<ookisa;i++){ | ^
s414433753
p03854
C++
#include<bits/stdc++.h> using namespace std; #define ll long long bool find_ans(string s,ll i,ll cnt){ if(i>=s.length()) return true; ll l=s.length(); if(l-i<5) return false; if(s[i]=='e'){ if(i+4<=l-1){ if(s[i+1]=='s' && s[i+2]=='a' && s[i+3]=='r' && s[i+4]=='e')return find_ans(s,...
a.cc: In function 'int main()': a.cc:40:5: error: 'IO' was not declared in this scope; did you mean 'EIO'? 40 | IO; | ^~ | EIO a.cc:46:12: error: 'dp' was not declared in this scope; did you mean 'dup'? 46 | memset(dp,-1,sizeof(dp)); | ^~ | dup
s697905799
p03854
C++
#include<bits/stdc++.h> using namespace std; #define all(a) (a).begin(),(a).end() typedef long long ll; ll mod=1000000007; bool isok=false; string s; vector<string> v{ "dream", "dreamer", "erase", "eraser"}; void rec(int pos){ if(pos==s.size()) isok=true; for(int i=0;i<4;++i){ auto newpos = s.find(v[i],pos,v[...
a.cc: In function 'void rec(int)': a.cc:13:25: error: no matching function for call to 'std::__cxx11::basic_string<char>::find(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&, int&, std::__cxx11::basic_string<char>::size_type)' 13 | aut...
s347166773
p03854
C++
#include<bits/stdc++.h> using namespace std; #define all(a) (a).begin(),(a).end() typedef long long ll; ll mod=1000000007; bool isok=false; string s; vector<string> v{ "dream", "dreamer", "erase", "eraser"}; void rec(){ if(s.size()==0) isok=true; for(int i=0;i<4;++i){ auto pos = s.find(v[i]); if(pos == 0)...
a.cc: In function 'void rec()': a.cc:16:11: error: 'sub' was not declared in this scope; did you mean 'fsub'? 16 | rec(sub); | ^~~ | fsub
s964151890
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { //input string S; cin >> S; //compute string ans; while(S.size() != 0){ int cnt = 0; if (S.substr(0, 5) == "dream" || S.substr(0, 5) == "erase") { S.erase(0, 5); cnt = 1; } if (S.substr(0, 6) == "eraser") { S.erase(0, 6); cnt = 1 }...
a.cc: In function 'int main()': a.cc:19:32: error: expected ';' before '}' token 19 | cnt = 1 | ^ | ; 20 | } | ~
s961390043
p03854
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; int n = s.size()-1; string ss; while(n>=0){ if(s[n-2] == 'e' && s[n-1] == 'a' && s[n] == 'm'){ if(n<4){ cout << "NO" << endl; return 0; } else{ for(int i = n-4;i<=n;i++){ ...
a.cc: In function 'int main()': a.cc:19:14: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"dream"))' from 'std::__cxx11::basic_string<char>' to 'bool' 19 | if(ss="dream"){ | ~~^~~~~~~~ | | | std::__cxx11::basic_st...
s793967553
p03854
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; int n = s.size()-1; string ss; while(n>=0){ if(s[n-2] == 'e' s[n-1] == 'a' s[n] == 'm'){ if(n<4){ cout << "NO" << endl; return 0; } else{ for(int i = n-4;i<=n;i++){ ...
a.cc: In function 'int main()': a.cc:10:21: error: expected ')' before 's' 10 | if(s[n-2] == 'e' s[n-1] == 'a' s[n] == 'm'){ | ~ ^~ | ) a.cc:19:14: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"dream"))' from 'std::__cxx1...
s196505287
p03854
C++
#include <iostream> #include <string> #include <cstdio> #include <cstring> #include <cmath> #include <vector> #include <algorithm> #include <cstdio> #include <queue> #define rep(i, n) for (int i = 0; i < (n); i++) #define int long long #define INF 1e9 + 7 #define cae cout << ans << endl; #define cye cout << "YES" << en...
a.cc: In function 'int main()': a.cc:48:2: error: expected '}' at end of input 48 | } | ^ a.cc:20:15: note: to match this '{' 20 | signed main() { | ^
s621954304
p03854
C++
#include<bits/stdc++.h> using namespace std; using lint = long long; using litn = lint; template<class T> using vec = vector<T>; #define FOR(i,a,b) for(int i=((int)(a));i<((int)(b));i++) #define REP(i,x) for(int i=0;i<(int)(x);i++) #define all(x) (x).begin(),(x).end() int main(){ string s; cin >>s; string d[4...
a.cc: In function 'int main()': a.cc:26:14: error: expected unqualified-id before 'do' 26 | string do = d[j] | ^~
s881169053
p03854
C++
#include<bits/stdc++.h> #include<string> using namespace std; string divide[4]={"dream","erase","eraser","dreamer"}; string s; bool DFS(int n){ if(n==s.size())return true; for(string i:divide){ if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){ if(DFS(n+i.size()))return true; } ...
a.cc: In function 'bool DFS(int)': a.cc:9:37: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbustr'; did you mean 'substr'? 9 | if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){ | ^~~~~~ | ...
s362284180
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4]={"dream","erase","eraser","dreamer"}; string s; bool DFS(int n){ if(n==s.size())return true; for(string i:divide){ if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){ if(DFS(n+i.size()))return true; } } return fals...
a.cc: In function 'bool DFS(int)': a.cc:8:37: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbustr'; did you mean 'substr'? 8 | if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){ | ^~~~~~ | ...
s332377278
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4]={"dream","erase","eraser","dreamer"}; string s; bool DFS(int n){ if(n==s.size())return true; for(string i:divide){ if(n+i.size()<=s.size()&&s.sbustr(n,i.size()==i)){ if(DFS(n+i.size()))return true; } } return false...
a.cc: In function 'bool DFS(int)': a.cc:8:36: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbustr'; did you mean 'substr'? 8 | if(n+i.size()<=s.size()&&s.sbustr(n,i.size()==i)){ | ^~~~~~ | ...
s433132458
p03854
C++
#include<bits/stdc++.h> using namespace dtd; string divide[4]={"dream","erase","eraser","dreamer"}; string s; bool DFS(int n){ if(n==s.size())return true; for(string i:divide){ if(n+i.size()<=s.size()&&s.sbustr(n,i.size()==i)){ if(DFS(n+i.size()))return true; } } return false...
a.cc:2:17: error: 'dtd' is not a namespace-name 2 | using namespace dtd; | ^~~ a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'? 3 | string divide[4]={"dream","erase","eraser","dreamer"}; | ^~~~~~ | stdin a.cc:4:1: error: 'string' does not name a type; did y...
s043394141
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4]={"dream","dreamer","erase","eraser"}; int main(){ strgin s; cin>>s;: reverse(s.begin(),s.end()); for(int i=0;i<4;i++)reverse(divide[i].begin(),divide[i].end()); bool cna=true; for(int i=0;i<s.size();){ bool cna2=false; ...
a.cc: In function 'int main()': a.cc:5:5: error: 'strgin' was not declared in this scope; did you mean 'strspn'? 5 | strgin s; | ^~~~~~ | strspn a.cc:6:10: error: 's' was not declared in this scope 6 | cin>>s;: | ^ a.cc:6:12: error: expected primary-expression before '...
s635870437
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(void){ string S,T = ""; string divide[4] = {"dream","dreamer","erase","eraser"} cin >> S; reverse(S.begin(),S.end()); for(int i = 0; i < 4; i++){ reverse(divide[i].begin(),divide[i].end()); } ...
a.cc: In function 'int main()': a.cc:12:3: error: expected ',' or ';' before 'cin' 12 | cin >> S; | ^~~
s815196864
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(void){ string S,T = ""; string[4] divide = {"dream","dreamer","erase","eraser"} cin >> S; reverse(S.begin(),S.end()); for(int i = 0; i < 4; i++){ reverse(divide[i].begin(),divide[i].end()); } ...
a.cc: In function 'int main()': a.cc:10:10: error: expected identifier before numeric constant 10 | string[4] divide = {"dream","dreamer","erase","eraser"} | ^ a.cc:10:10: error: expected ']' before numeric constant 10 | string[4] divide = {"dream","dreamer","erase","eraser"} | ...
s213603925
p03854
Java
import java.io.*; import java.util.StringTokenizer; public class Solution { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputS...
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java public class Solution { ^ 1 error
s928271075
p03854
C++
import java.io.*; import java.util.StringTokenizer; public class Solution { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputS...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.StringTokenizer; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-...
s715501600
p03854
C++
# -*- coding: utf-8 -*- # input s = input() while len(s) > 4: if s[-5:] == 'dream': s = s[:-5] elif s[-7:] == 'dreamer': s = s[:-7] elif s[-5:] == 'erase': s = s[:-5] elif s[-6:] == 'eraser': s = s[:-6] else: break if len(s) > 0: print('NO') else: pr...
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:2:3: error: invalid preprocessing directive #input 2 | # input | ^~~~~ a.cc:6:18: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 6 | if s[-5:] == 'dream': | ...
s958702092
p03854
Java
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String S = sc.next(); S = S.replaceAll("eraser","") S = S.replaceAll("erase","") S = S.replaceAll("dreamer","") S = S.replaceAll("dream",""); if...
Main.java:7: error: ';' expected S = S.replaceAll("eraser","") ^ Main.java:8: error: ';' expected S = S.replaceAll("erase","") ^ Main.java:9: error: ';' expected S = S.replaceAll("dreamer","") ^ 3 ...
s599444015
p03854
Java
import java.util.Scanner; public class Main { public static void main(String[] args throws Exception) { Scanner sc = new Scanner(System.in); String S = sc.nextLine(); S = S.replaceAll("eraser","").replaceAll("erase","").replaceAll("dreamer","").replaceAll("dream",""); System.out.println(S); if(S.length() ...
Main.java:4: error: ',', ')', or '[' expected public static void main(String[] args throws Exception) { ^ Main.java:4: error: ';' expected public static void main(String[] args throws Exception) { ^ 2 errors
s760388955
p03854
C++
#include <iostream> #include <string> #include <cctype> #include <algorithm> int main() { std::string S; std::cin >> S; std::string ans = "No"; std::string replaceAll(S, "dreamer", "0"); std::string replaceAll(S, "eraser", "0"); std::string replaceAll(S, "dream", "0"); std::string replaceAll(S, "erase", ...
a.cc: In function 'int main()': a.cc:10:43: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(std::string&, const char [8], const char [2])' 10 | std::string replaceAll(S, "dreamer", "0"); | ^ In file included from /usr/include/c...
s010900404
p03854
C++
#include <iostream> #include <string> #include <cctype> #include <algorithm> int main() { std::string S; std::cin >> S; std::string ans = "No"; replaceAll(S, "dreamer", "0"); replaceAll(S, "eraser", "0"); replaceAll(S, "dream", "0"); replaceAll(S, "erase", "0"); //Sが全て数字であるかを判定する// if (std::all_of(S....
a.cc: In function 'int main()': a.cc:10:3: error: 'replaceAll' was not declared in this scope 10 | replaceAll(S, "dreamer", "0"); | ^~~~~~~~~~ a.cc:18:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<c...
s586967896
p03854
C++
#include <iostream> #include <string> #include <cctype> #include <algorithm> int main() { std::string S; std::cin >> S; std::string ans = "No"; std::replaceAll(S, "dreamer", "0"); std::replaceAll(S, "eraser", "0"); std::replaceAll(S, "dream", "0"); std::replaceAll(S, "erase", "0"); //Sが全て数字であるかを判定する// ...
a.cc: In function 'int main()': a.cc:10:8: error: 'replaceAll' is not a member of 'std'; did you mean 'replace_if'? 10 | std::replaceAll(S, "dreamer", "0"); | ^~~~~~~~~~ | replace_if a.cc:11:8: error: 'replaceAll' is not a member of 'std'; did you mean 'replace_if'? 11 | std::replace...
s569033296
p03854
C++
#include<bits/stdc++.h> using namespace std; string s; vector<string> words={"dream","dreamer","erase","eraser"}; int num; string ret="NO"; void dfs(int i){ if(i==num){ ret="YES"; break; } for(auto&& w:words){ // cout<<i<<" "<<w<<endl; if(i+w.size()<=num && s.substr(i,w.size())==w){ dfs...
a.cc: In function 'void dfs(int)': a.cc:10:7: error: break statement not within loop or switch 10 | break; | ^~~~~
s782070054
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4]={"dream","dreamer","erase","eraser"}; int main(){ string S; cin>>S; for(int i=0;i<4;i++) reverse(divide[i].begin(),divide[i].end()); reverse(S.begin(),S.end()); bool can=true; for(int i=0;i<S.size();i++){ bool can2=false; for(int j=0;j<4;...
a.cc: In function 'int main()': a.cc:14:10: error: 'substr' was not declared in this scope; did you mean 'strstr'? 14 | if(substr(i,d.size())==d){ | ^~~~~~ | strstr a.cc:25:7: error: expected primary-expression before '<<' token 25 | else<<cout<<"true"<<endl; | ^~...
s352744880
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4]={"dream","dreamer","erase","eraser"}; int main(){ string S; cin>>S; for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end()); reverse(S.begin(),S.end()); bool can=true; for(int i=0;i<S.size();i++){ bool can2=false; for(int j=0;j<4;...
a.cc: In function 'int main()': a.cc:7:12: error: initializer in range-based 'for' loop 7 | for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end()); | ^ a.cc:7:18: error: expected ')' before ';' token 7 | for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end()); | ...
s181649745
p03854
C++
#include<bits/stdc++.h> using namespace std; string divide[4]={dream,dreamer,erase,eraser}; int main(){ string S; cin>>S; for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end()); reverse(S.begin(),S.end()); bool can=true; for(int i=0;i<S.size();i++){ bool can2=false; for(int j=0;j<4;j++){ ...
a.cc:3:19: error: 'dream' was not declared in this scope; did you mean 'drem'? 3 | string divide[4]={dream,dreamer,erase,eraser}; | ^~~~~ | drem a.cc:3:25: error: 'dreamer' was not declared in this scope 3 | string divide[4]={dream,dreamer,erase,eraser}; | ...
s303198892
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string S; string divide[4] = {"dream", "dreamer", "erase", "eraaser"}; int main(){ cin >> S; bool can =true; reverse (S.begin(), S.end()); for(int i = 0 ;i < 4; i++){ reverse(divide[i].begin(), diveide[i].end());...
a.cc: In function 'int main()': a.cc:16:36: error: 'diveide' was not declared in this scope; did you mean 'divide'? 16 | reverse(divide[i].begin(), diveide[i].end()); | ^~~~~~~ | divide
s128799064
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string S; string divide[4] = {"dream", "dreamer", "erase", "eraaser"}; int main(){ cin >> S; bool can =true; reverse (S.begin(), S.end()); for (int i = 0; i< S.size(); ){ bool can2 =false; for(int j = 0; ...
a.cc: In function 'int main()': a.cc:19:38: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 19 | if (S.substr(i, d.size() == d)){ | ~~~...
s900742973
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string S; string divide[4] = {"dream", "dreamer", "erase", "eraaser"}; int main(){ cin >> S; bool can =true; reverse (S.begin(), S.end()); for (int i = 0; i< S.size(); ){ bool can2 =false; for(int j = 0; ...
a.cc: In function 'int main()': a.cc:18:24: error: 'diveide' was not declared in this scope; did you mean 'divide'? 18 | string d = diveide[j]; | ^~~~~~~ | divide a.cc:19:38: error: no match for 'operator==' (operand types are 'std::__cxx11::basic...
s098477650
p03854
C++
#include <vector> #include <cstdio> #include <iostream> #include <cmath> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <cstdlib> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define REP(i,n) for(int i=0;i<n;i++) #define SORT(...
a.cc: In function 'int main()': a.cc:25:26: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 25 | int rec = strlen(S) - 1; | ^ | | | char In file included from /usr/include/c++/14/cstring:43, ...
s409589997
p03854
C++
#include <vector> #include <cstdio> #include <iostream> #include <cmath> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <cstdlib> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define REP(i,n) for(int i=0;i<n;i++) #define SORT(...
a.cc: In function 'int main()': a.cc:25:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 25 | int rec = strlen(S) - 1; | ^ | | | std::string {aka std::__cxx11::basic_s...
s831861139
p03854
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader sc = new BufferedReader(new InputStreamReader(System.in)); String m = ""; try { m = sc.readLine(); } catch (IOException e) { e.printSta...
Main.java:14: error: unreported exception IOException; must be caught or declared to be thrown sc.close(); ^ 1 error
s155810168
p03854
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string divide[4] ={"dream", "dreamer", "erase", "eraser"}; int main(){ string S; cin>>S; revese(S.being(),S.end()); for(int i=0;i<4;++i) reverse(divide[i].begin(), divide[i].end()); bool can = true; for (int i = 0; i < S.size();...
a.cc: In function 'int main()': a.cc:11:12: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'being' 11 | revese(S.being(),S.end()); | ^~~~~ a.cc:11:3: error: 'revese' was not declared in this scope 11 | revese(S.being(),S.end()); | ^~~~~~
s292560460
p03854
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string divide[4] ={"dream", "dreamer", "erase", "eraser"} int main(){ string S; cin>>S; revese(S.being(),S.end()); for(int i=0;i<4;++i) reverse(divide[i].begin(), divide[i].end()); bool can = true; for (int i = 0; i < S.size();)...
a.cc:8:1: error: expected ',' or ';' before 'int' 8 | int main(){ | ^~~
s976045821
p03854
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string divide[4] ={"dream", "dreamer", "erase", "eraser"} int main(){ string S; cin>>S; revese(S.being(),S.end()); for(int i=0;i<4;++i) reverse(divide[i].begin(), divide[i].end()); bool can = true; for (int i = 0; i < S.size();)...
a.cc:8:1: error: expected ',' or ';' before 'int' 8 | int main(){ | ^~~ a.cc:34:1: error: expected declaration before '}' token 34 | } | ^
s085253454
p03854
C
#include<stdio.h> #include<string.h> int main(){ char S[100010],T[100010],i,revS[100010],dream[]="maerd",dreamer[]="remaerd",erase[]="esare",eraser[]="resare"; int i,moji=0,j,count; scanf("%s",S); for(i=1;i<=strlen(S);i++){ revS[i-1]=S[strlen(S)-i]; } while(moji<strlen(S)){ count=0; for...
main.c: In function 'main': main.c:7:13: error: conflicting types for 'i'; have 'int' 7 | int i,moji=0,j,count; | ^ main.c:6:34: note: previous declaration of 'i' with type 'char' 6 | char S[100010],T[100010],i,revS[100010],dream[]="maerd",dreamer[]="remaerd",erase[]="esare",er...
s160303366
p03854
C++
int main() { string S,T; string answer = ""; vector<string> matcher = vector<string>(4,""); matcher[0]="dream"; matcher[1]="dreamer"; matcher[2]="erase"; matcher[3]="eraser"; T = ""; vector<string> tmp; cin >> S; tmp.push_back(T); while(!tmp.empty()){ T = tmp[tm...
a.cc: In function 'int main()': a.cc:2:5: error: 'string' was not declared in this scope 2 | string S,T; | ^~~~~~ a.cc:3:11: error: expected ';' before 'answer' 3 | string answer = ""; | ^~~~~~~ | ; a.cc:4:5: error: 'vector' was not declared in this scope 4 ...
s609239550
p03854
C++
#include <algorithm> #include <bitset> #include <cstdio> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace s...
a.cc: In function 'int main()': a.cc:56:14: error: expected '}' at end of input 56 | return 0; | ^ a.cc:19:12: note: to match this '{' 19 | int main() { | ^
s658519990
p03854
C++
// 参考URL: https://qiita.com/drken/items/fd4e5e3630d0f5859067#%E7%AC%AC-9-%E5%95%8F--abc-049-c---daydream-300-%E7%82%B9 #include <bits/stdc++.h> using namespace std; int main() { string divide[4] = {"dream", "dreamer", "erase", "eraser"}; string S; cin >> S; // 前後入れ替え reverse(S.begin(), S.end...
a.cc: In function 'int main()': a.cc:46:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 46 | ans = "NO"; | ^~~ | abs a.cc:50:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 50 | ans = "YES"; | ^~~ | abs...
s213979099
p03854
C++
#include <bits/stdc++.h> using namespace std; int main(){ int i, m; string s; cin >> s; i = s.size()-1; while(i>0){ m = i; if(i > 3){ if(s.substr(i-4, 5) == "dream" || s.substr(i-4, 5) == "erase"){ i -= 5; } } if(i > 4){ ...
a.cc: In function 'int main()': a.cc:18:17: error: 'c' was not declared in this scope 18 | c -= 6; | ^
s626889925
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string added_symbol[] = {"dream","dreamer","erase","eraser" }; string s; cin >> s; reverse(s.begin(), s.end()); for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end()); for(int i=0...
a.cc: In function 'int main()': a.cc:19:19: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = lon...
s161365646
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string added_symbol[] = {"dream","dreamer","erase","eraser" }; string s; cin >> s; reverse(s.begin(), s.end()); for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end()); for(int i=0...
a.cc: In function 'int main()': a.cc:19:19: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = lon...
s835139683
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string added_symbol[] = {"dream","dreamer","erase","eraser" }; string s; cin >> s; reverse(s.begin(), s.end()); for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end()); for(int i=0...
a.cc: In function 'int main()': a.cc:19:27: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 19 | s.substr(s.begin(), temp.size()); | ~~~~~~~^~ | | | ...
s952865696
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string added_symbol[] = {"dream","dreamer","erase","eraser" }; string s; cin >> s; reverse(s.begin(), s.end()); for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end()); for(int i=0...
a.cc: In function 'int main()': a.cc:19:27: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 19 | s.substr(s.begin(), added_symbol[j].size()); | ~~~~~~~^~ | ...
s271972124
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string added_symbol[] = {"dream","dreamer","erase","eraser" }; string s; cin >> s; reverse(s.begin(), s.end()); for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end()); for(int i=0...
a.cc: In function 'int main()': a.cc:19:27: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 19 | s.substr(s.begin(), temp.size()); | ~~~~~~~^~ | | | ...