submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s973252111
p03714
C++
#include <iostream> #include <vector> #include <algorithm> #include <vector> #include <queue> #include <stdio.h> #include <functional> #define int long long using namespace std; signed main(){ int n; int max=0; int min=0; cin>> n; int N=3*n; int a[N]; priority_queue<int> PQ1; priorit...
a.cc: In function 'int main()': a.cc:8:13: error: 'long long long' is too long for GCC 8 | #define int long long | ^~~~ a.cc:82:15: note: in expansion of macro 'int' 82 | long long int ans=-1e19; | ^~~ a.cc:8:18: error: 'long long long' is too long for GCC 8 | #defin...
s127902552
p03714
C++
#include <iostream> #include <algorithm> #include <numeric> using namespace std; int main() { long long n; cin >> n; vector<long long> a; for(long long i=0; i<3*n; i++) { long long j; cin >> j; a.push_back(j); } for(long long i=0; i<n; i++) { auto left_min = min_element(a.begin(), a.begin(...
a.cc: In function 'int main()': a.cc:10:3: error: 'vector' was not declared in this scope 10 | vector<long long> a; | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <numeric> +++ |+#include <vector> 4 | a....
s086310368
p03714
C++
#include <iostream> #include <algorithm> #include <numeric> using namespace std; int main() { long long n; cin >> n; vector<long long> a; for(long long i=0; i<3*n; i++) { long long j; cin >> j; a.push_back(j); } for(long long i=0; i<n; i++) { auto left_min = min_element(a.begin(), a.begin(...
a.cc: In function 'int main()': a.cc:10:3: error: 'vector' was not declared in this scope 10 | vector<long long> a; | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <numeric> +++ |+#include <vector> 4 | a....
s749320178
p03714
C++
#define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define inf INT_MAX/3 #define INF INT_MAX/3 #define PB push_back #define pb push_back #define MP make_pair #define mp make_pair #define ALL...
a.cc:65:10: fatal error: Main.h: No such file or directory 65 | #include "Main.h" | ^~~~~~~~ compilation terminated.
s876402308
p03714
C++
#define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define inf INT_MAX/3 #define INF INT_MAX/3 #define PB push_back #define pb push_back #define MP make_pair #define mp make_pair #define ALL...
a.cc: In function 'int main(int, char**)': a.cc:70:19: error: 'INT_MIN' was not declared in this scope 70 | int min = INT_MIN; | ^~~~~~~ a.cc:64:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 63 | #include <limits> +++...
s279138618
p03714
C++
#define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define inf INT_MAX/3 #define INF INT_MAX/3 #define PB push_back #define pb push_back #define MP make_pair #define mp make_pair #define ALL...
a.cc:67:10: fatal error: Main.h: No such file or directory 67 | #include "Main.h" | ^~~~~~~~ compilation terminated.
s671698600
p03714
C++
#define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define inf INT_MAX/3 #define INF INT_MAX/3 #define PB push_back #define pb push_back #define MP make_pair #define mp make_pair #define ALL...
a.cc: In function 'int main(int, char**)': a.cc:68:19: error: 'INT_MIN' was not declared in this scope 68 | int min = INT_MIN; | ^~~~~~~ a.cc:62:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 61 | #include <numeric> ++...
s581104651
p03714
C++
# include <stdio.h> # include <string.h> # include <stdlib.h> # include <iostream> # include <vector> # include <queue> # include <stack> # include <map> # include <math.h> # include <algorithm> using namespace std; # define pi acos(-1.0) # define mem(a,b) memset(a,b,sizeof(a)) # define FOR(i,a,n) for(int i=a; i<=n; ++...
a.cc:18:20: error: expected initializer before '\U0000ff1b' 18 | int a[3005],b[3005]; | ^~ a.cc: In function 'int main()': a.cc:38:23: error: 'b' was not declared in this scope 38 | strcpy((char*)b,(char*)a); | ^ a.cc:43:9: error: 'c' was not declared i...
s395680217
p03714
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long[] a = new long[3 * N]; for(int i = 0; i < 3 * N; i++) { a[i] = sc.nextLong(); } PriorityQueue<Long> pq = new PriorityQueue<Long>(); long[...
Main.java:34: error: integer number too large long ans = -1000000000000000000; ^ 1 error
s085648410
p03714
C++
#include <functional> #include <iostream> #include <queue> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <string> #include <valarray> #include <vector> std::vector<std::string> GetInputValues(); std::valarray<int> DeriveSumArr1(); std::valarray<int> DeriveSumArr2(); std::string InputPattern = "In...
a.cc: In function 'int main()': a.cc:67:51: error: conversion from 'valarray<int>' to non-scalar type 'valarray<long long int>' requested 67 | std::valarray<long long> SumArr1=DeriveSumArr1(); | ~~~~~~~~~~~~~^~ a.cc:73:51: error: conversion from 'valarray<int>' to non-s...
s230245936
p03714
C++
#include <iostream> #include <queue> #include <vector> #include <limits> using namespace std; using ll = long long; int main(){ // 入力 int N = N, vector a = {a_1, a_2, ... a_N*3} int N; cin >> N; int N3 = N * 3; vector<ll> a(N3); for (int i=0; i<N3; ++i){ cin >> a[i]; } // 優先度つきキューの作成 // pq_front: 前から ...
a.cc: In function 'int main()': a.cc:55:24: error: 'LLONG_MIN' was not declared in this scope 55 | ll max_score = LLONG_MIN; | ^~~~~~~~~ a.cc:5:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include <limits>...
s149371376
p03714
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; long long int n,m,max; inline int uesort(vector<int> a,int num){ int sum=0; sort(a.begin(),a.begin()+num); for(int i=n;i>=0;i--) sum += a[i]; return sum; } inline int sitasort(vector<int> a,int num){ int sum=0; sort(a.end()-num,a.e...
a.cc: In function 'int main()': a.cc:34:9: error: reference to 'max' is ambiguous 34 | max = left[1] - right[1]; | ^~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidates are: 'template<class _Tp, cla...
s578859270
p03714
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ // input int N; cin >> N; int N3 = N * 3; vector<long long> v(N3); vector<long long *> vp(N3); vector<long long> sum(N3 + 1); sum[0] = 0; for (int i = 0; i< N3; ++i){ cin >> v[i]; vp[i] = &v[i]; sum[i+1] = su...
a.cc: In function 'int main()': a.cc:27:44: error: unable to find numeric literal operator 'operator""N' 27 | long long int max_score = -1 * sum[3N]; | ^~
s996814875
p03714
C++
#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include ...
a.cc: In function 'int main()': a.cc:83:31: error: unable to find numeric literal operator 'operator""i64' 83 | int64_t max_value = (-9223372036854775807i64 - 1); | ^~~~~~~~~~~~~~~~~~~~~~
s455241145
p03715
C++
//4パターンの分割方法 //hを全探索して残りを二分割
/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
s596257080
p03715
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<long long, long long>; constexpr char ln = '\n'; constexpr long long MOD = 1000000007LL; constexpr long long INF = 1000000009LL; #define all(x) (x).begin(),(x).end() #define ...
a.cc: In function 'int main()': a.cc:22:22: error: expected ';' before 'i' 22 | for(llogbf64x i=1; i<L; i++){ | ^~ | ; a.cc:22:28: error: 'i' was not declared in this scope 22 | for(llogbf64x i=1; i<L; i++){ | ^...
s932287815
p03715
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <stack> #include <tuple> #include <cmath> #include <iomanip> #include <map> #include <cstring> //memset(dp,0,sizeof(dp)) #include <functional> #define ll long long #define rep(i,n) for(int i=0;i<(n);i++...
a.cc: In function 'int main()': a.cc:44:14: error: expected ';' before 'c' 44 | b=w*d | ^ | ; 45 | c=w*(h-i-d); | ~
s982491302
p03715
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); | ~ ^ | )
s014915668
p03715
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i = 0; i < n; i++) #define pb push_back using namespace std; typedef long long ll; int main(){ ll h,w; cin>>h>>w; if(h%3==0 || w%3==0){ cout<<0<<endl; return 0; } ll ans=10000000000; if(w>2) ans=h; if(h>2) ans=min(ans,w); if(h%2==0) ans=min(ans,h...
a.cc: In function 'int main()': a.cc:22:14: error: no matching function for call to 'max(int&, ll)' 22 | res=max(res,w-i); | ~~~^~~~~~~~~ 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....
s176472231
p03715
C++
#include<cstdio> #include<iostream> #include<string> #include<set> #include<map> #include<vector> #include<queue> #include<stack> #include<deque> #include<tuple> #include<algorithm> #include<numeric> #include<limits> #include<boost/multiprecision/cpp_int.hpp> using namespace boost::multiprecision; using namespace std; ...
a.cc:14:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 14 | #include<boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s705596738
p03715
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; ll mod = 1000000007; int main(){ ll h,w; cin >> h >> w; ll ans,ans1,ans2,ans3,ans4; ll hemain=h%3,wemain=w%3; ll hart1=(h-hemain)/3,wart1=(w-wemain)/3; ll hart2=h/2,wart2=w/2; ll hact,wact; if(hemain==0 || wemein==0){ cout << ...
a.cc: In function 'int main()': a.cc:16:19: error: 'wemein' was not declared in this scope; did you mean 'wemain'? 16 | if(hemain==0 || wemein==0){ | ^~~~~~ | wemain
s678606140
p03715
C++
#include <bits/stdc++.h> #define mod 1000000007 using namespace std; int main(){ long x,y,i; long long a1,a2,a3,mn; cin>>x>>y; mn=x*y; if(x>y) swap(x,y); for(i=1;i<y;i++){ a1=x*i; a2=x/2*(y-i); a3=(x-x/2)*(y-i); mn=min(mn,max(a1,a2,a3)-min(a1,a2,a3)); } cout<...
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/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Com...
s780167670
p03715
C++
#include <algorithm> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <vector> int main() { long long H, W; scanf("%lld", &H); scanf("%lld", &W); lo...
a.cc: In function 'int main()': a.cc:24:21: error: no matching function for call to 'min(int, long long int&)' 24 | ans = std::min(0, ans); | ~~~~~~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: n...
s889174642
p03715
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define N 666666 #define inf 999999999999 int ans; signed main(){ int n,m; cin>>n>>m; ans=inf; if(n%3==0||m%3==0){ cout<<"0";return 0; } ans=min(n,m); for(int i=1;i<n;i++){ int s1=i*m,s2,s3; if(m%2){ s2=(m/2)*(n-i); s3=(m/2+1)*(n-i)...
a.cc: In function 'int main()': a.cc:34:29: error: expected primary-expression before ')' token 34 | s2=()n/2)*(m-i); | ^
s926215229
p03715
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define N 666666 #define inf 999999999999 int ans; signed main(){ int n,m; cin>>n>>m; ans=inf; if(n%3==0||m%3==0){ cout<<"0";return 0; } ans=min(n*(m/3+1),m*(n/3+1)); for(int i=1;i<n;i++){ int s1=i*m,s2,s3; if(m%2){ s2=(m/2)*(n-i); ...
a.cc: In function 'int main()': a.cc:34:29: error: expected primary-expression before ')' token 34 | s2=()n/2)*(m-i); | ^
s091903341
p03715
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll H,W; cin >> H >> W; ll ans; if(H%3==0||W%3==0)ans=0;else ans=...
a.cc: In function 'int main()': a.cc:29:22: error: expected ')' before ';' token 29 | ans=min(ans,t; | ~ ^ | )
s419621871
p03715
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<math.h> using namespace std; #define ll long long int main(){ ll H,W; cin >> H >> W; ll ans; if(H%3==0||W%3==0)ans=0;else ans=...
a.cc: In function 'int main()': a.cc:22:9: error: 'i' was not declared in this scope 22 | for(i=0;i<=1;i++){ | ^ a.cc:23:13: error: 'j' was not declared in this scope 23 | for(j=0;j<=1;j++){ | ^ a.cc:28:9: error: 'i' was not declared in this scope 28 | for(i=0;i<...
s382865651
p03715
C++
#include<bits/stdc++.h> using namespace std; int main() { printf( }
a.cc: In function 'int main()': a.cc:6:1: error: expected primary-expression before '}' token 6 | } | ^
s559099658
p03715
C++
#include <iostream> #include <iomanip> #include <algorithm> #include <utility> #include <cmath> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <deque> using namespace std; using ll = long long; #define rep(i, n) for(int i = 0; i < (int)(n); i++) int main...
a.cc: In function 'int main()': a.cc:33:25: error: no matching function for call to 'max(ll, int)' 33 | for(int cw = max(w / 3 - 10 ,0); cw <= min(w / 3 + 10, w); cw++) { | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c+...
s678549247
p03715
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;} return 0;} template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;} return 0;} #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(vec) vec.begin(),vec.end() typedef...
a.cc: In function 'int main()': a.cc:43:6: error: redeclaration of 'll s1' 43 | ll s1=h*(w/3); | ^~ a.cc:29:6: note: 'll s1' previously declared here 29 | ll s1=h*(w/3); | ^~ a.cc:44:6: error: redeclaration of 'll s2' 44 | ll s2=h*((w-w/3)/2); | ^~ a.cc:30:6: note: 'll s2...
s820785600
p03715
C++
#include<bits/stdc++.h> #include <iostream> #include <string> 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(),(v).end() #define...
a.cc: In function 'int main()': a.cc:68:8: error: 'ans' was not declared in this scope; did you mean 'abs'? 68 | COUT(ans); | ^~~ a.cc:16:24: note: in definition of macro 'COUT' 16 | #define COUT(x) cout<<(x)<<endl | ^
s060041917
p03715
C++
H,W=[int(c) for c in input().split()]; a=[H*(W//3),(H//2)*(W-W//3),(H-H//2)*(W-W//3)]; b=[W*(H//3),(W//2)*(H-H//3),(W-W//2)*(H-H//3)]; c=[W*((H+2)//3),(W//2)*(H*2//3),(W-W//2)*(H*2//3)]; d=[H*((W+2)//3),(H//2)*(W*2//3),(H-H//2)*(W*2//3)]; print(min((H%3!=0)*W,(W*3!=0)*H, max(a)-min(a),max(b)-min(b),max(c)-min(c),max(d)...
a.cc:1:1: error: 'H' does not name a type 1 | H,W=[int(c) for c in input().split()]; | ^ a.cc:2:1: error: 'a' does not name a type 2 | a=[H*(W//3),(H//2)*(W-W//3),(H-H//2)*(W-W//3)]; | ^
s448243392
p03715
Java
import java.util.*; import java.lang.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long hh = sc.nextLong(); //縦 long ww = sc.nextLong(); //横 long aH = 0; long cH = 0; long aW = 0; long bW = 0; long x = 0; long H = 0; long W = 0; if( hh%2==0 &&...
Main.java:16: error: ')' expected if( hh%2==0 && ww%2==0 hh<ww ){ ^ Main.java:16: error: > or ',' expected if( hh%2==0 && ww%2==0 hh<ww ){ ^ Main.java:16: error: not a statement if( hh%2==0 && ww%2==0 hh<ww ){ ^ 3 errors
s959360387
p03715
Java
import java.util.*; import java.lang.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long hh = sc.nextLong(); //縦 long ww = sc.nextLong(); //横 long aH = 0; long cH = 0; long aW = 0; long bW = 0; long x = 0; long H = 0; long W = 0; if( hh%2==0 &&...
Main.java:43: error: cannot find symbol long[] ans = new ans[3]; ^ symbol: class ans location: class Main 1 error
s636372538
p03715
C++
h, w= gets.strip.split.map(&:to_i) ans = [] ans << 0 if h%3==0 || w%3==0 (1 .. h-1).each do |i| tmp = [w*i, (w/2)*(h-i)].min tmp2 = [w*i, ((w+1)/2)*(h-i)].max ans << tmp2 -tmp end (1 .. w-1).each do |i| tmp = [h*i, (h/2)*(w-i)].min tmp2 = [h*i, ((h+1)/2)*(w-i)].max ans << tmp2-tmp end puts ans.min
a.cc:1:1: error: 'h' does not name a type 1 | h, w= gets.strip.split.map(&:to_i) | ^
s757771835
p03715
C++
#include<bits/stdc++.h> using namespace std; #define int long long #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()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); ...
a.cc: In function 'int main()': a.cc:96:52: error: no matching function for call to 'min<long long int>(long long int)' 96 | d=min<int>(min<int>(d,abs<int>(a2-b2)),min<int>(abs<int>(b2-c2)),abs<int>(c2-a2))); | ~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/...
s839298259
p03715
C++
#include<bits/stdc++.h> using namespace std; #define int long long #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()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); ...
a.cc: In function 'int main()': a.cc:87:52: error: no matching function for call to 'min<long long int>(long long int)' 87 | c=min<int>(min<int>(c,abs<int>(a2-b2)),min<int>(abs<int>(b2-c2)),abs<int>(c2-a2))); | ~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/...
s912879732
p03715
C++
#include<bits/stdc++.h> using namespace std; #define int long long #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()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); ...
a.cc: In function 'int main()': a.cc:85:5: error: 'c2' was not declared in this scope; did you mean 'c3'? 85 | c2=a*b-a1-b1; | ^~ | c3
s839929903
p03715
C++
#include<bits/stdc++.h> using namespace std; #define int long long #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()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); ...
a.cc: In function 'int main()': a.cc:85:5: error: 'c2' was not declared in this scope; did you mean 'c3'? 85 | c2=a*b-a1-b1; | ^~ | c3 a.cc:87:15: error: no matching function for call to 'min<long long int>(<brace-enclosed initializer list>)' 87 | c=min<int>({c,abs(a2-b2),abs(b2-c2),ab...
s067866590
p03715
C++
#include <bits/stdc++.h> using namespace std; #define dforsn(i,s,n) for(int i=int(n-1);i>=int(s);i--) #define forsn(i,s,n) for(int i=int(s);i<int(n);i++) #define dforn(i,n) dforsn(i,0,n) #define forn(i,n) forsn(i,0,n) #define all(a) a.begin(),a.end() #define si(a) int((a).size()) #define pb emplace_back #define mp ma...
a.cc: In function 'int main()': a.cc:58:41: error: expected ';' before 'cin' 58 | ios_base::sync_with_stdio(0); cin.tie(0) | ^ | ; 59 | 60 | cin >> n >> m; | ~~~
s642075142
p03715
C++
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int arr[3*n],b[n],c[n]; int i,j; for(i=0;i<3*n;i++) cin>>arr[i]; sort(arr,arr+(3*n)/2); for(i=0;i<n;i++) { b[i]=arr[(n/2)+i]; } int sum=0,sum1=0; for(i=0;i<n;i++) { sum=sum+b[i]; } sort(arr+(3*n)/2,arr+3*n); ...
a.cc:32:2: error: stray '#' in program 32 | }#include<iostream> | ^ a.cc:32:3: error: 'include' does not name a type 32 | }#include<iostream> | ^~~~~~~ a.cc:35:5: error: redefinition of 'int main()' 35 | int main() | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int...
s927056681
p03715
C++
100000 100000 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; typedef vector<ll> V; typedef complex<double> Point; #define PI acos(-1.0) #define EPS 1e-10 const ll INF = 1e16; const ll MOD = 1e9 + 7; #define FOR(i,a,b) for(int i=(a);i<(b);i...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 100000 100000 | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, fr...
s125046780
p03715
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int main() { long long h,w,p,i,a,b,c,b1,c1,m,m1; cin >> h >> w; p=10000000000; for(i=h/3; i<=h/3+3; i++) { if(i!=0 && i<h) { a=i*w; b=(h-i)/2*w; c=(h*w-a-b); b1=(w/2)*(h-i); c1=h*w-a-b1; m=max(a...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s328863694
p03715
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int main() { long long h,w,p,i,a,b,c,b1,c1,m,m1; cin >> h >> w; p=10000000000; for(i=h/3; i<=h/3+3; i++) { if(i!=0 && i<h) { a=i*w; b=(h-i)/2*w; c=(h*w-a-b); b1=(w/2)*(h-i); c1=h*w-a-b1; m=max(a...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s254735117
p03715
C++
#include <bits/stdc++.h> using namespace std; long long int h, w; long long int ans=100000000000000; int main() { cin >> h >> w; if (h%3==0 || w%3==0) ans = 0; for (int i = 1; i < w; ++i) ans = min({ans, max(abs(h*i - (w-i)*(h/2)), abs(h*i - (w-i)*(h/2+h%2)), h%2 ? w-i : 0)}); for (int i = 1; i < h; ++i) ans = ...
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/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Com...
s050930035
p03715
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 SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); #define ll long long #define pb(a) p...
a.cc:16:14: error: 'llong' was not declared in this scope; did you mean 'ulong'? 16 | typedef pair<llong, llong> LP; | ^~~~~ | ulong a.cc:16:21: error: 'llong' was not declared in this scope; did you mean 'ulong'? 16 | typedef pair<llong, llong> LP; | ...
s958033167
p03715
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <numeric> using namespace std; int main(){ long long H, W; cin >> H >> W; if(H % 3 == 0 || W % 3 == 0){ cout << 0 << endl; } else{ long long minA = min(H, W); for(int w1 = 1; w1 < W; w1++...
a.cc: In function 'int main()': a.cc:35:26: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 35 | cout << minA << end; | ~~~~~~~~~~~~~^~~~~~ In file included from ...
s720400499
p03715
C++
##include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) int main(){ int w,h; cin>>w>>h; if(w%3==0||h%3==0) cout<<0; else{ if(w<h) swap(w,h); cout<<max(abs(h*((w+1)/3)-(w-(w+1)/3)*(h/2)),abs(h*((w+1)/3)-((w-(w+1)/3)*((h+1)/2)))); } }
a.cc:1:1: error: stray '##' in program 1 | ##include<bits/stdc++.h> | ^~ a.cc:1:3: error: 'include' does not name a type 1 | ##include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin>>w>>h; | ^~~ a.cc:7:24: error:...
s173896360
p03715
C++
#include <iostream> #include <cstdio> #include <queue> #include <vector> #include <stack> #include <string> #include <tuple> #include <random> #include <map> #include <set> #include <complex> #include <algorithm> #include <cassert> #include <iterator> #include <numeric> #include <cmath> #include <stdio.h> #include <fun...
a.cc: In function 'int main()': a.cc:59:40: error: redeclaration of 'll I3' 59 | ll X1= (ll)W/3,X2=(ll)(W-X1)/2,I3=W-X1-X2; | ^~ a.cc:53:40: note: 'll I3' previously declared here 53 | ll I1= (ll)H/3,I2=(ll)(H-I1)/2,I3=H-I1-I2; | ...
s565821919
p03715
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long H = sc.nextLong(); long W = sc.nextLong(); long ans = Integer.MAX_VALUE; if(H % 3 == 0 || W % 3 == 0) ans = 0; int a, b, c; for(int i = 0; i <= 1; i++) { a = (W/3+i)*H; b =...
Main.java:13: error: incompatible types: possible lossy conversion from long to int a = (W/3+i)*H; ^ Main.java:14: error: incompatible types: possible lossy conversion from long to int b = (W-i-W/3)*(H/2); ^ Main.java:16: error: incompatible types: possible lossy conversion from long...
s008784496
p03715
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
s612951306
p03715
C++
/*#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <array> #include <vector> #include <deque> #include <set> #include <map> #include <string> #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> */ #include <bits/stdc++.h> using namespace std; #define...
a.cc: In function 'int main()': a.cc:134:21: error: redeclaration of 'long long int mi' 134 | int mi = min({h * i,h/2*(w-i),(h-h/2)*(w-i)}); | ^~ a.cc:131:21: note: 'long long int mi' previously declared here 131 | int mi = min({h * i,(w-i)/2 * h,(w-(w-1)/2)...
s604363026
p03715
C++
#include <bits/stdc++.h> using namespace std; #define llong long long int #define ldouble long double #define rep(i, n) for (int i = 0; i < n; ++i) #define all(x) x.begin(), x.end() #define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr) const static int MOD = 1000000000 + 7; const static llong INF...
a.cc: In function 'int main(int, char**)': a.cc:40:36: error: 's' was not declared in this scope 40 | if ((W - w) % 2 == 1) {s | ^
s488771938
p03715
C++
#include<iostream> #include<cmath> #include<algorithm> using namespace std; int Case1(int h, int w) { if (h % 3 == 0) { return 0; } else { return w; } } /*long long min(long long a, long long b) { if (a > b) { return b; } else { return a; } }*/ long long Case2(int...
a.cc: In function 'long long int Case2(int, int)': a.cc:26:61: error: no matching function for call to 'min(long long int)' 26 | mindiff = min(mindiff, max(block[0], block[1]) - min(block[0] - block[2])); | ~~~^~~~~~~~~~~~~~~~~~~~~ In file includ...
s171186365
p03715
C++
#include<iostream> #include<cmath> using namespace std; int Case1(int h, int w) { switch (h % 3) { case 0: return 0; default: return w; } } long long Case2(int h, int w) { long long block[3]; long long mindiff = 1e10; //int j = 0; for (int i = 1; i < h; ++...
a.cc: In function 'long long int Case2(int, int)': a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 24 | sort(block, block + 3); | ^~~~ | sqrt a.cc: In function 'int main()': a.cc:45:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?...
s619428648
p03715
C++
#include<iostream> #include<cmath> using namespace std; int Case1(int h, int w) { switch (h % 3) { case 0: return 0; default: return w; } } long long Case2(int h, int w) { long long block[3]; long long mindiff = 1e10; //int j = 0; for (int i = 1; i < h; ++...
a.cc: In function 'long long int Case2(int, int)': a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 24 | sort(block, block + 3); | ^~~~ | sqrt a.cc: In function 'int main()': a.cc:45:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?...
s314058055
p03715
C++
#include "bits/stdc++.h" using namespace std; #define ll long long int #define rep(i,n) for( int i = 0; i < n; i++ ) #define rrep(i,n) for( int i = n; i >= 0; i-- ) #define REP(i,s,t) for( int i = s; i <= t; i++ ) #define RREP(i,s,t) for( int i = s; i >= t; i-- ) #define dump(x) cerr << #x << " = " << (x) << endl; #de...
a.cc: In function 'int main()': a.cc:19:40: error: no matching function for call to 'max(int, const long long int&)' 19 | cout << min(H % 3, W % 3) * max(2, min(H - H % 2, W - W % 2)) / 2 << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include...
s138328089
p03715
C++
#include<stdio.h> int main(){ long h,w,d,ans=1000000000,i,keep; scanf("%ld%ld",&h,&w); for(i=1,i<h;i++){ d=(w*i)-(((h-i)/2)*w); if(d<0){ if((h-i)%2==1) d-=w; d=-d; } if(d<ans) ans=d; d=(w*i)-(h-i)*(w/2); if(d<0){ if(w%2==1) d-=(h-i); d=-d; } if(d<ans) ans=d; } keep=h; h=w; w=keep; for(i=1,i<h;i++){ d=(w*i)-(((h-i)/2)*w...
a.cc: In function 'int main()': a.cc:5:16: error: expected ';' before ')' token 5 | for(i=1,i<h;i++){ | ^ | ; a.cc:26:16: error: expected ';' before ')' token 26 | for(i=1,i<h;i++){ | ^ | ;
s993084205
p03715
C++
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" #include <random> #include <unordered_map> #include <unordered_set> using namespace std; //呪文 #define DUMPOUT cerr #define dump(...) DUMPOUT<<" ";DUMPOUT<<#__VA_ARGS__<<" :["<<__LINE__<<":"<<__FUNCTION__<<"]"<<endl;DUMPOUT<<" ";dump_func(__VA_ARGS__) typed...
a.cc:90:2: error: stray '#' in program 90 | }#define _CRT_SECURE_NO_WARNINGS | ^ a.cc:90:3: error: 'define' does not name a type 90 | }#define _CRT_SECURE_NO_WARNINGS | ^~~~~~ a.cc:103:49: error: redefinition of 'template<class _KTy, class _Ty> std::ostream& operator<<(std::ostream&, const std::pai...
s013998462
p03715
C++
#include<bits/stdc++.h> #define INF 1e9 #define llINF 1e18 #define MOD 1e9+7 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long using namespace std; int main(){ ll h,w;cin>>h>>w; ll ans=llINF; if(h%3==0||w%3==0){ cout<<0<<endl; }else{ if(h%2&&w%2){ an...
a.cc: In function 'int main()': a.cc:37:25: error: expected primary-expression at end of input 37 | ans=min(ans,(h/2)*w- | ^ a.cc:37:25: error: expected '}' at end of input a.cc:33:10: note: to match this '{' 33 | }else{ | ^ a.cc:37:25: error: expected '}' at e...
s509967683
p03715
C++
#include<bits/stdc++.h> #define INF 1e9 #define llINF 1e18 #define MOD 1e9+7 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long using namespace std; int main(){ int h,w;cin>>h>>w; ll ans=llINF; if(h%3==0||w%3==0){ cout<<0<<endl; }else{ if(h%2&&w%2){ a...
a.cc: In function 'int main()': a.cc:19:14: error: no matching function for call to 'min(long long int&, int)' 19 | ans=min(ans,h*(w/2)-(h/2)*(w/2)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14...
s037391060
p03715
C++
#include <bits/stdc++.h> using namespace std; #define int long long; int f(int x, int y, int z) { return max({x,y,z})-min({x,y,z}); } int gs(int x,int y){ if(x*y%2==0)return x*y/2; if(x<y)swap(x,y); return x/2*y; } int gl(int x,int y){ if(x*y%2==0)return x*y/2; if(x<y)swap(x,y); return (x/2+1)*y; } signed...
a.cc:3:18: error: declaration does not declare anything [-fpermissive] 3 | #define int long long; | ^~~~ a.cc:4:1: note: in expansion of macro 'int' 4 | int f(int x, int y, int z) { | ^~~ a.cc:3:22: error: expected ')' before ';' token 3 | #define int long long; | ...
s469755073
p03715
C++
#include <bits/stdc++.h> using namespace std; #define int long long; int f(int x, int y, int z) { return max({x,y,z})-min({x,y,z}); } int gs(int x,int y){ if(x*y%2==0)return x*y/2; if(x<y)swap(x,y); return x/2*y; } int gl(int x,int y){ if(x*y%2==0)return x*y/2; if(x<y)swap(x,y); return (x/2+1)*y; } main()...
a.cc:3:18: error: declaration does not declare anything [-fpermissive] 3 | #define int long long; | ^~~~ a.cc:4:1: note: in expansion of macro 'int' 4 | int f(int x, int y, int z) { | ^~~ a.cc:3:22: error: expected ')' before ';' token 3 | #define int long long; | ...
s061338232
p03715
C++
#include <algorithm> #include <cstring> #include <deque> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <vector> using namespace std; using ll = long long; ll diff(ll a, ll b, ll c) { return max({a, b, c}) - min({a, b, c}); } int main() { ll H, W; cin >> H >> W; l...
a.cc: In function 'int main()': a.cc:33:9: error: 'rem' was not declared in this scope; did you mean 'res'? 33 | if (rem >= 2) { | ^~~ | res a.cc:34:10: error: redeclaration of 'll rem' 34 | ll rem = W - w; | ^~~ a.cc:33:9: note: '<typeprefixerror>rem' previous...
s035241634
p03715
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll solve(int h, int w) { ll Sa, Sb, Sc; for(int i=1; i<h; i++) { } } int main(void) { ll h, w, ans; cin >> h >> w; ans = h * w; for(int k=0;k<2;k++){ for(int i=1;i<h;i++){ int s1=i*w; int s2=(...
a.cc: In function 'll solve(int, int)': a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type] 11 | } | ^ a.cc: In function 'int main()': a.cc:23:18: error: no matching function for call to 'min(ll&, int&)' 23 | ans=min(ans,tmp); | ~~~^~~~~~~~~ I...
s906124206
p03715
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.
s988511431
p03715
C++
#include <iostream> #include <algorithm> #include <utility> using namespace std; int H, W; long long res = 1000000000; int solve() { for (int i = 1; i <= H - 1; ++i) { long long min_val, max_val; min_val = (long long) i * W; max_val = (long long) i * W; int separated_width; ...
a.cc: In function 'int solve()': a.cc:39:1: warning: no return statement in function returning non-void [-Wreturn-type] 39 | } | ^ a.cc: In function 'int main()': a.cc:49:9: error: no matching function for call to 'swap(int*, int*)' 49 | swap(&H, &W); | ~~~~^~~~~~~~ In file included from /usr/...
s218592030
p03715
C++
#include<iostream> #include<algorithm> using namespace std; int check(int a,int b){ int c[3]; int s[2]; c[0]=(a/3)*b; c[1]=(a-a/3)*(b/2); c[2]=a*b-c[0]-c[1]; s[0]=max(c[0],c[1],c[2])-min(c[0],c[1],c[2]); c[0]=(a/3+1)*b; c[1]=(a-a/3-1)*(b/2); c[2]=a*b-c[0]-c[1]; s[1]=max(c[0],c[1],c[2])-min(c[0],c[1],c[2]); ...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s598013519
p03715
C++
#include <iostream> #include <algorithm> #include <vector> long long int mymax(long long int a1, long long int a2, long long int a3) { if (abs(a1 - a2) > abs(a2 - a3)) { if (abs(a1 - a2) > abs(a1 - a3)) return (a1 - a2); else return abs(a1 - a3); } else { if (abs(a2 - a3) > abs(a1 - a3)) return abs(a2...
a.cc: In function 'int main()': a.cc:36:29: error: 'ceil' was not declared in this scope 36 | h = ceil(h0 / 3.0); | ^~~~ a.cc:66:37: error: 'ceil' was not declared in this scope 66 | h = ceil( h0 / 3.0); | ...
s751540054
p03715
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...
main.c:1:10: fatal error: vector: No such file or directory 1 | #include <vector> | ^~~~~~~~ compilation terminated.
s496002435
p03715
C++
#include <stdio.h> #include <algorithm> #include <memory.h> #include <iostream> #include <vector> #include <map> #include <deque> // Shabdan Batyrkulov using namespace std; #define pb push_back #define fr first #define sc second #define mk make_pair #define ll long long #define ld long double #define vi vector...
a.cc: In function 'int main()': a.cc:38:41: error: call of overloaded 'abs(long long unsigned int)' is ambiguous 38 | mn = min(mn, abs(mxx - mnn)); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/incl...
s921077790
p03715
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<queue> #include<map> #include<algorithm> #include<set> #include<complex> #include<string> #include<cstring> using namespace std; #define rep2(x,from,to) for(long long x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) #define INF 1000000...
a.cc: In function 'int main()': a.cc:35:22: error: no matching function for call to 'min(long long int&, int)' 35 | m=min(m,0); | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s123144949
p03715
C++
h,w=gets.split.map(&:to_i) ans=Array.new(6) if h%3==0 || w%3==0 answer=0 else k=h#とする mul=h*w trip=mul/3 #6 for i in 0..2 green=(trip/h+i)*h blue=(w-(trip/h+i))*(h/2) red=mul-green-blue if green==0 || blue==0 || red==0 next end num= (green-blue).abs > (green-red).abs ? blue : red ans[i]=...
a.cc:6:12: error: stray '#' in program 6 | k=h#とする | ^ a.cc:8:20: error: stray '#' in program 8 | trip=mul/3 #6 | ^ a.cc:9:18: error: too many decimal points in number 9 | for i in 0..2 | ^~~~ a.cc:22:18: error: too man...
s043491540
p03715
Java
import java.util.*; public class C { public static int bunkatsu(int h, int w){ int smin = Integer.MAX_VALUE; for (int ha = 1; ha < h; ha++){ // yoko int[] s = new int[3]; s[0] = ha * w; int wb = w/2; s[1] = (h-ha)*wb; s[2] = (h-ha)*(w-wb); Arrays.sort(s); int t...
Main.java:3: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s601005239
p03715
C++
#include<iostream> #include<math.h> #include<set> #include<algorithm> #include<vector> #include<iomanip> using namespace std; int ans = INT_MAX; static long parseans(long j, long l) { string k = ""; long cur = 0; for (int i = (int) j; i <= l; ++i) { cur *= 10; cur += k[i] - '0'; } ...
a.cc:10:11: error: 'INT_MAX' was not declared in this scope 10 | int ans = INT_MAX; | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 6 | #include<iomanip> +++ |+#include <climits> 7 | using namespace std;
s548997016
p03715
C++
#include <iostream> #include <algorithm> using namespace std; int test(int h,int w,int ans){ int a[3]; a[0]=x*w; a[1]=(h-x)*(w/2); a[2]=(h-x)*(w-(w/2)); sort(a,a+3); if((a[2]-a[0])<ans){ ans=a[2]-a[0]; } a[0]=(x+1)*w; a[1]=(h-x-1)*(w/2); a[2]=(h-x-1)*(w-(w/2)); sort(a,a+3); if((a[2]-a[0])<...
a.cc: In function 'int test(int, int, int)': a.cc:7:8: error: 'x' was not declared in this scope 7 | a[0]=x*w; | ^ a.cc: At global scope: a.cc:27:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 27 | main(){ | ^~~~
s491643651
p03715
C++
#include <iostream> #include <algorithm> using namespace std; int test(int h,int w,int ans){ a[0]=x*w; a[1]=(h-x)*(w/2); a[2]=(h-x)*(w-(w/2)); sort(a,a+3); if((a[2]-a[0])<ans){ ans=a[2]-a[0]; } a[0]=(x+1)*w; a[1]=(h-x-1)*(w/2); a[2]=(h-x-1)*(w-(w/2)); sort(a,a+3); if((a[2]-a[0])<ans){ an...
a.cc: In function 'int test(int, int, int)': a.cc:6:3: error: 'a' was not declared in this scope 6 | a[0]=x*w; | ^ a.cc:6:8: error: 'x' was not declared in this scope 6 | a[0]=x*w; | ^ a.cc: At global scope: a.cc:26:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wretur...
s787317173
p03715
C++
#include <iostream> #include <algorithm> using namespace std; int test(int h,int w,int ans){ a[0]=x*w; a[1]=(h-x)*(w/2); a[2]=(h-x)*(w-(w/2)); sort(a,a+3); if((a[2]-a[0])<ans){ ans=a[2]-a[0]; } a[0]=(x+1)*w; a[1]=(h-x-1)*(w/2); a[2]=(h-x-1)*(w-(w/2)); sort(a,a+3); if((a[2]-a[0])<ans){ an...
a.cc: In function 'int test(int, int, int)': a.cc:6:3: error: 'a' was not declared in this scope 6 | a[0]=x*w; | ^ a.cc:6:8: error: 'x' was not declared in this scope 6 | a[0]=x*w; | ^ a.cc: At global scope: a.cc:26:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wretur...
s098131715
p03715
C++
#include <bits/stdc++.h> using namespace std; typedef long l; l h,w,n,i; k(l a,l b){for(i=0;i<a;i++)n=min(n,max(i*b,(b/2+(b%2?1:0))*(a-i))-min(i*b,(b/2)*(a-i)));} main(){scanf("%d%d",%h,%w),n=h%3&&w%3?min(h,w):0,k(h,w),k(w,h),cout<<n;}
a.cc:5:1: error: ISO C++ forbids declaration of 'k' with no type [-fpermissive] 5 | k(l a,l b){for(i=0;i<a;i++)n=min(n,max(i*b,(b/2+(b%2?1:0))*(a-i))-min(i*b,(b/2)*(a-i)));} | ^ a.cc: In function 'int k(l, l)': a.cc:5:89: warning: no return statement in function returning non-void [-Wreturn-type] 5 | k(l ...
s046236604
p03715
Java
package test; import java.util.Scanner; public class ChocolateBar { public static double CutBar(int H, int W) { if (H*W%3==0) return 0; else if(H<W) return H*Math.floor(W/2)-(W-Math.floor(W/2))*Math.floor(H/2); else return W*Math.floor(H/2)-(H-Math.floor(H/2))*Math.floor(W/2); } public stati...
Main.java:5: error: class ChocolateBar is public, should be declared in a file named ChocolateBar.java public class ChocolateBar { ^ 1 error
s334183434
p03715
Java
int x=H; int y=W; if(H*W%3==0) return 0; else if(H<<W) return H*[W/2]-(W-[W/2])*[H/2]; else return [H/2]*W-(H-[H/2])*[W/2];
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. int x=H; ^ (use --enable-preview to enable unnamed classes) Main.java:3: error: class, interface, enum, or record expected if(H*W%3==0) return 0; ^ Main.java:4: error: class, interface, enum, or record expected else if(H<<W) return...
s115561338
p03715
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <cctype> #include <iostream> #include <sstream> #include <algorithm> #include <string> #include <string.h> #include <utility> #include <vector> #include <map> #include <set> #include <queue> #include <stack> using namespace std; typedef long long ll; #ifn...
a.cc: In function 'int main()': a.cc:75:79: error: expected ')' before ';' token 75 | printf("%lld\n", min(search(longer, shorter), search(shorter, longer)); | ~ ^ | ...
s034015244
p03715
C++
#include <iostream> using namespace std; long minsub(long a, long b, long c) { long min, max; if (a < b) { min = a; max = b; } else { min = b; max = a; } if (c < min) { min = c; } if (max < c) { max = c; } return...
a.cc: In function 'int main()': a.cc:42:21: error: 'LONG_MAX' was not declared in this scope 42 | long mins = LONG_MAX; | ^~~~~~~~ a.cc:2:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |...
s859572116
p03715
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<math.h> #include<string> #include<string.h> #include<stack> #include<queue> #include<vector> #include<utility> #include<set> #include<map> #include<stdlib.h> #include<iomanip> using namespace std; #define ll long long #define ld long do...
a.cc: In function 'int main()': a.cc:45:12: error: no matching function for call to 'min(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)' 45 | ans=min(ans,v[2]-v[0]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /us...
s803213618
p03715
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<math.h> #include<string> #include<string.h> #include<stack> #include<queue> #include<vector> #include<utility> #include<set> #include<map> #include<stdlib.h> #include<iomanip> using namespace std; #define ll long long #define ld long do...
cc1plus: error: '::main' must return 'int' a.cc: In function 'int main()': a.cc:46:12: error: no matching function for call to 'min(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)' 46 | ans=min(ans,v[2]-v[0]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/...
s529037997
p03715
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> ii; const int N=3e2+5; const ll inf=2e15; const ll mod=1e9+7; //题意:n*m地图 n,m<=100,起点S,终点T 'o'表示叶子,每次可以跳到同行或者同列的'o'上,问最少删掉多少个'o'使得S无法到达T? //最小割模型,先把图变为二分图,每行每列加上源点和汇点,两边点分别为1~n,1~m //对叶子'o'(x,y):x-y连接一条边 表示第x行的叶子可以跳到第y列 容量为1:表示删除(...
a.cc: In function 'll bfs()': a.cc:52:23: error: reference to 'end' is ambiguous 52 | if(t==end) | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166, from a.cc:1: /usr/include/c++/14/valarray:1265:5: note: candidates are: 'te...
s654432302
p03715
C++
import java.util.*; public class Main { /* * default function * */ int ni() { return cin.nextInt(); } long nl() { return cin.nextLong(); } String line() { return cin.nextLine(); } void println(String str) { System.out.println(str); } void print(String str) { System.out.print(str); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s946636441
p03715
C++
#include<iostream> using namespace std; int main(){ long int H,W; cin>>H>>W; long int minn=1000000000; long int s1,s2,s3; if(H%3==0||W%3==0) {cout<<0<<endl; return 0;} for(int i = 1; i < W; ++i) { s1 = i * H; s2 = max(((W - i) / 2) * H, (W - i) * (H/ 2)); s3 = (W - i) * H - s2; minn = mi...
a.cc: In function 'int main()': a.cc:19:37: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 19 | minn = min(minn, max({s1, s2, s3}) - min({s1, s2, s3})); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s418577244
p03715
C++
#include<iostream> using namespace std; int main(){ long int H,W; cin>>H>>W; long int minn=1000000000; long int s1,s2,s3; if(H%3==0||W%3==0) {cout<<0<<endl; return 0;} for(int i = 1; i < W; ++i) { s1 = i * H; s2 = max(((W - i) / 2) * H, (W - i) * (H/ 2)); s3 = (W - i) * H - s2; minn = mi...
a.cc: In function 'int main()': a.cc:19:39: error: 'a1' was not declared in this scope; did you mean 's1'? 19 | minn = min(minn, max({a1, a2, a3}) - min({a1, a2, a3})); | ^~ | s1 a.cc:19:43: error: 'a2' was not de...
s595458833
p03715
C++
#include<iostream> using namespace std; int main(){ long int H,W; cin>>H>>W; long int minn=1000000000; long int s1,s2,s3; if(H%3==0||W%3==0) {cout<<0<<endl; return 0;} //divide W for(long int i=1;i<H;i++){ s1=W*i; s3=max((H-i)*(W/2),W*(H-i)/2); s2=W*(H-i)-s3; long int maxs=max(s1,s2...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s323866937
p03715
C++
#include<iostream> using namespace std; int main(){ long int H,W; cin>>H>>W; long int minn=1000000000; long int s1,s2,s3; if(H%3==0||W%3==0) {cout<<0<<endl; return 0;} //divide W for(long int i=1;i<H;i++){ s1=W*i; s3=max((H-i)*(W/2),W*(H-i)/2); s2=W*(H-i)-s3; long int maxs=max(s1,s2...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s291265135
p03715
C++
#include<iostream> using namespace std; int main(){ long int H,W; cin>>H>>W; long int minn=1000000000; long int s1,s2,s3; if(H%3==0||W%3==0) {cout<<0<<endl; return 0;} //divide W for(long int i=1;i<=H/2;i++){ s1=W*i; s3=max((H-i)*(W/2),W*((H-i)/2)); s2=(H-i)*(W-W/2); long int maxs=m...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s424009393
p03715
C++
#include<iostream> using namespace std; int main(){ long int H,W; cin>>H>>W; long int minn=INT_MAX; long int s1,s2,s3; if(H%3==0||W%3==0) {cout<<0<<endl; return 0;} //divide W for(long int i=1;i<H;i++){ s1=W*i; s3=(H-i)*(W/2); s2=(H-i)*(W-W/2); long int maxs=max(s1,s2); long int...
a.cc: In function 'int main()': a.cc:9:17: error: 'INT_MAX' was not declared in this scope 9 | long int minn=INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include<iostream> +++ |+#include <cli...
s398709638
p03715
C++
#include<iostream> using namespace std; int main(){ long int H,W; cin>>H>>W; long int minn=INT_MAX; long int s1,s2,s3; if(H%3==0||W%3==0) {cout<<0<<endl; return 0;} //divide W for(long int i=1;i<=H/2;i++){ s1=W*i; s3=(H-i)*(W/2); s2=(H-i)*(W-W/2); long int maxs=max(s1,s2); long ...
a.cc: In function 'int main()': a.cc:9:17: error: 'INT_MAX' was not declared in this scope 9 | long int minn=INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include<iostream> +++ |+#include <cli...
s674384304
p03715
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { int chokorateBlock[] = new int[2]; int firstBlock[] = new int[2];; int secondBlock[] = new int[2];; int shirdBlock[] = new int[2];; int secondAndShirdBlock[] = new int[2]; public static void mai...
Main.java:122: error: reached end of file while parsing } ^ 1 error
s786426017
p03715
C++
a;f(H,W){for(long i=H,x,y,z,t;i--;a=t<a?t:a)x=(H-i)*W,y=W/2*i,z=(W+1)/2*i,t=x>z?x-y:x<y?z-x:i;}main(H,W){scanf("%d%d",&H,&W);printf("%d\n",H%3&&W%3?a=H<W?H:W,f(H,W),f(W,H),a:0);}
a.cc:1:1: error: 'a' does not name a type 1 | a;f(H,W){for(long i=H,x,y,z,t;i--;a=t<a?t:a)x=(H-i)*W,y=W/2*i,z=(W+1)/2*i,t=x>z?x-y:x<y?z-x:i;}main(H,W){scanf("%d%d",&H,&W);printf("%d\n",H%3&&W%3?a=H<W?H:W,f(H,W),f(W,H),a:0);} | ^ a.cc:1:4: error: expected constructor, destructor, or type conversion before '(' ...
s445400770
p03715
C++
#include <vector> #include <stack> #include <cstdlib> #include <cstdio> #include <string> #include <cstring> using namespace std; #define INF 1000000 int main() { long H, W; long ans = INF; cin >> H >> W; if ( H % 3 == 0 || W % 3 == 0) { cout << 0 << endl; return 0; } for...
a.cc: In function 'int main()': a.cc:14:5: error: 'cin' was not declared in this scope 14 | cin >> H >> W; | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include <cstring> +++ |+#include <iostream> 7 | using na...
s936274157
p03715
C++
#include <vector> #include <stack> #include <cstdlib> #include <cstdio> #include <string> #include <cstring> using namespace std; #define INF 1000000 int main() { long H, W; long ans = INF; cin >> H >> W; if ( H % 3 == 0 || W % 3 == 0) { cout << 0 << endl; return 0; } for...
a.cc: In function 'int main()': a.cc:14:5: error: 'cin' was not declared in this scope 14 | cin >> H >> W; | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include <cstring> +++ |+#include <iostream> 7 | using na...
s857181824
p03715
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ChokorateBar { int chokorateBlock[] = new int[2]; int firstBlock[] = new int[2];; int secondBlock[] = new int[2];; int shirdBlock[] = new int[2];; int secondAndShirdBlock[] = new int[2]; public static void m...
Main.java:5: error: class ChokorateBar is public, should be declared in a file named ChokorateBar.java public class ChokorateBar { ^ 1 error
s236723492
p03715
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ChokorateBar { int chokorateBlock[] = new int[2]; int firstBlock[] = new int[2];; int secondBlock[] = new int[2];; int shirdBlock[] = new int[2];; int secondAndShirdBlock[] = new int[2]; public static void m...
Main.java:5: error: class ChokorateBar is public, should be declared in a file named ChokorateBar.java public class ChokorateBar { ^ 1 error