criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<stack>
#include<climits>
#include<cstring>
#include<queue>
#include<complex>
using namespace std;

typedef complex<double> P;

struct L : public vector<P>{
    L(const P &a, const P &b){
        push_back(a), push_back(b);
    }
};

struct C {
    P p; double r;
    C(const P &p, double r) : p(p), r(r) { }
};

const double EPS = 1e-8;

namespace std {
  bool operator < (const P& a, const P& b) {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}

crossPointsOfCircleAndLine(C &circle, L &l){
    P p0 = circle.p;
    double r = circle.r;
    P p1 = l[0];
    P p2 = l[1];
    double x = real(p1-p0);
    double y = imag(p1-p0);
    double z = real(p2-p0);
    double w = imag(p2-p0);
    double a = y-w;
    double b = -(x-z);
    double c = y*z - x*w;

    P cross1((a*c - b*sqrt((a*a+b*b)*r*r - c*c))/(a*a + b*b), (b*c + a*sqrt((a*a+b*b)*r*r - c*c))/(a*a + b*b));
    P cross2((a*c + b*sqrt((a*a+b*b)*r*r - c*c))/(a*a + b*b), (b*c - a*sqrt((a*a+b*b)*r*r - c*c))/(a*a + b*b));

    if(cross2 < cross1){
        swap(cross1, cross2);
    }
    printf("%.10f %.10f ", cross1.real() + p0.real(), cross1.imag() + p0.imag());
    printf("%.10f %.10f\n", cross2.real() + p0.real(), cross2.imag() + p0.imag());
}

int main(){
    double cx, cy, r, x1, y1, x2, y2;
    int q;
    cin >> cx >> cy >> r >> q;
    P p0(cx, cy);
    C circle(p0, r);

    for (int i=0;i<q;i++){
        cin >> x1 >> y1 >> x2 >> y2 ;
        P p1(x1, y1);
        P p2(x2, y2);
        L l(p1, p2);
        crossPointsOfCircleAndLine(circle, l);
    }
    return 0;
}

Compiler output:
a.cc:35:1: error: ISO C++ forbids declaration of 'crossPointsOfCircleAndLine' with no type [-fpermissive]
   35 | crossPointsOfCircleAndLine(C &circle, L &l){
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int crossPointsOfCircleAndLine(C&, L&)':
a.cc:56:1: warning: no return statement in function returning non-void [-Wreturn-type]
   56 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define all(a) a.begin(),a.end()
typedef complex<double> Point;
typedef vector<Point> VP;
#define X real()
#define Y imag()
#define LE(n,m) ((n) < (m) + EPS)
#define GE(n,m) ((n) + EPS > (m))
#define EQ(n,m) (abs((n)-(m)) < EPS)

double dot(Point a, Point b) {
  return a.X*b.X + a.Y*b.Y;
}

Point proj(Point a1, Point a2, Point p) {
  return a1 + dot(a2-a1, p-a1)/norm(a2-a1) * (a2-a1);
}

VP crosspointLC(Point a1, Point a2, Point c, double r) {
  VP ps;
  Point ft = proj(a1, a2, c);
  if(!GE(r*r,norm(ft-c))) assert(false);
  assert(r*r >= norm(ft-c));
  Point dir = sqrt(max(r*r - norm(ft-c), 0.0)) / abs(a2-a1) * (a2-a1);
  ps.push_back(ft + dir);
  ps.push_back(ft - dir);
  return ps;
}

namespace std {
  bool operator<(const Point a, const Point b) {
    return a.X != b.X ? a.X < b.X : a.Y < b.Y;
  }
}

int main(void){
    double cx,cy,r;
    int q;
    cin>>cx>>cy>>r>>q;
    rep(i,q){
        double x1,y1,x2,y2;
        cin>>x1>>y1>>x2>>y2;
        VP ps = crosspointLC(Point(x1,y1),Point(x2,y2),Point(cx,cy),r);
        sort(all(ps));
        printf("%.9f %.9f " ,ps[0].X,ps[0].Y);
        printf("%.9f %.9f\n",ps[1].X,ps[1].Y);
    }
    return 0;
}

Compiler output:
a.cc: In function 'VP crosspointLC(Point, Point, Point, double)':
a.cc:10:24: error: 'EPS' was not declared in this scope
   10 | #define GE(n,m) ((n) + EPS > (m))
      |                        ^~~
a.cc:24:7: note: in expansion of macro 'GE'
   24 |   if(!GE(r*r,norm(ft-c))) assert(false);
      |       ^~
Language: C++

#define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
using namespace std;
#define EPS 1e-10

struct Point{
    double x,y;
    Point(){}
    Point(double _x,double _y){
        x=_x; y=_y;
    }
    Point operator +(const Point p)const{
        return Point(x+p.x,y+p.y);
    }
    Point operator -(const Point p)const{
        return Point(x-p.x,y-p.y);
    }
	Point operator *(const double d)const{
		return Point(x*d,y*d);
	}
	bool operator <(const Point &p)const{
		if(x==p.x) return y<p.y;
		return x<p.x;
	}
};

struct Line{
    Point a,b;
    Line(){}
    Line(Point _a,Point _b){
        a=_a; b=_b;
    }
};

struct Circle{
	Point c;
	double r;
	Circle(){}
	Circle(Point _c,double _r){
		c=_c; r=_r;
	}
};

double dot(Point p,Point q){
    return p.x*q.x+p.y*q.y;
}

double cross(Point p,Point q){
    return p.x*q.y-q.x*p.y;
}

int ccw(Point a,Point b,Point c){
    if(cross(b-a,c-b)>0) return +1;
    if(cross(b-a,c-b)<0) return -1;
    return 0;
}

bool intersect_ss(Line l,Line m) {
    return ccw(l.a,m.a,l.b)*ccw(l.a,m.b,l.b)<=0 && ccw(m.a,l.a,m.b)*ccw(m.a,l.b,m.b)<=0;
}

bool crosspoint_ll(Line l,Line m,Point &p){
    Point a1,a2,b1,b2;
	a1 = l.b-l.a; a2 = m.b-m.a;
	b1 = m.a-l.a; b2 = m.b-l.a;
	double s1,s2;
	s1 = abs(cross(a1,b1)/2); s2 = abs(cross(a1,b2)/2);
	if(s1<EPS && s2<EPS) return false;
	p = Point(m.a.x+a2.x*s1/(s1+s2),m.a.y+a2.y*s1/(s1+s2));
	return true;
}

bool crosspoint_ss(Line l,Line m,Point &p){
    if(intersect_ss(l,m)==false) return false;
	return crosspoint_ll(l,m,p);
}

int crosspoint_cc(Circle c1,Circle c2,Point &p1,Point &p2){
	double d,a,t;
	d = sqrt((c2.c.x-c1.c.x)*(c2.c.x-c1.c.x)+(c2.c.y-c1.c.y)*(c2.c.y-c1.c.y));
	//if(d<abs(c1.r-c2.r) || c1.r+c2.r<d) return 0;
	a = acos((c1.r*c1.r+d*d-c2.r*c2.r)/(2*c1.r*d));
	t = atan2(c2.c.y-c1.c.y,c2.c.x-c1.c.x);
	p1 = Point(c1.r*cos(t+a),c1.r*sin(t+a));
	p2 = Point(c1.r*cos(t-a),c1.r*sin(t-a));
	if(abs(p1.x-p2.x)<EPS && abs(p1.y-p2.y)<EPS) return 1;
	return 2;
}

int main(){
	Circle c[2];
	for(int i=0;i<2;i++) cin>>c[i].c.x>>c[i].c.y>>c[i].r;
	Point cp[2];
	crosspoint_cc(c[0],c[1],cp[0],cp[1]);
	sort(cp,cp+2);
	printf("%lf %lf %lf %lf\n",cp[0].x,cp[0].y,cp[1].x,cp[1].y)

Compiler output:
a.cc: In function 'int main()':
a.cc:108:68: error: expected ';' at end of input
  108 |         printf("%lf %lf %lf %lf\n",cp[0].x,cp[0].y,cp[1].x,cp[1].y)
      |                                                                    ^
      |                                                                    ;
a.cc:108:68: error: expected '}' at end of input
a.cc:102:11: note: to match this '{'
  102 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
typedef complex<double> P;
namespace std{
  bool operator < (const P &a,const P &b){
    return ( a.real()==b.real() ? a.imag() < b.imag() : a.real() < b.real() );
  }
};
 
P getCrossPointCC(P p1,double r1,P p2,double r2){
  double cA = (r1*r1+norm(p1-p2)-r2*r2) / (2.0*r1*abs(p1-p2);
  return p1+(p2-p1)/c*r1*P(cA,sqrt(1.0-cA*cA));
}
 
int n;
P p1,p2;
double px,py,r1,r2;
 
int main(){
   
  cin>>px>>py>>r1;
  p1=P(px,py);
  cin>>px>>py>>r2;
  p2=P(px,py);
   
  P A=getCrossPointCC(p1,r1,p2,r2);
  P B=getCrossPointCC(p2,r2,p1,r1);
  P a=min(A,B),b=max(A,B);
  printf("%.9f %.9f %.9f %.9f\n",a.real(),a.imag(),b.real(),b.imag());
  return 0;
}

Compiler output:
a.cc: In function 'P getCrossPointCC(P, double, P, double)':
a.cc:12:61: error: expected ')' before ';' token
   12 |   double cA = (r1*r1+norm(p1-p2)-r2*r2) / (2.0*r1*abs(p1-p2);
      |                                           ~                 ^
      |                                                             )
a.cc:13:21: error: 'c' was not declared in this scope; did you mean 'cA'?
   13 |   return p1+(p2-p1)/c*r1*P(cA,sqrt(1.0-cA*cA));
      |                     ^
      |                     cA
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
typedef complex<double> P;
namespace std{
  bool operator < (const P &a,const P &b){
    return ( a.real()==b.real() ? a.imag() < b.imag() : a.real() < b.real() );
  }
};
 
P getCrossPointCC(P p1,double r1,P p2,double r2){
  double cA = (r1*r1+norm(p1-p2)-r2*r2) / (2.0*r1*abs(p1-p2));
  return p1+(p2-p1)/c*r1*P(cA,sqrt(1.0-cA*cA));
}
 
int n;
P p1,p2;
double px,py,r1,r2;
 
int main(){
   
  cin>>px>>py>>r1;
  p1=P(px,py);
  cin>>px>>py>>r2;
  p2=P(px,py);
   
  P A=getCrossPointCC(p1,r1,p2,r2);
  P B=getCrossPointCC(p2,r2,p1,r1);
  P a=min(A,B),b=max(A,B);
  printf("%.9f %.9f %.9f %.9f\n",a.real(),a.imag(),b.real(),b.imag());
  return 0;
}

Compiler output:
a.cc: In function 'P getCrossPointCC(P, double, P, double)':
a.cc:13:21: error: 'c' was not declared in this scope; did you mean 'cA'?
   13 |   return p1+(p2-p1)/c*r1*P(cA,sqrt(1.0-cA*cA));
      |                     ^
      |                     cA
Language: C++

#include <bits/stdc++.h>
using namespace std;

using R=long double;
const R EPS=1e-9L;
using P=complex<R>;
using VP=vector<P>;
using L=struct{P s,t;};
using C=struct{P c;R r;};

auto operator >> (istream& is,P& p){ R x,y;is >> x >> y; p=P(x,y); return is;}
auto operator << (ostream& os,P& p){ os << real(p) << " " << imag(p); return os;}

P proj(L l,P p){ R u=real((p-l.s)/(l.t-l.s)); return (1-u)*l.s+u*l.t;}

VP cross(C c, L l){
	P h=proj(l,c.c),e=polar(sqrt(norm(c.r)-norm(h-c.c)),arg(l.t-l.s));
	return VP{h-e,h+e};
}

VP cross(C a,C b){
	P d=b.c-a.c,w=(norm(d)+norm(a.r)-norm(b.r))/(2.0L*norm(d))*d;
	return cross(a,{a.c+w,a.c+w+1il*w});
}

int main(void){
	C c1,c2;
	cin >> c1.c >> c1.r >> c2.c >> c2.r;
		
	VP res=cross(c1,c2);
	if(real(res[0])-real(res[1])>0) swap(res[0],res[1]);
	if(abs(real(res[0])-real(res[1]))<EPS and (imag(res[0])-imag(res[1])>0)) swap(res[0],res[1]);
	cout.precision(20);
	cout << fixed << res[0] << " " << res[1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'auto operator>>(std::istream&, P&)':
a.cc:11:75: error: use of deleted function 'std::basic_istream<_CharT, _Traits>::basic_istream(const std::basic_istream<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]'
   11 | auto operator >> (istream& is,P& p){ R x,y;is >> x >> y; p=P(x,y); return is;}
      |                                                                           ^~
In file included from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/istream:704:7: note: declared here
  704 |       basic_istream(const basic_istream&) = delete;
      |       ^~~~~~~~~~~~~
a.cc:11:75: note: use '-fdiagnostics-all-candidates' to display considered candidates
   11 | auto operator >> (istream& is,P& p){ R x,y;is >> x >> y; p=P(x,y); return is;}
      |                                                                           ^~
a.cc: In function 'auto operator<<(std::ostream&, P&)':
a.cc:12:78: error: use of deleted function 'std::basic_ostream<_CharT, _Traits>::basic_ostream(const std::basic_ostream<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]'
   12 | auto operator << (ostream& os,P& p){ os << real(p) << " " << imag(p); return os;}
      |                                                                              ^~
In file included from /usr/include/c++/14/istream:41:
/usr/include/c++/14/ostream:447:7: note: declared here
  447 |       basic_ostream(const basic_ostream&) = delete;
      |       ^~~~~~~~~~~~~
a.cc:12:78: note: use '-fdiagnostics-all-candidates' to display considered candidates
   12 | auto operator << (ostream& os,P& p){ os << real(p) << " " << imag(p); return os;}
      |                                                                              ^~
Language: C++

c1x, c1y, c1r = map(int, input().split())
c2x, c2y, c2r = map(int, input().split())
dx, dy = c2x - c1x, c2y - c1y
s2 = dx ** 2 + dy ** 2
a = (s2 + c1r ** 2 - c2r ** 2) / 2
df = (s2 * c1r ** 2 - a ** 2) ** 0.5
ix1, ix2 = (a * dx + dy * df) / s2, (a * dx - dy * df) / s2
iy1, iy2 = (a * dy - dx * df) / s2, (a * dy + dx * df) / s2
if (ix1, iy1) > (ix2, iy2):
    ix1, ix2 = ix2, ix1
    iy1, iy2 = iy2, iy1
print(ix1 + c1x, iy1 + c1y, ix2 + c1x, iy2 + c2y)

Compiler output:
a.cc:1:1: error: 'c1x' does not name a type
    1 | c1x, c1y, c1r = map(int, input().split())
      | ^~~
Language: C++

#include<iostream>
#define _USE_MATH_DEFINES
#include<cmath>
#include<cstdio>
#include<utility>
#include<vector>
#include<algorithm>

#define f first
#define s second
#define mp make_pair
#define pi M_PI
#define eps (1e-11)
#define equals(a,b) (fabs((a)-(b))<eps)
using namespace std;
 
class Point{
public:
  double x,y;
  Point(double x=0,double y=0):x(x),y(y){}
 
  Point operator+(Point p){ return Point(x+p.x,y+p.y);}
  Point operator-(Point p){ return Point(x-p.x,y-p.y);}
  Point operator*(double k){ return Point(x*k,y*k);}
  Point operator/(double k){ return Point(x/k,y/k);}
  bool operator<(Point p)const{ return (!equals(x,p.x) ? x<p.x : y<p.y);}
  bool operator==(Point p)const{ return fabs(x-p.x)<eps && fabs(y-p.y)<eps;}
 
  double abs(){ return sqrt(norm());}
  double norm(){ return (x*x+y*y);}
};
typedef Point Vector;
typedef vector<Point> Polygon;
 
class Segment{
public:
  Point p1,p2;
  Segment(Point p1=Point(),Point p2=Point()):p1(p1),p2(p2){}
};
typedef Segment Line;
 
class Circle{
public:
  Point c;
  double r;
  Circle(Point c=Point(),double r=0.0):c(c),r(r){}
};
 
double norm(Vector a){ return (a.x*a.x+a.y*a.y);}
double abs(Vector a){ return sqrt(norm(a));}

Point rotate(Point base,Point a,double r){
  Point b=a-base;
  a.x=b.x*cos((r/180)*M_PI)-b.y*sin((r/180)*M_PI);
  a.y=b.x*sin((r/180)*M_PI)+b.y*cos((r/180)*M_PI);
  a=a+base;
  return a;
}

int intersect(Circle a,Circle b){
  double dis=abs(a.c-b.c),sumr=a.r+b.r,minr=min(a.r,b.r),maxr=max(a.r,b.r);
  if((sumr-dis)<-eps)return 4;
  if(equals(sumr,dis))return 3;
  if((maxr-(dis+minr))<-eps)return 2;
  if(equals(dis+minr,maxr))return 1;
  return 0;
}
 
vector<Point> getCommonTangent(Circle a,Circle b){
  vector<Point> vp;
  int intersection=intersect(a,b);
  if(intersection==0)return vp;
  if(intersection==1){
    Vector v=b.c-a.c;
    if(b.r<a.r)v=(v*a.r)/abs(v);
    else v=(v*a.r*(-1))/abs(v);
    vp.push_back(a.c+v);
    return vp;
  }
  if(intersection==3){
    Vector v=b.c-a.c;
    v=v*a.r/abs(v);
    vp.push_back(a.c+v);
  }
  double d=abs(b.c-a.c),c,s;
  Vector v=(b.c-a.c)/d,v1=v*a.r,v2=v*b.r;
  Point p1,p2;
 
  c=sqrt(d*d-(a.r-b.r)*(a.r-b.r));
  s=(180*asin(c/d))/pi;
 
  if(a.r<b.r)s=180-s;
  vp.push_back(rotate(a.c,a.c+v1,s));
  vp.push_back(rotate(a.c,a.c+v1,360-s));
 
  if(intersection==2 || intersection==3)return vp;
 
  c=sqrt(d*d-(a.r+b.r)*(a.r+b.r));
  s=(180*asin(c/d))/pi;
 
  vp.push_back(rotate(a.c,a.c+v1,s));
  vp.push_back(rotate(a.c,a.c+v1,360-s));
 
  return vp;
}
 
int main()
{
  Circle c1,c2;
 
  cin>>c1.c.x>>c1.c.y>>c1.r;
  cin>>c2.c.x>>c2.c.y>>c2.r;

  if(c1.r > 100) return;
  if(c2.r > 100) return;
 
  vector<Point> v=getCommonTangent(c1,c2);
  sort(v.begin(),v.end());
  for(int i=0;i<v.size();i++)printf("%.10f %.10f\n",v[i].x,v[i].y);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:114:18: error: return-statement with no value, in function returning 'int' [-fpermissive]
  114 |   if(c1.r > 100) return;
      |                  ^~~~~~
a.cc:115:18: error: return-statement with no value, in function returning 'int' [-fpermissive]
  115 |   if(c2.r > 100) return;
      |                  ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;(i)<(n);++(i))
using namespace std;

// Description: ????????????
// Verifyed: various problem
using namespace placeholders;
using R = long double;
const R EPS = 1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r) {return (r > EPS) - (r < -EPS);}
inline R sq(R x) {return sqrt(max(x, 0.0L));}

const R INF = 1E40L;
const R PI = acos(-1.0L);
using P = complex<R>;
using L = struct {P s, t;};
using VP = vector<P>;
using C = struct {P c; R r;};

#define at(a,i) (a[(i + a.size()) % a.size()])

auto& operator >> (istream& is, P& p) { R x, y; is >> x >> y, p = P(x, y); return is;}
auto& operator << (ostream& os, P& p) { os << real(p) << " " << imag(p); return os;}

namespace std {	
	bool operator <  (const P& a, const P& b) { return sgn(real(a - b)) ? real(a - b) < 0 : sgn(imag(a - b)) < 0;}
	bool operator == (const P& a, const P& b) { return sgn(real(a - b)) == 0 && sgn(imag(a - b)) == 0;}
}

inline R dot(P o, P a, P b) {return real(conj(a - o) * (b - o));}
inline R det(P o, P a, P b) {return imag(conj(a - o) * (b - o));}
inline P vec(L l) {return l.t - l.s;}
auto sdot = bind(sgn, bind(dot, _1, _2, _3));
auto sdet = bind(sgn, bind(det, _1, _2, _3));

//projection verify AOJ CGL_1_A
P proj(L l, P p) { R u = real((p - l.s) / vec(l)); return (1 - u) * l.s + u * l.t;}

// cross point between circle and line
// verified: AOJ CGL_7_D
P cir(C c, R t) {return c.c + polar(c.r, t);}
VP cross(C c, L l) {
	P h = proj(l, c.c);
	P e = polar(sq(norm(c.r) - norm(h - c.c)), arg(vec(l)));
	return VP{h - e, h + e};
}

// cross point between circles
// verified: AOJ CGL_7_E
VP cross(C a, C b) {
	P d = b.c - a.c;
	P w = (norm(d) + norm(a.r) - norm(b.r)) / (2.0L * norm(d)) * d;
	return cross(a, {a.c + w, a.c + w + 1il * d});
}

// common area of circle and polygon
R area(R r, P a, P b) {
	return sgn(abs((a + b) / 2.0l) - r) <= 0 ? det(0, a, b)/ 2.0l : norm(r) * (arg(b) - arg(a)) / 2.0l;
}

int main(void){
	int n;
	R r;
	cin >> n >> r;
	C c = C{0.0L,r};
	VP pol(n);
	rep(i,n) cin >> pol[i];
	cout.precision(20);

	R res = 0;
	rep(i, pol.size()) {
		R r = c.r;
		P a = at(pol, i) - c.c , b = at(pol, i + 1) - c.c;
		
		auto tmp = cross(c, L{a, b});
		if (sgn(min({r, abs(a), abs(b), abs(b - a)})) == 0) continue;
		
		
		if(sdot(a,isc[0],isc[1])<=0 and sdot(b,isc[0],isc[1])<=0){
			res += area(r, a, b);
		}else{
			res += area(r, a, isc[0]) + area(r, isc[0], isc[1]) + area(r, isc[1], b);
		}
	}

	cout << res << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:27: error: 'isc' was not declared in this scope
   79 |                 if(sdot(a,isc[0],isc[1])<=0 and sdot(b,isc[0],isc[1])<=0){
      |                           ^~~
Language: Java

import java.util.Scanner;
public class Main{
    public static int min_num(int coins[], int n, int start, int sum, int count){
        if(sum > n)
            return coins.length;
        else if(sum == n)
            return 0;
        else
            return Math.min(count + min_num(coins,n,start+1,sum-coins[start]), count + min_num(coins,n,start+1,sum));
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int coins[] = new int[m];
        for(int i = 0 ; i < m ; i++)
            coins[i] = sc.nextInt();
        System.out.println(min_num(coins,n,0,0,0);
    }
}


Compiler output:
Main.java:18: error: ')' or ',' expected
        System.out.println(min_num(coins,n,0,0,0);
                                                 ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static int min_num(int coins[], int n, int start, int sum, int count){
        if(sum > n)
            return coins.length;
        else if(sum == n)
            return 0;
        else
            return Math.min(count + min_num(coins,n,start+1,sum-coins[start]), count + min_num(coins,n,start+1,sum));
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int coins[] = new int[m];
        for(int i = 0 ; i < m ; i++)
            coins[i] = sc.nextInt();
        System.out.println(min_num(coins,n,0,0,0));
    }
}


Compiler output:
Main.java:9: error: method min_num in class Main cannot be applied to given types;
            return Math.min(count + min_num(coins,n,start+1,sum-coins[start]), count + min_num(coins,n,start+1,sum));
                                    ^
  required: int[],int,int,int,int
  found:    int[],int,int,int
  reason: actual and formal argument lists differ in length
Main.java:9: error: method min_num in class Main cannot be applied to given types;
            return Math.min(count + min_num(coins,n,start+1,sum-coins[start]), count + min_num(coins,n,start+1,sum));
                                                                                       ^
  required: int[],int,int,int,int
  found:    int[],int,int,int
  reason: actual and formal argument lists differ in length
2 errors
Language: Java

import java.util.Scanner;
public class Main{
    public static int min_num(int coins[], int n, int start){
        if(start == coins.length)
            return n;
        else if(sum > n)
            return n;
        else if(sum == n)
            return 0;
        else
            return Math.min(1 + min_num(coins,n-coins[start],start+1), min_num(coins,n,start+1));
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int coins[] = new int[m];
        for(int i = 0 ; i < m ; i++)
            coins[i] = sc.nextInt();
        System.out.println(min_num(coins,n,0,0));
    }
}


Compiler output:
Main.java:6: error: cannot find symbol
        else if(sum > n)
                ^
  symbol:   variable sum
  location: class Main
Main.java:8: error: cannot find symbol
        else if(sum == n)
                ^
  symbol:   variable sum
  location: class Main
Main.java:20: error: method min_num in class Main cannot be applied to given types;
        System.out.println(min_num(coins,n,0,0));
                           ^
  required: int[],int,int
  found:    int[],int,int,int
  reason: actual and formal argument lists differ in length
3 errors
Language: Java

import java.util.Scanner;
public class Main{
    public static int min_num(int coins[], int n, int start){
        if(start == coins.length)
            return n;
        else if(n < 0)
            return n;
        else if(n == 0)
            return 0;
        else
            return Math.min(1 + min_num(coins,n-coins[start],start+1), min_num(coins,n,start+1));
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int coins[] = new int[m];
        for(int i = 0 ; i < m ; i++)
            coins[i] = sc.nextInt();
        System.out.println(min_num(coins,n,0,0));
    }
}


Compiler output:
Main.java:20: error: method min_num in class Main cannot be applied to given types;
        System.out.println(min_num(coins,n,0,0));
                           ^
  required: int[],int,int
  found:    int[],int,int,int
  reason: actual and formal argument lists differ in length
1 error
Language: Java

import java.io.*;
import jav.util.Arrays;

class Main{

static final PrintWriter out=new PrintWriter(System.out);
static final INF=Integer.MAX_VALUE/2;

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
int n=Integer.parseInt(line.split(" ")[0]);
int m=Integer.parseInt(line.split(" ")[1]);
int[] v=new int[m];
line=br.readLine();
for(int i=0;i<m;i++) v[i]=Integer.parseInt(line.split(" ")[i]);
int[][] dp=new int[m+1][n+1];
Arrays.fill(dp[m],INF);
for(int i=0;i<=n;i++){
for(int j=m-1;j>=0;j--){
dp[j][i]=Math.min(dp[j+1][i],dp[j][i-v[j]]+1);
}
}
out.pritln(dp[0][n]);
}
out.flush();
}
}

Compiler output:
Main.java:7: error: <identifier> expected
static final INF=Integer.MAX_VALUE/2;
                ^
1 error
Language: Java

import java.io.*;
import jav.util.Arrays;

class Main{

static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
int n=Integer.parseInt(line.split(" ")[0]);
int m=Integer.parseInt(line.split(" ")[1]);
int[] v=new int[m];
line=br.readLine();
for(int i=0;i<m;i++) v[i]=Integer.parseInt(line.split(" ")[i]);
int[][] dp=new int[m+1][n+1];
Arrays.fill(dp[m],INF);
for(int i=0;i<=n;i++){
for(int j=m-1;j>=0;j--){
dp[j][i]=Math.min(dp[j+1][i],dp[j][i-v[j]]+1);
}
}
out.pritln(dp[0][n]);
}
out.flush();
}
}

Compiler output:
Main.java:2: error: package jav.util does not exist
import jav.util.Arrays;
               ^
Main.java:19: error: cannot find symbol
Arrays.fill(dp[m],INF);
^
  symbol:   variable Arrays
  location: class Main
Main.java:25: error: cannot find symbol
out.pritln(dp[0][n]);
   ^
  symbol:   method pritln(int)
  location: variable out of type PrintWriter
3 errors
Language: Java

import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

class Main{

static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
int n=Integer.parseInt(line.split(" ")[0]);
int m=Integer.parseInt(line.split(" ")[1]);
int[] v=new int[m];
StringTokenizer st=new StringTokenizer(br.readLine());
for(int i=0;i<m;i++) v[i]=Integer.parseInt(st.nextToken());
int[][] dp=new int[m+1][n+1];
Arrays.fill(dp[m],INF);
dp[m][0]=0
for(int j=m-1;j>=0;j--){
for(int i=0;i<=n;i++){
if(i<v[j]) dp[j][i]=dp[j+1][i];
else dp[j][i]=Math.min(dp[j+1][i],dp[j][i-v[j]]+1);
}
}
out.println(dp[0][n]);
}
out.flush();
}
}

Compiler output:
Main.java:21: error: ';' expected
dp[m][0]=0
          ^
1 error
Language: Java

#include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;

const int MAX_N=50000;
const int MAX_M=20;
const int INF=-1;
int d[MAX_M];
int dp[MAX_M+1][MAX_N+1];
int n,m;

void solve(){
	for(int i=0;i<=m;i++){
		for(int j=0;j<=n;j++){
                      if(i==0){
                            dp[i][j]=0;
                              }
			if(j<d[i]){
				dp[i+1][j]=dp[i][j];
			}
			else{
				dp[i+1][j]=min(dp[i][j],dp[i][j-d[i]]+1);
			}
		}

	}
}
int main(){
	scanf("%d %d",&n,&m);
	for(int i=0;i<m;i++){
		scanf("%d ",&d[i]);
	}
	memset(dp,INF,sizeof(dp));
	solve();
	printf("%d\n",dp[m][n]);
	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:2: error: illegal character: '#'
#include <algorithm>
^
Main.java:3: error: illegal character: '#'
#include <string.h>
^
Main.java:6: error: class, interface, enum, or record expected
const int MAX_N=50000;
^
Main.java:7: error: class, interface, enum, or record expected
const int MAX_M=20;
^
Main.java:8: error: class, interface, enum, or record expected
const int INF=-1;
^
Main.java:9: error: class, interface, enum, or record expected
int d[MAX_M];
^
Main.java:10: error: class, interface, enum, or record expected
int dp[MAX_M+1][MAX_N+1];
^
Main.java:11: error: class, interface, enum, or record expected
int n,m;
^
Main.java:13: error: unnamed classes are a preview feature and are disabled by default.
void solve(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:30: error: illegal start of expression
	scanf("%d %d",&n,&m);
	              ^
Main.java:30: error: illegal start of expression
	scanf("%d %d",&n,&m);
	                 ^
Main.java:32: error: illegal start of expression
		scanf("%d ",&d[i]);
		            ^
14 errors
Language: Java

import java.util.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;

public class Main{
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = Integer.parseInt(sc.next());
	int m = Integer.parseInt(sc.next());
	int[] c = new int[10000];
	for (int i = 0; i < m; i++) {
		d[i]  = Integer.parseInt(sc.next());
	}
	int dp[] = new int[n+1];
	dp[0] = 1;
	
	for (int i = 1; i < n; i++) {
		dp[i] = dp[i-1]+1;
		for (int j = 0; j < m; j++) {
			if(c[j] == i){
				dp[i] == 1;
			}	
		}
	}
	
	System.out.println(dp[n]);
	}
}

Compiler output:
Main.java:21: error: not a statement
				dp[i] == 1;
				      ^
1 error
Language: Java

import java.util.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;

public class Main{
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = Integer.parseInt(sc.next());
	int m = Integer.parseInt(sc.next());
	int[] c = new int[10000];
	for (int i = 0; i < m; i++) {
		d[i]  = Integer.parseInt(sc.next());
	}
	int dp[] = new int[n+1];
	dp[0] = 1;
	
	for (int i = 1; i < n; i++) {
		dp[i] = dp[i-1]+1;
		for (int j = 0; j < m; j++) {
			if(c[j] == i){
				dp[i] = 1;
			}	
		}
	}
	
	System.out.println(dp[n]);
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
		d[i]  = Integer.parseInt(sc.next());
		^
  symbol:   variable d
  location: class Main
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String args[]){
		Solve s = new Solve();
		s.solve();
	}
}

class Solve{
	Scanner in = new Scanner(System.in);

	void solve(){
		int n = in.nextInt(), m = in.nextInt();
		int[] c = new int[m];
		for(int i= 0; i < m; i++) c[i] = in.nextInt();

		int[] t = new int[n + 1];
		for(int i = 0; i <= n; i++) t[i] = 100000000;
		t[0] = 0;

		for(int i = 0; i < m; i++){
			for(int j = c[i]; j <= n; j++){
				t[j] = min(t[j], t[j-c[i]]+1);
			}
		}
	}
	
}

Compiler output:
Main.java:24: error: cannot find symbol
				t[j] = min(t[j], t[j-c[i]]+1);
				       ^
  symbol:   method min(int,int)
  location: class Solve
1 error
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class CC {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		
		Scanner in=new Scanner(System.in);
		
		int sumNeeded = in.nextInt();
		int coins=in.nextInt();
		
		ArrayList<Integer> values=new ArrayList<Integer>(coins);
		
		
		for(int i=0;i<coins;i++){
			values.add(in.nextInt());
		}
		
		Collections.sort(values);
		
		int[][] matrix=new int[values.size()+1][sumNeeded+1];
		
		
		for(int i=0;i<matrix.length;i++){
			
			for(int j=0;j<matrix[0].length;j++) {
				
				if(i==0 || j==0)
					matrix[i][j]=0;
				else
					matrix[i][j]=Integer.MAX_VALUE;
			}			
		}
		

		for(int i=1; i<matrix.length;i++){
			
			for(int j=1;j<matrix[0].length;j++) {
								
				int coinVal=values.get(i-1);
				
				if(coinVal>j)
					matrix[i][j]=matrix[i-1][j];
				else
					matrix[i][j]= Math.min(j/coinVal + matrix[i][j%coinVal], matrix[i][j]);
				
			}			
		}
		
		System.out.println(matrix[values.size()][sumNeeded]);

	}

}

Compiler output:
Main.java:5: error: class CC is public, should be declared in a file named CC.java
public class CC {
       ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
    public int count (int n, int[] coins) {
	int m = coins.length;
	int[] dp = new int[n+1];
	for (int i = 1; i <= n; i++) {
	    dp[i] = 50000;
	}

	for (int i = 0; i < m; i++) {
	    for (int j = coins[i]; j <= n; j++) {
		dp[j] = Math.min(dp[j], dp[j - coins[i]] + 1);
	    }
	}
	return dp[n];
    }
}

class Main {
    public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String[] input;
	input = scan.nextLine().split(" ");
	int n = Integer.parseInt(input[0]);
	int m = Integer.parseInt(input[1]);
	int[] coins = new int[m];
	input = scan.nextLine().split(" ");
	for (int i = 0; i < m; i++) {
	    coins[i] = Integer.parseInt(input[i]);
	}
	CoinChangingProblem problem = new CoinChangingProblem();
	System.out.println(problem.count(n, coins));
    }
}

