submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s879954894
p03798
C++
#include<bits/stdc++.h> using namespace std; int main() { int N; string str; cin >> N >> str; bool nxor[N]; for (int i = 0; i < N; i++) { nxor[i] = (str[i] == 'o'); } int line[N]; line[0] = 0; line[1] = 0; for (int i = 2; i < N; i++) { if (line[i-1] == 0) { line[i] = (nxor[i-1] ? line[i-2] : ~line[i-2]); } else { lin...
a.cc: In function 'int main()': a.cc:24:37: error: expected primary-expression before ')' token 24 | if (nxor[0] && line[N-1] != line[1])) { | ^ a.cc:27:38: error: expected primary-expression before ')' token 27 | if (!nxor[0] && line[N-1] == line[1])) { | ...
s858776180
p03798
C++
#include <stdio.h> #include <string.h> #include <vector> int N; char s[112345]; char temp[112345]; std::vector<std::string>res; bool Is_ans_flag = true; char ans[112345] = "-1"; void f(int pos, char string[]) { if (pos >= N) { std::string tete = string; res.push_back(tete); } else { if (s[pos] == 'o') { ...
a.cc:8:18: error: 'string' is not a member of 'std' 8 | std::vector<std::string>res; | ^~~~~~ a.cc:4:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 3 | #include <vector> +++ |+#include <string> 4 | a.cc:8:24: error: te...
s379375132
p03798
C++
#include<bits/stdc++.h> using namespace std; int main() { int N; string str; cin >> N >> str; bool nxor[N]; for (int i = 0; i < N; i++) { nxor[i] = (str[i] == 'o'); } int line[N]; line[0] = 0; line[1] = 0; for (int i = 2; i < N; i++) { if (line[i-1] == 0) { line[i] = (nxor[i-1] ? line[i-2] : ~line[i-2]); } else { line...
a.cc: In function 'int main()': a.cc:25:5: error: 'i' was not declared in this scope 25 | for(i = 0; i < N; i++) { | ^ a.cc:34:5: error: 'i' was not declared in this scope 34 | for(i = 0; i < N; i++) { | ^ a.cc:45:1: error: array of runtime bound cannot be captured by copy, only by reference ...
s199980432
p03798
C
#include <stdio.h> int main(void){ int how; scanf("%d\n",&how); char data[how]; int loop1; int how_x=0; for(loop1=0;loop1<how;loop1++){ scanf("%c",&data[loop1]); if(data[loop1]=='x')how_batu++; } if(x%2==1){ printf("-1\n"); return 0; } }
main.c: In function 'main': main.c:10:29: error: 'how_batu' undeclared (first use in this function) 10 | if(data[loop1]=='x')how_batu++; | ^~~~~~~~ main.c:10:29: note: each undeclared identifier is reported only once for each function it appears in main.c:12:8: error: 'x' un...
s273922026
p03798
C++
#include<iostream> #include<bits/stdc++.h> #define pq priority_queue #define Pi acos(-1.0) using namespace std; #define INFF 10000000007 #define MOD 1000000007 char s[100005]; int len; bool life[100005],flag=0; bool ok(bool x,bool y); { life[0]=x; life[1]=y; for(int i=1;i<len;i++) { if(s[i]=='O'...
a.cc:12:1: error: expected unqualified-id before '{' token 12 | { | ^
s890186782
p03799
C++
#include<bits/stdc++.h> //#include<atcoder/all> using namespace std; //using namespace atcoder; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #def...
a.cc: In function 'int main()': a.cc:245:31: error: expected primary-expression before '<<' token 245 | cout << min((2*n+m)/4,m/2); << endl; | ^~
s571321210
p03799
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i = 0;i < n;i++) using ll = long long; int main(){ ll n,m; cin >n >>m; if(2*n>m) cout << m/2 << endl; else cout << n+(m-n*2)/4 << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'll' {aka 'long long int'}) 7 | ll n,m; cin >n >>m; | ~~~ ^~~~~~ | | | | | ll {aka long long int} | ...
s219929084
p03799
C++
#include <bits/stdc++.h> #include <string.h> #include <vector> //s#define rep(i, n) for (int i = 0; i < (n); i++) #define MAX 10000 using namespace std; #define ll long long #define pb push_back #define mp make_pair #define all(a) (a).begin(),(a).end() #define rep(i,a,n) for(int i=a; i<n; i++) #define r0 return 0 #...
a.cc: In function 'int main()': a.cc:37:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 37 | ans = n; | ^~~ | abs a.cc:41:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 41 | ans += m/2; | ^~~ | abs a.cc:44:8: error: 'ans' was...
s133062678
p03799
C++
gg
a.cc:1:1: error: 'gg' does not name a type 1 | gg | ^~
s573026981
p03799
C++
#include <bits/stdc++.h> using namespace std; //long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x <<...
a.cc: In function 'int main()': a.cc:216:21: error: 'M' was not declared in this scope 216 | ll ans = min(n, M / 2); | ^
s902251393
p03799
C++
#include <bits/stdc++.h> #include <stdlib.h> using namespace std; typedef long long ll; typedef pair<int,int> P; typedef pair<ll,ll> llP; int main() { ll n,m; cin>>n>>m; if(2*n>=m) cout<<m/2<endl; else cout<<n+(m-2*n)/2<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:23: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 11 | if(2*n>=m) cout<<m/2<endl; | ~~~~~~~~~^~~~~ In file included from /usr/incl...
s274560758
p03799
C++
using namespace std; int main() { long long n,m; cin>>n>>m; int64_t count=0; if(n>=2*m){ count=m/2; }else{ m-=2*n; count=n+m/4; } cout<<count<<endl; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin>>n>>m; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:6:5: error: 'i...
s064048190
p03799
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll a,c; cin >> a >> c; cout << c>=2*a?(a+(c-2*a)/4):a <<endl; ret...
a.cc: In function 'int main()': a.cc:17:14: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'long long int') 17 | cout << c>=2*a?(a+(c-2*a)/4):a <<endl; | ~~~~~~~~~^~~~~ | | | | | ...
s888365803
p03799
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll a,b; cin >> a >> b; cout << max(min(a,c/2),a+(c-2*a)/3); retur...
a.cc: In function 'int main()': a.cc:17:23: error: 'c' was not declared in this scope 17 | cout << max(min(a,c/2),a+(c-2*a)/3); | ^
s209536426
p03799
C++
#include<bits//stc++.h> using namespace std; typedef long long ll; ll l,x,y,s = 0,d,n,m; int main() { cin >> n >> m; if (2*n >= m) { cout << m / 2 << endl; } else { cout << n + (m - 2 * n) / 4 << endl; } }
a.cc:1:9: fatal error: bits//stc++.h: No such file or directory 1 | #include<bits//stc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s506489675
p03799
C++
n, m = map(int, input().split()) cnt = 0 if n*2 <= m: m -= n*2 cnt += n + m//4 else: cnt += m//2 print(cnt)
a.cc:1:1: error: 'n' does not name a type 1 | n, m = map(int, input().split()) | ^
s291034927
p03799
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int answer = 0; if(n <= 2*m){ answer = answer + n + (m-2*n)/4; } else { answer = answer + n } cout << answer << endl; }
a.cc: In function 'int main()': a.cc:11:28: error: expected ';' before '}' token 11 | answer = answer + n | ^ | ; 12 | } | ~
s365970786
p03799
C
#include<stdio.h> #include<algorithm> #define ll long long using namespace std; int main() { ll a,b;scanf("%lld%lld",&a,&b); printf("%lld\n",a + (b - a * 2) / 4); return 0; }
main.c:2:9: fatal error: algorithm: No such file or directory 2 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s748310818
p03799
C++
1 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 6 | ^
s945606598
p03799
C
import java.util.Scanner; class Main{ static Scanner scan=new Scanner(System.in); public static void main(String args[]){ long n=scan.nextLong(); long m=scan.nextLong(); long x=n*2+m; System.out.println(x/4); } }
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:3:1: error: unknown type name 'class' 3 | class Main{ | ^~~~~ main....
s836742100
p03799
C
#include<iostream> #include<stdio.h> #include<vector> #include<stdlib.h> #include<algorithm> #include<string> #include<string.h> #include<queue> using namespace std; int main(){ long long n,m; cin >> n >> m; cout << min(n,m/2)+max((long long)0,m-2*n)/4 << endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s004553224
p03799
C++
#include<iostream> using namespace std; int main(){ int N,M,x; cin>>n>>m; x=N*2; M=x+M; cout<<M/4; }
a.cc: In function 'int main()': a.cc:5:14: error: 'n' was not declared in this scope 5 | cin>>n>>m; | ^ a.cc:5:17: error: 'm' was not declared in this scope 5 | cin>>n>>m; | ^
s835150163
p03799
C++
#include<iostream> #include<vector> #include<algorithm> #include<utility> using namespace std; typedef pair<int, int> P; int main(){ ll n, m;cin>>n>>m; if(ll(2)*n<=m)cout<<n+(m-ll(2)*n)/ll(4)<<endl; else cout<<m/ll(2)<<endl; }
a.cc: In function 'int main()': a.cc:10:3: error: 'll' was not declared in this scope 10 | ll n, m;cin>>n>>m; | ^~ a.cc:10:16: error: 'n' was not declared in this scope 10 | ll n, m;cin>>n>>m; | ^ a.cc:10:19: error: 'm' was not declared in this scope; did you mean 'tm'? 10 | ...
s864961419
p03799
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n, m; int main() { ios::sync_with_stdio(false), cin.tie(0); cin >> n >> m; ll t = max(0LL, (2 * m - n + 4) / 5); n += t; m -= 2t; cout << min(n, m / 2) << "\n"; }
a.cc: In function 'int main()': a.cc:12:10: error: unable to find numeric literal operator 'operator""t' 12 | m -= 2t; | ^~
s262465163
p03799
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n, m; int main() { ios::sync_with_stdio(false), cin.tie(0); cin >> n >> m; ll t = max(0, (2 * m - n + 4) / 5); n += t; m -= 2t; cout << min(n, m / 2) << "\n"; }
a.cc: In function 'int main()': a.cc:10:16: error: no matching function for call to 'max(int, ll)' 10 | ll t = max(0, (2 * m - n + 4) / 5); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc...
s148511839
p03799
C
#include<stdio.h> int main(){ long long int N,M; scanf("%lld %dll", &N, &M); if(n*2=>m){ printf("%lld\n", m/2); } else{ printf("%lld\n", n+(m-n*2)/4); } retrun 0; }
main.c: In function 'main': main.c:7:7: error: 'n' undeclared (first use in this function) 7 | if(n*2=>m){ | ^ main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in main.c:7:11: error: expected expression before '>' token 7 | if(n*2=>m){ | ...
s218697608
p03799
C++
#include<bits/stdc++.h> using namespace std; #define REP(i,n) for(long long i=0;i<n;i++) #define REP1(i,n) for(long long i=1;i<=n;i++) #define REPB(i,n) for(long long i=((n)-1);i>=0;i--) #define REPB1(i,n) for(long long i=(n);i>0;i--) #define ITE(arr) for(auto ite=(arr).begin();ite!=(arr).end();ite++) #define ALL(a) (a...
a.cc: In function 'int main()': a.cc:22:50: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<<' 22 | cout<<(nums>numc)?(numc):((nums+numc)>>1)<<endl; | ~~~~~~~~~~~~~~~~^~~~~~
s229182260
p03799
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> using namespace std; #define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i ) #define rep(i,n) REP(i...
a.cc: In function 'int main()': a.cc:27:27: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<<' 27 | cout << max(n,n+(2*m-n)/4 << endl; | ~~~~~~~~~~~~^~~~~~~
s109813925
p03799
C++
#include<bits/stdc++.h> using namespace std; /* Bismillahir Rahmanir Rahim Problem : Problem Link : Topics : Solver : Masud Parves I Love Code More than Sharks Love Blood <3 */ #define ff first #define ss second #define pb push_back #define mp make_pair #define SZ(a)...
a.cc: In function 'int main()': a.cc:74:5: error: 'l' was not declared in this scope; did you mean 'll'? 74 | l S,C; | ^ | ll a.cc:75:12: error: 'S' was not declared in this scope; did you mean 'SZ'? 75 | cin >> S >> C; | ^ | SZ a.cc:75:17: error: 'C' ...
s424812874
p03799
C++
#include <bits/stdc++.h> using namespace std; int main() { int S_NUM, C_NUM; cin >> S_NUM >> C_NUM; // Sの数だけsccパターンを作る // SがN個あったら、Cは2N個必要 // C_NUM < 2N のときは (C_NUM / 2)個作れる int scc_num_1 = min(S_NUM, C_NUM / 2); if(2 * S_NUM > C_NUM) { cout << C_NUM / 2 << endl; return; } // あまったcで...
a.cc: In function 'int main()': a.cc:14:5: error: return-statement with no value, in function returning 'int' [-fpermissive] 14 | return; | ^~~~~~
s432145136
p03799
C++
N,M = map(int,input().split()) count=0 if N*2<=M: count = N M -= N*2 else: count = M/2 M = 0 count += M//4 print(count)
a.cc:1:1: error: 'N' does not name a type 1 | N,M = map(int,input().split()) | ^
s809135520
p03799
C++
#include <stdio.h> #define ll long long using namespace std; ll lin() {ll x;scanf("%lld",&x);return x;} int main(){ ll n=lin(); cout<<max(-2*n+lin(),0ll)/4+n<<endl; }
a.cc: In function 'int main()': a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout<<max(-2*n+lin(),0ll)/4+n<<endl; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <io...
s757470124
p03799
C
def fun(): print('ac') print('ac') print('ac') print('ac') N,M=map(int,input().split()) if N*2>=M: print(M//2) else: result=N+(M-2*N)//4 print(result)
main.c:1:1: error: unknown type name 'def' 1 | def fun(): | ^~~ main.c: In function 'fun': main.c:1:10: error: expected declaration specifiers before ':' token 1 | def fun(): | ^ main.c:2:12: warning: multi-character character constant [-Wmultichar] 2 | print('ac') | ...
s560497705
p03799
C
#include<bits/stdc++.h> using namespace std; int main() { long long a, b, c=0; cin>>b>>a; if(2*b<=a) { c+=b; if(a%2==0) a-=2*b; else a-=2*b; while(a>=4) { c++;a-=4; } } else if(2*b>a) { c+=a/2; } ...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s105341783
p03799
C++
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define ll long long #define pii pair <int, int> #define X first #define Y second using namespace std; const int OFF = (1 << 15); vector <int> ve[OFF * 2]; int bio[2 * OFF], low[2 * OFF], scc[2 * OFF]; int cn...
a.cc:18:18: error: 'int index [65536]' redeclared as different kind of entity 18 | int index[2 * OFF]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, ...
s728052547
p03799
C++
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cinttypes> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <limits> #include <list> #include <map> #include <memory> #include <numeric> #include...
a.cc: In function 'int main()': a.cc:37:23: error: no matching function for call to 'max(long long int, int64_t)' 37 | for (int64_t x = max(0LL, X - 10); x <= X + 10; ++x) { | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:1: /usr/includ...
s957791189
p03799
C++
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); long long n, m; cin >> n >> m; long long res; if (2 * n > m) res = m / 2; else res = n + (m - 2 * n) / 4; cout << res << "\n"; return 0; }98
a.cc:14:2: error: expected unqualified-id before numeric constant 14 | }98 | ^~
s493386196
p03799
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int n, m; cin >> n >> m; cout << max(n + (m - n * 2) / 4, m / 2)); }
a.cc: In function 'int main()': a.cc:7:44: error: expected ';' before ')' token 7 | cout << max(n + (m - n * 2) / 4, m / 2)); | ^ | ;
s886614620
p03799
C++
S, C = map(int, raw_input().split(' ')) X = min(S, C / 2) res = X C -= 2 * X res += C / 4 print res
a.cc:1:1: error: 'S' does not name a type 1 | S, C = map(int, raw_input().split(' ')) | ^
s913183318
p03799
C++
include<iostream> using namespace std; int main() { int n,m,k; cin>>n>>m; if(n*2<=m){ k=n; m=m-n*2; k+=m/4;} else{cout<<m/2;} cout<<"\n"<<k; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>n>>m; | ^~~ a.cc:11:6: error: 'cout' was not declared in this scope 11 | else{cout<<m/2;} | ^~~~ a.cc:12:1: err...
s942556752
p03799
C++
#include <iostream> using namespace std; int main(){ long long int N, M; cin >> N >> M; cout << min(N, M/2) + max(0,(M-2*N)/4) << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:28: error: no matching function for call to 'max(int, long long int)' 6 | cout << min(N, M/2) + max(0,(M-2*N)/4) << endl; | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/loca...
s314009657
p03799
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int result = 0; if (M >= 2) { if (N*2 <= M) { if (M - N*2) >= 4 { result = ((M - N*2) / 4) + N); ...
Main.java:10: error: illegal start of expression if (M - N*2) >= 4 { ^ Main.java:10: error: ';' expected if (M - N*2) >= 4 { ^ Main.java:11: error: ';' expected result = ((M - N*2) / 4) + N); ^ Main...
s797871497
p03799
C++
#include <iostream> #include <vector> using namespace std; struct ioi { int x,i,type; ioi(){} ioi(int a,int b,int c){x=a,i=b,type=c;} }p[20010]; int n,x[10010],y[10010],bin[20010],last[10010],counter[20010],sz,in_st[20010],co,order[200010],al[200010],st[200010],top; vector<int> a[200010],b[200010]; void find_max...
a.cc: In function 'bool check(int)': a.cc:104:70: error: 'upper_bound' was not declared in this scope 104 | int L=lower_bound(bin+1,bin+2*n+1,bin[i]-dis)-bin,R=(upper_bound(bin+1,bin+2*n+1,bin[i]+dis)-bin)-1; | ^~~~~~~~~~~ a.cc...
s836677633
p03799
C++
#include "template.hpp" int main() { int n, m; cin >> n >> m; cout << min(m / 2, (2 * n + m) / 4) << endl; }
a.cc:1:10: fatal error: template.hpp: No such file or directory 1 | #include "template.hpp" | ^~~~~~~~~~~~~~ compilation terminated.
s942225258
p03799
C++
#include<cstdio> #include<cstring> #include<algorithm> typedef __int64 ll; using namespace std; int main() { ll n, m, ans; while(scanf("%I64d %I64d", &m, &n) != EOF) { if(m * 2 >= n) { ans = n / 2; } else { n -= m * 2; ans = m + n /3; } printf...
a.cc:4:9: error: '__int64' does not name a type; did you mean '__int64_t'? 4 | typedef __int64 ll; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:8:5: error: 'll' was not declared in this scope 8 | ll n, m, ans; | ^~ a.cc:9:33: error: 'm' was not declared in...
s316286679
p03799
C++
// ConsoleApplication50.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include "stdafx.h" #include <iostream> using namespace std; int main() { int n, m; cin >> n >> m; int us = n * 2 <= m ? n : m / 2; //cout << "us : " << us << endl; int rc = m - 2 * us; int uco = rc <= 0 ? 0 : rc / 4; cout << us + uco << endl; ...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s133975309
p03799
C++
#include<iostream> using namespace std; int main(){ longlongint s,c; cin>>s>>c; if(s>=c/2){ cout<<c/2<<endl; } if(c/2>s){ cout<<s+(c-s*2)/4<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'longlongint' was not declared in this scope 5 | longlongint s,c; | ^~~~~~~~~~~ a.cc:7:14: error: 's' was not declared in this scope 7 | cin>>s>>c; | ^ a.cc:7:17: error: 'c' was not declared in this scope 7 | ...
s052342111
p03799
C
#include<stdio.h> int main() { int s,c; int q,w; int e,r; scanf_s("%d",&s); scanf_s("%d",&c); q=s*2; if(c>q) { w=c-q; e=w/4; r=e+s; printf("%d",r); } if(c==q) { printf("%d",s); } if(c<q) { if(0==c%2) { w=c/2; printf("%d",w); } if(0!=c%2) { c--; w=c/2; printf("%d",w); }...
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scanf_s("%d",&s); | ^~~~~~~ | scanf
s848279326
p03799
C++
#include<stdio.h> int main() { __int64 N, M; scanf("%I64d %I64d", &N, &M); printf("%I64d", N + (M - 2 * N) / 4); return 0; }
a.cc: In function 'int main()': a.cc:5:4: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 5 | __int64 N, M; | ^~~~~~~ | __int64_t a.cc:6:26: error: 'N' was not declared in this scope 6 | scanf("%I64d %I64d", &N, &M); | ^ a.cc:6:30...
s556159757
p03799
C
#include<stdio.h> int main() { __int64 N, M; scanf("%I64d %I64d", &N, &M); printf("%I64d", N + (M - 2 * N) / 4); return 0; }
main.c: In function 'main': main.c:5:4: error: unknown type name '__int64'; did you mean '__int64_t'? 5 | __int64 N, M; | ^~~~~~~ | __int64_t
s898528157
p03799
C
#include "stdafx.h" #include<stdio.h> #include<stdlib.h> int main() { __int64 N, M; scanf("%I64d %I64d", &N, &M); printf("%I64d", N + (M - 2 * N) / 4); system("pause"); return 0; }
main.c:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s083221381
p03799
Java
import java.io.*; import java.util.*; import java.lang.Math.*; public class Main { private static MyScanner scanner; public static void main (String[] args){ Main instance = new Main(); scanner = instance.new MyScanner(); instance.solve(); } private void solve() { try {...
Main.java:15: error: incompatible types: int cannot be converted to Long Long counter = 0; ^ 1 error
s571094509
p03799
C++
#include <iostream> int main() { int N, M; std::cin >> N >> M; int result; result = N < M / 2 ? (N + (M - 2N) / 4) : M / 2; std::cout << result << std::endl; ...
a.cc: In function 'int main()': a.cc:7:34: error: unable to find numeric literal operator 'operator""N' 7 | result = N < M / 2 ? (N + (M - 2N) / 4) : M / 2; | ^~
s824161341
p03799
C++
#include <iostream> int main() { int N, M; std::cin >> N >> M; int result = N < M / 2 ? (N + (M - 2N) / 4) : M / 2; std::cout << result << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:6:38: error: unable to find numeric literal operator 'operator""N' 6 | int result = N < M / 2 ? (N + (M - 2N) / 4) : M / 2; | ^~
s554868640
p03799
C++
def main(): arg = raw_input().split(" ") N = int(arg[0]) M = int(arg[1]) c_pattern = (M/2) if N < 1 or N > 10**12: return 0 if M < 1 or M > 10**12: return 0 if N == c_pattern: return N elif N < c_pattern: tmp = M - (N * 2) return N + (tmp / 4) ...
a.cc:2:1: error: 'def' does not name a type 2 | def main(): | ^~~
s070426925
p03799
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int64_t s, c; cin >> s >> c; int64_t k = min(s, c / 2LL); c -= k * 2LL; k += c / 4LL; cout << k << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:20: error: no matching function for call to 'min(int64_t&, long long int)' 9 | int64_t k = min(s, c / 2LL); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s648711048
p03799
C++
#include<stdio.h> #include<math.h> int main(){ __int64 a,b; while(scanf("%I64d %I64d",&a,&b)==2) { __int64 sum=0; if(b/2>a) { sum+=a; b-=2*a; sum+=b/4; printf("%I64d\n",sum); } else { sum+=b/2; printf("%I64d\n",sum); } } return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 4 | __int64 a,b; | ^~~~~~~ | __ynf64 a.cc:5:36: error: 'a' was not declared in this scope 5 | while(scanf("%I64d %I64d",&a,&b)==2) | ...
s650437494
p03799
C
#include<stdio.h> #include<math.h> __int64 a,b; int main(){ while(scanf("%I64d %I64d",&a,&b)==2) { __int64 sum=0; if(b/2>a) { sum+=a; b-=2*a; sum+=b/4; printf("%I64d\n",sum); } else { sum+=b/2; printf("%I64d\n",sum); } } return 0; }
main.c:3:1: error: unknown type name '__int64'; did you mean '__int64_t'? 3 | __int64 a,b; | ^~~~~~~ | __int64_t main.c: In function 'main': main.c:7:17: error: unknown type name '__int64'; did you mean '__int64_t'? 7 | __int64 sum=0; | ^~~~~~~ | ...
s886959692
p03799
C++
#include<cstdio> #include<iostream> #include<cstring> __int64 a,b; int main(){ while(scanf("%I64d %I64d",&a,&b)==2) { __int64 sum=0; if(b/2>a) { sum+=a; b-=2*a; sum+=b/4; printf("%I64d\n",sum); } else { sum+=b/2; printf("%d\n",sum); } } return 0; }
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'? 4 | __int64 a,b; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:6:36: error: 'a' was not declared in this scope 6 | while(scanf("%I64d %I64d",&a,&b)==2) | ^ a.cc:6:...
s035164256
p03799
C++
#include<cstdio> #include<iostream> #include<cstring> __int64 a,b; int main(){ while(scanf("%I64d %I64d",&a,&b)==2) { __int64 sum=0; if(b/2>a) { sum+=a; b-=2*a; sum+=b/4; printf("%I64d\n",sum); } else { sum+=b/2; printf("%d\n",sum); } } return 0; }
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'? 4 | __int64 a,b; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:6:36: error: 'a' was not declared in this scope 6 | while(scanf("%I64d %I64d",&a,&b)==2) | ^ a.cc:6:...
s815965437
p03799
C++
#include <iostream> #include <string> #include <vector> #include <map> #include <set> #include <sstream> #include <algorithm> using namespace std; #define numberof(a) (sizeof(a) / sizeof(a[0])) #define INF (1000000) #define Rep(i,n) for(int i = 0; i < (n); i++ ) //clear memory #define CLR(a) memset((a), 0 ,sizeof(a...
a.cc:28:19: error: 'acos' was not declared in this scope 28 | const double PI = acos(-1.0); | ^~~~
s936977113
p03799
C++
#include <iostream> #include <string> #include <vector> #include <map> #include <set> #include <sstream> #include <algorithm> using namespace std; #define numberof(a) (sizeof(a) / sizeof(a[0])) #define INF (1000000) #define Rep(i,n) for(int i = 0; i < (n); i++ ) //clear memory #define CLR(a) memset((a), 0 ,sizeof(a...
a.cc:28:19: error: 'acos' was not declared in this scope 28 | const double PI = acos(-1.0); | ^~~~
s019154145
p03799
C++
#include <string.h> #include <string> #include <vector> #include <deque> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <iterator> #include <functional> #include <algorithm> #include <numeric> #include <iostream> #include <sstream> #include <iomanip> #include <cmath> #include <...
a.cc: In function 'int main()': a.cc:45:46: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<<' 45 | cout << s + ((c - 2 * s) / 4 << endl; | ~~~~~~~~~~~~~~~~^~~~~~~ a.cc:45:53: error: expecte...
s072796243
p03799
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; int ans; scanf("%d%d", &n,&m); if(n*2 > m) ans = m/2; else ans = n+(m-n*2)/4; printf("%d\n", ans); }
a.cc:4:11: error: expected initializer before '\U0000ff5b' 4 | int main(){ | ^~ a.cc:7:11: error: expected constructor, destructor, or type conversion before '(' token 7 | scanf("%d%d", &n,&m); | ^ a.cc:8:6: error: expected unqualified-id before 'if' 8 | if(n*2 > m)...
s714146752
p03799
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; int ans; scanf("%d%d", &n,&m); if(n*2 > m) ans = m/2; else ans = n+ (m-n*2)/4; printf("%d\n", ans); }
a.cc:4:11: error: expected initializer before '\U0000ff5b' 4 | int main(){ | ^~ a.cc:7:11: error: expected constructor, destructor, or type conversion before '(' token 7 | scanf("%d%d", &n,&m); | ^ a.cc:8:6: error: expected unqualified-id before 'if' 8 | if(n*2 > m)...
s363952652
p03799
C
include<stdio.h> int main(void) { //3つの狼の合計が偶数->〇 //S->0 W->1 //S->0x53 //W->0x57 //o->0x6f //x->0x78 long long int N, i, h, x = 0, ok = 0; char c; static char say[100015]; static long long int dou[100015]; long long int sta[2]; scanf("%lld", &N); fflush(stdin); for (i = 0; i < N; i++) { scanf("%c", &s...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s065613037
p03799
C++
#!/usr/bin/python3 # Copyright (C) 2017 Sayutin Dmitry. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; version 3 # # This program is distributed in the hope that it will be useful, # but WITH...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/python3 | ^ a.cc:2:3: error: invalid preprocessing directive #Copyright 2 | # Copyright (C) 2017 Sayutin Dmitry. | ^~~~~~~~~ a.cc:4:3: error: invalid preprocessing directive #This 4 | # This program is free software; you can r...
s057764850
p03799
Java
import java.util.*; public class puzzle_1 { public static int readint() { Scanner s = new Scanner(System.in); return s.nextInt(); //s.nextInt(); } public static void main(String[] args) { long N, M; long p; N = readint(); M = readint(); if(M >= (2 * N)) p = N + (M - 2*N)/4; else p = M/2; ...
Main.java:2: error: class puzzle_1 is public, should be declared in a file named puzzle_1.java public class puzzle_1 { ^ 1 error
s741869332
p03799
C++
import java.util.Scanner; /** * Created by srikanth on 18-02-2017. */ public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); int N=in.nextInt(); int M=in.nextInt(); int val=0; if(2*N<=M){ val+=N; M-=2*N; ...
a.cc:3:1: error: 'import' does not name a type 3 | import java.util.Scanner; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: expected unqualified-id before 'public' 8 | public class Main { | ^~~~~~
s382148314
p03799
C++
import Control.Monad import Data.Maybe import qualified Data.ByteString.Char8 as C solve m n acc | m /= 0 && n >= 2 = solve (m - 1) (n - 2) (acc + 1) | n >= 4 = solve m (n - 4) (acc + 1) | otherwise = acc main = do [m, n] <- readInts -- print $ solve 1 6 0 -- print $ solve 12345 678901 0 print $ solv...
a.cc:1:1: error: 'import' does not name a type 1 | import Control.Monad | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s263967676
p03799
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdio> using namespace std; int main() { lomg int n,m; scanf("%ld %ld", &n, &m); long int num = 0; if (m == 0) { num = 0; }else { num = n + (m - 2 * n) / 4; } printf("%ld\n", num); return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'lomg' was not declared in this scope; did you mean 'long'? 10 | lomg int n,m; | ^~~~ | long a.cc:12:27: error: 'n' was not declared in this scope 12 | scanf("%ld %ld", &n, &m); | ^ a.cc:1...
s348579495
p03799
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n,m; cin>>n>>m; ll l=0; llr=n; ll ans; while(l<=r){ ll mid=(l+r)/2; ll rr=m; rr-=mid*2; ll e=n+rr/2; rr-=(rr/2); if(e>= mid && rr>=0) l=mid+1,ans=mid; else r=mid-1; } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:8:1: error: 'llr' was not declared in this scope; did you mean 'll'? 8 | llr=n; | ^~~ | ll a.cc:10:10: error: 'r' was not declared in this scope 10 | while(l<=r){ | ^
s475791038
p03799
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b; cin>>a>>b; ll r=a*2; ll ans=(r+b)/4; cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:6:1: error: 'll' was not declared in this scope 6 | ll r=a*2; | ^~ a.cc:7:3: error: expected ';' before 'ans' 7 | ll ans=(r+b)/4; | ^~~~ | ; a.cc:8:7: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | cout<<ans<<endl; | ...
s755181936
p03799
C++
n,m = map(int, raw_input().split()) if 2*n < m: print n + (m-2*n)/4 elif 2*n == m: print n else: print m/2
a.cc:1:1: error: 'n' does not name a type 1 | n,m = map(int, raw_input().split()) | ^
s889506406
p03799
C++
#include<bits/stdc++.h> #include <stdio.h> using namespace std; #define mod 1000000007LL #define pi 3.141592653589793238462643383279; #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> #define f first #define s second #define pic pair<char,long long > void scan(vector<ll> & v) { for(int i=0;...
a.cc:28:11: error: expected initializer before 'a' 28 | int main()a | ^
s290211758
p03799
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; using i32 = int32_t; using i64 = int64_t; using f64 = double_t; using str = string; template <typename T> using vec = vector<T>; template <typename T> using heap = priority_queue<T, vec<T>, greater<T>>; #define time...
a.cc: In function 'i32 main()': a.cc:33:15: error: no matching function for call to 'max(long long int, i64)' 33 | ans += max(0LL, (m - ans*2)/4); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/std...
s755021228
p03800
C++
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; #define all(v) v.begin(), v.end() using in = int64_t; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define Yes cout<<"Yes"<<endl #define No...
a.cc:3:10: fatal error: atcoder/all: No such file or directory 3 | #include <atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s762681199
p03800
C++
/** * * Author : MeGa * */ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <...
a.cc: In function 'int main()': a.cc:132:37: error: 'found' was not declared in this scope; did you mean 'round'? 132 | found = true; | ^~~~~ | round a.cc:170:2: error: expected '}' at end of input ...
s642806171
p03800
C++
#include<bits/stdc++.h> using namespace std; int n,a[1<<17],b,c,i; string s; int main(){ cin>>n>>s; for(b:{0,1}){ for(c:{0,1}){ a[1]=b; a[2]=c; a[0]=(s[1]=='o')^b^c; for(i=3;i<n;i++)a[i]=(s[i-1]=='o')^a[i-1]^a[i-2]; if((s[n-1]=='o')^a[n-1]==a[0]^a[n-2]&&(s[0]=='o')^a[0]==a[n-1]^a[1...
a.cc: In function 'int main()': a.cc:7:8: error: expected ';' before ':' token 7 | for(b:{0,1}){ | ^ | ; a.cc:7:14: error: expected primary-expression before ')' token 7 | for(b:{0,1}){ | ^ a.cc:7:14: error: expected ';' before ')' token 7 | for(b:{0,1}){ ...
s402455034
p03800
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; string s; cin >> s; string ans(N, 'S'); for (int i = 1; i < N - 1; i++) { if (ans[i] == 'S' && ans[i - 1] == 'S' && s[i] == 'x') ans[i + 1] = 'W'; if (ans[i] == 'S' && ans[i - 1] == 'W' && s[i] == 'o') ans[i + 1] = 'W'; if (ans[i] == 'W...
a.cc: In function 'int main()': a.cc:34:14: error: redeclaration of 'bool OK' 34 | bool OK = true; | ^~ a.cc:16:14: note: 'bool OK' previously declared here 16 | bool OK = true; | ^~
s066897705
p03800
C++
#include <iostream> //#include <iomanip> #include <string> //#include <vector> #include <algorithm> //#include <utility> //#include <set> //#include <map> //#include <queue> //#include <deque> //#include <bitset> //#include <math.h> using namespace std ; using ll = long long ; //using ld = long double ; //using vll = v...
a.cc: In function 'int main()': a.cc:110:16: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 110 | if(DFS(""s,'S')) return 0 ; | ^~~ a.cc:38:18: note: initializing argu...
s494021973
p03800
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll N; cin >> N; string s,t; cin >> s; t.resize(N); ll i,j...
a.cc: In function 'int main()': a.cc:45:52: error: expected ';' before '}' token 45 | if(flag1&&flag2){cout << t << endl;return 0} | ^ | ;
s370971955
p03800
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll N; cin >> N; string s,t; cin >> s; t.resize(N); ll i,j...
a.cc: In function 'int main()': a.cc:34:36: error: expected ';' before ':' token 34 | if(t[0]==t[N-2])flag1=1: | ^ | ;
s240001893
p03800
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll N; cin >> N; string s,t; cin >> s; t.resize(N); ll i,j...
a.cc: In function 'int main()': a.cc:34:36: error: expected ';' before ':' token 34 | if(t[0]==t[N-2])flag1=1: | ^ | ;
s331280463
p03800
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll N; cin >> N; string s,t; cin >> s; t.resize(N); ll i,j...
a.cc: In function 'int main()': a.cc:34:36: error: expected ';' before ':' token 34 | if(t[0]==t[N-2])flag1=1: | ^ | ; a.cc:40:36: error: expected ';' before ':' token 40 | if(t[N-1]==t[1])flag2=1: | ...
s544202055
p03800
C++
#include <stdio.h> #include <string.h> #include <limits.h> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <map> #include <set> typedef unsigned long long ULLONG; typedef long long LLONG; static const LLONG MOD_NUM = 1000000007; template <class _T> static _T tp_abs(const _T& a) ...
a.cc: In function 'void ARC069D_Menagerie()': a.cc:64:9: error: 'getstring' was not declared in this scope 64 | getstring(seq); | ^~~~~~~~~
s129304535
p03800
C++
#include <bits/stdc++.h> using namespace std; char p[100011]; int s[100011],q[100011],n; int main() { cin >>n; cin >>p; for(i=0;p[i];i++) { if(p[i]=='o') q[i+1]=0; else q[i+1]=1; } p[n+1]=p[1]; for(int i=0;i<8;i++) { s[0]=i&1; s[1]=(i>>1)&1; s[2]=(i>>2)&1; for(int j=2;j<=n+1;j++) s[j+1]=s[j-2]...
a.cc: In function 'int main()': a.cc:9:13: error: 'i' was not declared in this scope 9 | for(i=0;p[i];i++) | ^
s311491744
p03800
C++
#include <Bits/stdc++.h> using namespace std; int a[10000011]; int main() { int n; string s; cin >>n>>s; s=s+s; for(int i=0;i<2;i++) for(int j=0;j<2;j++) { a[0]=i; a[1]=j; for(int l=2;l<n+2;l++) { if(s[l-1]=='o'&&a[l-1]==0) a[l]=1-a[l-2]; if(s[l-1]=='o'&&a[l-1]==1) a[l]=a[l-2]; if(s[l-1]==...
a.cc:1:10: fatal error: Bits/stdc++.h: No such file or directory 1 | #include <Bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s174749808
p03800
C++
#include <Bits/stdc++.h> using namespace std; int a[10000011]; int main() { int n; string s; cin >>n>>s; s=s+s; for(int i=0;i<2;i++) for(int j=0;j<2;j++) { a[0]=i; a[1]=j; for(int l=2;l<n+2;l++) { if(s[l-1]=='o'&&a[l-1]==0) a[l]=1-a[l-2]; if(s[l-1]=='o'&&a[l-1]==1) a[l]=a[l-2]; if(s[l-1]==...
a.cc:1:10: fatal error: Bits/stdc++.h: No such file or directory 1 | #include <Bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s109124606
p03800
C++
#include <Bits/stdc++.h> using namespace std; int a[100000011]; int main() { int n; string s; cin >>n>>s; s=s+s; for(int i=0;i<2;i++) for(int j=0;j<2;j++) { a[0]=i; a[1]=j; for(int l=2;l<n+2;l++) { if(s[l-1]=='o'&&a[l-1]==0) a[l]=1-a[l-2]; if(s[l-1]=='o'&&a[l-1]==1) a[l]=a[l-2]; if(s[l-1]=...
a.cc:1:10: fatal error: Bits/stdc++.h: No such file or directory 1 | #include <Bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s110961347
p03800
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define pp pair<int,int> #define ll long long #define ld long double int inf=100000000; ll INF=4000000000000000000; ll MOD=1000000007; int main() { int n; string s; cin >> n >> s; rep(j,4){ vector<int> a(n); a...
a.cc: In function 'int main()': a.cc:39:3: error: 'sout' was not declared in this scope; did you mean 'stdout'? 39 | sout << u << endl; | ^~~~ | stdout
s336000892
p03800
C++
#include <bits/stdc++.h> using namespace std; #define Int int64_t #define dump(x) cout << (x) << endl #define fi first #define se second Int mod = 1e9+7; Int INF = 1e18; double EPS = 0.00000001; //Int mod = 1e6+3; int main() { Int n; cin >> n; string s; cin >> s; vector<bool> t(n); t[0] = true;...
a.cc: In function 'int main()': a.cc:144:10: error: redeclaration of 'bool check' 144 | bool check = true; | ^~~~~ a.cc:44:10: note: 'bool check' previously declared here 44 | bool check = true; | ^~~~~
s109746295
p03800
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; string S; cin >> N >> S; vector<string> start = {"SS", "SW", "WS", "WW"}; for(auto st : start) { string A(N, 'a'); A.at(0) = st.at(0); A.at(1) = st.at(1); for(int i = 2; i < N; i++) { // ...
a.cc: In function 'int main()': a.cc:30:14: error: redeclaration of 'bool a1' 30 | bool a1 = (A.at(0) == 'S'); | ^~ a.cc:25:14: note: 'bool a1' previously declared here 25 | bool a1 = (A.at(N - 1) == 'S'); | ^~ a.cc:31:14: error: redeclaration of 'bool a2' ...
s847693242
p03800
C++
#include <bits/stdc++.h> using namespace std; char next(char sw,char ox){ if(sw=='S' && ox=='o')return 'S'; if(sw=='S' && ox=='x')return 'W'; if(sw=='W' && ox=='o')return 'W'; if(sw=='W' && ox=='x')return 'S'; } string mkstr(string sw, string ox){ int m=sw.size(),n=ox.size(); for(int i=m+1;i<n;i++){ string x=sw;...
a.cc: In function 'std::string mkstr(std::string, std::string)': a.cc:17:16: error: 'x' was not declared in this scope 17 | return x; | ^ a.cc: In function 'int main()': a.cc:27:9: error: 'stirng' was not declared in this scope 27 | stirng ret=mkstr(u,s); | ^~~~~...
s836259324
p03800
C++
#include <bits/stdc++.h> using namespace std; char next(char sw,char ox){ if(sw=='S' && ox='o')return 'S'; if(sw=='S' && ox='x')return 'W'; if(sw=='W' && ox='o')return 'W'; if(sw=='W' && ox='x')return 'S'; } string mkstr(string sw, string ox){ int m=sw.size(),n=ox.size(); for(int i=m+1;i<n;i++){ string x=sw; x+...
a.cc: In function 'char next(char, char)': a.cc:5:20: error: lvalue required as left operand of assignment 5 | if(sw=='S' && ox='o')return 'S'; | ~~~~~~~~^~~~~ a.cc:6:20: error: lvalue required as left operand of assignment 6 | if(sw=='S' && ox='x')return 'W'; | ...
s535292821
p03800
C++
#include <bits/stdc++.h> using namespace std; char next(char sw,char ox){ if(sw=='S' && ox='o')return 'S'; if(sw=='S' && ox='x')return 'W'; if(sw=='W' && ox='o')return 'W'; if(sw=='W' && ox='x')return 'S'; }
a.cc: In function 'char next(char, char)': a.cc:5:20: error: lvalue required as left operand of assignment 5 | if(sw=='S' && ox='o')return 'S'; | ~~~~~~~~^~~~~ a.cc:6:20: error: lvalue required as left operand of assignment 6 | if(sw=='S' && ox='x')return 'W'; | ...
s986803527
p03800
C++
#include <bits/stdc++.h> #include <stdio.h> #include<iostream> #include<cstdio> #include<bitset> #include<algorithm> #include<vector> #include<list> #include<queue> #include<stack> #include<string> #include<string.h> #include<cmath> #include<utility> #include<functional> #include<map> #include<set> #include<cctype> #in...
a.cc: In function 'int main()': a.cc:237:6: error: redeclaration of 'll flag' 237 | ll flag=0; | ^~~~ a.cc:189:6: note: 'll flag' previously declared here 189 | ll flag=0; | ^~~~ a.cc:282:6: error: redeclaration of 'll flag' 282 | ll flag=0; | ^~~~ a.cc:189:6: note: 'll flag...
s024130819
p03800
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <f...
a.cc: In function 'int main()': a.cc:159:29: error: redeclaration of 'int last' 159 | int last = circle[0]; | ^~~~ a.cc:131:29: note: 'int last' previously declared here 131 | int last = circle[n - 1]; | ...
s635187451
p03800
C++
#include <bits/stdc++.h> using namespace std; int n; string s; char conv(char c){ return c == 'W' ? 'S' : 'W'; } char next(char prev, char now){ if(now == 'S') return prev; else return conv(prev); } string restore(char first,char second){ string ret = ""; ret += first; ret += second; char prev = first; char cu...
a.cc: In function 'int main()': a.cc:42:44: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in assignment 42 | c = restore(s[0],s[n-1]); | ~~~~~~~^~~~~~~~~~~~~ | ...
s911594894
p03800
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <numeric> #include <queue> #include <map> #include <set> #include <string> #include <functional> #include <list> #include <random> #include <time.h> #include <iomanip> #include <assert.h> #include <nume...
a.cc: In function 'int main()': a.cc:68:9: error: 'strcpy' was not declared in this scope 68 | strcpy(cases[0], "SS"); | ^~~~~~ a.cc:17:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 16 | #include <assert.h> +++ |+#include <cstri...