submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s850602439
p03951
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF (1ll << 60) #define sz(x) int(x.size()) using namespace std; typedef long long ll; using vl = vector<ll>; using vvl = vector<vl>; typedef ...
a.cc: In function 'int main()': a.cc:42:23: error: 'std::__cxx11::basic_string<char>::iterator' has no member named 's' 42 | reverse(s.begin().s.end()); | ^
s999808060
p03951
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; string s,t; cin >> N >> s >> t; FOR(i,N,2*N+1){ int j = i-N; string ans = s.substr(0,j) + t; if(ans.substr(0,N)==s){ cout << i << endl; return 0; } } }
a.cc: In function 'int main()': a.cc:8:13: error: 'i' was not declared in this scope 8 | FOR(i,N,2*N+1){ | ^ a.cc:8:9: error: 'FOR' was not declared in this scope 8 | FOR(i,N,2*N+1){ | ^~~
s104042562
p03951
C++
#include <bits/stdc++.h> #include <algorithm> using namespace std; int main() { int a; string b,c; cin >> a; cin >>b; cin >>c; for(int i=0;i<a;i++){ for(int j=i+1;i<a;i++){ if(a.substr(i) ==a.substr(0,a-1)){ cout << i+a << endl; return 0; } ...
a.cc: In function 'int main()': a.cc:14:13: error: request for member 'substr' in 'a', which is of non-class type 'int' 14 | if(a.substr(i) ==a.substr(0,a-1)){ | ^~~~~~ a.cc:14:27: error: request for member 'substr' in 'a', which is of non-class type 'int' 14 | if(a.substr(i) ==a.s...
s683064646
p03951
C++
#include <bits/stdc++.h> using namespace std; int N; string s, t; int solve() { for (int i = 0; i < N; i++) { if (s.substr(i) == t.substr(0, N-i)) return N+i; return N*2; } int main() { cin >> N >> s >> t; cout << solve() << endl; }
a.cc: In function 'int solve()': a.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 11 | int main() { | ^~ a.cc:11:9: note: remove parentheses to default-initialize a variable 11 | int main() { | ^~ | -- a.cc:11:9: note: or...
s252990197
p03951
C++
#include <bits/stdc++.h> using namespace std; int N; string s, t; int solve() { for (int i = 0; i < N; i++) { if (s.substr(i) == t.substr(0, N-i)) return N+i; return N*2; int main() { cin >> N >> s >> t; cout << solve() << endl;
a.cc: In function 'int solve()': a.cc:10:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 10 | int main() { | ^~ a.cc:10:9: note: remove parentheses to default-initialize a variable 10 | int main() { | ^~ | -- a.cc:10:9: note: or...
s547801924
p03951
C++
n=int(input()) s=input() t=input() fin=1 for i in range(n): flag=1 j=0 while i+j<n: if t[j]!=s[i+j]: flag=0 j=j+1 if flag: print(n-i+i*2) fin=0 if fin: print(2*n)
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s088387495
p03951
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int n; string s, t; cin >> n >> s >> t; int ans = 0; for (int i = 0; i < n; i++) { int cnt = 0; for (int j = 0; j <= i; j++) { if (t[j] == s[n - 1 - i + j]) cnt++; } if (cnt == i + 1) ans = cnt; } cout << cnt << endl;...
a.cc: In function 'int main()': a.cc:17:11: error: 'cnt' was not declared in this scope; did you mean 'int'? 17 | cout << cnt << endl; | ^~~ | int
s691037996
p03951
C++
#include<iostream> #include<algorithm> #include<cmath> #include<iomanip> #include<map> using namespace std; int main() { int n,cnt=0; string s,t; cin >> n >> s >> t; for(int i=1; i<=n; i++) { if(s.substr(n-i)==t.substr(0,i) { cnt=max(cnt,i); } } cout << n*2-cnt << endl; }
a.cc: In function 'int main()': a.cc:12:36: error: expected ')' before '{' token 12 | if(s.substr(n-i)==t.substr(0,i) { | ~ ^~ | ) a.cc:15:3: error: expected primary-expression before '}' token 15 | } | ^
s509891387
p03951
C++
#include <iostream> #include <string> using namespace std; int N; string s,t; int solve(){ for (int i=0;i<N;++i){ if(s.substr(i)==t.substr(0,N-i))return i+N; } return N*2; } int main(){ cin >>N>>s>>t; count<<solve()<<endl; }
a.cc: In function 'int main()': a.cc:17:3: error: 'count' was not declared in this scope 17 | count<<solve()<<endl; | ^~~~~
s321028099
p03951
C++
#include <bits/stdc++.h> using namespace std; int main{ int N; string s,t; cin>>N>>s>>t; int count=0; for(int i=0;i<N;i++){ if(s.at(i)==t.at(0)){ for(int j=0;i+j<N;j++){ if(s.at(i+j)==t.at(j)){ count++; } else{ count=0; break; } } } } cout<<2*N-count; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:1: error: expected primary-expression before 'int' 4 | int N; | ^~~ a.cc:4:1: error: expected '}' before 'int' a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:6:1: error: 'cin'...
s059859729
p03951
C++
#include <bits/stdc++.h> using namespace std; int N; string s,t; cin>>N>>s>>t; int count=0; for(int i=0;i<N;i++){ if(s.at(i)==t.at(0)){ for(int j=0;i+j<N;j++){ if(s.at(i+j)==t.at(j)){ count++; } else{ count=0; break; } } } } cout<<2*N-count; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin>>N>>s>>t; | ^~~ a.cc:7:1: error: expected unqualified-id before 'for' 7 | for(int i=0;i<N;i++){ | ^~~ a.cc:7:13: error: 'i' does not name a type 7 | for(int i=0;i<N;i++){ | ^ a.cc:7:17: error: 'i' does not name a type 7 | ...
s303340980
p03951
C++
//In The Name Of GOD #include <bits/stdc++.h> using namespace std; const int mod = 1000000007; const int inf = 2000000000; const int maxn = 100000; #define ll long long #define pb push_back #define mp make_pair #define IO ios_base::sync_with_stdio(false); int A[3*maxn]; bool mark[3*maxn]; int main(){ IO; int n,m; ...
a.cc: In function 'int main()': a.cc:29:9: error: 'b' was not declared in this scope 29 | b/=a; | ^ a.cc:29:12: error: 'a' was not declared in this scope 29 | b/=a; | ^
s029468508
p03951
C++
N=int(input()) s=input() t=input() c=N for i in range(N): if s[i:N]==t[0:(N-i)]:c=i print(N*2-(N-c))
a.cc:1:1: error: 'N' does not name a type 1 | N=int(input()) | ^
s168465425
p03951
C++
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << #x << " = " << (x) << endl; typedef long long ll; typedef pair<int, int> ii; const int mod = 1e9+7; const ll INF = 1e18; const int inf = 1e9; void solve() { int n;cin>>n; string s,t; cin>>s>>t; int p=0; for (int i=0; i<=n; i++) { ...
a.cc:39:11: error: redefinition of 'const int mod' 39 | const int mod = 1e9+7; | ^~~ a.cc:8:11: note: 'const int mod' previously defined here 8 | const int mod = 1e9+7; | ^~~ a.cc:40:10: error: redefinition of 'const ll INF' 40 | const ll INF = 1e18; | ^~~ a.cc:9...
s727761072
p03951
C++
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << #x << " = " << (x) << endl; typedef long long ll; typedef pair<int, int> ii; const int mod = 1e9+7; const ll INF = 1e18; const int inf = 1e9; void solve() { int n;cin>>n; string s,t; cin>>s>>t; int p=0; for (int i=0; i<=n; i++) { ...
a.cc:39:11: error: redefinition of 'const int mod' 39 | const int mod = 1e9+7; | ^~~ a.cc:8:11: note: 'const int mod' previously defined here 8 | const int mod = 1e9+7; | ^~~ a.cc:40:10: error: redefinition of 'const ll INF' 40 | const ll INF = 1e18; | ^~~ a.cc:9...
s779624807
p03951
C++
#include <iostream> using namesapce std; int main(){ int n; string a,b; cin >> n >> a >> b; int count=0; for(int i=1;i<=n;i++){ bool check=true; for(int j=0;j<i;j++){ if(a.at(n-i+j)!=b.at(j)); check=false; } if(check) count=i; } cout << 2*n-count << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'string' was not declared in this scope 6 | string a,b; | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/inclu...
s327057082
p03951
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; string S,T; cin >> N >> S >> T; int f; for(int i=0;i<N;i++){ f=0; for (int j=i;j<N;j++){ f+=T[j]==S[N-1-j]?0:1; } if (f==0){ S.erace(S.begin()+i,S.end()); cout << S << T << endl; return 0; } } cou...
a.cc: In function 'int main()': a.cc:15:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'erace'; did you mean 'erase'? 15 | S.erace(S.begin()+i,S.end()); | ^~~~~ | erase
s729571197
p03951
C++
#include <iostream> #include <string> using namespace std; int N; string s, t; string solve() { for (int i = 0; i < N; ++i) { if (s.substr(i) == t.substr(0, N-i)) return i + N; } return N*2; } int main() { cin >> N >> s >> t; cout << solve() << endl; }
a.cc: In function 'std::string solve()': a.cc:10:55: error: could not convert '(i + N)' from 'int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'} 10 | if (s.substr(i) == t.substr(0, N-i)) return i + N; | ~~^~~ | ...
s092928189
p03951
Java
import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) val n = sc.nextInt val s, t = sc.next val ans = (0 until n) .map(i => (i, s.substring(i), t.substring(0, n - i))) .find(t => t._2 == t._3) .map(n + _._1) .getOrElse(2 * n) println(ans) }
Main.java:2: error: ';' expected import java.util.Scanner ^ 1 error
s748668374
p03951
C++
#include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) using namespace std; #define sz(x) ((int)(x).size()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) #define MEMSET(v, h) memset((v), h, sizeof(v))...
a.cc: In function 'int main()': a.cc:28:29: error: expected ';' before 'i' 28 | for(int i = s.size() i >= 0; --i){ | ^~ | ;
s777878255
p03951
C++
#include <iostream> #include <algorithm> int main(void) { char s[101], t[101]; int n, ls, lt; std::cin >> n >> s >> t; ls = std::strlen(s); lt = std::strlen(t); for(int i = std::max(ls - lt, 0); i != ls; i++){ if(i + lt < n) continue; bool flg = true; for(int j = i; j != ls; j++){ if(s[j] != t[j - i]){ ...
a.cc: In function 'int main()': a.cc:8:19: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'? 8 | ls = std::strlen(s); | ^~~~~~ | mbrlen a.cc:9:19: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'? 9 | lt = std::strlen(...
s471057215
p03951
C++
#include <iostream> #include <string> using namespace std; int main(){ int n,count=0; cin >> n; string s,t; cin >> s >> t; for(i=0;i<n;i++){ if(s[n-1-i]==t[i])count++; else break; } cout << 2*n-count << endl; }
a.cc: In function 'int main()': a.cc:10:7: error: 'i' was not declared in this scope 10 | for(i=0;i<n;i++){ | ^
s660821424
p03951
C++
#include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define maxs(x,y) (x = max(x,y)) #d...
a.cc: In function 'int main()': a.cc:95:12: error: 'n' was not declared in this scope 95 | drep(i,n+1){ | ^ a.cc:6:32: note: in definition of macro 'drep' 6 | #define drep(i,n) for(int i = (n)-1; i >= 0; --i) | ^
s539712505
p03951
C++
#include<iostream> #include<string> #include<algorithm> #include<bits/stdc++.h> #include<vector> using namespace std; int main() { int N,co=0; cin >> N; string s,t; cin >> s >> t; for(int i=1; i<=N; i++){ if(s.substr(N-i)==t.substr(0.i)) co=i; } cout << 2*N-co << endl; }
a.cc: In function 'int main()': a.cc:15:32: error: cannot convert 'std::complex<double>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 15 | if(s.substr(N-i)==t.substr(0.i)) co=i; | ^~~ | | | ...
s293587787
p03951
C++
n=int(input()) s=input() t=input() k=n for i in range(n): if(s[i:]==t[:n-i]): k=i break print(n+k)
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s165285020
p03951
C++
#define debug_interval ',' #define dump_interval ' ' #define debug_toggle 1 //{ #include<bits/stdc++.h> using namespace std; #define hi cerr<<"hi"<<endl; #define int long long #define INT_MAX LLONG_MAX #define rep(i,n) for(int i=0;i<(n);i++) #define rep1(i,n) for(int i=1;i<=(n);i++) #define pb push_back #define all(v) ...
a.cc:9:9: warning: "INT_MAX" redefined 9 | #define INT_MAX LLONG_MAX | ^~~~~~~ In file included from /usr/include/c++/14/climits:42, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:38, from a.cc:5: /usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:120:9: note:...
s667772177
p03951
C
/* 結果: */ #define _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stdbool.h> #define inf (INT_MAX-1) #define INF 9223372036854775807 #define PI 3.14159265358979323846; #define EPS 1e-10 #define sq(n) ((n)*(n)) #define rep(i,n) for(i=0;i<...
main.c: In function 'same': main.c:67:35: error: expected expression before ']' token 67 | if (S[i + d] != T[]) { | ^
s294638557
p03951
C++
#include <bits/stdc++.h> #include <unordered_set> using namespace std; #define ll long long #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define repeat(i,s,n) for(int (i)=s; (i)<(n); (i)++) #define revrep(i,n) for(int (i)=(n)-1;i>=0; i--) int main() { cin.tie(0); ios::sync_with_stdio(false); cout<<setprecision(...
a.cc: In function 'int main()': a.cc:14:8: error: 's' was not declared in this scope 14 | cin>>s>>t; | ^ a.cc:14:11: error: 't' was not declared in this scope 14 | cin>>s>>t; | ^
s421129725
p03951
C++
#include<algorithm> #include<iostream> using namespace std; int main(){ int N,x,i; cin>>N>>x; if(x!=N){ cout<<"No"<<endl; } else{ cout<<"Yes"<<endl; REP(i,1,2*N+2){ cout<<i<<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'REP' was not declared in this scope 13 | REP(i,1,2*N+2){ | ^~~
s603978314
p03951
C++
#include <cstdio> #include <iostream> using namespace std; char a[200], b[200]; int n; inline int lcp() { int ans = 0; for(int i = 1; i <= n; i ++ ) { if(a[i] == b[i]) ans ++; else break; } return ans; } int main() { scanf("%d%s%s", &n, a+1, b+1); reverse(a+1, a+n+1); printf("%d\n", n*2-lcp()); }
a.cc: In function 'int main()': a.cc:16:9: error: 'reverse' was not declared in this scope 16 | reverse(a+1, a+n+1); | ^~~~~~~
s571773837
p03951
C++
#include <cstdio> #include <iostream> char a[200], b[200]; int n; inline int lcp() { int ans = 0; for(int i = 1; i <= n; i ++ ) { if(a[i] == b[i]) ans ++; else break; } return ans; } int main() { scanf("%d%s%s", &n, a+1, b+1); std :: reverse(a+1, a+n+1); printf("%d\n", n*2-lcp()); }
a.cc: In function 'int main()': a.cc:15:16: error: 'reverse' is not a member of 'std' 15 | std :: reverse(a+1, a+n+1); | ^~~~~~~
s407966181
p03951
C++
#include<stdio.h> #define dn(i,j) (a[i]<=k && a[j]<=k) #define up(i,j) (k<a[i] && k<a[j]) int a[200005],n,l,r,mid; inline bool judge(const int &k) { if (dn(n-1,n) || dn(n,n+1)) return 1; if (up(n-1,n) || up(n,n+1)) return 0; for (int i=1;i<n-1;i++) { if (dn(n+i,n+i+1) || dn(n-i,n-i-1)) return ...
a.cc:26:1: error: expected unqualified-id before numeric constant 26 | 1 | ^
s249298235
p03951
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> using namespace std; using ll =int long long; map <int ,int> mpa,mpb; string s,t; int i,j; string toru(string x, int i, int j){ str...
a.cc: In function 'std::string toru(std::string, int, int)': a.cc:18:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'? 18 | string p=x.substring(i,j) | ^~~~~~~~~ | substr a.cc:20:1: warning: no retur...
s716605228
p03951
C++
4 expr expr#include <bits/stdc++.h> #include <array> using namespace std; typedef long long ll; #define tr(container, it) \ for (auto it = container.begin(); it != container.end(); it++) #define scontains(c,x) ((c).find(x) != (c).end()) //O(log n) #define contains(c,x) (find((c).begin(),(c).end(),x) != (c).end()) /...
a.cc:3:5: error: stray '#' in program 3 | expr#include <bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^ In file included from /usr/include/c++/14/array:39, from a.cc:4: /usr/include/c++/14/initializer_list:51:15: error: 'size_t' does...
s912862671
p03951
C++
class KMP: pattern = None length = -1 failed = None def __init__(self, pattern): self.pattern = pattern self.length = len(pattern) self.failed = [-1 for i in xrange(self.length)] for i in xrange(1, self.length): prev = self.failed[i-1] while prev!=...
a.cc:34:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 34 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:2:13: error: expected class-name before '=' token 2 | pattern = None | ^ a.cc:2:13: error: expected '{' before '=' token a.cc:2...
s333958543
p03951
C
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <numeric> #include <map> #include <set> #include <queue> #include <deque> #include <functional> int descending_compare(cons...
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s038330246
p03951
C++
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <numeric> #include <map> #include <set> #include <queue> #include <deque> #include <functional> int descending_compare(cons...
a.cc: In function 'int main()': a.cc:78:19: error: 'strlen' was not declared in this scope 78 | int len = strlen(s); | ^~~~~~ a.cc:16:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include <functional> +++ |+#incl...
s392134093
p03951
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define each(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define maxch(x,y) x=max(x,y) #define minch(x,y) x=min(x,y) #define mp(a,b) make_pair(a,b) #...
a.cc: In function 'void solve()': a.cc:43:56: error: expected ';' before 'cout' 43 | else ans = s.size()+t.size() - dp[s.size()][t.size()] | ^ | ; 44 | cout<<ans<<endl; | ~~~~ ...
s929390457
p03951
Java
import java.util.Scanner; public class gMain { public static void main(String[] args) { final Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String s1 = sc.next(); String s2 = sc.next(); int ans = 2*n; for(int i = n-1; i >= 0; i--) { if(s2.startsWith(s1.substring(i))) { ans -= (n-i); ...
Main.java:3: error: class gMain is public, should be declared in a file named gMain.java public class gMain { ^ 1 error
s165542382
p03951
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; typedef long long ll; int main() { int n; cin >> n; string s, t; cin >> s >> t; string ans = s + t; for (int i = 1; i <= n; i++) if (s.substr(n - i, i) == t.substr(0, i))ans = s.substr(0, n - i) + t; cout << ans << endl; }#include<iost...
a.cc:13:2: error: stray '#' in program 13 | }#include<iostream> | ^ a.cc:13:3: error: 'include' does not name a type 13 | }#include<iostream> | ^~~~~~~ a.cc:18:5: error: redefinition of 'int main()' 18 | int main() { | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | i...
s092167867
p03951
C++
#include <string> #include <iostream> #include <algorithm> using namespace std; int main() { unsigned N; string s, n; cin >> N; cin >> s; cin >> n; unsigned cur = 0; for( unsigned i = 0 ; i < s.length() ; i++) { if (s[i] == n[cur]) cur++; else cur = 0; } cout << std::max(s.length() + n.length...
a.cc: In function 'int main()': a.cc:27:25: error: no matching function for call to 'max(std::__cxx11::basic_string<char>::size_type, unsigned int&)' 27 | cout << std::max(s.length() + n.length() - cur, N); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/...
s541044795
p03951
C++
#include <string> #include <iostream> #include <algorithm> using namespace std; int main() { unsigned N; string s, n; cin >> N; cin >> s; cin >> n; unsigned cur = 0; for( unsigned i = 0 ; i < s.length() ; i++) { if (s[i] == n[cur]) cur++; else cur = 0; } cout << std::max(s.length() + n.length...
a.cc: In function 'int main()': a.cc:27:25: error: no matching function for call to 'max(std::__cxx11::basic_string<char>::size_type, unsigned int&)' 27 | cout << std::max(s.length() + n.length() - cur, N); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/...
s425914044
p03951
C++
// #include <string> #include <iostream> #include <algorithm> using namespace std; int main() { unsigned N; string s, n; cin >> N; cin >> s; cin >> n; int cur = 0; for( unsigned i = 0 ; i < s.length() ; i++) { if (s[i] == n[cur]) cur++; else cur = 0; } cout << max(s.length() + n.length() - cu...
a.cc: In function 'int main()': a.cc:28:20: error: no matching function for call to 'max(std::__cxx11::basic_string<char>::size_type, unsigned int&)' 28 | cout << max(s.length() + n.length() - cur, N); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/str...
s739683518
p03951
C++
#include<bits/stdc++.h> #include<debug.h> #define LL long long using namespace std; string pi(string x,string y) { int mx=0,c=0; string s=y+"#"+x; vector<int>pi(s.length()); for(int i=1,j=0;i<s.length();i++) { while(j&&s[i]!=s[j])j=pi[j-1]; if(s[i]==s[j])j++; pi[i]=j; ...
a.cc:2:9: fatal error: debug.h: No such file or directory 2 | #include<debug.h> | ^~~~~~~~~ compilation terminated.
s847415278
p03951
C++
#include<functional> #include<random> #include<unordered_set> using namespace std; typedef long long int llint; #define mp make_pair #define mt make_tuple #define pub push_back #define puf push_front #define pob pop_back #define pof pop_front #define fir first #define sec second #define res resize #define ins insert #d...
a.cc: In function 'int main()': a.cc:23:19: error: 'cin' was not declared in this scope 23 | int i,j,n;cin>>n; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include<unordered_set> +++ |+#include ...
s174421839
p03951
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int n, x, ans; string s,t; cin >> n >> x; cin >> s >> t; for(int i = 1; i <= n; i++) { for(int j = 0; j < i) { if(a[n - i + j] != b[j]) break; } else { ans = n*2 - i; ...
a.cc: In function 'int main()': a.cc:14:25: error: expected ';' before ')' token 14 | for(int j = 0; j < i) | ^ | ; a.cc:16:8: error: 'a' was not declared in this scope 16 | if(a[n - i + j] != b[j]) break; | ^ a.cc:16:24: error: 'b' ...
s451758953
p03951
C++
#include <bits/stdc++.h> using namespace int main(void) { int n, x, ans; string s,t; cin >> n >> x; cin >> s >> t; for(int i = 1; i <= n; i++) { for(int j = 0; j < i) { if(a[n - i + j] != b[j]) break; } else { ans = n*2 - i; } } cout << ans << endl; return 0; }
a.cc:4:1: error: expected identifier before 'int' 4 | int main(void) | ^~~ a.cc:2:16: error: expected ';' before 'int' 2 | using namespace | ^ | ; 3 | 4 | int main(void) | ~~~ a.cc: In function 'int main()': a.cc:7:1: error: 'string' wa...
s483517206
p03951
C++
n = int(raw_input()) s = raw_input() t = raw_input() for i in range(n): if s[i:] == t[:n-i]: print n+i break else: print 2*n
a.cc:1:1: error: 'n' does not name a type 1 | n = int(raw_input()) | ^
s544155232
p03951
C++
N = int(input()) s = input() l = input() for i in range(1,N): print(s[-i:]) if s[-i:]!=l[:i]: a=2*N-i+1 break print(a)
a.cc:1:1: error: 'N' does not name a type 1 | N = int(input()) | ^
s299885007
p03951
C++
#include <iostream> #include <string> using namespace std; int main() { string s,st; int n; cin >> n >> s >> st; reverse(s.begin(),s.end()); for (int i=0;i<n;i++) if (s[i]!=st[i]) { cout << 2*n-i << endl; return 0; } cout << n; return 0; }
a.cc: In function 'int main()': a.cc:11:1: error: 'reverse' was not declared in this scope 11 | reverse(s.begin(),s.end()); | ^~~~~~~
s837438232
p03951
C++
n,s,t=`dd`.split;puts s+t[(n.downto(0).find{|i|s[-i..-1]==t[0,i]}..-1]
a.cc:1:7: error: stray '`' in program 1 | n,s,t=`dd`.split;puts s+t[(n.downto(0).find{|i|s[-i..-1]==t[0,i]}..-1] | ^ a.cc:1:10: error: stray '`' in program 1 | n,s,t=`dd`.split;puts s+t[(n.downto(0).find{|i|s[-i..-1]==t[0,i]}..-1] | ^ a.cc:1:1: error: 'n' does not name a type 1 | ...
s057911079
p03951
Java
import java.util.Scanner; public class aPrefixAndSuffix { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // 整数の入力 int N = sc.nextInt(); String s = sc.next(); String t = sc.next(); // 文字列の比較 int res = 0; int i = 0; ...
Main.java:3: error: class aPrefixAndSuffix is public, should be declared in a file named aPrefixAndSuffix.java public class aPrefixAndSuffix { ^ 1 error
s254414527
p03951
C++
#include<iostream.h> #include<string.h> using namespace std; int main() { int n; char s[200],t[200],c[200]; cin>>n; cin>>s; cin>>t; int i,j=0,k=0; for(i=0;i<n;i++) { c[j]=s[i]; j++; if(s[i]==t[k]) k++; } for(;k<n;k++) { c[i++]=t[k]...
a.cc:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s229886763
p03951
C++
#include <algorithm> #define TRY(n) try{n}catch(...){} #define rep(i,n) for(int i=0;i<(n);i++) #define all(n) n.begin(),n.end() using namespace std; int main(){ int n;string s,t;cin>>n>>s>>t; string o = ""; bool f = false; bool l = false; if(s == t){cout << n << endl;return 0;} vector<int> g; ...
a.cc: In function 'int main()': a.cc:8:11: error: 'string' was not declared in this scope 8 | int n;string s,t;cin>>n>>s>>t; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include <algorithm> +++ |+#includ...
s371933403
p03951
C++
#include <iostream> #include <conio.h> #include <string> using namespace std; string f(string x, string y){ int m = x.length(), n=y.length(); int dp[m][n]; for(int j=0; j<=n; j++) dp[0][j] = 0; for(int i=0; i<=m; i++) dp[i][0] = 0; for(int i=1; i<=m; i++){ for(int j=1; j<...
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s581526517
p03951
C++
N = int(input()) k = input() s = input() offset = 0 while k[offset:]!=s[:N-offset]: offset+=1 print(k[:offset]+s)
a.cc:1:1: error: 'N' does not name a type 1 | N = int(input()) | ^
s002643648
p03951
C++
n=int(input()) s=input() t=input() for i in range(n): if s[i:] == t[:n-i]: print(n+i) exit(1) else: print(n*2)
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s571118282
p03951
C++
#include <stdio.h> #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 <iomanip> #include <cstdio> #include <c...
a.cc: In function 'int main()': a.cc:236:21: error: 't' was not declared in this scope 236 | if(s.substr(i)==t.substr(0,n-i)) { | ^
s916337211
p03951
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char a[101], b[101]; int n, i, j, cnt=0; scanf("%d\n", &n); gets(a); gets(b); for(i=n-1, j=0;i>=0 && j<n;i--, j++) { if(a[i]!=b[j]) break; else cnt++; } //printf("i:%d, j:%d\n", i, j); cnt+=i+1; ...
a.cc: In function 'int main()': a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(a); | ^~~~ | getw
s602494010
p03951
Java
import java.util.Scanner; /** * Created by whiled on 16/10/29. */ public class A { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String s = sc.next(); String t = sc.next(); int count = n; for (int i = 0; i < n; ...
Main.java:6: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s552578481
p03951
C++
#include <stdio.h> #include <stdlib.h> int main() { char a[101], b[101]; int n, i, j, cnt=0; scanf("%d\n", &n); gets(a); gets(b); for(i=n-1, j=0;i>=0 && j<n;i--, j++) { if(a[i]!=b[j]) break; else cnt++; } //printf("i:%d, j:%d\n", i, j); cnt+=i+1; cnt+=n-j; pri...
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(a); | ^~~~ | getw
s548495807
p03951
C++
#include <stdio.h> int main() { char a[101], b[101]; int n, i, j, cnt=0; scanf("%d\n", &n); gets(a); gets(b); for(i=n-1, j=0;i>=0 && j<n;i--, j++) { if(a[i]!=b[j]) break; else cnt++; } //printf("i:%d, j:%d\n", i, j); cnt+=i+1; cnt+=n-j; printf("%d", cnt); ...
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(a); | ^~~~ | getw
s914419603
p03951
C++
#include<stdio.h> #include<string.h> int main(){ int N, i, x, ans; char s[101],t[101]; scanf("%d %s %s",&N,s,t); ans = N*2; for(i=0; i<N; i++){ if( s[i] == s[N-i] ){ ans = ans - 1; } } printf("%d",ans) }
a.cc: In function 'int main()': a.cc:16:21: error: expected ';' before '}' token 16 | printf("%d",ans) | ^ | ; 17 | 18 | } | ~
s142554377
p03951
C++
#define rep(i,s,t) for(int i = s; i <= t; ++ i) #define fi first #define se second const int MaxN = 100050; int N, ans, s = 1; char A[MaxN], B[MaxN]; bool ok = false; int main() { scanf("%d",&N); scanf("%s",A+1); scanf("%s",B+1); ans = N; rep(i,1,N) { ok = false; re...
a.cc: In function 'int main()': a.cc:13:5: error: 'scanf' was not declared in this scope 13 | scanf("%d",&N); | ^~~~~ a.cc:29:9: error: 'printf' was not declared in this scope 29 | printf("%d",ans); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is prob...
s340072984
p03951
C++
#include <bits/stdc++.h> #define rep(i, a, n) for(int i = a; i < n; i++) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define o(a) cout << a << endl // #define int long long #define first first #define second se using namespace std; typedef pair<int, int> P; typedef vector<int> vi...
a.cc: In function 'int main()': a.cc:28:18: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)' 28 | int ans = max(n, s.size() + t.size() - c); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s651656704
p03951
C++
#include <bits/stdc++.h> #define rep(i, a, n) for(int i = a; i < n; i++) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define o(a) cout << a << endl #define int long long #define first first #define second se using namespace std; typedef pair<int, int> P; typedef vector<int> vi; ...
a.cc: In function 'int main()': a.cc:28:18: error: no matching function for call to 'max(long long int&, long long unsigned int)' 28 | int ans = max(n, s.size() + t.size() - c); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /us...
s194313630
p03951
C++
#include <cstdio> #include <iostream> using namespace std; #define PrintLn(X) cout << X << endl #define Loop(n) for(int loop_ = n; loop_; --loop_) #define Rep(i, n) for(int i = 0; i < (int)(n); ++i) #define For(i, a, b) for(int i = a; i < (int)(b); ++i) int main(void) { int N; char s[101]; char t[101]; cin >> N >...
a.cc: In function 'int main()': a.cc:18:17: error: 'strncpy' was not declared in this scope 18 | strncpy(st, s, i); | ^~~~~~~ a.cc:3:1: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ |+#...
s457664836
p03951
C++
n = gets.to_i s = gets.chomp t = gets.chomp n.times do |i| if t.index(s[i...n]) == 0 puts n + i exit end end puts n * 2
a.cc:1:1: error: 'n' does not name a type 1 | n = gets.to_i | ^
s972545966
p03951
C++
#include <iterator> #include <array> #include <functional> #include <vector> #include <map> #include <cstdio> template<typename T> struct ScanfSpecifier{}; #define DEF(T,V) template<> struct ScanfSpecifier<T>{static constexpr const char* value = V;}; DEF(char*,"%s")DEF(int,"%d")DEF(double,"%lf")DEF(float,"%f")DEF(char,...
a.cc: In function 'int main()': a.cc:114:9: error: 'strcpy' was not declared in this scope 114 | strcpy(ans, s); | ^~~~~~ a.cc:97:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 96 | #include <algorithm> +++ |+#include <cstring> ...
s741120251
p03952
C++
// #define _GLIBCXX_DEBUG #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; using vi = vector<int>; using vvi = vector<vi>; using puu = pair<uint, uint>; using vu = vector<uint>; using vvu = vector<vu>; using pll = p...
a.cc:27:10: fatal error: atcoder/all: No such file or directory 27 | #include <atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s354524223
p03952
C++
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> using namespace std; using dou =long double; string yes="yes"; string Yes="Yes"; string YES="YES"; string no="no"; string No="No"; string NO="NO"; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } ...
a.cc: In function 'long long int modpow(long long int, long long int)': a.cc:110:41: error: expected ';' before 'a' 110 | if (n & 1) res = res * a % MOD;a | ^ | ; 111 | a = a * a % MOD; | ~ ...
s160210865
p03952
C++
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> using namespace std; using dou =long double; string yes="yes"; string Yes="Yes"; string YES="YES"; string no="no"; string No="No"; string NO="NO"; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } ...
a.cc: In function 'long long int modpow(long long int, long long int)': a.cc:110:41: error: expected ';' before 'a' 110 | if (n & 1) res = res * a % MOD;a | ^ | ; 111 | a = a * a % MOD; | ~ ...
s666012042
p03952
C++
#include<bits/stdc++.h> #include<unordered_set> #include<unordered_map> #include <algorithm> #include <iostream> #include <string> #include <cmath> using namespace std; #define ll long long #define rep(i,n) for (ll i = 0; i < (n); i++) #define FOR(i,a,b) for(ll i=(a);i<(b);i++) #define FORR(i,a,b)for(ll i=(a);i<=(b);i...
a.cc: In function 'int main()': a.cc:87:19: error: expected unqualified-id before '(' token 87 | COUT(*begin.(s)); | ^ a.cc:20:24: note: in definition of macro 'COUT' 20 | #define COUT(x) cout<<(x)<<"\n" | ^
s569885784
p03952
C++
#include <iostream> using namespace std; int main() { int n, x; cin >> n >> x; if ( n == x ) { cout << "Yes\n"; for ( i = 1; i <= n * 2 - 1; i ++ ) cout << i << "\n"; } else cout << "No\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'i' was not declared in this scope 10 | for ( i = 1; i <= n * 2 - 1; i ++ ) | ^
s227390200
p03952
C++
#include<bits/stdc++.h> using namespace std; int main(){ ll N,x; cin>>N>>x; if(N != x){ cout<<"No"<<endl; cout<<-1; return 0; } else{ cout<<"Yes"<<endl; for(int i = 0; i<2*N-1;i++){ cout<<i+1<<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'll' was not declared in this scope 6 | ll N,x; | ^~ a.cc:7:8: error: 'N' was not declared in this scope 7 | cin>>N>>x; | ^ a.cc:7:11: error: 'x' was not declared in this scope 7 | cin>>N>>x; | ^
s886134415
p03952
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<int,int> #define priq...
a.cc: In function 'int main()': a.cc:24:11: error: class template argument deduction failed: 24 | deque ans; | ^~~ a.cc:24:11: error: no matching function for call to 'deque()' In file included from /usr/include/c++/14/deque:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc...
s952770819
p03952
C++
#include <iostream> #include<bits/stdc++.h> using namespace std; typedef long long int ll; //ll ai[100010]; //bool cmp(ll a,ll b) //{ // return a<b;; //} int main() { int num=1; int n,x; cin>>n>>x; if(x==2*n-1||x==1) { printf("No"); return 0; } else { printf("Y...
a.cc: In function 'int main()': a.cc:41:13: error: 't' was not declared in this scope 41 | t++; | ^
s063168620
p03952
C++
#include<cstdio> using namespace std; const int MAX = 300000 + 10; int ans[MAX]; int main(){ int n, x; cin>>n>>x; if (x == 1 || x == 2*n-1) { puts("No"); } else { ans[n-1] = x; int now = n-2; for(int i = 1 ; i <= 2*n-1 ; i++) { if(i == x) continue; ans[now] = i; now--; ...
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope 9 | cin>>n>>x; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using namespace std...
s711075594
p03952
C++
#include <bits/stdc++.h> #include <random> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef double ld; //#define ll __int128 //#define int ll //#define int ll //#define char ll typedef vector<char> vc; typedef vector<vc> vvc; typedef vector<vvc> vvvc; typedef pair<int, int> pii; type...
a.cc:143:2: error: stray '#' in program 143 | }#include <bits/stdc++.h> | ^ a.cc:143:3: error: 'include' does not name a type 143 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:195:14: error: redefinition of 'const double PI' 195 | const double PI = 2 * acos(0.0); | ^~ a.cc:53:14: no...
s697230026
p03952
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n , x ; cin >> n >> x ; int ans =2,res = n; if(x == 1 || x == 2*n-1){ cout << "No" << endl; return 0; } cout << "Yes" << endl; else{ if(x < n){ for(int i=0;i<n-2;i++){ if(i+ans != x){ cout << i...
a.cc: In function 'int main()': a.cc:18:3: error: 'else' without a previous 'if' 18 | else{ | ^~~~
s272250681
p03952
C++
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define sz(x) (int)(x).size() #define S second #define F first #define all(x) (x).begin(), (x).end() using namespace std; const bool dbg_flg = 1; #define debug(x) if (dbg_flg) cerr << #x << ' ' << x << '\n' #define debug_pair(x) ...
a.cc: In function 'int main()': a.cc:25:9: error: expected primary-expression before ']' token 25 | ] | ^
s211334018
p03952
C++
#include<bits/stdc++.h> using namespace std; #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define SZ(x) ((int)(x).size()) #define debug(x) cerr << #x << ": " << x << '\n' #define INF 999999999 typedef long long int Int; typedef pair<int,int> P; using ll...
a.cc: In function 'int main()': a.cc:22:32: error: 'ans' was not declared in this scope; did you mean 'abs'? 22 | else if(a[n-1]>ans[n-2]&&a[n-1]>a[n]) swap(a[n],a[2*n-2]); | ^~~ | abs
s049229712
p03952
C++
#include<bits/stdc++.h> using namespace std; #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define SZ(x) ((int)(x).size()) #define debug(x) cerr << #x << ": " << x << '\n' #define INF 999999999 typedef long long int Int; typedef pair<int,int> P; using ll...
a.cc: In function 'int main()': a.cc:22:32: error: 'ans' was not declared in this scope; did you mean 'abs'? 22 | else if(a[n-1]>ans[n-2]&&a[n-1]>ans[n]) swap(ans[n],ans[2*n-2]); | ^~~ | abs
s416298479
p03952
C++
#include<bits/stdc++.h> using namespace std; #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define SZ(x) ((int)(x).size()) #define debug(x) cerr << #x << ": " << x << '\n' #define INF 999999999 typedef long long int Int; typedef pair<int,int> P; using ll...
a.cc: In function 'int main()': a.cc:20:14: error: request for member 'begin' in 'vec', which is of non-class type 'int [((n * 2) + -1)]' 20 | iota(vec.begin(),vec.end(),1); | ^~~~~ a.cc:20:26: error: request for member 'end' in 'vec', which is of non-class type 'int [((n * 2) + -1)]' 20 | ...
s045034201
p03952
C++
#include <bits\stdc++.h> #define pb push_back #define mp make_pair #define size(x) (int)(x).size() #define S second #define F first #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; bool DBG_FLG = 1; #define debug(x) if (DBG_FLG) cerr << #x << " = " << x << endl; const int inf = 1e9 + ...
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include <bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s581196276
p03952
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <deque> #include <set> #include <stdlib.h> ...
a.cc:55:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 55 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:28:21: error: expected primary-expression before 'for' 28 | #define rep2(i,a,b) for(ll i=a;i<=b;++i) | ^~~ a.cc:61:9: note: in expansion o...
s243048058
p03952
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <deque> #include <set> #include <stdlib.h> ...
a.cc:55:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 55 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:28:21: error: expected primary-expression before 'for' 28 | #define rep2(i,a,b) for(ll i=a;i<=b;++i) | ^~~ a.cc:61:9: note: in expansion o...
s025481945
p03952
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n, x; cin >> n >> x; if (x < n) { cout << "No"; return 0; } else cout << "Yes" << endl; for (int i = 1; i <= 2 * n - 1; i++) cout << i << "endl; return 0; }
a.cc:16:22: warning: missing terminating " character 16 | cout << i << "endl; | ^ a.cc:16:22: error: missing terminating " character 16 | cout << i << "endl; | ^~~~~~ a.cc: In function 'int main()': a.cc:18:5: error: expected primary-expression...
s482896724
p03952
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace st...
a.cc: In function 'int main()': a.cc:105:10: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'bool') 105 | used = true; | ^~~~ In file included from /usr/include/c++/14/vector:67, from /usr/include/c++/14/functional:64, from /usr/include/x8...
s215669419
p03952
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int...
a.cc: In function 'int main()': a.cc:86:10: error: 'n' was not declared in this scope 86 | if(b>n){ | ^ a.cc:88:11: error: no matching function for call to 'swap(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<long long...
s005990089
p03952
C++
//In The Name Of GOD #include <bits/stdc++.h> using namespace std; const int mod = 1000000007; const int inf = 2000000000; const int maxn = 100000; #define ll long long #define pb push_back #define mp make_pair #define IO ios_base::sync_with_stdio(false); int main(){ IO; int n,m; cin>>n>>m; if(m==1||m==2*n-1) ...
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:11:11: note: to match this '{' 11 | int main(){ | ^
s649705858
p03952
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <set> #include <queue> #include <deque> #include <map> #include <stack> #include<bitset> #include<list> #include<cassert> #include<numeric> using namespace std; void solve(int N, int x) { if (x <= 1 || x >= N * 2 - 1) { ...
a.cc: In function 'void solve(int, int)': a.cc:34:16: error: 'res' was not declared in this scope 34 | while (res[ind] != -1) | ^~~ a.cc:36:20: error: 'v' was not declared in this scope 36 | ans[ind] = v; | ^ a.cc:38:25: error: 'n' was not declared in ...
s079007508
p03952
C++
//In The Name Of GOD #include <bits/stdc++.h> using namespace std; const int mod = 1000000007; const int inf = 2000000000; const int maxn = 5000; #define ll long long #define pb push_back #define mp make_pair #define IO ios_base::sync_with_stdio(false); int main(){ IO; int n,m; cin>>n>>m; if(n==m){ cout<<"Y...
a.cc: In function 'int main()': a.cc:16:18: error: expected ';' before 'for' 16 | cout<<"Yes\n" | ^ | ; 17 | for(int i=0;i<2*n-1;i++){ | ~~~ a.cc:17:17: error: 'i' was not declared in this scope 17 | for(int i=0;i<2*n-1;i++){ ...
s800735617
p03952
C++
#include <bits/stdc++.h> #define rep(i,n) for(long long i=0; i<(n); i++) #define int long long #define mod 1000000007 #define F first #define S second #define P pair<long long,long long> #define all(a) a.begin(),a.end() #define INF 1000000000000000000 using namespace std; signed main(void){ int m,x;cin>>m>>x; i...
a.cc: In function 'int main()': a.cc:15:55: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 15 | else if(n==3)cout<<"Yes"<<endl<<1<<endl<<2<<endl<3<<endl; | ~^~~~~~ a.cc:15:49: error: parse error ...
s258402436
p03952
C++
#define S second #define P pair<long long,long long> #define all(a) a.begin(),a.end() #define INF 1000000000000000000 using namespace std; signed main(void){ int m,x;cin>>m>>x; int n=2*m+1; if(x==1||x==n)cout<<"No"<<endl; else if(n==3)cout<<"Yes"<<endl<<"1 2 3"<<endl; else{ cout<<"Yes"<<endl...
a.cc: In function 'int main()': a.cc:7:13: error: 'cin' was not declared in this scope 7 | int m,x;cin>>m>>x; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #define S second a.cc:9...
s483989285
p03952
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,k;cin>>n>>k; if(k==1 || k==2*n-1){ cout<<"No"<<endl; return 0; } else{ cout<<"Yes"<<endl; if(n==k){ for(int i=1;i<=2*n-1;i++){ cout<<i<<endl; } } else if (k<n){ for(int i=n+k-2;i>=k-1;i--){ cout<<i<<endl;} for(int i=n+k-1;i<=2*n-1...
a.cc: In function 'int main()': a.cc:38:2: error: expected '}' at end of input 38 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s864974317
p03952
C++
#include <bits/stdc++.h> #include <stdio.h> using namespace std; int main(){ int N,x; cin>>N>>x; if(x==1 ||x==2*N-1){ cout<<"No"<<endl; } else{ cout<<"Yes"<<endl; int ary[2*N-1]; if(x>=N) { int diff=x-N; int counter=0; for(int i=1+diff; i<=2*N-1; i++) { ary[counter]=i; counter+...
a.cc: In function 'int main()': a.cc:39:45: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 39 | printf(ary[i]); | ~~~~~^ | | | ...
s923153721
p03952
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <stack> #include <queue> #include <deque> #include <numeric> #include <bits/stdc++.h> #include <utility> #include <iomanip> ...
a.cc: In function 'int main()': a.cc:44:11: error: lvalue required as left operand of assignment 44 | if(x==1 || x=2*N-1){ | ~~~~~^~~~
s105217662
p03952
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <stack> #include <queue> #include <deque> #include <numeric> #include <bits/stdc++.h> #include <utility> #include <iomanip> ...
a.cc: In function 'int main()': a.cc:44:11: error: lvalue required as left operand of assignment 44 | if(x==1 || x=2*N-1){ | ~~~~~^~~~
s090452857
p03952
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second #define FOR(i, a, b) for(int i=(a);i<(b);i++) #define REP(i, n) FOR(i, 0, n) #define RFOR(i, a, b) for(int i=(a);i>=(b);i--) #define RREP(i, n) RFOR(i, n, 0) #define MFOR(i, m) for(auto i=(m).beg...
a.cc:38:1: error: two or more data types in declaration of 'main' 38 | int | ^~~