Compiler output:
Main.java:19: error: duplicate class: Main
class Main {
^
1 error
Language: Java

import java.util.Scanner;
public class CoinChangingProblem {
    public int count (int n, int[] coins) {
	int m = coins.length;
	int[] dp = new int[n+1];
	for (int i = 1; i <= n; i++) {
	    dp[i] = 50000;
	}

	for (int i = 0; i < m; i++) {
	    for (int j = coins[i]; j <= n; j++) {
		dp[j] = Math.min(dp[j], dp[j - coins[i]] + 1);
	    }
	}
	return dp[n];
    }
}

class Main {
    public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String[] input;
	input = scan.nextLine().split(" ");
	int n = Integer.parseInt(input[0]);
	int m = Integer.parseInt(input[1]);
	int[] coins = new int[m];
	input = scan.nextLine().split(" ");
	for (int i = 0; i < m; i++) {
	    coins[i] = Integer.parseInt(input[i]);
	}
	CoinChangingProblem problem = new CoinChangingProblem();
	System.out.println(problem.count(n, coins));
    }
}

Compiler output:
Main.java:2: error: class CoinChangingProblem is public, should be declared in a file named CoinChangingProblem.java
public class CoinChangingProblem {
       ^
1 error
Language: Java

import java.io.*;

public class main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] input = br.readLine().split(" ");
        
        int n = Integer.parseInt(input[0]);
        if(n < 1 || n > 50000){
            System.out.println("Error");
        }
        int m = Integer.parseInt(input[1]);
        if(m < 1 || m > 10000){
            System.out.println("Error");
        }
        
        String[] buf = br.readLine().split(" ");
        int ne[] = new int[m];
        for(int i = 0; i < m; i++){
            ne[i] = Integer.parseInt(buf[i]);
        }
        
        int min[] = new int[m];
        for(int i = 0; i < m; i++){
            min[i] = n / ne[i];
        }
        
        int mmin = min[0];
        if(int i = 0; i < m; i++){
            if(mmin > min[i]){
                mmin = min[i];
            }
        }
        
        System.out.println(mmin);
    }

}

