submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s818229859
p03715
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <string> #include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <sstream> #include <algorithm> using namespace std; #define pb push_back #define mp make_pair #define ms(a, b) memset...
a.cc: In function 'void solve()': a.cc:80:22: error: no matching function for call to 'min(LL&, int)' 80 | ans = min(ans, Max-Min); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s745779964
p03715
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <string> #include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <sstream> #include <algorithm> using namespace std; #define pb push_back #define mp make_pair #define ms(a, b) memset...
a.cc: In function 'void solve()': a.cc:53:22: error: no matching function for call to 'min(LL&, int)' 53 | ans = min(ans, Max-Min); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s981777881
p03715
C++
#include<bits/stdc++.h> #define LL long long const LL INF=1e20; LL sum[4] LL t[3]; using namespace std; LL n,m; int main() { scanf("%lld%lld",&n,&m); if(n%3==0||m%3==0) { printf("0"); } sum[0]=(LL)0; sum[1]=(LL)0; sum[2]=INF; sum[3]=INF; else { LL x=m/2; LL y=m-m/2; LL a=n/2; LL b=n-n/2; sum[0]=n*...
a.cc:3:14: warning: overflow in conversion from 'double' to 'long long int' changes value from '1.0e+20' to '9223372036854775807' [-Woverflow] 3 | const LL INF=1e20; | ^~~~ a.cc:2:12: error: expected initializer before 'long' 2 | #define LL long long | ^~~~ a.cc:5:1: note: in...
s979911117
p03715
C
#include<stdio.h> int MIN(int a,int b){return a<b?a:b;} int MAX(int a,int b){return a<b?b:a;} int f(int a,int b,int c){ return MAX(a,MAX(b,c))-MIN(a,MIN(b,c)); } int main(){ int a,b,c,d,e,g,min; scanf("%d %d",&a,&b); if(a%3==0||b%3==0){ print("0\n"); return 0; } c=a/3; d=b/3; e=a/2; g=b/2; m...
main.c: In function 'main': main.c:11:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 11 | print("0\n"); | ^~~~~ | printf
s262464793
p03715
C++
#include <bits//stdc++.h> using namespace std; typedef long long ll; int main() { ll ans=9999999999999999,h,w; cin>>h>>w; if(h%3==0||w%3==0){ ans=0; } if(w%3==1){ ll a=(w-1)/3; if(a>0&&w-a>0) ans=min(ans,max(0,max(0,abs(max(h*a,(w-a)*(ll)ceil(h/2.0))-min(h*a,(w-a)*(ll)floor((h/2.0))))))); a=(w+2)/3; i...
a.cc: In function 'int main()': a.cc:13:46: error: no matching function for call to 'max(int, long long int)' 13 | ans=min(ans,max(0,max(0,abs(max(h*a,(w-a)*(ll)ceil(h/2.0))-min(h*a,(w-a)*(ll)floor((h/2.0))))))); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~...
s638566178
p03715
C
#include<stdio.h> int MIN(int a,int b){return a<b?a:b;} int MAX(int a,int b){return a<b?b:a;} int f(int a,int b,int c){ return MAX(a,MAX(b,c))-MIN(a,MIN(b,c)); } int main(){ int a,b,c,d,e,g; scanf("%d %d",&a,&b); if(a%3==0||b%3==0){ print("0\n"); return 0; } c=a/3; d=b/3; e=a/2; g=b/2; min=1...
main.c: In function 'main': main.c:11:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 11 | print("0\n"); | ^~~~~ | printf main.c:18:3: error: 'min' undeclared (first use in this function); did you mean 'main'? 18 | min=1e9; ...
s355456762
p03715
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int h0,w0,ANS[1000000],h,w; int ans(int r){ int s[3]; s[0]=h*r; w-=r; if(h>w){int t=w;w=h;h=t;} if(h%2==0||w%2==0){ s[1]=w*h/2; s[2]=w*h/2; }else{ s[1]=h*(w/2); s[2]=h*w...
a.cc: In function 'int main()': a.cc:26:5: error: 'else' without a previous 'if' 26 | else{ | ^~~~
s106601797
p03715
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <string> #include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <sstream> #include <algorithm> using namespace std; #define pb push_back #define mp make_pair #define ms(a, b) memset...
a.cc: In function 'void solve()': a.cc:49:13: error: 's5' was not declared in this scope; did you mean 's4'? 49 | s5 = ((H-i)/2) * W; | ^~ | s4 a.cc:50:13: error: 's6' was not declared in this scope; did you mean 's4'? 50 | s6 = s2 - s5; | ...
s298778201
p03715
C++
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { int h, w; cin >> h >> w; int s = 0; if (h % 3 && w % 3) { s = min(h, w); int i = h / 2; for (int j = w / 3 - 1; j <= w / 3 + 2; j++) { int a[] = {h * j, i * (w - j), (h - i) * (w - j)}; sort(a, a + 3); s = mi...
a.cc: In function 'int main()': a.cc:23:21: error: redeclaration of 'int i' 23 | int i = h / 2; | ^ a.cc:12:21: note: 'int i' previously declared here 12 | int i = h / 2; | ^
s731079109
p03715
C++
#include <iostream> #include <queue> #include <map> #include <list> #include <vector> #include <string> #include <stack> #include <limits> #include <climits> #include <cassert> #include <fstream> #include <cstring> #include <cmath> #include <bitset> #include <iomanip> #include <algorithm> #include <functional> #include...
a.cc: In function 'long long int f(long long int, long long int)': a.cc:119:13: error: expected primary-expression before 'long' 119 | #define int long long | ^~~~ a.cc:135:30: note: in expansion of macro 'int' 135 | res = min(abs(H*(w - int(ceil(x))) - int(ceil(x))*h), res); | ...
s742027569
p03715
C++
#include <iostream> #include <queue> #include <map> #include <list> #include <vector> #include <string> #include <stack> #include <limits> #include <climits> #include <cassert> #include <fstream> #include <cstring> #include <cmath> #include <bitset> #include <iomanip> #include <algorithm> #include <functional> #include...
a.cc: In function 'long long int f(long long int, long long int)': a.cc:45:12: error: expected primary-expression before 'long' 45 | #define ll long long | ^~~~ a.cc:119:13: note: in expansion of macro 'll' 119 | #define int ll | ^~ a.cc:135:30: note: in expansion of macro 'int' ...
s640032982
p03715
C++
#include<iostream> #include<algorithm> #include <stdlib> using namespace std; const int MAX = 2147483647; int main() { int H, W, ans = MAX, area1, area2, area3; cin >> H >> W; for (int i = 1;i < (H+H%2)/2;i ++) { ans = min(abs((H-3*i)*W), ans); area1 = i*W; area2 = (H-i)*(W+W%2)/2; area3 = H*W-area1-area2; ...
a.cc:3:10: fatal error: stdlib: No such file or directory 3 | #include <stdlib> | ^~~~~~~~ compilation terminated.
s209954949
p03715
C++
for (int i=0; i<=h; i++) { long long s1=i*w; long long s2=0; long long s3=0; long long last=h-i; long long now=0; if (last % 2==0) s2=(last/2)*w,now=max(now,(long long)abs(s1-s2)); else if (w % 2==0) s2=(w / 2)*last,now=max(now,(long long)abs(s1-s2)); else { if (last < w) s2=(w/2)*last,s3=(w/2+1)*las...
a.cc:1:1: error: expected unqualified-id before 'for' 1 | for (int i=0; i<=h; i++) { | ^~~ a.cc:1:15: error: 'i' does not name a type 1 | for (int i=0; i<=h; i++) { | ^ a.cc:1:21: error: 'i' does not name a type 1 | for (int i=0; i<=h; i++) { | ^
s779021221
p03715
C++
using namespace std; #define ff first #define ss second #define pb push_back #define pf push_front #define mp make_pair #define popb pop_back #define popf pop_front #define all(v) v.begin(), v.end() #define fori(i, j, k) for (int i = (j); i < (int)(k); i++) #define forb(i, j, k) for (int i = (j); i >= (int)k; i--) #d...
a.cc:22:9: error: 'pair' does not name a type 22 | typedef pair<int, int> pii; | ^~~~ a.cc:23:9: error: 'pair' does not name a type 23 | typedef pair<int, ll> pil; | ^~~~ a.cc:24:9: error: 'pair' does not name a type 24 | typedef pair<ll, int> pli; | ^~~~ a.cc:25:9: er...
s106188761
p03715
C++
using namespace std; #define ff first #define ss second #define pb push_back #define pf push_front #define mp make_pair #define popb pop_back #define popf pop_front #define all(v) v.begin(), v.end() #define fori(i, j, k) for (int i = (j); i < (int)(k); i++) #define forb(i, j, k) for (int i = (j); i >= (int)k; i--) #d...
a.cc:22:9: error: 'pair' does not name a type 22 | typedef pair<int, int> pii; | ^~~~ a.cc:23:9: error: 'pair' does not name a type 23 | typedef pair<int, ll> pil; | ^~~~ a.cc:24:9: error: 'pair' does not name a type 24 | typedef pair<ll, int> pli; | ^~~~ a.cc:25:9: er...
s751569375
p03715
C++
#include<stdio.h> #include<string.h> #include<iostream> #include<string> #include<algorithm> #include<vector> #include<map> #include<unordered_set> #include<unordered_map> #include<math.h> #include<queue> #include<functional> #define int long long using namespace std; signed main() { int a, b; cin >> a >> b; int ans...
a.cc: In function 'int main()': a.cc:18:19: error: 'LLONG_MAX' was not declared in this scope 18 | int ans = LLONG_MAX; | ^~~~~~~~~ a.cc:13:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 12 | #include<functional> +++...
s851339427
p03715
C++
#include <algorithm> #include <cstdio> #include <cstring> #include <cmath> #include <cstdint> #include <cstdlib> #include <string> #include <vector> #include <map> #include <set> #include <queue> #include <numeric> using namespace std; int main() { long long h, w; scanf("%lld%lld", &h, &w); long long ans = LLON...
a.cc: In function 'int main()': a.cc:19:19: error: 'LLONG_MAX' was not declared in this scope 19 | long long ans = LLONG_MAX; | ^~~~~~~~~ a.cc:13:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 12 | #include <numeric> +++ |...
s217381192
p03716
C++
#include <bits/stdc++.h> using namespace std; int main() {long long ans=-100000000000000; long long n,cnt=0,sum=0;cin>>n; vector<int>vec(3*n); for(int i=0;i<3*n;i++){ cin>>vec[i]; } for(int i=n-1;i<=2*n-1;i++) { long long sum1=0; long long sum2 =0; vector<int> v1=ve...
a.cc: In function 'int main()': a.cc:18:22: error: no matching function for call to 'accumulate(__gnu_cxx::__normal_iterator<int*, std::vector<int> >, __gnu_cxx::__normal_iterator<int*, std::vector<int> >)' 18 | sum1=accumulate(v1.begin()+(i-(n-1)),v1.begin()+i); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~...
s665589191
p03716
C++
#include <bits/stdc++.h> using namespace std; long long arr[100010],N,totalkiri=0,totalkanan=0,tmp; priority_queue<long long,vector<long long>,greater<long long>> kiri; priority_queue<long long> kanan; void Input(){ cin>>N; for(long long i=0; i<N; i++){ cin>>tmp; kiri.push(tmp); totalkiri+=tmp; } for(long lon...
cc1plus: error: '::main' must return 'int'
s509026782
p03716
C++
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define DEBUG #ifdef ...
In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:5: /usr/include/c++/14/bits/allocator.h: In destructor 'std::_Rb_tree<long long int, long long int, std::_Iden...
s159351500
p03716
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; typedef pair<int, int> P; ll Mod = 1000000007; int main() { int N; cin >> N; ll a[3*N]; for (int i = 0; i < 3*N; i++) { cin >> a[i]; } priority_queue<ll, vector<ll>, greater<ll>> Q1; priority_queue<ll, vector<ll>, less<ll>> Q2; ll R...
a.cc: In function 'int main()': a.cc:26:12: error: no matching function for call to 'max(int, ll&)' 26 | c = max(0,c); | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/i...
s441249558
p03716
C++
#include <bits/stdc++.h> #include<iostream> #include<vector> #include<queue> using namespace std; #define ll long long ll n, a[400000],pref[400000],suf[400000]; signed main(){ scanf("%lld",&n); n*=3; for(int i=0;i<n;i++)scanf("%lld",&a[i]); ll sum=0; priority_queue <ll,vector <ll>,greater <ll>> que; for(int i=0;...
a.cc: In function 'int main()': a.cc:28:22: error: 'A' was not declared in this scope 28 | sum+=A[i]; | ^
s691084506
p03716
C++
#include <bits/stdc++.h> #include<iostream> #include<vector> #include<queue> using namespace std; #define ll long long ll n, a[400000],pref[400000],suf[400000]; signed main(){ scanf("%lld",&n); n*=3; for(int i=0;i<n;i++)scanf("%lld",&a[i]); ll sum=0; priority_queue <ll,vector <ll>,greater <ll>> que; for(int i=0;...
a.cc: In function 'int main()': a.cc:27:27: error: 'A' was not declared in this scope 27 | que2.push(A[i]); | ^ a.cc:34:26: error: 'dp' was not declared in this scope; did you mean 'dup'? 34 | if(i>=1) dp[i-1]-=sum; | ^...
s323349374
p03716
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned long long int ll; int main() {ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); ll n; cin>>n; ll z1=0,z2=0; ll a[n+1],b[n+1]; priority_queue <ll> l2; priority_queue <ll, vector<ll>, greater<ll> > l1; vector<ll> v; for(ll ...
a.cc: In function 'int main()': a.cc:61:13: error: no matching function for call to 'max(long long int&, ll)' 61 | {ans=max(ans,a[i]-b[i]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s707520467
p03716
C++
#include<bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll n; cin>>n; vector<pair<ll,ll> > b; vector<ll> c; for(int i=0;i<n*3;i++) {ll x; cin>>x; if(i<2*n) { b.push_back(make_pair(x,i); } c.push_back(x); } sort(...
a.cc: In function 'int main()': a.cc:15:39: error: expected ')' before ';' token 15 | b.push_back(make_pair(x,i); | ~ ^ | )
s160065142
p03716
C++
#include<bits/stdc++.h> #include<queue> using namespace std; int main () { int N; cin >> N; priority_queue<long long, vector<long long>, greater<long long>>R; priority_queue<long long>B; vector<long long>R_a(N + 1, 0); vector<long long>B_a(N + 1, 0); vector<long long>A(N * 3); for (int i = 0; i < N * 3;...
a.cc: In function 'int main()': a.cc:21:17: error: 'class std::priority_queue<long long int, std::vector<long long int>, std::greater<long long int> >' has no member named 'front' 21 | R_a[i] -= R.front(); | ^~~~~ a.cc:32:17: error: 'class std::priority_queue<long long int>' has no member n...
s671662441
p03716
C++
import heapq n = int(input()) a = list(map(int,input().split())) ans = -float("inf") for k in range(n, 2 * n + 1): b = list() c = list() heapq.heappush(b, a[:k]) heapq.heappush(c,a[k:]) b = b[0] heapq.heapify(b) for i in range(k-n): heapq.heappop(b) c = list(map(lambda x: x*(-1),...
a.cc:1:1: error: 'import' does not name a type 1 | import heapq | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s306207185
p03716
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl ; typedef pair<ll,ll> pl; #define rep(i,N) for(int i=0; i < (int)N; i++) #define all(v) (v).begin(),(v).end() const int INF = 100000002; int main(){ int n; cin >> n; vl a(3*n); rep(i, 3*n) cin >> a[i]; // left vl s(2*n+1,...
a.cc: In function 'int main()': a.cc:42:23: error: expected initializer before 'que2' 42 | ll mi que2.top(); | ^~~~ a.cc:43:20: error: 'mi' was not declared in this scope; did you mean 'i'? 43 | if(mi > a[3*n-1 -i]){ | ^~ |...
s286659739
p03716
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for(int i = 0; i < n; i++) #define all(a) a.begin(), a.end() #define allcout(V) \ for(auto x : V) { \ cout << x << ' '; \ } \ cout << endl; #define P pair<int, int> #define F first #d...
a.cc: In function 'int main()': a.cc:50:6: error: expected primary-expression before '.' token 50 | }. | ^ a.cc:52:5: error: invalid use of 'class std::multiset<long long int>' 52 | multiset<int> SS; | ^~~~~~~~~~~~~ a.cc:55:9: error: 'SS' was not declared in this scope; did you mean '...
s358930873
p03716
C++
#include <bits/stdc++.h> using namespace std; void solve() { long long int n,sum1=0,sum2=0; cin>>n; long long int l[n],m[n],r[n]; for(int i=0;i<n;i++) cin>>l[i]; for(int i=0;i<n;i++) cin>>m[i]; for(int i=0;i<n;i++) cin>>r[i]; int e=0; ...
a.cc:62:6: error: redefinition of 'void solve()' 62 | void solve() | ^~~~~ a.cc:4:6: note: 'void solve()' previously defined here 4 | void solve() | ^~~~~ a.cc:107:5: error: redefinition of 'int main()' 107 | int main() | ^~~~ a.cc:49:5: note: 'int main()' previously defined her...
s660378648
p03716
C++
#include <bits/stdc++.h> #define REP(i, n) for (ll i = 0; i < (ll)n; i++) #define all(x) (x).begin(),(x).end() #define MOD 1000000007 using namespace std; typedef long long int ll; typedef vector<int > vecint; typedef vector<vector<int > > vec2int; typedef vector<bool > vecbool; typedef vector<string > vecstr; ////////...
a.cc: In function 'int main()': a.cc:21:3: error: 'vecll' was not declared in this scope 21 | vecll sum1(n + 1,0);// [0,i + n - 1] | ^~~~~ a.cc:22:8: error: expected ';' before 'sum2' 22 | vecll sum2(n + 1,0);// [3n - i,3n] 0<= i <= n | ^~~~~ | ; a.cc:29:7: error: 'sum1' was ...
s229492592
p03716
C++
#include<bits/stdc++.h> #include <iostream> #include <string> #include <cmath> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i,a,b) for(ll i=(a);i<(b);i++) #define FORR(i,a,b)for(ll i=(a);i<=(b);i++) #define repR(i,n) for(ll i=n;i>=0;i--) #define all(v)(v).begin(),...
a.cc: In function 'int main()': a.cc:15:12: error: 'class std::priority_queue<long long int>' has no member named 'push_back' 15 | #define pb push_back | ^~~~~~~~~ a.cc:72:7: note: in expansion of macro 'pb' 72 | B.pb(a[i]); | ^~
s409930984
p03716
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, a, b) for (int i = (a); i < (b); i++) //#include "library/debug.cpp" int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<ll> a(3 * n), s(n), t(n), u(n); rep(i, 0, 3 * n) cin >> a[i]; ...
a.cc: In function 'int main()': a.cc:41:14: error: no matching function for call to 'max(ll&, int)' 41 | sum = max(sum, 0); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc...
s490774553
p03716
C++
#include<bits/stdc++.h> #define INF 2147483647 #define LLINF 9223372036854775807 typedef long long ll; using namespace std; ll prev[500010]; ll suf[500010]; ll a[500010]; priority_queue<ll,vector<ll>,greater<ll> > q; priority_queue<ll,vector<ll>,greater<ll> > p; ll n; int main(){ cin>>n; for(int i=0;i<3*n;i++)cin>>a[...
a.cc: In function 'int main()': a.cc:20:9: error: reference to 'prev' is ambiguous 20 | prev[n-1]=sum; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits...
s121751037
p03716
C++
#include<bits/stdc++.h> #define INF 2147483647 #define LLINF 9223372036854775807 typedef long long ll; using namespace std; ll prev[500010]; ll suf[500010]; ll a[500010]; priority_queue<ll,vector<ll>,greater<ll> > q; priority_queue<ll,vector<ll>,greater<ll> > p; ll n; void run(){ cin>>n; for(int i=0;i<3*n;i++)cin>>a[...
a.cc: In function 'void run()': a.cc:20:9: error: reference to 'prev' is ambiguous 20 | prev[n-1]=sum; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits...
s911536306
p03716
C++
#include<bits/stdc++.h> #define INF 2147483647 #define LLINF 9223372036854775807 typedef long long ll; using namespace std; ll prev[500010]; ll suf[500010]; ll a[500010]; priority_queue<ll,vector<ll>,greater<ll> > q; priority_queue<ll,vector<ll>,greater<ll> > p; ll n; void run(){ cin>>n; for(int i=0;i<3*n;i++)cin>>a[...
a.cc: In function 'void run()': a.cc:20:9: error: reference to 'prev' is ambiguous 20 | prev[n-1]=sum; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits...
s530424410
p03716
C++
#include<bits/stdc++.h> #define INF 2147483647 #define LLINF 9223372036854775807 typedef long long ll; using namespace std; ll prev[500100]; ll suf[500100]; ll a[500100]; priority_queue<ll,vector<ll>,greater<ll> > q; priority_queue<ll,vector<ll>,greater<ll> > p; ll n; void run(){ cin>>n; for(int i=0;i<3*n;i++)cin>>a[...
a.cc: In function 'void run()': a.cc:20:9: error: reference to 'prev' is ambiguous 20 | prev[n-1]=sum; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits...
s351635824
p03716
C++
/* https://arc074.contest.atcoder.jp/tasks/arc074_b?lang=en */ #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=3e5+10; int n; ll ans=LONG_LONG_MIN; ll a[N]; ll sum1,sum2; multiset<ll>l,r; int main() { scanf("%d",&n); for(int i=0;i<3*n;i++) { cin>>a[i]; r.insert(a[i]); sum2+=a[i]...
a.cc: In function 'int main()': a.cc:38:42: error: no match for 'operator+' (operand types are 'std::multiset<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} and 'int') 38 | ...
s562261237
p03716
C++
#include <bits/stdc++.h> #define pb push_back typedef long long ll; using namespace std; int n,a[300005]; priority_queue<int> res; int main() { ios::sync_with_stdio(false); cin>>n; for (int i=0;i<3*n;i++) { cin>>a[i]; } for (int i=n-1;i<2n;i++) { priority_queue<int,vector<int>,greater<int> > ql; priority_q...
a.cc: In function 'int main()': a.cc:15:26: error: unable to find numeric literal operator 'operator""n' 15 | for (int i=n-1;i<2n;i++) | ^~ a.cc:44:28: error: invalid use of non-static member function 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = int; _...
s434710437
p03716
C++
#include <iostream> #include <vector> #include <queue> using namespace std; int main() { int N; cin >> N; vector<long long> a(N*3); for (int i = 0; i < N*3; ++i) cin >> a[i]; // 左から前処理 vector<long long> S(N*2+1, 0); priority_queue<long long, vector<long long>, greater<long long> > que1; fo...
a.cc: In function 'int main()': a.cc:20:9: error: 'll' was not declared in this scope 20 | ll mi = que1.top(); | ^~ a.cc:22:43: error: 'mi' was not declared in this scope; did you mean 'i'? 22 | S.at(i + 1) = S.at(i) + a.at(i) - mi; | ^...
s925761015
p03716
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; if(n>1000){ return 0; } vector<int> a(3*n); for(int i=0;i<3*n;i++){ cin >> a[i]; } long long m=INF; for(int i=0;i<n+1;i++){ priority_queue<int> p; priority_queue<int,vector<in...
a.cc: In function 'int main()': a.cc:16:18: error: 'INF' was not declared in this scope 16 | long long m=INF; | ^~~
s764562251
p03716
C++
#include <bits/stdc++.h> using namespace std; const int INF=-1000000000 int main(){ int n; cin >> n; if(n>1000){ return 0; } vector<int> a(3*n); for(int i=0;i<3*n;i++){ cin >> a[i]; } long long m=INF; for(int i=0;i<n+1;i++){ priority_queue<int> p; pr...
a.cc:7:1: error: expected ',' or ';' before 'int' 7 | int main(){ | ^~~
s333346623
p03716
C++
#include<bits/stdc++.h> #define ll long long #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define dump(a) (cerr << #a << "=" << (a) << endl) #define DUMP(list) cout << "{ "; for(auto nth : list){ cout << nth << " "; } cout << "}" << endl; template<clas...
a.cc: In function 'int main()': a.cc:42:7: error: 'i' was not declared in this scope 42 | T[i+1] = T[i] + a[N*3-1-i]; | ^ a.cc:45:20: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions] 45 | for(int i = N; i < N*2: ++i) { ...
s532825479
p03716
C++
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i = 0; i < (int)n; i++) #define MAX_N 100000 #define INF LLONG_MAX typedef long long ll; ll ans = -INF; int n; ll a[3*MAX_N]; void solver(priority_queue<ll, vector<ll>, greater<ll> > que_f...
a.cc:9:13: error: 'LLONG_MAX' was not declared in this scope 9 | #define INF LLONG_MAX | ^~~~~~~~~ a.cc:12:11: note: in expansion of macro 'INF' 12 | ll ans = -INF; | ^~~ a.cc:5:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <...
s493626075
p03716
C++
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i = 0; i < (int)n; i++) #define MAX_N 100000 #define INF LLONG_MAX typedef long long ll; ll ans = -INF; int n; ll a[3*MAX_N]; void solver(priority_queue<ll, vector<ll>, greater<ll> > que_f...
a.cc:9:13: error: 'LLONG_MAX' was not declared in this scope 9 | #define INF LLONG_MAX | ^~~~~~~~~ a.cc:12:11: note: in expansion of macro 'INF' 12 | ll ans = -INF; | ^~~ a.cc:5:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <...
s195556231
p03716
C++
#include <iostream> #include<vector> #include<algorithm> #include<string> #include<map> #include<cmath> #include<set> #include <iomanip> #include<queue> #include<stack> typedef long long ll; using namespace std; #define MOD 1000000007 int main(){ int n;cin>>n; vector<ll> a(3*n); for(int i=0;i<3*n;i++)cin>>a...
a.cc: In function 'int main()': a.cc:49:12: error: 'LLONG_MIN' was not declared in this scope 49 | ll ans=LLONG_MIN; | ^~~~~~~~~ a.cc:11:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 10 | #include<stack> +++ |+#include <climit...
s933616622
p03716
C++
#include <algorithm> #include <iostream> #include <vector> #include <queue> #include <set> #include <string> #include <map> #define rep(i, n) for (int i = 0; i < (n); ++i) #define Rep(i, sta, n) for (int i = sta; i < (n); ++i) #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; const int ...
a.cc: In function 'int main()': a.cc:64:14: error: 'LLONG_MIN' was not declared in this scope 64 | ll ans = LLONG_MIN; | ^~~~~~~~~ a.cc:8:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 7 | #include <map> +++ |+#include <clim...
s692478577
p03716
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace st...
a.cc:136:26: error: macro "REPP" requires 2 arguments, but only 1 given 136 | REPP(int i=n;i<=2*n;i++){ | ^ a.cc:3:9: note: macro "REPP" defined here 3 | #define REPP(i,n) for(int i=1;i<=n;i++) | ^~~~ a.cc: In function 'int main()': a.cc:136:3: error: 'REPP' was not ...
s469604053
p03716
C
#include<iostream> #include <vector> #include <queue> #include<algorithm> using namespace std; #define rep(i,n) for(int (i) = 0;(i) < (n);(i)++) int main(){ int n; scanf("%d",&n); vector<int> a(3*n); rep(i,3*n) scanf("%d",&a[i]); priority_queue<int,vector<int>,greater<int>> q1; priority_queue<int> q2; vector<...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s575188568
p03716
C++
#include<iostream> #include <vector> #include <queue> using namespace std; #define rep(i,n) for(int (i) = 0;(i) < (n);(i)++) int main(){ int n; scanf("%d",&n); vector<int> a(3*n); rep(i,3*n) scanf("%d",&a[i]); priority_queue<int,vector<int>,greater<int>> q1; priority_queue<int> q2; vector<long long> c1(n+1),c...
a.cc: In function 'int main()': a.cc:57:9: error: 'sort' was not declared in this scope; did you mean 'short'? 57 | sort(sum.begin(),sum.end()); | ^~~~ | short
s524582778
p03716
C++
#include<iostream> #include <vector> #include <queue> using namespace std; #define rep(i,n) for(int (i) = 0;(i) < (n);(i)++) int main(){ int n; scanf("%d",&n); vector<int> a(3*n); rep(i,3*n) scanf("%d",&a[i]); priority_queue<int,vector<int>,greater<int>> q1; priority_queue<int> q2; vector<int> c1(n+1),c2(n+1)...
a.cc: In function 'int main()': a.cc:57:9: error: 'sort' was not declared in this scope; did you mean 'short'? 57 | sort(sum.begin(),sum.end()); | ^~~~ | short
s245540412
p03716
C++
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<vector> #include<stack> #include<queue> #include<set> #include<map> using namespace std; typedef long long ll; typedef pair<int,int> P; typedef pair<int,P> P1; typedef pair<P,P> P2; #define pu push #define pb push_back #define mp make_pair...
a.cc: In function 'int main()': a.cc:61:23: error: expected ';' before ':' token 61 | if(N>1000) return -1: | ^ | ; a.cc:61:23: error: expected primary-expression before ':' token
s149179509
p03716
C++
#include <algorithm> #include <array> #include <bitset> #include <cstddef> #include <tuple> #include <utility> #include <vector> template <std::size_t BitLength, class Abelian> struct foldable_wavelet_matrix { using mapped_structure = Abelian; using mapped_type = typename mapped_structure::value_type; using key_typ...
a.cc: In function 'int main()': a.cc:205:26: error: 'ans' was not declared in this scope; did you mean 'abs'? 205 | printf("%lld\n", ans); | ^~~ | abs
s583555851
p03716
C++
#include <array> #include <cstddef> #include <cstdint> #include <vector> using usize = std::size_t; using u64 = long long; struct foldable_wavelet_matrix { static constexpr usize BitLen = static_cast<usize>(4); struct bitvector { struct node_type { usize count; u64 sum; }; std::vector<node_type> vecto...
a.cc: In constructor 'foldable_wavelet_matrix::foldable_wavelet_matrix(std::vector<long long int>)': a.cc:61:30: error: 'reverse' is not a member of 'std' 61 | std::reverse(one_itr, b.end()); | ^~~~~~~
s714809031
p03716
Java
import java.util.*; public class Main { static Scanner scanner = new Scanner(System.in); public static void main(String[]$) { int n = scanner.nextInt(); int m = n * 3; long[] a = new long[m]; for (int i = 0; i < m; i++) { a[i] = scanner.nextInt(); } ...
Main.java:30: error: cannot find symbol Utils.println(i, sum, queue); ^ symbol: variable Utils location: class Main 1 error
s112560671
p03716
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define inf (int)1e16 #define rep(i,n) for (int i = 0; i < (int)(n); i++) int n; int a[114514 * 3]; vector<int>ansl, ansr; priority_queue<int, vector<int>, greater<int>())l; priority_queue<int>r; int suml = 0, sumr = 0; int ans = -inf; signed main() { ...
a.cc:9:47: error: type/value mismatch at argument 3 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue' 9 | priority_queue<int, vector<int>, greater<int>())l; | ^ a.cc:9:47: note: expected a type, got '...
s051487213
p03716
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 1000000000000000 #include <iomanip> template <class T> inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; ...
a.cc: In function 'int main()': a.cc:46:24: error: 'que' was not declared in this scope; did you mean 'que1'? 46 | long long mi = que.top(); | ^~~ | que1 a.cc:56:5: error: 'prioroity_queue' was not declared in this scope 56 | prioroity_queue<lo...
s439847023
p03716
C++
using System; using System.Collections.Generic; using System.Linq; using static Input; public class Hello{ public static void Main(){ int N = NextInt(); int[] a = LineInt(); long[] memo = new long[3*N]; long Num = 0; PriorityQueue<long,long> PQ1 = new PriorityQueue<long,long>...
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...
s362772945
p03716
C++
using System; using System.Collections.Generic; using System.Linq; using static Input; public class Hello{ public static void Main(){ int N = NextInt(); int[] a = LineInt(); long[] memo = new long[3*N]; long Num = 0; PriorityQueue<long,long> PQ1 = new PriorityQueue<long,long>...
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...
s554866261
p03716
C++
#include <bits/stdc++.h> #define For(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i) #define Fordown(i, r, l) for (register int i = (r), i##end = (int)(l); i >= i##end; --i) #define Rep(i, r) for (register int i = (0), i##end = (int)(r); i < i##end; ++i) #define Set(a, v) memset(a, v, sizeof(...
a.cc: In function 'Type pb_ds::read()': a.cc:32:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 32 | register char ch; register Type ans = 0; register bool neg = 0; | ^~ a.cc:32:41: warning: ISO C++17 does not allow 'register' storage class sp...
s763436142
p03716
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<n;i++) int n,a[333333],sum,c[333333],d[333333],ans=-1e15; priority_queue<int,vector<int>,greater<int>>q; priority_queue<int,vector<int>>Q; signed main(){ cin>>n; rep(i,3*n)cin>>a[i]; rep(i,n){ q.push(a[i]); sum+=a[...
a.cc: In function 'int main()': a.cc:43:2: error: expected '}' at end of input 43 | } | ^ a.cc:8:14: note: to match this '{' 8 | signed main(){ | ^
s807714229
p03716
C++
#include <iostream> #include <queue> #include <vector> #include <list> using namespace std; int a[300000]; int main() { int N; priority_queue<int, vector<int>, greater<int>> pf, cf; priority_queue<int> ps, cs; int sum_f, sum_s; queue<int> dif_f; vector<int> dif_s; long long int max; sum_f = sum_s = 0; max ...
a.cc: In function 'int main()': a.cc:19:32: error: 'pow' was not declared in this scope 19 | max = - (long long int)pow(10, 9); | ^~~
s048096247
p03716
C++
#include <bits/stdc++.h> typedef long long LL; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) using namespace std; int main(void) { LL n; vector<LL> a(n*3); for(auto &x:a) cin >> x; vector<LL> l(n+2),r(n+2); priority_queue<LL> lp,rp; REP(i,n) { l[0]+=x[i]; lp.push(-x[i]); ...
a.cc: In function 'int main()': a.cc:16:11: error: 'x' was not declared in this scope 16 | l[0]+=x[i]; | ^ a.cc:22:14: error: 'x' was not declared in this scope 22 | lp.push(-x[n+i]); | ^
s631684184
p03716
C++
#include <bits/stdc++.h> #include <cstdio> #include <cstdlib> using namespace std; typedef long long ll; #define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++) int main() { int N; cin >> N; ll a[300100]; FOR(i, 0, 3 * N) cin >> a[i]; priority_queue<ll, vector<ll>, greater<ll>> pque_front; priorit...
a.cc: In function 'int main()': a.cc:39:19: error: 'sum' was not declared in this scope; did you mean 'sum2'? 39 | sum1[j] = sum[j - 1] - pque_front.top(); | ^~~ | sum2
s343369349
p03716
C++
#include <bits/stdc++.h> #include <cstdio> #include <cstdlib> using namespace std; typedef long long ll; #define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++) int main() { int N; cin >> N; ll a[300100]; FOR(i, 0, 3 * N) cin >> a[i]; priority_queue<ll, vector<ll>, greater<ll>> pque_front; priorit...
a.cc: In function 'int main()': a.cc:37:19: error: 'sum' was not declared in this scope; did you mean 'sum2'? 37 | sum1[j] = sum[j - 1] + a[j]; | ^~~ | sum2
s708472388
p03716
C++
#include <bits/stdc++.h> #include <cstdio> #include <cstdlib> using namespace std; typedef long long ll; #define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++) int main() { int N; cin >> N; ll a[300100]; FOR(i, 0, 3 * N) cin >> a[i]; priority_queue<ll, vector<ll>, greater<ll>> pque_front; priorit...
a.cc: In function 'int main()': a.cc:29:8: error: conflicting declaration 'll sum1 [300100]' 29 | ll sum1[300100], sum2[300100]; | ^~~~ a.cc:17:8: note: previous declaration as 'll sum1' 17 | ll sum1= 0, sum2 = 0; | ^~~~ a.cc:29:22: error: conflicting declaration 'll sum2 [300100...
s511506431
p03716
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> #include <cstdio> #include <stack> #include <functional> #include <set> #include <map> using namespace std; typedef long long ll; #define _SI(arr) (sizeof(arr)/sizeof(arr[0]) int main() { ll N; cin >> N; vector<ll> a(3 *...
a.cc: In function 'int main()': a.cc:26:38: error: 'LLONG_MIN' was not declared in this scope 26 | ll cnt1 = 0, cnt2 = 0, max = LLONG_MIN; | ^~~~~~~~~ a.cc:11:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climit...
s218651744
p03716
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define repr(i,n) for(int i=n;i>=0;i--) #define FOR(i,m,n) for(int i=m;i<(int)(n);i++) #define INF 9999999999 /*Solve*/ int main(){ int n; cin >> n; ll a[100010]; ...
a.cc: In function 'int main()': a.cc:38:6: error: expected '}' at end of input 38 | } | ^ a.cc:13:11: note: to match this '{' 13 | int main(){ | ^
s283199518
p03716
C++
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> a(3 * n); for (int i = 0; i < 3 * n; i++) { int a_; cin >> a_; a[i] = a_; } vector<int> dp(n); vector<long long> maxv(n + 1, 0); for (int i = 0; i < n; i++) {...
a.cc: In function 'int main()': a.cc:53:14: error: no matching function for call to 'max(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)' 53 | ans = max(ans, maxv[i] - minv[n - i]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++...
s722996661
p03716
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ ll n; cin>>n; ll a[n*3],bb[n+1],cc[n+1]; bb[0]=0,cc[n]=0; priority_queue<ll> c; priority_queue<ll,vector<ll>,greater<ll>> b; for(int i=0;i<n*3;i++){ cin>>a[i]; if(i<n){ b.push(a[i]); bb[0]+=a[i]; } el...
a.cc: In function 'int main()': a.cc:26:4: error: expected '}' at end of input 26 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s863849489
p03716
C++
/* ****GT_18**** */ #include<bits/stdc++.h> #define ll long long #define pb push_back #define endl '\n' #define pii pair<ll int,ll int> #define vi vector<ll int> #define all(a) (a).begin(),(a).end() #define F first #define S second #define sz(x) (ll in...
a.cc: In function 'int main()': a.cc:68:32: error: no matching function for call to 'max(int&, long long int)' 68 | ans=max(ans,g[i]-s[i]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-...
s965107179
p03716
C++
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { long long int n,a,summa1=0,summa2=0; cin>>n; set<pair<long long int,long long int> > s1; set<pair<long long int,long long int> > s2; vector<pair<long long int,long long int> > v; for(long long int i=1;i<=3*n;i++) { cin>>a; if(i<=3*n...
a.cc: In function 'int main()': a.cc:46:25: error: 'opt' was not declared in this scope; did you mean 'op'? 46 | opt--; | ^~~ | op
s448684017
p03716
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <math.h> #include <stack> #include <queue> #include <functional> #include <limits> using namespace std; #define ll long long #define ull unsigned long long #define rep(i,N) for (int i=0;i<N;i++) //変数 int N; vector<int> a; //解法 void...
a.cc: In function 'void solve()': a.cc:23:18: error: 'LLONG_MIN' was not declared in this scope 23 | ll ans = LLONG_MIN; | ^~~~~~~~~ a.cc:9:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <functional> +++...
s379661981
p03716
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <math.h> #include <stack> #include <queue> #include <functional> using namespace std; #define ll long long #define ull unsigned long long #define rep(i,N) for (int i=0;i<N;i++) //変数 int N; vector<int> a; //解法 void solve() { ll an...
a.cc: In function 'void solve()': a.cc:22:18: error: 'LLONG_MIN' was not declared in this scope 22 | ll ans = LLONG_MIN; | ^~~~~~~~~ a.cc:9:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <functional> +++...
s954534837
p03716
C++
#include <iostream> #include <cmath> #include <string> #include <algorithm> #include <set> #include <vector> #include <map> #include <list> #include <stack> #include <cstdio> #include <cstring> #include <cstdlib> #include <queue> #define pye cout << "yes" << endl; #define pno cout << "no" << endl; #define pYe cout << "...
a.cc: In function 'int main()': a.cc:46:34: error: no type named 'value_type' in 'struct std::greater<long long int>' 46 | priority_queue<ll, greater<ll>> pque1; | ^~ a.cc:46:34: error: template argument 3 is invalid a.cc:49:15: error: request for member 'push' in 'pque1', ...
s399363591
p03716
C++
#include <bits/stdc++.h> #include <windows.h> #define change_read() freopen("C:\\Users\\Administrator\\Desktop\\in.txt","r",stdin) #define change_write() freopen("C:\\Users\\Administrator\\Desktop\\out.txt","w",stdout) #define creat_read() freopen("C:\\Users\\Administrator\\Desktop\\out.txt","w",stdout) using namespace...
a.cc:2:10: fatal error: windows.h: No such file or directory 2 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s252800703
p03716
C++
#include <iostream> #include <queue> #include <cstdio> using namespace std; int main(){ long long i,n,x,ans=0,j,k; priority_queue <long long> front,last; cin >> n; long long a[n],b[n]; for(i=0;i<n;i++){ cin >> x; ans += x; front.push(-x); } for(i=0;i<n;i++){ cin >> x; a[i] = x; b[n-1-i] = x; } ...
a.cc: In function 'int main()': a.cc:40:33: error: no matching function for call to 'std::priority_queue<long long int>::pop(long long int&)' 40 | last.pop(b[k]); | ~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/queue:66, from a.cc:2: /...
s889957116
p03716
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; bool vcmp(int a,int b){ return a>b; } int resultUtil(vector<int> &a,int m){ int n=a.size()/3; vector<int> left(m); vector<int> right(3*n-m); int i=0; for(i=0;i<left.size();i++){ left[i]=a[i]; } for(int j=0;j<right.size();j++){ ...
a.cc: In function 'int result(std::vector<int>&)': a.cc:34:21: error: 'INT_MIN' was not declared in this scope 34 | int fresult=INT_MIN; | ^~~~~~~ a.cc:4:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<alg...
s224036898
p03716
C++
#include<bits/stdc++.h> #define INF 1e9 using ll = long long; #define int ll #define rep(i,a,b) for(int i=(a);i<(b);i++) #define repr(i,a,b) for(int i=(a);i>=(b);i--) #define all(x) (x).begin(),(x).end() using namespace std; int main(){ int n; cin >> n; vector<int> v(3*n),lv,sv; rep(i,0,3*n) cin >> v[i]; priority_q...
a.cc:4:13: error: '::main' must return 'int' 4 | #define int ll | ^~ a.cc:9:1: note: in expansion of macro 'int' 9 | int main(){ | ^~~
s143871695
p03716
C++
#include <bits/stdc++.h> using namespace std; //container util //------------------------------------------ #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=...
a.cc: In function 'int main()': a.cc:46:5: error: 'll' was not declared in this scope; did you mean 'LL'? 46 | ll a[MAX]={}; | ^~ | LL a.cc:49:14: error: 'a' was not declared in this scope 49 | cin>>a[i]; | ^ a.cc:51:32: error: template argument 2 is invalid 5...
s712794366
p03716
C++
#include <queue> #include <limits> using namespace std; int arr[300005]; long long int prefNSum[300005]; //arr[1] ~ arr[i] 중 가장 큰 N개의 합 long long int suffNSum[300005]; //arr[i] ~ arr[N] 중 가장 작은 N개의 합 priority_queue<int, vector<int>, greater<int> > minHeap; priority_queue<int> maxHeap; int main(){ int N, tmp; scanf...
a.cc: In function 'int main()': a.cc:12:9: error: 'scanf' was not declared in this scope 12 | scanf("%d", &N); | ^~~~~ a.cc:48:9: error: 'printf' was not declared in this scope 48 | printf("%lld\n", ans); | ^~~~~~ a.cc:3:1: note: 'printf' is defined in header '<cstdio>'...
s335285871
p03716
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <array> #include <vector> #include <utility> #include <bitset> #include <queue> #include <numeric> using namespace std; typedef long long ll; int main(void) { cin.tie(0); ios::sync_with_...
a.cc: In function 'int main()': a.cc:52:30: error: array must be initialized with a brace-enclosed initializer 52 | ll dp2[i] = dp2[i - 1]; | ~~~~~~~~~^
s994001743
p03716
C++
#include <iostream> #include <algorithm> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) #define FI first #define SE second #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #de...
a.cc:54:17: error: extended character   is not valid in an identifier 54 | ssum[2*N-1]=y;  | ^ a.cc: In function 'int main()': a.cc:54:17: error: '\U00003000' was not declared in this scope 54 | ssum[2*N-1]=y;  | ^~ a.cc:55:7: error: 'i' was not declared in this sco...
s780464345
p03716
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include <string> #include <vector> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <numeric> #include <utility> #include <iomanip>...
a.cc: In member function 'void RMQ::print()': a.cc:95:31: error: 'r' was not declared in this scope 95 | for (int i = 0; i < r; ++i) { | ^
s412582832
p03716
C++
const fi=''; fo=''; oo=trunc(1e18); maxn=trunc(1e5); var n:longint; sol:int64; nheapmin,nheapmax:longint; heapmax,heapmin:array[0..2*maxn]of longint; a:array[0..3*maxn]of longint; l,r:array[0..3*maxn]of int64; function min(i,j:int64):int64; begin if i<j then exit(i); ex...
a.cc:1:10: error: empty character constant 1 | const fi=''; | ^~ a.cc:2:10: error: empty character constant 2 | fo=''; | ^~ a.cc:8:29: error: too many decimal points in number 8 | heapmax,heapmin:array[0..2*maxn]of longint; | ^~~~ a...
s650842474
p03716
C
#include<iostream> #include<cstdio> #include<queue> using namespace std; const int MAXN = 1e5+10; int n , a[MAXN]; long long ans = -1e18 , f[MAXN] , r[MAXN]; int main() { //freopen("B.inp" , "r" , stdin); //freopen("B.out" , "w" , stdout); scanf("%d",&n); for(int i = 1 ; i<=3*n ; i++) scanf(...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s239364447
p03716
C
#include<bits/stdc++.h> using namespace std; const int MAXN = 1e5+10; int n , a[MAXN]; long long ans = -1e18 , f[MAXN] , r[MAXN]; int main() { scanf("%d",&n); for(int i = 1 ; i<=3*n ; i++) scanf("%d",&a[i]); priority_queue<int , vector<int> , greater<int> > q; for(int i = 1 ; i<=n ; i++) ...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s424720979
p03716
C++
#include <bits/stdc++.h> #define db double #define ls rt << 1 #define rs rt << 1 | 1 #define pb push_back #define ll long long #define mp make_pair #define pii pair<int, int> #define X first #define Y second #define pcc pair<char, char> #define vi vector<int> #define vl vector<ll> #define rep(i, x, y) for(int i = x; i ...
a.cc: In function 'int main()': a.cc:28:13: error: too few arguments to function 'ssize_t read(int, void*, size_t)' 28 | n = read(); | ~~~~^~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c...
s490529214
p03716
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ArrayReconstruction { /** * @param args * @throws IOException */ static int[] zeroes; public static void main(String[] args) throws IOException { BufferedReader scan = new BufferedReader(new InputStr...
Main.java:6: error: class ArrayReconstruction is public, should be declared in a file named ArrayReconstruction.java public class ArrayReconstruction { ^ 1 error
s370699459
p03716
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * @author Personal * */ public class ArrayReconstruction { /** * @param args * @throws IOException */ //static int conChanges; static int[] zeroes; public static void main(String[] args) throws IOException {...
Main.java:9: error: class ArrayReconstruction is public, should be declared in a file named ArrayReconstruction.java public class ArrayReconstruction { ^ 1 error
s598070705
p03716
C++
#include <bits/stdc++.h> using namespace std; #define fill(x,y) memset(x,y,sizeof(x)) #define fi first #define se second #define sz(x) ((int) (x).size()) #define all(x) (x).begin(), (x).end() #define sqr(x) ((x) * (x)) #define sqrt(x) sqrt(abs(x)) #define mp make_pair #define pb push_back #define smp(x,y,z) mp(x,mp(y,...
a.cc: In function 'int main()': a.cc:80:16: warning: overflow in conversion from 'long long int' to 'int' changes value from '-10000000000000000' to '-1874919424' [-Woverflow] 80 | int maxi = -oo; | ^~~ a.cc:82:17: error: no matching function for call to 'max(int&, ll)' 82 | maxi=...
s796000564
p03716
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ArrayReconstruction { /** * @param args * @throws IOException */ static int[] zeroes; public static void main(String[] args) throws IOException { BufferedReader scan = new BufferedReader(new InputStre...
Main.java:5: error: class ArrayReconstruction is public, should be declared in a file named ArrayReconstruction.java public class ArrayReconstruction { ^ 1 error
s289630542
p03716
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ArrayReconstruction { /** * @param args * @throws IOException */ static int[] zeroes; public static void main(String[] args) throws IOException { BufferedReader scan = new BufferedReader(new InputStr...
Main.java:6: error: class ArrayReconstruction is public, should be declared in a file named ArrayReconstruction.java public class ArrayReconstruction { ^ 1 error
s981050336
p03716
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ArrayReconstruction { static int[] zeroes; public static void main(String[] args) throws IOException { BufferedReader scan = new BufferedReader(new InputStreamReader(System.in)); String input = scan.readL...
Main.java:6: error: class ArrayReconstruction is public, should be declared in a file named ArrayReconstruction.java public class ArrayReconstruction { ^ 1 error
s453914381
p03716
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; // greaterが通らないので定義 template<class _Ty> struct greater : public binary_function<_Ty, _Ty, bool> { // functor for operator< bool operator()(const _Ty& _Left, const _Ty& _Right) const { // apply operator< to operands ...
a.cc:10:26: warning: 'template<class _Arg1, class _Arg2, class _Result> struct std::binary_function' is deprecated [-Wdeprecated-declarations] 10 | : public binary_function<_Ty, _Ty, bool> | ^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:49, ...
s164977361
p03716
C++
#include <cstdio> #include <iostream> #define ll long long using namespace std; ll tmp[1005]; ll tmp1[1005]; ll ans_l[1005]; ll ans_r[1005]; void clear(int n,ll tmp[]){ for(int t = 1; t <= 2*n; t++){ tmp[t] = 0; } } void array_copy_right(int A[], ll tmp[], int end, int n){ for(int i = 3*n; i > end; i--){ tmp...
a.cc: In function 'void heapify(long long int*, int, int)': a.cc:54:21: error: no matching function for call to 'swap(long long int*, long long int*)' 54 | swap(&nums[i], &nums[largest]); //交换父结点i和大的那个孩子结点 | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/1...
s187465790
p03716
C++
#include <bits/stdc++.h> #define sz(a) int((a).size()) #define all(c) (c).begin(),(c).end() #define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++) #define REP(i,a,b) for(int i=a;i<b;i++) #define rep(i,n) REP(i,0,n) #define mp make_pair #define pb push_back #define SET(a,b) memset(a,b,sizeof(a)...
a.cc: In function 'int main()': a.cc:73:25: error: reference to 'left' is ambiguous 73 | left.push(a[i]); | ^~~~ In file included from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from ...
s258003041
p03716
C++
#include <vector> #include <map> #include <algorithm> #include <iostream> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <iomanip> #include <iterator> #include <sstream> #define FOR(i,a,b) for (long long i=(a);i<(b);i...
a.cc: In function 'int main()': a.cc:25:15: error: 'LLONG_MAX' was not declared in this scope 25 | #define LLINF LLONG_MAX/3 | ^~~~~~~~~ a.cc:79:20: note: in expansion of macro 'LLINF' 79 | LL ret = - LLINF; | ^~~~~ a.cc:15:1: note: 'LLONG_MAX' is defined in he...
s823056071
p03716
C++
#include <iostream> #include <sstream> #include <fstream> #include <cstring> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <bitset> #include <cmath> #include <cstdlib> #include <ctime> #include <c...
a.cc:23:40: error: 'LLONG_MIN' was not declared in this scope 23 | ll num[300001],l[300001],r[300001],ans=LLONG_MIN; | ^~~~~~~~~ a.cc:20:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 19 | #include<iomanip...
s051840088
p03716
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int a[M]; struct cmp1 { int x; cmp1(int x):x(x) {} bool operator < (const cmp1 &a) const { return x > a.x; } }; struct cmp2 { int x; cmp2(int x):x(x) {} bool operator < (const cmp2 &a) const { return ...
a.cc:4:7: error: 'M' was not declared in this scope 4 | int a[M]; | ^ a.cc: In function 'int main()': a.cc:30:14: error: 'a' was not declared in this scope 30 | cin>>a[i]; | ^ a.cc:37:22: error: 'a' was not declared in this scope 37 | st.push(cmp1(a[i])); |...