submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s908987545
p03854
C++
if(i+1<n && s[i+1]=='r') i+=2; if(i!=n && s[i]=='a') i-=2; } } else { return "NO"; } } return "YES...
a.cc:1:7: error: expected unqualified-id before 'if' 1 | if(i+1<n && s[i+1]=='r') | ^~ a.cc:3:25: error: expected unqualified-id before 'if' 3 | if(i!=n && s[i]=='a') | ^~ a.cc:5:21: error: expected declaration before '}' token 5 | ...
s315419759
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 ca...
a.cc: In function 'int main()': a.cc:19:12: error: expected ';' before numeric constant 19 | can 2 = true; | ^~ | ; a.cc:20:11: error: no match for 'operator+=' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 20 | i += d,size()...
s025350427
p03854
C
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int s, i, l = 0, a1, a2, a3, cop; char a11[6] = { "dream" }; char a22[8] = { "dreamer" }; char a33[6] = { "erase" }; char a44[7] = { "eraser" }; char word[10001]; char* si = word; for(cop = 0; cop == 1;){ cop = scanf("%s",si); } s =...
main.c: In function 'main': main.c:48:17: error: expected declaration or statement at end of input 48 | printf("NO"); | ^~~~~~ main.c:48:17: error: expected declaration or statement at end of input
s362188710
p03854
C
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int s, i, l = 0, a1, a2, a3, cop; char a11[6] = { "dream" }; char a22[8] = { "dreamer" }; char a33[6] = { "erase" }; char a44[7] = { "eraser" }; char word[10001]; char* si = word; for(cop = 0; cop == 1;;){ cop = scanf("%s",si); } s ...
main.c: In function 'main': main.c:13:25: error: expected expression before ';' token 13 | for(cop = 0; cop == 1;;){ | ^
s258917997
p03854
C
#include<stdio.h> #include<string.h> int main(){ char S[]; //scanf("%s",S); fgets(S); int length = strlen(S); int i,frag = 0; for(i = 0; i < length; i++){ if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){ if(S[i + 5] == 'e' && S[i + 6] == 'r'){ i += 6; } els...
main.c: In function 'main': main.c:5:14: error: array size missing in 'S' 5 | char S[]; | ^ main.c:7:9: error: too few arguments to function 'fgets' 7 | fgets(S); | ^~~~~ In file included from main.c:1: /usr/include/stdio.h:654:14: note: declared here 654 | ext...
s491812953
p03854
C
#include<stdio.h> #include<string.h> int main(){ //char S[]; //scanf("%s",S); fgets(S); int length = strlen(S); int i,frag = 0; for(i = 0; i < length; i++){ if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){ if(S[i + 5] == 'e' && S[i + 6] == 'r'){ i += 6; } e...
main.c: In function 'main': main.c:7:15: error: 'S' undeclared (first use in this function) 7 | fgets(S); | ^ main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in main.c:7:9: error: too few arguments to function 'fgets' 7 | fgets...
s943211476
p03854
C
#include<stdio.h> #include<string.h> int main(){ char S[]; //scanf("%s",S); gets(S); int length = strlen(S); int i,frag = 0; for(i = 0; i < length; i++){ if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){ if(S[i + 5] == 'e' && S[i + 6] == 'r'){ i += 6; } else...
main.c: In function 'main': main.c:5:14: error: array size missing in 'S' 5 | char S[]; | ^ main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(S); | ^~~~ | fgets
s868378501
p03854
C
#include<stdio.h> #include<string.h> int main(){ //char S[]; //scanf("%s",S); gets(S); int length = strlen(S); int i,frag = 0; for(i = 0; i < length; i++){ if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){ if(S[i + 5] == 'e' && S[i + 6] == 'r'){ i += 6; } el...
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(S); | ^~~~ | fgets main.c:7:14: error: 'S' undeclared (first use in this function) 7 | gets(S); | ...
s199764909
p03854
C
#include<stdio.h> #include<string.h> int main(){ char S[]; scanf("%s",S); int length = strlen(S); int i,frag = 0; for(i = 0; i < length; i++){ if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){ if(S[i + 5] == 'e' && S[i + 6] == 'r'){ i += 6; } else { i += ...
main.c: In function 'main': main.c:5:14: error: array size missing in 'S' 5 | char S[]; | ^
s487485423
p03854
C++
int main(){ string s; cin>>s; reverse(s.begin(),s.end()); for(int i=0;i<4;i++){ reverse(s[i].begin(),s[i].end()); } bool can = true; for(int i=0;i<s.length();){ bool can2 = false; for(int j =0;j<4;j++){ string d =devide[j]; if(s.substr(i,d.size()) == devide[j]) c...
a.cc: In function 'int main()': a.cc:4:2: error: 'string' was not declared in this scope 4 | string s; | ^~~~~~ a.cc:5:2: error: 'cin' was not declared in this scope 5 | cin>>s; | ^~~ a.cc:5:7: error: 's' was not declared in this scope 5 | cin>>s; | ^ a.cc:7:2: error: 'reverse' ...
s054099745
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(),s.end()); string a[4]={"remaerd", "maerd", "esare", "resare"}; bool can2=false; for(int i=0;i<s.size();){ can2=false; for(int j=0;j<4;j++){ string d=a[j]; if(s.sbstr(i,d.size())==d){ c...
a.cc: In function 'int main()': a.cc:14:12: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbstr'; did you mean 'substr'? 14 | if(s.sbstr(i,d.size())==d){ | ^~~~~ | substr
s019019053
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(),s.end()); string a[4]={"remaerd", "maerd", "esare", "resare"}; bool can2=false; for(int i=0;i<s.size();){ can2=false; fir(int j=0;j<4;j++){ string d=a[j]; if(s.sbstr(i,d.size())==d){ c...
a.cc: In function 'int main()': a.cc:12:13: error: expected primary-expression before 'int' 12 | fir(int j=0;j<4;j++){ | ^~~ a.cc:12:21: error: 'j' was not declared in this scope 12 | fir(int j=0;j<4;j++){ | ^
s296046477
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(),s.end()); string a[4]={"remaerd", "maerd", "esare", "resare"}; for(int i=0;i<s.size();){ bool can2=false; fir(int j=0;i<4;j++){ string d=a[j]; if(s.sbstr(i,d.size())==d){ can2=true; ...
a.cc: In function 'int main()': a.cc:11:13: error: expected primary-expression before 'int' 11 | fir(int j=0;i<4;j++){ | ^~~ a.cc:11:25: error: 'j' was not declared in this scope 11 | fir(int j=0;i<4;j++){ | ^ a.cc:22:6: error: 'can2' was not declare...
s188945661
p03854
C++
#include<iostream> using namespace std; int main(){ string S, T = ""; int i = 0; cin >> S; while(i <= S.size() - 1){ if(i + 4 <= S.size() - 1 && S.substr(i, 5) == "dream"){ if(i + 6 <= S.size() - 1 && T.substr(i + 5, 2) == "er"){ T += "dreamer"; ...
a.cc: In function 'int main()': a.cc:22:60: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_string<char>' and 'char') 22 | if(i + 5 <= S.size() - 1 && T.substr(i + 5, 1) == 'r'){ | ~~~~~~~~~~~~~~~~~~ ^~ ~~~ | ...
s126926677
p03854
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
a.cc:303:2: error: expected '}' at end of input 303 | } | ^ a.cc:221:14: note: to match this '{' 221 | class Bellman{ | ^ a.cc:303:2: error: expected unqualified-id at end of input 303 | } | ^
s509769114
p03854
C++
#include <bits/stdc++.h> using namespace std; bool answer(string s){ if(s=="") return true; int l=s.size(); if(s.at(l-1)=='m'&&s.at(l-2)=='a'&&s.at(l-3)=='e'&&s.at(l-4)=='r'&&s.at(l-5)=='d') return answer(s.erase(i-5)); if(s.at(l-1)=='e'&&s.at(l-2)=='s'&&s.at(l-3)=='a'&&s.at(l-4)=='r'&&s.at(l-5)=='e') retur...
a.cc: In function 'bool answer(std::string)': a.cc:8:108: error: 'i' was not declared in this scope 8 | if(s.at(l-1)=='m'&&s.at(l-2)=='a'&&s.at(l-3)=='e'&&s.at(l-4)=='r'&&s.at(l-5)=='d') return answer(s.erase(i-5)); | ...
s775995303
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S; reverse(S.bigin(), S.end()); string divide[4] = {"dream", "dreamer", "erase", "eraser"}; for (int i = 0; i < 4; i++) reverse(divide[i].bigin(), divide[i].end()); bool can = true; for (int i = 0; i < S.size();) { ...
a.cc: In function 'int main()': a.cc:8:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'bigin'; did you mean 'begin'? 8 | reverse(S.bigin(), S.end()); | ^~~~~ | begin a.cc:10:49: error: 'std::string' {aka 'class std::__cxx11::basic_st...
s592886580
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; reverse(S.begin(), S.end()); vector<string> strs = {"dream", "dreamer", "erase", "eraser"}; for (string& s : strs) { reverse(s.begin(), s.end()); } for (int i = 0; i < S.size(); ) { bool match = false; for (const st...
a.cc: In function 'int main()': a.cc:14:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::find(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, const std::string&)' 14 | if (S.find(S.begi...
s708386623
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; reverse(S.begin(), S.end()); vector<string> strs = {"dream", "dreamer", "erase", "eraser"}; for (string& s : strs) { reverse(s.begin(), s.end()); } for (int i = 0; i < S.size(); ) { bool match = false; for (const st...
a.cc: In function 'int main()': a.cc:14:35: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'being' 14 | if (S.find(S.begin() + i, S.being() + s.size(), s) != string::npos) { | ^~~~~
s949654942
p03854
C++
解説読んだ
a.cc:1:1: error: '\U000089e3\U00008aac\U00008aad\U00003093\U00003060' does not name a type 1 | 解説読んだ | ^~~~~~~~~~
s884532818
p03854
Java
import java.util.*; public class Main { static HashMap<String,Boolean> jk=new HashMap<String,Boolean>(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s=sc.next(); HashSet<String> h=new HashSet<String>(); h.add("dream"); h.add("dreamer"); h.a...
Main.java:33: error: cannot find symbol if(i+5<=s.length()&&h.contains(s.substring(0,i+5))) ^ symbol: variable i location: class Main Main.java:33: error: cannot find symbol if(i+5<=s.length()&&h.contains(s.substring(0,i+5))) ...
s740395803
p03854
Java
import java.util.*; public class Main { static HashMap<String,Boolean> jk=new HashMap<String,Boolean>(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s=sc.next(); HashSet<String> h=new HashSet<String>(); h.add("dream"); h.add("dreamer"); h.a...
Main.java:38: error: ')' expected if(i+6<=s.length()&&h.contains(s.substring(0,i+6)) ^ 1 error
s008329064
p03854
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) int main(){ string S,T; cin >> S; string dream = "dream"; string dreamer = "dreamer"; string erase = "erase"; string eraser = "eraser"; while(T != S){ int count_all = 0; int count1 = 0; for(int i =...
a.cc: In function 'int main()': a.cc:82:2: error: expected '}' at end of input 82 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s509878594
p03854
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) int main(){ string S,T; cin >> S; string dream = "dream"; string dreamer = "dreamer"; string erase = "erase"; string eraser = "eraser"; stirng dreamerase = "dreamerase"; stirng dreameraser = "dreameraser"; string...
a.cc: In function 'int main()': a.cc:13:3: error: 'stirng' was not declared in this scope 13 | stirng dreamerase = "dreamerase"; | ^~~~~~ a.cc:14:9: error: expected ';' before 'dreameraser' 14 | stirng dreameraser = "dreameraser"; | ^~~~~~~~~~~~ | ; a.cc:16:10: error: redec...
s973673420
p03854
C++
#include <bits/stdc++.h> using namespace std; inline bool regex_search(const string &S, const string &T) { bool flag = true; for(int i=0; i<S.size(); i++) { if(S[i]==T[i]) continue; if(i==T.size()) break; else { flag = false; break; } } return...
a.cc: In function 'int main()': a.cc:39:53: error: no matching function for call to 'replace(std::string&, const std::string&, const char [1], bool)' 39 | if(regex_search(S, dreamer)) S = replace(S, dreamer, "", true); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ In ...
s394734520
p03854
C++
#include <bits/stdc++.h> using namespace std; inline bool regex_search(const string &S, const string &T) { bool flag = true; for(int i=0; i<S.size(); i++) { if(S[i]==T[i]) continue; if(i==T.size()) break; else { flag = false; break; } } return...
a.cc:39:66: error: empty character constant 39 | if(regex_search(S, dreamer)) S = replace(S, dreamer, '', true); | ^~ a.cc:40:67: error: empty character constant 40 | else if(regex_search(S, dream)) S = replace(S, dream...
s055947371
p03854
C++
#include <bits/stdc++.h> using namespace std; inline bool regex_search(const string &S, const string &T) { bool flag = true; for(int i=0; i<S.size(); i++) { if(S[i]==T[i]) continue; if(i==T.size()) break; else { flag = false; break; } } return...
a.cc:39:41: error: empty character constant 39 | if(regex_search(S, dreamer, '')) S = replace(S, dreamer, true); | ^~ a.cc:40:44: error: empty character constant 40 | else if(regex_search(S, dream, '')) S = replace(S, dream, true); | ...
s831996601
p03854
C++
#include <bits/stdc++.h> using namespace std; inline bool regex_search(const string &S, const string &T) { bool flag = true; for(int i=0; i<S.size(); i++) { if(S[i]==T[i]) continue; if(i==T.size()) break; else { flag = false; break; } } ret...
a.cc: In function 'int main()': a.cc:39:53: error: no matching function for call to 'replace(std::string&, const std::string&, bool)' 39 | if(regex_search(S, dreamer)) S = replace(S, dreamer, true); | ~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/...
s952296751
p03854
C++
#include <bits.stdc++.h> using namespace std; inline bool regex_search(const string &S, const string &T) { bool flag = true; for(int i=0; i<S.size(); i++) { if(S[i]==T[i]) continue; if(i==T.size()) break; else { flag = false; break; } } return...
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory 1 | #include <bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s214741442
p03854
C++
#include <bits/stdc++.> #include <regex> using namespace std; int main(){ string S; string dream = "dream"; string dreamer = "dreamer"; string erase = "erase"; string eraser = "eraser"; cin >> S; /** first filter */ if(S[0]!='d' && S[0]!='e') cout << "YES" << endl; else cout << ...
a.cc:1:10: fatal error: bits/stdc++.: No such file or directory 1 | #include <bits/stdc++.> | ^~~~~~~~~~~~~~ compilation terminated.
s279119645
p03854
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) int main(){ string S,T; cin >> S; string dream = "dream"; string dreamer = "dreamer"; string erase = "erase"; string eraser = "eraser"; while(T != S){ int countall = 0; int count1 = 0; for(int i = T.siz...
a.cc: In function 'int main()': a.cc:23:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'push_buck'; did you mean 'push_back'? 23 | if(count1 == 0) T.push_buck(dream); | ^~~~~~~~~ | push_back a.cc:25:11: error: 's' was ...
s812983238
p03854
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) int main(){ string S,T; cin >> S; string dream = "dream"; string dreamer = "dreamer"; string erase = "erase"; string eraser = "eraser"; while(T != S){ countall = 0; count1 = 0; for(int i = T.size(); i<T...
a.cc: In function 'int main()': a.cc:16:5: error: 'countall' was not declared in this scope 16 | countall = 0; | ^~~~~~~~ a.cc:17:5: error: 'count1' was not declared in this scope 17 | count1 = 0; | ^~~~~~ a.cc:23:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} ...
s039289772
p03854
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) int main(){ string S,T; cin >> S; string dream = 'dream'; string dreamer = 'dreamer'; string erase = 'erase'; string eraser = 'eraser'; while(T != S){ countall = 0; count1 = 0; for(int i = T.size(); i<T...
a.cc:9:18: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 9 | string dream = 'dream'; | ^~~~~~~ a.cc:10:20: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 10 | string dreamer = 'dreamer'; | ^~~...
s249995034
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 flag = true; for(int i = 0; i < s.s...
a.cc:6:1: error: expected ',' or ';' before 'int' 6 | int main(){ | ^~~
s752952003
p03854
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> int main(void) { int i; char s[500000]; char *w[] = {"dream", "dreamer", "erase", "eraser"}; char *p, *q; bool bMatch; scanf("%s", s); if ( strlen(s) < 5 ) { printf("NO\n"); return 0; } ...
main.c:48:1: error: expected identifier or '(' before '~' token 48 | ~ | ^
s951331546
p03854
C++
int main() { string S; cin >> S; vector<string> inputs = { "dream", "dreamer", "erase", "eraser" }; reverse(S.begin(), S.end()); for (int i = 0; i < inputs.size(); i++) reverse(inputs[i].begin(), inputs[i].end()); int pos = 0...
a.cc: In function 'int main()': a.cc:3:6: error: 'string' was not declared in this scope 3 | string S; | ^~~~~~ a.cc:4:6: error: 'cin' was not declared in this scope 4 | cin >> S; | ^~~ a.cc:4:13: error: 'S' was not declared in this scope 4 | cin >> S; | ...
s706268544
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string sample[4] = {"dream","dreamer","erase","eraser"}; srting s; cin >> s; reverse(s.begin(), s.end()); for (int i = 0; i < 4; i++) reverse(sample[i].begin(), sample[i].end()); bool count1 = true; for (int i = 0; i < s.size(); ){ bool count2 ...
a.cc:10:32: error: extended character   is not valid in an identifier 10 | for (int i = 0; i < s.size(); ){ | ^ a.cc: In function 'int main()': a.cc:6:3: error: 'srting' was not declared in this scope 6 | srting s; cin >> s; | ^~~~~~ a.cc:6:20: error: 's' was not ...
s163642560
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string sample[4] = {"dream","dreamer","erase","eraser"}; srting a; cin >> s; reverse(s.begin(), s.end()); for (int i = 0; i < 4; ++i) reverse(divide[i].begin(), divide[i].end()); bool count1 = true; for (int i = 0; i < s.size(); ){ bool count2 ...
a.cc:10:32: error: extended character   is not valid in an identifier 10 | for (int i = 0; i < s.size(); ){ | ^ a.cc: In function 'int main()': a.cc:6:3: error: 'srting' was not declared in this scope 6 | srting a; cin >> s; | ^~~~~~ a.cc:6:20: error: 's' was not ...
s931083636
p03854
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ devide[4]={"erase","eraser","dream","dreamer"}; string S; cin >> S; reverse(S.begin(),S.end()); for(int i=0;i<4;i++) reverse(devide[i].begin(),devide[i].end()); bool can=true; for(int i=0;i<S.size;i++){ ...
a.cc: In function 'int main()': a.cc:8:3: error: 'devide' was not declared in this scope 8 | devide[4]={"erase","eraser","dream","dreamer"}; | ^~~~~~ a.cc:17:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits...
s210509324
p03854
C++
int main() { string S; cin >> S; deque<char> dq; for (int i; i < S.size(); i++) { dq.push_back(S.at(i)); } bool b = 1; while (!dq.empty()) { if (dq.at(0)=='d' && dq.at(1)=='r' && dq.at(2)=='e' && dq.at(3)=='a' && dq.at(4)=='m') { for (int i; i < 5; i++) { dq.pop_front(); } ...
a.cc: In function 'int main()': a.cc:3:3: error: 'string' was not declared in this scope 3 | string S; | ^~~~~~ a.cc:4:3: error: 'cin' was not declared in this scope 4 | cin >> S; | ^~~ a.cc:4:10: error: 'S' was not declared in this scope 4 | cin >> S; | ^ a.cc:5:3: erro...
s698431407
p03854
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s688853869
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string divide[4] = {"dream", "dreamer", "erase", "eraser"}; string ans; cin >> ans; reverse(ans.begin(), ans.end()); for(int i = 0; i < 4; i++) reverse(divide[i].begin(),divide[i].end()); bool can = fal...
a.cc:34:1: error: expected declaration before '}' token 34 | } | ^
s739089808
p03854
C++
#include<bits/stdc++.h> using namespace std; int main(){ 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=false; for(int j=0;j<4;j++){...
a.cc: In function 'int main()': a.cc:5:3: error: 'divide' was not declared in this scope 5 | divide[4]={"dream","dreamer","erase","eraser"} | ^~~~~~ a.cc:7:8: error: 's' was not declared in this scope 7 | cin>>s; | ^ a.cc:18:14: error: invalid use of member function 'std::__cxx11::basic...
s419029456
p03854
C
#include <stdio.h> #include <string.h> int main() { char a[100000]; char b[100000]; int i; int k,j=0; int length; char rei1[7] = "remaerd"; char rei2[6] = "resare"; char rei3[5] = "maerd"; char rei4[5] = "esare"; scanf("%s", a); length = strlen(a); for(i=0; i<length/2; i++){ char tmp; tmp = a[i]; a[i] ...
main.c: In function 'main': main.c:31:18: error: 'r1' undeclared (first use in this function); did you mean 'rei1'? 31 | r1++; | ^~ | rei1 main.c:31:18: note: each undeclared identifier is reported only once for each function it appears in main.c:35:18: ...
s478001942
p03854
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long int main() { string s; cin >> s; int n=s.size(); while(s){ if(s.substr(max(0,n-5))=="dream"){ n-=5; s.erase(n); } else if(s.substr(max(0,n-5))=="erase"){ n-=5; ...
a.cc: In function 'int main()': a.cc:10:9: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 10 | while(s){ | ^ | | | std::string {aka std::__cxx11::basic_string<char>}
s713705150
p03854
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long int main() { string s; cin >> s; int n=s.size(); while(s){ if(s.substr(max(0,n-5))=="dream"){ n-=5; s.erase(n) } else if(s.substr(max(0,n-5))=="erase"){ n-=5; ...
a.cc: In function 'int main()': a.cc:10:9: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 10 | while(s){ | ^ | | | std::string {aka std::__cxx11::basic_string<char>} a.cc:13:17: error: expected ';' before '}' token 13 ...
s408758087
p03854
C++
#include <bits/stdc++.h> #include <vector> // ヘッダファイルインクルード #include <iostream> #include <algorithm> 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(divide[i].begin(),divide[i].end());...
a.cc: In function 'int main()': a.cc:29:25: error: expected '}' at end of input 29 | else cout<<"NO"<<endl; | ^ a.cc:8:12: note: to match this '{' 8 | int main() { | ^
s459891432
p03854
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); vector<string> a = {"dream", "dreamer", "erase", "eraser"}; for (int i = 0; i < 4; i++) { reverse(a.at(i).begin(), a.at(i).end()); } bool can = true; ...
a.cc: In function 'int main()': a.cc:15:33: error: expected ';' before ')' token 15 | for (int i = 0; i < s.size()) { | ^ | ; a.cc:18:25: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >,...
s956906956
p03854
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); vector<string> a = {"dream", "dreamer", "erase", "eraser"}; for (int i = 0; i < 4; i++) { reverse(a.at(i).begin(), a.at(i).end()); } bool can = true; ...
a.cc: In function 'int main()': a.cc:15:33: error: expected ';' before ')' token 15 | for (int i = 0; i < s.size()) { | ^ | ; a.cc:18:25: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >,...
s680920076
p03854
C++
#define rel(i,x,y) for(int i=x-1;i>=y;i--) #define all(x) x.begin(),x.end() int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); string s; cin >> s; rep(i,0,s.size()){ string ts = s.substr(i,5); //cout << ts << endl; if(ts != "dream" ...
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin.tie(nullptr); | ^~~ a.cc:6:5: error: 'ios' has not been declared 6 | ios::sync_with_stdio(false); | ^~~ a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << fixed << se...
s964434986
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); array<string, 4> divide ={dream, dreamer, erase,eraser}; for(int i=0;i<4;i++){ reverse(divide.at(i).begin(), divide.at(i).end()); } bool can =true; for(int i=0; i<s.size(); ){ bool...
a.cc: In function 'int main()': a.cc:8:29: error: 'dream' was not declared in this scope; did you mean 'drem'? 8 | array<string, 4> divide ={dream, dreamer, erase,eraser}; | ^~~~~ | drem a.cc:8:36: error: 'dreamer' was not declared in this scope ...
s291066718
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); array<string, 4> divide ={dream, dreamer, erase,eraser}; for(int i=0;i<4;i++){ reverse(divide.at(i).begin(), divide.at(i).end()); } bool can =true; for(int i=0; i<s.size(); ){ bool...
a.cc: In function 'int main()': a.cc:8:29: error: 'dream' was not declared in this scope; did you mean 'drem'? 8 | array<string, 4> divide ={dream, dreamer, erase,eraser}; | ^~~~~ | drem a.cc:8:36: error: 'dreamer' was not declared in this scope ...
s957264964
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); array<string, 4> divide ={dream, dreamer, erase,eraser}; for(int i=0;i<4;i++){ reverse(divide.at(i).begin(), divide.at(i).end()); } bool can =true; for(int i=0; i<s.size(); ){ bool...
a.cc: In function 'int main()': a.cc:8:29: error: 'dream' was not declared in this scope; did you mean 'drem'? 8 | array<string, 4> divide ={dream, dreamer, erase,eraser}; | ^~~~~ | drem a.cc:8:36: error: 'dreamer' was not declared in this scope ...
s166024383
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##_len = (n); i < i##_len; ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; i--) #define INF 1LL << 60; #define LLINF 1e12 #define PI 3.14159265359 int dy[] = {1, 0, -1, 0}; int dx[] = {0, 1, 0, -1}; int ...
a.cc: In function 'int main()': a.cc:82:22: error: expected ')' before '{' token 82 | while(cnt <= hold{ | ~ ^ | )
s222980066
p03854
C++
(function() { const str = require('fs').readFileSync('/dev/stdin', 'utf-8').trim(); const i = 0; while (i < str.length) { if(str.substring(i, i+7) == 'dreamer') { i += 7; } else if (str.substring(i, i+6) == 'eraser') { i += 6; } else if (str.substring(i, i+5) ...
a.cc:2:25: warning: multi-character character constant [-Wmultichar] 2 | const str = require('fs').readFileSync('/dev/stdin', 'utf-8').trim(); | ^~~~ a.cc:2:44: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 2 | const str = require('fs').r...
s997479861
p03854
C++
#include <iostream> #include <algorithm> using namespace std; int main() { string S; cin >> S; string div[]={"dream","dreamer","erase","eraser"}; reverse(S.begin(),S.end()); for (int i = 0; i < 4; i++) { reverse(div[i].begin(),div[i].end()); } bool can =true; for (int i = 0;...
a.cc: In function 'int main()': a.cc:15:38: error: expected ')' before '{' token 15 | for (int i = 0; i < S.size(); i++ | ~ ^ | ) 16 | { | ~
s452444369
p03854
C++
#include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() #define rep(i,n) for(ll i=0;i<(ll)(n);i++) using namespace std; typedef long long ll; int main(){ string s; cin>>s; reverse(all(s)); rep(i,s.size()){ if(s.substr(i,5)=="maerd") i+=5; else if(s.substr(i,7)=="remaerd") i+=7; ...
a.cc: In function 'int main()': a.cc:16:14: error: 'flag' was not declared in this scope 16 | else flag=0; | ^~~~ a.cc:17:25: error: 'flag' was not declared in this scope 17 | if(i==s.size()) flag=1; | ^~~~ a.cc:19:12: error: 'flag' was not declared...
s001881860
p03854
C++
int main() { string S; cin >> S; vector<string> V = { "dreamer", "eraser", "dream", "erase"}; stack<pair<int,int>> ST; int pos = 0; int cur = 0; while(1) { string T = V[cur]; if (S.find(T, pos) == pos) { ST.push({pos,cur+1}); ...
a.cc: In function 'int main()': a.cc:2:5: error: 'string' was not declared in this scope 2 | string S; cin >> S; | ^~~~~~ a.cc:2:15: error: 'cin' was not declared in this scope 2 | string S; cin >> S; | ^~~ a.cc:2:22: error: 'S' was not declared in this scope 2 | st...
s250051208
p03854
C++
l = input() l = l.replace('eraser','').replace('erase','').replace('dreamer','').replace('dream','') if (l == ''): print("YES") else: print("NO")
a.cc:3:15: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes 3 | l = l.replace('eraser','').replace('erase','').replace('dreamer','').replace('dream','') | ^~~~~~~~ a.cc:3:24: error: empty character constant 3 | l = l.replace('eraser','').replace('erase','').re...
s029313852
p03854
C
#include<stdio.h> int main(void){ char s[10000]; char t[10000]; int i; for(i=0;i<10000;i++){ scanf("%s",&s[i]); } for(i=0;i<10000;i++){ if(s[i]=="d" && s[i+1]=="r" && s[i+2]=="e" &&s[i+3]=="a" &&s[i+4]=="m"){ i += 4; if(s[i]==e&&s[i]==r){ i += 2; } } else if(s...
main.c: In function 'main': main.c:12:12: warning: comparison between pointer and integer 12 | if(s[i]=="d" && s[i+1]=="r" && s[i+2]=="e" &&s[i+3]=="a" &&s[i+4]=="m"){ | ^~ main.c:12:27: warning: comparison between pointer and integer 12 | if(s[i]=="d" && s[i+1]=="r" && s[i+2]=="e" &&s[i+...
s771104852
p03854
C++
s
a.cc:1:1: error: 's' does not name a type 1 | s | ^
s700509572
p03854
C++
/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
s783441416
p03854
C++
#include<iostream> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep2(i, x, n) for (int i = x; i < (n); ++i) using namespace std; // using ll = long long; // using P = pair<int, int>; string divider[4] = { "dream", "dreamer", "erase", "eraser" }; int main() { string S; cin >> S; // 後ろから解く代わりにす...
a.cc: In function 'int main()': a.cc:16:5: error: 'reverse' was not declared in this scope 16 | reverse(S.begin(), S.end()); | ^~~~~~~
s255890010
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; while(S.size()) { if (S.substr(S.size()-4) == "dream") { S = S.erase(S.size() - 4); } else if (S.substr(S.size() - 6) == "dreamer") { S = S.erase(S.size() - 6); } else if (S.substr(S.size() - 4) == "erase") ...
a.cc: In function 'int main()': a.cc:24:2: error: expected '}' at end of input 24 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s292905995
p03854
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; int a = 0; string t1 = "dream", t2 = "dreamer", t3 = "erase", t4 = "eraser"; while(){ if(S.substr(0,5) == t1) S.erase(0, 5); if(S.substr(0,7) == t2) S.erase(0, 7); if(S.substr(0,5) == t3) S.erase(0, 5); if(S.substr(0...
a.cc: In function 'int main()': a.cc:9:9: error: expected primary-expression before ')' token 9 | while(){ | ^
s814289659
p03854
C++
#include<iostream> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); int t = 1; for (int i = 0; i < s.size(); i++) { if (s[i] == 'm') { i += 4; } else if (s[i] == 'e') { i += 4; } else if (s[i] == 'r') { i += 2; if (s[i] == 'm') { i += 4; } else ...
a.cc: In function 'int main()': a.cc:9:9: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(), s.end()); | ^~~~~~~
s134537621
p03854
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <math.h> #include <functional> #include <utility> using namespace std; int main(){ string s; cin >> s; string s2 = s; s += "0000000000000"; string d = "dream"; string dr = "dreamer"; string e = "erase"; string er = "e...
a.cc: In function 'int main()': a.cc:28:12: error: expected ',' before '.' token 28 | if([t.size()+5] == 'r'){t += er;} | ^ | , a.cc:28:12: error: expected identifier before '.' token a.cc: In lambda function: a.cc:28:23: error: expected '{' before '==' token 28 | if(...
s832478210
p03854
C++
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define REP(i,m,n) for(int i=m;i<(int)(n);i++) typedef long long ll; typedef pair<ll,ll> pint; int main(){ string s;cin>>s; bool flag=false; vector<string> a={"dream", "dreamer", "erase", "era...
a.cc: In function 'int main()': a.cc:17:18: error: no matching function for call to 'max(ll&, int)' 17 | seven=max(seven,0); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s873590337
p03854
C++
#include <bits/stdc++.h> #include <algorithm> using namespace std; int main (){ string S,T; cin >> S; T=""; bool z1=false; string d,D,e,E; d="maerd",D="remaerd",e="esare",E="resare"; int i=0; reverse(S.begin(),S.end()); while(true){ int N=T.size(); T+=d; for...
a.cc: In function 'int main()': a.cc:24:16: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subster'; did you mean 'substr'? 24 | T.subster(0,N); | ^~~~~~~ | substr a.cc:34:15: error: 'std::string' {aka 'class std::__cxx1...
s354430462
p03854
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s1 = sc.next(); StringBuffer sb = new StringBuffer(s1); String s2 = sb.reverse().toString(); dream dreamer erase eraser String s3 = s2.replace("maerd","").replace("...
Main.java:12: error: ';' expected dream dreamer erase eraser ^ Main.java:12: error: ';' expected dream dreamer erase eraser ^ 2 errors
s367746121
p03854
C++
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define REP(i,m,n) for(int i=m;i<(int)(n);i++) typedef long long ll; typedef pair<ll,ll> pint; string dfs(string s,string s1,vector<string> a){ if(s.size()<=s1.size()){ return s1; } els...
a.cc: In function 'std::string dfs(std::string, std::string, std::vector<std::__cxx11::basic_string<char> >)': a.cc:22:24: error: expected ';' before '}' token 22 | return "NO" | ^ | ; 23 | } | ~
s517817473
p03854
C++
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <queue> using namespace std; int main(){ string devide[4]={"dream","dreamer","erase","eraser"}; for(int i=0;i<4;i++)reverse(devide[i].begin(),devide[j].end()); string S; cin>>S; for(int i=0;i<S.size...
a.cc: In function 'int main()': a.cc:12:58: error: 'j' was not declared in this scope 12 | for(int i=0;i<4;i++)reverse(devide[i].begin(),devide[j].end()); | ^
s735662923
p03854
C++
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <queue> using namespace std; int main(){ string devide[4]={"dream","dreamer","erase","eraser"}; for(int i=0;i<4;i++)reverse(devide[i].begin(),devide.end()); string S; cin>>S; for(int i=0;i<S.size();...
a.cc: In function 'int main()': a.cc:12:58: error: request for member 'end' in 'devide', which is of non-class type 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'} 12 | for(int i=0;i<4;i++)reverse(devide[i].begin(),devide.end()); | ^~~...
s918137151
p03854
C++
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <queue> using namespace std; int main(){ string devide[4]={"dream","dreamer","erase","eraser"}; fot(int i=0;i<4;i++)reverse(devide[i].begin(),devide.end()); string S; cin>>S; for(int i=0;i<S.size();...
a.cc: In function 'int main()': a.cc:12:9: error: expected primary-expression before 'int' 12 | fot(int i=0;i<4;i++)reverse(devide[i].begin(),devide.end()); | ^~~ a.cc:12:17: error: 'i' was not declared in this scope 12 | fot(int i=0;i<4;i++)reverse(devide[i].begin(),devide.end()); | ...
s675315148
p03854
Java
import java.util.Scanner; public static void main(String[] args) { Scanner sc = new Scanner(System.in); StringBuffer str = new StringBuffer(sc.next()); String S = str.reverse().toString(); sc.close(); System.out.println(solve(S)); } public static String solve(String S) { int index = 0; while(index+5<S.l...
Main.java:3: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s406496505
p03854
Java
import java.util.Scanner; public class AssignmentD { public static void main(String[] args) { Scanner sc = new Scanner(System.in); StringBuffer str = new StringBuffer(sc.next()); String S = str.reverse().toString(); sc.close(); System.out.println(solve(S)); } public static String solve(String S) { in...
Main.java:3: error: class AssignmentD is public, should be declared in a file named AssignmentD.java public class AssignmentD { ^ 1 error
s733549642
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); for (int i = 0; i < s.size();) { string t = s.substr(i, 7); if (t = "remaerd") i += 7; else if (t = "resare") i += 6; else if (t = "maerd") i += 5; else if (t = "e...
a.cc: In function 'int main()': a.cc:12:11: error: could not convert 't.std::__cxx11::basic_string<char>::operator=(((const char*)"remaerd"))' from 'std::__cxx11::basic_string<char>' to 'bool' 12 | if (t = "remaerd") | ~~^~~~~~~~~~~ | | | std::__cxx11::basic_string<c...
s478859540
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); for (int i = 0; i < s.size();) { string t = s。substr(i, 7); if (t = "remaerd") i += 7; else if (t = "resare") i += 6; else if (t = "maerd") i += 5; else if (t = "e...
a.cc:11:16: error: extended character 。 is not valid in an identifier 11 | string t = s。substr(i, 7); | ^ a.cc: In function 'int main()': a.cc:11:16: error: 's\U00003002substr' was not declared in this scope 11 | string t = s。substr(i, 7); | ^~~~~~~~~ a.cc:12:11: ...
s495168773
p03854
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #define pb push_b...
a.cc: In function 'int main()': a.cc:384:10: error: no matching function for call to 'reverse(std::string&)' 384 | reverse(s); | ~~~~~~~^~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/...
s864267372
p03854
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #define pb push_b...
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = __gnu_cxx::...
s166653242
p03854
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> #define PI 3.14159265359 using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) const long long INF= 1e+18+1; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll> >vvl; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> T; const ll MOD=1000...
a.cc: In function 'int main()': a.cc:18:17: error: 'n' was not declared in this scope 18 | if(s.substr(n-7)=="dreamer")s.erase(n-7); | ^
s883846819
p03854
C++
#include <bits/stdc++.h> using namespace std; int test1(string s) { int r=0; if (s.substr(0,6)=="dreamer") r=7; else if (s.substr(0,4)=="dream") r=5; else if (s.substr(0,5)=="eraser") r=6; else if (s.substr(0,4)=="erase") r=5; return r; } int main() { string str; cin >> str; int r; while(s...
a.cc: In function 'int main()': a.cc:31:28: error: expected ';' before '}' token 31 | else cout << "YES" <<endl | ^ | ; 32 | } | ~
s207643537
p03854
C++
#include <bits/stdc++.h> using namespace std; int test1(string s) { int r=0; if (s.substr(0,6)=="dreamer") r=7; else if (s.substr(0,4)=="dream") r=5; else if (s.substr(0,5)=="eraser") r=6; else if (s.substr(0,4)=="erase") r=5; return r; } int main() { string str; cin >> str; int r; while(s...
a.cc: In function 'int main()': a.cc:26:10: error: expected '(' before 'test1' 26 | if test1(str.substr(r-1))==0) r=5;} | ^~~~~ | ( a.cc:31:28: error: expected ';' before '}' token 31 | else cout << "YES" <<endl | ^ | ...
s476748524
p03854
C++
#include <bits/stdc++.h> using namespace std; int test1(string s) { int r=0; if s.substr(0,6)=="dreamer" r=7; else if s.substr(0,4)=="dream" r=5; else if s.substr(0,5)=="eraser" r=6; else if s.substr(0,4)=="erase" r=5; return r; } int main() { string str; cin >> str; int r; while(str.size(...
a.cc: In function 'int test1(std::string)': a.cc:8:6: error: expected '(' before 's' 8 | if s.substr(0,6)=="dreamer" r=7; | ^ | ( a.cc:9:3: error: 'else' without a previous 'if' 9 | else if s.substr(0,4)=="dream" r=5; | ^~~~ a.cc:9:11: error: expected '(' before 's' 9 | e...
s263319913
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; int r; while(str.size()>0) { r=test1(str); if(r==0) break; if(r>5) { if test1(str.substr(r-1))==0) r=5;} srt=str.substr(r-1); } if(r==0) cout << "NO" <<endl; else cout << "YES" <<endl } int ...
a.cc: In function 'int main()': a.cc:10:7: error: 'test1' was not declared in this scope 10 | r=test1(str); | ^~~~~ a.cc:14:10: error: expected '(' before 'test1' 14 | if test1(str.substr(r-1))==0) r=5;} | ^~~~~ | ( a.cc:15:5: error: 'srt' was not declared in th...
s116073976
p03854
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; int r while(str.size()>0) { r=test1(str); if(r==0) break; if(r>5) { if test1(str.substr(r-1))==0) r=5;} srt=str.substr(r-1); } if(r==0) cout << "NO" <<endl; else cout << "YES" <<endl } int t...
a.cc: In function 'int main()': a.cc:9:3: error: expected initializer before 'while' 9 | while(str.size()>0) { | ^~~~~ a.cc:18:6: error: 'r' was not declared in this scope 18 | if(r==0) cout << "NO" <<endl; | ^ a.cc:19:28: error: expected ';' before '}' token 19 | else cout << "YES" <...
s013135271
p03854
C++
#abc049 c s=input() divide=["dream","dreamer","erase","eraser"] s=s[::-1] for i,x in enumerate(divide): divide[i]=x[::-1] ans=True i=0 while i<len(s): flag=False for x in divide: lx=len(x) if s[i:i+lx] in divide: flag=True i+=lx if flag==False: ans=Fal...
a.cc:1:2: error: invalid preprocessing directive #abc049 1 | #abc049 c | ^~~~~~ a.cc:2:1: error: 's' does not name a type 2 | s=input() | ^
s990174644
p03854
C++
#include <iostream> #include <vector> int main() { std::vector<std::string> candidates = {"dream", "dreamer", "erase", "eraser"}; for (auto &c : candidates) { std::reverse(c.begin(), c.end()); } std::string S; std::cin >> S; std::reverse(S.begin(), S.end()); while (0 < S.size(...
a.cc: In function 'int main()': a.cc:9:14: error: 'reverse' is not a member of 'std' 9 | std::reverse(c.begin(), c.end()); | ^~~~~~~ a.cc:14:10: error: 'reverse' is not a member of 'std' 14 | std::reverse(S.begin(), S.end()); | ^~~~~~~
s315274936
p03854
C++
int main(){ string s; cin >> s; reverse(s.begin(),s.end()); string divide[4] = {"maerd","remaerd","esare","resare"}; rep(i,s.size()){ bool ok = false; rep(j,4){ if(s.substr(i, divide[j].size()) == divide[j]){ ok = true; i += divide[j].size() - 1; } } if(!ok){ cout << "NO" << endl; retur...
a.cc: In function 'int main()': a.cc:2:9: error: 'string' was not declared in this scope 2 | string s; | ^~~~~~ a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >> s; | ^~~ a.cc:3:16: error: 's' was not declared in this scope 3 | cin >> s; ...
s670054839
p03854
C++
if(c=="remaerd"){ size-=7; if(size>0){ t.erase(t.begin(),t.begin()+7); dp(t,size,ans); } else{ if(size==0){ *ans="YES"; } } }
a.cc:1:1: error: expected unqualified-id before 'if' 1 | if(c=="remaerd"){ | ^~
s977833886
p03854
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); string vec[4] = {"dream", "dreamer", "erase", "eraser"}; for (int i=0; i<4; i++){ reverse(vec[i].begin(), vec[i].end()); } int i=0; bool can=false; while(i<s.size()){ can=false; for(int j=0; j<4; j++)...
a.cc: In function 'int main()': a.cc:16:16: error: request for member 'substr' in 'vec', which is of non-class type 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'} 16 | if(vec.substr(i, vec[j].size())==vec[j]){ | ^~~~~~
s200127287
p03854
C++
#include <iostream> #include <string> std::string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main(int argc, char *argv[]) { std::string S; std::cin >> S; std::reverse(S.begin(), S.end()); for (int i = 0; i < 4; ++i) { reverse(divide[i].begin(), divide[i].end()); } bool can = true; fo...
a.cc: In function 'int main(int, char**)': a.cc:10:8: error: 'reverse' is not a member of 'std' 10 | std::reverse(S.begin(), S.end()); | ^~~~~~~ a.cc:12:5: error: 'reverse' was not declared in this scope 12 | reverse(divide[i].begin(), divide[i].end()); | ^~~~~~~
s801569394
p03854
C++
#include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <set> using namespace std; int main(){ string s; string divide[4] = {"dream", "dreamer", "erase", "eraser"}; cin>>s; //各文字列を反転させ、後ろから考える reverse(s.begin(), s.end()); for (int i = 0; i < 4;...
a.cc: In function 'int main()': a.cc:26:27: error: expected ';' before ')' token 26 | for(int i=0;i<s.size()){ | ^ | ;
s018595597
p03854
C++
#include <bits/stdc++.h> using namespace std; string divide[4] = {"dream","dreamer","erase","eraser"}; int main(){ string s; cin >> s; reverse(s.bigin(),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:10:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'bigin'; did you mean 'begin'? 10 | reverse(s.bigin(),s.end()); | ^~~~~ | begin
s413708510
p03854
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0;i<(int)(N);i++ bool c(vector<char> &N,int i){ char front=N.at(i-1); if(front=='d'){ if(N.at(i)=='r') return true; else return false; } else if(front=='r'){ if(N.at(i)=='e'||N.at(i)=='d'||N.at(i)=='a')...
a.cc: In function 'int main()': a.cc:3:32: error: invalid cast from type 'std::vector<char>' to type 'int' 3 | #define rep(i,N) for(int i=0;i<(int)(N);i++ | ^~~~~~~~ a.cc:49:3: note: in expansion of macro 'rep' 49 | rep(i,N) | ^~~ a.cc:50:5: error: expected ')' befo...
s998189410
p03854
C++
S = input() temp = ['dream', 'dreamer', 'erase', 'eraser'] while(1): for i in temp: if S.startswith(i): S = S.lstrip(i) break else: break print(S) if len(S) == 0: print('YES') else: print('NO')
a.cc:2:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 2 | temp = ['dream', 'dreamer', 'erase', 'eraser'] | ^~~~~~~ a.cc:2:18: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 2 | temp = ['dream', 'dreamer', 'erase', 'eraser'] ...
s225376156
p03854
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() typedef long long ll; #define _GLIBCXX_DEBUG int main() { string s; cin>>s; vector<string>div={"dream","dreamer","erase","eraser"}; reverse(s.begin(),s....
a.cc: In function 'int main()': a.cc:19:13: error: 'substr' was not declared in this scope; did you mean 'strstr'? 19 | if(d==substr(i,d.size()){ | ^~~~~~ | strstr a.cc:19:31: error: expected ')' before '{' token 19 | if(d==substr(i,d.size()){ | ~ ...
s071610731
p03854
C++
#include <iostream> 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 = false; ...
a.cc: In function 'int main()': a.cc:9:9: error: 'reverse' was not declared in this scope 9 | reverse(S.begin(), S.end()); | ^~~~~~~
s711544199
p03854
C++
#include <iostream> usign 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 = false; ...
a.cc:2:1: error: 'usign' does not name a type 2 | usign namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'string' was not declared in this scope 5 | string divide[4] = { "dream", "dreamer", "erase", "eraser" }; | ^~~~~~ a.cc:5:9: note: suggested alternatives: I...
s820132755
p03854
C++
#include <iostream> #include <string> std::string divide[4] = {"dream", "dreamer", "erase", "eraser"}; int main(int argc, char *argv[]) { std::string S; std::cin >> S; std::reverse(S.begin(), S.end()); for (int i = 0; i < 4; ++i) { reverse(divide[i].begin(), divide[i].end()); } bool can = true; fo...
a.cc: In function 'int main(int, char**)': a.cc:10:8: error: 'reverse' is not a member of 'std' 10 | std::reverse(S.begin(), S.end()); | ^~~~~~~ a.cc:12:5: error: 'reverse' was not declared in this scope 12 | reverse(divide[i].begin(), divide[i].end()); | ^~~~~~~