Compiler output:
Main.java:29: error: '.class' expected
        if(int i = 0; i < m; i++){
               ^
Main.java:29: error: > or ',' expected
        if(int i = 0; i < m; i++){
                           ^
Main.java:29: error: not a statement
        if(int i = 0; i < m; i++){
                        ^
Main.java:29: error: ';' expected
        if(int i = 0; i < m; i++){
                                ^
4 errors
Language: Java

import java.io.*;

public class main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] input = br.readLine().split(" ");
        
        int n = Integer.parseInt(input[0]);
        if(n < 1 || n > 50000){
            System.out.println("Error");
        }
        int m = Integer.parseInt(input[1]);
        if(m < 1 || m > 10000){
            System.out.println("Error");
        }
        
        String[] buf = br.readLine().split(" ");
        int ne[] = new int[m];
        for(int i = 0; i < m; i++){
            ne[i] = Integer.parseInt(buf[i]);
        }
        
        int min[] = new int[m];
        for(int i = 0; i < m; i++){
            min[i] = n / ne[i];
        }
        
        int mmin = min[0];
        for(int i = 0; i < m; i++){
            if(mmin > min[i]){
                mmin = min[i];
            }
        }
        
        System.out.println(mmin);
    }

}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
1 error
Language: Java

import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = br.nextInt();
        int m = br.nextInt();
        int[] d = new int[m];
        for (int i = 0; i < m; i++) {
            d[i] = br.nextInt();
        }
        int[][] dp = new int[m+1][n+1];
        for (int i = 0; i <= m; i++) {
            for (int j = 1; j <= n; j++) {
                dp[i][j] = Integer.MAX_VALUE; 
            }
        }
        dp[0][0] = 0;
         
        for (int i = 0; i < m; i++) {
            for (int j = 1; j <= n; j++) {
                 
                int di = d[i];
                if (j >= di)
                    dp[i+1][j] = Math.min(dp[i][j], dp[i+1][j-di] + 1);
                else
                    dp[i+1][j] = dp[i][j];
            }
        }
        System.out.println(dp[m][n]);
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

import java.util.*;
public class Main {
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         int n = sc.nextInt();
         int m = sc.nextInt();
         int C[] = new int [m]; 
         for(int i = 0;i < m;i++){
             C[i] = sc.nextInt();
         }
         int min = getTheNumberOfCoin(C,n,m);
         System.out.println(min);
     }
}
     static int getTheNumberOfCoin(int C[],int n,int m){
         int T[] = new int[n + 1];
         for(int i = 1;i < n + 1;i++){
             T[i] = T[i - 1] + C[0];
         }
         for(int i = 0;i < m;i++){
             for(int j = C[i];j < n + 1;j++){
                 if(T[j] < T[j - C[i]] + 1){
                     T[j] = T[j];
                 }else{
                     T[j] = T[j - C[i]] + 1;
                 }
             }
         }
         return T[n];
     }

