submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s904468567
p03776
C++
#include <boost/multiprecision/cpp_int.hpp> namespace mp = boost::multiprecision; #include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; using INT = mp::cpp_int; using ll = long long; using vec = vector<ll>; using vect = vector<double>; using Graph = vector<vector<ll>>; #define loop(i, n) for (ll i = 0; i...
a.cc:1:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s921980229
p03776
C++
#include <boost/multiprecision/cpp_int.hpp> namespace mp = boost::multiprecision; #include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; using INT = mp::cpp_int; using ll = long long; using vec = vector<ll>; using vect = vector<double>; using Graph = vector<vector<ll>>; #define loop(i, n) for (ll i = 0; i...
a.cc:1:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s760897696
p03776
C++
#include <boost/multiprecision/cpp_int.hpp> namespace mp = boost::multiprecision; #include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; using INT = mp::cpp_int; using ll = long long; using vec = vector<ll>; using vect = vector<double>; using Graph = vector<vector<ll>>; #define loop(i, n) for (ll i = 0; i...
a.cc:1:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s855447739
p03776
C++
#include <boost/multiprecision/cpp_int.hpp> namespace mp = boost::multiprecision; #include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; using INT = mp::cpp_int; using ll = long long; using vec = vector<ll>; using vect = vector<double>; using Graph = vector<vector<ll>>; #define loop(i, n) for (ll i = 0; i...
a.cc:1:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s433012865
p03776
C++
#include<iostream> #include<algorithm> #include<cmath> #include<map> #include<stdio.h> #include<vector> #include<queue> #include<math.h> #include<deque> using namespace std; #define double long double #define int long long #define rep(s,i,n) for(int i=s;i<n;i++) #define c(n) cout<<n<<endl; #define ic(n) int n;cin>>n; #...
a.cc: In function 'int main()': a.cc:348:36: error: invalid types 'long double [55][long double]' for array subscript 348 | if(v[min(n-1,i)]!=v[a-1]){ | ^ a.cc: In function 'long long int keta(long long int)': a.cc:38:1: warning: control reaches end of non-void...
s904586582
p03776
C++
#include<bits/stdc++.h> using namespace std; typedef long long int ll; ll v[100]; ll KK1(ll n, ll r) { ll C[r+1]; memset(C, 0, sizeof(C)); C[0] = 1; for (ll i = 1; i <= n; i++) { for (ll j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j-1]); } return C[r]; } /* ll KK2(ll n, ...
a.cc: In function 'int main()': a.cc:39:10: error: 'arr' was not declared in this scope 39 | sort(arr,arr+n); | ^~~
s008877377
p03776
C++
#include<bits/stdc++.h> using namespace std; typedef long long int ll; ll v[100]; ll KK1(ll n, ll r) { ll C[r+1]; memset(C, 0, sizeof(C)); C[0] = 1; for (ll i = 1; i <= n; i++) { for (ll j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j-1]); } return C[r]; } /* ll KK2(ll n, ...
a.cc: In function 'int main()': a.cc:39:10: error: 'arr' was not declared in this scope 39 | sort(arr,arr+n); | ^~~
s846158498
p03776
C++
#include<bits/stdc++.h> using namespace std; #define bug printf("bug\n"); #define bug2(var) cout<<#var<<" "<<var<<endl; #define co(q) cout<<q<<endl; #define all(q) (q).begin(),(q).end() typedef long long int ll; typedef unsigned long long int ull; const int MOD = (int)1e9+7; const i...
a.cc: In function 'int main()': a.cc:64:6: error: expected '}' at end of input 64 | } | ^ a.cc:28:5: note: to match this '{' 28 | { | ^
s156372334
p03776
C++
v#include<bits/stdc++.h> using namespace std; int main(){ int n,a,b; cin>>n>>a>>b; long long v[n]; for(int i=0;i<n;i++){ cin>>v[i]; } sort(v,v+n,greater<long long>()); long long m=0; for(int i=0;i<a;i++)m+=v[i]; cout<<m/a<<"."; m%=a; m*=1000000000; cout<<m/a<<endl...
a.cc:1:3: error: stray '#' in program 1 | v#include<bits/stdc++.h> | ^ a.cc:1:1: error: '\U0000ff56' does not name a type 1 | v#include<bits/stdc++.h> | ^~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin>>n>>a>>b; | ^~~ a.cc:10:16: er...
s041553421
p03776
C++
#include <cstdio> #include <queue> using namespace std; long long fact(int x){ if(x==0)return 1ll; return fact(x-1)*x; } long long comb(int x, int y){ long long ret=1ll; for(int i = 1;i <= y;i ++){ ret=ret*(x+1-i)/i; } return ret; } int main(){ int n, a, b; scanf("%d%d%d", &n, &a, &b); vector <long long> v(...
a.cc: In function 'int main()': a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(v.begin(), v.end()); | ^~~~ | short a.cc:29:39: error: 'count' was not declared in this scope 29 | printf("%lld\n", comb(count(v.begin(), v.e...
s919554644
p03776
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; enum { }; unordered_map<ll,ll> f, fs; ll ncr(ll n, ll r) { ll ans = 1; for (ll i = n; i > max(r, n-r); i--) { ans *= i; } for (ll i = 2; i <= min(r, n-r); i++) { ans /= i; } return ans; } int main() { ios::sync_with_stdio(false); cin.tie(0...
a.cc: In function 'int main()': a.cc:44:23: error: 'ld' was not declared in this scope; did you mean 'll'? 44 | cout << sum / ld(cnt) << endl << ans << endl; | ^~ | ll
s814035341
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table long long 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(){ cout << fixed << setprecision...
a.cc: In function 'int main()': a.cc:40:16: error: no matching function for call to 'min(long long int&, int&)' 40 | long long d=min(counter1,B); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s016899921
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table int 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(){ cout << fixed << setprecision(8); i...
a.cc: In lambda function: a.cc:46:19: error: expected '{' before '[' token 46 | answer+=[counter1][j];}} | ^ a.cc: In function 'int main()': a.cc:46:19: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
s615773337
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table long long C[51][51]; // C[n][k] -> nCk void comb_table(long long N){ for(long long i=0;i<=N;++i){ for(long long 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]); }}}} long long main(){ cout ...
cc1plus: error: '::main' must return 'int' a.cc: In lambda function: a.cc:50:19: error: expected '{' before '[' token 50 | answer+=[counter1][j];}} | ^ a.cc: In function 'int main()': a.cc:50:19: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'long long int')
s072556954
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table long long C[51][51]; // C[n][k] -> nCk void comb_table(int K){ for(int i=0;i<=K;++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(){ comb_table(); cout << fixed <...
a.cc: In function 'int main()': a.cc:16:11: error: too few arguments to function 'void comb_table(int)' 16 | comb_table(); | ~~~~~~~~~~^~ a.cc:7:6: note: declared here 7 | void comb_table(int K){ | ^~~~~~~~~~ a.cc: In lambda function: a.cc:50:19: error: expected '{' before '[' token 50 | answ...
s367022847
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table long long C[51][51]; // C[n][k] -> nCk void comb_table(int K){ for(int i=0;i<=K;++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){ cout << fixed << setpreci...
a.cc: In lambda function: a.cc:49:19: error: expected '{' before '[' token 49 | answer+=[counter1][j];}} | ^ a.cc: In function 'int main()': a.cc:49:19: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'long long int')
s636283090
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table long long C[51][51]; // C[n][k] -> nCk void comb_table(int K){ for(int i=0;i<=K;++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){ cout << fixed << setpreci...
a.cc: In lambda function: a.cc:49:19: error: expected '{' before '[' token 49 | answer+=[counter1][j];} | ^ a.cc: In function 'int main()': a.cc:49:19: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'long long int')
s041627056
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table long long C[51][51]; // C[n][k] -> nCk void comb_table(int K){ for(int i=0;i<=K;++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){ cout << fixed << setpreci...
a.cc: In lambda function: a.cc:49:19: error: expected '{' before '[' token 49 | answer+=[counter1][j];} | ^ a.cc: In function 'int main()': a.cc:49:19: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
s494958593
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; // Combination Table long long C[51][51]; // C[n][k] -> nCk void comb_table(int K){ for(int i=0;i<=K;++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){ cout << fixed << setpreci...
a.cc: In lambda function: a.cc:49:19: error: expected '{' before '[' token 49 | answer+=[counter1][i];} | ^ a.cc: In function 'int main()': a.cc:49:20: error: 'i' was not declared in this scope 49 | answer+=[counter1][i];} | ^
s582620446
p03776
C++
#include <numeric> #include <bits/stdc++.h> using namespace std; using ll=long long; 2 using R=double; 3 4 // Combination Table 5 ll C[51][51]; // C[n][k] -> nCk void comb_table(int N){ 8 for(int i=0;i<=N;++i){ 9 for(int j=0;j<=i;++j){ 10 if(j==0 or j==i){ 11 C[i][j]=1LL; 12 }else{ 13 C[i][j]=(C[i-1][j-1]+C[i-1][j]); }...
a.cc:5:1: error: expected unqualified-id before numeric constant 5 | 2 using R=double; | ^ a.cc:6:1: error: expected unqualified-id before numeric constant 6 | 3 | ^ a.cc: In function 'void comb_table(int)': a.cc:10:2: error: expected ';' before 'for' 10 | 8 for(int i=0;i<=N;++i){ | ^~~~ ...
s253602323
p03776
C++
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #define rep(i,n) for(int i=0; i<(int)(n); i++) using namespace std; typedef long long LL; LL comb(LL n, LL k){ LL r=1; for(LL d=1; d<=k; d++){ r*=n; n--; r/=d; } return r; } int main(){ int N, A, B; cin >> N >> A >>...
a.cc: In function 'int main()': a.cc:31:30: error: no matching function for call to 'min(LL&, int&)' 31 | if(n>=A) for(LL k=A; k<=min(n,B); k++) num+=comb(n,k); | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_clas...
s573852590
p03776
C++
/*temp*/ // // // // //#undef _DEBUG //#pragma GCC optimize("Ofast") //不動小数点の計算高速化 //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#include <boost/multiprecision/cpp_int.hpp> #ifdef _DEBUG #include "template.h" #else #if __cplusplus >= 201703L /*Atcoderでしか使えない(c++17 && このテンプレートが使えるならA...
a.cc:17:10: fatal error: boost/sort/pdqsort/pdqsort.hpp: No such file or directory 17 | #include <boost/sort/pdqsort/pdqsort.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s200693035
p03776
C++
/*temp*/ // // // // //#undef _DEBUG //#pragma GCC optimize("Ofast") //不動小数点の計算高速化 //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#include <boost/multiprecision/cpp_int.hpp> #ifdef _DEBUG #include "template.h" #else #if __cplusplus >= 201703L /*Atcoderでしか使えない(c++17 && このテンプレートが使えるならA...
a.cc:17:10: fatal error: boost/sort/pdqsort/pdqsort.hpp: No such file or directory 17 | #include <boost/sort/pdqsort/pdqsort.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s452410166
p03776
C++
/*temp*/ // // // // //#undef _DEBUG //#pragma GCC optimize("Ofast") //不動小数点の計算高速化 //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#include <boost/multiprecision/cpp_int.hpp> #ifdef _DEBUG #include "template.h" #else #if __cplusplus >= 201703L /*Atcoderでしか使えない(c++17 && このテンプレートが使えるならA...
a.cc:17:10: fatal error: boost/sort/pdqsort/pdqsort.hpp: No such file or directory 17 | #include <boost/sort/pdqsort/pdqsort.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s903887574
p03776
Java
import java.util.*; public class Main { public static long gcd(long x,long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static long lcm(long x,long y){ return x*y/gcd(x,y); ...
Main.java:52: error: incompatible types: possible lossy conversion from long to int if(d==in[a-1]){for(int i=b;i<=c;i++){e+=pascal[f][i];}} ^ Main.java:53: error: incompatible types: possible lossy conversion from long to int else{e=pascal[f][g];} ...
s474718564
p03776
Java
import java.util.*; public class Main { public static long gcd(long x,long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static long lcm(long x,long y){ return x*y/gcd(x,y); ...
Main.java:41: error: cannot find symbol for(int i=0;i<h;i++){d+=in[a-i-1]; ^ symbol: variable h location: class Main 1 error
s174091643
p03776
Java
import java.util.*; public class Main { public static long gcd(long x,long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static long lcm(long x,long y){ return x*y/gcd(x,y); ...
Main.java:41: error: cannot find symbol for(int i=0;i<h;i++){d+=in[a-i-1]; ^ symbol: variable h location: class Main Main.java:47: error: cannot find symbol if(d==in[a-1]){for(int i=h;i<=c;i++){k=com2(f,i);e+=k;}} ...
s658535436
p03776
Java
import java.util.*; public class Main { public static long gcd(long x,long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static long lcm(long x,long y){ return x*y/gcd(x,y); ...
Main.java:40: error: illegal start of expression import java.util.*; ^ Main.java:40: error: <identifier> expected import java.util.*; ^ Main.java:40: error: illegal start of expression import java.util.*; ^ Main.java:41: error: illegal s...
s238165320
p03776
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <queue> #include <stack> #include <set> #include <map> #include <iomanip> #include <utility> #include <tuple> #include <functional> #include <bitset> #include <cassert> #include <complex> #include <stdio.h> #include <...
a.cc: In function 'int main()': a.cc:65:28: error: 'i' was not declared in this scope 65 | ll ans = comb[cnt][i]; | ^
s494580908
p03776
Java
import java.util.*; public class Main { public static long gcd(long x,long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static long lcm(long x,long y){ return x*y/gcd(x,y); ...
Main.java:46: error: incompatible types: double cannot be converted to boolean if(d=in[a-1]){for(long i=g;i<=f;i++){e+=com(f,i);}} ^ 1 error
s258897684
p03776
Java
import java.util.*; public class Main { public static Long gcd(Long x,Long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static Long lcm(Long x,Long y){ return x*(y/gcd(x,y)); ...
Main.java:23: error: incompatible types: int cannot be converted to Long if(y==x) return com2(x,0); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s770008253
p03776
C++
#include <iostream> #include <vector> #include <deque> #include <algorithm> #include <numeric> #include <string> #include <cstring> #include <list> #include <unordered_set> #include <tuple> #include <cmath> #include <limits> #include <type_traits> #include <iomanip> #include <unordered_map> #include <queue> #include <s...
a.cc: In instantiation of 'constexpr auto {anonymous}::acc(It, It) [with It = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >]': a.cc:452:16: required from here 452 | lint sum = acc(rg(v, a)); | ~~~^~~~~~~~~~ a.cc:85:61: error: dependent-name 'It::value_typ...
s950107177
p03776
C++
#include<iostream> #include<algorithm> #include<vector> using namepsace std; int factor(int n) { int ret=1; for(int i = n; i > 1; i++) ret *= i; return ret; } int main() { int N,A,B; cin >> N >> A >> B; vector<int> vec = new vector<int>(N); for(int i = 0; i < N; i++) { cin >> vec[i]; } sor...
a.cc:4:7: error: expected nested-name-specifier before 'namepsace' 4 | using namepsace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:14:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 14 | cin >> N >> A >> B; | ^~~ | std::cin In file included from a....
s327204005
p03776
Java
import java.util.*; public class Main { public static Long gcd(Long x,Long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static Long lcm(Long x,Long y){ return x*y/gcd(x,y); ...
Main.java:28: error: incompatible types: double cannot be converted to Long Long e = d-d; ^ 1 error
s246458430
p03776
Java
import java.util.*; public class Main { public static Long gcd(Long x,Long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static Long lcm(Long x,Long y){ return x*y/gcd(x,y); ...
Main.java:25: error: incompatible types: int cannot be converted to Long Long c = sc.nextInt(); ^ Main.java:26: error: incompatible types: int[] cannot be converted to Long[] Long [] in = new int [a]; ^ 2 errors
s955481212
p03776
Java
import java.util.*; public class Main { public static Long gcd(Long x,Long y){ if(x < y) return gcd(y, x); if(y == 0) return x; return gcd(y, x % y); } public static Long lcm(Long x,Long y){ return x*y/gcd(x,y); ...
Main.java:26: error: incompatible types: int[] cannot be converted to Long[] Long [] in = new int [a]; ^ Main.java:28: error: incompatible types: int cannot be converted to Long Long e = a-a; ^ Main.java:39: error: incompatible types: possible lossy conversion from long to int...
s476868881
p03776
C++
#include <bits/stdc++.h> using namespace std; long long comb(long long n, long long r) { long long ret = 1; for (long long i = n; i > n-r; i--) ret *= i; for (long long i = 2; i <= r; i++) ret /= i; return ret; } long long Pow(long long x, long long n) { if (n == 0) return 1; if (n % 2 == 1) r...
a.cc: In function 'int main()': a.cc:36:31: error: no matching function for call to 'min(int&, long long int&)' 36 | ans = Pow(2LL, min(b, c)) - 1; | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/...
s497713868
p03776
C++
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define pi 3.1415926535897932384626433832795028841971693993751058209749445923078164062 const int INF = 1e9; #define ll long long #define pb push_back #define pf push_front #define mp make_pair #define mt make_tuple #define ub upper_bound #define lb l...
a.cc:144:2: error: stray '#' in program 144 | }#include <bits/stdc++.h> | ^ a.cc: In function 'void unite(int, int)': a.cc:58:53: error: reference to 'size' is ambiguous 58 | void unite(int a, int b){a = find(a);b = find(b);if(size[a]<size[b])swap(a,b);size[a] += size[b];root[b] = a;} | ...
s319892237
p03776
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<int,int> #define priq...
a.cc: In function 'int main()': a.cc:47:17: error: expected primary-expression before ',' token 47 | sort(ALL(C),vi,greater<int>()); | ^
s078570313
p03776
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> #include<cmath> #include<map> #include<iomanip> #include<queue> #include<stack> #include<time.h> #define rep(i,n)for(int i=0;i<n;i++) #define int long long #define ggr getchar();getchar();return 0; #define prique priority_queue #define mod 1000000...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::reverse(_BIter, _BIter) [with _BIter = long long int]': a.cc:138:9: required from here 138 | reverse(a, a + n); | ~~~~~~~^~~~~~~~~~ /usr/inc...
s529204901
p03776
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<map> #include<set> #include<cstdio> #include<cmath> #include<deque> #include<numeric> #include<queue> #include<stack> #include<cstring> #include<limits> #include<functional> #include<unordered_set> #include<iomanip> #include<cassert> #inc...
a.cc: In function 'void solve()': a.cc:166:19: error: 'y' was not declared in this scope 166 | for(ll i=a;i<=y+1;++i){ | ^
s525687334
p03776
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<map> #include<set> #include<cstdio> #include<cmath> #include<deque> #include<numeric> #include<queue> #include<stack> #include<cstring> #include<limits> #include<functional> #include<unordered_set> #include<iomanip> #include<cassert> #inc...
a.cc: In function 'void solve()': a.cc:188:17: error: invalid types 'll {aka long long int}[int]' for array subscript 188 | rep(i,a)c*=x[i]; | ^
s687258646
p03776
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<map> #include<set> #include<cstdio> #include<cmath> #include<deque> #include<numeric> #include<queue> #include<stack> #include<cstring> #include<limits> #include<functional> #include<unordered_set> #include<iomanip> #include<cassert> #inc...
a.cc: In function 'void solve()': a.cc:191:40: error: cannot convert 'std::pair<const double, long long int>' to 'll' {aka 'long long int'} 191 | else for(auto e:mp)c+=binomial<ll>(n,e); | ^ | | | ...
s817214184
p03776
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int a,b,n; long long c[51];double d[51]; ll f[51][51]; bool cmp(long long a,long long b) { return a>b; } void fi() { memset(f,0,sizeof(f)); f[0][0]=1; for(int i=1;i<=50;i++) { f[i][0]=1; for(int j=1;j<=i;j++) f[i][j]=f[i-1][j-1]+f[i-1][j]; }...
a.cc: In function 'int main()': a.cc:54:13: error: expected '}' at end of input 54 | return 0; | ^ a.cc:26:1: note: to match this '{' 26 | { | ^
s883656690
p03776
C++
#include <bits/stdc++.h> #include <quadmath.h> #ifdef _DEBUG #define debug(x) cerr << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x << " = " << x << endl #else #define debug(x) #endif #define all(s) begin(s), end(s) #define rall(s) rbegin(s), rend(s) #define rep(i, a, b) for (int i = (a); i < (b); i...
In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/complex: In instantiation of '_Tp std::__complex_abs(const complex<_Tp>&) [with _Tp = __float128]': /usr/include/c++/14/complex:892:56: ...
s033115806
p03776
C++
#include <bits/stdc++.h> #include <quadmath.h> #ifdef _DEBUG #define debug(x) cerr << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x << " = " << x << endl #else #define debug(x) #endif #define all(s) begin(s), end(s) #define rall(s) rbegin(s), rend(s) #define rep(i, a, b) for (int i = (a); i < (b); i...
In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/complex: In instantiation of '_Tp std::__complex_abs(const complex<_Tp>&) [with _Tp = __float128]': /usr/include/c++/14/complex:892:56: ...
s104340783
p03776
C++
#include <bits/stdc++.h> #include <quadmath.h> #ifdef _DEBUG #define debug(x) cerr << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x << " = " << x << endl #else #define debug(x) #endif #define all(s) begin(s), end(s) #define rall(s) rbegin(s), rend(s) #define rep(i, a, b) for (int i = (a); i < (b); i...
a.cc: In function 'int main(int, char**)': a.cc:17:60: error: ambiguous overload for 'operator<<' (operand types are 'std::basic_ostream<char>' and '__float128') 17 | #define putf(a, n) ((cout) << (fixed) << (setprecision(n)) << (a) << (endl)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~...
s322372871
p03776
C++
#include <bits/stdc++.h> #include <quadmath.h> #ifdef _DEBUG #define debug(x) cerr << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x << " = " << x << endl #else #define debug(x) #endif #define all(s) begin(s), end(s) #define rall(s) rbegin(s), rend(s) #define rep(i, a, b) for (int i = (a); i < (b); i...
a.cc: In function 'int main(int, char**)': a.cc:17:60: error: ambiguous overload for 'operator<<' (operand types are 'std::basic_ostream<char>' and '__float128') 17 | #define putf(a, n) ((cout) << (fixed) << (setprecision(n)) << (a) << (endl)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~...
s280370980
p03776
C++
#include <bits/stdc++.h> #ifdef _DEBUG #define debug(x) cerr << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x << " = " << x << endl #else #define debug(x) #endif #define all(s) begin(s), end(s) #define rall(s) rbegin(s), rend(s) #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a,...
a.cc: In function 'int main(int, char**)': a.cc:16:60: error: ambiguous overload for 'operator<<' (operand types are 'std::basic_ostream<char>' and '__float128') 16 | #define putf(a, n) ((cout) << (fixed) << (setprecision(n)) << (a) << (endl)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~...
s981032271
p03776
Java
import java.util.*; public class ABC057D { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int min = in.nextInt(); int max = in.nextInt(); long[] nums = new long[n]; for( int i = 0; i < n; i++ ) nums[i] = in.nextLon...
Main.java:3: error: class ABC057D is public, should be declared in a file named ABC057D.java public class ABC057D { ^ 1 error
s757146336
p03776
C++
from collections import defaultdict import operator as op from functools import reduce def ncr(n, r): r = min(r, n-r) numer = reduce(op.mul, range(n, n-r, -1), 1) denom = reduce(op.mul, range(1, r+1), 1) if n == 0 or n < r: return 0 return numer // denom n, a, b = map(int, input().split()) v = sorted(list(ma...
a.cc:1:1: error: 'from' does not name a type 1 | from collections import defaultdict | ^~~~
s362711537
p03776
C++
#include <iostream> #include <vector> #include <iomanip> #include <algorithm> using namespace std; long long com[51][51]; void combination(int n){ //combination com[0][0] = 1; for (int i = 1; i <=n; ++i) { for (int j = 0; j <= i; ++j) { com[i][j] += com[i-1][j]; if (j > 0) co...
a.cc: In function 'int main()': a.cc:50:20: error: 'c' was not declared in this scope 50 | res += c[num][j]; | ^ a.cc:57:15: error: 'c' was not declared in this scope 57 | res = c[num][ans]; | ^
s408934865
p03776
C++
#include <bits/stdc++.h> using namespace std; int n,a=0,b=0; long long low,high,ans=1000000000,count=0; long long num[n],sum[n+1][n+1]; void calc(){ if(a+b==n){ if(low<=b && b<=high){ bool x=(bool)sum[a][b]/(bool)b; if(x==ans) count++; else { ans=min(ans,x); count=0; } }return;...
a.cc:6:15: error: size of array 'num' is not an integral constant-expression 6 | long long num[n],sum[n+1][n+1]; | ^ a.cc:6:28: error: size of array 'sum' is not an integral constant-expression 6 | long long num[n],sum[n+1][n+1]; | ~^~ a.cc:6:23: error: size o...
s489235421
p03776
C++
#include <bits/stdc++.h> using namespace std; long long n,low,high,ans=1000000000,a=0,b=0,count=0; long long num[n],sum[n+1][n+1]; void calc(){ if(a+b==n){ if(low<=b && b<=high){ bool x=(bool)sum[a][b]/(bool)b; if(x==ans) count++; else { ans=min(ans,x); count=0; } }return; }a...
a.cc:5:15: error: size of array 'num' is not an integral constant-expression 5 | long long num[n],sum[n+1][n+1]; | ^ a.cc:5:28: error: size of array 'sum' is not an integral constant-expression 5 | long long num[n],sum[n+1][n+1]; | ~^~ a.cc:5:23: error: size o...
s788277585
p03776
C++
#include <stdio.h> #include <vector> #include <tuple> #define FOR(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) #define REP(i, n) FOR(i, 0, n) constexpr long double EPS = 1e-10; using lli = long long int; using info = std::pair<lli, lli>; // DP[i][j] = (v, c) := 品物 1, ..., i から j 個選んだ時の価値の総和v, その方法数 c std::vector<st...
a.cc: In function 'int main()': a.cc:38:12: error: 'fabsl' was not declared in this scope 38 | if(fabsl(average - val) <= EPS){ | ^~~~~
s190361830
p03776
C++
#include <stdio.h> #include <vector> #include <tuple> #define FOR(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) #define REP(i, n) FOR(i, 0, n) constexpr long double EPS = 1e-10; using info = std::pair<lli, lli>; // DP[i][j] = (v, c) := 品物 1, ..., i から j 個選んだ時の価値の総和v, その方法数 c std::vector<std::vector<info>> DP; int m...
a.cc:9:24: error: 'lli' was not declared in this scope 9 | using info = std::pair<lli, lli>; | ^~~ a.cc:9:29: error: 'lli' was not declared in this scope 9 | using info = std::pair<lli, lli>; | ^~~ a.cc:9:32: error: template argument 1 is invalid ...
s348347840
p03776
Java
import java.io.PrintWriter; import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int N = Integer.parseInt(sc.next()); int A = Inte...
Main.java:60: error: reached end of file while parsing } ^ 1 error
s004756384
p03776
C++
//#pragma once #include <stdio.h> #include <stdlib.h> #include <string> #include <iostream> #include <queue> #include <algorithm> #include <sstream> #include <vector> #include <math.h> #include <set> #include <map> #include <numeric> #include <bitset> #include <iomanip> #include <cctype> #include <cstdlib> // sran...
a.cc:376:7: error: redefinition of 'class ParseError' 376 | class ParseError {}; | ^~~~~~~~~~ a.cc:32:7: note: previous definition of 'class ParseError' 32 | class ParseError {}; | ^~~~~~~~~~ a.cc:385:7: error: redefinition of 'class UnionFind' 385 | class UnionFind { | ^~~~~~...
s436060966
p03776
C++
#include <bits/stdc++.h> #include <iomanip> using namespace std; #define reps(i,s,n) for(int i = s; i < n; i++) #define rep(i,n) reps(i,0,n) #define fi first #define se second #define mp make_pair typedef long long ll; typedef vector<ll> vec; typedef vector<vec> mat; ll N,M,H,W,K,Q,A,B,L,R; string S, T; const ll MOD =...
a.cc: In function 'int main()': a.cc:87:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 87 | int main() { | ^~ a.cc:87:9: note: remove parentheses to default-initialize a variable 87 | int main() { | ^~ | -- a.cc:87:9: note: or ...
s494263507
p03776
Java
import java.util.*; public class ABC057{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=Integer.parseInt(sc.next()); int a=Integer.parseInt(sc.next()); int b=Integer.parseInt(sc.next()); ArrayList<Long> v=new ArrayList<Long>(); for(i...
Main.java:3: error: class ABC057 is public, should be declared in a file named ABC057.java public class ABC057{ ^ 1 error
s540757271
p03776
C++
#include<bits/stdc++.h> using namespace std; const long long maxn=1e15; long long n,m,d,ans1,ans2=0,cnt1,cnt2; int a[maxn],C[100][100]; bool cmp(long long x,long long y) { return x>y; } void init() { C[0][0]=1; C[1][0]=1; C[1][1]=1; for(int i=1;i<=50;i++) { C[i][0]=1; for(int j=1;j<=i;...
/tmp/cccNL6ua.o: in function `init()': a.cc:(.text+0x1f): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/cccNL6ua.o a.cc:(.text+0x29): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/cccNL6ua.o a.cc:(.text+0x33): relocation tru...
s294686100
p03776
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <utility> #include <cmath> #include <vector> #include <queue> #include <set> #include <map> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; const ll mod = 1000000007; vector<ll> C(60, vector<ll...
a.cc:16:32: error: no matching function for call to 'std::vector<long long int>::vector(int, std::vector<long long int>)' 16 | vector<ll> C(60, vector<ll>(60)); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:7: /usr/include/c++/14/bits/stl_vec...
s577153710
p03776
C++
#include<bits/stdc++.h> using namespace std; #define inf INT_MAX #define INF LLONG_MAX #define ll long long #define ull unsigned long long #define M (int)(1e9+7) #define P pair<int,int> #define PLL pair<ll,ll> #define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++) #define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--) #define...
a.cc: In function 'int main()': a.cc:84:16: error: 'p' was not declared in this scope 84 | ans=c[mp[v[p]]][a-p]; | ^
s722571686
p03776
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <functional> #include <algorithm> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <cfloat> using namespace std; template<class T, class Compare = less<T> > using MaxHeap = prio...
a.cc: In function 'int main()': a.cc:67:41: error: invalid types 'llong {aka long long int}[llong {aka long long int}]' for array subscript 67 | assert(last == -1 || last == a[i]); | ^ a.cc:67:11: error: 'assert' was not declared in this scope 67 | ...
s632615470
p03776
C++
#include<bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } templa...
a.cc:24:17: warning: overflow in conversion from 'long int' to 'int' changes value from '51000000000000000' to '-745832448' [-Woverflow] 24 | const int MAX = 51000000000000000; | ^~~~~~~~~~~~~~~~~ a.cc:26:18: error: narrowing conversion of '-745832448' from 'int' to 'long unsigned int' [-Wnarro...
s022039622
p03776
C++
#include<bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } templa...
a.cc: In function 'int main()': a.cc:60:14: error: expected ';' before 'for' 60 | COMinit() | ^ | ; a.cc:61:9: error: 'i' was not declared in this scope 61 | rep(i,N) { | ^ a.cc:5:43: note: in definition of macro 'rep' 5 | #define rep(i,n) for(ll i=0...
s918540776
p03776
C++
#include<bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } templa...
a.cc: In function 'int main()': a.cc:60:14: error: expected ';' before 'for' 60 | COMinit() | ^ | ; a.cc:61:9: error: 'i' was not declared in this scope 61 | rep(i,N) { | ^ a.cc:5:43: note: in definition of macro 'rep' 5 | #define rep(i,n) for(ll i=0...
s065935128
p03776
C++
#include<bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } templa...
a.cc: In function 'int main()': a.cc:60:14: error: expected ';' before 'for' 60 | COMinit() | ^ | ; a.cc:61:9: error: 'i' was not declared in this scope 61 | rep(i,N) if(v[i] == v[A-1]) ++num; | ^ a.cc:5:43: note: in definition of macro 'rep' 5 | #de...
s038783350
p03776
C++
#include<bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } templa...
a.cc:24:11: error: redefinition of 'const int MOD' 24 | const int MOD = 1000000007; | ^~~ a.cc:13:11: note: 'const int MOD' previously defined here 13 | const int MOD = 1000000007; | ^~~ a.cc: In function 'int main()': a.cc:61:14: error: expected ';' before 'for' 61 | COMini...
s714254230
p03776
C++
#include <bits/stdc++.h> using namespace std; double m[55]; bool cmp(double x,double y) { return x>y; } ll A(ll n,ll m) { ll cnt = 1; if(n < m) return 0; while(m--) { cnt*=n; n--; } return cnt; } ll C(ll n,ll m) { if(n < m) return 0; return A(n,m)/A(m...
a.cc:8:1: error: 'll' does not name a type 8 | ll A(ll n,ll m) | ^~ a.cc:21:1: error: 'll' does not name a type 21 | ll C(ll n,ll m) | ^~ a.cc: In function 'int main()': a.cc:61:20: error: 'C' was not declared in this scope 61 | res += C(cnt1,i); | ^ a.cc:64:15...
s647257482
p03776
C++
#include <stdio.h> #include <math.h> #include <string.h> #include <algorithm> #include <iostream> #include <string> #include <time.h> #include <queue> #include <list> #include <map> #include <set> #include <vector> #include <stack> #include <string.h> #define sf scanf #define pf printf #define lf double #define ll lon...
a.cc: In function 'int main()': a.cc:52:12: error: 'sdl' was not declared in this scope; did you mean 'sld'? 52 | sld(a) sdl(b) | ^~~ | sld a.cc:53:19: error: 'i' was not declared in this scope 53 | for(ll i = 0; i < n; i ++){ | ^
s647631888
p03776
C++
#include<iostream> #include<string> #include<cstdio> #include <cstring> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #i...
a.cc: In function 'int main()': a.cc:87:22: error: 'setprecison' was not declared in this scope 87 | cout << fixed << setprecison(8) << ans << endl; | ^~~~~~~~~~~
s234948761
p03776
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define rep(i,n) for(int i=1;i<=(n);i++) #define rep0(i,n) for(int i=0;i<(n);i++) const ll INF=1e9+7; ll n,a,b,ans,k,l; int te[51]; ll s[51],g; double h; ll C[51][51]; void init() { memset(C,0,sizeof(C)); C[0][0]=1; for(int i=1;i<=50;i++) { C[i]...
a.cc: In function 'int main()': a.cc:54:18: error: no matching function for call to 'min(long long int&, long int)' 54 | int v=min(b,upper_bound(s+1,s+n+1,s[n-b+1])-lower_bound(s+1,s+n+1,s[n-b+1])); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included ...
s059120918
p03776
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <map> #include <cmath> #include <iomanip> using namespace std; #define REP(i,n) for (int i=0;i<(n);++i) #define rep(i,a,b) for(int i=a;i<(b);++i) template<class T> inline bool chmin(T &a, T b){ if(a > b) { a = b; return true;} return f...
a.cc:95:2: error: expected ';' after struct definition 95 | } | ^ | ; a.cc: In constructor 'SegmentTree::SegmentTree(int)': a.cc:73:30: error: 'INT_MAX' was not declared in this scope 73 | data.assign(n*2 - 1, INT_MAX); | ^~~~~~~ a.cc:8:1: note: 'INT_MAX' i...
s471747922
p03776
C++
#include <bits/stdc++.h> using ll = long long; using namespace std; std::vector<std::vector<long long>> comb(ll n, ll r) { std::vector<std::vector<long long>> v(n + 1,std::vector<long long>(n + 1, 0)); for (ll i = 0; i < v.size(); i++) { v[i][0] = 1; v[i][i] = 1; } for (ll j = 1; j < v.size(); j++) { ...
a.cc: In function 'int main()': a.cc:37:6: error: conflicting declaration 'll ans' 37 | ll ans(0); | ^~~ a.cc:31:16: note: previous declaration as 'double ans' 31 | double ans=(double)sum / A; | ^~~
s662269533
p03776
C++
#include <bits/stdc++.h> using ll = long long; using namespace std; std::vector<std::vector<long long>> comb(ll n, ll r) { std::vector<std::vector<long long>> v(n + 1,std::vector<long long>(n + 1, 0)); for (ll i = 0; i < v.size(); i++) { v[i][0] = 1; v[i][i] = 1; } for (ll j = 1; j < v.size(); j++) { ...
a.cc:19:1: error: '::main' must return 'int' 19 | ll main(){ | ^~
s096931369
p03776
C++
#include <iostream> #include <sstream> #include <queue> #include <map> #include <set> #include <vector> #include <numeric> #include <algorithm> #include <string> #include <complex> #include <cassert> #include <cstdlib> #include <cmath> #include <cstdio> #include <cstring> #define REP(i,e) for(int i=0;i<(int)(e);i++...
a.cc: In function 'int main()': a.cc:90:27: error: too few arguments to function 'double error(double, double)' 90 | FOR(c,a,b+1) if (error(average - ave(c)) < eps) { | ~~~~~^~~~~~~~~~~~~~~~~~ a.cc:67:8: note: declared here 67 | double error(double a, double b) { | ^~~~...
s369410927
p03776
C++
#include <algorithm> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <queue> #include <stack> #include <utility> #include <vector> using std::cerr; using std::cin; using std::cout; using std::endl; int64_t GetCombination(int64_t n, int64_t r) { cerr << "\033[93m" << n << " " << r <...
a.cc: In function 'int64_t GetCombination(int64_t, int64_t)': a.cc:20:3: error: 'assert' was not declared in this scope 20 | assert(r >= 0); | ^~~~~~ a.cc:9:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 8 | #include <utility> +++ |+#includ...
s663275429
p03776
C++
#include <iostream> using namespace std; typedef long long ll; ll c[51][51]; ll com(ll n, ll k){ if(k == 0) return 1; if(k == n) return 1; if(k > n) return 0; if(c[n][k]) return c[n][k]; return c[n][k] = com(n - 1, k) + com(n - 1, k - 1); } int main() { int n, a, b; cin >> n >> a >> b; ...
a.cc: In function 'int main()': a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'? 23 | sort(v, v + n, greater<ll>()); | ^~~~ | short
s690251767
p03776
C++
#include<bits/stdc++.h> using namespace std; #define int long long int nCm(int n,int m){ m=min(m,n-m); if( m==0)return 0; else return nCm(n-1,m-1)+nCm(n-1,m); } signed main(){ int n,a,b;cin>>n>>a>>b; vector<int> v(n); for(auto&& w:v)cin>>w; int sm=accumulate(v.begin(),v,begin()+a,0); double avg=(double)sm/a;...
a.cc: In function 'int main()': a.cc:16:44: error: no matching function for call to 'begin()' 16 | int sm=accumulate(v.begin(),v,begin()+a,0); | ~~~~~^~ In file included from /usr/include/c++/14/bits/algorithmfwd.h:39, from /usr/include/c++/14/bits...
s467370472
p03776
C++
#include<cstdio> #include<vector> #include<queue> #include<map> #include<set> #include<unordered_map> #include<stack> #include<string> #include<algorithm> #include<functional> #include<cstring> #include<complex> #include<boost/multiprecision/cpp_int.hpp> using namespace std; using namespace boost::multiprecision; /***...
a.cc:13:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 13 | #include<boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s117632824
p03776
Java
import java.math.BigInteger; import java.util.stream.*; import java.util.*; public class Main { static Scanner scanner = new Scanner(System.in); public static void main(String[]$) { int n = scanner.nextInt(); int a = scanner.nextInt(); int b = scanner.nextInt(); long[] v = Int...
Main.java:41: error: cannot find symbol Util.println(count, min, max); ^ symbol: variable Util location: class Main 1 error
s026369297
p03776
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using ld=long double; using ull=unsigned long long; using uint=unsigned int; using pcc=pair<char,char>; using pii=pair<int,int>; using pll=pair<ll,ll>; using pdd=pair<double,double>; using tuplis=pair<ll,pll>; using tuplis2=pair<pll,ll>; template<class T...
a.cc:58:1: error: 'volatile' can only be specified for objects and functions 58 | volatile struct SETTINGS{SETTINGS(){cout<<fixed<<setprecision(20);};};volatile SETTINGS _SETTINGS(); | ^~~~~~~~
s281028291
p03776
C++
#include<bits/stdc++.h> using namespace std; int N,A,B; vector<long long> v(60); long long dp[60][60]; long long dq[60][60]; int main(){ cin >> N >> A >> B; for(int i=0;i<=N;i++){ for(int j=0;j<=N;j++){dq[i][j]=1;} } dq[0][0]=1; for(int i=0;i<N;i++)cin >> v[i]; for(int i=0;i<N;i++){ for(int j=0;j<...
a.cc: In function 'int main()': a.cc:28:23: error: expected '}' at end of input 28 | cout << ans << endl; | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s850843598
p03776
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rep1(i,n) for(int i=1;i<=(int)(n);++i) #define repo(i,o,n) for(int i=o;i<(int)(n);++i) #define repm(i,n) for(int i=(int)(n)-1;i>=0;--i) #define all(v) (v).begin(),...
a.cc: In function 'int main()': a.cc:46:27: error: expected primary-expression before 'long' 46 | anssum = sum/tmpa(long double); | ^~~~ a.cc:46:38: error: 'tmpa' cannot be used as a function 46 | anssum = sum/tmpa(long double); | ...
s938318586
p03776
C++
#include<bits/stdc++.h> #define ll long long #define met(a, x) memset(a,x,sizeof(a)) #define inf 0x3f3f3f3f #define ull unsigned long long #define mp make_pair using namespace std; const int mod = 998244353; const int N = 3e5 + 10; const int M = 1e6 + 10; ll a[N]; bool cmp(int x, int y) { return x > y; } ll C[3...
a.cc: In function 'int main()': a.cc:42:19: error: expected primary-expression before ';' token 42 | for(int i=;i<l;i++){ | ^
s587958164
p03776
C++
#define int long long int #define MOD(x) ((x % MOD_N) + MOD_N) % MOD_N #define FS first #define SC second #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FORE(i,a,b) for(int i=(a);i<=(b);++i) #define RFOR(i,a,b) for(int i=(b)-1;i>=(a);--i) #define RFORE(i,a,b) for(int i=(b);i>=(a);--i) #define REP(i,n) FOR(i,0,n) #...
a.cc:30:41: error: 'pair' does not name a type 30 | template<typename T,typename U> using P=pair<T,U>; | ^~~~ a.cc:31:30: error: 'vector' does not name a type 31 | template<typename T> using V=vector<T>; | ^~~~~~ a.cc:34:27: error: '...
s444782869
p03776
C++
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+1;++i){ for(int j=0;j<=i;++j){ if(j==0||j==i){ C[i][j]=1; } else{ C[i][j]=C[i-1][j-1]+C[i-1][j]; }...
a.cc: In function 'void comb_table(int)': a.cc:7:19: error: 'n' was not declared in this scope 7 | for(int i=0;i<n+1;++i){ | ^ a.cc: In function 'int main()': a.cc:21:1: error: 'cin' was not declared in this scope 21 | cin>> N>>A>>B; | ^~~ a.cc:28:5: error: 'sort' was not declar...
s741979350
p03776
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cctype> #include<string> #include <map> #include<algorithm> #include <functional> #include<vector> #include<climits> #include<stack> #include<queue> #include <utility> #define rep(i,m,n) for(int i = m;i < n;i++) using namespace std; using ll = long long;...
a.cc: In function 'int main()': a.cc:92:29: error: expected '}' at end of input 92 | cout << ans << endl; | ^ a.cc:38:11: note: to match this '{' 38 | int main(){ | ^
s407157587
p03776
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cctype> #include<string> #include <map> #include<algorithm> #include <functional> #include<vector> #include<climits> #include<stack> #include<queue> #include <utility> #define rep(i,m,n) for(int i = m;i < n;i++) using namespace std; using ll = long long; ...
a.cc: In function 'int main()': a.cc:89:27: error: expected primary-expression before 'long' 89 | long double ans = long double(temp[0]) / long double(temp[1]); | ^~~~
s350321795
p03776
C++
#include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <algorithm> #include <cmath> #include <iomanip> using namespace std; #define REP(i,n) for(ll (i) = (0); (i) < (n); ++i) #define PB push_back #define MP make_pair #define FI first #define SE second #define ALL(v) v.begin(),v...
a.cc:43:1: error: '::main' must return 'int' 43 | ll main() | ^~
s923203109
p03776
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s185632376
p03776
C++
aaa
a.cc:1:1: error: 'aaa' does not name a type 1 | aaa | ^~~
s212334822
p03776
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n,a,b;cin>>n>>a>>b; ll v[n];for(ll i=0;i<n;i++)cin>>v[i]; pair<ll,ll>dp[n+1][n+1]; for(ll i=0;i<=n;i++)for(ll j=0;j<=n;j++)dp[i][j]=make_pair(-1,0); for(ll i=0;i<=n;i++)dp[i][0]=make_pair(0,0); for(ll i=0;i<n;i++){ for(ll ...
a.cc: In function 'int main()': a.cc:36:2: error: expected '}' at end of input 36 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s498857129
p03776
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n,a,b;cin>>n>>a>>b; ll v[n];for(ll i=0;i<n;i++)cin>>v[i]; pair<ll,ll>dp[n+1][n+1]; for(ll i=0;i<=n;i++)for(ll j=0;j<=n;j++)dp[i][j]=make_pair(-1,0); for(ll i=0;i<=n;i++)dp[i][0]=make_pair(0,0); for(ll i=0;i<n;i++){ for(ll ...
a.cc: In function 'int main()': a.cc:26:11: error: no matching function for call to 'max(double&, double [(n + 1)])' 26 | ma=max(ma,num); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s833400717
p03776
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n,a,b;cin>>n>>a>>b; ll v[n];for(ll i=0;i<n;i++)cin>>v[i]; pair<ll,ll>dp[n+1][n+1]; for(ll i=0;i<=n;i++)for(ll j=0;j<=n;j++)dp[i][j]=make_pair(-1,0); for(ll i=0;i<=n;i++)dp[i][0]=make_pair(0,0); for(ll i=0;i<n;i++){ for(ll ...
a.cc: In function 'int main()': a.cc:17:64: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript 17 | if(dp[i+1][j+1].first<f+v[i])dp[i+1][j+1]=make_pair(f+a[i],s); | ^ a.cc:26:11: error: no matching fun...
s930578322
p03776
C++
#include <bits/stdc++.h> using namespace std; #define ll long long; int calc(ll x){ int count = 0; while(x>0){ x/=10; count++; } return count; } int F(ll A,ll B){ return max(calc(A),calc(B)); } int main(){ ll N; cin>>N; int min=1<<29; for(ll i=1;i*i<=N;i++) { if(N%i==0){ min=min(min,...
a.cc:3:21: error: expected ')' before ';' token 3 | #define ll long long; | ^ a.cc:4:10: note: in expansion of macro 'll' 4 | int calc(ll x){ | ^~ a.cc:4:9: note: to match this '(' 4 | int calc(ll x){ | ^ a.cc:4:13: error: 'x' does not name a type 4...
s114048227
p03776
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ ll n,a,b,t=0; cin>>n>>a>>b; vector<ll> c(n); for(int i=0;i<n;i++){ cin>>c[i]; } sort(c.begin(),c.end()); reverse(c.begin(),c.end()); for(int i=0;i<a;i++){ t+=c[i]; } cout<<fixed; cout<<seprecision(8)<<(double)t/(...
a.cc: In function 'int main()': a.cc:17:9: error: 'seprecision' was not declared in this scope 17 | cout<<seprecision(8)<<(double)t/(double)a<<endl; | ^~~~~~~~~~~
s745940727
p03776
C++
def inpl(): return [int(i) for i in input().split()] N, A, B = inpl() V = inpl() V = list(reversed(sorted(V))) x1 = N-1 x2 = 0 for i in range(N): if V[i] == V[A]: x1 = min(x1,i) x2 = max(x2,i) print(sum(V[0:A])/A) from scipy.special import comb ans = 0 if x1 == 0: for l in range(min(B-1,x2)-A+...
a.cc:1:1: error: 'def' does not name a type 1 | def inpl(): return [int(i) for i in input().split()] | ^~~
s400766029
p03776
C++
#include "stdafx.h" #include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i =...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.