submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s404502949
p03776
C++
#include <stdio.h> #include <vector> #include <algorithm> #include <numeric> using namespace std; double eps=0.000001; unsigned long long combi(int a,int b){ unsigned long long up=1,dn=1; for(int i=0;i<b;i++){ up*=a-i; dn*=b-i; } return up/dn; } int main(void){ int n,a,b,c,d; scanf("%d%d%d",&n,&a,...
a.cc: In function 'int main()': a.cc:29:8: error: 'fabs' was not declared in this scope; did you mean 'labs'? 29 | if(fabs(ans1-1.0*accumulate(v.end()-i+1,v.end(),0)/i)<eps){ | ^~~~ | labs
s111943095
p03776
C++
#include <stdio.h> #include <vector> #include <algorithm> #include <numeric> using namespace std; double eps=0.000001; unsigned long long combi(int a,int b){ unsigned long long up=1,dn=1; for(int i=0;i<b;i++){ up*=a-i; dn*=b-i; } return up/dn; } int main(void){ int n,a,b,c,d; scanf("%d%d%d",&n,&a,...
a.cc: In function 'int main()': a.cc:22:10: error: request for member 'begin' in 'v', which is of non-class type 'std::vector<long long unsigned int> [n]' 22 | sort(v.begin(),v.end()); | ^~~~~ a.cc:22:20: error: request for member 'end' in 'v', which is of non-class type 'std::vector<long long unsig...
s524344522
p03776
C++
#include <stdio.h> #include <vector> #include <algorithm> #include <numeric> using namespace std; double eps=0.000001; unsigned long long combi(int a,int b){ unsigned long long up=1,dn=1; for(int i=0;i<b;i++){ up*=a-i; dn*=b-i; } return up/dn; } int main(void){ int n,a,b,c,d; scanf("%d%d%d",&n,&a,...
a.cc: In function 'int main()': a.cc:22:10: error: request for member 'begin' in 'v', which is of non-class type 'std::vector<long long unsigned int> [n]' 22 | sort(v.begin(),v.end()); | ^~~~~ a.cc:22:20: error: request for member 'end' in 'v', which is of non-class type 'std::vector<long long unsig...
s098746055
p03776
C++
#include <algorithm> #include <bitset> #include <cstdio> #include <functional> #include <initializer_list> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <queue> #include <regex> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #i...
a.cc: In function 'int main()': a.cc:82:2: error: expected '}' at end of input 82 | } | ^ a.cc:56:12: note: to match this '{' 56 | int main() { | ^
s527992355
p03776
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll,ll> P; const int INF = numeric_limits<int>::max()/2; vector<vector<ll>> comb2(ll n) { vector<vector<ll>> v(n + 1,vector<ll>(n + 1, 0)); for (int i = 0; i < (int)v.size(); i++) { v[i][0] = 1; v[i][i...
a.cc: In function 'int main()': a.cc:30:33: error: too many arguments to function 'std::vector<std::vector<long long int> > comb2(ll)' 30 | vector<vector<ll>> com=comb2(60,60); | ~~~~~^~~~~~~ a.cc:10:20: note: declared here 10 | vector<vector<ll>> comb2(ll n) { | ...
s696790265
p03776
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll comb[55][55]; void init() { for(int i = 0; i <= 50; i++) { comb[i][0] = 1; comb[i][i] = 1; for(int j = 1; j < i; j++) { comb[i][j] = comb[i-1][j-1] + comb[i-1][j]; } } } ll l[55]; int main() { init(); int n, a, b; scanf("%d%d%d...
a.cc: In function 'int main()': a.cc:40:33: error: 'freq' was not declared in this scope; did you mean 'free'? 40 | if(i <= freq[l[0]]) { | ^~~~ | free
s544130869
p03776
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll comb[55][55]; void init() { for(int i = 0; i <= 50; i++) { comb[i][0] = 1; comb[i][i] = 1; for(int j = 1; j < i; j++) { comb[i][j] = comb[i-1][j-1] + comb[i-1][j]; } } } ll l[55]; int main() { init(); int n, a, b; scanf("%d%d%d...
a.cc: In function 'int main()': a.cc:39:33: error: 'freq' was not declared in this scope; did you mean 'free'? 39 | if(i <= freq[l[0]]) { | ^~~~ | free a.cc:40:33: error: 'amt' was not declared in this scope 40 | ...
s790795809
p03776
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll comb[55][55]; void init() { for(int i = 0; i <= 50; i++) { comb[i][0] = 1; comb[i][i] = 1; for(int j = 1; j < i; j++) { comb[i][j] = comb[i-1][j-1] + comb[i-1][j]; } } } ll l[55]; int main() { init(); int n, a, b; scanf("%d%d%d...
a.cc: In function 'int main()': a.cc:52:39: error: 'freq' was not declared in this scope; did you mean 'free'? 52 | printf("%lld\n", comb[freq[l[a-1]]][use]); | ^~~~ | free
s450455847
p03776
C++
#include<iostream> #include <algorithm> #include <functional> #include<vector> #include<math.h> #include<bitset> #include<string> #include <deque> #include<queue> #include <iomanip> #include<map> #include <random> #include<type_traits> using namespace std; long long int combination(long long int n,long long int r) { ...
a.cc: In function 'int main()': a.cc:83:17: error: expected primary-expression before 'long' 83 | c = Y / long double(A); | ^~~~
s248800799
p03776
C
#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_ITM_MAX 50 // 最大品物数 // 内部構造体 - 品物情報 typedef struct Itm { long long mlVal; // 価値 int miCnt; // 数 } Itm; // 内部変数 static Itm sz1Itm[D_ITM_MAX]; /...
main.c: In function 'fMakeComb': main.c:85:35: error: expected ')' before 'or' 85 | if (j == 0 or j == i) { | ~ ^~~ | )
s675043059
p03776
C
#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_ITM_MAX 50 // 最大品物数 // 内部構造体 - 品物情報 typedef struct Itm { long long mlVal; // 価値 int miCnt; // 数 } Itm; // 内部変数 static Itm sz1Itm[D_ITM_MAX]; /...
main.c: In function 'fMakeComb': main.c:85:35: error: expected ')' before 'or' 85 | if (j == 0 or j == i) { | ~ ^~~ | )
s121530433
p03776
C++
#include <iostream> #include <vector> #include <algorithm> #include <numeric> using namespace std; #define REP(i,a,b) for(int i=a;i<b;i++) #define rep(i,n) REP(i,0,n) int64_t comb[60][60]; int main() { rep(i, 55) { for (int j = 0; j <= i; j++) { if (j == 0 || j == i) { comb[i][j] = 1; } else { com...
a.cc: In function 'int main()': a.cc:50:17: error: 'assert' was not declared in this scope 50 | assert(lidx == 0); | ^~~~~~ a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 4 | #include <numeric> +++ |+#incl...
s643876694
p03776
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vd = vector<double>; using vvd = vector<vd>; using vl = vector<ll>; using vvl = vector<vl>; using pii = pair<int, int>; using vs = vector<string>; #define rep(i,n) range(i,0,n) #define range(i,a,n) ...
a.cc:71:32: error: macro "rep" passed 3 arguments, but takes just 2 71 | rep(i, a, b + 1) { | ^ a.cc:12:9: note: macro "rep" defined here 12 | #define rep(i,n) range(i,0,n) | ^~~ a.cc: In function 'int main()': a.cc:71:17: error: 'rep' was not dec...
s228073028
p03776
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vd = vector<double>; using vvd = vector<vd>; using vl = vector<ll>; using vvl = vector<vl>; using pii = pair<int, int>; using vs = vector<string>; #define rep(i,n) range(i,0,n) #define range(i,a,n) ...
a.cc:71:32: error: macro "rep" passed 3 arguments, but takes just 2 71 | rep(i, a, b + 1) { | ^ a.cc:12:9: note: macro "rep" defined here 12 | #define rep(i,n) range(i,0,n) | ^~~ a.cc: In function 'int main()': a.cc:71:17: error: 'rep' was not dec...
s150863945
p03776
C
#include<stdio.h> int main(){ long long int n,a,b,i,j,s=51,t=0; long long int v[50],temp,sum=0,cnt=1; scanf("%lld %lld %lld",&n,&a,&b); for(i=0;i<n;i++) scanf("%lld",&v[i]); for(i=0;i<n-1;i++){ for(j=i+1;j<n;j++){ if(v[i]<v[j]){ temp=v[i]; v[i]=v[j]; v[j]=temp; } ...
main.c: In function 'main': main.c:49:1: error: expected declaration or statement at end of input 49 | } | ^
s712668895
p03776
C++
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <cmath> #include <iomanip> #include <map> #include <deque> using namespace std; #define REP(i,n) for(int i = 0; i < n; i++) #define ALL(v) v.begin(),v.end() typedef long long ll; typedef pair<int,int> pi; typedef pair<ll,ll> pll; type...
a.cc: In function 'int main()': a.cc:69:28: error: no matching function for call to 'min(ll&, int&)' 69 | for(int i = a; i <= min(b,xnum); i++){ | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s043174517
p03776
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <array> #include <vector> #include <utility> #include <bitset> #include <queue> #include <unordered_map> #include <unordered_set> using namespace std; using ll = long long; using p = pair<ll, ll>...
a.cc: In function 'int main()': a.cc:48:13: error: 'setprecision' was not declared in this scope 48 | cout << setprecision(20) << ave << endl; | ^~~~~~~~~~~~ a.cc:14:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>' 13 | #i...
s974267723
p03776
C++
#include <bits/stdc++.h> using namespace std; #define int long long int a[100], dp[100][100]; int calc(int l, int r, int n){ int ans = 0; for(int i = l;i <= r;i++)ans += dp[n][i]; return ans; } void init(){ dp[0][0] = 1; for(int i = 1;i <= 51;i++){ dp[i][0] = 1; for(int j = 1;j <= 51;j++) dp[i][j] = dp[i-1...
a.cc: In function 'int main()': a.cc:37:9: error: 'elseprintf' was not declared in this scope; did you mean 'vswprintf'? 37 | elseprintf("%lld\n", dp[s2][l-s1]); | ^~~~~~~~~~ | vswprintf
s009849461
p03776
C++
#include <iostream> #include<cstdlib> #include<queue> #include<set> #include<vector> #include<string> #include<algorithm> #include<stack> #include<map> #include<deque> #include<cstdio> using namespace std; #define rep(i,a) for(int i=0;i<a;i++) #define mp make_pair #define pb push_back //#define ll __int64 #define __int...
a.cc:19:7: error: 'll' does not name a type 19 | const ll mod=1000000007; | ^~ a.cc:21:1: error: 'll' does not name a type 21 | ll t[111111]; | ^~ a.cc:30:1: error: 'll' does not name a type 30 | ll m[100][100]; | ^~ a.cc:32:1: error: 'll' does not name a type 32 | ll C(ll n,ll r){ ...
s691502453
p03776
C++
#include <iostream> #include<cstdlib> #include<queue> #include<set> #include<vector> #include<string> #include<algorithm> #include<stack> #include<map> #include<deque> #include<cstdio> using namespace std; #define rep(i,a) for(int i=0;i<a;i++) #define mp make_pair #define pb push_back #define ll __int64 //#define __int...
a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll __int64 | ^~~~~~~ a.cc:19:7: note: in expansion of macro 'll' 19 | const ll mod=1000000007; | ^~ a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll...
s482851660
p03776
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define MOD 1000000007 ll C[51][51]; void comb_table(int N){ for(int i=0;i<=N;i++){ for(int j=0;j<=i;j++){ if(j==0||j==i){ C[i][j]=1LL; }else{ C[i][j]=(C[i-1][j-1]+C[i-1][j]); } ...
a.cc: In function 'int main()': a.cc:54:9: error: 'precision' was not declared in this scope 54 | cout<<precision(20); | ^~~~~~~~~
s597112355
p03776
C++
#include <algorithm> #include <string> #include <vector> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <stack> #include <queue> #include <set> #include <map> #include <unordered_map> #include <ctime> #include <list> #include <numeric> #include <utility> #include <ctime> #define INF 1...
a.cc: In function 'int main()': a.cc:62:3: error: 'cin' was not declared in this scope 62 | cin>>n>>a>>b; | ^~~ a.cc:18:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 17 | #include <ctime> +++ |+#include <iostream> 18 | #define INF 10...
s508735480
p03776
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <stack> #include <queue> #include <set> #include <map> #include <unordered_map> #include <ctime> #include <list> #include <numeric> #include <utility> #include <...
a.cc:93:10: error: #include expects "FILENAME" or <FILENAME> 93 | #include | ^ a.cc:94:10: error: #include expects "FILENAME" or <FILENAME> 94 | #include | ^ a.cc:95:10: error: #include expects "FILENAME" or <FILENAME> 95 | #include | ^ a.cc:96:10: error: #include e...
s218176249
p03776
C++
#include <algorithm> #include <cctype> #include <complex> #include <iomanip> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> using std::cin; using std::cout; using std::endl; using std::string; using std::to_string; using std::vector; using std::set; using st...
a.cc: In function 'int main()': a.cc:90:14: error: expected '}' at end of input 90 | return 0; | ^ a.cc:40:16: note: to match this '{' 40 | int main(void) { | ^
s409215660
p03776
C++
#include <iostream> #include <vector> using namespace std; long long combi[50][50]; long long combination(int n, int r) { if (n/2 < r) { r = n - r; } if (combi[n][r] != 0) return combi[n][r]; if (n == r || r == 0) return 1; return combi[n][r] = combination(n-1, r) + combination(n-1, r-1); } int main()...
a.cc: In function 'int main()': a.cc:24:3: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(v.begin(), v.end(), greater<int>()); | ^~~~ | short
s891299100
p03776
C++
#include<iostream> #include<bits/stdc++.h> #include<string> #include<vector> #include<utility> #include<queue> #include<algorithm> #include<cmath> #include<cstdio> #define EPS 1e-6 #define INF 2147483647 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long #define llINF 92233...
a.cc: In function 'int main()': a.cc:50:21: error: 'pointer' was not declared in this scope; did you mean 'apointer'? 50 | int abc=min(i-pointer,min(acnt,b)-(i-apointer)); | ^~~~~~~ | apointer a.cc:50:32: error: no matching function for call to 'min(long long...
s365748137
p03776
C++
#include<iostream> #include<bits/stdc++.h> #include<string> #include<vector> #include<utility> #include<queue> #include<algorithm> #include<cmath> #include<cstdio> #define EPS 1e-6 #define INF 2147483647 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long #define llINF 92233...
a.cc: In function 'int main()': a.cc:50:21: error: 'pointer' was not declared in this scope; did you mean 'apointer'? 50 | int abc=min(i-pointer,min(acnt,b)-(i-pointer)); | ^~~~~~~ | apointer a.cc:50:32: error: no matching function for call to 'min(long long ...
s221541201
p03776
C++
#include <iostream> #include <vector> using namespace std; typedef long long ll; ll c[51][51]; void comb_table(int n) { for (int i = 0; i <= n; i++) { c[i][0] = 1LL; c[i][i] = 1LL; for (int j = 1; j < i; j++) { c[i][j] = c[i - 1][j - 1] + c[i - 1][j]; } } } int main(void) { int n, a, b; ci...
a.cc: In function 'int main()': a.cc:22:3: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(v.begin(), v.end(), greater<int>()); | ^~~~ | short
s568537282
p03776
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<queue> #include<cstring> using namespace std; int cmp(long long a,long long b){ return a>b; } long long C(long long a,long long b){ long long ans=1; for(int i=1;i<=a;i++){ ans*=(b-i+1);ans/=i; } return ans; } int n; long long a,b; ...
a.cc: In function 'int main()': a.cc:39:27: error: no matching function for call to 'min(long long int&, int&)' 39 | for(int i=a;i<=min(b,t);i++){ | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s957095396
p03776
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<queue> #include<cstring> using namespace std; int cmp(long long a,long long b){ return a>b; } long long C(long long a,long long b){ long long ans=1; for(int i=1;i<=a;i++){ ans*=(b-i+1);ans/=i; } return ans; } int n; long long a,b; ...
a.cc: In function 'int main()': a.cc:39:27: error: no matching function for call to 'min(long long int&, int&)' 39 | for(int i=a;i<=min(b,t);i++){ | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s681061013
p03776
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<queue> #include<cstring> using namespace std; int cmp(long long a,long long b){ return a>b; } long long C(long long a,long long b){ long long ans=1; for(int i=1;i<=a;i++){ ans*=(b-i+1);ans/=i; } return ans; } int n; long long a,b; ...
a.cc: In function 'int main()': a.cc:39:27: error: no matching function for call to 'min(long long int&, int&)' 39 | for(int i=a;i<=min(b,t);i++){ | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s683870770
p03776
C++
// I/O #include <iostream> #include <iomanip> // data structures #include <set> #include <queue> #include <vector> // manipulations #include <algorithm> #define rep(i,n) for(int i=0;i< (n);++i) #define REP(i,n) for(int i=1;i<=(n);++i) #define for_lowercase(c) for(int c='a';c<='z';++c) #define for_uppercase(c) for(in...
a.cc: In function 'LLI combination(LLI, LLI, bool)': a.cc:29:77: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 29 | if(n<0){ std::cerr << "[ERROR] n must be non-negative in combination()" << std::end; exit(1); } | ~~...
s635501499
p03776
C++
#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 <locale> #include <map> #incl...
a.cc: In function 'int main()': a.cc:109:29: warning: pointer to a function used in arithmetic [-Wpointer-arith] 109 | selects += nCr[B][i]; | ^ a.cc:109:32: warning: pointer to a function used in arithmetic [-Wpointer-arith] 109 | selects += nCr[B][i]; ...
s755194971
p03776
C++
#include <bits/stdc++.h> #include <stdio.h> using namespace std; #define INF 900000000 #define LINF 9000000000000000000 typedef long long ll; typedef pair<int, int> P; int n, a, b; ll v[50]; ll dp[51][51]; int main(){ //cin.tie(0); //ios::sync_with_stdio(false); cin >> n >> a >> b; for (int i = 0; i < n; i++)...
a.cc: In function 'int main()': a.cc:43:45: error: expected ';' before 'if' 43 | cout << "avr " << avr << " " | ^ | ; 44 | if (ans == avr) cnt++; | ~~ ...
s384959930
p03776
C++
#include <iostream> #include <vector> using namespace std; //1 //1 1 //1 2 1 //1 3 3 1 //1 4 6 4 1 // //aC0 = 1 //aCa = 1 //aCb = a-1Cb + a-1Cb-1 //2C1 = 1C1 + 1C0 int main(){ int N, A, B; cin >> N >> A >> B; vector<long long> v(N); for(int i=0; i<N; i++) cin >> v[i]; sort(v.begin(), v.end(), gre...
a.cc: In function 'int main()': a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(v.begin(), v.end(), greater<long long>()); | ^~~~ | short
s836582964
p03776
C++
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Text; namespace Program { class MainClass { //////////////////////////////////////////////////////////// int N, A, B; ...
a.cc:47:10: error: invalid preprocessing directive #region 47 | #region MockMacro | ^~~~~~ a.cc:51:10: error: invalid preprocessing directive #endregion 51 | #endregion | ^~~~~~~~~ a.cc:54:6: error: invalid preprocessing directive #region 54 | #region default ...
s379624574
p03776
C++
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Text; namespace Program { class MainClass { //////////////////////////////////////////////////////////// int N, A, B; ...
a.cc:47:10: error: invalid preprocessing directive #region 47 | #region MockMacro | ^~~~~~ a.cc:51:10: error: invalid preprocessing directive #endregion 51 | #endregion | ^~~~~~~~~ a.cc:54:6: error: invalid preprocessing directive #region 54 | #region default ...
s884648161
p03776
C++
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Text; namespace Program { class MainClass { //////////////////////////////////////////////////////////// int N, A, B; ...
a.cc:47:10: error: invalid preprocessing directive #region 47 | #region MockMacro | ^~~~~~ a.cc:51:10: error: invalid preprocessing directive #endregion 51 | #endregion | ^~~~~~~~~ a.cc:54:6: error: invalid preprocessing directive #region 54 | #region default ...
s233316934
p03776
C++
#include <cstdlib> #include <cmath> #include <stdio.h> #include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <cstring> #include <string> #include <map> #define MOD 1000000007 #define INF 1000000000 typedef long long ll; using namespace std; typedef pair<int,int> P; //nCk ...
a.cc:77:1: error: extended character   is not valid in an identifier 77 |   | ^ a.cc:77:1: error: '\U00003000' does not name a type 77 |   | ^~
s392564376
p03776
C++
#include "bits/stdc++.h" using namespace std; long long com[70][70]; //67以上でオーバーフロー void init(int n) { for (int i = 0; i <= n; i ++) { for (int j = 0; j <= i; j ++) { if (j == 0 || j == i) com[i][j] = 1LL; else com[i][j] = com[i - 1][j - 1] + com[...
a.cc: In function 'int main()': a.cc:23:14: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'? 23 | sort(all(v)); | ^~~ | std::filesystem::perms::all In file included from /usr/include/c++/14/filesystem:51, from /usr...
s003523035
p03776
C
#include<stdio.h> #include<math.h> #define FOR(i,a,b) for(int i=a;i<b;i++) #define ABS(a) ((a)>0 ? (a):-(a)) #define ll long long #define SWAP(a,b) {a+=b;b=a-b;a-=b;} int main(){ ll n,a,b,v[52]; double ave = 0; ll numin = 0,numall = 0,num; scanf("%lld %lld %lld",&n,&a,&b); FOR(i,0,n) scanf("%lld",&v[i]); FOR(i...
main.c: In function 'main': main.c:27:15: error: implicit declaration of function 'FACT' [-Wimplicit-function-declaration] 27 | num = FACT(numall) / FACT(numin) / FACT(numall - numin); | ^~~~
s121532712
p03776
C++
//start of jonathanirvings' template v3.0.3 (BETA) #include <bits/stdc++.h> using namespace std; /** using std::max; using std::swap; using std::abs; using std::priority_queue; using std::queue; using std::bitset; using std::make_tuple; using std::istream; using std::ostream; using std::fixed; using std::greater; usi...
a.cc:284:23: error: conversion from 'double' to 'long long int' in a converted constant expression 284 | typedef ModInt<ll,1e18+7> Mint; | ~~~~^~ a.cc:284:23: error: could not convert '(1.0e+18 + (double)7)' from 'double' to 'long long int' 284 | typedef ModInt<ll,1e18+7> Mint; | ...
s319157408
p03776
C++
#include <bits/stdc++.h> using namespace std; using VI = vector<int>; using VVI = vector<VI>; using VB = vector<bool>; using VVB = vector<VB>; using VS = vector<string>; using PII = pair<int, int>; using VPII = vector<PII>; using VL = vector<long long>; using VVL = vector<VL>; #define sz(var) (int)var.size() #define...
a.cc: In function 'long long int bino2(int, int)': a.cc:42:26: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int' 42 | int& ret = cache[n][r]; | ~~~~~~~~~~^
s708009525
p03776
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(double i=a;i<b;i++) long long comb(int n, int i) { if (n - i < i) i = n - i; long long k = 1; for (int d = 1; d <= i; ++d) { k *= n--; k /= d; } return k; } int main() { double n, a, b; long long v[52], cnt = 0, key = 0; double avr = 0; ...
a.cc: In function 'int main()': a.cc:21:25: error: invalid types 'long long int [52][double]' for array subscript 21 | cin >> v[i]; | ^ a.cc:23:17: error: invalid operands of types 'long long int [52]' and 'double' to binary 'operator+' 23 | sort(v,v+n); ...
s959495989
p03776
C++
long long comb(int n, int i) { if (n - i < i) i = n - i; long long k = 1; for (int d = 1; d <= i; d++) { k *= n--; k /= d; } return k; } int main() { int n, a, b; long long v[52], cnt = 0,key=0; double avr = 0; cin >> n >> a >> b; rep(i, 0, n) { cin >> v[i]; } sort(v,v+n); reverse(v,v+n); rep(i, 0,...
a.cc: In function 'int main()': a.cc:15:9: error: 'cin' was not declared in this scope 15 | cin >> n >> a >> b; | ^~~ a.cc:16:13: error: 'i' was not declared in this scope 16 | rep(i, 0, n) { | ^ a.cc:16:9: error: 'rep' was not declared in this scope 16 | ...
s283413229
p03776
Java
import java.math.BigInteger; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main_1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int MIN = sc.nextInt(); int MAX = sc.nextInt(); BigInteger[][] combo_tab...
Main.java:8: error: class Main_1 is public, should be declared in a file named Main_1.java public class Main_1 { ^ 1 error
s291332080
p03776
C++
#include <iostream> #include <cmath> #include <algorithm> using namespace std; typedef long long int long long int; #define MOD (1e9+7); #define INF (2e9) long long int c(int x, int y) {//xCyを返す関数 long long int a = 1; for (int i = 1; i<=y; i++) { a *= x+1-i;//x,x-1,・・・,x-y+1 がaにかけられる a/=i;//1,2...
a.cc:5:23: error: 'long long long' is too long for GCC 5 | typedef long long int long long int; | ^~~~ a.cc:5:28: error: 'long long long' is too long for GCC 5 | typedef long long int long long int; | ^~~~ a.cc:5:19: error: multiple types in one decla...
s567076566
p03776
C++
include <stdio> using ll=long long; using R=double; using namespace std; // Combination Table ll C[51][51]; // C[n][k] -> nCk void comb_table(int N){ for(int i=0;i<=N;++i){ for(int j=0;j<=i;++j){ if(j==0 or j==i){ C[i][j]=1LL; }else{ C[i][j]=(C[i-1][j-1]+C[i-1][j]); } } } } int main(void){ int N,A,B...
a.cc:1:1: error: 'include' does not name a type 1 | include <stdio> | ^~~~~~~ a.cc:7:2: error: 'll' does not name a type 7 | ll C[51][51]; // C[n][k] -> nCk | ^~ a.cc: In function 'void comb_table(int)': a.cc:13:2: error: 'C' was not declared in this scope 13 | C[i][j]=1LL; | ^ a.cc:15:...
s940792778
p03776
Java
import java.math.BigInteger; import java.lang.Object; import java.util.Scanner; import java.util.Arrays; import java.util.Collections; public class d { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int l = sc.nextInt(); int r = sc.nextInt(); Long[] a =...
Main.java:7: error: class d is public, should be declared in a file named d.java public class d { ^ Main.java:18: warning: [removal] Long(long) in Long has been deprecated and marked for removal a[i] = new Long(sc.nextLong()); ^ 1 error 1 warning
s460681089
p03776
C++
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <iomanip> using namespace std; long long comb(int n, int k) { long long s1 = 1, s2 = 1; for (i = (n-k+1); i <= n; i++) s1 *= i; for (i = 1; i <= k; i++) s2 *= i; return s1/s2; } int main() { in...
a.cc: In function 'long long int comb(int, int)': a.cc:11:10: error: 'i' was not declared in this scope 11 | for (i = (n-k+1); i <= n; i++) | ^ a.cc:13:10: error: 'i' was not declared in this scope 13 | for (i = 1; i <= k; i++) | ^
s673849506
p03776
C++
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <iomanip> using namespace std; long long comb(n, k) { long long s1 = 1, s2 = 1; for (i = (n-k+1); i <= n; i++) s1 *= i; for (i = 1; i <= k; i++) s2 *= i; return s1/s2; } int main() { int N, A, ...
a.cc:9:16: error: 'n' was not declared in this scope 9 | long long comb(n, k) { | ^ a.cc:9:19: error: 'k' was not declared in this scope 9 | long long comb(n, k) { | ^ a.cc:9:20: error: expression list treated as compound expression in initializer [-fpermissive] ...
s507794153
p03776
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * Created by Dell on 28-03-2017. */ public class TaskB { static void solve(Long[] numbers, int a, int b) { ...
Main.java:12: error: class TaskB is public, should be declared in a file named TaskB.java public class TaskB { ^ 1 error
s601084253
p03776
C++
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <unordered_map> #include <map> using namespace std; #define ull unsigned long long ull pow(ull a, ull e){ ull tmp = 1; while(e > 0){ if( e & 1ll){ tmp = tmp * a; } a = a * a; e >>=...
a.cc: In member function 'void MaximumAverageSets::exec()': a.cc:107:25: error: expected ';' before 'if' 107 | if(v[a] != v[i]) break; | ^~
s914040145
p03776
C++
#include <iostream> #include <algorithm> #include <vector> #include <map> using namespace std; using ll = long long; ll arr[60]; ll memo[60][60] = {}; // a C b ll combi(ll a,ll b){ if(!memo[0][0]){ for(int i = 0; i < 60; i++){ for(int j = 0; j < 60; j++){ if(i == 0 || j...
a.cc: In function 'int main()': a.cc:76:12: error: 'fabsl' was not declared in this scope 76 | if(fabsl((double)total/i - Max ) < 0.0000001) | ^~~~~
s338472088
p03776
C++
#include <bits/stdc++.h> using namespace std; #define int long long int n,a,b,v[51]; int C[51][51]; void comb_table(int N){ for(int i=0;i<=n;i++){ for(int j=0;j<=i;j++){ if(j==0 || j==i){ C[i][j]=1LL; }else{ C[i][j]=(C[i-1][j-1]+C[i-1][j]); } } } } signed main(){ cin>>...
a.cc: In function 'int main()': a.cc:44:19: error: expected ';' before '}' token 44 | ans+=C[x][i] | ^ | ; 45 | } | ~
s064550872
p03776
C++
#include <iostream> #include <cstdio> using namespace std; typedef long long ll; int N, A, B; ll v[55]; // 組み合わせテーブル ll C[55][55]; // C[n][k] => nCk void comb_table(int N){ for (int i=0;i<=N;++i) { for (int j=0;j<=i;++j) { if (j==0 or j==i) { C[i][j] = 1; } else { C[i][j] = (C[i-1][...
a.cc: In function 'int main()': a.cc:28:3: error: 'sort' was not declared in this scope; did you mean 'short'? 28 | sort(v, v+N); | ^~~~ | short a.cc:29:3: error: 'reverse' was not declared in this scope 29 | reverse(v, v+N); | ^~~~~~~
s859546680
p03776
C++
#include<bits/stdc++.h> using namespace std; #define ll long long ll n, a, b; vector<ll> v; ll comb(ll n, ll m){ ll ret = 1; for(ll i=1;i<=m;i++) ret = ret * (n-m+i) / i; return ret; } int main(void){ cin >> n >> a >> b; for(int i=0;i<n;i++) {ll tmp; cin >> tmp; v.push_back(-tmp);} sort(v.begin(), v.end()); l...
a.cc: In function 'int main()': a.cc:26:21: error: no matching function for call to 'min(int&, long long int&)' 26 | for(int i=a;i<=min(m,b);i++) ans += comb(m,i); | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bi...
s435939808
p03776
C++
#include <iostream> using namespace std;; using ll=long long; // combination table ll C[51][51]; //C[n][k] -> nCk void comb_table(int N){ for(int i=0;i<=N;++i){ for(int j=0; j<=i; ++j){ if(j==0 or j==i){ C[i][j]=1LL; }else{ C[i][j]=(C[i-1][j-1]+C[i-...
a.cc: In function 'int main()': a.cc:33:5: error: 'sort' was not declared in this scope; did you mean 'short'? 33 | sort(v, v+N); | ^~~~ | short a.cc:34:5: error: 'reverse' was not declared in this scope 34 | reverse(v,v+N); | ^~~~~~~
s581286457
p03776
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<utility> #include<set> #include<stack> #include<queue> #include<deque> #include<cmath> #include<cstdio> #include<cstring> #include<cstdlib> #include<bitset> #include<sstream> #include<list> #include<climits> using namespac...
a.cc: In function 'int main()': a.cc:70:1: error: 'prinf' was not declared in this scope; did you mean 'printf'? 70 | prinf("%.7f\n%lld\n",sum,ret); | ^~~~~ | printf
s828081186
p03776
C++
#include <iostream> using namespace std; using ll=long long; using R=double; // Combination Table ll C[51][51]; // C[n][k] -> nCk void comb_table(int N){ for(int i=0;i<=N;++i){ for(int j=0;j<=i;++j){ if(j==0 or j==i){ C[i][j]=1LL; }else{ C[i][j]=(C[i-1][j-1]+C[i-1][j]); } } } } int main(void){ int N,A,B; cin >> N >...
a.cc: In function 'int main()': a.cc:33:1: error: 'sort' was not declared in this scope; did you mean 'short'? 33 | sort(v,v+N); | ^~~~ | short a.cc:34:1: error: 'reverse' was not declared in this scope 34 | reverse(v,v+N); | ^~~~~~~
s409076079
p03776
C
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<string> #include<cstring> #include<vector> #include<map> #include<list> #include<stack> #include<queue> #include<set> #include<climits> //INT_MIN/MAX using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s840936158
p03776
C++
#include <iostream> #include <cstdlib> #include <cstdio> #include <cmath> #define ll long long #define mod 1000000007 #define pb push_back #define fi first #define se second #define mp make_pair #define pi pair<ll,ll> using namespace std; int main(){ // freopen("in.txt","r",stdin); int N,A,B; long long v[51]; cin >...
a.cc: In function 'int main()': a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 22 | sort(v,v+N,greater<int>()); | ^~~~ | sqrt
s311477574
p03776
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned long long ll; ll fun(int x) { ll ans=1; for(int i=1;i<=x;i++) ans*=i; return ans; } ll fun1(int x,int y) { ll ans=1; for(int i=x;y--;i--) ans*=i; return ans; } ll s[100]; int main() { // cout<<fun1(10,4)+fun1(10,5)<...
a.cc: In function 'int main()': a.cc:74:29: error: expected ';' before 'cout' 74 | printf("%.6lf\n",s[n-1]) | ^ | ; 75 | cout<<ss<<endl; | ~~~~ a.cc:82:29: error: expected ';' before 'cout' 82 | printf...
s207425747
p03776
C++
#include <stdio.h> #include <math.h> int main(void){ int N, A, B, i, j, k, x = 1, y = 0; scanf("%d %d %d", &N, &A, &B); double v[N], S = 0, max_v; for(i = 0; i < N; i++){ scanf("%lf", &v[i]); } for(i = 0; i < N; i++){ max_v = v[i]; for(j = i; j < N; j++){ if(max_v < v[j]){ max_v = v[j]; k =...
a.cc:46:10: error: expected unqualified-id before 'else' 46 | }else{ | ^~~~ a.cc:49:14: error: expected constructor, destructor, or type conversion before '(' token 49 | scanf("%d", &N); | ^ a.cc:51:9: error: expected unqualified-id before 'return' 51 | ...
s435486410
p03776
C++
#include<cstdio> #include<vector> #define intq vector<double> #define intqq vector<int> #define FOR(i, a, b) for((i)=(a);(i)<(b);(i)++) #define N (1e+15) using namespace std; double fac(double n) { double r = 1; double i; for(i=0;i<n;r *= ++i) { } return r; } double com(double n, int k) { double i; dou...
a.cc: In function 'int main()': a.cc:44:3: error: 'sort' was not declared in this scope; did you mean 'short'? 44 | sort(v.begin(), v.end()); | ^~~~ | short
s826644087
p03776
C++
#include <iostream> #include <vector> using ll = long long; using namespace std; ll nChoosek(ll n, ll k ) { if (k > n) return 0; if (k * 2 > n) k = n-k; if (k == 0) return 1; int result = n; for( int i = 2; i <= k; ++i ) { result *= (n-i+1); result /= i; } return result;...
a.cc: In function 'int main()': a.cc:33:3: error: 'sort' was not declared in this scope; did you mean 'short'? 33 | sort(v.begin(), v.end(), greater<ll>()); | ^~~~ | short
s557773356
p03776
C++
using namespace std; int a,b,n,i,j,k,c[51],d[51],e[51]; float avg; long long int cnt; long long int fac(int n) { int i; long long int c = 1; for (i = 1;i <= n;i++) { c *= i; } return c; } int main() { scanf("%d%d%d",&n,&a,&b); for (i = 1;i <= n;i++) { scanf("%d",&c[i]); } sort(c+1,c+n+1); ...
a.cc: In function 'int main()': a.cc:17:9: error: 'scanf' was not declared in this scope 17 | scanf("%d%d%d",&n,&a,&b); | ^~~~~ a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(c+1,c+n+1); | ^~~~ | short a.cc:22:5: error: 'rever...
s420561705
p03776
C++
#include <stdio.h> #include <math.h> int main(void){ int N, A, B, i, j, k, x = 1, y = 0; scanf("%d %d %d", &N, &A, &B); double v[N], S = 0, max_v; for(i = 0; i < N; i++){ scanf("%lf", &v[i]); } for(i = 0; i < N; i++){ max_v = v[i]; for(j = i; j < N; j++){ if(max_v < v[j]){ max_v = v[j]; k =...
a.cc: In function 'int main()': a.cc:35:25: error: expected ')' before '{' token 35 | if(S/A == v[A-1]{ | ~ ^ | ) a.cc:46:9: error: expected primary-expression before '}' token 46 | }else{ | ^ a.cc: At global scope: a.cc:46:10...
s517389834
p03776
C++
#include<iostream> #include<cmath> #include<vector> #include<string> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) typedef long long ll; ll kaizyou(int num){ ll result=1; while(num > 0){ result*=num; num--; } return result; }...
a.cc: In function 'int main()': a.cc:30:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 30 | sort(v.begin(),v.end(),greater<ll>()); | ^~~~ | sqrt
s041486406
p03776
C++
#include<bits/stdc++.h> using namespace std; #define ULL unsigned long long ULL n,m; ULL a,b; ULL sum1,sum2; ULL num[100]; bool cmd(ULL x,ULL y) { return x>y; } map<ULL,ULL>q; ULL C(ULL n,ULL m) { if(n<m) return 0; ULL ans=1; for(int i=0;i<m;i++) ans=ans*(ULL)(n-i)/(ULL)(i+1); return ans; } int main...
a.cc: In function 'int main()': a.cc:37:25: error: no matching function for call to 'max(double)' 37 | printf("%.10f\n",max(((double)sum1*1.0/a*1.0,(double)sum2*1.0/b*1.0)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s307303741
p03776
C++
#include<stdio.h> #include<stdlib.h> #include<math.h> int compare (const void * a, const void * b) { return( *(long long *)b - *(long long *)a); } int main(){ int N; int A; int B; long long v[50]; int i; long double average=0; int ways=1; scanf...
a.cc:31:1: error: extended character   is not valid in an identifier 31 |  b | ^ a.cc:31:1: error: '\U000000a0b' does not name a type 31 |  b | ^~
s995476281
p03776
C++
#include "bits/stdc++.h" #define REP(i,n) for(ll i=0;i<n;++i) #define RREP(i,n) for(ll i=n-1;i>=0;--i) #define FOR(i,m,n) for(ll i=m;i<n;++i) #define RFOR(i,m,n) for(ll i=n-1;i>=m;--i) #define ALL(v) (v).begin(),(v).end() #define PB(a) push_back(a) #define UNIQUE(v) v.erase(unique(ALL(v),v.end())); #define DUMP(v) REP...
a.cc: In function 'int main()': a.cc:60:33: error: expected primary-expression before 'long' 60 | if (abs(long double(sum) / i - ans) < EPS)cnt += p; | ^~~~ a.cc:62:31: error: expected primary-expression before 'long' 62 | ans =...
s665267036
p03776
C++
#include <bits/stdc++.h> #include <cstdio> #include <cmath> #include <cstring> #include <iostream> #include <iomanip> #include <sstream> #include <map> #include <set> #include <array> #include <queue> #include <string> #include <vector> #include <numeric> #include <algorithm> #include <functional> #define MOD 100000000...
a.cc: In function 'int main()': a.cc:66:24: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'LL' {aka '__int128'}) 66 | rep(i, N) { in >> v[i]; } | ^~ ~~~~ | | | ...
s839528261
p03776
C++
#include "bits/stdc++.h" #define REP(i,n) for(ll i=0;i<n;++i) #define RREP(i,n) for(ll i=n-1;i>=0;--i) #define FOR(i,m,n) for(ll i=m;i<n;++i) #define RFOR(i,m,n) for(ll i=n-1;i>=m;--i) #define ALL(v) (v).begin(),(v).end() #define PB(a) push_back(a) #define UNIQUE(v) v.erase(unique(ALL(v),v.end())); #define DUMP(v) REP...
a.cc: In function 'int main()': a.cc:60:33: error: expected primary-expression before 'long' 60 | if (abs(long double(sum) / i - ans) < EPS)cnt += p; | ^~~~ a.cc:62:31: error: expected primary-expression before 'long' 62 | ans =...
s551480799
p03776
C++
#include <cstdio> #include <cmath> #include <cstring> #include <iostream> #include <iomanip> #include <sstream> #include <map> #include <set> #include <array> #include <queue> #include <string> #include <vector> #include <numeric> #include <algorithm> #include <functional> #define MOD 1000000007 #define INF 11234567890...
a.cc: In function 'int main()': a.cc:43:24: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'LL' {aka '__int128'}) 43 | rep(i, N) { in >> v[i]; } | ^~ ~~~~ | | | ...
s430315071
p03776
C++
#include <bits/stdc++.h> using namespace std; using ll = __int128; using ld = long double; const ld eps = 1e-6; ll combi(ll n, ll k) { assert(k >= 0 && k <= n); ll res = 1; for (int i = 1; i <= k; i++) { res = res * (n - k + i) / i; } return res; } int main() { int N, A, B; cin >> N >> A >> B; vector<ll> v(...
a.cc: In function 'int main()': a.cc:22:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<__int128>, __int128>::value_type' {aka '__int128'}) 22 | cin >> v[i]; In file included from /usr/include/c++/14...
s732217164
p03776
Java
import java.util.*; import java.io.*; import java.math.*; public class Main{ static InputReader in = new InputReader(System.in); static PrintWriter out = new PrintWriter(System.out); int n, a, b; long[] v = new long[100]; HashMap<Long, Integer> m = new HashMap<>(); BigInteger fac(int x){ BigI...
Main.java:75: error: cannot find symbol a m = new a(); ^ symbol: class a location: class Main Main.java:75: error: cannot find symbol a m = new a(); ^ symbol: class a location: class Main 2 errors
s152865136
p03776
Java
import java.util.*; import java.io.*; import java.math.*; public class a{ static InputReader in = new InputReader(System.in); static PrintWriter out = new PrintWriter(System.out); int n, a, b; long[] v = new long[100]; HashMap<Long, Integer> m = new HashMap<>(); BigInteger fac(int x){ BigInte...
Main.java:4: error: class a is public, should be declared in a file named a.java public class a{ ^ 1 error
s270618831
p03776
C++
#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include ...
a.cc:50:23: error: non-constant condition for static assertion 50 | static_assert(is_prime(7365373222715531)); | ~~~~~~~~^~~~~~~~~~~~~~~~~~ a.cc:50:23: in 'constexpr' expansion of 'is_prime(7365373222715531)' a.cc:42:9: error: 'constexpr' loop iteration count exceeds limit of 262144 (use '-fcon...
s935702859
p03776
C++
#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include ...
a.cc:50:23: error: non-constant condition for static assertion 50 | static_assert(is_prime(7365373222715531)); | ~~~~~~~~^~~~~~~~~~~~~~~~~~ a.cc:50:23: in 'constexpr' expansion of 'is_prime(7365373222715531)' a.cc:42:9: error: 'constexpr' loop iteration count exceeds limit of 262144 (use '-fcon...
s380410186
p03776
Java
import java.math.BigDecimal; import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int A = sc.nextInt(); int B = sc.nextInt(); long[] w=new long[N]; for(int i=0;i<N;i++){ ...
Main.java:59: error: reached end of file while parsing } ^ 1 error
s216421394
p03776
C++
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
a.cc: In function 'void solve()': a.cc:48:41: error: 'hoge' was not declared in this scope 48 | _P("%.12lf %lld\n",(double)p/q, hoge); | ^~~~ a.cc:6:30: note: in definition of macro '_P' 6 | #define _P(...) (void)printf(__VA_ARGS__) | ...
s514624471
p03776
Java
import java.io.*; import java.util.*; public final class max_avg { static BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); static FastScanner sc=new FastScanner(br); static PrintWriter out=new PrintWriter(System.out); static Random rnd=new Random(); static long[][] dp; static Map<Long...
Main.java:3: error: class max_avg is public, should be declared in a file named max_avg.java public final class max_avg ^ 1 error
s594369436
p03777
C++
#include <iostream> #include <cstdint> #include <cstdio> #include <algorithm> #include <cmath> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <cctype> #include <cassert> #include <climits> #include <string> #include <bitset> #include <cfloat> #include <unorder...
a.cc: In function 'int main()': a.cc:76:12: error: 'n' was not declared in this scope 76 | cin >> n >> m; | ^ a.cc:76:17: error: 'm' was not declared in this scope 76 | cin >> n >> m; | ^
s540742220
p03777
C++
#include <bits/stdc++.h> #include<atcoder/all> using namespace atcoder; #define rep(i,n) for(int i=0;i<n;i++) #define FOR(i,start,end) for(int i=start;i<=end;i++) const int INF = 1001001001; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define Sort(a) sort(a.begin(), a.end()) #define Rort(a) s...
a.cc:2:9: fatal error: atcoder/all: No such file or directory 2 | #include<atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s311018601
p03777
C++
#include <bits/stdc++.h> #include<atcoder/all> using namespace atcoder; #define rep(i,n) for(int i=0;i<n;i++) #define FOR(i,start,end) for(int i=start;i<=end;i++) const int INF = 1001001001; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define Sort(a) sort(a.begin(), a.end()) #define Rort(a) s...
a.cc:2:9: fatal error: atcoder/all: No such file or directory 2 | #include<atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s396902669
p03777
C++
#include <iostream> #include <string> using namespace std; int main() { int a, b; cin >> a >> b; if (a == "H") cout << b << "\n"; else if (b == "H") cout << "D" << "\n"; else cout << "H" << "\n"; }
a.cc: In function 'int main()': a.cc:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if (a == "H") | ~~^~~~~~ a.cc:10:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | else if (b == "H") | ...
s153095418
p03777
C++
#include <iostream> #include <vector> using namespace std; int main(){ char a,b; cin >> a >> b; if(b=="H")cout << a << endl; else if(a=='H')cout << "D" << endl; else cout << "H" << endl; }
a.cc: In function 'int main()': a.cc:8:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(b=="H")cout << a << endl; | ~^~~~~
s510062660
p03777
C
#include <bits/stdc++.h> using namespace std; int main() { char a, b; cin >> a >> b; if (a == 'H') { if (b == 'H') { cout << "H" << endl;; } else { cout << "H" << endl;; } } else { if (b == 'H') { cout << "D" << endl; } else { cout ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s429815236
p03777
C
#include <iostream> using namespace std; int main() { char a, b; cin >> a >> b; if (a == 'H') { if (b == 'H') { cout << "H" << endl;; } else { cout << "H" << endl;; } } else { if (b == 'H') { cout << "D" << endl; } else { cout << "H...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s019367368
p03777
C++
#include <bits/stdc++.h> using namespace std; #define ll long long signed main() { int a,b; cin >> a >> b; cout << (a=='H'&& b=='H' ? 'H': a=='H'&& b=='D' ? 'D' : a=='D'&& b=='H' ? 'D' : 'H') }
a.cc: In function 'int main()': a.cc:10:87: error: expected ';' before '}' token 10 | cout << (a=='H'&& b=='H' ? 'H': a=='H'&& b=='D' ? 'D' : a=='D'&& b=='H' ? 'D' : 'H') | ^ | ...
s238896740
p03777
C++
#include <bits/stdc++.h> #define rep(i,N) for (int i = 0; i < (N); ++i) #define all(v) v.begin(), v.end() using namespace std; using ll = long long; using P = pair<int, int>; int main(void){ int a, b; cin >> a >> b; if (a == 'H' && b =='H'){ cout << 'H' << endl; }else if(a == 'H' && b == 'D'){ cout << ...
a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s097507043
p03777
C++
#include <bits/stdc++.h> using namespace std; //type #define ll long long typedef pair<int, int> P; //定数 #define INF 1000000000000 //10^12:∞ #define MOD 1000000007 //10^9+7:合同式の法 #define MAXR 100000 //10^5:配列の最大のrange //略記 #define PB push_back //挿入 #define MP make_pair //pairのコンストラクタ #define F first //pa...
a.cc:81:12: error: extended character ’ is not valid in an identifier 81 | if (a == ’H ’ && b == 'D') | ^ a.cc:81:15: error: extended character ’ is not valid in an identifier 81 | if (a == ’H ’ && b == 'D') | ^ a.cc: In function 'int main()': a.cc:81:12: error: '\U0000201...
s350168354
p03777
C++
#include <bits/stdc++.h> using namespace std; //type #define ll long long typedef pair<int, int> P; //定数 #define INF 1000000000000 //10^12:∞ #define MOD 1000000007 //10^9+7:合同式の法 #define MAXR 100000 //10^5:配列の最大のrange //略記 #define PB push_back //挿入 #define MP make_pair //pairのコンストラクタ #define F first //pa...
a.cc:79:11: error: extended character ’ is not valid in an identifier 79 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:79:14: error: extended character ’ is not valid in an identifier 79 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:79:24: error: extended charact...
s580739441
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a ,b,c; cin a >> b ; if ( a == 'H'){ c = b; } if ( a == 'D'){ if ( b == 'H'){ c = 'D'; }else c='H'; } cout << c << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'a' 6 | cin a >> b ; | ^~ | ;
s339167407
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a ,b,c; cin a >> b ; if ( a == 'H'){ c = b; } if ( a == 'D'){ if ( b == 'H'){ c = 'D' }else c='H' } cout << c << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'a' 6 | cin a >> b ; | ^~ | ; a.cc:12:12: error: expected ';' before '}' token 12 | c = 'D' | ^ | ; 13 | }else c='H' | ~ a.cc:13:16: error: expected ';' befor...
s271642068
p03777
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { char a,b; cin >> a >> b; if(a=='H'&&b=='H')cout << 'H' <<endl; if(a=='D'&&b=='H')cout << 'D' <<endl; if(a=='D'&&b=='D')cout << 'H' <<endl; if(a=='H'&&b=='D')cout << 'D' <<endl; else }
a.cc: In function 'int main()': a.cc:13:1: error: expected primary-expression before '}' token 13 | } | ^
s000953240
p03777
C++
#include<bits/stdc++.h> using namespace std; int main () { char a, b; cin >> a >> b; cout << (a == b ? 'H' : 'D') << endl: }
a.cc: In function 'int main()': a.cc:6:39: error: expected ';' before ':' token 6 | cout << (a == b ? 'H' : 'D') << endl: | ^ | ;
s904748801
p03777
C++
#include <algorithm> #include <bitset> #include <tuple> #include <cstdint> #include <cstdio> #include <cctype> #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #incl...
a.cc:85:13: error: extended character ’ is not valid in an identifier 85 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:85:16: error: extended character ’ is not valid in an identifier 85 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:85:26: error: extended...
s184032846
p03777
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if(a.equals(b)){ System.out.println("H"); }else{ System.out.println("D"); } } }
Main.java:9: error: int cannot be dereferenced if(a.equals(b)){ ^ 1 error