Compiler output:
Main.java:15: error: unnamed classes are a preview feature and are disabled by default.
     static int getTheNumberOfCoin(int C[],int n,int m){
            ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;
public class Main {
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         int n = sc.nextInt();
         int m = sc.nextInt();
         int C[] = new int [m]; 
         for(int i = 0;i < m;i++){
             C[i] = sc.nextInt();
         }
         int min = getTheNumberOfCoin(C,n,m);
         System.out.println(min);
     }
}
     static int getTheNumberOfCoin(int C[],int n,int m){
         int T[] = new int[n + 1];
         for(int i = 1;i < n + 1;i++){
             T[i] = T[i - 1] + C[0];
         }
         for(int i = 0;i < m;i++){
             for(int j = C[i];j < n + 1;j++){
                 if(T[j] < T[j - C[i]] + 1){
                     T[j] = T[j];
                 }else{
                     T[j] = T[j - C[i]] + 1;
                 }
             }
         }
     }

Compiler output:
Main.java:15: error: unnamed classes are a preview feature and are disabled by default.
     static int getTheNumberOfCoin(int C[],int n,int m){
            ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;
public class Main {
     static int getTheNumberOfCoin(int C[],int n,int m){
         int T[] = new int[n + 1];
         for(int i = 1;i < n + 1;i++){
             T[i] = T[i - 1] + C[0];
         }
         for(int i = 0;i < m;i++){
             for(int j = C[i];j < n + 1;j++){
                 if(T[j] < T[j - C[i]] + 1){
                     T[j] = T[j];
                 }else{
                     T[j] = T[j - C[i]] + 1;
                 }
             }
         }
         return T[n];
     }
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         int n = sc.nextInt();
         int m = s.cnextInt();
         int C[] = new int [m]; 
         for(int i = 0;i < m;i++){
             C[i] = sc.nextInt();
         }
         int min = getTheNumberOfCoin(C,n,m);
         System.out.println(min);
     }
}

