submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s471162688
p03665
C++
#include <iostream> using namespace std; typedef long long ll; ll n, p, k, a; ll pow(ll x, ll y){ if (y == 0) { return 1; } else { return x * pow(x, y - 1); } } int main(void){ // Your code here! cin >> n >> p; for (ll i = 0; i < n; i++) { cin >> a; if (a % 2) k...
a.cc: In function 'int main()': a.cc:21:54: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<' 21 | cout << (k ? pow(2, n - 1) : (p ? 0 : pow(2, n)) << endl; | ~~~~~~~~~~~~~~~~~~~~^~~~~~~ a.cc:21:61: error: ex...
s283099585
p03665
C++
#include <iostream> #include <algorithm> using namespace std; long comb(int n, int r) { long ans = 1; for (int i = n; i > n - r; --i) { ans = ans * i; } for (int i = 1; i < r + 1; ++i) { ans = ans / i; } return ans; } int main() { int n, p; cin >> n >> p; int num[3]; for (int i = 0;i < n;i++) { int q;...
a.cc: In function 'int main()': a.cc:26:16: error: 'pow' was not declared in this scope 26 | ans += pow(2, num[0] + 1); | ^~~
s394167479
p03665
C++
#include <iostream> #include <vector> using namespace std; int N, P; const int MAX_C = 100; long long Com[MAX_C][MAX_C]; void calc_com() { memset(Com, 0, sizeof(Com)); Com[0][0] = 1; for (int i = 1; i < MAX_C; ++i) { Com[i][0] = 1; for (int j = 1; j < MAX_C; ++j) { Com[i][j] =...
a.cc: In function 'void calc_com()': a.cc:11:5: error: 'memset' was not declared in this scope 11 | memset(Com, 0, sizeof(Com)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ |+#include <cstrin...
s900688352
p03665
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 = long long; map <int ,int> mpa,mpb; int main(){ int N, P; cin >>N>>P; int t; int even=1,odd=1;...
a.cc: In function 'int main()': a.cc:34:21: error: lvalue required as left operand of assignment 34 | if(P==0 && odd==2 && even=1){ | ~~~~~~~~~~~~~~~^~~~~~~
s023555432
p03665
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; int main (void){ int N; int P; int odd=0; int even=0; ...
a.cc: In function 'int main()': a.cc:35:12: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 35 | ans=max({ans,pow(2,odd-1),pow(2,even)}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c+...
s955442126
p03665
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; int main (void){ int N; int P; int odd=0; int even=0; ...
a.cc: In function 'int main()': a.cc:35:11: error: invalid type argument of unary '*' (have 'int') 35 | ans=2**even*(1+odd*(odd-1)/2); | ^~~~~
s739923888
p03665
C++
#include <iostream> using namespace std; int main(){ int n,p; cin >> n; long long int ans = 1 << (n-1); ans << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | ans << ans << endl; | ~~~~~~~~~~~^~~~~~~
s435774648
p03665
C++
#include <iostream> using namespace std; int main(){ int n,p; cin >> n; long long int ans = 1 << (n-1) ans << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'ans' 8 | ans << ans << endl; | ^~~
s061129376
p03665
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int n, p; cin >> n >> p; int a[1000]; for (int i = 0;i < n;i++) { int b; cin >> b; a[i] = b % 2; } int num[2]; for (int i = 0;i < n;i++)num[a[i]]++; if (num[1] == 0) { cout << pow(2, n - 1) << endl; } else { if (p == 0)cout <...
a.cc: In function 'int main()': a.cc:18:25: error: 'pow' was not declared in this scope 18 | cout << pow(2, n - 1) << endl; | ^~~ a.cc:21:36: error: 'pow' was not declared in this scope 21 | if (p == 0)cout << pow(2, n) << endl; | ...
s005761883
p03665
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int n, p; cin >> n >> p; int a[n]; for (int i = 0;i < n;i++) { int b; cin >> b; a[i] = b % 2; } int num[2]; for (int i = 0;i < n;i++)num[a[i]]++; if (num[1] == 0) { cout << pow(2, n - 1) << endl; } else { if (p == 0)cout << p...
a.cc: In function 'int main()': a.cc:18:25: error: 'pow' was not declared in this scope 18 | cout << pow(2, n - 1) << endl; | ^~~ a.cc:21:36: error: 'pow' was not declared in this scope 21 | if (p == 0)cout << pow(2, n) << endl; | ...
s908597340
p03665
C++
#include<iostream> #include<algorithm> using namespace std; long dp[max][max]; long nCr(int n, int r) { if (n == r) return dp[n][r] = 1; if (r == 0) return dp[n][r] = 1; if (r == 1) return dp[n][r] = n; if (dp[n][r]) return dp[n][r]; return dp[n][r] = nCr(n - 1, r) + nCr(n - 1, r - 1); } int main() { int n, p;...
a.cc:5:17: error: cannot resolve overloaded function 'max' based on conversion to type 'long unsigned int' 5 | long dp[max][max]; | ^ a.cc:5:6: error: size of array 'dp' has non-integral type '<unresolved overloaded function type>' 5 | long dp[max][max]; | ^~ a.cc:5:17: error: c...
s902598903
p03665
C++
#include<cmath> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);++i) #define ROF(i,b,a) for (int i=(b);i>(a);--i) #define REP(i,n) FOR(i,0,n) #define PER(i,n) ROF(i,n-1,-1) typedef long long int int64; typedef unsigned long long int uint64; int64 combination(int n,int k){ int64 nck[n+1][n+1]; RE...
a.cc: In function 'int main()': a.cc:36:5: error: 'cin' was not declared in this scope 36 | cin >> N >> P; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cmath> +++ |+#include <iostream> 2 | using names...
s532041219
p03665
C
#include<stdio.h> #include<math.h> int main(void) { int N, P; scanf("%d %d", &N, &P); int A[N]; for (int i = 0; i < N; i++) { scanf("%d", &A[i]); A[i] = A[i]%2; } int cnt0 = 0; int cnt1 = 0; for (int i = 0; i < N; i++) { if (A[i] == 0) cnt0++; else cnt1++; } long long int a...
main.c: In function 'main': main.c:39:3: error: expected declaration or statement at end of input 39 | } | ^
s482999343
p03665
C
#include<stdio.h> #include<math.h> int main(void) { int N, P; scanf("%d %d", &N, &P); int A[N]; for (int i = 0; i < N; i++) { scanf("%d", &A[i]); A[i] = A[i]%2; } int cnt0 = 0; int cnt1 = 0; for (int i = 0; i < N; i++) { if (A[i] == 0) cnt0++; else cnt1++; } long long int a...
main.c: In function 'main': main.c:40:3: error: expected declaration or statement at end of input 40 | } | ^
s097766394
p03665
C
#include<stdio.h> #include<math.h> int main(void) { int N, P; scanf("%d %d", &N, &P); int A[N]; for (int i = 0; i < N; i++) { scanf("%d", &A[i]); A[i] = A[i]%2; } int cnt0 = 0; int cnt1 = 0; for (int i = 0; i < N; i++) { if (A[i] == 0) cnt0++; else cnt1++; } long long int a...
main.c: In function 'main': main.c:39:3: error: expected declaration or statement at end of input 39 | } | ^
s364713013
p03665
C++
#define REP(i,n) for(int i=0;i<(n);++i) #define REPR(i,n) for(int i=n;i>=0;i--) #define FOREACH(x,a) for(auto& (x) : (a) ) #define WFA(d,v) REP(k,v)REP(i,v)REP(j,v)d[i][j]=min(d[i][j],d[i][k]+d[k][j]) #define SCOUT(x) cout<<(x)<<" " #define ENDL cout<<endl #define VECCIN(x) for(auto&youso_: (x) )cin>>youso_ #de...
a.cc: In function 'void CINT(Head&&, Tail&& ...)': a.cc:23:5: error: 'cin' was not declared in this scope 23 | cin>>head; | ^~~ a.cc: At global scope: a.cc:41:1: error: 'll' does not name a type 41 | ll Kai(ll t){ | ^~ a.cc: In function 'int main()': a.cc:33:11: error: 'vector' was not declare...
s723432889
p03665
C++
#include <iostream> using namespace std; typedef long long ll; int main() { static ll C[51][51]; for (int i = 0; i <= 50; i++) { c[i][0] = c[i][i] = 1; for (int j = 1; j < i; j++) { c[i][j] = c[i - 1][j - 1] + c[i - 1][j]; } } int n, p; cin >> n >> p; int b[2] = {}; for (int i = 0; i < n; i++) { int ...
a.cc: In function 'int main()': a.cc:8:17: error: 'c' was not declared in this scope 8 | c[i][0] = c[i][i] = 1; | ^
s452113002
p03665
C++
/** * Author: houtaru * Create: 29.01.2018 21:51:20 */ #include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; int n, p, cnt; int main() { scanf("%d%d", &n, &p); for (int i = 0; i < n; ++i) { int x; scanf("%d", &x); cnt += x % 2; } if (cnt > 0) n--; long long an...
a.cc: In function 'int main()': a.cc:22:26: error: expected ';' before ')' token 22 | answer = 1ll << n); | ^ | ;
s317264151
p03665
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int main(){ int n, p; long long int ans; cin >> n >> p; int odd = 0; for(int i = 0; i < n; i++){ int x; cin >> x; if(x % 2 == 0) odd++; } long long int comb[odd+1]; comb[0] = 1; for(int i = 1; i <= odd; i++)...
a.cc: In function 'int main()': a.cc:22:13: error: conflicting declaration 'int ans' 22 | int ans = 0; | ^~~ a.cc:9:23: note: previous declaration as 'long long int ans' 9 | long long int ans; | ^~~
s599294763
p03665
C++
#include <bits/stdc++.h> using namespace std; int32_t main(){ int n, p, odd = 0, even = 0, a; cin >> n >> p; for(int i=0; i<n; i++){ cin >> a; if( a % 2 ) odd++; else even++; } long long ans = 1LL << even; if( odd == 0 && p == 1 ) ans = 0;a else if( odd != 0 ) ans <<...
a.cc: In function 'int32_t main()': a.cc:13:39: error: expected ';' before 'else' 13 | if( odd == 0 && p == 1 ) ans = 0;a | ^ | ; 14 | else if( odd != 0 ) ans <<= ( odd-1 ); | ~~~~ ...
s374016565
p03665
C++
// A - Biscuits: https://beta.atcoder.jp/contests/agc017/tasks/agc017_a // P=0とP=1で場合分け。P=0の場合、奇数個のビスケット袋から偶数個、P-1の場合奇数個のビスケット袋から奇数個とる。 // N>=50なのでintではだめ。 #include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <stack> #include <cstdio> #include <string> #include <vector> #include <co...
a.cc: In function 'int main()': a.cc:81:13: error: 'ret' was not declared in this scope; did you mean 'rest'? 81 | cout << ret << endl; | ^~~ | rest
s403811006
p03665
C++
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <queue> #include <climits> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> pii; #define INF INT_MAX/3 #define REP(i,n) for(int i=0;i<n;i++) int main(){ ll N,P; vector<...
a.cc: In function 'int main()': a.cc:34:23: error: 'pow' was not declared in this scope 34 | cout<<pow(2,N-1)<<endl; | ^~~ a.cc:37:37: error: 'pow' was not declared in this scope 37 | cout<<(P == 1 ? 0 : pow(2,N-1))<<endl; | ...
s306082386
p03665
C++
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <queue> #include <climits> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> pii; #define INF INT_MAX/3 #define REP(i,n) for(int i=0;i<n;i++) int main(){ ll N,P; vector<...
a.cc: In function 'int main()': a.cc:34:23: error: 'pow' was not declared in this scope 34 | cout<<pow(2,N-1)<<endl; | ^~~ a.cc:37:37: error: 'pow' was not declared in this scope 37 | cout<<(P == 1 ? 0 : pow(2,N-1))<<endl; | ...
s731089041
p03665
C++
#include <cstdin> int main(){ int a,b scanf("%d\n%d",&a,&b); printf("%d\n",a+b) return 0; }
a.cc:1:10: fatal error: cstdin: No such file or directory 1 | #include <cstdin> | ^~~~~~~~ compilation terminated.
s180951911
p03665
C++
#include <iostream> #include <vector> using namespace std; typedef unsigned long long u64; u64 binpow(u64 n, u64 x, u64 mod) { u64 tgt = 1; u64 dig = n; while (x > 0) { if (x%2) { tgt = (tgt * dig) % mod; } dig = (dig * dig) % mod; x /= 2; } return tgt; } class Comb { public: u64 mod...
a.cc: In function 'int main()': a.cc:62:24: error: 'iseven' was not declared in this scope; did you mean 'sigevent'? 62 | for (int i = 0; i <= iseven; ++i) { | ^~~~~~ | sigevent
s099636977
p03665
C++
// 11.07.2017 //# include <stdio.h> //# include <iostream> # include <cstdio> //# include <conio.h> //using namespace std; int main () { // freopen ("A.TXT", "r", stdin); freopen ("A.OUT", "w", stdout); // int a, i, n, p, m=0, k=0; __int64 sum = 0, t; scanf ("%d%d\n", &n, &p); for ( i=0; i < n; i++...
a.cc: In function 'int main()': a.cc:22:4: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 22 | __int64 sum = 0, t; | ^~~~~~~ | __int64_t a.cc:38:7: error: 't' was not declared in this scope 38 | t = 1; | ^ a.cc:39:7: error: 'sum' was not declared ...
s288755509
p03665
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll quick_pow(ll a, ll b) { ll ans = 1; while(b) { if(b & 1) ans *= a; a *= a; b >>= 1; } return ans; } int main(void) { int n, p; while(~scanf("%d%d", &n, &p)) { bool flag = 0; int cnt1 =...
a.cc: In function 'int main()': a.cc:28:74: error: expected ')' before '}' token 28 | printf("%lld\n", cnt1 ? quick_pow(2, n - 1) : quick_pow(2, n) | ~ ^ | ...
s386068585
p03665
Java
import java.io.*; import java.util.*; public class grand { public static void main(String[] args) { InputReader in = new InputReader(System.in); PrintWriter w = new PrintWriter(System.out); Scanner sc = new Scanner(System.in); int n = in.nextInt(); int p=in.nextInt(); int arr[] = new int[100001];...
Main.java:3: error: class grand is public, should be declared in a file named grand.java public class grand { ^ 1 error
s534600178
p03665
C++
#include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cmath> using namespace std; long long cau[100][100]; int main() { int n,m; cin>>n>>m; long long J=0; long long O=0; memset(cau,0,sizeof(cau)); int i=0; int b; while(n--) { ...
a.cc: In function 'int main()': a.cc:26:17: error: unable to find numeric literal operator 'operator""\U0000ff1b' 26 | cau[0][0]=1; | ^~~ a.cc:27:28: error: expected ';' before ')' token 27 | for(int i=0;i<=50;i++) | ^ | ...
s282271772
p03665
C++
#include <iostream> #include <cmath> using namespace std; int main() { int N, P; cin >> N >> P; int t, ar[2] = { 0 }; for( int i = 0; i < N; ++i ){ cin >> t; ++ar[t%2]; } long long int ans = 0; if( ar[1] == 0 ){ if( P == 0 ) ans = pow(2, N); else if( P =...
a.cc: In function 'int main()': a.cc:26:13: error: 'S' was not declared in this scope 26 | S = ar[0] + ar[1] - 1; | ^
s527287356
p03665
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define MX 54 typedef long long LL; int a[MX]; int n,p; LL C[MX][MX]; void getAC() { C[1][0] = C[1][1] = 1LL; C[0][0] = C[0][1] = 1LL; for(int i = 1;i <= MX;i++) { C[i][0] = C[i][i] = 1LL; } for(int i = 2;i <= MX;i++) { for(...
a.cc: In function 'int main()': a.cc:46:2: error: expected '}' at end of input 46 | } | ^ a.cc:26:1: note: to match this '{' 26 | { | ^
s219688576
p03665
C++
#include <cstdio> #include <iostream> #include <vector> #include <algorithm> #include <functional> #include <set> #include <queue> #define INTFY 10000000 using namespace std; int N, P; long long cnt; long long fct[51]; int main() { cin >> N >> P; int g = 0, k = 0; fct[0] = 1; for (int i = 1; i < 51; ++i) { ...
a.cc: In function 'int main()': a.cc:42:24: error: operands to '?:' have different types 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int' 42 | P == 0 ? cout << fct[N] << endl : printf("0\n"); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s700857789
p03665
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll n,px,y; int main(){ cin>>n>>p; for(int i=1;i<=n;i++){ cin>>x; if(x&1)y=1; } if(y)cout<<(1LL<<(n-1)); else if(p==0)cout<<(1LL<<n); else cout<<0; }
a.cc: In function 'int main()': a.cc:6:17: error: 'p' was not declared in this scope 6 | cin>>n>>p; | ^ a.cc:8:22: error: 'x' was not declared in this scope 8 | cin>>x; | ^
s855941924
p03665
C++
#include <bits/stdc++.h> using namespace std; typedef long long LL; int freq[210000]; int balls[210000]; int main(){ int n, m; cin >> n >> m; for(int i = 1; i <= n; i++){ freq[i] = 0; } for(int i = 0; i < n; i++){ cin >> balls[i]; freq[balls[i]]++; } for(int i = 0; i < m; i++){ int c, d; cin >> c >> d;...
a.cc: In function 'int main()': a.cc:38:42: error: no matching function for call to 'max(int)' 38 | ans = max(max(0,freq[i]-i)+max(0,freq[j]-j)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60...
s632598168
p03665
Java
public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int bagNumber = scan.nextInt(); int remainder = scan.nextInt(); int[] intArray = new int[bagNumber]; int counter = 0; for (int i =0;i<bagNumber;i++){ intArray[i] = scan.nextInt(); }...
Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s093759432
p03665
C
#include <stdio.h> long long comb(long long n, long long r){ static long long c[50][50]={}; if(r==0 || r==n) return c[n][r] = 1; if(r==1 || r==n-1) return c[n][r] = n; if(c[n][r] != 0) return c[n][r]; if(c[n][n-r] != 0) return c[n][r] = c[n][n-r]; return c[n][r] = comb(n-1, r) + comb(n-1, r-1); } int mai...
main.c: In function 'main': main.c:34:9: error: 'I' undeclared (first use in this function) 34 | for(I=0; i<=a; i+=2){ | ^ main.c:34:9: note: each undeclared identifier is reported only once for each function it appears in
s784385591
p03665
Java
import java.util.Scanner; public class Biscuits { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int bagNumber = scan.nextInt(); int remainder = scan.nextInt(); int[] intArray = new int[bagNumber]; int counter = 0; for (int i =0;i<bagNumber;i++){ intAr...
Main.java:3: error: class Biscuits is public, should be declared in a file named Biscuits.java public class Biscuits { ^ 1 error
s455131203
p03665
C++
#include <bits/stdc++.h> #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define SORTR(v,n) sort(v, v+n, greater<int>()); #define SORTPairSecond(v, n) sort(v, v+n, pairCompareSecond); #define int long long // %d=>%lld #define pb push_back...
a.cc: In function 'long long int comb(long long int, long long int)': a.cc:35:12: error: 'conb' was not declared in this scope; did you mean 'comb'? 35 | return conb(n - 1, r - 1) + conb(n - 1, r); | ^~~~ | comb
s245340263
p03665
Java
import java.util.*; public class Main { // 変数宣言 static int N; static int P; static int[] biscuits; // main public static void main(String[] args) { // 準備 Scanner sc = new Scanner(System.in); // ロード String[] line = sc.nextLine().split(" "); N = Integer.parseInt(line[0]); P = Intege...
Main.java:37: error: incompatible types: boolean cannot be converted to int return (P == 0); ^ Main.java:43: error: bad operand types for binary operator '+' match += (P == (total[i] % 2)); ^ first type: int second type: boolean Main.java:76: error: variable combnN is alread...
s052174255
p03665
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define rep(i, a, n) for(int i = (a); i < (n); i++) #define dep(i, a, n) for(int i = (a); i >= (n); i--) #define mod 1e9+7 __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_stdio(false); } int n, p, a...
a.cc: In function 'int saiki(int, int)': a.cc:21:21: error: expected primary-expression before 'return' 21 | if(g == n) ans += return s % 2 == p ? 1 : 0; | ^~~~~~
s955653172
p03665
C++
#include<bits/stdc++.h> typedef long long ll; using namespace std; ll sum; int a[2],n,p; ll D[60][60]; ll jiecheng(int x) { ll s=1; for(int i=1;i<=x;i++) { s*=i; } return s; } ll C(int n,int m){return jiecheng(n)/jiecheng(m)/jiecheng(n-m);} int main() { scanf("%d%d",&n,&p); for(int i=0;i<n;i++) { in...
a.cc: In function 'int main()': a.cc:71:1: error: a function-definition is not allowed here before '{' token 71 | { | ^ a.cc:81:18: error: a function-definition is not allowed here before '{' token 81 | ll C(int n,int m){return jiecheng(n)/jiecheng(m)/jiecheng(n-m);} | ^ a.cc:83:9: wa...
s801537823
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; if(P==0){ for(int i=0;i<N;i++){ cin>>a[i]; if(a[i]%2==0){ x+=1; }else{ y+=1; } } for(int j=1;j<=x;j++){ for(int k=x;k>=j;k=k-1){ ...
a.cc:76:1: error: expected declaration before '}' token 76 | } | ^
s303547001
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; if(P==0){ for(int i=0;i<N;i++){ cin>>a[i]; if(a[i]%2==0){ x+=1; }else{ y+=1; } } for(int j=1;j<=x;j++){ for(int k=x;k>=j;k=k-1){ ...
a.cc: In function 'int main()': a.cc:42:13: error: 'i' was not declared in this scope 42 | if(a[i]%2==0){ | ^ a.cc: At global scope: a.cc:75:1: error: expected declaration before '}' token 75 | } | ^
s812873264
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; if(P==0){ for(int i=0;i<N;i++){ cin>>a[i]; if(a[i]%2==0){ x+=1; }else{ y+=1; } } for(int j=1;j<=x;j++){ for(int k=x;k>=j;k=k-1){ ...
a.cc: In function 'int main()': a.cc:42:13: error: 'i' was not declared in this scope 42 | if(a[i]%2==0){ | ^ a.cc: At global scope: a.cc:75:1: error: expected declaration before '}' token 75 | } | ^
s385446869
p03665
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; long long c(int a,int b) { if (b == 0)return 1; return a*c(a - 1, b - 1) / b; } int main() { int n, p; cin >> n >> p; long long s0 = 1, s1 = 0; for (int i = 0; i < n; i++){ int a; cin >> a; if (a % 2 == 0)s0 *= 2; else s1++; } long ...
a.cc: In function 'int main()': a.cc:18:33: error: no matching function for call to 'min(int&, long long int)' 18 | sum += c(s1, min(i, s1 - i)); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/loc...
s312383370
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; for(int i=0;i<N;i++){ cin>>a[i]; if(P==0){ if(a[i]%2==0){ x+=1; }else{ y+=1; } } for(int j=1;j<=x;j++){ for(int k=x;k>=j;k=k-1){ ...
a.cc: In function 'int main()': a.cc:42:2: error: 'else' without a previous 'if' 42 | }else{ | ^~~~
s840017758
p03665
Java
import java.math.BigInteger; import java.util.Scanner; public class Biscuits { public static void main(String args[] ) throws Exception { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int P = sc.nextInt(); int Ec = 0; for (int i = 0; i < N; i++) { in...
Main.java:4: error: class Biscuits is public, should be declared in a file named Biscuits.java public class Biscuits { ^ 1 error
s343832120
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; for(int i=0;i<N;i++){ cin>>a[i]; if(P==0){ if(a[i]%2==0){ x+=1; }else{ y+=1; } for(int j=1;j<=x;j++){ for(int k=x;k>=j;k=k-1){ ...
a.cc: In function 'int main()': a.cc:47:21: error: expected ')' before ';' token 47 | for(int j=1;j<=x;j++;){ | ~ ^ | ) a.cc:47:22: error: expected primary-expression before ')' token 47 | for(int j=1;j<=x;j++;){ | ^
s207139132
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; for(int i=0;i<N;i++){ cin>>a[i]; if(P==0){ if(a[i]%2==0){ x+=1; }else{ y+=1; } for(int j=1;j<=x;j++){ for(int k=x;k>=j;k=k-1){ ...
a.cc: In function 'int main()': a.cc:40:5: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'long long int') 40 | cout>>m*f>>endl; | ~~~~^~~~~ | | | | | long long int | std::ostream {aka std::basic_ostream<char>} a.cc:40:5: note...
s003567590
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; for(int i=0;i<N;i++){ cin>>a[i]; if(P==0){ if(a[i]%2==0){ x+=1; }else{ y+=1; } for(int j=1;j<=x;j++){ for(int k=x;k>=j;k-=){ ...
a.cc: In function 'int main()': a.cc:17:26: error: expected primary-expression before ')' token 17 | for(int k=x;k>=j;k-=){ | ^ a.cc:40:5: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'long long int') 40 | cout>>m*f>>en...
s612897410
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P; for(int i=0;i<N;i++){ cin>>a[i]; if(P==0){ if(a[i]%2==0){ x+=1; }else{ y+=1; } for(int j=1;j<=x;j++;){ for(int k=x;k>=j;k-=){ ...
a.cc: In function 'int main()': a.cc:16:21: error: expected ')' before ';' token 16 | for(int j=1;j<=x;j++;){ | ~ ^ | ) a.cc:16:22: error: expected primary-expression before ')' token 16 | for(int j=1;j<=x;j++;){ | ^ a.cc:40:5: error: no...
s632781081
p03665
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ long long int N,P,a[50],x,y,z,l,m,e,f; cin>>N>>P>>endl; for(int i=0;i<N;i++){ cin>>a[i]; if(P==0){ if(a[i]%2==0){ x+=1; }else{ y+=1; } for(int j=1;j<=x;j++;){ for(int k=x;k>=j;k-=){ ...
a.cc: In function 'int main()': a.cc:7:10: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 7 | cin>>N>>P>>endl; | ~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:42, ...
s004321534
p03665
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:24:10: fatal error: _mingw.h: No such file or directory 24 | #include <_mingw.h> | ^~~~~~~~~~ compilation terminated.
s770182967
p03665
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:24:10: fatal error: _mingw.h: No such file or directory 24 | #include <_mingw.h> | ^~~~~~~~~~ compilation terminated.
s441844776
p03665
C++
#include <iostream> #include <iomanip> #include <stdio.h> #include <set> #include <queue> #include <vector> #include <map> #include <cmath> #include <algorithm> #include <memory.h> #include <string> #include <sstream> #include <cstdlib> #include <ctime> #include <cassert> using namespace std; typedef long long LL; ty...
a.cc:53:1: error: extended character   is not valid in an identifier 53 |   // pascal's triangle | ^ a.cc:54:1: error: extended character   is not valid in an identifier 54 |   //    k: 0  1  2  3  4 | ^ a.cc:55:1: error: extended character   is not valid in an identifier 55 |   //     ------------...
s257718125
p03665
C++
#include <iostream> #include <string> #include <array> #include <vector> #include <math.h> #include <algorithm> #include <set> #include <deque> #include <utility> #include <map> #define ll long long int #define MAX 1000000 using namespace std; ll cnt = 0; ll a[55]; ll p; void search(ll sum, ll i) //i番目の合計 { if (a[...
a.cc: In function 'int main()': a.cc:40:9: error: 'memset' was not declared in this scope 40 | memset(a, -1, sizeof(a)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <map> +++ |+#include <cstring>...
s788648948
p03665
C++
import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); static int N = sc.nextInt(); static int P = sc.nextInt(); static int A[] = new int[N]; public static void main(String[] args) { for(int i=0; i < N; i++) { A[i] = sc.nextInt(); } ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s572963886
p03665
C++
#include <iostream> #include <string> #include <array> #include <vector> #include <math.h> #include <algorithm> #include <set> #include <deque> #include <utility> #include <map> #define ll long long int #define MAX 1000000 using namespace std; ll cnt = 0; ll a[55]; ll p; void search(ll sum, ll i) //i番目の合計 { if (a[...
a.cc: In function 'int main()': a.cc:40:9: error: 'memset' was not declared in this scope 40 | memset(a, -1, sizeof(a)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <map> +++ |+#include <cstring>...
s212423033
p03665
C++
#include <iostream> int main (void) { int N, P; int A[110]; std::cin >> N >> P; int i; int odd = 0; int even = 0; for (i=0;i<N;i++) { std::cin >> A[i]; if (A[i]%2==1) { odd++; } else { even++; } } // if (P%2==1) { ...
a.cc:41:12: error: stray '#' in program 41 | return 0;#include <iostream> | ^ a.cc: In function 'int main()': a.cc:41:13: error: 'include' was not declared in this scope 41 | return 0;#include <iostream> | ^~~~~~~ a.cc:41:22: error: 'iostream' was not declared in this scope;...
s977282136
p03665
C
//Written by Zhu Zeqi //Come on,baby //Hack,please #include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<cerrno> #include<cfloat> #include<ciso646> #include<climits> #include<clocale> #include<complex> #include<csetjmp> #include<csignal> #inc...
main.c:4:9: fatal error: cmath: No such file or directory 4 | #include<cmath> | ^~~~~~~ compilation terminated.
s131191777
p03665
C++
#include <iostream> #include <string> #include <vector> using namespace std; unsigned long long nCr(int n, int r) { unsigned long long ans = 1; for (int i = n; i > n - r; --i) { ans = ans*i; } for (int i = 1; i < r + 1; ++i) { ans = ans / i; } return ans; } int main(void) { int N, P, a0 = 0, a1 = 0; cin >...
a.cc: In function 'int main()': a.cc:47:38: error: 'round' was not declared in this scope 47 | for (int i = 1; i <= round(a1/2); i+=2) { | ^~~~~
s955990994
p03665
C++
#include <stdio.h> #include <iostream> #include <queue> #include <string> #include <algorithm> #include <cstdio> #include <stack> #include <vector> #include <map> #include <ctime> #include <string.h> #define inf 0x7fffffff using namespace std; int a,b,c,n,m,d,k,l[300010],o[300100][3],i; int j[201000][10]={{1,0,-1,0}...
a.cc: In function 'int f(int, int)': a.cc:41:18: error: invalid operands of types 'int*' and 'int' to binary 'operator%' 41 | i=( (w+o[t]) % 2); | ~~~~~~~~ ^ ~ | | | | int* int
s881847515
p03665
C++
#include <iostream> using namespace std; typedef long long ll; int n, a[50], p, b = 0, c = 0; ll nPr(ll n, ll r) { ll res = 1; for (int i = 0; i < r; i++) { res *= (n - i); } return res; } ll nCr(ll n, ll r) { //ll res = nPr(n, r) / nPr(r, r); double res = 1; for (int i = 0; i < r; i++) { res *= (n - i);...
a.cc: In function 'int main()': a.cc:40:20: error: 'pow' was not declared in this scope 40 | bsum = (ll)pow(2, b); | ^~~
s064474765
p03665
C++
#include <iostream> using namespace std; typedef long long ll; int n, a[50], p, b = 0, c = 0; ll nPr(ll n, ll r) { ll res = 1; for (int i = 0; i < r; i++) { res *= (n - i); } return res; } ll nCr(ll n, ll r) { //ll res = nPr(n, r) / nPr(r, r); double res = 1; for (int i = 0; i < r; i++) { res *= (n - i);...
a.cc: In function 'int main()': a.cc:40:16: error: 'pow' was not declared in this scope 40 | bsum = pow(2, b); | ^~~
s675878207
p03665
C++
#include<iostream> #include<utility> #include<tuple> #include<set> #include<list> #include<vector> #include<map> #include<algorithm> #include<queue> #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FUNCTION__ << endl; #define int l...
a.cc: In function 'int main()': a.cc:97:34: error: 'pow' was not declared in this scope 97 | printf("%lld\n",prod *(int)pow(2, even_counts + 1)); | ^~~ a.cc:103:34: error: 'pow' was not declared in this scope 103 | printf("%lld\n",prod *(int)pow(2, even_counts + 1...
s362956392
p03665
C++
#include<iostream> #include<utility> #include<tuple> #include<set> #include<list> #include<vector> #include<map> #include<algorithm> #include<queue> #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FUNCTION__ << endl; #define int l...
a.cc: In function 'int main()': a.cc:97:34: error: 'pow' was not declared in this scope 97 | printf("%lld\n",prod *(int)pow(2, even_counts + 1)); | ^~~ a.cc:103:34: error: 'pow' was not declared in this scope 103 | printf("%lld\n",prod *(int)pow(2, even_counts + 1...
s142672903
p03665
C++
#include<iostream> #include<utility> #include<tuple> #include<set> #include<list> #include<vector> #include<map> #include<algorithm> #include<queue> #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FUNCTION__ << endl; #define int l...
a.cc: In function 'int main()': a.cc:97:34: error: 'pow' was not declared in this scope 97 | printf("%lld\n",prod *(int)pow(2, even_counts + 1)); | ^~~ a.cc:103:34: error: 'pow' was not declared in this scope 103 | printf("%lld\n",prod *(int)pow(2, even_counts + 1...
s293453349
p03665
C++
#include<bits/stdc++.h> using namespace std; int num[100]; int p,n; long long C(int n,int m) { if(n<m) return 0; long long ans=1; for(int i=0;i<m;i++) ans=ans*(long long)(n-i)/(long long)(i+1); return ans; } long long A(int n,int m) { if(n<m) return 0; long long ans=1; for(int i=0;i<m;i++) a...
a.cc:19:1: error: ISO C++ forbids declaration of 'signedmain' with no type [-fpermissive] 19 | signedmain(){ | ^~~~~~~~~~
s673366235
p03665
C++
#include <iostream> #include <string> #include <vector> #include <map> #include <set> using namespace std; typedef __int64 ll; int main() { int n,p; int a; ll odd = 0; ll even = 0; ll er[55]; er[0] = 1; for(int i = 1; i <= 50; i++) { er[i] = er[i-1]<<1; } cin>>n>>p; for(int i = 0 ; i < n; i++) { cin>>...
a.cc:8:9: error: '__int64' does not name a type; did you mean '__int64_t'? 8 | typedef __int64 ll; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:14:9: error: 'll' was not declared in this scope 14 | ll odd = 0; | ^~ a.cc:15:11: error: expected ';' be...
s606352168
p03665
C++
#include <iostream> using namespace std; int main() { int n,p,bis[51],mol,k=0,he[51],ti[51]; cin>>n>>p; for(int var1=1;var1<=n;var1++) { cin>>bis[var1]; } memset(he,0,sizeof(he)); bis[0]=0; he[0]=0; if(p%2==0) k++; for(int var1=1;var1<=n;var1++) { for(int var2=1;var2<=n+1-var1;var2++) { he[var1]=bis[...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(he,0,sizeof(he)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstri...
s426337897
p03665
Java
import java.math.BigInteger; import java.util.Scanner; public class A { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int P = scan.nextInt(); if(P==0){ BigInteger a = new BigInteger("2"); a = a.pow((N-1)); System.out.println(a.toString()); ...
Main.java:4: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s767153429
p03665
C++
#include<iostream> #include<utility> #include<tuple> #include<set> #include<list> #include<vector> #include<map> #include<algorithm> #include<queue> #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FUNCTION__ << endl; #define int l...
a.cc: In function 'int main()': a.cc:97:34: error: 'pow' was not declared in this scope 97 | printf("%lld\n",prod *(int)pow(2, even_counts + 1)); | ^~~ a.cc:103:34: error: 'pow' was not declared in this scope 103 | printf("%lld\n",prod *(int)pow(2, even_counts + 1...
s782034958
p03665
C++
#include<iostream> #include<algorithm> #include<cmath> int a[55]; using namespace std; int f(int n){ if(n==0) return 0; if(n==1) return 1; return a(n-1)+a(n-2); } int main() { int n,p,temp; cin>>n>>p; for(int i=1;i<=n;i++)cin>>a[i]; temp=f(i); if(temp%n!=p) cout<<0; }
a.cc: In function 'int f(int)': a.cc:12:13: error: 'a' cannot be used as a function 12 | return a(n-1)+a(n-2); | ~^~~~~ a.cc:12:20: error: 'a' cannot be used as a function 12 | return a(n-1)+a(n-2); | ~^~~~~ a.cc: In function 'int main()': a.cc:19:16: error: 'i' wa...
s185697825
p03665
C++
#include <vector> #include <algorithm> #include <string> #include <iostream> using namespace std; int res = 0; int main() { int N, P; cin >> N >> P; vector<int> nums(N, 0); for (int i = 0; i < N; i++) { cin >> nums[i]; } long long size = pow(2, N); for (long long i = 0; i < size; i++) { long long j = i; i...
a.cc: In function 'int main()': a.cc:15:26: error: 'pow' was not declared in this scope 15 | long long size = pow(2, N); | ^~~
s552688897
p03665
C++
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<cmath> using namespace std; long long n,p; long long l=0,r=0; long long a[55]; long long d[55][55]; int main() { cin >> n >> p; for(int i=0; i<n; i++) { cin >> a[i]; if(a[i]%2) l++; else ...
a.cc: In function 'int main()': a.cc:39:23: error: 'rm' was not declared in this scope; did you mean 'tm'? 39 | for(int i=0;i<rm;i++) | ^~ | tm
s404208663
p03665
C++
//#define NDEBUG #include <iostream> #include <array> #include <vector> #include <list> #include <stack> #include <queue> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <numeric> #include <string> #include <sstream> #include <memory> #include <cassert>...
a.cc: In function 'void ValLib::test()': a.cc:183:33: error: no matching function for call to 'count_if(std::vector<int>&, ValLib::test()::<lambda(int)>)' 183 | int x = count_if(v, [](int y) { return y <= 0; }); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included...
s894144457
p03665
C++
#include <vector> #include <algorithm> #include <string> #include <iostream> using namespace std; int res = 0; int main() { int N, P; cin >> N >> P; vector<int> nums(N, 0); for (int i = 0; i < N; i++) { cin >> nums[i]; } long long size = pow(2, N); for (long long i = 0; i < size; i++) { long long j = i; i...
a.cc: In function 'int main()': a.cc:15:26: error: 'pow' was not declared in this scope 15 | long long size = pow(2, N); | ^~~
s231250514
p03665
C++
//#define NDEBUG #include <iostream> #include <array> #include <vector> #include <list> #include <stack> #include <queue> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <numeric> #include <string> #include <sstream> #include <memory> #include <cassert>...
a.cc:70:18: error: expected nested-name-specifier before 'const' 70 | typename const vector<T>::const_iterator max_element(const vector<T>& vec) { | ^~~~~ a.cc:70:50: error: expected initializer before 'max_element' 70 | typename const vector<T>::const_iterator max_element(c...
s395159440
p03665
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Scanner; import java.util.HashMap; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStre...
Main.java:32: error: incompatible types: int[] cannot be converted to int a = new int[n]; ^ Main.java:34: error: array required, but int found a[i] = in.nextInt(); ^ Main.java:54: error: array required, but int found if ((a[index] % 2) == 1) { ...
s410159245
p03665
C++
import numpy as np a = np.array(A) f = 2**N-1 cnt = 0 for i in range(2**N): ff = np.array(list(map(int,list(format(f,'b').zfill(N))))) s = np.sum(ff * a) print(ff) if ( s%2 == P ): cnt+=1 f-=1 print (cnt)
a.cc:1:1: error: 'import' does not name a type 1 | import numpy as np | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s473620347
p03665
C++
#include<iostream> #include<stdint> using namespace std; int main() { int N, P, A, odd = 0, even = 0; int64_t sum = 0, num; cin >> N >> P; for (int i = 0;i < N;i ++) { cin >> A; if (A % 2) odd ++; else even ++; } for (int i = P;i <= odd;i += 2) { for (int j = 0;j <= even;j ++) { num = 1; for (int k...
a.cc:2:9: fatal error: stdint: No such file or directory 2 | #include<stdint> | ^~~~~~~~ compilation terminated.
s702196536
p03665
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <set> using namespace std; long long int C(int p, int q) { long long int temp = 1; int s = min(p - q, q); for (int i = p; i > (p - s); i--) { temp *= i; } for (int i = 2; i <= s; i++) { temp /= i; } return temp; } int...
a.cc: In function 'int main()': a.cc:43:26: error: 'pow' was not declared in this scope 43 | count += pow(2, even.size()); | ^~~ a.cc:56:26: error: 'pow' was not declared in this scope 56 | count *= pow(2, even.size()); | ...
s527811711
p03665
C++
/* * A.cpp * * Created on: 2017/07/09 * Author: LitMc */ #define MYDEBUG #include <bits/stdc++.h> //#ifdef MYDEBUG #define dbp(x) cout<<#x<<": "<<x<<endl #define dbp2(x,y) cout<<#x<<","<<#y<<": "<<x<<","<<y<<endl #define dbp3(x,y,z) cout<<#x<<","<<#y<<","<<#z<<": "<<x<<","<<y<<","<<z<<endl #define dbp4(w,x...
a.cc:17:2: error: #else without #if 17 | #else | ^~~~ a.cc:18:9: warning: "dbp" redefined 18 | #define dbp(x) | ^~~ a.cc:12:9: note: this is the location of the previous definition 12 | #define dbp(x) cout<<#x<<": "<<x<<endl | ^~~ a.cc:19:9: warning: "dbp2" redefined 19 | ...
s433326002
p03665
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <map> #include <stack> #include <queue> #include <cstdlib> #include <numeric> /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::...
a.cc: In function 'int main()': a.cc:85:38: error: expected ';' before 'i' 85 | for (int i = 0; i < dp.size() i++) { | ^~ | ;
s553126369
p03665
C++
45 1 17 55 85 55 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 66 25 9 89 71 41 16 53 13 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 25 26
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 45 1 | ^~
s876908192
p03665
C++
import sys # sys.stdin = open('a1.in') def read_int_list(): return list(map(int, input().split())) def read_int(): return int(input()) def read_str_list(): return input().split() def read_str(): return input() def solve(): n, p = read_int_list() a = read_int_list() a = map(lambda ...
a.cc:3:3: error: invalid preprocessing directive #sys 3 | # sys.stdin = open('a1.in') | ^~~ a.cc:44:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 44 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:1:1: error: 'import' does not name a type 1 |...
s036199394
p03665
Java
import java.io.*; import java.util.*; import java.math.*; public class A implements Runnable { private static BufferedReader in; private static PrintWriter out; private static StringTokenizer st; private static Random rnd; private void solve() throws IOException { int n = nextInt(); int p = nextInt(); l...
Main.java:5: error: class A is public, should be declared in a file named A.java public class A implements Runnable { ^ 1 error
s935791852
p03665
C++
#include "grader.h" #include <bits/stdc++.h> using namespace std; #define forn(i, n) for (int i = 0; i < int(n); i++) #define re return #define fi first #define mp make_pair #define se second #define sz(a) (int)a.size() #define prev previ #define tm tmmm #define div divv typedef long long ll; typedef pair<ll, ll> pl...
a.cc:1:10: fatal error: grader.h: No such file or directory 1 | #include "grader.h" | ^~~~~~~~~~ compilation terminated.
s776075507
p03665
C++
w#include <cstdio> #include <cstring> #include <cassert> #include <algorithm> #include <iostream> #include <vector> using namespace std; #define TRACE(x) cerr << #x << " = " << x << endl #define REP(i, n) for (int i=0; i<n; i++) #define FOR(i, a, b) for (int i=(a); i<(b); i++) #define _ << " " << typedef long long l...
a.cc:1:2: error: stray '#' in program 1 | w#include <cstdio> | ^ a.cc:1:1: error: 'w' does not name a type 1 | w#include <cstdio> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:4: /usr/include/...
s139361410
p03665
C++
#include <cmath> #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <map> #include <list> #include <time.h> #include <math.h> #include <random> #include <deque> #include <queue> #include <cassert> #include <unordered_map> #include <iomanip> using namespace std; const ...
a.cc:22:1: error: 'll' does not name a type 22 | ll dp[N][2]; | ^~ a.cc: In function 'int main()': a.cc:29:5: error: 'dp' was not declared in this scope 29 | dp[0][0] = 1; | ^~
s315111814
p03666
C++
#include <bits/stdc++.h> #include <atcoder/mincostflow> using namespace atcoder; #include <string> #include <vector> #include <algorithm> #include <math.h> #include <iostream> #include <numeric> #define rep(i,n) for (int i = 0;i < (n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; #define chm...
a.cc:2:10: fatal error: atcoder/mincostflow: No such file or directory 2 | #include <atcoder/mincostflow> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s543211596
p03666
C++
#ifdef __LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; template<typename T> bool chmax(T &a,T b) {if(a<b) {a=b; return true;} return false;} template<typename T> bool chmin(T &a,T b) {if(a>b) {a=b; return true;} return false;} #define itn int #define fi first #define se second #def...
a.cc:20:9: error: 'int128_t' does not name a type; did you mean 'int8_t'? 20 | typedef int128_t ll; | ^~~~~~~~ | int8_t a.cc:22:14: error: 'll' was not declared in this scope; did you mean 'ld'? 22 | typedef pair<ll,ll> pll; | ^~ | ld a.cc:22:17: e...
s839995828
p03666
C++
#include <bits/stdc++.h> using namespace std; #define int long long int main(){ int N, A, B, C, D; cin >> N >> A >> B >> C >> D; int b = abs(A - B); bool o = false; for(int i=0; i<N-1; i++){ int p = i, m = N-1 - i; int n = C*p - D*m, x = D*p - C*m; if(n <= b&&b <= x){ ...
cc1plus: error: '::main' must return 'int'
s867388784
p03666
C++
#include <bits/stdc++.h> using namespace std; #define int long long int main(){ int N, A, B, C, D; cin >> N >> A >> B >> C >> D; int b = abs(A - B); bool o = false; for(int i=0; i<N-1; i++){ int p = i, m = N-1 - i; int n = C*p - D*m, x = D*p - C*m; if(n <= b&&b <= x){ ...
cc1plus: error: '::main' must return 'int'
s406960928
p03666
C++
#include <bits/stdc++.h> using namespace std; #define int long long int main(){ int N, A, B, C, D; cin >> N >> A >> B >> C >> D; int b = abs(A - B); bool o = false; for(int i=0; i<N-1; i++){ int p = i, m = N-1 - i; int n = C*p - D*m, x = D*p - C*m; if(n <= b&&b <= x){ ...
cc1plus: error: '::main' must return 'int' a.cc: In function 'int main()': a.cc:13:13: error: 'ok' was not declared in this scope; did you mean 'o'? 13 | ok = true; | ^~ | o
s712355977
p03666
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N, A, B, C, D; cin >> N >> A >> B >> C >> D; int b = abs(A - B); bool o = false; for(int i=0; i<N-1; i++){ int p = i, m = N-1 - i; int n = C*p - D*m, x = D*p - C*m; if(n <= b&&b <= x){ ok = true; }...
a.cc: In function 'int main()': a.cc:12:13: error: 'ok' was not declared in this scope; did you mean 'o'? 12 | ok = true; | ^~ | o
s258523244
p03666
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N, A, B, C, D; cin >> N >> A >> B >> C >> D; int b = abs(A - B); bool o = false; for(int i=0; i<N-1; i++){ int p = i, m = N-1 - i; int n = C*p - D*m, x = D*p - C*m; if(n <= b&&b <= x){ ok = true; }...
a.cc: In function 'int main()': a.cc:12:13: error: 'ok' was not declared in this scope; did you mean 'o'? 12 | ok = true; | ^~ | o a.cc:15:8: error: 'ok' was not declared in this scope; did you mean 'o'? 15 | if(ok){ | ^~ | o
s879593239
p03666
C++
N, A, B, C, D = map(int, input().split()) left_max = [A] * N left_min = [A] * N right_max = [B] * N right_min = [B] * N for i in range(1, N): left_max[i] = left_max[i - 1] + D left_min[i] = left_min[i - 1] + C for i in range(N - 2, -1, -1): right_max[i] = right_max[i + 1] + D right_min[i] = right_min[i + 1] ...
a.cc:1:1: error: 'N' does not name a type 1 | N, A, B, C, D = map(int, input().split()) | ^
s429555830
p03666
C++
#include <bits/stdc++.h> typedef long long ll; int main(){ ll n,a,b,l,r; cin>>n>>a>>b>>l>>r; int flag = 1; ll x,y; for(ll i = 0; i <= n-1;i++){ x = a+l*i-(n-i-1)*r; y = a+r*i-(n-i-1)*l; if(x <= b && b <= y){ flag = 0; } } if(flag)cout<<"NO"<<end...
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>n>>a>>b>>l>>r; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62...
s406332381
p03666
C++
#include <bits/stdc++.h> typedef long long ll; int main(){ ll n,a,b,l,r; cin>>n>>a>>b>>l>>r; int flag = 1; ll x,y; for(ll i = 0; i <= n-1;i++){ x = a+l*i-(n-i-1)*r; y = a+r*i-(n-i-1)*l; if(x <= b && b <= y){ flag = 0; } } printf("%s\n", flag?"NO...
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>n>>a>>b>>l>>r; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62...