submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s783715991
p00722
C++
#include <iostream> using namespace std; bool prime_check(int n){ switch(n){ case 1: return false; case 2: return true; } if(n%2 == 0) return false; for(int i=3;i*i<=n;i+=2){ if(n%i == 0) return false; } return true; } int main(){ int a,d,n; while(cin>>a>>d>>n,...
a.cc: In function 'int main()': a.cc:21:9: error: expected primary-expression before '?' token 21 | ??? num = a + (d*i); | ^ a.cc:21:10: error: expected primary-expression before '?' token 21 | ??? num = a + (d*i); | ^ a.cc:21:11: error: expected primary-expression bef...
s540095486
p00722
C++
# include <iostream> # include <algorithm> # include <vector> # include <string> # include <set> # include <map> # include <cmath> # include <iomanip> # include <functional> # include <utility> # include <stack> # include <queue> # include <list> using namespace std; using LL = long long; constexpr long long MOD = 1000...
a.cc: In function 'int main()': a.cc:47:18: error: expected '}' at end of input 47 | return 0; | ^ a.cc:34:12: note: to match this '{' 34 | int main() { | ^
s307659899
p00722
C++
#include<iostream> using namespace std; int main(void) { bool prime[100005]; for(int i = 0 ; i < 100005 ; i++){prime[i] = true;} for(int k = 1 ; k < 105 ; k++){ for(int j = 2 ; j * i < 100005 ; j++){ prime[k*j]=false; } } for(;;){ int a, d, n; cin >> a >> ...
a.cc: In function 'int main()': a.cc:8:29: error: 'i' was not declared in this scope 8 | for(int j = 2 ; j * i < 100005 ; j++){ | ^
s613995033
p00722
C++
#include <iostream> using namespace std; int main(void){ for(;;){ int a,d,n; cin >> a >> d >> n; for(a == 0 && d == 0 && n == 0){ return 0; } int ans = -1; for(int i = 0 ; a + d * i <= 1000000 && (ans == -1) ; i++ ){ bool prime = true; for(int j = 2 ; ...
a.cc: In function 'int main()': a.cc:7:39: error: expected ';' before ')' token 7 | for(a == 0 && d == 0 && n == 0){ return 0; } | ^ | ; a.cc:9:9: error: expected primary-expression before 'for' 9 | for(int i...
s568233402
p00722
C++
#include <iostream> using namespace std; int main(void){ for(;;){ int a,d,n; cin >> a >> d >> n; for(a == 0 && d == 0 && n == 0){ return 0; } int ans = -1; for(int i = 0 ; a + d * i <= 1000000 && (ans == -1) ; i++ ){ bool prime = true; for(int j = 2 ; ...
a.cc: In function 'int main()': a.cc:7:39: error: expected ';' before ')' token 7 | for(a == 0 && d == 0 && n == 0){ return 0; } | ^ | ; a.cc:9:9: error: expected primary-expression before 'for' 9 | for(int i...
s474121401
p00722
C++
#include <stdio.h> #include <math.h> bool isprime(int n) { bool result = true; if(n==1) { return false; } else if(n < 2) { for(i=3; i<sqrt(n); i++) { if(n%i == 0) { return false; } } return result; } void solve(int s, int e, ...
a.cc: In function 'bool isprime(int)': a.cc:11:13: error: 'i' was not declared in this scope 11 | for(i=3; i<sqrt(n); i++) { | ^ a.cc:19:33: error: a function-definition is not allowed here before '{' token 19 | void solve(int s, int e, int d) { | ^ ...
s546166776
p00722
C++
#include <stdio.h> #include <math.h> bool isprime(int n) { bool result = true; int i; if(n==1) { return false; } else if(n < 2) { for(i=3; i<sqrt(n); i++) { if(n%i == 0) { return false; } } return result; } void solve(int...
a.cc: In function 'bool isprime(int)': a.cc:20:33: error: a function-definition is not allowed here before '{' token 20 | void solve(int s, int e, int d) { | ^ a.cc:32:16: error: a function-definition is not allowed here before '{' token 32 | int main(void) { | ...
s793741409
p00722
C++
#include <stdio.h> #include <math.h> int main(void) { bool isprime(int n) { bool result = true; int i; if(n==1) { return false; } else if(n < 2) { for(i=3; i<sqrt(n); i++) { if(n%i == 0) { return false; } } return resu...
a.cc: In function 'int main()': a.cc:5:25: error: a function-definition is not allowed here before '{' token 5 | bool isprime(int n) { | ^ a.cc:36:2: error: expected '}' at end of input 36 | } | ^ a.cc:4:16: note: to match this '{' 4 | int main(void) { | ...
s456947506
p00722
C++
#include <stdio.h> #include <math.h> int main(void) { bool isprime(int n) { bool result = true; int i; if(n==1) { return false; } else if(n < 2) { for(i=3; i<sqrt(n); i++) { if(n%i == 0) { return false; } } return resu...
a.cc: In function 'int main()': a.cc:5:25: error: a function-definition is not allowed here before '{' token 5 | bool isprime(int n) { | ^ a.cc:58:2: error: expected '}' at end of input 58 | } | ^ a.cc:4:16: note: to match this '{' 4 | int main(void) { | ...
s455516789
p00722
C++
#include <stdio.h> #include <math.h> int main(void) { int s=1; int e=1; int d=1; int i; while(s==0 && e==0 && d==0) { scanf("%s",s); scanf("%s",e); scanf("%s",d); i = 0; if(s==1) { result=false; } else if(s < 2) { ...
a.cc: In function 'int main()': a.cc:15:13: error: 'result' was not declared in this scope 15 | result=false; | ^~~~~~ a.cc:18:35: error: 'result' was not declared in this scope 18 | for(i=3; i<sqrt(s) || result=true; i++) { | ^~~~~...
s240068781
p00722
C++
#include <stdio.h> #include <math.h> int main(void) { int s=1; int e=1; int d=1; int i; bool result; while(s==0 && e==0 && d==0) { scanf("%s",s); scanf("%s",e); scanf("%s",d); result=true; i = 0; if(s==1) { result=false; ...
a.cc: In function 'int main()': a.cc:19:32: error: lvalue required as left operand of assignment 19 | for(i=3; i<sqrt(s) || result=true; i++) { | ~~~~~~~~~~^~~~~~~~~ a.cc:45:2: error: expected '}' at end of input 45 | } | ^ a.cc:4:16: note: to match this '{' 4 | i...
s776114219
p00722
C++
#include <stdio.h> #include <math.h> int main(void) { int s=1; int e=1; int d=1; int i; int m; bool result; while(s==0 && e==0 && d==0) { scanf("%s",s); scanf("%s",e); scanf("%s",d); result=true; m = 0; if(s==1) { result=false; ...
a.cc: In function 'int main()': a.cc:19:33: error: lvalue required as left operand of assignment 19 | for(i=3; (i<sqrt(s) || result=true);i++) { | ~~~~~~~~~~^~~~~~~~~ a.cc:45:2: error: expected '}' at end of input 45 | } | ^ a.cc:4:16: note: to match this '{' 4 |...
s247048698
p00722
C++
#include <stdio.h> #include <math.h> int main(void) { int s=1; int e=1; int d=1; int i; int m; bool result; while(s==0 && e==0 && d==0) { scanf("%s",s); scanf("%s",e); scanf("%s",d); result=true; m = 0; if(s==1) { result=false; ...
a.cc: In function 'int main()': a.cc:20:29: error: lvalue required as left operand of assignment 20 | while(i<sqrt(s) || result=true) { | ~~~~~~~~~~^~~~~~~~~ a.cc:49:2: error: expected '}' at end of input 49 | } | ^ a.cc:4:16: note: to match this '{' 4 | int main(voi...
s635993795
p00722
C++
#include <iostream> using namespace std; int main(){ bool isPrime[1000000]; memset(isPrime, true, sizeof(isPrime)); isPrime[1] = false; for(int i=2;i<1000000;i++){ for(int j=2;i*j<1000000;j++) isPrime[i*j] = false; } int a, d, n; while(cin >> a >> d >> n){ if(!a) break; int count = 1; for(int i=a;;i+=...
a.cc: In function 'int main()': a.cc:7:9: error: 'memset' was not declared in this scope 7 | memset(isPrime, true, sizeof(isPrime)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#...
s622830215
p00722
C++
#include <iostream> using namespace std; //‚ ‚鐔‚ª‘f”‚©”»•Ê‚·‚éŠÖ”E–ß‚è’l0:‘f”‚łȂ¢ 1:‘f” int checkNumber(int num){ if( num<=1 ) return 0;//1‚Í‘f”‚łȂ¢ for(int i=2; i<((num+1)/2) ; i++ ){ if (num%i == 0 ) { return 0;//Š„‚èØ‚ꂽ‚ç‘f”‚łȂ¢ } } return 1;//Š„‚è‚«‚ê‚È‚©...
a.cc: In function 'int main()': a.cc:29:41: error: break statement not within loop or switch 29 | if(a==0 && d==0 && n==0)break;//0 0 0‚Ì“ü—͂ŏI—¹ | ^~~~~ a.cc: At global scope: a.cc:48:9: error: expected unqualified-id before 'return' 48 | re...
s581007008
p00722
C++
#include <iostream> using namespace std; //‚ ‚鐔‚ª‘f”‚©”»•Ê‚·‚éŠÖ”E–ß‚è’l0:‘f”‚łȂ¢ 1:‘f” int checkNumber(int num){ if( num<=1 ) return 0;//1‚Í‘f”‚łȂ¢ for(int i=2; i<((num+1)/2) ; i++ ){ if (num%i == 0 ) { return 0;//Š„‚èØ‚ꂽ‚ç‘f”‚łȂ¢ } } return 1;//Š„‚è‚«‚ê‚È‚©...
a.cc: In function 'int main()': a.cc:29:41: error: break statement not within loop or switch 29 | if(a==0 && d==0 && n==0)break;//0 0 0‚Ì“ü—͂ŏI—¹ | ^~~~~ a.cc: At global scope: a.cc:48:9: error: expected unqualified-id before 'return' 48 | re...
s508566503
p00722
C++
#include <iostream> using namespace std; #define MAX 1000000 bool isPrime[MAX+1]; int main( void ) { int a, d, n; memset( isPrime, false, sizeof( isPrime ) ); isPrime[2] = true; for ( int i = 3; i <= MAX; i += 2 ) isPrime[i] = true; for ( int i = 3; i <= MAX; i += 2 ) { if ( isPrime[i...
a.cc: In function 'int main()': a.cc:10:5: error: 'memset' was not declared in this scope 10 | memset( isPrime, false, sizeof( isPrime ) ); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#in...
s487303205
p00722
C++
// 2006‘“à—\‘IA ƒfƒBƒŠƒNƒŒ‚ÌŽZp‹‰”’藝 #include <iostream> using namespace std; int main(){ bool isPrime[1000000]; memset(isPrime, true, sizeof(isPrime)); isPrime[1] = false; for(int i=2;i<1000000;i++){ if(!isPrime[i]) continue; for(int j=2;i*j<1000000;j++) isPrime[i*j] = false; } int a, d, n; while(c...
a.cc: In function 'int main()': a.cc:9:9: error: 'memset' was not declared in this scope 9 | memset(isPrime, true, sizeof(isPrime)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <iostream> +++ |+#...
s001909020
p00722
C++
//suhan lee, saitama university; #include <iostream> #include <math.h > int main(){ using namespace std; int a,d,n,i,tmp; int table[9307+346*210]; while(1){ cin>>a>>d>>n; tmp=a;i=0; if(a==0&&d==0&&n==0) return 0; while(1){ for(int j=2;j<=(int)sqrt(tmp) ;j++) { if(tmp%j==0){ ...
a.cc:3:10: fatal error: math.h : No such file or directory 3 | #include <math.h > | ^~~~~~~~~ compilation terminated.
s998981791
p00722
C++
//suhan lee, saitama university; #include <iostream> #include <Cmath> int main(){ using namespace std; int a,d,n,i,tmp; int table[9307+346*210]; while(1){ cin>>a>>d>>n; tmp=a;i=0; if(a==0&&d==0&&n==0) return 0; while(1){ for(int j=2;j<=(int)sqrt(tmp) ;j++) { if(tmp%j==0){ ...
a.cc:3:10: fatal error: Cmath: No such file or directory 3 | #include <Cmath> | ^~~~~~~ compilation terminated.
s431962902
p00722
C++
#include <iostream> #include <cmath> #define N 1000000 using namespace std; int main() { int a, d, n, i; bool prime[N]; memset(prime, true, sizeof(prime)); prime[0] = prime[1] = false; for (i = 2; i < sqrt(N) + 1; i++) { if (prime[i]) { for (int j = 2 * i; j < N; j += i) { prime[j] = false; } } }...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(prime, true, sizeof(prime)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cmath> +++ |+#includ...
s581558099
p00722
C++
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int Sosuu_hantei(int N) { if (N==1) {return false}; int M = sqrt(N) +1; for(int i=2; i<M; i ++ ){ if(( N % i ) == 0 ) {return false;} } return true; }; int main() { int a=0, d=0, n=0, Num=0; while(1){ scanf("%d%d%d", &a, &d, &n); ...
a.cc: In function 'int Sosuu_hantei(int)': a.cc:8:32: error: expected ';' before '}' token 8 | if (N==1) {return false}; | ^ | ;
s901956445
p00723
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigDecimal; import java.math....
Main.java:26: error: cannot find symbol String sub1=s.substrng(0,i); ^ symbol: method substrng(int,int) location: variable s of type String 1 error
s191275317
p00723
Java
import java.util.*; public class Mrain{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int data = sc.nextInt(); for(int i=0; i<data; i++){ String str = sc.next(); HashSet<String> hs = new HashSet<String>(); hs.add(str); for(int j=1;j<str.length();j++){ String bef...
Main.java:3: error: class Mrain is public, should be declared in a file named Mrain.java public class Mrain{ ^ 1 error
s360841030
p00723
Java
import java.util.Scanner; import java.util.ArrayList; public class Main { static String change(String str){ StringBuffer sb = new StringBuffer(str); str = sb.reverse().toString(); return str; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); fo...
Main.java:73: error: cannot find symbol for(int l=0;l<pettern.sixe()-1;l++) { ^ symbol: method sixe() location: variable pettern of type ArrayList<String> 1 error
s816701597
p00723
Java
import java.util.Scanner; import java.util.ArrayList; public class Main { static String change(String str){ StringBuffer sb = new StringBuffer(str); str = sb.reverse().toString(); return str; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); fo...
Main.java:53: error: cannot find symbol for(int l=0;l<pettern.sixe()-1;l++) { ^ symbol: method sixe() location: variable pettern of type ArrayList<String> 1 error
s001018629
p00723
Java
import java.util.Scanner; import java.util.ArrayList; static String reverse(String str){ return new StringBuffer(str).reverse().toString(); } public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)) { int m = sc.nextInt(); for(int i=0;i<m;i++) ...
Main.java:5: error: unnamed classes are a preview feature and are disabled by default. static String reverse(String str){ ^ (use --enable-preview to enable unnamed classes) 1 error
s501241213
p00723
Java
import java.io.*; import java.util.*; class Main{ public static Scanner cin; public static HashSet<String> m; public static String reverse(String s){ return new StringBuilder(s).reverse().toString(); } public static void main(String []args){ cin=new Scanner(System.in); int j=0,n=cin.nextInt(); ...
Main.java:35: error: class, interface, enum, or record expected } ^ 1 error
s852300693
p00723
Java
import java.io.*; import java.util.*; class Main{ public static Scanner cin; public static HashSet<String> m; public static String reverse(String s){ return new StringBuilder(s).reverse().toString(); } public static void main(String []args){ cin=new Scanner(System.in); int j=0,n=cin.nextInt(); ...
Main.java:19: error: variable j is already defined in method main(String[]) int j=1; ^ Main.java:20: error: cannot find symbol for(;i<s.length();i++){ ^ symbol: variable i location: class Main Main.java:20: error: cannot find symbol for(;i<s.length();i++){ ^ sy...
s050516457
p00723
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct node{ struct node *next['z'-'a'+1]; }node; node *_N; int _count; node *allocNode(){ return &_N[_count++]; } #define MAX (72*(72*6)+2) void init(){ _N=(node *)calloc(sizeof(node),MAX); _count=0; } void reinit(){ memset(_N,0,sizeof(node)...
main.c: In function 'main': main.c:62:16: error: implicit declaration of function 'gets'; did you mean 'get'? [-Wimplicit-function-declaration] 62 | len=strlen(gets(buff)); | ^~~~ | get main.c:62:16: error: passing argument 1 of 'strlen' makes pointer from integer withou...
s529272415
p00723
C
#include <set> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n,s,sv1=0,sv=0; cin >> n; set<string> v1; vector<int> v2(n); int i; for(i=0;i<n;i++){ string tmp,tmp2,t1,t2; cin >> tmp; s = tmp.size(); for(int j=1;j<s;j++){ t1...
main.c:1:10: fatal error: set: No such file or directory 1 | #include <set> | ^~~~~ compilation terminated.
s421988759
p00723
C
#include <set> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n,s,sv1=0,sv=0; cin >> n; set<string> v1; vector<int> v2(n); int i; for(i=0;i<n;i++){ string tmp,tmp2,t1,t2; cin >> tmp; s = tmp.size(); for(int j=1;j<s;j++){ t1...
main.c:1:10: fatal error: set: No such file or directory 1 | #include <set> | ^~~~~ compilation terminated.
s039861843
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main() { string s; cin >> s; set<string> a; int len = s.size(); for (int i = 1; i < len; i++) { // 2個に分割する string f = s.substr(0, i); string b = s.substr(i, len - i); // 逆順の文字列を求める string bf = f; string bb = b; reverse...
a.cc: In function 'int main()': a.cc:23:17: error: 'reverse' was not declared in this scope 23 | reverse(begin(bf), end(bf)); // 逆順にする | ^~~~~~~
s701214405
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main() { string s; cin >> s; set<string> a; int len = s.size(); for (int i = 1; i < len; i++) { // 2個に分割する string f = s.substr(0, i); string b = s.substr(i, len - i); // 逆順の文字列を求める string bf = f; string bb = b; // rever...
a.cc: In function 'int main()': a.cc:26:17: error: 'reverse' was not declared in this scope 26 | reverse(bf.begin(), bf.end()); // 逆順にする | ^~~~~~~
s425048732
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main() { string s; cin >> s; set<string> a; int len = s.size(); for (int i = 1; i < len; i++) { // 2個に分割する string f = s.substr(0, i); string b = s.substr(i, len - i); // 逆順の文字列を求める string bf = f; string bb = b; // rever...
a.cc: In function 'int main()': a.cc:27:22: error: 'reverse' is not a member of 'std' 27 | std::reverse(bf.begin(), bf.end()); // 逆順にする | ^~~~~~~ a.cc:28:22: error: 'reverse' is not a member of 'std' 28 | std::reverse(bb.begin(), bb.end()); // 逆順に...
s061305922
p00723
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <f...
a.cc: In function 'int main()': a.cc:94:61: error: expected ')' before ';' token 94 | set.insert(getreverse(forward+ back); | ~ ^ | )
s624064653
p00723
C++
#include <iostream> #include <set> #inlude <algorithm> using namespace std; int main(){ int m; cin >> m; string s; for(int i=0; i<m; i++){ cin >> s; set<string> ss; ss.insert(s); for(int j=1; j<s.size(); j++){ string l = s.substr(0, j); string r = s.substr(j, n-j); ss.insert(r+l); reverse(l.begi...
a.cc:3:2: error: invalid preprocessing directive #inlude; did you mean #include? 3 | #inlude <algorithm> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:15:48: error: 'n' was not declared in this scope 15 | string r = s.substr(j, n-j); | ...
s932276641
p00723
C++
#include <iostream> #include <set> #inlude <algorithm> using namespace std; int main(){ int m; cin >> m; string s; for(int i=0; i<m; i++){ cin >> s; set<string> ss; ss.insert(s); for(int j=1; j<s.size(); j++){ string l = s.substr(0, j); string r = s.substr(j, s.size()-j); ss.insert(r+l); reverse...
a.cc:3:2: error: invalid preprocessing directive #inlude; did you mean #include? 3 | #inlude <algorithm> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:17:25: error: 'reverse' was not declared in this scope 17 | reverse(l.begin(), l.end()); | ...
s241164952
p00723
C++
#include <iostream> #include <cstring> #include <set> using namespace std; set<string> S; void count_str(string str1, string str2){ string rstr1 = str1; string rstr2 = str2; reverse(rstr1.begin(), rstr1.end()); reverse(rstr2.begin(), rstr2.end()); S.insert(str1+str2); S.insert(str1+rstr2);...
a.cc: In function 'void count_str(std::string, std::string)': a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(rstr1.begin(), rstr1.end()); | ^~~~~~~
s692432249
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main(){ int m; cin >> m; for(int i=0;i<m;i++){ string train; cin >> train; set<string> st; for( int i = 1, length = train.length() ; i < length ; ++i ){ string forward, backward; forward = train.substr(0,i)...
a.cc: In function 'int main()': a.cc:20:7: error: 'reverse' was not declared in this scope 20 | reverse(backward.begin(), backward.end()); | ^~~~~~~
s678089108
p00723
C++
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <iomanip> using namespace std; #define ll long long #define vvi vector< vector<int> > #define All(X) X.begin(),X.end() #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) for(int i=0;i<(int)(n);i++) #define pb push...
a.cc: In function 'int main()': a.cc:23:9: error: 'set' was not declared in this scope 23 | set<string> lines; | ^~~ a.cc:6:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 5 | #include <iomanip> +++ |+#include <set> 6 | a.cc:23:19...
s546666872
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; set<string> set_string; void strage_lines(string up, string down, string depture_line, string reversal_line){ if (up.size() == 0 && down.size() == 0 && reversal_line.size() == 0){ set_string.insert(depture_line); } else{ if (up.size() !...
a.cc: In function 'void strage_lines(std::string, std::string, std::string, std::string)': a.cc:23:25: error: 'reverse' was not declared in this scope 23 | reverse(reversal_line.begin(), reversal_line.end()); | ^~~~~~~
s072826453
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; set<string> set_string; void strage_lines(string up, string down, string depture_line, string reversal_line){ if (up.size() == 0 && down.size() == 0 && reversal_line.size() == 0){ set_string.insert(depture_line); } else{ if (up.size() !...
a.cc: In function 'void strage_lines(std::string, std::string, std::string, std::string)': a.cc:23:25: error: 'reverse' was not declared in this scope 23 | reverse(reversal_line.begin(), reversal_line.end()); | ^~~~~~~
s532167576
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; set<string> set_string; void strage_lines(string up, string down, string depture_line, string reversal_line){ if (up.size() == 0 && down.size() == 0 && reversal_line.size() == 0){ set_string.insert(depture_line); } else{ if (up.size() !...
a.cc: In function 'void strage_lines(std::string, std::string, std::string, std::string)': a.cc:23:25: error: 'reverse' was not declared in this scope 23 | reverse(reversal_line.begin(), reversal_line.end()); | ^~~~~~~
s741856811
p00723
C++
#include<iostream> #include<cstring> #include<cstdlib> #include<set> using namespace std; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ string str; string f,b; set<string> set; cin>>str; set.insert(str); for(int j=1;j<str.size();j++){ f=str.substr(0,j); b=str.substr(j); set...
a.cc: In function 'int main()': a.cc:20:5: error: 'reverse' was not declared in this scope 20 | reverse(f.begin(),f.end()); | ^~~~~~~
s739824901
p00723
C++
#include <iostream> #include <cstring> #include <set> using namespace std; set<string> st; int main(void){ int m; string train; cin >> m; for(int i = 0; i < m; i++){ cin >> train; st.clear(); for(int j = 1; j <= train.size(); j++){ int a = j; string c1o, c2o, c1u, c2u; for(int ...
a.cc: In function 'int main()': a.cc:22:7: error: 'reverse' was not declared in this scope 22 | reverse(c1u.begin(), c1u.end()); | ^~~~~~~
s390287807
p00723
C++
#include <iostream> #include <string> #include <vector> #include <set> using namespace std; namespace Solver { int M; vector<string> ds; inline void Read() { cin >> M; ds.resize(M); for (int i = 0; i < M; i++) cin >> ds[i]; } inline void Work() { for (int i = 0; i...
a.cc: In function 'void Solver::Work()': a.cc:27:17: error: 'reverse' was not declared in this scope 27 | reverse(s[1].begin(), s[1].end()); | ^~~~~~~
s991437045
p00723
C++
#include <iostream> #include <string> #include <vector> #include <set> #include <algoritm> using namespace std; namespace Solver { int M; vector<string> ds; inline void Read() { cin >> M; ds.resize(M); for (int i = 0; i < M; i++) cin >> ds[i]; } inline void Work() { ...
a.cc:5:10: fatal error: algoritm: No such file or directory 5 | #include <algoritm> | ^~~~~~~~~~ compilation terminated.
s140677688
p00723
C++
#include <cstdio> #include <iostream> #include <string> using namespace std; int main(){ long m; scanf(" %ld", &m); for(long i=0; i<m; ++i){ string s; string list[5000]; long count=0; cin >> s; long size=s.size(); for(int j=1; j<=size-1; ++j){ string a=s.substr(0,j) ; string b=s.substr(j,siz...
a.cc: In function 'int main()': a.cc:22:39: error: 'reverse' was not declared in this scope 22 | if(p) reverse(a.begin(), a.end()); | ^~~~~~~ a.cc:25:41: error: 'reverse' was not declared in this scope 25 | ...
s448676805
p00723
C++
#include<iostream> #include<string> #include<set> using namespace std; string reverse(string str){ reverse(str.begin(),str.end()); return str; } int getPattern(string str){ set<string> s; for(int i=0;i<str.size();i++){ string sub1 = str.substr(0,i); string sub2 = str.substr(i,str.size()); s.insert(reverse(s...
a.cc: In function 'std::string reverse(std::string)': a.cc:7:26: error: could not convert 'str.std::__cxx11::basic_string<char>::begin()' from 'std::__cxx11::basic_string<char>::iterator' to 'std::string' {aka 'std::__cxx11::basic_string<char>'} 7 | reverse(str.begin(),str.end()); | ~~...
s763702680
p00723
C++
#include<iostream> #include<string> #include<set> using namespace std; string rev(string str){ reverse(str.begin(),str.end()); return str; } int getPattern(string str){ set<string> s; for(int i=0;i<str.size();i++){ string sub1 = str.substr(0,i); string sub2 = str.substr(i,str.size()); s.insert(rev(sub1)+sub...
a.cc: In function 'std::string rev(std::string)': a.cc:7:9: error: 'reverse' was not declared in this scope 7 | reverse(str.begin(),str.end()); | ^~~~~~~
s004365901
p00723
C++
#include <vector> #include <string> #include <iostream> using namespace std; int main(void) { vector<string> str; string s; cin >> s; for (unsigned int i = 0; i < s.size(); i++){ string str1(s.substr(0, i)); string str2(s.substr(i, s.size() - i)); str.push_back(str1 + str2); str.push_back(str2 + str1)...
a.cc: In function 'int main()': a.cc:20:17: error: 'reverse' was not declared in this scope 20 | reverse(str1.begin(), str1.end()); | ^~~~~~~
s949692816
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int solve(string cars); int main(){ int n; string word; cin >> n; for (int i = 0; i < n; i++){ cin >> word; cout << solve(string word) << endl; } } int solve(string cars){ set<string> s; int n = cars.length; for (int i = 1; i < n;...
a.cc: In function 'int main()': a.cc:15:38: error: expected primary-expression before 'word' 15 | cout << solve(string word) << endl; | ^~~~ a.cc: In function 'int solve(std::string)': a.cc:21:22: error: cannot convert 'std::__cxx11::basic_string<char>::leng...
s275572888
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int solve(string s){ typedef set<string> set_s; set_s S; for(int i=1;i<s.size();i++){ string s1,s1r,s2,s2r,kouho1,kouho2,kouho3,kouho4,kouho5,kouho6,kouho7,kouho8; s1r = s.substr(0,i); reverse(s1r.begin(),s1r...
a.cc: In function 'int solve(std::string)': a.cc:13:9: error: 'reverse' was not declared in this scope 13 | reverse(s1r.begin(),s1r.end()); | ^~~~~~~
s132034700
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int solve(string s){ typedef set<string> set_s; set_s S; for(int i=1;i<s.size();i++){ string s1,s1r,s2,s2r,kouho1,kouho2,kouho3,kouho4,kouho5,kouho6,kouho7,kouho8; s1r = s.substr(0,i); reverse(s1r.begin(),s1r...
a.cc: In function 'int solve(std::string)': a.cc:13:9: error: 'reverse' was not declared in this scope 13 | reverse(s1r.begin(),s1r.end()); | ^~~~~~~
s038506671
p00723
C++
#include <set> #include <string> #include <iostream> using namespace std; int main() { string S; int n; set<string> T; scanf("%d", &n); while(n--) { cin >> S; int c = 0; for(int i = 1; i < S.size(); i++) { c += (S[i - 1] ...
a.cc: In function 'int main()': a.cc:39:31: error: 'reverse' was not declared in this scope 39 | string C = A; reverse(C.begin(), C.end()); | ^~~~~~~
s493292368
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main() { int n; cin >> n; while(n--){ set<string> district; string train; cin >> train; for(int i = 0; i < train.size(); i++){ string f = train.substr(0, i); string b = train.substr(i, train.size() - i); ...
a.cc: In function 'int main()': a.cc:18:7: error: 'reverse' was not declared in this scope 18 | reverse(f.begin(), f.end()); | ^~~~~~~
s079471910
p00723
C++
#define rep(i, j) for(int i = 0; i < j; i++) #define all(i) i.begin(), i.end() #define ll long long #define bl bool #define nn printf("\n"); #define mod 1000000007 #define rvs(i) reverse( i.begin(), i.end() ) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int m = 0; cin >> m; rep(i, m...
a.cc: In function 'int main()': a.cc:13:9: error: 'cin' was not declared in this scope 13 | cin.tie(0); | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #define rep(i, j) for(int i = ...
s706286148
p00723
C++
#include <bits/stdc++.h> #define all(a) (a).begin(),(a).end() #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ int m; scanf("%d",&m); while(m-->0){ set <string> s; string t; cin >> t; s.insert(t); reverse(all(t)); s.insert(t); reverse(all(t)); rep1(i,t.s...
a.cc: In function 'int main()': a.cc:20:10: error: 'i' was not declared in this scope 20 | rep1(i,t.size()){ | ^ a.cc:20:5: error: 'rep1' was not declared in this scope; did you mean 'rep'? 20 | rep1(i,t.size()){ | ^~~~ | rep
s145591476
p00723
C++
#include <iostream> #include <vector> #include <string> int whatKindOf(std::string); int main() { int n; std::string str; std::cin >> n; for(int i=0; i<n; i++){ std::cin >> str; std::cout << whatKindOf(str) << std::endl; for(unsigned int i=0; i<str.length(); i++) str[i] = '\0'; } return 0; } int whatKind...
a.cc: In function 'int whatKindOf(std::string)': a.cc:37:22: error: 'reverse' is not a member of 'std' 37 | std::reverse(t1_r.begin(), t1_r.end()); | ^~~~~~~ a.cc:38:22: error: 'reverse' is not a member of 'std' 38 | std::reverse(t2_r.begin(), t2_r.end())...
s908271072
p00723
C++
#include <iostream> #include <vector> #include <string> int whatKindOf(std::string); int main() { int n; std::string str; std::cin >> n; for(int i=0; i<n; i++){ std::cin >> str; std::cout << whatKindOf(str) << std::endl; for(unsigned int i=0; i<str.length(); i++) str[i] = '\0'; } return 0; } int whatKind...
a.cc: In function 'int whatKindOf(std::string)': a.cc:37:22: error: 'reverse' is not a member of 'std' 37 | std::reverse(t1_r.begin(), t1_r.end()); | ^~~~~~~ a.cc:38:22: error: 'reverse' is not a member of 'std' 38 | std::reverse(t2_r.begin(), t2_r.end())...
s074936777
p00723
C++
#include <iostream> #include <vector> #include <string> using namespace std; int count( string str ); bool check( string str, vector<string> & sv); int main(int argc, char const *argv[]) { int m, sum; string str; vector<int> v; cin>>m; for (int i = 0; i < m; i++) { cin>>str; sum ...
a.cc: In function 'int count(std::string)': a.cc:44:9: error: 'reverse' was not declared in this scope 44 | reverse(second.begin(), second.end()); | ^~~~~~~
s147140709
p00723
C++
#include <iostream> #include <vector> #include <string> using namespace std; int count( string str ); bool check( string str, vector<string> & sv); int main(int argc, char const *argv[]) { int m, sum; string str; vector<int> v; cin>>m; for (int i = 0; i < m; i++) { cin>>str; sum ...
a.cc: In function 'int count(std::string)': a.cc:44:9: error: 'reverse' was not declared in this scope 44 | reverse(second.begin(), second.end()); | ^~~~~~~
s549232071
p00723
C++
#include <iostream> #include <vector> #include <string> using namespace std; int count( string str ); bool check( string str, vector<string> & sv); int main(int argc, char const *argv[]) { int m, sum; string str; vector<int> v; cin>>m; for (int i = 0; i < m; i++) { cin>>str; sum ...
a.cc: In function 'int count(std::string)': a.cc:44:9: error: 'reverse' was not declared in this scope 44 | reverse(second.begin(), second.end()); | ^~~~~~~
s604817366
p00723
C++
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int t; cin >> t; for(int i=0;i<t;i++){ string x; cin >> x; set<string> st; for( int i = 1, length = x.length() ; i < length ; ++i ){ string left, right; left = x.substr(0,i); ...
a.cc: In function 'int main()': a.cc:28:17: error: 'light' was not declared in this scope; did you mean 'right'? 28 | st.insert(light+right); | ^~~~~ | right
s094819042
p00723
C++
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int t; cin >> t; for(int i=0;i<t;i++){ string x; cin >> x; set<string> s; for( int i = 1, length = x.length() ; i < length ; ++i ){ string left, right; ?????????left = x.subs...
a.cc: In function 'int main()': a.cc:18:1: error: expected primary-expression before '?' token 18 | ?????????left = x.substr(0,i); | ^ a.cc:18:2: error: expected primary-expression before '?' token 18 | ?????????left = x.substr(0,i); | ^ a.cc:18:3: error: expected primary-expression before '?' token ...
s487096532
p00723
C++
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int t; cin >> t; for(int i=0;i<t;i++){ string x; cin >> x; set<string> st; for( int i = 1, length = x.length() ; i < length ; ++i ){ string left, right; ???left = x.substr(0,i...
a.cc: In function 'int main()': a.cc:17:7: error: expected primary-expression before '?' token 17 | ???left = x.substr(0,i); | ^ a.cc:17:8: error: expected primary-expression before '?' token 17 | ???left = x.substr(0,i); | ^ a.cc:17:9: error: expected primary-expression befor...
s334261085
p00723
C++
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int t; cin >> t; for(int i=0;i<t;i++){ string x; cin >> x; set<string> st; for( int i = 1, length = x.length() ; i < length ; ++i ){ string left, right; ???left = x.substr(0,i...
a.cc: In function 'int main()': a.cc:17:7: error: expected primary-expression before '?' token 17 | ???left = x.substr(0,i); | ^ a.cc:17:8: error: expected primary-expression before '?' token 17 | ???left = x.substr(0,i); | ^ a.cc:17:9: error: expected primary-expression befor...
s168881519
p00723
C++
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int m; cin >> m; for(int i=0;i<m;i++){ string x; cin >> x; set<string> st; for( int i = 1, length = x.length() ; i < length ; ++i ){ string left, right; ???left = x.substr(0,i...
a.cc: In function 'int main()': a.cc:17:7: error: expected primary-expression before '?' token 17 | ???left = x.substr(0,i); | ^ a.cc:17:8: error: expected primary-expression before '?' token 17 | ???left = x.substr(0,i); | ^ a.cc:17:9: error: expected primary-expression befor...
s057564182
p00723
C++
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int m; cin >> m; for(int i=0;i<m;i++){ string train; cin >> train; set<string> st; for( int i = 1, length = train.length() ; i < length ; ++i ){ string left, right; ???left = ...
a.cc: In function 'int main()': a.cc:17:7: error: expected primary-expression before '?' token 17 | ???left = train.substr(0,i); | ^ a.cc:17:8: error: expected primary-expression before '?' token 17 | ???left = train.substr(0,i); | ^ a.cc:17:9: error: expected primary-expressi...
s036588485
p00723
C++
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int m; cin >> m; for(int i=0;i<m;i++){ string train; cin >> train; set<string> st; for( int i = 1, length = train.length() ; i < length ; ++i ){ string x, y; ???x = train.subs...
a.cc: In function 'int main()': a.cc:17:7: error: expected primary-expression before '?' token 17 | ???x = train.substr(0,i); | ^ a.cc:17:8: error: expected primary-expression before '?' token 17 | ???x = train.substr(0,i); | ^ a.cc:17:9: error: expected primary-expression bef...
s993870424
p00723
C++
#include <string> #include <iostream> #include <set> using namespace std; int main(){ int n; cin >> n; for(int i=0;i<n;i++){ string train,former,latter; cin >> train; typedef set<string> set_t; set_t C; for(int divp=1;divp<train.size();divp++){ former=tra...
a.cc: In function 'int main()': a.cc:19:13: error: 'reverse' was not declared in this scope 19 | reverse(former.begin(),former.end()); | ^~~~~~~
s063591268
p00723
C++
#include <string> #include <iostream> #include <set> using namespace std; int main(){ int n; cin >> n; for(int i=0;i<n;i++){ string train,former,latter; cin >> train; typedef set<string> set_t; set_t C; for(int divp=1;divp<train.size();divp++){ former=tra...
a.cc: In function 'int main()': a.cc:19:13: error: 'reverse' was not declared in this scope 19 | reverse(former.begin(),former.end()); | ^~~~~~~
s833275696
p00723
C++
#include <iostream> #include <unordered_set> #include <string> #include <cstdlib> #include <utility> using namespace std; void str_ins(string str, unordered_set<string> table) { //if(table.count(str) == 0) table.insert(str); } int main() { int m; string train; cin >> m; for(int i = 0; i ...
a.cc: In function 'int main()': a.cc:31:13: error: 'reverse' was not declared in this scope 31 | reverse(strs[0].begin(), strs[0].end()); | ^~~~~~~
s161708752
p00723
C++
#include <iostream> #include <set> /* Organize Your Train part II(http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1142) ?§£?????????:??????L?????????????????????????????????????????????????????????L-1???????????????????????¢????????????4???????????\???????????????????????????2????????????????????£????????????...
a.cc: In function 'int main()': a.cc:30:9: error: 'reverse' was not declared in this scope 30 | reverse(sub1.begin(),sub1.end()); | ^~~~~~~
s573422253
p00723
C++
#include <iostream> #include <string> #include <set> #include <algorithm> using namespace std; int main(){ int m; cin >> m; set<string> pattern; for(int i=0;i<m;i++){ string arrival; cin >> arrival; for(int j=1;j<arrival.size();j++){ string train[]; train[0]=arrival.substr(0,j); ...
a.cc: In function 'int main()': a.cc:16:14: error: array size missing in 'train' 16 | string train[]; | ^~~~~ a.cc:19:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push' 19 | pattern.push(train[0]+train[1]); | ^~~~ a.cc:20:15...
s433513163
p00723
C++
#include <iostream> #include <string> #include <set> #include <algorithm> using namespace std; int main(){ int m; cin >> m; set<string> pattern; for(int i=0;i<m;i++){ string arrival; cin >> arrival; for(int j=1;j<arrival.size();j++){ string train[2]; train[0]=arrival.substr(0,j); ...
a.cc: In function 'int main()': a.cc:19:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push' 19 | pattern.push(train[0]+train[1]); | ^~~~ a.cc:20:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push' 20 | patt...
s801148934
p00723
C++
#include <iostream> #include <vector> #define REP(i, a, n) for(int i = (a); i < (n); i++) using namespace std; int M; int tohash(string s) { int h = 0; int k = 1; REP(i, 0, s.length()) { h += k * (s[i] - 'a'); k *= 26; } return h; } bool unique(string s, vector<int> &v) { int h = tohash(s); int...
a.cc: In function 'int main()': a.cc:36:7: error: 'reverse' was not declared in this scope 36 | reverse(r1.begin(), r1.end()); | ^~~~~~~
s951123580
p00723
C++
#include <iostream> #include <vector> #define REP(i, a, n) for(int i = (a); i < (n); i++) using namespace std; int M; int tohash(string s) { int h = 0; int k = 1; REP(i, 0, s.length()) { h += k * (s[i] - 'a'); k *= 26; } return h; } bool unique(string s, vector<int> &v) { int h = tohash(s); int...
a.cc: In function 'int main()': a.cc:36:7: error: 'reverse' was not declared in this scope 36 | reverse(r1.begin(), r1.end()); | ^~~~~~~
s810118942
p00723
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int m, l, ans; string s, t, u; vector<string> V; vector< vector<string> > H(2); cin >> m; for (int i = 0; i < m; ++i){ cin >> s; V.push_back(s); l = s.length(); ans = 1; for (int j = 1; j < l; ++j) ...
a.cc: In function 'int main()': a.cc:45:5: error: 'sort' was not declared in this scope; did you mean 'short'? 45 | sort(V.begin(), V.end()); | ^~~~ | short
s616419720
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main() { string s; cin >> s; set<string> a; int len = s.size(); for (int i = 1; i < len; i++) { // 2?????????????????? string f = s.substr(0, i); string b = s.substr(i, len - i); // ??????????????????????±??????? string bf...
a.cc: In function 'int main()': a.cc:23:17: error: 'reverse' was not declared in this scope 23 | reverse(begin(bf), end(bf)); // ??????????????? | ^~~~~~~
s848786481
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main() { string s; cin >> s; set<string> a; int len = s.size(); for (int i = 1; i < len; i++) { // 2?????????????????? string f = s.substr(0, i); string b = s.substr(i, len - i); // ??????????????????????±??????? string bf...
a.cc: In function 'int main()': a.cc:23:17: error: 'reverse' was not declared in this scope 23 | reverse(begin(bf), end(bf)); // ??????????????? | ^~~~~~~
s962417305
p00723
C++
#include <iostream> #include <string> #include <set> using namespace std; int main() { string s; cin >> s; set<string> a; int len = s.size(); for (int i = 1; i < len; i++) { // 2?????????????????? string f = s.substr(0, i); string b = s.substr(i, len - i); // ??????????????????????±??????? string bf...
a.cc: In function 'int main()': a.cc:23:17: error: 'reverse' was not declared in this scope 23 | reverse(begin(bf), end(bf)); // ??????????????? | ^~~~~~~
s168873424
p00723
C++
#if 0 http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1142&lang=jp #endif #include <iostream> #include <string> #include <unordered_set> #define FOR(var, start, count) for(int var=start; var<count; var++) #define REP(var, count) FOR(var,0,count) using namespace std; int main(void) { int M; cin >> M; RE...
a.cc: In function 'int main()': a.cc:30:25: error: 'reverse' was not declared in this scope 30 | reverse(s[0][0].begin(), s[0][0].end()); | ^~~~~~~
s349638864
p00723
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int M; string s; string half1,half2,temp; int count,R1,R2,equal; vector<string> train; cin >> M; for (int i=0;i<M;i++) { train.clear(); cin >> s; count = 0; for(int j=1;j<s.length();j++) { //???????????????????...
a.cc: In function 'int main()': a.cc:41:49: error: 'reverse' was not declared in this scope 41 | reverse(half1.begin(),half1.end()); | ^~~~~~~ a.cc:44:49: error: 'reverse' was not declared in this scope 44 | ...
s428038561
p00723
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int M; string s; string half1,half2,temp; int count,R1,R2,equal; vector<string> train; cin >> M; for (int i=0;i<M;i++) { train.clear(); cin >> s; count = 0; for(int j=1;j<s.length();j++) { //???????????????????...
a.cc: In function 'int main()': a.cc:41:49: error: 'reverse' was not declared in this scope 41 | reverse(half1.begin(),half1.end()); | ^~~~~~~ a.cc:44:49: error: 'reverse' was not declared in this scope 44 | ...
s797227784
p00723
C++
#include <iostream> #include <algorithm> using namespace std; const int MAXN=1024; const int HASHLEN=1000024; int n,cnt; char s[MAXN],s1[MAXN],s2[MAXN],s3[MAXN],s4[MAXN]; struct HashNode{ char str[MAXN]; HashNode *nxt; }; HashNode* head[HASHLEN]; void insert(char *a,char *b) { char...
a.cc: In function 'void insert(char*, char*)': a.cc:19:9: error: 'strcpy' was not declared in this scope 19 | strcpy(c,a); | ^~~~~~ a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <c...
s879401153
p00723
C++
#include <iostream> #include <algorithm> using namespace std; const int MAXN=1024; const int HASHLEN=1000024; int n,cnt; char s[MAXN],s1[MAXN],s2[MAXN],s3[MAXN],s4[MAXN]; struct HashNode{ char str[MAXN]; HashNode *nxt; }; HashNode* head[HASHLEN]; void insert(char *a,char *b) { char...
a.cc: In function 'void insert(char*, char*)': a.cc:19:9: error: 'strcpy' was not declared in this scope 19 | strcpy(c,a); | ^~~~~~ a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <c...
s483374499
p00723
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; const int MAXN=1024; const int HASHLEN=1000024; int n,cnt; char s[MAXN],s1[MAXN],s2[MAXN],s3[MAXN],s4[MAXN]; struct HashNode{ char str[MAXN]; HashNode *nxt; }; HashNode* head[HASHLEN]; void insert(char *a,char...
a.cc: In function 'void insert(char*, char*)': a.cc:19:9: error: 'strcpy' was not declared in this scope 19 | strcpy(c,a); | ^~~~~~ a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <c...
s595925131
p00723
C++
#include<iostream> #include<string> #include<set> using namespace std; int main() { int m; cin >> m; for (int i = 0; i < m; ++i) { set<string> set; string s; cin >> s; set.insert(s); for (int i = 1; i < s.size(); ++i) { string front = s.substr(0, i); ...
a.cc: In function 'int main()': a.cc:19:13: error: 'reverse' was not declared in this scope 19 | reverse(frontrev.begin(), frontrev.end()); | ^~~~~~~
s390345325
p00723
C++
#include <iostream> #include <set> #include <string> using namespace std; int main(void){ int n; cin >> n; while(n--){ string s; cin >> s; set<string> ans; for(int i=1;i<s.size();i++){ string a = s.substr(0,i); string b = s.substr(i); string ra=a,rb=b; reverse(ra.begin(), ra.end()); reverse(r...
a.cc: In function 'int main()': a.cc:17:25: error: 'reverse' was not declared in this scope 17 | reverse(ra.begin(), ra.end()); | ^~~~~~~
s172622179
p00723
C++
#include <iostream> #include <set> #include <string> using namespace std; int main(void){ int n; cin >> n; while(n--){ string s; cin >> s; set<string> ans; for(int i=1;i<s.size();i++){ string a = s.substr(0,i); string b = s.substr(i); string ra=a,rb=b; reverse(ra.begin(), ra.end()); reverse(r...
a.cc: In function 'int main()': a.cc:17:25: error: 'reverse' was not declared in this scope 17 | reverse(ra.begin(), ra.end()); | ^~~~~~~
s116802447
p00723
C++
#include <iostream> #include <set> #include <string> using namespace std; int main(void){ int n; cin >> n; while(n--){ string s; cin >> s; set<string> ans; for(int i=1;i<s.size();i++){ string a = s.substr(0,i); string b = s.substr(i); string ra=a,rb=b; reverse(ra.begin(), ra.end()); reverse(r...
a.cc: In function 'int main()': a.cc:17:25: error: 'reverse' was not declared in this scope 17 | reverse(ra.begin(), ra.end()); | ^~~~~~~
s461649919
p00723
C++
# ifdef _MSVC_LANG # define _SCL_SECURE_NO_WARNINGS # pragma warning( disable : 0325 ) // inline namespace Error # endif # include <iostream> # include <string> # include <iomanip> # include <cstdio> # include <array> # include <numeric> # include <algorithm> # include <vector> # include <functional> # include <fs...
a.cc:121:178: error: wrong number of template arguments (1, should be 2) 121 | template< template<class ...> class Container, class ... Args, typename = meta::coming::enable_if_t<!std::is_same< typename Container, typename std::basic_string> ::value> > | ...
s534240172
p00723
C++
#include<iostream> #include<set> #include<string> #define rep(i,n) for(int i=0;i<n;i++) #define rv(c) reverse(c.begin(),c.end()) #define is(a) insert(a) using namespace std; int main(){ int N; cin>>N; rep(n,N){ string T,t[2]; set<string> s; cin>>T; rep(i,T.size()-1)rep(j,4){ t[0]=T.substr(0,i+1),t[1]=T.subst...
a.cc: In function 'int main()': a.cc:5:15: error: 'reverse' was not declared in this scope 5 | #define rv(c) reverse(c.begin(),c.end()) | ^~~~~~~ a.cc:15:45: note: in expansion of macro 'rv' 15 | rep(k,2)if(j&(1<<k))rv(t[k]); | ...
s674573136
p00723
C++
include<cstdio> #include<string> #include<vector> #include<algorithm> using namespace std; int count (string rs) { vector<string> se; string sa,sb,rsa,rsb,rsb2,s; s = rs; reverse(rs.begin(), rs.end() ); for(int i=0; i<s.length(); i++) { rsa = s.substr(0,i); rsb = s.substr(i,s.length()-i); sa...
a.cc:1:1: error: 'include' does not name a type 1 | include<cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type ...
s358753666
p00723
C++
#include <cstdio> #include <iostream> #include <string> #include <set> #include <vector> #include <list> #include <algorithm> using namespace std; #define rev(s) (vector<char>((s).rbegin(), (s).rend())) #define HASH_SIZE 2011 #define a 1049 int hash(vector<char> str) { int n = 0; int pow = 1; for (unsigned int...
a.cc: In member function 'bool hash_table::operator[](std::vector<char>)': a.cc:31:15: error: reference to 'hash' is ambiguous 31 | int key = hash(str); | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, ...
s855950072
p00723
C++
#include <cstdio> #include <iostream> #include <string> #include <set> #include <vector> #include <list> #include <algorithm> using namespace std; #define rev(s) (vector<char>((s).rbegin(), (s).rend())) #define HASH_SIZE 2011 #define a 1049 int hash(vector<char> str) { int n = 0; int pow = 1; for (unsigned int...
a.cc: In member function 'bool hash_table::operator[](std::vector<char>)': a.cc:31:15: error: reference to 'hash' is ambiguous 31 | int key = hash(str); | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, ...
s326846915
p00723
C++
#include <iostream> #include <string> #include <set> #include <vector> #include <list> #include <algorithm> #include <stdio.h> using namespace std; #define rev(s) (vector<char>((s).rbegin(), (s).rend())) #define HASH_SIZE 2011 #define a 1049 int hash(vector<char> str) { int n = 0; int pow = 1; for (unsigned in...
a.cc: In member function 'bool hash_table::operator[](std::vector<char>)': a.cc:31:15: error: reference to 'hash' is ambiguous 31 | int key = hash(str); | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, ...
s020316053
p00723
C++
#include <cstdio> #include <iostream> #include <string> #include <set> #include <vector> #include <list> #include <algorithm> using namespace std; #define rev(s) (vector<char>((s).rbegin(), (s).rend())) #define HASH_SIZE 2011 #define a 1049 int hash(vector<char> str) { int n = 0; int pow = 1; for (unsigned int...
a.cc: In member function 'bool hash_table::operator[](std::vector<char>)': a.cc:31:15: error: reference to 'hash' is ambiguous 31 | int key = hash(str); | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, ...