Compiler output:
Main.java:22: error: cannot find symbol
         int m = s.cnextInt();
                 ^
  symbol:   variable s
  location: class Main
1 error
Language: Java

class Main {
	public static void main(String[] args){
	  Scanner s=new Scanner(System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int R[]=new int[m];
	  int count=0;
	  for(int i=0;i<m;i++){
		  R[i]=s.nextInt();
	  }
	  for(int i=m-1;i>=0;i--){
		  while(n>R[i]){
	    		n-=R[i];
	    		count++;
	    	}
	  }	  
	  System.out.println(count); 
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
	  Scanner s=new Scanner(System.in);
	  ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	  Scanner s=new Scanner(System.in);
	                ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class DPL1_A_Main {
	public static int count_min=100;
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int coin[] = new int [m];
		for(int i=0;i<m;++i){
			coin[i]=scan.nextInt();
		}
		countWaysDP(coin,n,m,0);
		System.out.println(count_min);
	}
	
	public static void countWaysDP(int[] coin,int n, int m, int count){
		if(count_min>count){
			int flag=1;
			int[] map = new int[m];
			for(int i=0;i<m;++i){
				map[i]=n;
			}
			count++;
			for(int i=m-1;i>=0;--i){
				if(flag==0){
					break;
				}
				map[i]=map[i]-coin[i];
				if(map[i]<0){
					m--;
				}
				if(map[i]==0){
					flag=0;
					m=0;
					count_min=count;
				}
			}
			for(int i=m-1;i>=0;--i){
				if(m>0&&flag==1){
					countWaysDP(coin,map[i],i+1,count);
				}
			}
		}
	}
}

Compiler output:
Main.java:3: error: class DPL1_A_Main is public, should be declared in a file named DPL1_A_Main.java
public class DPL1_A_Main {
       ^
1 error
Language: Java

	public static int count_min=100;
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int coin[] = new int [m];
		for(int i=0;i<m;++i){
			coin[i]=scan.nextInt();
		}
		countWaysDP(coin,n,m,0);
		System.out.println(count_min);
	}
	
	public static void countWaysDP(int[] coin,int n, int m, int count){
		if(count_min>count){
			int flag=1;
			int[] map = new int[m];
			for(int i=0;i<m;++i){
				map[i]=n;
			}
			count++;
			for(int i=m-1;i>=0;--i){
				if(flag==0){
					break;
				}
				map[i]=map[i]-coin[i];
				if(map[i]<0){
					m--;
				}
				if(map[i]==0){
					flag=0;
					m=0;
					count_min=count;
				}
			}
			for(int i=m-1;i>=0;--i){
				if(m>0&&flag==1){
					countWaysDP(coin,map[i],i+1,count);
				}
			}
		}
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static int count_min=100;
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

class Main {
	public static int count_min=100;
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int coin[] = new int [m];
		for(int i=0;i<m;++i){
			coin[i]=scan.nextInt();
		}
		Arrays.sort(coin);
		countWaysDP(coin,n,m,0);
		System.out.println(count_min);
	}
	
	public static void countWaysDP(int[] coin,int n, int m, int count){
		if(count_min>count){
			int flag=1;
			int[] map = new int[m];
			for(int i=0;i<m;++i){
				map[i]=n;
			}
			count++;
			for(int i=m-1;i>=0;--i){
				if(flag==0){
					break;
				}
				map[i]=map[i]-coin[i];
				if(map[i]<0){
					m--;
				}
				if(map[i]==0){
					flag=0;
					m=0;
					count_min=count;
				}
			}
			for(int i=m-1;i>=0;--i){
				if(m>0&&flag==1){
					countWaysDP(coin,map[i],i+1,count);
				}
			}
		}
	}
}

Compiler output:
Main.java:14: error: cannot find symbol
		Arrays.sort(coin);
		^
  symbol:   variable Arrays
  location: class Main
1 error
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	int n, m;
	int[] coins;
	int[][][] dp;
	public static void main(String[] args){
		Q1 inst = new Q1();
		inst.solve();
	}
	
	public void solve(){
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		m = sc.nextInt();
		coins = new int[m];
		int[] temp = new int[m];
		dp = new int[m][n+1][n+1];
		for(int i = 0;i < m;++i){
			temp[i] = sc.nextInt();
		}
		Arrays.sort(temp);
		for(int i = 0;i < m;++i){
			coins[i] = temp[m - i - 1];
		}
		System.out.println(this.calc(0, 0, n));
	}
	
	public int calc(int step, int numCoin, int z){
		if(z == 0) return numCoin;
		if(step >= this.m){
			if(z == 0) return numCoin;
			return n;
		}
		
		if(dp[step][numCoin][z] > 0) return dp[step][numCoin][z];
		
		int fuga = Math.min(calc(step+1, numCoin + z/coins[step], z % coins[step]), calc(step+1, numCoin, z));
		dp[step][numCoin][z] = fuga;
		return fuga;
		
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		Q1 inst = new Q1();
		^
  symbol:   class Q1
  location: class Main
Main.java:9: error: cannot find symbol
		Q1 inst = new Q1();
		              ^
  symbol:   class Q1
  location: class Main
2 errors
Language: Java



import java.util.Arrays;
import java.util.Scanner;

public class Q1 {
	int n, m;
	long[] coins;
	long[][][] dp;
	public static void main(String[] args){
		Q1 inst = new Q1();
		inst.solve();
	}
	
	public void solve(){
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		m = sc.nextInt();
		coins = new long[m];
		long[] temp = new long[m];
		dp = new long[m][n+1][n+1];
		for(int i = 0;i < m;++i){
			temp[i] = sc.nextInt();
		}
		Arrays.sort(temp);
		for(int i = 0;i < m;++i){
			coins[i] = temp[m - i - 1];
		}
		System.out.println(this.calc(0, 0, n));
	}
	
	public long calc(int step, int numCoin, int z){
		if(z == 0) return numCoin;
		if(step >= this.m){
			if(z == 0) return numCoin;
			return n;
		}
		
		if(dp[step][numCoin][z] > 0) return dp[step][numCoin][z];
		
		long fuga = Math.min(calc(step+1, (int) (numCoin + z/coins[step]), (int) (z % coins[step])), calc(step+1, numCoin, z));
		dp[step][numCoin][z] = fuga;
		return fuga;
		
	}
}

Compiler output:
Main.java:6: error: class Q1 is public, should be declared in a file named Q1.java
public class Q1 {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import static java.lang.System.out;
import java.util.*;
import java.io.*;
public class Coinchangingproblem
{
    public static void main(String[] args) throws Exception
    {
        //out.println("hi");
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader scan = new BufferedReader(isr);
        StringTokenizer cut = new StringTokenizer(scan.readLine());
        
        int a = Integer.parseInt(cut.nextToken());
        int b = Integer.parseInt(cut.nextToken());
        
        int[] one = new int[b];
        int[] two = new int[a + 1];
        //ArrayList<Integer> coin = new ArrayList<Integer>();
        
        cut = new StringTokenizer(scan.readLine());
        int temp;
        int count = 0;
        for (int z = 0; z < b; z++)
        {
            temp = Integer.parseInt(cut.nextToken());
            //out.println("temp is" + temp);
            
                one[count] = temp;
                //out.println("placed coin " + one[count] + " into pool..");
                count++;
            
            }
        
        boolean go = true;
        
        int answer = 99999;
        two[0] = 0;
        //out.println("Two[0] is: 0");
        for (int z = 1; z < a + 1; z++)
        {
            answer = 99999;
            //out.println("Resetting, Z is now " + z);
            for (int y = 0; y < b; y++)
            {
                //out.println("Checking coin " + one[y]);
                if (one[y] <= z && two[z-one[y]] < answer)
                {                   
                    //out.println("Value for two[" + z + "] changing to " + two[z-one[y]]);
                    answer = two[z-one[y]];
                }
                //else out.println("nothing happened");
            }
            two[z] = answer + 1;
            //out.println("Two[" + z + "] is: " + two[z]);
        }
        out.println(two[a]);
    }
}

Compiler output:
Main.java:6: error: class Coinchangingproblem is public, should be declared in a file named Coinchangingproblem.java
public class Coinchangingproblem
       ^
1 error