submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s866520878
p03699
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main() { int N; cin >> N; vector<int> s(N); for (int i = 0; i < N; ++i) { cin >> s[i]; } sort(s.begin(), s.end()); int ans = accumulate(s.begin(), s.end(), 0); for (int j = 0; j < N; ++j) { ...
a.cc: In function 'int main()': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(s.begin(), s.end()); | ^~~~ | short
s482040441
p03699
C++
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int p[110],n,sum; int main(){ scanf("%d",&n); for(int i = 0 ; i < n ; i++) scanf("%d",p+i),sum+=p[i],p[i] = p[i]%10==0?0:p[i]; sort(p,p+n); if( sum % 10 == 0 ){ for(int j = 0 ; j < n ; j++){ sum-=p[j]; if(sum%10) break; } }el...
a.cc: In function 'int main()': a.cc:11:2: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(p,p+n); | ^~~~ | short
s542999640
p03699
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication32 { class Program { static void Main(string[] args) { int a = int.Parse(Console.ReadLine()); int[] b = new int[a]; int ans; for(int c =0;c<a;c++) b[c]=int.Parse(Con...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s020436153
p03699
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); int n; cin >> n; vector<int> s(n); for(int i = 0; i < n; i++){ cin >> s[i]; } sort(s.begin(),s.end()); long sum = 0; for...
a.cc: In function 'int main()': a.cc:30:12: error: expected ';' before '-' token 30 | for(int n - 1; i >= 0; i--){ | ^~ | ; a.cc:30:18: error: 'i' was not declared in this scope 30 | for(int n - 1; i >= 0; i--){ | ^ a.cc:30:24: error: expected ')' befor...
s229716775
p03699
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); int n; cin >> n; vector<int> s(n); for(int i = 0; i < n; i++){ cin >> s[i]; } sort(s.begin(),s.end()); long sum = 0; for...
a.cc: In function 'int main()': a.cc:30:12: error: expected ';' before '-' token 30 | for(int n - 1; i >= 0; i++){ | ^~ | ; a.cc:30:18: error: 'i' was not declared in this scope 30 | for(int n - 1; i >= 0; i++){ | ^ a.cc:30:24: error: expected ')' befor...
s550112789
p03700
C++
#include<bits/stdc++.h> using namespace std; #pragma region atcoder #include <atcoder/dsu> using namespace atcoder; #pragma endregion #pragma region macros using ll = long long; using vi = vector<int>; using vs = vector<string>; using vl = vector<ll>; using vb = vector<bool>; using vvi = vector<vector<int>>; using vvl ...
a.cc:4:10: fatal error: atcoder/dsu: No such file or directory 4 | #include <atcoder/dsu> | ^~~~~~~~~~~~~ compilation terminated.
s779934305
p03700
C++
#include <iostream> #include <algorithm> #include <iomanip> #include <string> #include <vector> #include <math.h> #include <queue> #include <deque> #include <stack> #include <map> #define PI 3.14159265359 typedef long long ll; const int MOD = 1e9+7; const ll LLINF = 1e18; using namespace std; ll n, a, b; bool is_ok(v...
a.cc: In function 'bool is_ok(std::vector<long long int>&, ll)': a.cc:22:28: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)' 22 | coun += max(0, (h[i] - b*num + a - 1)/a); | ~~~^~~~~~...
s477548815
p03700
C++
#include <bits/stdc++.h> using namespace std; #define int long long using vec_int = vector<int>; using P = pair<int,int>; using T = tuple<int,int,int>; using ll = long long; #define rep(i, n) for(int i = 0; i < (int)(n); i++) int charToInt(char c){ char zero_num = '0'; return (int)c - (int)zero_num; } signed ...
a.cc: In function 'int main()': a.cc:28:9: error: 'kaisuu' was not declared in this scope; did you mean 'kaisuu0'? 28 | kaisuu++; | ^~~~~~ | kaisuu0
s517906645
p03700
C++
#include <iostream> #include <iomanip> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <cstdio> #include <utility> #include <string> #include <cmath> #include <cstdlib> #include <cstring> #include <deque> #include <numeric> using namespace std; typedef u...
a.cc:20:9: error: 'uint64_t' does not name a type 20 | typedef uint64_t u64; | ^~~~~~~~ a.cc:17:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 16 | #include <numeric> +++ |+#include <cstdint> 17 | a.cc:22:9: error: 'uint32_t' does ...
s397324739
p03700
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n, a, b; cin >> n >> a >> b; int hp[n]; int high = 0; for(int i = 0; i < n; ++i) { cin >> hp[i]; if(high < hp[i]) high = hp[i]; } int max_turn = (high + b -1)/b; max_turn++; int addition = a-b; while(max_turn--){ int cnt = 0; for(...
a.cc: In function 'int main()': a.cc:25:7: error: return-statement with no value, in function returning 'int' [-fpermissive] 25 | return; | ^~~~~~
s683623400
p03700
C++
#include <bits/stdc++.h> using namespace std; #define ALL(x) (x).begin(),(x).end() #define COUT(x) cout<<(x)<<"\n" #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define REP(i, n) for(int i=0;i<n;i++) #define YES(x) cout<<(x?"YES":"NO")<<"\n" #define Yes(x) cout<<(x?"Yes":"No")<<"\n" #define dump(x) cout...
a.cc: In function 'bool enough(int, ll, ll)': a.cc:29:6: error: declaration of 'll k' shadows a parameter 29 | ll k = b * mid; | ^ a.cc:28:33: note: 'll k' previously declared here 28 | bool enough(int idx, ll mid, ll k) { | ~~~^
s998793018
p03700
C++
#include <bits/stdc++.h> using namespace std; #define ALL(x) (x).begin(),(x).end() #define COUT(x) cout<<(x)<<"\n" #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define REP(i, n) for(int i=0;i<n;i++) #define YES(x) cout<<(x?"YES":"NO")<<"\n" #define Yes(x) cout<<(x?"Yes":"No")<<"\n" #define dump(x) cout...
a.cc: In function 'int main()': a.cc:48:35: error: 'key' was not declared in this scope; did you mean 'key_t'? 48 | auto it = upper_bound(ALL(h), key); | ^~~ | key_t
s852059234
p03700
C
/* C++ */ #include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll,ll> pint; const int MAX = 510000; const int MOD = 1000000007; #define rep(i, n) for(ll i = ll(0); i < ll(n); i++) #define Rep(i, n) for(ll i = ll(1); i < ll(n); i++) #define ALL(a) (a).begin(),(a).end() #define IOS ios::sy...
main.c:2:9: fatal error: bits/stdc++.h: No such file or directory 2 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s525710903
p03700
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #define pb push_b...
a.cc: In function 'int main()': a.cc:535:13: error: 'r' was not declared in this scope 535 | int e,l=0;r=d[0]/c+1; | ^
s379448464
p03700
C++
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <set> #include <queue> #include <iomanip> using namespace std; using i64 = int64_t; #define rep(i, j, n) for(int i = (j); i < (n); ++i) #define rrep(i, j, n) for(int i = (n) - 1; (j) <= i; --i) constexpr i64 MOD = 1000000007; constexpr i...
a.cc: In lambda function: a.cc:25:40: error: no matching function for call to 'max(long long int, i64)' 25 | rep(i, 0, n) res += max(0LL, ((h[i] - b * x) + a - b - 1) / (a - b)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/in...
s357853012
p03700
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, s) for (int i = 0; i < s; ++i) #define ALL(v) (v).begin(), (v).end() #define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl #define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i) #define DEBUG #define i...
a.cc: In function 'int main()': a.cc:46:30: error: expected ')' before ';' token 46 | x[i]=max(h[i]-b*c; , 0LL); | ~ ^ | ) a.cc:46:32: error: expected primary-expression before ',' token 46 | x[i]=max(h[i]-b*c; , 0LL); ...
s395097420
p03700
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, s) for (int i = 0; i < s; ++i) #define ALL(v) (v).begin(), (v).end() #define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl #define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i) #define DEBUG #define i...
a.cc: In function 'int main()': a.cc:46:30: error: expected ')' before ';' token 46 | x[i]=max(h[i]-b*c; , 0LL) | ~ ^ | ) a.cc:46:32: error: expected primary-expression before ',' token 46 | x[i]=max(h[i]-b*c; , 0LL) ...
s278451665
p03700
C
#include<iostream> #include<vector> #include<algorithm> #include<iterator> #include<cmath> #include<functional> using namespace std; int binsearch(long l, long r, long A, long B, vector<long> h, bool (*ptn)(long, long, long, vector<long>)){ while(r - l > 1){ long m = (l + r) / 2; if(ptn(m, A, B, h)...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s083548822
p03700
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=int(a);i<int(b);i++) typedef long long ll; typedef pair<ll,ll> P; int main(){ ll n,a,b,h[100010]; cin>>n>>a>>b; rep(i,0,n)cin>>h[i]; ll r=1e11,l=0,c=a-b,mid; while(l+1<r){ mid=(r+l)/2; ll cn=0; ...
a.cc:38:5: error: redefinition of 'int main()' 38 | int main(){ | ^~~~ a.cc:8:5: note: 'int main()' previously defined here 8 | int main(){ | ^~~~
s173794636
p03700
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <tuple> #include <queue> #include <deque> #include <map> #include <set> #include <cmath> #include <iomanip> #include <functional> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define REP(i, n) for (int i = 1...
a.cc: In function 'int main()': a.cc:33:29: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type)' 33 | rep(i, N) cnt += max(0LL, (H[i] - 1 + (A - B)) / (A - B)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s511371759
p03700
C++
#include <bits/stdc++.h> #include <boost/range/adaptors.hpp> #include <boost/range/irange.hpp> using namespace std; using namespace boost; using namespace boost::adaptors; int main() { int64_t n, a, b; cin >> n >> a >> b; vector<int64_t> h(n); for (auto&& hh : h) { cin >> hh; } auto...
a.cc:3:10: fatal error: boost/range/adaptors.hpp: No such file or directory 3 | #include <boost/range/adaptors.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s707774461
p03700
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s511471340
p03700
C++
#include<bits/stdc++.h> #define rep(i, n) for (int i=0;i<(n);i++) using namespace std; typedef long long ll; ll INF = 1e18; /*解説AC*/ ll n, a, b; vector<ll>v; bool enough(ll t){ ll tmp = 0; rep(i, n){ /*a-b-1してから割ると良い*/ tmp += max(0, (v[i]-t*b+(a-b)-1)/(a-b)); } if(tmp<=t) return true;...
a.cc: In function 'bool enough(ll)': a.cc:16:19: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)' 16 | tmp += max(0, (v[i]-t*b+(a-b)-1)/(a-b)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ...
s431468198
p03700
C++
// cannot solve
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s159622564
p03700
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:21:10: error: 'X' was not declared in this scope 21 | int func(X){ | ^ a.cc: In function 'int main()': a.cc:34:12: error: 'func' cannot be used as a function 34 | if(func(mid)<=mid) right=mid; | ~~~~^~~~~ a.cc:38:10: error: 'func' cannot be used as a function 38 | if(func...
s290276315
p03700
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int a = scan.nextInt(); int b = scan.nextInt(); int[] h = new int[n]; long s = 0; for (int i = 0; i < n; i++) { h[i] = scan.nextInt(...
Main.java:34: error: cannot find symbol long pi = (h - p_maxp_max * B - 1) / (A - B) + 1; ^ symbol: variable p_maxp_max location: class Main Main.java:36: error: cannot find symbol if (p > p_max){ ^ symbol: variable p_max location: class Main 2 errors
s510144676
p03700
C++
#include <bits/stdc++.h> 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> P; const int INF = 1000000001; ll n,a,b,c; bool bin(vector<ll> h,ll t) { ll at= 0; rep(i,n) { h[i] -= t*b; at += (max(0,h[i])+c-...
a.cc: In function 'bool bin(std::vector<long long int>, ll)': a.cc:16:17: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)' 16 | at += (max(0,h[i])+c-1)/c; | ~~~^~~~~~~~ In file included from /usr/include/...
s765691157
p03700
C++
#include <bits/stdc++.h> 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> P; const int INF = 1000000001; ll n,a,b,c; bool bin(vector<ll> h,ll t) { ll at= 0; rep(i,n) { h[i] -= t*b; at += (max(0,h[i])+c-...
a.cc: In function 'bool bin(std::vector<long long int>, ll)': a.cc:16:17: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)' 16 | at += (max(0,h[i])+c-1)/c; | ~~~^~~~~~~~ In file included from /usr/include/...
s847233190
p03700
C++
clude <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair<int,int> P; int main(){ int n, a, b; cin >> n >> a >> b; vector<int> h(n); rep(i,n) cin >> h[i]; auto ok = [&](ll m) { ll cnt = 0; for (int i = 0;...
a.cc:1:1: error: 'clude' does not name a type 1 | clude <bits/stdc++.h> | ^~~~~ a.cc:6:9: error: 'pair' does not name a type 6 | typedef pair<int,int> P; | ^~~~ a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope 10 | cin >> n >> a >> b; | ^~~ ...
s410684587
p03700
C++
clude <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair<int,int> P; int main(){ int n, a, b; cin >> n >> a >> b; vector<int> h(n); rep(i,n) cin >> h[i]; auto ok = [&](ll m) { ll cnt = 0; for (int i = 0;...
a.cc:1:1: error: 'clude' does not name a type 1 | clude <bits/stdc++.h> | ^~~~~ a.cc:6:9: error: 'pair' does not name a type 6 | typedef pair<int,int> P; | ^~~~ a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope 10 | cin >> n >> a >> b; | ^~~ ...
s109310062
p03700
C++
#pragma GCC optimize ("O3") #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include <prettyprint.hpp> #define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__); #else #define debug(...) 83; #endif void d_err() { cerr << endl; } template <typename H, typename... T> void d_err(H h...
a.cc: In function 'int main()': a.cc:62:24: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type, int)' 62 | ll hr = max(h[i] - m * B, 0); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14...
s760179583
p03700
C++
#include <bits/stdc++.h> using namespace std; const LL INF = 1e12; LL N, A, B; vector<LL> h; bool f(LL K){ LL tmp = 0; for(int i=0; i<N; i++){ LL rem = h[i]-B*K; if(rem > 0) tmp += (rem+(A-B-1)) / (A-B); } return (tmp <= K); } LL binary_search(LL ok, LL ng){ while (abs(ok - ng) > 1) { LL mid = (ok + ng) / 2...
a.cc:4:7: error: 'LL' does not name a type 4 | const LL INF = 1e12; | ^~ a.cc:6:1: error: 'LL' does not name a type 6 | LL N, A, B; | ^~ a.cc:7:8: error: 'LL' was not declared in this scope 7 | vector<LL> h; | ^~ a.cc:7:10: error: template argument 1 is invalid 7 | vector<...
s195570122
p03700
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> using namespace std; typedef long long ll; #define int ll ll n,a,b; bool judge(vector<ll> vec,ll k){ for(int i=0;i<n;i++) vec[i]-=k*b; queue<ll> que; for(int i=0;i<n;i++) if(vec[i]>0) que.push(vec[i]); ll cnt=0; if(que.empty()) return tru...
a.cc: In function 'bool judge(std::vector<long long int>, ll)': a.cc:22:8: error: 'retrun' was not declared in this scope 22 | else retrun false; | ^~~~~~ a.cc:23:1: warning: control reaches end of non-void function [-Wreturn-type] 23 | } | ^
s836886652
p03700
Java
import java.util.Scanner; public class Main { static int n, a, b, h[]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); a = sc.nextInt(); b = sc.nextInt(); h = new int[n]; for(int i=0;i<n;i++)h[i] = sc.nextInt(); sc.close(); int l = 0; int r = (int...
Main.java:40: error: reached end of file while parsing } ^ 1 error
s055180671
p03700
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repr(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define equals(a, b) (fabs((a) - (b)) < EPS) using namespace std; typedef long long ll; c...
a.cc: In function 'int main()': a.cc:25:17: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)' 25 | cnt += max(0, (h[i] - m * b + a - b - 1) / (a - b)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file...
s672096071
p03700
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repr(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define equals(a, b) (fabs((a) - (b)) < EPS) using namespace std; typedef long long ll; c...
a.cc: In function 'int main()': a.cc:25:20: error: no matching function for call to 'max(int, ll)' 25 | int res = max(0, h[i] - m * b); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:5...
s488772997
p03700
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i,a,b) for(ll i=a;i<b;i++) #define rrep(i,a,b) for(ll i=a;i>=b;i--) #define fore(i,a) for(auto &i:a) #define all(x) (x).begin(),(x).end() #define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), en...
a.cc: In function 'int main()': a.cc:43:15: error: expected ';' before '}' token 43 | return (n)} | ^ | ;
s230483075
p03700
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i,a,b) for(ll i=a;i<b;i++) #define rrep(i,a,b) for(ll i=a;i>=b;i--) #define fore(i,a) for(auto &i:a) #define all(x) (x).begin(),(x).end() #define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), en...
a.cc: In function 'int main()': a.cc:43:15: error: expected ';' before '}' token 43 | return (n)} | ^ | ;
s044426580
p03700
Java
import java.util.Scanner; public class mamono { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); long A = scan.nextInt(); long B = scan.nextInt(); long l = 0; long r = 1000000001; long h[] = new long[N];...
Main.java:2: error: class mamono is public, should be declared in a file named mamono.java public class mamono { ^ 1 error
s928961617
p03700
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define fw(p) for(int w=0;w<(p);w++) #define fx(p) for(int x=0;x<(p);x++) #define fy(p) for(int y=0;y<(p);y++) #define fz(p) for(int z=0;z<(p);z++) #define fyg(p,g) for(int y=(g);y<(p);y++) #define fzg(p,g) for(int z=(g);z<(p);z++) #define ce(d) cout<<...
a.cc: In function 'int main()': a.cc:104:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 104 | int main() | ^~ a.cc:104:9: note: remove parentheses to default-initialize a variable 104 | int main() | ^~ | -- a.cc:104:9: note: or r...
s454195424
p03700
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define fw(p) for(int w=0;w<(p);w++) #define fx(p) for(int x=0;x<(p);x++) #define fy(p) for(int y=0;y<(p);y++) #define fz(p) for(int z=0;z<(p);z++) #define fyg(p,g) for(int y=(g);y<(p);y++) #define fzg(p,g) for(int z=(g);z<(p);z++) #define ce(d) cout<<...
a.cc: In function 'int main()': a.cc:104:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 104 | int main() | ^~ a.cc:104:9: note: remove parentheses to default-initialize a variable 104 | int main() | ^~ | -- a.cc:104:9: note: or r...
s765181868
p03700
C++
#include<iostream> #include<algorithm> #include<vector> #include<climits> using namespace std; int a,b; bool check(vector<int>vec,int target,int n); int main(){ int n; vector<int>vec; cin>>n; cin>>a>>b; for(int i;i<n;i++){ int data; cin>>data; vec.push_back(data); } sort(vec.begin(),vec.end...
/usr/bin/ld: /tmp/ccZ6Ynoo.o: in function `main': a.cc:(.text+0xff): undefined reference to `check(std::vector<int, std::allocator<int> >, int, int)' collect2: error: ld returned 1 exit status
s644615465
p03700
C++
#include<iostream> #include<algorithm> #include<vector> #include<climits> using namespace std; int a,b; bool check(vector<int>vec,int target,int n); int main(){ int n; vector<int>vec; cin>>n; cin>>a>>b; for(int i;i<n;i++){ int data; cin>>data; vec.push_back(data); } sort(vec.begin(),vec.end...
/usr/bin/ld: /tmp/ccIepMPF.o: in function `main': a.cc:(.text+0xff): undefined reference to `check(std::vector<int, std::allocator<int> >, int, int)' collect2: error: ld returned 1 exit status
s657759739
p03700
C++
#include<iostream> #include<algorithm> #include<vector> #include<climits> using namespace std; long long int a,b; bool check(vector<long long>vec,int target,int n); int main(){ int n; vector<long long>vec; cin>>n; cin>>a>>b; for(int i;i<n;i++){ int data; cin>>data; vec.push_back(data); } so...
/usr/bin/ld: /tmp/cc5vyBue.o: in function `main': a.cc:(.text+0x108): undefined reference to `check(std::vector<long long, std::allocator<long long> >, int, int)' collect2: error: ld returned 1 exit status
s484441427
p03700
C++
/* vrrtll==???>;::::~~~~~~......`.`````````````````````...-?777!_.._?7u,~~~::::;>>??=lllttrrzu rtll==??>>;::::~~~~......`.`````````````````` ..J77!`````````...`..._T,~~~~:::;;>??==lttrrv tll=??>>;:::~~~~......``````````````````..J7^ ` `` ` `` .,```````...._4,.~~~::;;>>?===lttr l=???>;;::~~~......`````HTSu,.`` `..J7! ...
a.cc: In function 'int main()': a.cc:135:23: error: expected ',' or ';' before 'ng' 135 | ll sa = a - b ng = 0, ok = 1000000000; | ^~ a.cc:136:16: error: 'ok' was not declared in this scope; did you mean 'k'? 136 | while (ok - ng > 1) { | ^~ | ...
s241860987
p03700
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; import java.util.*; public class Main { static int N; static int A; stat...
Main.java:39: error: incompatible types: possible lossy conversion from long to int if (isOK(mid)) right = mid; ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s400910424
p03700
C++
#include <bits/stdc++.h> #define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++) #define S .second using ll=long long; using namespace std; ll h[110000]; int main(){ ll n,a,b,c,sum=0,tmp,ans=1e10; cin>>n>>a>>b; rep(i,0,n){cin>>h[i];sum+=h[i];} c=a-b; sort(h,h+n); ll l=0,r=h[n-1]; while(l<r){ t...
a.cc: In function 'int main()': a.cc:15:17: error: 'ld' was not declared in this scope; did you mean 'l'? 15 | tmp=ceil((ld)l+r)/2; | ^~ | l
s695873400
p03700
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL<<62 #define inf 1000000007 ll h[100010]; int main() { ll n,a,b; cin>>n>>a>>b; for(ll i=0;i<n;i++){ cin>>h[i]; } ll left=1,right=10000,00000,00001; while (right - left > 1) { ll mid = left + (right - left) / 2; // 区間...
a.cc: In function 'int main()': a.cc:14:31: error: expected unqualified-id before numeric constant 14 | ll left=1,right=10000,00000,00001; | ^~~~~
s149126052
p03700
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.lang.Character.Subset; import java.math.BigDecimal; import java.text.DecimalFormat; import java.time.temporal.ValueRange; import j...
Main.java:89: error: incompatible types: int[] cannot be converted to long[] H = new int[N]; ^ Main.java:93: error: incompatible types: possible lossy conversion from long to int max = Math.max(max, H[i]); ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile...
s444859105
p03700
C++
#include<bits/stdc++.h> using namespace std; int main{ int N,A,B; cin>>N>>A>>B; vector<long long> h(N); for(int i=0;i<N;++i)cin>>h[i]; long long l=0,r=1LL<<48; while(l+1!=r){ long long c=(l+r)/2,need=0; for(int i=0;i<N;++i)need+=max(0LL,h[i]-B*c+A-B-1)/(A-B); if(need<=c) r=c; else ...
a.cc:5:5: error: cannot declare '::main' to be a global variable 5 | int main{ | ^~~~ a.cc:6:3: error: expected primary-expression before 'int' 6 | int N,A,B; | ^~~ a.cc:6:3: error: expected '}' before 'int' a.cc:5:9: note: to match this '{' 5 | int main{ | ^ a.cc:7:3: erro...
s828315057
p03700
C++
#include <iostream> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <map> #include <tuple> #include <math.h> #include <deque> #include <stack> using namespace std; typedef long long ll; bool enough(vector<ll> h, ll a, ll b, ll t){ ll dif = a - b; ll need = 0; for(ll i = 0;i...
a.cc: In function 'bool enough(std::vector<long long int>, ll, ll, ll)': a.cc:20:16: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)' 20 | need += max(0, ((h[i] - b * t) / dif))); | ~~~^~~~~~~~~~~~~~~~~~~~~~~...
s113105942
p03700
C++
#include <iostream> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <map> #include <tuple> #include <math.h> #include <deque> #include <stack> using namespace std; typedef long long ll; bool enough(vector<ll> h, ll a, ll b, ll t){ ll dif = a - b; ll need = 0; for(ll i = 0;i...
a.cc: In function 'bool enough(std::vector<long long int>, ll, ll, ll)': a.cc:20:16: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)' 20 | need += max(0, ((h[i] - b * t) / dif)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~...
s558344241
p03700
C++
#include <bits/stdc++.h> using namespace std; #define MP make_pair #define PB push_back #define F first #define S second #define FOR(i, a, b) for(int i = a; i <= (b); i++) #define all(x) x.begin(), x.end() typedef pair<int, int> pi; typedef long long ll; const int INF = 2000000000; vector<int> health; int N, A, B; ...
a.cc: In function 'bool valid(int)': a.cc:28:21: error: no matching function for call to 'max(int, __gnu_cxx::__enable_if<true, double>::__type)' 28 | necessary += max(0, ceil(tmp[i] / (A - B))); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s593112246
p03700
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF (1ll << 60) using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll, ll> p; constexpr int MOD = ...
a.cc: In function 'int binary_search(std::vector<long long int>)': a.cc:57:16: error: too many arguments to function 'bool isOK(ll)' 57 | if(isOK(mid, t)) | ~~~~^~~~~~~~ a.cc:35:6: note: declared here 35 | bool isOK(ll t) { | ^~~~
s212932525
p03700
C++
#include<iostream> #include<climits> #include<vector> using namespace std; bool enough(vector<int> &h, int t, int a, int b){ int need = 0; for(auto hi: h){ if(hi > b * t) { need += (hi - b * t + (a - b - 1)) / (a - b); } } if(need <= t) return true; else return false; return true; } int bin(vector<int> ...
a.cc: In function 'int main()': a.cc:39:24: error: 't' was not declared in this scope 39 | cout << bin(h, t / a - 1, (t + b - 1)/ b, a, b); | ^
s226247236
p03700
C++
#include<iostream> #include<climits> #include<vector> using namespace std; int main(){ int n, a, b, h_tmp; int vector<int> h; int h_max = INT_MIN; int h_max_index; int count = 0; cin >> n >> a >> b; for(int i = 0; i < n; i++){ cin >> h_tmp; h[i] = h_tmp; if(h_tmp > h_max) { h_max = h_tmp; h_max_inde...
a.cc: In function 'int main()': a.cc:8:25: error: invalid declarator before 'h' 8 | int vector<int> h; | ^ a.cc:15:17: error: 'h' was not declared in this scope 15 | h[i] = h_tmp; | ^ a.cc:26:33: error: 'h' was not declared in this scope...
s432352213
p03700
C++
#include <cassert> #include <cstdio> #include <cmath> #include <iostream> #include <sstream> #include <string> #include <vector> #include <map> #include <queue> #include <algorithm> using namespace std; using lint = long long; constexpr int MOD = 1000000007, INF = 1111111111; template <class T> ostream &operator<<(os...
a.cc: In instantiation of 'main()::<lambda(auto:1&)> [with auto:1 = main()::<lambda(int&)>]': a.cc:86:18: required from here 86 | cout << biSearch(judge) << "\n"; | ~~~~~~~~^~~~~~~ a.cc:66:30: error: no match for call to '(main()::<lambda(int&)>) (lint&)' 66 | ...
s865932767
p03700
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:65:13: error: 'que' was not declared in this scope; did you mean 'pque'? 65 | int a = que.top(); que.pop(); | ^~~ | pque
s338816940
p03700
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0,i##_max=(N);i<i##_max;++i) #define repp(i,l,r) for(int i=(l),i##_max=(r);i<i##_max;++i) #define per(i,N) for(int i=(N)-1;i>=0;--i) #define perr(i,l,r) for(int i=r-1,i##_min(l);i>=i##_min;--i) #define all(arr) (arr).begin(), (arr).end() #define S...
a.cc: In function 'int main()': a.cc:49:19: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'std::vector<long long int>') 49 | v = vector<ll>(N); | ^ In file included from /usr/include/c++/14/vector:72, from /usr/include/c++/14/functional:64, ...
s872888595
p03700
C++
#include <iostream> #include <set> #include <map> #include <vector> #include <algorithm> #include <iomanip> #include <climits> #include <numeric> #include <cmath> #include <queue> #include <sstream> #include <string.h> #include <bitset> using namespace std; typedef long long ll; vector<ll> list; ll N, A, B; bool isO...
a.cc: In function 'bool isOK(ll)': a.cc:31:12: error: 'cnt' was not declared in this scope; did you mean 'int'? 31 | num += cnt; | ^~~ | int
s051858631
p03700
C++
int n ,a ,b ,h ,cnt ; priority_queue<int> pq ; int main(){ scanf("%d%d%d",&n,&a,&b) ; a -= b ; while(n--){ scanf("%d",&h); pq.push(h); } while(pq.top() - 1ll*b*cnt>0){ pq.push(pq.top()-a); pq.pop(); ++cnt ; } printf("%d",cnt); return 0 ; }
a.cc:2:1: error: 'priority_queue' does not name a type 2 | priority_queue<int> pq ; | ^~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:4:5: error: 'scanf' was not declared in this scope 4 | scanf("%d%d%d",&n,&a,&b) ; | ^~~~~ a.cc:8:9: error: 'pq' was not declared in this scope 8 | ...
s494524287
p03700
C++
#include<iostream> #include<algorithm> using namespace std; typedef long long ll; int MAX=100010; ll N,A,B; ll h[MAX]; bool enough(ll x){ ll num=0; for(int i=0;i<N;i++){ num+=(h[i]-B*x+(A-B-1))/(A-B); } if(num<=x) return true; else return false; } int main(){ cin >> N >> A >> B; l...
a.cc:8:6: error: size of array 'h' is not an integral constant-expression 8 | ll h[MAX]; | ^~~
s152795342
p03700
C++
#include<iostream> #include<algorithm> using namespace std; typedef long long ll; ll MAX=100010; ll N,A,B; ll h[MAX]; bool enough(ll x){ ll num=0; for(int i=0;i<N;i++){ num+=(h[i]-B*x+(A-B-1))/(A-B); } if(num<=x) return true; else return false; } int main(){ cin >> N >> A >> B; ll...
a.cc:8:6: error: size of array 'h' is not an integral constant-expression 8 | ll h[MAX]; | ^~~
s314676678
p03700
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,b,a; cin >> n >> a >> b; int x = 0; vector<int> h(n); for(int i=0;i<n;i++){ cin >> h.at(i); } sort(a.begin(), a.end()); while(a.at(n-1) > 0){ for(int i=0;i<n-1;i++){ a.at(i) -= b; } a.at(n-1) -= a; sort(a.begi...
a.cc: In function 'int main()': a.cc:12:10: error: request for member 'begin' in 'a', which is of non-class type 'int' 12 | sort(a.begin(), a.end()); | ^~~~~ a.cc:12:21: error: request for member 'end' in 'a', which is of non-class type 'int' 12 | sort(a.begin(), a.end()); | ...
s726857364
p03700
C++
#pragma GCC optimize ("O3") #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <set> #include <algorithm> #include <numeric> #include <list> using namespace std; usin...
a.cc:19:16: error: 'uint64_t' does not name a type 19 | using QWORD = uint64_t; | ^~~~~~~~ a.cc:17:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 16 | #include <list> +++ |+#include <cstdint> 17 | using namespace std; a.cc:2...
s975790549
p03700
C++
#include<bits/stdc++.h> using namespace std; int binary_search(vector<int> &h, long long x){ int ok = (int)h.size(); int ng = - 1; while (abs(ok - ng) > 1){ int mid = (ok + ng) / 2; if (h[mid] > x) ok = mid; else ng = mid; } return ok; } int main(){ long long n, a, b; ...
a.cc: In function 'int main()': a.cc:25:38: error: no matching function for call to 'binary_search(std::vector<long long int>&, long long int)' 25 | long long tmp = binary_search(h, mid * b); | ~~~~~~~~~~~~~^~~~~~~~~~~~ a.cc:4:5: note: candidate: 'int binary_search(std::vector<i...
s149197060
p03700
C++
#include<bits/stdc++.h> #define ll long long #define pii pair<int,int> #define mp make_pair #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(c) c.begin(),c.end() #define pb push_back #define fi first #define se second #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) using namespace std; int n,a,b; l...
a.cc: In function 'bool check(int)': a.cc:18:20: error: no matching function for call to 'max(int, long long int)' 18 | nowans+=max(0,(mon[i]-b*mid+a-1)/a); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-li...
s062980813
p03700
C++
#include "/Users/daikikodama/Desktop/stdc++.h" //#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) #define int long long #define double long double #define mod 1000000007 #define F first #define S second #define P pair<long long,long long> #define all(a) a.begin(),a.end() #define INF 100000000000000000...
a.cc:1:10: fatal error: /Users/daikikodama/Desktop/stdc++.h: No such file or directory 1 | #include "/Users/daikikodama/Desktop/stdc++.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s743498891
p03700
C++
#include "/Users/daikikodama/Desktop/stdc++.h" //#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) #define int long long #define double long double #define mod 1000000007 #define F first #define S second #define P pair<long long,long long> #define all(a) a.begin(),a.end() #define INF 100000000000000000...
a.cc:1:10: fatal error: /Users/daikikodama/Desktop/stdc++.h: No such file or directory 1 | #include "/Users/daikikodama/Desktop/stdc++.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s690536070
p03700
C++
#include<bits/stdc++.h> using namespace std; long n,a,b,h[100000],i,l=1,m,r=1e9,x; main(){ for(cin>>n>>a>>b),a-=b;i<n;)cin>>[h+i++]; while(l<r){ m=(l+r)/2; for(x=i=0;i<n;++i)h[i]>(long)m*b?x+=(h[i]-m*b+a-1)/a:0; x<=m?r=m:l=m+1; } cout<<l; }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:19: error: expected ';' before ')' token 5 | for(cin>>n>>a>>b),a-=b;i<n;)cin>>[h+i++]; | ^ | ; a.cc:5:37: warnin...
s858069497
p03700
C++
#include <bits/stdc++.h> #define int long long #define MOD 1000000007 using namespace std; bool enough(int t,int n,int a,int b,int h[]){ int c = a-b; int sum=0; for(int i=0;i<n;i++){ h[i]=h[i]-b*t; if(h[i]>0){ int count = ceil((float)h[i]/c); sum = sum +count; ...
a.cc: In function 'int main()': a.cc:62:27: error: invalid conversion from 'long long int*' to 'long long int' [-fpermissive] 62 | if(enough(pos,A,B,h)){ | ^ | | | long long int* a.cc:62:18: error: too few argumen...
s572110497
p03700
C++
/* ``.-''!!!!!!!!!!!!!!!!!!!!!!!!!!!''-..` `.'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'.` ...
a.cc: In function 'int main()': a.cc:102:23: error: assignment of function 'std::ios_base& std::right(ios_base&)' 102 | int left = 0; right = 1000000000000000LL; | ~~~~~~^~~~~~~~~~~~~~~~~~~~ a.cc:103:15: warning: pointer to a function used in arithmetic [-Wpointer-arith] 103 | while(right ...
s411158760
p03700
C++
#include <iostream> #include <vector> #include <algorithm> #include <utility> using namespace std; bool enough( long T, int A, int B, vector<int>& h ) { long long numNecessaryAtacks = 0; for( int i = 0; i < h.size(); ++i ) { numNecessaryAtacks += max( 0, (h[i] - B*T + (A-B-1)) / (A - B) ); ...
a.cc: In function 'bool enough(long int, int, int, std::vector<int>&)': a.cc:14:34: error: no matching function for call to 'max(int, long int)' 14 | numNecessaryAtacks += max( 0, (h[i] - B*T + (A-B-1)) / (A - B) ); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file incl...
s785458552
p03700
C++
#include <iostream> #include <cmath> #include <cfenv> using namespace std; #define ll long long int main () { ll n, a, b; cin >> n >> a >> b; ll h[n], sub[n]; ll max = 0; for (ll i = 0; i < n; i++) { cin >> h[i]; max += h[i] / b + 1; sub[i] = h[i]; } ll left = 0; ll right = max + 1; w...
a.cc: In function 'int main()': a.cc:20:29: error: 'mid' was not declared in this scope 20 | double check = (double) mid / 1000000000; | ^~~
s764666299
p03700
C++
#include <iostream> #include <math.h> #include <algorithm> #include <set> #include <map> #include <string> using namespace std; typedef long long ll; #define rep(i,s,n)for(ll i=s;i<n;i++) #define repe(i,s,n)for(ll i=s;i<=n;i++) #define rep_r(i,s,n)for(ll i=n-1;i>=s;i--) #define repe_r(i,s,n)for(ll i=s;i<=n;i++) static ...
a.cc: In function 'int main()': a.cc:58:21: error: 'holocost' was not declared in this scope 58 | if (holocost(m)) { | ^~~~~~~~
s966744427
p03700
C++
\#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; ll n,a,b,h[100001],t; int main(void){ cin>>n>>a>>b; ll l=0, r=(ll)1e9,m,sub,tm; for(int i=0;i<n;i++){ cin>>t; h[i]=t; } while(r-l>1){ m=l+(r-l)/2; tm=m; fo...
a.cc:1:1: error: stray '\' in program 1 | \#include <iostream> | ^ a.cc:1:2: error: stray '#' in program 1 | \#include <iostream> | ^ a.cc:1:3: error: 'include' does not name a type 1 | \#include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, ...
s586069967
p03700
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<utility> #include<numeric> #include<vector> #include<map> #include<unordered_map> #include<set> #include<tuple> #include<stack> #include<queue> #include<functional> #include<iterator> #include<cmath> #include<cctype> using namespace std;...
a.cc: In function 'bool judge()': a.cc:40:1: warning: no return statement in function returning non-void [-Wreturn-type] 40 | } | ^ a.cc: In function 'int main()': a.cc:55:22: error: no matching function for call to 'max(ll&, int&)' 55 | M=max(M,h[i]); | ~~~^~~~~~~~ I...
s320051863
p03700
C++
#include <bits/stdc++.h> using namespace std; long long n, a, b; vector<long long> h; bool solve(long long total) { long long cnt_a = total; long long cnt_b = 0; for (long long i = 0; i < n; i++) { long long rest = h[i] - a * cnt_a - b * cnt_b; if (rest > 0) { return false; } long long cn...
cc1plus: error: '::main' must return 'int'
s317380667
p03700
C++
#include <bits/stdc++.h> using namespace std; int N,i,j,k; int64_t A,B,sm,ans,mx=0; int64_t h[100010]; bool check(int64_t t){ sm = 0; for(i = 0;i < N;i++){ if(h[i] - B*t > 0){ sm += (h[i] - B*t + A - B - 1)/(A - B); } } if(sm <= t){ return false; }else{ return true; } } int64_t Binar...
a.cc: In function 'int64_t BinarySearch(int64_t, int64_t, std::function<bool(long int)>)': a.cc:27:5: error: 'll' was not declared in this scope 27 | ll mid = low+(high-low)/2; | ^~ a.cc:28:14: error: 'mid' was not declared in this scope 28 | if(check(mid)){ | ^~~
s177287921
p03700
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; scanf("%d",&N); int a,b; int score = 0; int scoresum = 0; scanf("%d%d",&a,&b); vector <int> hp(N); for(int i = 0;i<N;i++){ scanf("&d",&hp.at(i)); } sort(hp.begin(),hp.end()); reverse(hp.begin,hp.end()); for(int i = 0;i<N;i++...
a.cc: In function 'int main()': a.cc:15:10: error: no matching function for call to 'reverse(<unresolved overloaded function type>, std::vector<int>::iterator)' 15 | reverse(hp.begin,hp.end()); | ~~~~~~~^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/i...
s280455255
p03700
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<algorithm> #include<vector> #include<limits> #include<numeric> #include<type_traits> #include<math.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define in(x) cin >> x #define out(str) cout << str << endl ...
a.cc:22:27: error: size of array 'temp' is not an integral constant-expression 22 | bool check(int T,int temp[N],int add); | ^
s710787283
p03700
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<algorithm> #include<vector> #include<limits> #include<numeric> #include<type_traits> #include<math.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define in(x) cin >> x #define out(str) cout << str << endl ...
a.cc:22:27: error: size of array 'temp' is not an integral constant-expression 22 | bool check(int T,int temp[N],int add); | ^ a.cc:59:27: error: size of array 'temp' is not an integral constant-expression 59 | bool check(int T,int temp[N],int add){ | ...
s920570951
p03700
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<algorithm> #include<vector> #include<limits> #include<numeric> #include<type_traits> #include<math.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define in(x) cin >> x #define out(str) cout << str << endl ...
a.cc:22:27: error: size of array 'temp' is not an integral constant-expression 22 | bool check(int T,int temp[N],int add){ | ^
s566670769
p03700
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.InputMismatchException; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throw...
Main.java:17: error: cannot find symbol TaskX solver = new TaskX(); ^ symbol: class TaskX location: class Main Main.java:17: error: cannot find symbol TaskX solver = new TaskX(); ^ symbol: class TaskX location: class Main 2 errors
s503874855
p03700
C++
#include <cstdio> #include <algorithm> #include <cmath> #include <cstdlib> #include <cstring>#include <cstdio> #include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <queue> #include <iostream> #include <bitset> using namespace std; #define N 100005 #define ll long long ll a[N],b[N],n,A,B;...
a.cc:5:19: warning: extra tokens at end of #include directive 5 | #include <cstring>#include <cstdio> | ^ a.cc:42:4: error: redefinition of 'long long int a [100005]' 42 | ll a[N],b[N],n,A,B; | ^ a.cc:16:4: note: 'long long int a [100005]' previously declared here 16 | ll a[N]...
s776989217
p03700
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i+...
cc1plus: error: '::main' must return 'int'
s422012382
p03700
Java
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long a = sc.nextLong(); long b = sc.nextLong(); long[] h = new long[n]; for(int i = 0; i < n; i++) h[i] = sc.nextLong(); long l = 0, ...
Main.java:18: error: illegal character: '\u00d7' if(x[i] - b ? mid <= 0) continue; ^ Main.java:18: error: not a statement if(x[i] - b ? mid <= 0) continue; ^ Main.java:18: error: ';' expected if(x[i] - b ? mid <= 0) continue; ^ 3 errors
s616183406
p03700
C++
#include <iostream> #include <vector> #include <algorithm> #define all(v) (v).begin(), (v).end() using namespace std; int ceil(int numerator, int denominator) { return (numerator/denominator + (numerator%denominator != 0)); } int possible(vector <int> H, long long A, long long B, long long explosions) { for(int i ...
a.cc: In function 'int possible(std::vector<int>, long long int, long long int, long long int)': a.cc:23:42: error: invalid types 'long long int[int]' for array subscript 23 | explosions_used += ceil(A[i], A - B); | ^
s338181965
p03700
C++
#include<iostream> #include<queue> #include<vector> #include<cmath> using namespace std; using ll = long long; bool isenough(int t, int A, int B, vector<int>& v) { ll sm = 0; for(int i = 0; i < v.size(); i++) { sm += ceil((double)(v[i] - B * t) / (A - B)); } if(sm > t) return false; else r...
a.cc: In function 'int main()': a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 23 | sort(hs.begin(), hs.end()); | ^~~~ | sqrt
s076102902
p03700
C++
#include <iostream> #include <algorithm> #include <functional> #include<vector> #include<math.h> #include<bitset> #include<string> #include <deque> #include<queue> #include<map> using namespace std; int main() { long long int N,A,B; cin >> N>>A>>B; long long int H[100008]; for (int i = 0; i < N; i++) { cin >> ...
a.cc: In function 'int main()': a.cc:23:14: error: expected primary-expression before ')' token 23 | for () { | ^ a.cc:29:9: error: expected primary-expression before 'return' 29 | return 0; | ^~~~~~ a.cc:28:10: error: expected ';' before 'return' 28 | }...
s394353715
p03700
C++
n , a, b = map(int,input().split()) teki = [] ans = 0 for i in range(n): teki.append(int(input())) q = a- b ss = max(teki) m =0 for i in range(n): u = teki[i] // b + 1 if m <= u: m = u for i in range(n): teki[i] = teki[i] - b * (m) if teki[i] <= 0: teki[i] == 0 ans += m while 0...
a.cc:25:3: warning: missing terminating " character 25 | """ | ^ a.cc:25:3: error: missing terminating " character a.cc:41:3: warning: missing terminating " character 41 | """ | ^ a.cc:41:3: error: missing terminating " character a.cc:1:1: error: 'n' does not name a type 1 | n , a, b = map(int...
s138565341
p03700
C++
#include <iostream> #include <functional> #include <vector> #include <iostream> #include <queue> using namespace std; bool cleared(vector<int> &v, int k, int a, int b){ int rest = k; int d = a-b; for (auto it=v.begin();it != v.end();it++) { rest -= (*it - k*b)/d; if ((*it - k*b)%d != 0) { rest--; ...
a.cc: In function 'int main()': a.cc:43:3: error: 'sort' was not declared in this scope; did you mean 'short'? 43 | sort(v.begin(), v.end(), cmp); | ^~~~ | short
s839414794
p03700
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <cmath> #include <cstdlib> #include <tuple> using ll = long long; using namespace std; #define modmod 1000000007 int N; ll h[100006]; ll A,B; bool enough(ll t){ ll sum = 0; for(int i = 0; i < N; i++){ if(h[i]-(B*t)...
a.cc: In function 'int main()': a.cc:51:22: error: 'mid' was not declared in this scope 51 | cout << right << mid; | ^~~
s797072989
p03700
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; int h[100009]; int main(){ int n; long long int a,b; cin>>n>>a>>b; for(int i=0;i<n;i++){ cin>>h[i]; } long long int sa=a-b; long long int mi=0,ma=1000000000,mid; while(ma-mi>1){ mid=(mi+ma)/2; long long int cnt=0...
a.cc: In function 'int main()': a.cc:21:38: error: expected primary-expression before ',' token 21 | cnt+=,(h[i] - b * mid + a - b - 1) / (a-b); | ^
s646625858
p03700
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 ll lo...
a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll __int64 | ^~~~~~~ a.cc:21:1: note: in expansion of macro 'll' 21 | ll t[1100000]; | ^~ a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll __int64 |...
s929062044
p03700
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 ll lo...
a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll __int64 | ^~~~~~~ a.cc:21:1: note: in expansion of macro 'll' 21 | ll t[1100000]; | ^~ a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll __int64 |...
s633622110
p03700
Java
import java.util.Arrays; import java.util.Iterator; import java.util.PrimitiveIterator; import java.util.Scanner; import java.util.function.BinaryOperator; import java.util.function.IntFunction; import java.util.stream.IntStream; import java.util.stream.Stream; class Main{ private void solve(){ int n=gInt(),a=gInt...
Main.java:132: error: class, interface, enum, or record expected }/ ^ 1 error
s518523929
p03700
C++
#include <iostream> #include <cctype> #include <algorithm> #include <vector> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <string> #include <cctype> #include <cstring> #include <cstdio> #include <cstdlib> #include <cmath> const int INF = 100000000, mod = 1000000007; using ...
a.cc: In function 'bool check(long long int)': a.cc:25:9: error: 'res' was not declared in this scope 25 | res += max(0LL, (tmp + damage - 1) / damage); | ^~~
s767628890
p03700
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; bool tobo(ll mid){ ll temp[N]; ll po = 0; for(ll i = 0; i < N; ++i){ ll yo = h[i] - mid * B; if(yo > 0) po += yo / (A - B) + (yo % (A - B) > 0); } if(yo > mid) return 0; else return 1; } int main(){ ll N ,A, B; cin >> N >> A >> B; ll h[N];...
a.cc: In function 'bool tobo(ll)': a.cc:6:17: error: 'N' was not declared in this scope 6 | ll temp[N]; | ^ a.cc:9:25: error: 'h' was not declared in this scope 9 | ll yo = h[i] - mid * B; | ^ a.cc:9:38: error: 'B' was not declared in t...
s426055054
p03700
C++
#include<cstdio> int n,a,b,h[100000],i,l,m,r; long long x; main(){ for(cin>>n>>a>>b),a-=b;i<n;l=1,r=1e9) cout<<h+i++; while(l<r){ m=(l+r)/2; for(x=i=0;i<n;++i)h[i]>(long long)m*b?x+=(h[i]-m*b+a-1)/a:0; x<=m?r=m:l=m+1; } cout<<l<<endl; }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:7: error: 'cin' was not declared in this scope 5 | for(cin>>n>>a>>b),a-=b;i<n;l=1,r=1e9) cout<<h+i++; | ^~~ a.cc:5:41: error: 'cout' was not declare...