submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s500985070
p03672
C++
#include <bits/stdc++.h> using namespace std; bool func(stirng s) { for(int i = 0;i < n / 2;i++) { if(s.at(i) != s.at(i + n / 2)) { return false; } } return true; } int main() { string s; cin >> s; while() { s.pop_back(); s.pop_back(); if(func(s)) { cout << s.size() << endl; ...
a.cc:3:11: error: 'stirng' was not declared in this scope 3 | bool func(stirng s) { | ^~~~~~ a.cc: In function 'int main()': a.cc:14:9: error: expected primary-expression before ')' token 14 | while() { | ^ a.cc:17:12: error: 'func' cannot be used as a function 17 | if(func...
s994296003
p03672
Java
import java.util.*; public class Main{ public static void main(Stirng[] args){ Scanner sc = new Scanner(System.in); String s = sc.next(); boolean p = true; int n = 0; s = s.substring(0,s.length()-1); while(p){ s = s.substring(0,n-1); n = s.length(); if(n%2==0 &...
Main.java:3: error: cannot find symbol public static void main(Stirng[] args){ ^ symbol: class Stirng location: class Main 1 error
s010534226
p03672
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int s=S.size(); int ans; for (int i=s/2;i>0;i--){ bool a=true for (int j=0;j<i;j++){ if (S[j]!=S[j+i]){ a=false; } } if (a){ ans=i*2; break; } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:5: error: expected ',' or ';' before 'for' 11 | for (int j=0;j<i;j++){ | ^~~ a.cc:11:18: error: 'j' was not declared in this scope 11 | for (int j=0;j<i;j++){ | ^
s934785988
p03672
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int s=S.size(); int ans; for (i=s/2;i>0;i--){ bool a=true for (int j=0;j<i;j++){ if (S[j]!=S[j+i]){ a=false; } } if (a){ ans=i*2; break; } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:8: error: 'i' was not declared in this scope 9 | for (i=s/2;i>0;i--){ | ^ a.cc:11:5: error: expected ',' or ';' before 'for' 11 | for (int j=0;j<i;j++){ | ^~~ a.cc:11:18: error: 'j' was not declared in this scope 11 | for (int j=0;j<i;j++...
s422856294
p03672
C++
#include <bits/stdc++.h> using namespace std; // マクロ #define rep(i,n) for (int i = 0; i < (int)(n); i++) // 型エイリアス using ll = long long; using vi = vector<int>; using vs = vector<string>; using vvi = vector<vi>; using vvs = vector<vs>; int main() { string s; cin >> s; int ans = 0; int stlen = s.size();...
a.cc: In function 'int main()': a.cc:24:6: error: expected '}' at end of input 24 | } | ^ a.cc:12:12: note: to match this '{' 12 | int main() { | ^
s654865017
p03672
C
#include<stdio.h> #include<string.h> int main(){ char s[201]; char t[100]; char u[100]; int i,ans; scanf("%s",s); int len=strlen(s); for(i=1; i<=(len/2); i++){ len=len-2*i; strncpy(t,s+0,len/2); strncpy(u,s+(len/2)-1,len/2); if(strncmp(t,u)==0){ ans=len; break; } } pri...
main.c: In function 'main': main.c:14:8: error: too few arguments to function 'strncmp' 14 | if(strncmp(t,u)==0){ | ^~~~~~~ In file included from main.c:2: /usr/include/string.h:159:12: note: declared here 159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n) | ...
s680815507
p03672
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<(int)(n);i++) #define fs first #define sc second typedef pair<ll, ll> l_l; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) int main(){ string s; cin>>s; while...
a.cc: In function 'int main()': a.cc:17:7: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 17 | s.push_back; | ~~^~~~~~~~~ In file include...
s998029973
p03672
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<(int)(n);i++) #define fs first #define sc second typedef pair<ll, ll> l_l; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) int main(){ string s cin>>s; while(...
a.cc: In function 'int main()': a.cc:15:3: error: expected initializer before 'cin' 15 | cin>>s; | ^~~ a.cc:17:5: error: 's' was not declared in this scope; did you mean 'sc'? 17 | s.push_back; | ^ | sc a.cc:21:9: error: 's' was not declared in this scope; did you mean 'sc'? 2...
s228842772
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(;;){ pop_back(s); pop_back(s); for(int j=0;;j++){ if(s[j]!=s[j+s.size()/2]) break; if(j==s.size()/2-1){ cout<<s.size()<<endl; return 0; ...
a.cc: In function 'int main()': a.cc:8:9: error: 'pop_back' was not declared in this scope 8 | pop_back(s); | ^~~~~~~~
s652257604
p03672
C++
// template #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<long long, long long> LP; #define INF 999999999 #define MOD 1000000007 #define REP(i, n) for(int i = 0, i##_len = (n); i < i##_len; ++i) #define REP_AB(i, a, b) for (int i = int(a); i <= int(b); ++i) #define ALL(v) v.begin(...
a.cc: In function 'int main()': a.cc:38:16: error: expected '(' before 's' 38 | if s[j] != s[i/2 + j]{ | ^ | ( a.cc:43:22: error: no matching function for call to 'max(ll&, int&)' 43 | ans = max(ans, i); | ~~~^~~~~~~~ In fil...
s515469964
p03672
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i++) #define repf(i,a,b) for (int i = (a); i < (b); i++) #define repi(i,a,b) for (int i = (a); i <= (b); i++) #define repr(i,a,b) for (int i = (a); i >= (b); i--) #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define debug...
a.cc: In function 'int main()': a.cc:26:16: error: 'str' was not declared in this scope; did you mean 'std'? 26 | if(strncmp(str; str+i/2; i/2)==0) { | ^~~ | std a.cc:26:19: error: expected ')' before ';' token 26 | if(strncmp(str; str+i/2; i/2)==0) { | ...
s973329055
p03672
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i++) #define repf(i,a,b) for (int i = (a); i < (b); i++) #define repi(i,a,b) for (int i = (a); i <= (b); i++) #define repr(i,a,b) for (int i = (a); i >= (b); i--) #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define debug...
a.cc: In function 'int main()': a.cc:26:16: error: 'str' was not declared in this scope; did you mean 'std'? 26 | if(strncmp(str, str+i/2, i/2)==0) { | ^~~ | std
s986389942
p03672
C
#include <stdio.h> #include <string.h> int main(){ char s[201]; scanf("%s",s); int n=strlen(s); int m=n; for(int i=n-2;i;i-2){ if((strncmp(s,s+i/2,i/2)=0){ printf("%d",i); return 0; } } }
main.c: In function 'main': main.c:9:29: error: lvalue required as left operand of assignment 9 | if((strncmp(s,s+i/2,i/2)=0){ | ^ main.c:9:32: error: expected ')' before '{' token 9 | if((strncmp(s,s+i/2,i/2)=0){ | ~ ^ | ...
s880396157
p03672
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; if(s.size()=2) cout<<1<<endl; else{ if(s.size()%2!=0) s=s.substr(0,s.size()-1); else s=s.substr(0,s.size()-2); int size=s.size(); for(int i=0; i<size/2;i++){ string s1,s2; s1=s.substr(0,size/2); s2=s.su...
a.cc: In function 'int main()': a.cc:6:12: error: lvalue required as left operand of assignment 6 | if(s.size()=2) cout<<1<<endl; | ~~~~~~^~
s883886062
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s,t; cin >> s; int ans; t=s for (int i=0;i<t.size()/2;i++){ s=s.substr(0,s.size()-2); if(s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2)){ break; } } cout << s.size() << endl; }
a.cc: In function 'int main()': a.cc:7:6: error: expected ';' before 'for' 7 | t=s | ^ | ; 8 | for (int i=0;i<t.size()/2;i++){ | ~~~ a.cc:8:16: error: 'i' was not declared in this scope 8 | for (int i=0;i<t.size()/2;i++){ | ^
s213818367
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; for(int i=S.size()-2;i>=0;i--){ if(i%2==0){ continue; } else{ string T; for(int j=0;j<i+1;j++){ T.at(j)=S.at(j); } string U=T; revers(T.begin(),T.end()); if(U==T){ cout<<T.size()<<endl; b...
a.cc: In function 'int main()': a.cc:18:6: error: 'revers' was not declared in this scope 18 | revers(T.begin(),T.end()); | ^~~~~~
s997352985
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; for(int i=S.size()-2;i>=0;i--){ if(i%2==0){ continue; } else{ string T(i); for(int j=0;j<i+1;j++){ T.at(j)=S.at(j); } string U=T; revers(T.begin(),T.end()); if(U==T){ cout<<T.size()<<endl; ...
a.cc: In function 'int main()': a.cc:12:11: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)' 12 | string T(i); | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include...
s051694143
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; for(int i==S.size()-2;i>=0;i--){ if(i%2==0){ continue; } else{ string T(i); for(int j=0;j<i+1;j++){ T.at(j)=S.at(j); } string U=T; revers(T.begin(),T.end()); if(U==T){ cout<<T.size()<<endl; ...
a.cc: In function 'int main()': a.cc:7:12: error: expected ';' before '==' token 7 | for(int i==S.size()-2;i>=0;i--){ | ^~ | ; a.cc:7:12: error: expected primary-expression before '==' token 7 | for(int i==S.size()-2;i>=0;i--){ | ^~ a.cc:7:29: error: expect...
s811339255
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; for(int i=S.size()-2;i>=0;i--){ int X=0; vector<int>vec(26); for(int s=0;s<26;s++){ vec.at(s)=0; } for(int j=0;j<i+1;j++){ int Y=S.at(j)-'a'; vec.at(Y)++; } for(int k=0;k<26;k++){ ...
a.cc: In function 'int main()': a.cc:31:4: error: expected '}' at end of input 31 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s503197939
p03672
C++
using namespace std; #include <bits/stdc++.h> #define rep(i, s) for (int i = 0; i < s; ++i) #define repr(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define all(v) (v.begin(), v.end()) #define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i) #define VEC...
a.cc: In function 'int main()': a.cc:38:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s674540905
p03672
C++
using namespace std; #include <bits/stdc++.h> #define rep(i, s) for (int i = 0; i < s; ++i) #define repr(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define all(v) (v.begin(), v.end()) #define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i) #define VEC...
a.cc: In function 'int main()': a.cc:35:3: error: 'ans' was not declared in this scope; did you mean 'abs'? 35 | ans=0; | ^~~ | abs a.cc: At global scope: a.cc:51:1: error: expected declaration before '}' token 51 | } | ^
s968712208
p03672
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:88:13: error: invalid operands of types '<unresolved overloaded function type>' and 'll' {aka 'long long int'} to binary 'operator==' 88 | if(count==(k/2)){ | ~~~~~^~~~~~~
s030636989
p03672
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:87:13: error: invalid operands of types '<unresolved overloaded function type>' and 'll' {aka 'long long int'} to binary 'operator==' 87 | if(count==k/2){ | ~~~~~^~~~~
s995214551
p03672
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:87:13: error: invalid operands of types '<unresolved overloaded function type>' and 'll' {aka 'long long int'} to binary 'operator==' 87 | if(count==k/2){ | ~~~~~^~~~~
s881095341
p03672
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:82:7: error: expected ',' or ';' before 'if' 82 | if(s[i]!=s[i/2+i]){ | ^~ a.cc:85:7: error: 'else' without a previous 'if' 85 | else count++; | ^~~~ a.cc:87:13: error: invalid operands of types '<unresolved overloaded function type>' and 'l...
s718254267
p03672
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:79:19: error: expected ';' before '>' token 79 | for(ll k=(a-2),k>0,k+=2){ | ^ | ; a.cc:79:19: error: expected primary-expression before '>' token a.cc:79:26: error: expected ';' before ')' token 79 | for(ll k=(a-2),k>0,k+=2)...
s434143447
p03672
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:79:19: error: expected ';' before '>' token 79 | for(ll k=(a-2),k>0,i+=2){ | ^ | ; a.cc:79:19: error: expected primary-expression before '>' token a.cc:79:22: error: 'i' was not declared in this scope 79 | for(ll k=(a-2),k>0,...
s528261056
p03672
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:79:19: error: expected ';' before '>' token 79 | for(ll k=(a-2),k>0,i+=2){ | ^ | ; a.cc:79:19: error: expected primary-expression before '>' token a.cc:79:22: error: 'i' was not declared in this scope 79 | for(ll k=(a-2),k>0,...
s976247397
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; for(int i=0;i<S.size();i++){ S.pop_back(); if(S.size()%2==0){ for(int j=0;j<S.size()/2;j++){ if(S.at(j)!=S.at(S.size()/2+j)){ break; } if(j==S.size()/2-1){ cout<<S.size()<<endl; } if(S.size()==0...
a.cc: In function 'int main()': a.cc:22:9: error: expected '}' at end of input 22 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s199176779
p03672
C++
#include<iostream> using namespace std; int main() { string S; cin >> S; int A = S.size() / 2; for(int i = 0;i < A / 2;i++) { S.push_back(); S.push_back(); bool B = true; for(int j = 0;j < S.size();j++) { if(S.at(j) != S.at(S.size() / 2 + j) { B = false; break; } ...
a.cc: In function 'int main()': a.cc:9:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()' 9 | S.push_back(); | ~~~~~~~~~~~^~ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s546293267
p03672
C++
#include<iostream> using namespace std; int main() { string S; cin >> S; int A = S.size() / 2; for(int i = 0;i < C / 2;i++) { S.push_back(); S.push_back(); bool B = true; for(int j = 0;j < S.size();j++) { if(S.at(j) != S.at(S.size() / 2 + j) { B = false; break; } ...
a.cc: In function 'int main()': a.cc:8:21: error: 'C' was not declared in this scope 8 | for(int i = 0;i < C / 2;i++) { | ^ a.cc:9:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()' 9 | S.push_back(); | ~~~~~~~~~~~^~ In file incl...
s714850215
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; int count=0; for(int i=0;i<S.size();i++){ S.pop_back(); count++; if(S.size%2==0){ for(int j=0;j<S.size()/2;j++){ if(S.at(j)!=S.at(S.size()/2+j){ break; } if(j==S.size()/2-1){ cout<<count<<endl; ...
a.cc: In function 'int main()': a.cc:11:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s207502520
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; int count=0; for(int i=0;i<S.size();i++){ A.pop_back(); count++; if(S.size%2==0){ for(int j=0;j<S.size()/2;j++){ if(S.at(j)!=S.at(S.size()/2+j){ break; } if(j==S.size()/2-1){ cout<<count<<endl; ...
a.cc: In function 'int main()': a.cc:9:5: error: 'A' was not declared in this scope 9 | A.pop_back(); | ^ a.cc:11:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = c...
s393468197
p03672
C++
#include<iostream> #include<string> #include<stdio.h> using namespace std; char s[222]; int main(){ cin >> s; int n = strlen(s); for(int i = n - 2; i >= 0; i -= 2){ if(strncmp(s, s + i / 2, i / 2) == 0){ cout << i << endl; return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:11:11: error: 'strlen' was not declared in this scope 11 | int n = strlen(s); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 ...
s197014163
p03672
C++
#include<iostream> #include<string> using namespace std; char s[222]; int main(){ cin >> s; int n = strlen(s); for(int i = n - 2; i >= 0; i -= 2){ if(strncmp(s, s + i / 2, i / 2) == 0){ cout << i << endl; return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:10:11: error: 'strlen' was not declared in this scope 10 | int n = strlen(s); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 ...
s970771277
p03672
C++
#include <iostream> #include <string> #include <iomanip> #include <ios> using namespace std; int check(string s){ int n = s.length(); string s_back = s.substr(n / 2,n / 2); string s_front = s - s_back; if(s_front == s_back) return 1; else return 0; } int main(void){ string word; cin >> word; ...
a.cc: In function 'int check(std::string)': a.cc:9:22: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | string s_front = s - s_back; | ~ ^ ~~~~~~ | ...
s250660917
p03672
C++
#include <iostream> #include <string> #include <iomanip> #include <ios> using namespace std; int check(string s){ int n = s.length(); string s_back = s.substr(n / 2,n / 2); string s_front = s - s_back; if(s_front == s_back) return 1; else return 0; } int main(void){ string word; cin >> word; ...
a.cc: In function 'int check(std::string)': a.cc:9:22: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | string s_front = s - s_back; | ~ ^ ~~~~~~ | ...
s506154395
p03672
C++
#include<iostream> #include<algorithm> #include<cmath> #include<string> using namespace std; int main() { string s; cin >> s; for(int i=2; i<s.length(); i+=2) { if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) { break; } } cout << s.length()-i << endl; }
a.cc: In function 'int main()': a.cc:10:65: error: expected ')' before '{' token 10 | if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) { | ~ ^~ | ) a.cc:13:8: erro...
s017610610
p03672
C++
#include<iostream> #include<algorithm> #include<cmath> #include<string> using namespace std; int main() { string s; cin >> s; for(int i=2; i<S.length(); i+=2) { if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) { break; } } cout << s.length()-i << endl; }
a.cc: In function 'int main()': a.cc:9:18: error: 'S' was not declared in this scope 9 | for(int i=2; i<S.length(); i+=2) { | ^ a.cc:10:65: error: expected ')' before '{' token 10 | if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) { | ~ ...
s685714384
p03672
C++
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; int check = 0; while(check != 0){ check = 0; for(int i = 0; i < s.size() - 2; i++){ t.at(i) = s.at(i); } for(i = 0; i < t.size() / 2; i++){ if(t.at(i) != t.at((t.size() / 2) + i)){ ...
a.cc: In function 'int main()': a.cc:16:9: error: 'i' was not declared in this scope 16 | for(i = 0; i < t.size() / 2; i++){ | ^
s495650764
p03672
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i=0; i<n;i++) #define REPR(i, n) for(int i=n-1 ; i>=0; i--) #define FOR(i, m, n) for(int i=m; i<n; i++) #define INF 2e9 #define ll long long int main(){ char str[222]; cin>>str; int n=strlen(str); for(int i=n-2; i; i-=2){ ...
a.cc: In function 'int main()': a.cc:16:12: error: 'strncom' was not declared in this scope; did you mean 'strncpy'? 16 | if(strncom(str, str+i/2, i/2)==0){ | ^~~~~~~ | strncpy
s177713410
p03672
C++
#include <iostream> #include <cstdio> #include <string> #include <cstdlib> #include <vector> #include <algorithm> #include <functional> #include <iomanip> #include <stdlib.h> #include <cmath> #include <map> #include <queue> #include <deque> #include <stack> #include <set> const long long INF = 1e9 + 7; using namespace ...
a.cc: In function 'int main()': a.cc:23:17: error: 'strlen' was not declared in this scope 23 | int n = strlen(s); | ^~~~~~ a.cc:16:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include <set> +++ |+#include <cstrin...
s390103997
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string str; cin >> str; int x; for (int i=1;i<str.size()- 1;i+=2){ for (int j=0;j<=i;j++){ if(str.at(j) == str.at((i+1)/2+j){ x=i+1; } } } cout << x; } //0123
a.cc: In function 'int main()': a.cc:10:36: error: expected ')' before '{' token 10 | if(str.at(j) == str.at((i+1)/2+j){ | ~ ^ | ) a.cc:13:6: error: expected primary-expression before '}' token 13 | } | ^
s545132366
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string str; cin >> str; int x; for (int i=1;i<str.size()- 1;i+=2){ for (int j=0;j<str.size()/2;j++){ if(str.at(j) == str.at(str.size()/2+j-1){ x=i+1; } } } cout << x; }
a.cc: In function 'int main()': a.cc:10:43: error: expected ')' before '{' token 10 | if(str.at(j) == str.at(str.size()/2+j-1){ | ~ ^ | ) a.cc:13:6: error: expected primary-expression before '}' token 13 | } ...
s171630481
p03672
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.next(); int point = str.length()-1; while(point > 0) { String s = str.substring(0,point); point--; if(s.length()%2!=0) co...
Main.java:12: error: cannot find symbol System.out.println(s.length); ^ symbol: variable length location: variable s of type String 1 error
s444686207
p03672
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main(void) { char s[300]; cin >> s; int t; int ans; int count = 0; for (int i = strlen(s)-2; i > 0; i-=2) { if (strncmp(s, s+i/2, i/2) == 0) { cout << i << endl; return 0; ...
a.cc: In function 'int main()': a.cc:15:18: error: 'strlen' was not declared in this scope 15 | for (int i = strlen(s)-2; i > 0; i-=2) { | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> ...
s161468638
p03672
C++
#include <bits/stdc++.h> using namespace std; const long long mod = pow(10, 9) + 7; const long long MOD = 998244353; const long long INF = 1LL << 60; const int inf = pow(10, 9) + 7; template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;} template <class T> bool chmax(T& a, T b) {if (a ...
a.cc:14:11: error: 'S' was not declared in this scope 14 | bool even(S) | ^ a.cc: In function 'int main()': a.cc:31:13: error: 'even' cannot be used as a function 31 | if (even(S)) break; | ~~~~^~~
s488512793
p03672
C++
# include < stdio.h> # include < string.h> int main () { char str [222]; scanf ("%s", str ) ; int n= strlen (str ) ; for (int i=n -2; i; i -=2) { if( strncmp (str , str +i/2 , i/2) ==0) { printf ("%d\n" ,i) ; return 0; } } return 0; }
a.cc:1:11: fatal error: stdio.h: No such file or directory 1 | # include < stdio.h> | ^~~~~~~~~~ compilation terminated.
s532775844
p03672
C++
# include < stdio .h > # include < string .h > int main () { char str [222]; scanf ("%s", str ) ; int n= strlen (str ) ; for (int i=n -2; i; i -=2) { if( strncmp (str , str +i/2 , i/2) ==0) { printf ("%d\n" ,i) ; return 0; } } return 0; }
a.cc:1:11: fatal error: stdio .h : No such file or directory 1 | # include < stdio .h > | ^~~~~~~~~~~~ compilation terminated.
s942203814
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; for(int i=2; i<S,size(); i+=2){ if(S.substr(0,(S.size()-i)/2) ==S.substr(S.size()-i)/2, S.size()-i/2)){break;} } cout<<S.size()-i<<endl; }
a.cc: In function 'int main()': a.cc:7:17: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | for(int i=2; i<S,size(); i+=2){ | ~^~ | | | | | std::string {aka std::__cxx11::basic_st...
s474438381
p03672
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <cstdio> #include <string> #include <cstdio> using namespace std; #define int long long #define INF 1e18 signed main () { char s[400]; cin >> s; int n = strlen(s); for(int i = n - 2; i; i -= 2) { if(strncmp(s, s +...
a.cc: In function 'int main()': a.cc:15:13: error: 'strlen' was not declared in this scope 15 | int n = strlen(s); | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <cstdio> +++ |+#include <cstring> ...
s488101996
p03672
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <cstdio> #include <string> #include <cstdio> using namespace std; #define int long long #define INF 1e18 signed main () { char s[400]; cin >> s; int n = strlen(s); for(int i = n - 2; i >= 2; i -= 2) { if(strncmp(s...
a.cc: In function 'int main()': a.cc:15:13: error: 'strlen' was not declared in this scope 15 | int n = strlen(s); | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <cstdio> +++ |+#include <cstring> ...
s727883507
p03672
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> #include <ctype.h> #include <map> #include <vector> #include <stdlib.h> #include <cctype> #define REP(i,n) for(int i=0;i<(int)n;++i) #define REP1(j,n) for(int j=0;j<(int)n;++j) #define REPD(i,n) for(int i=n;i>=0;--i) #define REPD1(j,n) for(int ...
a.cc: In function 'int main()': a.cc:26:20: error: 'strlen' was not declared in this scope 26 | int size = strlen(x); | ^~~~~~ a.cc:10:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include <cctype> +++ |+#includ...
s691281409
p03672
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int len=s.length()-2; while(len>1) { if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()/2) { cout << len << endl; return 0; } len-=2; } }
a.cc: In function 'int main()': a.cc:9:67: error: expected ';' before '{' token 9 | if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()/2) { | ^~ | ; a.cc:9:32:...
s863916029
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ int i, j; string s; cin >> s; for(i=1; i<s.size()/2; i++){ for(j=0; j<s.size()/2-i; j++){ if(s[j] != s[j+s.size()/2-i]){ j = 200; } if(j == s.size()/2-i-1){ cout << s.si...
a.cc:15:26: error: stray '#' in program 15 | return 0;#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:14:27: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Trait...
s316991913
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ int i, j; string s; cin >> s; for(i=1; i<s.size()/2; i++){ for(j=0; j<s.size()/2-i; j++){ if(s[j] != s[j+s.size()/2-i]){ j = 200; } if(j == s.size()/2-i-1){ cout << s.si...
a.cc: In function 'int main()': a.cc:14:27: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s742839616
p03672
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; int i,j; cin>>s; for(i=0,j=1;i<s.size()-1,j<s.size();i+=2,j+=2){ if(s.size()%2!=0){s.pop_back();continue;} if(s[i]=!=s[j]){s.pop_back();continue;} } cout<<s.size()<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: expected primary-expression before '!=' token 11 | if(s[i]=!=s[j]){s.pop_back();continue;} | ^~
s577043364
p03672
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin>>s; for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){ if(s.size()%2!=0){s.pop_back();continue;} if(s[i]=!=s[j]){s.pop_back();continue;} } cout<<s.size()<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:21: error: expected unqualified-id before 'int' 8 | for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){ | ^~~ a.cc:8:21: error: expected ';' before 'int' 8 | for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){ | ...
s796308085
p03672
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; int main(){ string s; cin >> s; for(int i = (int)s.size(); i >= 0; i++) { string t = s.substr(0, i); string p = reverse(t.begin(), t.end()); if(t == p){ cout << i << endl; break; }...
a.cc: In function 'int main()': a.cc:11:27: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 11 | string p = reverse(t.begin(), t.end()); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~
s292869512
p03672
Java
import java.util.Scanner; public class Main { public static void main(String[]srgs) { Scanner scan=new Scanner(System.in); String a=scan.next(); for(int i=1;i!=a.length();i++) { String str=a.substring(0,a.length()-i); if(str.length()%2==1) { continue; } else { String str1=str.substring(0,str.length()/2...
Main.java:18: error: reached end of file while parsing } ^ 1 error
s895952822
p03672
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ string s; string temp_s; cin >> s; vector<string> ss; for(int i = 0; i < s.length(); i++){ temp_s = s[i]; ss.push_back(temp_s); } int mx = 0; for(int i = ss.size(); i > 0; i...
a.cc: In function 'int main()': a.cc:59:18: error: invalid operands of types 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} and '<unresolved overloaded function type>' to binary 'operator==' 59 | if(ss.size() == max){ | ~~~~~~~~~~^~~~~~ a.cc:60:15: error: overl...
s372285856
p03672
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ string s; string temp_s; cin >> s; vector<string> ss; for(int i = 0; i < s.length(); i++){ temp_s = s[i]; ss.push_back(temp_s); } int max = 0; for(int i = ss.size(); i > 0; ...
a.cc: In function 'int main()': a.cc:63:35: error: expected '}' at end of input 63 | std::cout << max << std::endl; | ^ a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s302498861
p03672
C
#include<stdio.h> int main(){ int len = 0, j, count = 0; char s[201]; scanf("%s", s); while(s[len]){ len++; } for (i = len - 2; i >= 0; i -= 2){ count++; s[i] = '\0'; j = 0; while(s[j]){ if(s[j] != s[j + i/2]){ break; } } if(i == j){ printf("%d\n"...
main.c: In function 'main': main.c:12:8: error: 'i' undeclared (first use in this function) 12 | for (i = len - 2; i >= 0; i -= 2){ | ^ main.c:12:8: note: each undeclared identifier is reported only once for each function it appears in
s177332624
p03672
C++
S S に対して、条件を満たす 1 1 文字以上の文字列が存在する。
a.cc:3:1: error: extended character 、 is not valid in an identifier 3 | に対して、条件を満たす | ^ a.cc:6:1: error: extended character 。 is not valid in an identifier 6 | 文字以上の文字列が存在する。 | ^ a.cc:1:1: error: 'S' does not name a type 1 | S | ^
s408443870
p03672
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String S =scanner.next(); int count = 0; for (int i = 2; i < S.length(); i += 2) { //文字列Sも末尾を、2文字ずつ削除 String s = S.substring(0, S.length()-i); //文字列Sをs1とs2に分割 // String...
Main.java:17: error: cannot find symbol System.out.println("s1:" + s1); ^ symbol: variable s1 location: class Main Main.java:18: error: cannot find symbol System.out.println("s2:" + s2); ^ symbol: variable s2 location: class Main Main.java:21...
s632311304
p03672
C++
#include <vector> #include <queue> #include <string> using namespace std; typedef long long ll; int main() { string s; cin >> s; s.erase(s.end() - 2, s.end()); for (int i = 0; s.size() != 0; i++) { for (int k = 0; k <= s.size()/2; k++) { if (k == s.size() / 2) { cout << s.size() << endl; exit(0);...
a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope 10 | cin >> s; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <string> +++ |+#include <iostream> 4 | using ...
s679790774
p03672
C++
#include <iostream> #include <fstream> #include <stdio.h> #include <math.h> #include <time.h> #include <string> #include <tuple> #include <vector> #include <map> #include <unordered_map> #include <list> #include <set> #include <stack> #include <queue> #include <cstdlib> #include <algorithm> #include <random> #include <...
a.cc: In function 'int main()': a.cc:40:33: error: no match for 'operator!=' (operand types are 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'std::__cxx11::basic_string<char>') 40 | while(S.substr(0,S.size()/2 != S.substr(S.size()/2,S.size()/2){ | ~~~~~~~...
s384039071
p03672
C
#include <iostream> #include <fstream> #include <stdio.h> #include <math.h> #include <time.h> #include <string> #include <tuple> #include <vector> #include <map> #include <unordered_map> #include <list> #include <set> #include <stack> #include <queue> #include <cstdlib> #include <algorithm> #include <random> #include <...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s998604039
p03672
C++
#include <iostream> #include <fstream> #include <stdio.h> #include <math.h> #include <time.h> #include <string> #include <tuple> #include <vector> #include <map> #include <unordered_map> #include <list> #include <set> #include <stack> #include <queue> #include <cstdlib> #include <algorithm> #include <random> #include <...
a.cc: In function 'int main()': a.cc:48:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s500060609
p03672
C++
#include <stdio.h> #include <string.h> int main(){ scanf("%s", str); int n=strlen(str); for(int i=n-2; i; i-=2){ char str [222]; if(strncmp(str, str+i/2, i/2)==0){ printf("%d\n" ,i); return 0; } } return 0; }
a.cc:1:20: warning: extra tokens at end of #include directive 1 | #include <stdio.h> #include <string.h> | ^ a.cc: In function 'int main()': a.cc:6:16: error: 'str' was not declared in this scope; did you mean 'std'? 6 | scanf("%s", str); | ^~~ | ...
s753696554
p03672
C
#include<stdio.h> int n, i, j, flag; char S[201]; int main(){ scanf("%s", S); while(S[a]){a++;} i=(a-1)>>2; while(){ flag=1; for(j=0; j<i; j++){ if(S[j] != S[j+i]){flag=0; break;} } if(flag){break;} i+=2; } printf("%d\n", i*2); }
main.c: In function 'main': main.c:6:11: error: 'a' undeclared (first use in this function) 6 | while(S[a]){a++;} | ^ main.c:6:11: note: each undeclared identifier is reported only once for each function it appears in main.c:8:9: error: expected expression before ')' token 8 | while(){ ...
s627625016
p03672
C++
#include<bits/stdc++.h> using namespace std; int main(void){ string s; cin >> s; for(int i=s.size()-1;i>=0;++i){ string ss = s.substr(0,i); if(ss.size()%2!=0) continue; string s1=ss.substr(0,ss.size()/2), s2=ss.substr(ss.size()/2, ss.size()/2); if(s1==s2){ cout << ss.size() << endl; ...
a.cc: In function 'int main()': a.cc:15:4: error: expected '}' at end of input 15 | } | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s495910253
p03672
C++
#include<cstdio> #inslude<cstring> int main(){ int n,flag; char s[210]; scanf("%s",s); n=strlen(s); for(int i=-1;i>0;i--){ flag=1; if(i%2==0){ for(int j=0;j<i/2;j++) if(s[j]!=s[j+i/2]) flag=0; if(flag){ printf("%d\n",i); return 0; } } } }
a.cc:2:2: error: invalid preprocessing directive #inslude; did you mean #include? 2 | #inslude<cstring> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:7:5: error: 'strlen' was not declared in this scope 7 | n=strlen(s); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '...
s276871161
p03672
C++
#include<cstdio> #inslude<cstring> int main(){ int n,flag; char s[210]; scanf("%s",s); n=strlen(s); for(int i=-1;i>0;i--){ flag=1; if(i%2==0){ for(int j=0;j<i/2;j++) if(s[j]!=s[j+i/2]) flag=0; if(flag){ printf("%d\n",I); return 0; } } } }
a.cc:2:2: error: invalid preprocessing directive #inslude; did you mean #include? 2 | #inslude<cstring> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:7:5: error: 'strlen' was not declared in this scope 7 | n=strlen(s); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '...
s194169585
p03672
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string s; cin>>s; for(int i=s.size();i>0;i--){ string t=s.substr(0,i); reverse(t.begin(),t.end()); if(t.size%2==0 && s==t){ cout<<t.size()<<endl; return 0; } } }
a.cc: In function 'int main()': a.cc:11:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s085086109
p03672
C++
#include<bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 1; for (int i = 1; i < s.size(); i++) { bool flg = true; for (int j = 0; j < i; j++) { if (s.at(j) != s.at(j + 1)) flag = false; } if (flg) ans = i; } cout << ans * 2 << endl; }
a.cc: In function 'int main()': a.cc:11:33: error: 'flag' was not declared in this scope; did you mean 'flg'? 11 | flag = false; | ^~~~ | flg
s387091104
p03672
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int Solve(string s = "") { cin >> s; for (int i = s.size() - 2; 0 < i; i -= 2) if (s.substr(0, i / 2) == s.substr(i / 2, i / 2)) return size; return 0; } int main() { cin.tie(0); ios::sync_with_stdio(false); cout << Sol...
a.cc: In function 'int Solve(std::string)': a.cc:10:66: error: cannot resolve overloaded function 'size' based on conversion to type 'int' 10 | if (s.substr(0, i / 2) == s.substr(i / 2, i / 2)) return size; | ^~~~
s765222234
p03672
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for(int i=0;i<S.size();i++) { /*if(i==0) { S.pop_back(); S.pop_back(); } */ /*else if(S.size()==2 && (i==0 || S[0]!=S[1])) { cout << 1 << endl; return 0; }*/ else { int m=S.size()...
a.cc: In function 'int main()': a.cc:18:5: error: 'else' without a previous 'if' 18 | else { | ^~~~
s673018412
p03672
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for(int i=0;i<S.size();i++) { if(i==0) { S.pop_back(); S.pop_back(); } /*else if(S.size()==2 && (i==0 || S[0]!=S[1])) { cout << 1 << endl; return 0; }*/ else { int m=S.size()/2; ...
a.cc: In function 'int main()': a.cc:24:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_buck'; did you mean 'pop_back'? 24 | S.pop_buck(); | ^~~~~~~~ | pop_back a.cc:25:11: error: 'std::string' {aka 'class std::__cxx11::basic_st...
s030537309
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; for(i = s.size()/2; i>0; i--){ if(s.substr(0,i) == s.substr(i,i)){ cout << i << endl; return 0; } } }
a.cc: In function 'int main()': a.cc:5:7: error: 'i' was not declared in this scope 5 | for(i = s.size()/2; i>0; i--){ | ^
s546226956
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int c=200; for(int i=0;i<s.size()/2-1;i++){ char a[100],b[100]; int d=0; for(int j=0;j<=i;j++){ a[j]=s.at(j); b[j]=s.at(i+1+j); if(a[j]==b[j]) d++; } if(d==i+1){ c=min(c,s.size()-...
a.cc: In function 'int main()': a.cc:18:12: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)' 18 | c=min(c,s.size()-(i+1)-(i+1)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include...
s858422026
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int c=200; for(int i=0;i<s.size()/2-1;i++){ char a[100],b[100]; int d=0; for(int j=0;j<=i;j++){ a[j]=s.at(j); b[j]=s.at(i+1+j); if(a[j]==b[j]) d++; } if(d==i+1){ c=min(c,s.size()-...
a.cc: In function 'int main()': a.cc:18:12: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)' 18 | c=min(c,s.size()-(i+1)*2); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-...
s548042625
p03672
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int c=200; for(int i=0;i<s.size()/2-1;i++){ char a[100],b[100]; for(int j=0;j<=i;j++){ a[j]=s.at(j); b[j]=s.at(i+1+j); } if(a==b){ c=min(c,s.size()-(i+1)*2); } } cout<<c; }
a.cc: In function 'int main()': a.cc:14:12: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)' 14 | c=min(c,s.size()-(i+1)*2); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-...
s712966906
p03672
C++
#include "pch.h" #include <iostream> #include<stdio.h> #include<cstring> char str[201]; char a[101], b[101]; void shorten(char str[]) {//文字列を2文字分短くする// int i,n; n = strlen(str); str[n - 1] = '\0'; str[n - 2] = '\n'; } void splid(char str[], int x) {//文字列を二つに分ける// int i; for (i = 0; i < x / 2; i++) { ...
a.cc:1:10: fatal error: pch.h: No such file or directory 1 | #include "pch.h" | ^~~~~~~ compilation terminated.
s199340701
p03672
C++
#include <iostream> #include<stdio.h> #include<cstring> char str[201]; char a[101], b[101]; void shorten(char str[]) {//文字列を2文字分短くする// int i,n; n = strlen(str); str[n - 1] = '\0'; str[n - 2] = '\n'; } void splid(char str[], int x) {//文字列を二つに分ける// int i; for (i = 0; i < x / 2; i++) { a[i] = str[i]; ...
a.cc: In function 'int main()': a.cc:33:9: error: 'gets_s' was not declared in this scope 33 | gets_s(str); | ^~~~~~
s720970446
p03672
C++
#include<stdio.h> #include<cstring> char str[201]; char a[101], b[101]; void shorten(char str[]) {//文字列を2文字分短くする// int i,n; n = strlen(str); str[n - 1] = '\0'; str[n - 2] = '\n'; } void splid(char str[], int x) {//文字列を二つに分ける// int i; for (i = 0; i < x / 2; i++) { a[i] = str[i]; b[i] = str[x / 2 + ...
a.cc: In function 'int main()': a.cc:32:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 32 | gets(str); | ^~~~ | getw
s082654959
p03672
C++
#include<stdio.h> #include<cstring> char str[201]; char a[101], b[101]; void shorten(char str[]) {//文字列を2文字分短くする// int i,n; n = strlen(str); str[n - 1] = '\0'; str[n - 2] = '\n'; } void splid(char str[], int x) {//文字列を二つに分ける// int i; for (i = 0; i < x / 2; i++) { a[i] = str[i]; b[i] = str[x / 2 + ...
a.cc: In function 'int main()': a.cc:32:9: error: 'gets_s' was not declared in this scope 32 | gets_s(str); | ^~~~~~
s353406317
p03672
C++
#include <bits/stdc++.h> #define int long long using namespace std; signed main(){ string n; cin>>n; for(int i=n.size()-1;2<=i;i--){ if(i%2==0){ if(n.substr(0,i/2-1)==s.substr(i/2,i)){ cout<<i<<endl; return 0; } } } return 0; }
a.cc: In function 'int main()': a.cc:9:47: error: 's' was not declared in this scope 9 | if(n.substr(0,i/2-1)==s.substr(i/2,i)){ | ^
s972998479
p03672
C++
#include <bits/stdc++.h> #define int long long using namespace std; signed main(){ string n; cin>>n; for(int i=n.size()-1;2<=i;i--;){ if(i%2==0){ if(n.substr(0,i/2-1)==s.substr(i/2,i)){ cout<<i<<endl; return 0; } } } return 0; }
a.cc: In function 'int main()': a.cc:7:38: error: expected ')' before ';' token 7 | for(int i=n.size()-1;2<=i;i--;){ | ~ ^ | ) a.cc:7:39: error: expected primary-expression before ')' token 7 | for(int i=n.size()...
s270600457
p03672
C++
#include <bits/stdc++.h> #define int long long using namespace std; signed main(){ string n; cin>>n; for(int i=n.sise()-1;2<=i;i--;){ if(i%2==0){ if(n.substr(0,i/2-1)==s.substr(i/2,i)){ cout<<i<<endl; return 0; } } } return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'? 7 | for(int i=n.sise()-1;2<=i;i--;){ | ^~~~ | size a.cc:7:38: error: expected ')' before ';' tok...
s119632417
p03672
C++
#include <bits/stdc++.h> using namespace std; signed main() { string s; cin >> s; bool latte = false; latte = true; int malta = 0; latte = 0119; malta = 1333; for (int i = 0; i < s.size(); ++i) { for(int j = i; j < s.size(); j++) { } if(malta == 1333) malta = 0; } for(int luzhiled = 0; ...
a.cc:10:11: error: invalid digit "9" in octal constant 10 | latte = 0119; | ^~~~
s985199789
p03672
C++
#include <bist/stdc++.h> using namespace std; signed main() { string s; cin >> s; bool latte = false; latte = true; int malta = 0; latte = 0119; malta = 1333; for (int i = 0; i < s.size(); ++i) { for(int j = i; j < s.size(); j++) { } if(malta == 1333) malta = 0; } for(int luzhiled = 0; ...
a.cc:1:10: fatal error: bist/stdc++.h: No such file or directory 1 | #include <bist/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s536368844
p03672
C
# include < stdio.h > # include < string.h > int main () { char str [222]; scanf ("%s", str ); int n= strlen (str ); for (int i=n -2; i; i -=2) { if( strncmp (str, str +i/2, i/2) ==0) { printf ("%d\n",i); return 0; ...
main.c:1:11: fatal error: stdio.h : No such file or directory 1 | # include < stdio.h > | ^~~~~~~~~~~ compilation terminated.
s720588226
p03672
C
# include < stdio.h > # include < string.h > int main () { char str [222]; scanf ("%s", str ); int n= strlen (str ); for (int i=n -2; i; i -=2) { if( strncmp (str, str +i/2, i/2) ==0) { printf ("%d\n",i); return 0; ...
main.c:1:11: fatal error: stdio.h : No such file or directory 1 | # include < stdio.h > | ^~~~~~~~~~~ compilation terminated.
s770092202
p03672
C
# include < stdio .h > # include < string .h > int main () { char str [222]; scanf ("%s", str ); int n= strlen (str ); for (int i=n -2; i; i -=2) { if( strncmp (str, str +i/2, i/2) ==0) { printf ("%d\n",i); return 0; ...
main.c:1:11: fatal error: stdio .h : No such file or directory 1 | # include < stdio .h > | ^~~~~~~~~~~~ compilation terminated.
s419233700
p03672
C++
#include <iostream> #include <string> using namespace std; int main () { char str [222]; cin >> str; int n= strlen (str ); for (int i=n -2; i; i -=2) { if( strncmp (str, str +i/2, i/2) ==0) { cout << i; return 0; ...
a.cc: In function 'int main()': a.cc:7:16: error: 'strlen' was not declared in this scope 7 | int n= strlen (str ); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <c...
s498800907
p03672
C++
akasakaakasakasakaakas
a.cc:1:1: error: 'akasakaakasakasakaakas' does not name a type 1 | akasakaakasakasakaakas | ^~~~~~~~~~~~~~~~~~~~~~
s640485169
p03672
C++
main(){ puts("Hello World"); }
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:2:3: error: 'puts' was not declared in this scope 2 | puts("Hello World"); | ^~~~
s674417172
p03672
C++
#include<bits/stdc++.h> using namespace std; int a; string s; map <char,int> int main(){ cin>>s; s.pop_back(); if(s.size()%2==1)s.pop_back; while(a){ if(s) } }
a.cc:7:1: error: two or more data types in declaration of 'main' 7 | map <char,int> | ^~~~~~~~~~~~~~
s824800661
p03672
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <cmath> using namespace std; char str[233]; int main() { while(~scanf("%s", str)) { int ln = strlen(str); int res; for(int i = ln-1; i >= 0; i--) { if(i & 1) { bool flg=1; for(int j = 0, k=(i+1)/2; j <= (i-1)/2, k <= i; j++, k++) { i...
a.cc: In function 'int main()': a.cc:23:5: error: 'flg' was not declared in this scope 23 | if(!flg) continue; | ^~~