submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s172085096
p04005
C
#include <stdio.h> int calDiff(int a, int b, int c){ if(a % 2 == 1 && b % 2 == 1 && c % 2 == 1){ return diff = min(a, b, c); }else{ return 0; } } int min(int a, int b, int c){ int max, mid, min; if(a <= b){ if(b <= c){ max = c; mid = b; min = a; }else{ max = b; if(c >= a){ mid = c; ...
main.c: In function 'calDiff': main.c:5:24: error: 'diff' undeclared (first use in this function) 5 | return diff = min(a, b, c); | ^~~~ main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in main.c:5:31: error: implicit decla...
s742140016
p04005
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 PB push_back #define MP make_pair #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) ...
a.cc: In function 'int main()': a.cc:6:13: error: 'INT_MAX' was not declared in this scope 6 | #define INF INT_MAX/3 | ^~~~~~~ a.cc:41:16: note: in expansion of macro 'INF' 41 | int result = INF; | ^~~ a.cc:37:1: note: 'INT_MAX' is defined in header '<climits>'; this is p...
s603423486
p04005
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 PB push_back #define MP make_pair #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) ...
a.cc: In function 'int main()': a.cc:6:13: error: 'INT_MAX' was not declared in this scope 6 | #define INF INT_MAX/3 | ^~~~~~~ a.cc:40:16: note: in expansion of macro 'INF' 40 | int result = INF; | ^~~ a.cc:36:1: note: 'INT_MAX' is defined in header '<climits>'; this is p...
s359878234
p04005
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 PB push_back #define MP make_pair #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) ...
a.cc: In function 'int main()': a.cc:6:13: error: 'INT_MAX' was not declared in this scope 6 | #define INF INT_MAX/3 | ^~~~~~~ a.cc:39:16: note: in expansion of macro 'INF' 39 | int result = INF; | ^~~ a.cc:35:1: note: 'INT_MAX' is defined in header '<climits>'; this is p...
s696846683
p04005
C++
#include <iostream> #include <iomanip> #include <vector> #include <map> #include <set> #include <queue> #include <bitset> #include <stack> #include <utility> #include <numeric> #include <algorithm> #include <functional> #include <complex> #include <string> #include <sstream> #include <fstream> #include <cstdio> #inclu...
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...
s034915354
p04005
C++
#include <iostream> #include <iomanip> #include <vector> #include <map> #include <set> #include <queue> #include <bitset> #include <stack> #include <utility> #include <numeric> #include <algorithm> #include <functional> #include <complex> #include <string> #include <sstream> #include <fstream> #include <cstdio> #inclu...
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...
s283831551
p04005
Java
import java.util.Scanner; public class A { public static Scanner sc; public static void main(String [] args){ sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int maxi = Math.max(a,Math.max(c, b)); if(a%2==0 || b%2==0 || c%2==0){ System.out.println(0)...
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s194310642
p04005
C++
import Data.List import Data.Char main = do l <- getLine let a = sort $ map (digitToInt . (\(c:[]) -> c)) $ words l if all even a then print 0 else print $ (a !! 0) * (a !! 1)
a.cc:6:39: error: stray '\' in program 6 | let a = sort $ map (digitToInt . (\(c:[]) -> c)) $ words l | ^ a.cc:1:1: error: 'import' does not name a type 1 | import Data.List | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s287420326
p04005
C++
#include <cstdio> #include <iostream> #include <iomanip> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <list> #include <bitset> #include <utility...
a.cc: In function 'void Main()': a.cc:62:15: error: invalid operands of types 'long long int [3]' and 'int' to binary 'operator%' 62 | if((a % 2) * (b % 2) * (c % 2) == 0) { | ~ ^ ~ | | | | | int | long long int [3] a.cc:62:23: er...
s224806329
p04005
C++
using namespace std; int main(){ int H=0; int W=0; cin>>H; cin>>W; char hougan[H][W]; char aka[H][W]; char ao[H][W]; for (int i=0; i<H; i++) { for (int j=0; j<W; j++) { aka[i][j]='.'; ao[i][j]='.'; } } for (int i=0; i<H; i++) { ...
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin>>H; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:22:9: error: 'cou...
s649681999
p04005
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Scanner; public class twins { public static void main(String[] args) throws Exception { Scanner s = new Scanner(System.in); BufferedReader f = new BufferedReader(new InputStreamReader(System.in)); lon...
Main.java:7: error: class twins is public, should be declared in a file named twins.java public class twins { ^ 1 error
s136896626
p04005
C++
#include<iostream> using namespace std; int main(){ int a[2]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+2); int c=a[0]*a[1]; if(a[2]%2==0 || c%2==0){ cout<<0<<endl; return 0; } cout<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'sort' was not declared in this scope; did you mean 'short'? 6 | sort(a,a+2); | ^~~~ | short
s187953186
p04005
C++
#include <stdio.h> #include<algorithm> using namespace std; int main(){ int a[3]; scanf("%d %d %d",&a[0],&a[1],&a[2]); sort(a,a+3); if(!(a[0]%2)||!(a[1]%2)||!(a[2]%2)){ printf("%d\n",0); }else{ printf("%lld\n",long long int(a[0])*a[1]); } }
a.cc: In function 'int main()': a.cc:12:33: error: expected primary-expression before 'long' 12 | printf("%lld\n",long long int(a[0])*a[1]); | ^~~~
s423102141
p04005
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.NoSuchElementException; public class Main { long A,B,C; public void solve() { A = nextLong(); B = nextLong(); C = nextLong(); long ans = 0; long S = (A * B * C; long min = Math.min(A,Math.min(B,C)); lon...
Main.java:13: error: ')' expected long S = (A * B * C; ^ 1 error
s967368012
p04005
C
// include #include <algorithm> #include <iterator> #include <vector> #include <iomanip> #include <iostream> #include <stack> #include <queue> #include <list> #include <utility> #include <string> #include <cstring> #include <stdio.h> #include <cassert> // M_PI for pi #define _USE_MATH_DEFINES #include <math.h> #inc...
main.c:2:10: fatal error: algorithm: No such file or directory 2 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s896154330
p04005
Java
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); long a[] = new long[3]; long t; for(int i=0;i<3;i++) { a[i] = sc.nextLong(); if(a[i]%2==0) { System.out.print("0"); System.exi...
Main.java:20: error: ')' expected }else if(a[1]>=a[2] && a[0]<=a[1] ^ 1 error
s273201271
p04005
Java
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int a[] = new int[3]; for(i=0;i<3;i++) a[i] = sc.nextInt(); Arrays.sort(a); if(a[2]%2==0) System.out.print("0"); else System.out.print(a[0]*a[1]); } } } }
Main.java:22: error: class, interface, enum, or record expected } ^ 1 error
s425687852
p04005
C++
#include <bits/stdc++.h> using namespace std; int64_t main() { vector<int64_t> L(3); for (int64_t i = 0; i < 3; ++i) { cin >> L[i]; } for (int64_t i = 0; i < 3; ++i) { if (L[i] % 2 == 0) { cout << '0' << endl; return 0; } } sort(L.begin(), L.end()); int64_t A, B, C1, C2; A = L[0]; B = L[1]; C...
a.cc:5:1: error: '::main' must return 'int' 5 | int64_t main() { | ^~~~~~~
s985875844
p04005
C++
#include <bits/stdc++.h> using namespace std; int64 main() { vector<int64> L(3); for (int64 i = 0; i < 3; ++i) { cin >> L[i]; } for (int64 i = 0; i < 3; ++i) { if (L[i] % 2 == 0) { cout << '0' << endl; return 0; } } sort(L.begin(), L.end()); int64 A, B, C1, C2; A = L[0]; B = L[1]; C1 = L[2]/2...
a.cc:5:1: error: 'int64' does not name a type; did you mean 'int64_t'? 5 | int64 main() { | ^~~~~ | int64_t
s180134389
p04005
C++
#include <iostream> using namespace std; int cost[2000]; bool own[2000]; int n, x ; long long decide() { long long costtt =INT_MAX; int minplace = 0; long long sum = 0, sumslide = 0 ; bool gotdemall = true; for(int i=0 ; i<n ; ++i) { if(!own[i]) { sum+=cost[i]; ...
a.cc: In function 'long long int decide()': a.cc:8:23: error: 'INT_MAX' was not declared in this scope 8 | long long costtt =INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostre...
s428963893
p04005
C++
#include<algorithm> #define MAX 200 using namespace std; char s[MAX]; int a[5]; void _Itoa(int x,char sa[MAX]) { char ss[MAX]; int i,j; for(i=0;x;i++) { ss[i]='0'+x%10; x/=10; } for(j=0;i>0;j++) sa[j]=ss[--i]; sa[j]='\0'; } void XC_IIA(char *s,int a,int b) { int ...
a.cc: In function 'void XC_IIA(char*, int, int)': a.cc:28:13: error: 'strlen' was not declared in this scope 28 | ns1=strlen(s1); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<algorithm> +++ |+#...
s917686205
p04005
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 200 char s[MAX]; int a[5]; int comp(const void*a,const void*b) { return *(int*)a-*(int*)b; } void XC_IIA(char *s,int a,int b) { int i,ns1,ns2,ss[MAX],*w; char s1[MAX],s2[MAX],*p,*q; _itoa(a,s1,10); ns1=strlen(s1); _itoa(b,s2,10); ns2=strlen(s2)...
main.c: In function 'XC_IIA': main.c:16:9: error: implicit declaration of function '_itoa' [-Wimplicit-function-declaration] 16 | _itoa(a,s1,10); | ^~~~~
s956037648
p04005
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 200 char s[MAX]; int a[5]; int comp(const void*a,const void*b) { return *(int*)a-*(int*)b; } void XC_IIA(char *s,int a,int b) { int i,ns1,ns2,ss[MAX],*w; char s1[MAX],s2[MAX],*p,*q; _itoa(a,s1,10); ns1=strlen(s1); _itoa(b,s2,10); ns2=strlen(s2)...
main.c: In function 'XC_IIA': main.c:16:9: error: implicit declaration of function '_itoa' [-Wimplicit-function-declaration] 16 | _itoa(a,s1,10); | ^~~~~
s216040704
p04005
Java
import java.util.Scanner; public class Batc { public static void main (String args[]){ Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long x= sc.nextLong(); long[] a = new long[2*(int)n]; for (int i = 0; i<n; i++) { a[i]=sc.nextLong(); a[i+(int)n]=a[i]; } long[][] costs = new long[(i...
Main.java:3: error: class Batc is public, should be declared in a file named Batc.java public class Batc { ^ 1 error
s655305932
p04005
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<algorithm> #define MAX 200 using namespace std; char s[MAX]; int a[5]; void XC_IIA(char *s,int a,int b) { int i,ns1,ns2,ss[MAX],*w; char s1[MAX],s2[MAX],*p,*q; _itoa(a,s1,10); ns1=strlen(s1); _itoa(b,s2,10); ns2=strlen(s2); for(i=0;i<MAX;i++)ss...
a.cc: In function 'void XC_IIA(char*, int, int)': a.cc:16:9: error: '_itoa' was not declared in this scope 16 | _itoa(a,s1,10); | ^~~~~
s721851030
p04005
C++
#include <iostream> #include <climits> #include <array> #include <cmath> #include <vector> #include <queue> #include <algorithm> using namespace std; #define MODULE 1000000007 #define MP make_pair template<class T, class U> inline void chmin(T &t, U f) { if (t > f)t = f; } template<class T, class U> inline void chm...
a.cc: In function 'int main()': a.cc:43:9: error: reference to 'count' is ambiguous 43 | count++; | ^~~~~ In file included from /usr/include/c++/14/algorithm:86, from a.cc:7: /usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionP...
s610804452
p04005
C++
#include <iostream> using namespace std; typedef unsigned long long ll; int main() { int a,b,c; cin>>a>>b>>c; if(a>b) swap(a,b); if(a>c) swap(a,c); if(b>c) swap(b,c); maxi=c; if(maxi%2==0) { cout<<0<<endl; } else { ll res=a*b; cout<<res<<endl;...
a.cc: In function 'int main()': a.cc:14:3: error: 'maxi' was not declared in this scope 14 | maxi=c; | ^~~~
s353642416
p04005
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<algorithm> #define MAX 200 using namespace std; char s[100]; void XC_IIA(char *s,long long int a,long long int b) { int i,ns1,ns2,ss[MAX],*w; char s1[MAX],s2[MAX],*p,*q; _itoa(a,s1,10); ns1=strlen(s1); _itoa(b,s2,10); ns2=strlen(s2); for(i=0;i<...
a.cc: In function 'void XC_IIA(char*, long long int, long long int)': a.cc:15:9: error: '_itoa' was not declared in this scope 15 | _itoa(a,s1,10); | ^~~~~
s475285340
p04005
C++
#include<iostream> #include<vector> using namespace std; int main() { vector<long int> a; long int b; for(int i = 0; i < 3; i++) { cin >> b; a.push_back(b); } if(a[0] % 2 == 0 || a[1] % 2 == 0 || a[2] % 2 == 0) { cout << 0 << endl; return 0; } sort(a.begin(), a.end()); cout << a[0] * a[...
a.cc: In function 'int main()': a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(a.begin(), a.end()); | ^~~~ | short
s641333699
p04005
C++
#include <stdio.h> int main(){ int a,b,c; int p1,p2,p3; int min; scanf("%d %d %d",&a,&b,&c); if(a%2==0 || b%2==0 || c%2==0){ printf("0\n"); return 0; } p1=b*c; p2=a*b; p3=a*c min=(p1<p2)?p1:p2; min=(min<p3)?min:p3; printf("%d\n",min); return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: expected ';' before 'min' 14 | p3=a*c | ^ | ; 15 | min=(p1<p2)?p1:p2; | ~~~
s225671845
p04005
C++
#include<iostream> typedef long long ll; using namespace std; int main(){ ll num[3]; for(int i = 0; i < 3; i++){ cin >> num[i]; } sort(num, num + 3); for (int i = 0; i < 3; i++){ if(num[i] % 2== 0){ cout << 0 << endl; return 0; } } co...
a.cc: In function 'int main()': a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(num, num + 3); | ^~~~ | short
s455833385
p04005
C++
using System; using System.Collections.Generic; class Program { static long f(long A, long B, long C){ long dc = C - 2*(C/2); return dc*A*B; } static void Main(string[] args){ string[] str = Console.ReadLine().Split(' '); long A = long.Parse(str[0]); long B = long.Pa...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:9:22: error: 'string' has not been declared 9 | static void Main(string[]...
s118635419
p04005
C++
import std.stdio; import std.conv, std.array, std.algorithm, std.string; import std.math, std.random, std.range, std.datetime; import std.bigint; void main(){ int[] ds = readln.chomp.split.map!(to!int).array; int a = ds[0], b = ds[1], c = ds[2]; int ans; if(a % 2 == 0 || b % 2 == 0 || c % 2 == 0) ans = 0; els...
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import std.conv, std.array, std.algorithm, std.string; | ^~~~~~ a.cc:2:1: note: C++20 'import' only avail...
s099280889
p04005
C++
#include <iostream> using namespace std; long long main() { long long A, B, C; cin >> A >> B >> C; if (A % 2 == 0 || B % 2 == 0 || C % 2 == 0) { cout << 0 << endl; return 0; } if (A >= B&&A >= C) { cout << B*C << endl; return 0; } else if (B >= C){ cout << A*C << endl; return 0; } else{ cout << A...
cc1plus: error: '::main' must return 'int'
s453668690
p04005
C++
#include <iostream> #include <algorithm> using namespace std; main(){ int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a.begin(),a.end()); }
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:16: error: request for member 'begin' in 'a', which is of non-class type 'int [3]' 8 | sort(a.begin(),a.end()); | ^~~~~ a.cc:8:26: er...
s636336111
p04005
C++
#include <stdio.h> int main(void){ int x, y, z, d; scanf("%d%d%d", &x, &y, &z); m = x; m = m<y?y:m; m = m<z?z:m; d = x*y*z/m; if (x%2==0 || y%2==0 || z%2==0) d=0; printf("%d\n", d); return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'm' was not declared in this scope 8 | m = x; | ^
s373346031
p04005
C++
#include <iostream> #include <algorithm> #include <functional> #include <string> #include <climits> #include <vector> #include <numeric> #include <complex> #include <map> #include <bitset> #include <stack> #include <queue> #include <set> using namespace std; //#define __int64 long long #define long __int64 #define REP...
a.cc: In function 'int main()': a.cc:17:14: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 17 | #define long __int64 | ^~~~~~~ a.cc:37:34: note: in expansion of macro 'long' 37 | cout << (long)a[1] * a[2] << endl; | ...
s888324597
p04005
C++
> using namespace std; typedef long long LL; typedef double DB; #define F(i,a,b) for(int i=(a);i<=(b);++i) #define R(i,n) for(int i=(0);i<(n);++i) #define fill(a,b) memset(a,b,sizeof a); const LL INF = 0x3f3f3f3f3f3f3f3fLL; int main() { //freopen("test.txt","r",stdin); LL a,b,c; scanf("%lld %lld %lld",&a,&b,&c); ...
a.cc:1:1: error: expected unqualified-id before '>' token 1 | > | ^ a.cc: In function 'int main()': a.cc:16:9: error: 'scanf' was not declared in this scope 16 | scanf("%lld %lld %lld",&a,&b,&c); | ^~~~~ a.cc:18:15: error: 'min' was not declared in this scope; did you mean 'main'? ...
s292112339
p04005
C++
{-# LANGUAGE MultiParamTypeClasses,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,BangPatterns,RankNTypes,TupleSections #-} import Control.Monad import Control.Monad.ST import Control.Applicative import Control.Arrow import Debug.Trace import Text.Printf import Data.List import Data.Int import Data.Bits impor...
a.cc:1:3: error: stray '#' in program 1 | {-# LANGUAGE MultiParamTypeClasses,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,BangPatterns,RankNTypes,TupleSections #-} | ^ a.cc:1:130: error: stray '#' in program 1 | {-# LANGUAGE MultiParamTypeClasses,FlexibleContexts,FlexibleInstances,TypeSynonym...
s467955400
p04005
C++
#include <iostream> using namespace std; int main(){ long long int A,B,C; cin>>A>>B>>C; if(A%2==0||B%2==0||C%2==0){ cout<<0<<endl; }else{ cout<<min(A*B,B*C,C*A})<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:30: error: expected ')' before '}' token 10 | cout<<min(A*B,B*C,C*A})<<endl; | ~ ^ | ) a.cc:10:31: error: expected primary-expression before ')' token 10 | cout<<min(A*B,B*C,C*A})<<endl; ...
s837347163
p04005
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using Pair = System.Collections.Generic.KeyValuePair<int, int>; class Program { public Program() { } static void Main(string[] args) { new Program().prog(); } Scanner cin; const int MOD = 1000000007; const...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s085330485
p04005
C++
#include <stdio.h> #include <algorithm> using namespace std; int main( void ) { long long A[3] scanf("%lld %lld %lld", &A[0], &A[1], &A[2]); sort(A, A+3); printf("%lld\n", A[0] * A[1]); return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: expected initializer before 'scanf' 8 | scanf("%lld %lld %lld", &A[0], &A[1], &A[2]); | ^~~~~ a.cc:10:14: error: 'A' was not declared in this scope 10 | sort(A, A+3); | ^
s302617029
p04005
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.begin(),X.end() #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) for(int i=0;i<(int)(n);i++) #define pb push_back #define pii pair<int,int> #define mp make_...
a.cc: In function 'int main()': a.cc:25:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 25 | ans = b*c; | ^~~ | abs
s626372525
p04005
C++
#include <iostream> #include <vector> #include <set> #include <iomanip> #include <cassert> #include <algorithm> #include <string> #include <cstring> #include <cmath> using namespace std; namespace fastinput { /** Interface */ inline int readChar(); template <class T = int> inline T readInt(); template <class T>...
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...
s947735959
p04005
C++
#include <iostream> #include <queue> #include <set> #include <cassert> #include <map> #include <sstream> using namespace std; int main(){ long long A,B,C; cin >> A >> B >> C; long long ans = 1e18; ans = min({(B%2)*A*C,(A%2)*B*C,(C%2)*A*B}); cout << ans << endl; }
a.cc: In function 'int main()': a.cc:14:18: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 14 | ans = min({(B%2)*A*C,(A%2)*B*C,(C%2)*A*B}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /...
s994806504
p04005
C++
#include "bits/stdc++.h" #include "ext/pb_ds/tree_policy.hpp" #include "ext/pb_ds/assoc_container.hpp" #define PB push_back #define PF push_front #define LB lower_bound #define UB upper_bound #define fr(x) freopen(x,"r",stdin) #define fw(x) freopen(x,"w",stdout) #define in(x) (read(x)) #define iout(x) printf("%d\n",x) ...
a.cc: In function 'int main()': a.cc:55:34: error: redeclaration of 'll ans' 55 | ll ans = min(a*b,a*c);ll ans = min(ans,b*c); | ^~~ a.cc:55:12: note: 'll ans' previously declared here 55 | ll ans = min(a*b,a*c);ll ans = min(ans,b*c); | ^~~
s442468002
p04005
C++
#include<bits/stdc++.h> using namespace std; #define FZ(n) memset((n),0,sizeof(n)) #define FMO(n) memset((n),-1,sizeof(n)) #define MC(n,m) memcpy((n),(m),sizeof(n)) #define F first #define S second #define MP make_pair #define PB push_back #define ALL(x) begin(x),end(x) #define IOS do { ios_base::sync_with_stdio(0);cin...
/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
s435515928
p04005
C++
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define li long long #define itn int using namespace std; inline int nxt(){ int n; scanf("%d", &n); return n; } int main(){ vector<int> a(3); for (int i = 0; i < 3; i++) a[i] = nxt(); sort(all(a[i])); if (a[0] % 2 == 0 || a[1] % 2 == 0 || a[2]...
a.cc: In function 'int main()': a.cc:20:20: error: 'i' was not declared in this scope 20 | sort(all(a[i])); | ^ a.cc:3:17: note: in definition of macro 'all' 3 | #define all(x) (x).begin(), (x).end() | ^
s521136840
p04006
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,K;cin>>N>>K;vector<int>A(N); for(int i=0;i<N;i++)cin>>A[i]; sort(A.begin(),A.end()); long long count=A[0]+K; long long ans=A[0]; for(int i=1;i<N;i++)ans+=min(count,A[i]); cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:9:31: error: no matching function for call to 'min(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)' 9 | for(int i=1;i<N;i++)ans+=min(count,A[i]); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algo...
s763440804
p04006
C++
// ----------------------------------- // author : MatsuTaku // country : Japan // created : 09/03/20 01:08:28 // ----------------------------------- #include <bits/stdc++.h> #include "../../../library/include/segment_tree.hpp" using namespace std; using ll = long long; struct Min { int x; Min(int x=1e9): x(...
a.cc:8:10: fatal error: ../../../library/include/segment_tree.hpp: No such file or directory 8 | #include "../../../library/include/segment_tree.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s822763662
p04006
C++
#include <iostream> #include <vector> #include <utility> using namespace std; typedef pair<long long, long long> P; long long MAX = 1e18; struct segK{ int n; vector<P> dat; void init(int n_){ n = 1; while(n < n_) n *= 2; dat.resize(n * 2 - 1); for(int i = 0; i < n * 2 - 1; i+...
a.cc: In function 'int main()': a.cc:57:27: error: 'i' was not declared in this scope 57 | long long n = segtree[i].n; | ^
s546501444
p04006
C++
#include <iostream> #include <vector> #include <utility> using namespace std; typedef pair<long long, long long> P; long long MAX = 1e18; struct segK{ int n; vector<P> dat; void init(int n_){ n = 1; while(n < n_) n *= 2; dat.resize(n * 2 - 1); for(int i = 0; i < n * 2 - 1; i+...
a.cc: In function 'int main()': a.cc:59:47: error: 'segT' was not declared in this scope; did you mean 'segK'? 59 | P temp = segtree[i].query(0, N, 0, 0, segT.n); | ^~~~ | segK
s607434561
p04006
C++
#pragma GCC optimize("O3") #include<bits/stdc++.h> using namespace std; using ll=long long; using P=pair<ll,ll>; template<class T> using V=vector<T>; #define fi first #define se second #define all(v) (v).begin(),(v).end() const ll inf=(1e18); //const ll mod=998244353; const ll mod=1000000007; ll GCD(ll a,ll b) {retur...
a.cc: In function 'int main()': a.cc:35:59: error: no match for 'operator>' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} and 'll' {aka 'long long int'}) 35...
s297859900
p04006
C++
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <stack> #include <queue> #include <limits.h> #include <cmath> #include <map> using namespace std; using P=pair<int,int>; using ll=long long; #define int long long bool chmin(ll &a,ll b){ if(a>b){ a=b; return true;...
a.cc: In function 'int main()': a.cc:53:16: error: invalid types 'long long int[long long int]' for array subscript 53 | ret+=mx[i]*x; | ^
s798534352
p04006
C++
#include <iostream> #include <algorithm> #include <queue> #include <cassert> #include <set> using namespace std; typedef long long ll; const int MINF=-1e9; typedef pair<int,int> P; int main() { ll n,x; cin>>n>>x; ll a[n]; for(int i=0;i<n;i++) cin>>a[i]; if (n==1) { cout<<a[0]<<endl; return 0; } ll an=1e1...
a.cc: In function 'int main()': a.cc:30:5: error: expected primary-expression before '/' token 30 | /for(int j=0;j<n;j++) cout<<b[j]<<" "; cout<<endl; | ^ a.cc:30:6: error: expected primary-expression before 'for' 30 | /for(int j=0;j<n;j++) cout<<b[j]<<" "; cout<<endl; | ^~~ a.cc:30:1...
s220225849
p04006
C++
def main(): n, x = map(int, input().split()) a = list(map(int, input().split())) ans = 1100100100100100100 b = [10000000000 for i in range(n)] for i in range(n): for j in range(n): b[j] = min(b[j], a[i - j]) sumb = sum(b) ans = min(ans, sumb + i * x) print(ans...
a.cc:14:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 14 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:1:1: error: 'def' does not name a type 1 | def main(): | ^~~
s282920825
p04006
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll N, X; cin >> N >> X; vector<ll> A(N), B(N); for (auto &e : A) cin >> e; ll minv = accumulate<ll>(begin(A), end(A), 0); for (int i = 1; i < N; i++) { ...
a.cc: In function 'int main()': a.cc:12:33: error: no matching function for call to 'accumulate<ll>(std::vector<long long int>::iterator, std::vector<long long int>::iterator, int)' 12 | ll minv = accumulate<ll>(begin(A), end(A), 0); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file inclu...
s925350866
p04006
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int, int> P; typedef long long ll; int main(){ ll N, x; cin >> N >> x; ll a[N]; for(int i=0; i<N; i++) cin >> a[i]; int min_cost[N][N]; for(int i=0; i<N; i++){ for(int j=0; j<N; j++){ if(i==0) min_cost[j][i] = a[j]; else{ if(min_cost[j][i-1] > ...
a.cc: In function 'int main()': a.cc:15:75: warning: pointer to a function used in arithmetic [-Wpointer-arith] 15 | if(min_cost[j][i-1] > a[(j+N-i)%N]) time[j][i] = a[(j+N-i)%N]; | ^ a.cc:15:78: warning: ...
s744028171
p04006
C++
#include<bits/stdc++.h> using namespace std; #define debug(n) cerr << #n << ':' << n << endl; #define dline cerr << __LINE__ << endl; #define rep(i,s,e) for(ll i = (ll)(s); i < (ll)(e); ++i) #define per(i,s,e) for(ll i = (ll)(s)-1; i >= (ll)(e); --i) using ll = long long; template<class T, class U> using P = pair...
a.cc: In function 'int main()': a.cc:46:28: error: 'k' was not declared in this scope 46 | ChangeMin(v[i], a[(i-k+n)%n]); | ^
s880715597
p04006
C++
#include<bits/stdc++.h> using namespace std; #define debug(n) cerr << #n << ':' << n << endl; #define dline cerr << __LINE__ << endl; #define rep(i,s,e) for(int i = (int)(s); i < (int)(e); ++i) #define per(i,s,e) for(int i = (int)(s)-1; i >= (int)(e); --i) using ll = long long; template<class T, class U> using P ...
a.cc: In function 'int main()': a.cc:51:23: error: no matching function for call to 'ChangeMin(ll&, int)' 51 | rep(i,0,n) ChangeMin(ans, f(i)); | ~~~~~~~~~^~~~~~~~~~~ a.cc:22:6: note: candidate: 'template<class T> bool ChangeMin(T&, const T&)' 22 | bool ChangeMin(T&a,const T&b){ | ...
s012386874
p04006
C++
#include<iostream> #include<string> #include<cstdio> #include<cstring> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #in...
a.cc: In function 'void solve()': a.cc:62:8: error: redeclaration of 'll ans' 62 | ll ans = INF; | ^~~ a.cc:56:8: note: 'll ans' previously declared here 56 | ll ans = 0; | ^~~
s673813988
p04006
C++
v/* it was worth becoming a chemist */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; typedef long double ld; typedef unsigned int uni; typedef unsigned long long unll; typedef pair<int, int> pii; typedef pair<long long, long long> pll; typedef pair<long long, int> pli; typedef...
a.cc:1:1: error: 'v' does not name a type 1 | v/* it was worth becoming a chemist */ | ^ 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, from ...
s173317874
p04006
C++
#include <bits/stdc++.h> using namespace std; const int MAXN = 2000 + 10, inf = INT_MAX; long long n, x; long long ans; long long shift; long long a[MAXN], b[MAXN]; int main() { cin >> n >> x; for (int i = 0; i < n; i++) { cin >> a[i]; b[i] = a[i]; } ans = inf; rep(int k = 0; k < n; k++) { shift = k...
a.cc: In function 'int main()': a.cc:20:13: error: expected primary-expression before 'int' 20 | rep(int k = 0; k < n; k++) { | ^~~ a.cc:20:24: error: 'k' was not declared in this scope 20 | rep(int k = 0; k < n; k++) { | ^
s798557992
p04006
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll N = 2000 + 10, inf = 1e18; ll dp[N][N]; int main() { ll n, x; cin >> n >> x; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) dp[0][i] = a[i]; for (int i = 1; i < n; i++) for (int j = 0; j < n; j+...
a.cc: In function 'int main()': a.cc:13:16: error: 'a' was not declared in this scope 13 | cin >> a[i]; | ^ a.cc:15:20: error: 'a' was not declared in this scope 15 | dp[0][i] = a[i]; | ^ a.cc:18:54: error: 'a' was not declared in this scope 18 | ...
s261538954
p04006
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <set> #include <queue> #include <deque> #include <map> #include <stack> #include<bitset> #include<list> #include<cassert> #include<numeric> using namespace std; const int N = 2 * 1000 + 5; vector<long long> a; long long n, x; long l...
a.cc: In function 'int main()': a.cc:38:48: error: 'k' was not declared in this scope 38 | dp[i][j] = min(a[((i - k) + n) % n], dp[(i - 1 + n) % n][j]); | ^
s265703232
p04006
C++
#include <bits/stdc++.h> using namespace std; const int N = 2000 + 7; pair < long long, long long > w[N][N]; long long res, x, n, a[N]; long long dis[N]; long long main() { cin >> n >> x; for (long long i = 1; i <= n; i++) cin >> a[i]; for (long long i = 1; i <= n; i++) { for (long long j = 1; j <= n; j++) {...
cc1plus: error: '::main' must return 'int'
s017547872
p04006
C++
#include<iostream> #include<iomanip> #include<cstdio> #include<string> #include<cstring> #include<climits> #include<algorithm> #include<vector> #include<cmath> #include<map> #include<set> #include<stack> #include<queue> #include<deque> #include<tuple> #include<list> #include<unordered_map> #define ll long long #define ...
a.cc: In function 'int main()': a.cc:55:38: error: expected primary-expression before ',' token 55 | b[j][i]=min(b[j][i-1],a[s]);, | ^
s295023792
p04006
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <cassert> #include <map> using namespace std; int main() { std::ios_base::sync_with_stdio(false); cin.tie(0); int n, x; cin >> n >> x; std::vector<int> v(n); for (auto& el : v) { cin >> el; } auto ind = std::min_...
a.cc: In function 'int main()': a.cc:41:14: error: no matching function for call to 'min(int64_t&, long long int)' 41 | ans = min(ans, sum + x * 1ll * k); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_class...
s556774363
p04006
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; typedef long long int ll; ll mi[2005]; int main(){ int n,x; cin >> n >> x; vector<int> a(n); for(int i=0;i<n;i++){ cin >> a[i]; mi[i]=a[i]; } ll ans=1e18; for(int i=0;i<n;i++){ ll sum=0; for(int j=0;j<n;j++){ sum+=mi[j]; ...
a.cc: In function 'int main()': a.cc:24:34: error: no matching function for call to 'min(ll&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)' 24 | mi[j]=min(mi[j],a[(j+n-i-1)%n]); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/inc...
s667176367
p04006
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; typedef long long int ll; int mi[2005]; int main(){ int n,x; cin >> n >> x; vector<ll> a(n); for(int i=0;i<n;i++){ cin >> a[i]; mi[i]=a[i]; } ll ans=1e18; for(int i=0;i<n;i++){ ll sum=0; for(int j=0;j<n;j++){ sum+=mi[j]; ...
a.cc: In function 'int main()': a.cc:24:34: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)' 24 | mi[j]=min(mi[j],a[(j+n-i-1)%n]); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file i...
s359858951
p04006
Java
public class Main { public static void main(String[] args) { // TODO Auto-generated method stub long x,kk,ans; int n; Scanner in =new Scanner(System.in); n=in.nextInt();x=in.nextLong(); long [] a=new long[n+1000]; long [][] dp = new long[n+500][n+500]; for(int i=1;i<=n;i++) { a[i]=in.nextLong(); ...
Main.java:7: error: cannot find symbol Scanner in =new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol Scanner in =new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s765065183
p04006
Java
#include<iostream> #include<string> #include<cstring> #include<map> #include<algorithm> #include<set> #include<vector> #include<cstdio> #include<cmath> #include<queue> using namespace std; typedef long long LL; const int maxn = 2e3 + 5; LL a[maxn]; LL b[maxn][maxn]; int main(){ int n; LL x,sum = 1LL << 60LL; ...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include<string> ^ Main.java:3: error: illegal character: '#' #include<cstring> ^ Main.java:4: error: illegal character: '#' #include<map> ^ Main.java:5: error: illegal character: '#' #include<algorithm> ^ Main.ja...
s014168088
p04006
Java
#include<bits/stdc++.h> using namespace std; typedef long long LL; const int maxn = 2e3 + 5; LL a[maxn]; LL b[maxn][maxn]; int main(){ int n; LL x,sum = 1LL << 60LL; cin >> n >> x; for(int i = 1;i <= n;i++) cin >> a[i]; for(int i = 1;i <= n;i++){ b[i][0] = a[i]; for(int k = 1;k <= n...
Main.java:1: error: illegal character: '#' #include<bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include<bits/stdc++.h> ^ Main.java:3: error: class, interface, enum, or record expected typedef long long LL; ^ Main.java:5: error: class, interface, enum, or record expected cons...
s412664358
p04006
Java
public static void main(String[] args) { // TODO Auto-generated method stub long x,bal1,bal2,bal3,ans,kk; int n; Scanner in =new Scanner(System.in); n=in.nextInt();x=in.nextLong(); long [] a=new long[n+1000]; for(int i=1;i<=n;i++) { a[i]=in.nextLong(); } ans=0;kk=-1; for(int i=1;i<=n;i++) { b...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s964139691
p04006
Java
import java.util.Scanner; public class BBBBBBBBBB { public static void main(String[] args) { // TODO Auto-generated method stub long x,bal1,bal2,bal3,ans,kk; int n; Scanner in =new Scanner(System.in); n=in.nextInt();x=in.nextLong(); long [] a=new long[n+1000]; for(int i=1;i<=n;i++) { a[i]=in.nextLo...
Main.java:3: error: class BBBBBBBBBB is public, should be declared in a file named BBBBBBBBBB.java public class BBBBBBBBBB { ^ 1 error
s767280357
p04006
Java
public class BBBBBBBBBB { public static void main(String[] args) { // TODO Auto-generated method stub long x,bal1,bal2,bal3,ans,kk; int n; Scanner in =new Scanner(System.in); n=in.nextInt();x=in.nextLong(); long [] a=new long[n+1000]; for(int i=1;i<=n;i++) { a[i]=in.nextLong(); } ans=0;kk=-1; ...
Main.java:1: error: class BBBBBBBBBB is public, should be declared in a file named BBBBBBBBBB.java public class BBBBBBBBBB { ^ Main.java:7: error: cannot find symbol Scanner in =new Scanner(System.in); ^ symbol: class Scanner location: class BBBBBBBBBB Main.java:7: error: cannot find symbol Scanner i...
s762765996
p04006
C++
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i,s,l) for(lli i=s;i<l;i++) #define DEBUG 0 #define INF (1LL<<50) #define MOD 1000000007 signed main(){ lli n,x; cin>>n>>x; lli a[n],c[n]; lli ans=0; for(lli i=0;i<n;i++){ cin>>a[i]; c[i] = a[i]; ans += a[i]; } for...
a.cc: In function 'int main()': a.cc:25:23: error: 'N' was not declared in this scope 25 | for(lli t=1;t<N;t++){ | ^
s127586654
p04006
C
#include<stdio.h> long long nn[2000][2000]; int main(){ int n,i,j; long long x,a[2000]; scanf("%d%lld",&n,&x); for(i=0;i<n;i++)scanf("%lld",&a[i]); for(i=0;i<n;i++){ nn[i][i]=a[i]; } for(i=0;i<n;i++){ for(j=0;j<n;j++){ nn[i][j]=nn[i][i]; if(i>j)nn[i][j]+=(n-i+j)*x; else nn[i][j...
main.c: In function 'main': main.c:24:57: error: subscripted value is neither array nor pointer nor vector 24 | if(tmp==-1)tmp=n[j][i]; | ^
s991888144
p04006
C++
#include<bits/stdc++.h> #define LL long long using namespace std; int main() { int n,x,a[2005]; while(scanf("%d%d",&n,&x)!=EOF) { LL sum=0;///sum求出若所有数都直接取本身的总花费 int minn=0x7fffffff,mini; for(int i=0;i<n;i++) { scanf("%d",&a[i]); sum+=a[i]; ...
a.cc:34:1: error: unterminated comment 34 | /* | ^
s039440366
p04006
C++
#include <bits/stdc++.h> #define fi first #define se second #define ll long long //priority_queue<int, vector<int>, greater<int> > pq; #define _CRT_SECURE_NO_DEPRECATE const int N = 33003; #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin...
a.cc: In function 'int main()': a.cc:17:1: error: 'ans' was not declared in this scope; did you mean 'abs'? 17 | ans=1e18; | ^~~ | abs
s973233209
p04006
C++
#include <bits/stdc++.h> //#include <rng_58> //#include <chokudai> //#include <tourist> using namespace std; // Macro and Macro Functions #define rep(a, b) for(int a = 0; a < b; ++a) #define REP(a, b, c) for(int a = b; a < c; ++a) #define drep(a, b, c) for(int a=0,b=0;b<c?:(b=0,++a<c);++b) #define int long long #defi...
a.cc:128:2: error: stray '#' in program 128 | }#include <bits/stdc++.h> | ^ a.cc:128:3: error: 'include' does not name a type 128 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:175:6: error: redefinition of 'bool DEBUG' 175 | bool DEBUG=false; | ^~~~~ a.cc:48:6: note: 'bool DEBUG' previously...
s263187488
p04006
C++
#include "bits/stdc++.h" using namespace std; #define Rep(i,n) for(int i=0;i<(int)(n);i++) #define For(i,n1,n2) for(int i=(int)(n1);i<(int)(n2);i++) #define REP(i,n) for(ll i=0;i<(ll)(n);i++) #define RREP(i,n) for(ll i=((ll)(n)-1);i>=0;i--) #define FOR(i,n1,n2) for(ll i=(ll)(n1);i<(ll)(n2);i++) #define put(a) cout<<a<<...
a.cc:19:16: error: expected unqualified-id before '<' token 19 | inline template<typename T> | ^ a.cc:24:2: error: expected ';' before 'inline' 24 | } | ^ | ; 25 | 26 | inline template<typename T> | ~~~~~~ a.cc: In function 'int main()': a.cc:78:5: error: 'SegmentTr...
s873452297
p04006
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,x;cin>>n>>x; vector<int> a(n),b(n); for(int i=0;i<n;i++){int x ;cin>>x;a[i]=b[i]=x;} int num=0; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(a[(i+j)%n]>a[i%n]+j*x;){ a[(i+j)%n]=a[i%n]+x; b[(i+j)%n]=b[i%n]; num=j;} }} int ans=accumulate(begin(...
a.cc: In function 'int main()': a.cc:11:34: error: expected primary-expression before ')' token 11 | if(a[(i+j)%n]>a[i%n]+j*x;){ | ^
s026587006
p04006
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,x;cin>>n>>x; vector<int> a(n); for(auto&& w:a)cin>>w; int num=0; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(a[(i+j)%n]<a[i%n]+j*x;){ a[(i+j)%n]=a[i%n]; num=j;} }} int ans=accumulate(begin(a),end(a),0); cout<<ans+num*x<<endl; }
a.cc: In function 'int main()': a.cc:11:34: error: expected primary-expression before ')' token 11 | if(a[(i+j)%n]<a[i%n]+j*x;){ | ^
s183746174
p04006
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,x;cin>>n>>x; vector<int> a(n); for(auto&& w:a)cin>>w; for(int i=0;<2*n;i++){ a[(i+1)%n]=min(a[(i+1)%n],a[i%n]+x); } int ans=accumulate(begin(a),end(a),0); cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:9:13: error: expected primary-expression before '<' token 9 | for(int i=0;<2*n;i++){ | ^
s510610500
p04006
C++
#include <queue> #include <iostream> #include <cmath> #include <cstdlib> #include <algorithm> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <map> #include <stdio.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define FOR(i, a, b) for(int i = (a); i < (i...
a.cc: In function 'int main()': a.cc:76:27: error: no matching function for call to 'min(ll&, long long unsigned int)' 76 | sum += min(s, x + mi * q.size()); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/deque:62, from /usr/include...
s290022223
p04006
C++
#include <algorithm> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <string.h> #include <unordered_map> #include <unordered_set> #include <vector> #define rep(i,n) for(int i=0;i<n;i++) #define eps ...
a.cc: In function 'int main()': a.cc:21:13: error: 'LLONG_MAX' was not declared in this scope 21 | #define INF LLONG_MAX/3 | ^~~~~~~~~ a.cc:38:19: note: in expansion of macro 'INF' 38 | int ans = INF; | ^~~ a.cc:14:1: note: 'LLONG_MAX' is defined in header '<climi...
s602827419
p04006
C++
// https://atcoder.jp/contests/agc004/tasks/agc004_b #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; #define ALL(obj) (obj).begin(), (obj).end() #define ALLR(obj) (obj).rbegin(), (o...
a.cc: In function 'int main()': a.cc:29:19: error: 'INT_MAX' was not declared in this scope 29 | ll minv = INT_MAX; | ^~~~~~~ a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 10 | #include <vector> +++ |+#include...
s805375598
p04006
C++
#include <iostream> #include <vector> #include <algorithm> int main (void) { int N = 0 long long x = 0; std::cin >> N >> x; long long A = 0; std::vector<long long> a; while(std::cin >> A) { a.push_back(A); } std::vector<long long> cost; long long temp = 0; //magic k:0 ~ N-1 for(int k = ...
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'long' 7 | long long x = 0; | ^~~~ a.cc:8:20: error: 'x' was not declared in this scope 8 | std::cin >> N >> x; | ^
s393688618
p04006
C++
#include <stdio.h> #include <string.h> #include <string> #include <vector> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vecll vector<ll> using namespace std; int in() {int x;scanf("%d",&x);return x;} ll lin() {ll x;scanf("%lld",&x);return x;} int main(){ ...
a.cc: In function 'int main()': a.cc:22:12: error: 'LONG_MAX' was not declared in this scope 22 | ll ans=LONG_MAX; | ^~~~~~~~ a.cc:5:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include <vector> +++ |+#include <climits> ...
s048036339
p04006
C++
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9+7; const long long LINF = 1e18; #define dump(x) cout << 'x' << ' = ' << (x) << ` `; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) for(int i=0;i<(n);++i) #define REPR(i,n) for(int i=n;i>=0;i--) #define FOREACH(x,a) for(auto& (x) : (a) ) ty...
a.cc: In function 'int main(int, const char**)': a.cc:20:12: error: 'minimum' was not declared in this scope; did you mean 'minimun'? 20 | ans += minimum; | ^~~~~~~ | minimun
s627929329
p04006
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, x, i, m = 0, f = 0; long long s = 0; cin >> n >> x; int a[n], c[n] = {}; for(i=0; i<n; i++){ cin >> a[i]; } while(f == 0){ f = 1; for(i=0; i<n; i++){#include <bits/stdc++.h> using namespace std; int ma...
a.cc:14:28: error: stray '#' in program 14 | for(i=0; i<n; i++){#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:14:29: error: 'include' was not declared in this scope 14 | for(i=0; i<n; i++){#include <bits/stdc++.h> | ...
s094711481
p04006
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:130:32: error: 'b' was not declared in this scope 130 | REP (i,n) {cin >> a[i];b[i] = a[i];} | ^ a.cc:133:27: error: 'b' was not declared in this scope 133 | REP (j,n) b[j] = min(b[j],a[(j - i + n) % n]); | ...
s317397490
p04006
C++
#include <bits/stdc++.h> using namespace std; int a[2010]; int main(){ int i,j,n,mn,mi; long long x,ans=0; scanf("%d%lld",&n,&x); for(i=1;i<=n;++i){ for(j=1,mn=2e9;j<=n;++j)if(a[j]>0&&mn>a[j])mn=a[j],mi=j; ans+=mn; for(j=1;j<=n;++j)a[j]=min(a[j],mn+(j-mi+n)%n*x); a[mi]=-1; } printf("%lld",an...
a.cc: In function 'int main()': a.cc:11:30: error: no matching function for call to 'min(int&, long long int)' 11 | for(j=1;j<=n;++j)a[j]=min(a[j],mn+(j-mi+n)%n*x); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/inclu...
s033203315
p04006
C++
#pragma once #include <sstream> #include <string> #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 <deque> #include <numeric> #include <iomanip> #...
a.cc:1:9: warning: #pragma once in main file 1 | #pragma once | ^~~~ a.cc:19:9: warning: "M_PI" redefined 19 | #define M_PI acos(-1) | ^~~~ In file included from /usr/include/c++/14/cmath:47, from a.cc:15: /usr/include/math.h:1121:10: note: this is the location of the...
s336699491
p04006
C++
#include <bits/stdc++.h> using namespace std; #define dump(a) cout << (a) << '\n'; typedef int64_t Int; Int mod = 1e9+7; // Int MOD = 998244353; int main() { ios::sync_with_stdio(false); Int n, x; cin >> n >> x; vector<Int> a(n); for (Int i = 0; i < n; i++) cin >> a[i]; vector<Int> cost = a; ...
a.cc: In function 'int main()': a.cc:23:39: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type)' 23 | cnt[(i + j) % n] = max(0LL, cnt[(i + j) % n] - 1); | ~~~^~~~~~~~~~~~~~~~~~~...
s663271460
p04006
C++
#include <bits/stdc++.h> using namespace std; #define dump(a) cout << (a) << '\n'; typedef int64_t Int; Int mod = 1e9+7; // Int MOD = 998244353; int main() { ios::sync_with_stdio(false); Int n, x; cin >> n >> x; vector<Int> a(n); for (Int i = 0; i < n...
a.cc: In function 'int main()': a.cc:23:43: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type)' 23 | cnt[(i + j) % n] = max(0LL, cnt[(i + j) % n] - 1); | ~~~^~~~~~~~~~~...
s802089195
p04006
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int) n; i++) ll n, x; vector<ll> a, mi; ll calc(int pos) { ll res = 0; rep(i, n) mi[i] = min(mi[i], a[(i+pos)%n]); rep(i, n) res+= mi[i]; return res + pos * x; } int main() { cin >> n >> x; rep(i...
a.cc: In function 'int main()': a.cc:29:12: error: 'INF' was not declared in this scope 29 | ll res = INF; | ^~~
s383633653
p04006
C++
x
a.cc:1:1: error: 'x' does not name a type 1 | x | ^
s659302733
p04006
C++
#include <bits/stdc++.h> #define f first #define s second #define pb push_back #define mp make_pair using namespace std; const int mnx = 3e5 + 9; const int mod = 1e9 + 7; ll n, x, ans = 1e18; ll a[mnx], b[mnx]; int main(){ cin >> n >> x; for(int i = 0; i < n; i++){ cin >> a[i]; b[i] ...
a.cc:12:1: error: 'll' does not name a type 12 | ll n, x, ans = 1e18; | ^~ a.cc:13:1: error: 'll' does not name a type 13 | ll a[mnx], b[mnx]; | ^~ a.cc: In function 'int main()': a.cc:17:8: error: 'n' was not declared in this scope; did you mean 'yn'? 17 | cin >> n >> x; | ^ | ...