submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s745022903
p03713
C
#include <stdio.h> #include<math.h> int main() { int i,H,h,W,w,s,sa,sb,sc,max=0; long int smin,min,t; scanf("%d %d",&H,&W); smin = H*W; min =H*W; for(i=1;i<H;i++){sa = i*W; max=sa; min=sa; w = W/2; sb = w *(H-i); sc = (H-i)*(W-w); if(max<=sb){max=sb;}...
main.c: In function 'main': main.c:7:16: error: stray '\343' in program 7 | smin = H*W;<U+3000>min =H*W; | ^~~~~~~~
s536338130
p03713
C++
#include <stdio.h> #include<math.h> int abs(int); int main() { int i,H,W,sa,sb,sc,min=0,t; scanf("%d %d",&H,&W); for(i=1;i<H;i++){sa = i*W; sb = W/2 *(H-i); sc = W*H - sa-sb; t = abs(sa-sb); if(abs(sb-sc)<t){t=abs(sb-sc);} if(abs(sc-sa)<t){t=abs(sc-sa);} if(mi...
a.cc: In function 'int main()': a.cc:40:14: error: expected '}' at end of input 40 | return 0; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s866156226
p03713
C++
#include <iostream> #include <cmath> using namespace std; typedef long long ll; #define INF 999999999 int main(){ ll H,W; cin >> H >> W; ll rec1, rec2, rec3; ll temp1 = INF; ll temp2 = INF; ll cand; for(int i=1;i<W-1;i++){ rec1 = H*i; rec2 = (W-i)*floor(H/2); rec...
a.cc: In function 'int main()': a.cc:21:19: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 21 | cand = max({rec1,rec2,rec3}) - min({rec1,rec2,rec3}); | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/...
s387733174
p03713
C++
#include <iostream> #include <cmath> ...
a.cc: In function 'int main()': a.cc:21:19: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 21 | cand = max({rec1,rec2,rec3}) - min({rec1,rec2,rec3}); | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/...
s511202625
p03713
Java
import java.util.*; public class Main { private int[] trarray = new int[3]; private int minDiv; public static void main(String []args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); int n = sc.nextInt(); Main soln = new Main(); soln.minDiv = m*n; int[] temp = new int[3]; for(int i=1; i...
Main.java:41: error: ';' expected int j = n/2 ^ 1 error
s483743979
p03713
C++
#include <iostream> #include <algorithm> #define ll long long int using namespace std; ll H,W; ll maxfun(int a, int b , int c){ ll result; a>b? (result = a):(result =b); (result >c)? (result):(result = c); return result; } ll minfun(int a, int b , int c){ ll result; a<b? (result = a):(result =b); re...
a.cc: In function 'int main()': a.cc:41:46: error: expected '}' at end of input 41 | if(result> (max-min)) result = max-min; | ^ a.cc:35:36: note: to match this '{' 35 | for(int j = W/3; j< W/2+1; j++){ | ^ a.cc:...
s775292251
p03713
C
#include<stdio.h> int main(void) { int h, w; //0:height,1:width scanf("%d%d", &h, &w); switch ((h % 6)*(w * 3 + 7)) { case 0: //h%3 == 0 || w%3 == 0 case 7: case 14: case 16: case 21: case 28: case 30: case 32: case 35: case 39: case 48: case 57: case 64: case 66: case 80: printf("0"); break; ca...
main.c: In function 'main': main.c:40:30: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 40 | printf("%d", min(h, w) / 2); | ^~~ | main main.c:46:41: error: implicit declaratio...
s839987791
p03713
C++
#include <iostream> #include <complex> #include <limits> int solution1(int h, int w) { int firstLine = h / 3, secondLine = (h + firstLine) / 2; int s1 = firstLine * w, s2 = (secondLine - firstLine) * w, s3 = (h - secondLine) * w; int max = 0; if (abs(s1 - s2) > max) max = abs(s1 - s2); if (abs(s2 - s3) > max...
a.cc: In function 'int main()': a.cc:66:19: error: 'INT_MAX' was not declared in this scope 66 | int max = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <complex> +++ |+#include...
s479962932
p03713
C++
#include <iostream> #include <complex> int solution1(int h, int w) { int firstLine = h / 3, secondLine = (h + firstLine) / 2; int s1 = firstLine * w, s2 = (secondLine - firstLine) * w, s3 = (h - secondLine) * w; int max = 0; if (abs(s1 - s2) > max) max = abs(s1 - s2); if (abs(s2 - s3) > max) max = abs(s2 -...
a.cc: In function 'int main()': a.cc:65:19: error: 'INT_MAX' was not declared in this scope 65 | int max = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <complex> +++ |+#include...
s039899339
p03713
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); long h = cin.nextLong(); long w = cin.nextLong(); long ans = Math.min(func1(h, w), func2(h, w)); ans = Math.min(ans, func2(w, h)); System.out.println(ans); } long func1(long h, l...
Main.java:24: error: ';' expected min_dif = Math.min(Math.abs(w * i - w / 2 * (h - i)), min_dif ) ^ 1 error
s693331550
p03713
C++
#include <iostream> #include <algorithm> using namespace std; int func1(int h, int w){ if(h % 3 == 0|| w % 3 == 0){ return 0; } return min(h, w); } int func2(int h, int w){ int min_dif = h * w; if(w % 2 == 0){ for (int i = 1; i < h; ++i) { min_dif = min(abs(w * i - w / 2 * (h - i)), min_dif); } }el...
a.cc: In function 'int main()': a.cc:32:16: error: 'h' was not declared in this scope 32 | cin >> h >> w; | ^ a.cc:32:21: error: 'w' was not declared in this scope 32 | cin >> h >> w; | ^
s106153652
p03713
C++
#include<iostream> #include<string> #include<vector> #include<stdio.h> #include<sstream> #include<list> #include <algorithm> using namespace std; #define INT32_MAX 2147483647 #define ul unsigned long long ul choco(ul w, ul h) { ul dmin1; if (w % 3 == 0) { dmin1 = 0; } else { dmin1 = INT32_MAX; double half ...
a.cc: In function 'long long unsigned int choco(long long unsigned int, long long unsigned int)': a.cc:23:29: error: 'floor' was not declared in this scope 23 | ul h2 = (ul)floor(half); | ^~~~~ a.cc:24:29: error: 'ceil' was not declared in this scope 24 | ...
s261727860
p03713
C++
#include<iostream> #include<string> #include<vector> #include<stdio.h> #include<sstream> #include<list> #include <algorithm> using namespace std; #define ul unsigned long long ul choco(ul w, ul h) { ul dmin1; if (w % 3 == 0) { dmin1 = 0; } else { dmin1 = INT_MAX; double half = (double)h / 2; ul h2 = (ul)...
a.cc: In function 'long long unsigned int choco(long long unsigned int, long long unsigned int)': a.cc:20:25: error: 'INT_MAX' was not declared in this scope 20 | dmin1 = INT_MAX; | ^~~~~~~ a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixa...
s365623802
p03713
C
a;f(H,W){for(long long i=H,x,y,z,t;i--;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*W%3?a=H<?W,f(H,W),f(W,H),a:0);}
main.c:1:1: warning: data definition has no type or storage class 1 | a;f(H,W){for(long long i=H,x,y,z,t;i--;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*W%3?a=H<?W,f(H,W),f(W,H),a:0);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of '...
s452797601
p03713
C++
#include <iostream> #include <algorithm> #include <vector> #include <cstdio> #include <string> #include <set> #include <map> #include <queue> #include <stack> #include <cmath> #include <functional> #include <numeric> #include <iomanip> #define fi first #define se second #define fcout(n) cout<<fixed<<setprecision((n)) #...
a.cc: In function 'int main()': a.cc:41:26: error: expected primary-expression before ',' token 41 | sc = max(,abs(s1-s3)); | ^
s018491320
p03713
C++
#include <iostream> #include <stdlib.h> #include <string> using namespace std; long long cal_mem(long long H, long long W){ long long ans_1, ans_2, ans_3; long long tmp_a, tmp_b, tmp_c; tmp_a = (H / 3) * W; tmp_b = (H - (H/3)) * (W / 2)); tmp_c = H * W - (tmp_a + tmp_b); ans_1 = max(max(tmp_...
a.cc: In function 'long long int cal_mem(long long int, long long int)': a.cc:13:34: error: expected ';' before ')' token 13 | tmp_b = (H - (H/3)) * (W / 2)); | ^ | ;
s404336099
p03713
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main() { int h, w; cin >> h >> w; if (h % 3 == 0 || w % 3 == 0)cout << 0 << endl; else if (h % 2 == 0 && w % 2 == 0)cout << min(h, w) / 2 << endl; else if (h % 2 == 0)cout << h / 2 << endl; else if (w % 2 == 0)cout << w / 2 << endl; ...
a.cc: In function 'int main()': a.cc:11:48: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 11 | else cout << (h - 1) / 2 + (w - 1) / 2 < endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/i...
s945978698
p03713
Java
import java.util.Scanner; /* * 問題文 * 縦 H ブロック、横 W ブロックの板チョコがあります。 * すぬけ君は、この板チョコをちょうど 3 つのピースに分割しようとしています。 * ただし、各ピースはブロックの境目に沿った長方形でなければなりません。 * すぬけ君は、3 つのピースの面積 (ブロック数) をできるだけ均等にしようとしています。 * 具体的には、3 つのピースの面積の最大値を Smax、最小値を Smin としたとき、Smax−Smin を最小化しようとしています。 * Smax−Smin の最小値を求めてください。 * * 入力は以下の形式で標準入力から与えられ...
Main.java:16: error: class ChocolateBar is public, should be declared in a file named ChocolateBar.java public class ChocolateBar { ^ 1 error
s669433956
p03713
C++
#include <iostream> #include <algorithm> using namespace std; int calc(int a, int b, int c) { int x = max(a, b, c); int y = min(a, b, c); return abs(x - y); } int main(void) { int H, W; cin >> H >> W; int min = 999999999; int S1, S2, S3, ans; for (int j = 0; j < 2; ++j) { for (int i = 1; i < H; ++i) { ...
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...
s777311654
p03713
C++
#include <iostream> #include <stdlib.h> #include <string> using namespace std; long long cal_mem(long long H, long long W){ long long ans_1, ans_2, ans_3; ans_1 = abs((H / 3) * W - (H - (H/3)) * (W / 2)); ans_2 = abs((H / 3 + 1) * W - (H - (H/3 + 1)) * (W / 2)); ans_3 = (H / 3 + 1) * W - (H / 3) * W...
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...
s239737355
p03713
C++
#include <iostream> #include <stdlib.h> #include <string> using namespace std; long long cal_mem(long long H, long long W){ long long ans_1, ans_2, ans_3; ans_1 = abs((H / 3) * W - (H - (H/3)) * (W / 2)); ans_2 = abs((H / 3 + 1) * W - (H - (H/3 + 1)) * (W / 2)); ans_3 = (H / 3 + 1) * W - (H / 3) * W...
a.cc: In function 'long long int cal_mem(long long int, long long int)': a.cc:12:42: error: expected ';' before 'return' 12 | ans_3 = (H / 3 + 1) * W - (H / 3) * W | ^ | ; 13 | return min(ans_1, ans_2, ans_3); ...
s839997136
p03713
C++
#include <stdio.h> #include <iostream> #include <algorithm> using namespace std; int main(void){ long long H, W; cin >> H >> W; if(H % 3 == 0 || W % 3 == 0){ cout << 0 << endl; } else { long long mini = LLONG_MAX; for(long long i=1; i<H; i++){ long long a = i * W; ...
a.cc: In function 'int main()': a.cc:12:26: error: 'LLONG_MAX' was not declared in this scope 12 | long long mini = LLONG_MAX; | ^~~~~~~~~ a.cc:4:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <alg...
s566023675
p03713
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; #define MOD 1000000007 using lli = long long int; using ulli = unsigned long long int; #define EVEL 1 #ifndef EVEL #define dbug(X) std::cout << #X << ":" <<X<<" " ; #define dbugf(s) std::cout << s << " "; #define dbugln std::cout<<"\n"; #...
a.cc: In function 'int main()': a.cc:33:50: error: expected ')' before ';' token 33 | S = abs(l*W - ((H-l)/2)*W; | ~ ^ | ) a.cc:35:52: error: expected ')' before ';' token 35 | ...
s760064503
p03713
C++
int main() { long long H, W; long long tmpMax, tmpMin; long long x, y, xx, yy; long long result, tmpRes1, tmpRes2, tmpResX, tmpResY; scanf("%lld %lld", &H, &W); //HまたはWが3で割りきれるときは等分割できるので0 if ((H % 3 == 0) || (W % 3 == 0)) { result = 0; printf("%lld\n", result); return 0; } tmpRes1 = 100000; tmpRes2 =...
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf' was not declared in this scope 7 | scanf("%lld %lld", &H, &W); | ^~~~~ a.cc:12:17: error: 'printf' was not declared in this scope 12 | printf("%lld\n", result); | ^~~~~~ a.cc:1:1: note: 'printf' i...
s132905295
p03713
C++
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <algorithm> using namespace std; int main() { long h, w; long x, y; long s1, s2, s3; long ms1, ms2; long p1, p2; long d1,d2; cin >> h >> w; //縦 x = ((h * w) / 3) / h; y = h / 2; s1 = h * x; ...
a.cc: In function 'int main()': a.cc:98:12: error: 'd' was not declared in this scope; did you mean 'd2'? 98 | s1=d/3; | ^ | d2
s703672475
p03713
C++
#include<stdio.h> //みっつの最小値 int hantei(int x,int y, int z){ if(x>=y){ if(x>=z){ if(y>=z){ //x,y,z return x-z; } else{ //x z y return x-y; } } else{ //z x y return z-y; } } else if(y>=z){ if (x>=z){ // y x z return y-z; } else { // y z x return y-x; } } else{ ...
a.cc: In function 'int main()': a.cc:41:9: error: expected ',' or ';' before 'int' 41 | int ima; | ^~~ a.cc:53:33: error: 'ima' was not declared in this scope 53 | ima=hantei(S1,S2,S3); | ^~~
s240957883
p03713
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); int S = h * w; int Smax, Smin; int[] gap = new int[2]; int minigap, g = 0; int a, b, s1, s2, s3; if(S % 3 == 0) { ...
Main.java:58: error: variable minigap might not have been initialized if(minigap > gap[g]) { ^ Main.java:70: error: variable minigap might not have been initialized System.out.println(minigap); ^ 2 errors
s019865992
p03713
C++
#include <iostream> #include <algorithm> #include <queue> #include <vector> #include <string> using namespace std; int main(void){ long long h, w, maxA_tate, minA_tate,tateS,tateS1,tateS2,yokoS,yokoS1,yokoS2,maxB_yoko,minB_yoko; cin >> h >> w; if( (h*w) % 3 == 0 ){ cout << "0" << endl; retu...
a.cc: In function 'int main()': a.cc:36:32: error: expected primary-expression before '>' token 36 | if(h*(-2*w+3*i)-i) > 0 && (h*(-2*w+3*i)-i) % 2 == 0){ | ^
s003132196
p03713
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; vector<long long> number(3, 0); int dif(long long , long long, long long); int mini; int main() { long long H, W, res; cin >> H >> W; if (H % 3 == 0 || W % 3 == 0) { mini = 0; } else { if (H < W) { long long tmp = ...
a.cc:49:11: error: ambiguating new declaration of 'long long int dif(long long int, long long int, long long int)' 49 | long long dif(long long a, long long b, long long c) { | ^~~ a.cc:7:5: note: old declaration 'int dif(long long int, long long int, long long int)' 7 | int dif(long long , long ...
s541930157
p03713
C++
#include<iostream> #include<algorithm> using namespace std; long long n,m; int main() { cin>>n>>m; long long s[3]; if(n%3==0||m%3==0) if(n<2||m<2)break; cout<<0<<endl; else { long long r1=m/2; long long r2=m-r1; long long ans=1e11; for(int...
a.cc: In function 'int main()': a.cc:11:25: error: break statement not within loop or switch 11 | if(n<2||m<2)break; | ^~~~~ a.cc:13:5: error: 'else' without a previous 'if' 13 | else | ^~~~
s962917095
p03713
C++
#include<cstdio> int main(){ int h,w; int a = 0; scanf("%d %d", &h,&w); if(w>h){ int tmp=h; h=w; w=tmp; } if(!(h%3==0||w%3==0)){ if(h%2==0||w%2==0){ // if(w%2==1){ // int tmp=h; // h=w; // w=tmp; // } int s=(h+1)/3; int ss=s*w-(h-s)*(w/2); ...
a.cc:45:1: error: extended character   is not valid in an identifier 45 |   | ^ a.cc:45:1: error: '\U00003000' does not name a type 45 |   | ^~
s002580612
p03713
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <numeric> #include <utility> #include <sys/time.h> using namespace std; void solve(long long h, long long w) { vector<long long> differs; long long min_of_3; long long max_of_3; if (h%3 == 0 || w%3 == 0) { st...
cc1plus: error: '::main' must return 'int'
s365864504
p03713
C++
#include <iostream> using namespace std; int main(void) { int H, W; cin >> H >> W; if (H % 3 == 0 || W % 3 == 0) { cout << "0" << endl; return 0; } long long min, max; if (H > W) { if (H % 3 == 2) { max = (H / 3 + 1)*W; H -= H / 3 + 1; if (W % 2 != 0 && H > W) { min = (H / 2)*W; } else...
a.cc: In function 'int main()': a.cc:29:39: error: 'round' was not declared in this scope 29 | min = round(H / 2.0)*W; | ^~~~~ a.cc:32:39: error: 'round' was not declared in this scope 32 | min = round(W / ...
s900519957
p03713
C++
#include <vector> #include <algorithm> #include <iostream> #include <chrono> #include<bitset> #include<deque> #include <map> #define vint vector<int> #define vint2 vector<vint> #define vchar vector<char> #define vchar2 vector<vchar> #define vchar3 vector<vchar2> #define pr pair<int,int> #define vpr vector<pr> #defin...
a.cc:18:18: error: '::main' must return 'int' 18 | #define int long int | ^~~ a.cc:75:1: note: in expansion of macro 'int' 75 | int main(){ | ^~~
s830426849
p03713
C++
#include<iostream> #include<algorithm> using namespace std; long long n,m; int main() { while(cin>>n>>m) { long long s[3]; if(n%3==0||m%3==0) cout<<0<<endl; else { long long r1=m/2; long long r2=m-r1; long long mind=INT_MAX,maxd=INT_MIN; long lon...
a.cc: In function 'int main()': a.cc:17:24: error: 'INT_MAX' was not declared in this scope 17 | long long mind=INT_MAX,maxd=INT_MIN; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include<alg...
s926169501
p03713
C++
#include <iostream> #include <map> #include <set> #include <vector> #include <stack> #include <queue> #include <deque> #include <stdio.h> #include <cmath> #include <sstream> #include <algorithm> #include <iomanip> #include <cassert> #define ll long long #define mp make_pair #define pb push_back #define f first #define...
a.cc: In function 'int main()': a.cc:37:19: error: 'h' was not declared in this scope 37 | ans = min(h, w); | ^ a.cc:37:22: error: 'w' was not declared in this scope 37 | ans = min(h, w); | ^
s043224032
p03713
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:40:36: error: no matching function for call to 'min(int64_t&, long unsigned int)' 40 | min_diff = std::min(min_diff, std::max({ a,b,c }) - std::min({ a,b,c })); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In fil...
s641374105
p03713
C++
#include<iostream> using namespace std; #include<vector> #include<map> #include<set> #include<algorithm> int main(){ long long int h,w; cin>>h>>w; if(h%3==0||w%3==0){ cout<<0<<endl; return 0; } long long int ans = h*w; for(int i = 1;i<h;i++){ vector<long long int> x(3); x[0]=i*w; long...
a.cc: In function 'int main()': a.cc:43:6: warning: ignoring return value of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = long long int]', declared with attribute 'nodiscard' [-Wunused-result] 43 | min(ans,ans2); | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s067961141
p03713
C++
#include <iostream> #include <map> #include <set> #include <vector> #include <stack> #include <queue> #include <deque> #include <stdio.h> #include <cmath> #include <sstream> #include <algorithm> #include <iomanip> #define ll long long #define mp make_pair #define pb push_back #define f first #define s second #define v...
a.cc: In function 'int main()': a.cc:44:25: error: 'assert' was not declared in this scope 44 | assert(part1 + part2 + part3 == n * m); | ^~~~~~ a.cc:13:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' ...
s272200984
p03713
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <vector> #include <string> #include <queue> #include <cmath> #include <set> using namespace std; typedef long long ll; ll res=LLONG_MAX; void check(int x,int y) { for(int i=1;i<x;i++) { ll s1=(ll)i*y; ll ...
a.cc:17:8: error: 'LLONG_MAX' was not declared in this scope 17 | ll res=LLONG_MAX; | ^~~~~~~~~ a.cc:10:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 9 | #include <set> +++ |+#include <climits> 10 |
s975079177
p03713
C
#include<stdio.h> int main(){ int a.b; printf("%d\n",a*b%3); }
main.c: In function 'main': main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 3 | int a.b; | ^ main.c:3:14: error: expected expression before '.' token main.c:4:23: error: 'a' undeclared (first use in this function) 4 | printf("%d\n",a*b%3);...
s060765426
p03714
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <queue> #include <string> #include <map> #include <set> #include <stack> #include <tuple> #include <deque> #include <numeric> #include <bitset> #include <iomanip> #include <cassert> #include <chrono> #include <random> #include <limits>...
a.cc: In function 'int main()': a.cc:73:17: error: no matching function for call to 'std::multiset<int>::erase(std::multiset<int>::reverse_iterator)' 73 | st.erase(st.rbegin()); | ~~~~~~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/set:64, from a.cc:8: /usr/include/...
s415868323
p03714
C++
import sys import heapq def main(): N = int(input()) a = list(map(int, input().split())) left = a[0 : N] right = a[N*2 : N*3] for i in range(N): right[i] *= -1 left_sum = 0 right_sum = 0 heap_left = [] heap_right = [] for i in range(N): left_sum += left[i] heapq.heappush(heap_left, left[i]) righ...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s573078192
p03714
C++
N = int(input()) a = list(map(int, input().split())) left = a[0 : N] right = a[N*2 : N*3] for i in range(N): right[i] *= -1 left_sum = 0 right_sum = 0 heap_left = [] heap_right = [] for i in range(N): left_sum += left[i] heapq.heappush(heap_left, left[i]) right_sum += right[i] heapq.heappush(heap_right, right...
a.cc:1:1: error: 'N' does not name a type 1 | N = int(input()) | ^
s364993452
p03714
C++
def main(): N = int(input()) a = list(map(int, input().split())) left = a[0 : N] right = a[N*2 : N*3] for i in range(N): right[i] *= -1 left_sum = 0 right_sum = 0 heap_left = [] heap_right = [] for i in range(N): left_sum += left[i] heapq.heappush(heap_left, left[i]) right_sum += right[i] heapq...
a.cc:1:1: error: 'def' does not name a type 1 | def main(): | ^~~
s153179283
p03714
C++
import sys import heapq def main(): N = int(input()) a = list(map(int, input().split())) left = a[0 : N] right = a[N*2 : N*3] for i in range(N): right[i] *= -1 left_sum = 0 right_sum = 0 heap_left = [] heap_right = [] for i in range(N): left_sum += left[i] heapq.heappush(heap_left, left[i]) righ...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s532807753
p03714
C++
import sys import heapq def main(): N = int(input()) a = list(map(int, input().split())) left = a[0 : N] right = a[N*2 : N*3] for i in range(N): right[i] *= -1 left_sum = 0 right_sum = 0 heap_left = [] heap_right = [] for i in range(N): left_sum += left[i] heapq.heappush(heap_left, left[i]) righ...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:45:9: error: expected unqualified-id before 'for' 45 | for i in range(0, N + 1): | ^~~
s787834274
p03714
C++
#include <iostream> #include <vector> 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; for (int i = 0; i < N; ++i)...
a.cc: In function 'int main()': a.cc:14:5: error: 'priority_queue' was not declared in this scope 14 | priority_queue<long long, vector<long long>, greater<long long> > que1; | ^~~~~~~~~~~~~~ a.cc:3:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#incl...
s976344375
p03714
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> using namespace std; int main() { int n; cin >> n; vector<long long> v(n); for (int& i: v) cin >> i; vector<long long> ans(n + 1); long long left(0), right(0); priority_queue<long long> min_q; priority_queue<long lon...
a.cc: In function 'int main()': a.cc:12:22: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int' 12 | for (int& i: v) cin >> i; | ^
s114896514
p03714
C++
#include<bits/stdc++.h> using namespace std; ll ara[100005]; ll A[100005],B[100005]; void prll(multiset<ll>st) { for(auto it=st.begin();it!=st.end();it++) cout<<*it<<" "; cout<<endl; } #define inf -1000000000000000 int main() { ll n;cin>>n; for(ll i=0;i<3*n;i++)cin>>ara[i]; multiset<ll>st; ...
a.cc:4:1: error: 'll' does not name a type 4 | ll ara[100005]; | ^~ a.cc:5:1: error: 'll' does not name a type 5 | ll A[100005],B[100005]; | ^~ a.cc:6:20: error: 'll' was not declared in this scope 6 | void prll(multiset<ll>st) | ^~ a.cc:6:22: error: template argument 1 ...
s510678042
p03714
C++
#include <bits/stdc++.h> #define SIZE 300005 #define MOD 1000000007LL #define EPS 1e-10 #define INF 1<<29 #define LLINF 1LL<<60 #define REP(i,n) for(int i=0;i<n;i++) #define FOR(i,a,b) for(int i=a;i<=b;i++) #define DOWN(i,b,a) for(int i=b;i>=a;i--) #define SET(a,c) memset(a,c,sizeof a) #define BIT(i,j) ((i)>>(j))&1 #de...
a.cc:27:1: error: 'ac' does not name a type 27 | ac | ^~ a.cc: In function 'int main()': a.cc:31:12: error: 'N' was not declared in this scope 31 | cin >> N; | ^
s883633345
p03714
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); i++) #define ll long long using namespace std; int main(){ ll n;cin>>n; ll a[n]; ll lsums[100001]; ll rsums[100001]; lsums[0]=0, rsums[n]=0; rep(i,3*n)cin>>a[i]; priority_queue<int, vector<int>, greater<int>> lq; priority_queue<int> r...
a.cc: In function 'int main()': a.cc:42:15: error: no matching function for call to 'max(int&, long long int)' 42 | result=max(result, lsums[i+1]-rsums[i+1]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-li...
s636579683
p03714
C++
#include<bits/stdc++.h> #include<algorithm> #include<math.h> #include<iostream> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } const long long INF = 1LL << 60; using ll = long long; /****************************...
a.cc: In function 'int main()': a.cc:74:7: error: 'i' was not declared in this scope 74 | FOR(i,0,n+1){ | ^ a.cc:74:3: error: 'FOR' was not declared in this scope 74 | FOR(i,0,n+1){ | ^~~
s319844959
p03714
C++
#include<bits/stdc++.h> #include<algorithm> #include<math.h> #include<iostream> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } const long long INF = 1LL << 60; using ll = long long; /****************************...
a.cc: In function 'int main()': a.cc:36:7: error: 'i' was not declared in this scope 36 | FOR(i,0,3*n){ | ^ a.cc:36:3: error: 'FOR' was not declared in this scope 36 | FOR(i,0,3*n){ | ^~~
s750206450
p03714
C++
#include<bits/stdc++.h> #include<algorithm> #include<math.h> #include<iostream> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } const long long INF = 1LL << 60; using ll = long long; /****************************...
a.cc: In function 'int main()': a.cc:36:7: error: 'i' was not declared in this scope 36 | FOR(i,0,3*n){ | ^ a.cc:36:3: error: 'FOR' was not declared in this scope 36 | FOR(i,0,3*n){ | ^~~ a.cc:78:3: error: 'co' was not declared in this scope; did you mean 'cos'? 78 | co(Ans) | ...
s006586164
p03714
C++
#include <iostream> #include <tuple> #include <vector> #include <queue> #include <algorithm> int main(){ int N; std::cin >> N; std::vector<int> a_arr(3*N); for(int i = 0; i < 3*N; i++) std::cin >> a_arr[i]; std::priority_queue<int, std::vector<int>, std::function<bool(int,int)>> left([&](int l, int r){retu...
a.cc: In function 'int main()': a.cc:14:51: error: 'function' is not a member of 'std' 14 | std::priority_queue<int, std::vector<int>, std::function<bool(int,int)>> left([&](int l, int r){return a_arr[l]>a_arr[r];}), right([&](int l, int r){return a_arr[l]>a_arr[r];}); | ...
s508022058
p03714
C++
#include <iostream> #include <tuple> #include <vector> #include <queue> #include <functional> int main(){ int N; std::cin >> N; std::vector<int> a_arr(3*N); for(int i = 0; i < 3*N; i++) std::cin >> a_arr[i]; std::priority_queue<int, std::vector<int>, std::function<bool(int,int)>> left([&](int l, int r){ret...
a.cc: In function 'int main()': a.cc:20:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 20 | std::sort(right_index.begin(), right_index.end(), [&](int l, int r){return a_arr[l]>a_arr[r];}); | ^~~~ | qsort
s966251063
p03714
C++
#ifdef _DEBUG #include "MyLib.h" #else #define main_D main #include "bits/stdc++.h" #include <regex> #define _USE_MATH_DEFINES #include <math.h> #define FOR(i,s,e) for (int i = int(s); i < int(e); ++i) #define REP(i,e) FOR(i,0,e) #define INF (INT_MAX/2) #define EPS (1.0e-8) #define LINF (LONGLONG_MAX/2) const int MGN ...
a.cc: In function 'int main()': a.cc:13:15: error: 'LONGLONG_MAX' was not declared in this scope; did you mean 'LONG_LONG_MAX'? 13 | #define LINF (LONGLONG_MAX/2) | ^~~~~~~~~~~~ a.cc:71:15: note: in expansion of macro 'LINF' 71 | ll ans = -LINF; | ^~~~
s558060428
p03714
C++
#include<bits/stdc++.h> using namespace std; #define int long long #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif signed main(){ int n; cin >> n; n *= 3; vector<int> a(n); for(int i = 0; i < n; i++){ cin >> a[i]; } priority_queue<int,vector<int>,greater<int>> q1; priority_queue<int> q2; ...
a.cc: In function 'int main()': a.cc:41:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<long long int>') 41 | cout << dp1 << endl; | ~~~~ ^~ ~~~ | | | | | std::vector<long long int> | std::ostream {a...
s236021919
p03714
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (int)n; i++) typedef long long ll; const ll INF = 1e15; int main(){ int n; cin >> n; ll a[3*n]; rep(i, 3*n) cin >> a[i]; ll suml[n+1], sumr[n+1]; suml[0] = 0, sumr[0] = 0; priority_queue<ll, greater<ll>> sl; priority_queu...
a.cc: In function 'int main()': a.cc:14:32: error: no type named 'value_type' in 'struct std::greater<long long int>' 14 | priority_queue<ll, greater<ll>> sl; | ^~ a.cc:14:32: error: template argument 3 is invalid a.cc:17:8: error: request for member 'push' in 'sl', which is of...
s284723914
p03714
C++
from heapq import* n,*a=map(int,open(0).read().split()) #print(a) ans=-float("inf") for i in range(n,2*n+1): score=0 tmp=a[:i] heapify(tmp) # print(tmp) for j in range(i-n): heappop(tmp) score+=sum(tmp) tmp=a[i:] heapify(tmp) # print(tmp) score-=sum(heappop(tmp)for r in ran...
a.cc:3:2: error: invalid preprocessing directive #print 3 | #print(a) | ^~~~~ a.cc:9:6: error: invalid preprocessing directive #print 9 | # print(tmp) | ^~~~~ a.cc:15:6: error: invalid preprocessing directive #print 15 | # print(tmp) | ^~~~~ a.cc:1:1: error: 'from' does not...
s735024444
p03714
C++
#include <bits/stdc++.h> using namespace std; using ll = long long int; const int MAX = (int)(1e5 + 5); const ll INF = (ll)(1e10 + 5); int n; ll a[3 * MAX_N]; priority_queue<ll, vector<ll>, greater<ll>> leftpq; priority_queue<ll> rightpq; ll l, r; ll scorel[3 * MAX_N]; ll scorer[3 * MAX_N]; ll ans; int main(void)...
a.cc:10:10: error: 'MAX_N' was not declared in this scope; did you mean 'MAX'? 10 | ll a[3 * MAX_N]; | ^~~~~ | MAX a.cc:16:15: error: 'MAX_N' was not declared in this scope; did you mean 'MAX'? 16 | ll scorel[3 * MAX_N]; | ^~~~~ | MAX a.cc:17:1...
s534001951
p03714
C++
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0;i < n;i++) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()) #define VRSORT(v) sort(v.rbegin(), v.rend())//vectorの降順ソート #define ll long long #define pb(a) push_back(a) #define INF 1000000000 #define MOD 1000000007 #define int ll using nam...
cc1plus: error: '::main' must return 'int' a.cc: In function 'int main()': a.cc:43:19: warning: integer overflow in expression of type 'int' results in '1486618624' [-Woverflow] 43 | int ans = -INF*INF; | ^
s920819761
p03714
C++
#define debug_interval ',' #define dump_interval ' ' #define debug_toggle 1 //{ #include<bits/stdc++.h> using namespace std; #define int long long #define INT_MAX LLONG_MAX #define INT_MIN LLONG_MIN #define rep(i,n) for(int i=0;i<(n);i++) #define rep1(i,n) for(int i=1;i<=(n);i++) #define pb push_back #define all(v) (v)...
a.cc:8:9: warning: "INT_MAX" redefined 8 | #define INT_MAX LLONG_MAX | ^~~~~~~ In file included from /usr/include/c++/14/climits:42, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:38, from a.cc:5: /usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:120:9: note:...
s901519593
p03714
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> a(n),b(n),c(n); int amin=1000000001,cmax=0; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n;i++){ cin>>b[i]; } for(int i=0;i<n;i++){ cin>>c[i]; } sort(a.begin(),a.end()); sort(c.begin(),c.end()); ...
a.cc: In function 'int main()': a.cc:21:15: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to binary 'operator-' 21 | if(a.front-b[aa]>=0&&b[cc]-c.end()>=0){ a.cc:21:31: error: no match for 'operator-' (op...
s073447336
p03714
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> a(n),b(n),c(n); int amin=1000000001,cmax=0; for(int i=0;i<n;i++){ cin>>a[i]; amin=min(amin,a[i]); } for(int i=0;i<n;i++){ cin>>b[i]; } for(int i=0;i<n;i++){ cin>>c[i]; cmax=max(cmax,c[i]); }
a.cc: In function 'int main()': a.cc:18:4: error: expected '}' at end of input 18 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s668790413
p03714
C++
#include<bits/stdc++.h> #define rep(i,n) for (int i=0;i<(int)(n);i++) #define INF (1<<30) #define ll long long using namespace std; ll f(vector<int> a,vector<ll>s,int t){ int e=a.size(); int n=e/3; sort(&a[0],&a[t]); sort(&a[t],&a[e],greater<int>()); //rep(i,7)cout<<s[i]<<endl; ll ret=s[t]; //cout<<ret<...
a.cc: In function 'int main()': a.cc:30:3: error: expected initializer before 'vector' 30 | vector<ll>s; | ^~~~~~ a.cc:31:3: error: 's' was not declared in this scope 31 | s.push_back(0); | ^ a.cc:32:29: error: 'a' was not declared in this scope 32 | rep(i,3*n){int t; cin>>t; a.push_back(...
s644561614
p03714
C++
#include<bits/stdc++.h> #define rep(i,n) for (int i=0;i<(int)(n);i++) #define INF (1<<30) #define ll long long using namespace std; ll f(vector<int> a,vector<ll>s,int t){ int e=a.size(); int n=e/3; sort(&a[0],&a[t]); sort(&a[t],&a[e],greater<int>()); //rep(i,7)cout<<s[i]<<endl; ll ret=s[t]; //cout<<ret<...
a.cc: In function 'int main()': a.cc:30:3: error: expected initializer before 'vecotr' 30 | vecotr<ll>s; | ^~~~~~ a.cc:31:3: error: 's' was not declared in this scope 31 | s.push_back(0); | ^ a.cc:32:29: error: 'a' was not declared in this scope 32 | rep(i,3*n){int t; cin>>t; a.push_back(...
s160630549
p03714
C
#include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <queue> #include <stack> #include <map> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; const ll Inf = 1 << 30; const int maxx = 1e3 + 8; priority_queue <ll> qua; priority_queue <ll, vector<ll>, greater...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s043042896
p03714
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> #include<string> #include<iomanip> #include<map> #include<vector> #include<set> #include<queue> #include<stack> #define FAST ios::sync_with_stdio(false) #define lowbit(x) x&(-x) typedef long long ll; const int in...
a.cc:63:1: error: unterminated comment 63 | /*int sum(int x){ | ^
s303810780
p03714
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> #include<string> #include<iomanip> #include<map> #include<vector> #include<set> #include<queue> #include<stack> #define FAST ios::sync_with_stdio(false) #define lowbit(x) x&(-x) typedef long long ll; const int in...
a.cc:63:1: error: unterminated comment 63 | /*int sum(int x){ | ^
s751157473
p03714
C++
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sst...
In file included from /usr/include/c++/14/queue:66, from a.cc:16: /usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<long long int, std::vector<long long int>, std::greater<long long int>()>': a.cc:46:58: required from here 46 | priority_queue<int, vector<...
s605212056
p03714
C++
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sst...
In file included from /usr/include/c++/14/queue:66, from a.cc:16: /usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<long long int, std::vector<long long int>, std::greater<long long int>()>': a.cc:46:58: required from here 46 | priority_queue<int, vector<...
s286173459
p03714
C++
#include <stdio.h> #include <queue> #include <algorithm> using namespace std; #define REP(a, i, n) for (int i = a; i < n; ++i) #define RREP(n, i, a) for (int i = n - 1; i >= a; --i) int main() { int N; scanf("%d", &N); int _3N = 3 * N; int a[_3N]; REP(0, i, _3N) { scanf("%d", &a[i]); ...
a.cc: In function 'int main()': a.cc:63:16: error: 'LONG_MIN' was not declared in this scope 63 | long ans = LONG_MIN; | ^~~~~~~~ a.cc:4:1: note: 'LONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <algorithm> +++ |+#include...
s468673042
p03714
C++
#include <iostream> #include<cstdlib> #include<queue> #include<set> #include<vector> #include<string> #include<algorithm> #include<stack> #include<map> #include<deque> #include<cstdio> using namespace std; #define rep(i,a) for(int i=0;i<a;i++) #define rrep(i,a,b)for(int i=a;i<b;i++) #define mp make_pair #define pb push...
a.cc:17:12: error: '__int64' does not name a type; did you mean '__int64_t'? 17 | #define ll __int64 | ^~~~~~~ a.cc:22:1: note: in expansion of macro 'll' 22 | ll a1[300000]; | ^~ a.cc:17:12: error: '__int64' does not name a type; did you mean '__int64_t'? 17 | #define ll __int64 |...
s374577397
p03714
C++
#include <iostream> #include <vector> #include <queue> using namespace std; int main(void) { int n; cin >> n; priority_queue<int, vector<int>, greater<int> > gq; priority_queue<int> lq; vector<int> mid(n); vector<ll> sumf(n + 1), sums(n + 1); int sum1 = 0, sum2 = 0; for (int i = 0; i < n; i++) { int...
a.cc: In function 'int main()': a.cc:11:10: error: 'll' was not declared in this scope; did you mean 'lq'? 11 | vector<ll> sumf(n + 1), sums(n + 1); | ^~ | lq a.cc:11:12: error: template argument 1 is invalid 11 | vector<ll> sumf(n + 1), sums(n + 1); | ^ a.cc:11:...
s556296417
p03714
C++
#include <iostream> #include <cstdio> #include <cstring> #include <climits> #define N 100000 using namespace std; // int pq[2*N+1] = {}; // int q_max = 0; int parent(int i){return((i-1)/2);} int lchild(int i){return(2*i+1);} int rchild(int i){return(2*i+2);} void display_queue(int *pq, int *q_max){ int j = 0; ...
a.cc:40:39: error: 'function' has not been declared 40 | void push(int x, int *pq, int *q_max, function<bool(int, int)> f){ | ^~~~~~~~ a.cc:40:47: error: expected ',' or '...' before '<' token 40 | void push(int x, int *pq, int *q_max, function<bool(int, int)> f){ ...
s059128851
p03714
C++
#include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include <queue> #include <map> #include <set> #include <string> #include <cmath> #include <numeric> #include <iostream> using namespace std; #define FOR(i, a, b) for(int i = (a); i < (b); i++) #define RFOR(i, a, b) for(...
a.cc: In function 'void solve(ll, std::vector<long long int>)': a.cc:45:18: error: 'LLONG_MIN' was not declared in this scope 45 | ll tmp = LLONG_MIN; | ^~~~~~~~~ a.cc:13:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1...
s646968382
p03714
Java
import java.io.*; import java.util.*; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; static void solve() { int n = ni(); int[] a = new int[3*n]; for(int i = 0; i < 3*n; i++){ a[i] = ni(); } long res =...
Main.java:30: error: not a statement res += b[n+k-i-1] - c[i];m ^ Main.java:30: error: ';' expected res += b[n+k-i-1] - c[i];m ^ 2 errors
s555600230
p03714
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; int main(void){ ll N; cin >> N; vector<ll> v(3*N); for(auto& it : v) cin >> it; ll ans = -1e20; for(ll t=N; t<=2*N-1;t++){ priority_queue<ll, less> left; priority_queue<ll, greater> right; for...
a.cc: In function 'int main()': a.cc:12:14: warning: overflow in conversion from 'double' to 'll' {aka 'long long int'} changes value from '-1.0e+20' to '-9223372036854775808' [-Woverflow] 12 | ll ans = -1e20; | ^~~~~ a.cc:15:32: error: type/value mismatch at argument 2 in template parameter l...
s716305167
p03714
C++
3 8 2 2 7 4 6 5 3 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s883875565
p03714
C++
#include <iostream> #include <vector> #include <queue> #include <sstream> #include <algorithm> #include <bitset> #include <limits> #include <map> #include <set> #include <iomanip> #include <cmath> using namespace std; typedef long long int ll; typedef std::numeric_limits<double> dbl; const long long int LL_INF=1LL<<6...
a.cc: In function 'int main()': a.cc:50:15: error: 'accumulate' was not declared in this scope 50 | ll fSum = accumulate(former.begin(), former.end(), 0); | ^~~~~~~~~~ a.cc:55:19: error: 'INT64_MIN' was not declared in this scope 55 | ll maxScore = INT64_MIN; | ...
s545566674
p03714
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef priority_queue <ll> pq; typedef priority_queue <ll, vector <ll>, greater<ll> > pqr; int main(){ int N; cin>>N; vector <ll> a; pqr frt; pq bak; for(int i=0;i<3*N;i++){ ll aa; ...
a.cc: In function 'int main()': a.cc:45:22: error: lvalue required as left operand of assignment 45 | for(int i=0;i<i=N;i++){ | ~^~
s281679359
p03714
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef priority_queue <ll> pq; typedef priority_queue <ll, vector<ll>, greater<ll> > rpq; int main(){ int N; cin>>N; rpq a1; pq a2; vector <ll> a; for(int i=0;i<3*N;i++){ ll aa; ...
a.cc: In function 'int main()': a.cc:49:38: error: 'j' was not declared in this scope 49 | res=max(sum1[i]-sum2[j], res); | ^
s687340815
p03714
C++
include<bits/stdc++.h> using namespace std; typedef long long ll; typedef priority_queue <ll> pq; typedef priority_queue <ll, vector<ll>, greater<ll> > rpq; int main(){ int N; cin>>N; rpq a1; pq a2; vector <ll> a; for(int i=0;i<3*N;i++){ ll aa; ...
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc:6:9: error: 'priority_queue' does not name a type 6 | typedef priority_queue <ll> pq; | ^~~~~~~~~~~~~~ a.cc:7:9: error: 'priority_queue' does not name a type 7 | typedef priority_queue <ll, vector<l...
s245752399
p03714
C++
AtCoder Beginner Contest 0622017/05/20 21:00:00 ~ 2017/05/20 22:40:00 トップページ 問題 提出 質問 結果 順位表 コードテスト 解説 Submission #1456353 ソースコード #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define fi first #define se second #define repl(i,a,b...
a.cc:11:12: error: stray '#' in program 11 | Submission #1456353 | ^ a.cc:81:20: error: too many decimal points in number 81 | 言語 C++14 (GCC 5.4.1) | ^~~~~ a.cc:140:1: error: extended character © is not valid in an identifier 140 | © 2017 AtCoder Inc. All rights rese...
s522310417
p03714
C++
3#include <cstdio> #include <iostream> using namespace std; int tmp[1005]; int tmp1[1005]; void clear(int n,int tmp[]){ for(int t = 1; t <= 2*n; t++){ tmp[t] = 0; } } void array_copy_right(int A[], int tmp[], int end, int n){ for(int i = 3*n; i > end; i--){ tmp[3*n-i+1] = A[i]; } } void array_copy(int A[], ...
a.cc:1:2: error: stray '#' in program 1 | 3#include <cstdio> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3#include <cstdio> | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/...
s762889336
p03714
C++
#include <iostream> #include<sstream> #include<vector> #include<iterator> #include<queue> #include<climits> using namespace std; int main(void) { int N; cin >> N; vector<long long> a(3*N); for(int i=0; i<3*N; i++) cin >> a[i]; vector<long long> f_table(N+1, 0); long long sum = 0; priority_queue<long long> q...
a.cc: In function 'int main()': a.cc:39:18: error: cannot bind non-const lvalue reference of type 'std::priority_queue<long long int>&' to an rvalue of type 'std::priority_queue<long long int>' 39 | que.swap(priority_queue<long long int>()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file in...
s793585523
p03714
C++
#include <iostream> #include<sstream> #include<vector> #include<iterator> #include<queue> #include<climits> using namespace std; int main(void) { int N; cin >> N; vector<long long> a(3*N); for(int i=0; i<3*N; i++) cin >> a[i]; vector<long long> f_table(N+1, 0); long long sum = 0; priority_queue<long long> q...
a.cc: In function 'int main()': a.cc:39:18: error: cannot bind non-const lvalue reference of type 'std::priority_queue<long long int>&' to an rvalue of type 'std::priority_queue<long long int>' 39 | que.swap(priority_queue<long long>()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included f...
s740609670
p03714
C++
#include <iostream> #include <algorithm> int main() { int N; long long min = LONG_MIN; std::cin >> N; unsigned long aa[30010]; unsigned long a[30010]; unsigned long aaa[30010]; for (int i = 0; i < 3*N; ++i) { std::cin >> aa[i]; } for (int i = 0; i < N; ++i) { for (int j = 0; j < 3*N; ++j) { ...
a.cc: In function 'int main()': a.cc:9:25: error: 'LONG_MIN' was not declared in this scope 9 | long long min = LONG_MIN; | ^~~~~~~~ a.cc:4:1: note: 'LONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <algorithm>...
s045822996
p03714
C++
#include "stdafx.h" #include <iostream> #include <algorithm> int main() { int N; long min = LONG_MIN; std::cin >> N; int aa[30010]; int a[30010]; int aaa[30010]; for (int i = 0; i < 3*N; ++i) { std::cin >> aa[i]; } for (int i = 0; i < N; ++i) { for (int j = 0; j < 3*N; ++j) { a[j] = aa[j]; } ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s228670668
p03714
C++
#include <cstdio> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <vector> #include <iostream> #include <queue> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<long long> vl; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define pq priorit...
a.cc: In function 'int main()': a.cc:40:27: error: expected '}' at end of input 40 | cout << 0 << endl; | ^ a.cc:29:11: note: to match this '{' 29 | int main(){ | ^
s869921303
p03714
C++
#include <cstdio> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <vector> #include <iostream> #include <queue> //#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<long> vll; typedef pair<int,int> pii; typedef pair<ll,ll> ...
a.cc:18:9: error: typedef declared 'auto' 18 | typedef priority_queue pq; | ^~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:37:9: error: invalid template-id 37 | pq <long long ,vl,greater<long long> > left; | ^~ a.cc:37:24: error: 'vl' was not declared in this scope; did yo...
s400922327
p03714
C++
#include <cstdio> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <vector> #include <iostream> #include <queue> using namespace std; typedef vector<int> vi; #define pq priority_queue #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--) #de...
a.cc: In function 'int main()': a.cc:31:20: error: 'LONG_MIN' was not declared in this scope 31 | long out = LONG_MIN; | ^~~~~~~~ a.cc:9:1: note: 'LONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <queue> +++ |+#inc...
s816824405
p03714
C++
#include <cstdio> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <vector> #include <iostream> #include <queue> using namespace std; typedef vector<int> vi; #define pq priority_queue #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--) #de...
a.cc: In function 'int main()': a.cc:31:20: error: 'LONG_MIN' was not declared in this scope 31 | long out = LONG_MIN; | ^~~~~~~~ a.cc:9:1: note: 'LONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <queue> +++ |+#inc...
s081849255
p03714
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> using namespace std; long long a[300000]; int main() { int n; long long sp=0; long long sl=0; long long ans; priority_queue<int>l;//後半n priority_queue<int,vector<int>,greater<int>>p;//前半n cin>>n; for(int i=0;i<3*n;i...
a.cc: In function 'int main()': a.cc:29:82: error: no match for 'operator=' (operand types are 'std::priority_queue<int, std::vector<int, std::allocator<int> >, std::greater<int> >' and 'std::priority_queue<long long int, std::vector<long long int>, std::greater<long long int> >') 29 | p=priority_que...
s369919796
p03714
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.AbstractCollection; import java.util.PriorityQueue; import java.io.BufferedWriter; import java.io.Writer; import java.io.OutputStreamWriter; import java.util.Inp...
Main.java:151: error: reached end of file while parsing int c = read(); ^ 1 error
s066581222
p03714
C++
#include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f typedef long long ll; const int N = 1e5 + 10; ll front[N], end[N]; int num[3*N]; int main() { // freopen("in.txt", "r", stdin); int n; while (~scanf("%d", &n)) { for (int i = 0; i < 3*n; i++) scanf("%d", num + i...
a.cc: In function 'int main()': a.cc:46:17: error: reference to 'end' is ambiguous 46 | end[m] = sum; | ^~~ 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: 'tem...
s219386252
p03714
C++
#innclude <iostream> #include <queue> #include <vector> using namespace std; vector<int> midN; priority_queue<int, vector<int>, greater<int>> leftN; priority_queue<int> rightN; vector<long> savedLeft; vector<long> savedRight; int main(){ int N=0; cin>>N; int head=0; int tail=N-1; long sumLeft=0; long ...
a.cc:1:2: error: invalid preprocessing directive #innclude; did you mean #include? 1 | #innclude <iostream> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:18:3: error: 'cin' was not declared in this scope 18 | cin>>N; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iost...
s607063642
p03714
C++
#innclude <iostream> #include <queue> #include <vector> using namespace std; vector<int> midN; priority_queue<int, vector<int>, greater<int>> leftN; priority_queue<int> rightN; vector<long> savedLeft; vector<long> savedRight; int main(){ int N=0; cin>>N; int head=0; int tail=N-1; long sumLeft=0; long ...
a.cc:1:2: error: invalid preprocessing directive #innclude; did you mean #include? 1 | #innclude <iostream> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:18:3: error: 'cin' was not declared in this scope 18 | cin>>N; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iost...