submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s435498001 | p00212 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;
#define NONE -1
int c,n,m,s,d;
vector < vector <int> > P;
vector < vector <int> > E;
vector <int> R;
vector <bool> V;
int answer;
void solve( int t )
{
if ( t == d )
{
sort( R.rbegin(), R.rend() ... | a.cc: In function 'void solve(int)':
a.cc:22:41: error: no matching function for call to 'min(int&, std::vector<int>::size_type)'
22 | for ( int i = 0; i < min(c,R.size()); i++ )
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s545431439 | p00212 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef pair<int,pair<int,int> >P;
struct Edge{
int to,cost;
Edge(int _to, int _cost):to(_to), cost(_cost){};
};
int minCost[101][11];
vector<Edge> edge[101];
static const int INF = INT_MAX;
int c,n,m,s,d;
int dijkstr... | a.cc:17:24: error: 'INT_MAX' was not declared in this scope
17 | static const int INF = INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include<queue>
+++ |+#include <climits>
5 |
|
s931485722 | p00212 | C++ | #include <map>
#include <vector>
#include <cstdio>
using namespace std;
int cost[101][11];
int main(){
int c,N,m,s,d,i,j,k,x;
for(;scanf("%d%d%d%d%d",&c,&N,&m,&s,&d),N;){
vector<map<int,int> >dist(N+1);
memset(cost,99,sizeof(cost));
for(k=0;k<m;k++){
scanf("%d%d%d",&i,&j,&x);dist[i][j]=dist[j][i]=x;
}
fo... | a.cc: In function 'int main()':
a.cc:10:17: error: 'memset' was not declared in this scope
10 | memset(cost,99,sizeof(cost));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <cstdio>
+... |
s014312273 | p00212 | C++ | /*
* アルゴリズムとしてはチケットの枚数分のネットワークをレイヤ構造で持ち
* 各々のレイヤから上位レイヤへはチケットを使った場合に遷移するようにする
* 上位レイヤから下位レイヤには遷移することができないようにし,
* 最下位レイヤの始点から終点と同じ点を表すすべてのレイヤの点までの最短経路を求める.
*
* (イメージ)
* T`T`T`
* |/|/| S=始点, o=点, T`=終点 |=辺 /=レイヤ下位から上位への有効辺
* o o o
* |/|/| S->T`までの距離で最短のものを求め出力する
* S o o
*L... | a.cc: In function 'int main()':
a.cc:97:49: error: expected '}' at end of input
97 | dijkstra(graph,dis,id2cid(0,s));
| ^
a.cc:65:44: note: to match this '{'
65 | while(cin >> c >> n >> m >> s >> d){
| ... |
s896830723 | p00212 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <numeric>
using namespace std;
struct edge{ int to, cost; };
typedef pair<int, int> P;
const int INF = INT_MAX / 4;
int V;
vector<edge> G[100];
int D[100];
int pre[100];
int c, n, m, s, d;
void dijkstra(int s... | a.cc:12:17: error: 'INT_MAX' was not declared in this scope
12 | const int INF = INT_MAX / 4;
| ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
6 | #include <numeric>
+++ |+#include <climits>
7 |
|
s077140454 | p00212 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <numeric>
using namespace std;
struct edge{ int to, cost; };
typedef pair<int, int> P;
const int INF = INT_MAX / 4;
int V;
vector<edge> G[100];
int D[100];
int pre[100];
int c, n, m, s, d;
void dijkstra(int s... | a.cc:12:17: error: 'INT_MAX' was not declared in this scope
12 | const int INF = INT_MAX / 4;
| ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
6 | #include <numeric>
+++ |+#include <climits>
7 |
|
s876475673 | p00212 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <numeric>
#include <limits>
using namespace std;
struct edge{ int to, cost; };
typedef pair<int, int> P;
const int INF = INT_MAX / 4;
int V;
vector<edge> G[100];
int D[100];
int pre[100];
int c, n, m, s, d;
v... | a.cc:13:17: error: 'INT_MAX' was not declared in this scope
13 | const int INF = INT_MAX / 4;
| ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
7 | #include <limits>
+++ |+#include <climits>
8 |
|
s070406467 | p00213 | Java |
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
import scala.languageFeature.postfixOps;
import sun.tools.jar.resources.jar;
import lombok.Data;
public class Main {
public static void main(String[] arg... | Main.java:9: error: package scala.languageFeature does not exist
import scala.languageFeature.postfixOps;
^
Main.java:10: error: package sun.tools.jar.resources is not visible
import sun.tools.jar.resources.jar;
^
(package sun.tools.jar.resources is declared in module j... |
s518085112 | p00213 | Java |
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
import scala.languageFeature.postfixOps;
import sun.tools.jar.resources.jar;
import lombok.Data;
public class Main {
public static void main(String[] arg... | Main.java:9: error: package scala.languageFeature does not exist
import scala.languageFeature.postfixOps;
^
Main.java:10: error: package sun.tools.jar.resources is not visible
import sun.tools.jar.resources.jar;
^
(package sun.tools.jar.resources is declared in module j... |
s423564856 | p00213 | Java |
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
import scala.languageFeature.postfixOps;
import sun.tools.jar.resources.jar;
import lombok.Data;
public class Main {
public static void main(String[] arg... | Main.java:9: error: package scala.languageFeature does not exist
import scala.languageFeature.postfixOps;
^
Main.java:10: error: package sun.tools.jar.resources is not visible
import sun.tools.jar.resources.jar;
^
(package sun.tools.jar.resources is declared in module j... |
s508540699 | p00213 | C | X,Y,n;k[16];s[10][10];sd[10][10];dd;sx[16],sy[16];bf[16];bn;E(bx,by,w,h){int y;for(;w--;)for(y=h;y--;)if(s[bx+w][by+y])return 0;return 1;}F(bx,by,w,h,b){int y;for(;w--;)for(y=h;y--;)s[bx+w][by+y]=b;}SB(bx,by,w,h,b){if(bx+w<=X&&by+h<=Y&&bx+w>sx[b]&&by+h>sy[b]&&E(bx,by,w,h)){F(bx,by,w,h,b);bf[b]=1;++bn==n?dd++&&main(puts... | main.c:1:1: warning: data definition has no type or storage class
1 | X,Y,n;k[16];s[10][10];sd[10][10];dd;sx[16],sy[16];bf[16];bn;E(bx,by,w,h){int y;for(;w--;)for(y=h;y--;)if(s[bx+w][by+y])return 0;return 1;}F(bx,by,w,h,b){int y;for(;w--;)for(y=h;y--;)s[bx+w][by+y]=b;}SB(bx,by,w,h,b){if(bx+w<=X&&by+h<=Y&&bx+w>sx[b]... |
s045440586 | p00213 | C++ | #include<cstdio>
#include<vector>
#define mp make_pair
#define pb push_back
using namespace std;
typedef pair<int,int> pii;
typedef vector<pii> vpii;
vector<vpii> rect;
int w,h,n,land[50][50],test[50][50],ans[50][50];
bool search(int i0,int j0){
//printf("i0=%d, j0=%d\n",i0,j0);
//for(int a=0;a<h;a++){for(int b=0... | a.cc: In function 'bool search(int, int)':
a.cc:21:33: error: 'exit' was not declared in this scope
21 | if(i<0 || h<=i || j<0 || w<=j) exit(0);
| ^~~~
a.cc:3:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
2 | #incl... |
s759455240 | p00213 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
int X, Y, n;
struct Memo
{
int b;
int k;
};
struct Point
{
int x;
int y;
};
struct Node
{
int idx;
int a[10][10];
};
class memo_greater
{
public:
bool operator() (const Memo m1, const Memo m2)
{
return m1.k > m2.k;
}
};
Poi... | a.cc: In function 'bool solve()':
a.cc:92:9: error: 'memcpy' was not declared in this scope
92 | memcpy(nn.a, A, mem_size);
| ^~~~~~
a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++ |+#include <cstr... |
s653557250 | p00213 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <queue>
using namespace std;
int X, Y, n;
struct Memo
{
int b;
int k;
};
struct Point
{
int x;
int y;
};
struct Node
{
int idx;
int a[10][10];
};
class memo_greater
{
public:
bool operator() (const Memo m1, const Memo m2)
{
return m1.k... | a.cc: In function 'bool solve()':
a.cc:93:9: error: 'memcpy' was not declared in this scope
93 | memcpy(nn.a, A, mem_size);
| ^~~~~~
a.cc:5:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <queue>
+++ |+#include <cstr... |
s535141613 | p00214 | Java | ### subroutines
def o_prod(p, v0, v1) # (p - v0) x (v1 - v0)
(p[0] - v0[0]) * (v1[1] - v0[1]) - (v1[0] - v0[0]) * (p[1] - v0[1])
end
def inside?(p, vs)
nump = numm = 0
(0..3).map{|i| [vs[i], vs[(i + 1) % 4]]}.each do |v0, v1|
op = o_prod(p, v0, v1)
if op > 0
nump += 1
elsif op < 0
num... | Main.java:1: error: illegal character: '#'
### subroutines
^
Main.java:1: error: illegal character: '#'
### subroutines
^
Main.java:1: error: illegal character: '#'
### subroutines
^
Main.java:3: error: illegal character: '#'
def o_prod(p, v0, v1) # (p - v0) x (v1 - v0)
^
Main.java:10: erro... |
s728939543 | p00214 | Java | import java.util.*;
public class Main
{
static boolean used[];
static Point rec[][];
static double EPS=1e-5;
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
for(;;)
{
int N=in.nextInt();
if(N==0)
return;
... | Main.java:63: error: cannot find symbol
for(int k=0;k<n;k++)
^
symbol: variable n
location: class Main
1 error
|
s755218166 | p00214 | Java | import java.util.*;
public class Main
{
static boolean used[];
static Point rec[][];
static double EPS=1e-5;
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
for(;;)
{
int N=in.nextInt();
if(N==0)
return;
... | Main.java:63: error: cannot find symbol
for(int k=0;k<n;k++)
^
symbol: variable n
location: class Main
1 error
|
s384375613 | p00214 | C | def z a,b,c,d;(b[0]-a[0])*(d[1]-c[1])-(d[0]-c[0])*(b[1]-a[1])end
def xx a,b,c,d;(v=z a,b,c,d)!=0&&z(a,c,a,b)/v==0&&z(a,c,c,d)/v==0;end
def x a,b
(0..3).any?{|k|
(0..3).map{|m|z a[m*2-2,2],a[m*2,2],a[m*2-2,2],b[k*2,2]}.all?{|m|m<=0}||
(0..3).map{|m|z b[m*2-2,2],b[m*2,2],b[m*2-2,2],a[k*2,2]}.all?{|m|m<=0}||
(0..3).any?{|... | main.c:1:1: error: unknown type name 'def'
1 | def z a,b,c,d;(b[0]-a[0])*(d[1]-c[1])-(d[0]-c[0])*(b[1]-a[1])end
| ^~~
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
1 | def z a,b,c,d;(b[0]-a[0])*(d[1]-c[1])-(d[0]-c[0])*(b[1]-a[1])end
| ^
main.c:1:20: error: expe... |
s282477688 | p00214 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef complex < double > P;
typedef vector< P > G;
vector< G > g;
const double EPS = 1e-8;
const double INF = 1e12;
double cross(const P& a,const P& b){ //??????
return imag(conj(a) * b);
}
double dot(const P& a,const P& b){ // ??????
return real(conj(a) * b);
}
struct... | /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
|
s954134367 | p00214 | C++ | #include<iostream>
#include<vector>
#include<queue>
using namespace std;
struct Point { long double px, py; };
Point Minus(const Point& a, const Point& b) { return Point{ a.px - b.px,a.py - b.py }; }
long double norm(const Point& a) { return a.px * a.px + a.py * a.py; }
long double abs(const Point& a) { return sqrtl(no... | a.cc: In function 'long double abs(const Point&)':
a.cc:8:42: error: 'sqrtl' was not declared in this scope; did you mean 'strtol'?
8 | long double abs(const Point& a) { return sqrtl(norm(a)); }
| ^~~~~
| strtol
a.cc: In f... |
s692119522 | p00214 | C++ | #include <iostream>
#include <cmath>
#include <set>
#include <memory>
using namespace std;
const int size = 101;
const double eps = 1e-9;
struct Vector2D {
int x;
int y;
Vector2D(): x(0), y(0) {}
Vector2D( int x, int y ): x(x), y(y) {}
Vector2D operator -( Vector2D& right ) {
return Vector... | a.cc:25:7: error: reference to 'size' is ambiguous
25 | int Q[size][8];
| ^~~~
In file included from /usr/include/c++/14/string:53,
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/i... |
s944645615 | p00214 | C++ | #include <iostream>
#include <cmath>
#include <set>
#include <memory>
using namespace std;
const int size = 101;
const double eps = 1e-9;
struct Vector2D {
int x;
int y;
Vector2D(): x(0), y(0) {}
Vector2D( int x, int y ): x(x), y(y) {}
Vector2D operator -( Vector2D& right ) {
return Vector... | a.cc:25:7: error: reference to 'size' is ambiguous
25 | int Q[size][8];
| ^~~~
In file included from /usr/include/c++/14/string:53,
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/i... |
s409877486 | p00214 | C++ | #include <iostream>
#include <stdlib>
#include <set>
#include <memory>
using namespace std;
const int size = 101;
const double eps = 1e-9;
struct Vector2D {
int x;
int y;
Vector2D(): x(0), y(0) {}
Vector2D( int x, int y ): x(x), y(y) {}
Vector2D operator -( Vector2D& right ) {
return Vecto... | a.cc:2:10: fatal error: stdlib: No such file or directory
2 | #include <stdlib>
| ^~~~~~~~
compilation terminated.
|
s564831194 | p00214 | C++ | #include <iostream>
#include <stdlib>
#include <set>
#include <memory>
using namespace std;
const int size = 101;
const double eps = 1e-9;
struct Vector2D {
int x;
int y;
Vector2D(): x(0), y(0) {}
Vector2D( int x, int y ): x(x), y(y) {}
Vector2D operator -( Vector2D& right ) {
return Vecto... | a.cc:2:10: fatal error: stdlib: No such file or directory
2 | #include <stdlib>
| ^~~~~~~~
compilation terminated.
|
s549427612 | p00214 | C++ | #include <iostream>
#include <stdlib>
#include <set>
#include <memory>
using namespace std;
const int size = 101;
const double eps = 1e-9;
struct Vector2D {
int x;
int y;
Vector2D(): x(0), y(0) {}
Vector2D( int x, int y ): x(x), y(y) {}
Vector2D operator -( Vector2D& right ) {
return Vecto... | a.cc:2:10: fatal error: stdlib: No such file or directory
2 | #include <stdlib>
| ^~~~~~~~
compilation terminated.
|
s106224811 | p00214 | C++ | #include<iostream>
#include<complex>
#include<algorithm>
#define EPS 1e-10
using namespace std;
typedef complex<double> P;
int n,m;
P p[100][4];
double cross(P a,P b){return imag(conj(a)*b);}
double dot(P a,P b){return real(conj(a)*b);}
bool interp(int q,P x){
P tmp = P(10000,x.imag());
bool res = false;
for... | a.cc: In function 'bool interp(int, P)':
a.cc:19:26: error: 'is_cp' was not declared in this scope
19 | for(int i=0;i<4;i++)if(is_cp(p[q][i],p[q][(i+1)%4],x,tmp))res=!res;
| ^~~~~
a.cc: In function 'void init(int)':
a.cc:59:5: error: reference to 'rank' is ambiguous
59 | rank[... |
s737618235 | p00214 | C++ | #include <set>
#include <cstdio>
#include <queue>
#include <iostream>
#include <complex>
#include <vector>
#include <climits>
#include <cfloat>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
using namespace std;
typedef complex<double> P;
typedef vector<P> Polygon;
const double EPS = 1e-10;
class UnionFind{
private... | a.cc: In function 'bool intersect(const S&, const P&)':
a.cc:54:49: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator-'
54 | return std::abs(abs(s.p1 - p) + abs(s.p2 - p) - abs
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:54:54: error: e... |
s968303517 | p00214 | C++ | #include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<cfloat>
using namespace std;
double EPS = 1e-10;
const double PI = acos(-1);
double add(double a, double b){
if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
return a+b;
}
struct point{
double x, y;
point(){}
p... | a.cc: In function 'int inside(point, std::vector<point>)':
a.cc:72:3: error: 'n' was not declared in this scope
72 | n=ps.size();
| ^
a.cc: In function 'int crossPol(std::vector<point>, std::vector<point>)':
a.cc:101:14: error: too many arguments to function 'int inside(point, std::vector<point>)'
101 | ... |
s528371071 | p00214 | C++ | #include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<cfloat>
using namespace std;
double EPS = 1e-10;
const double PI = acos(-1);
double add(double a, double b){
if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
return a+b;
}
struct point{
double x, y;
point(){}
p... | a.cc: In function 'int inside(point, std::vector<point>)':
a.cc:72:3: error: 'n' was not declared in this scope
72 | n=ps.size();
| ^
|
s939508901 | p00214 | C++ | EPS = 1e-9
class Point
attr_accessor :x, :y
def initialize(x = 0, y = 0)
@x = x
@y = y
end
def +(right)
Point.new(@x + right.x, @y + right.y)
end
def -(right)
Point.new(@x - right.x, @y - right.y)
end
def [](idx)
idx == 0 ? @x : @y
end
def []=(idx, val)
@x = val if idx == 0... | a.cc:6:5: error: stray '@' in program
6 | @x = x
| ^
a.cc:7:5: error: stray '@' in program
7 | @y = y
| ^
a.cc:11:15: error: stray '@' in program
11 | Point.new(@x + right.x, @y + right.y)
| ^
a.cc:11:29: error: stray '@' in program
11 | Point.new(@x... |
s699929963 | p00214 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<set>
const double EPS = 1e-24;
struct P{
double x, y;
P operator-(const P& rp);
bool operator==(const P& rp);
};
P P::operator-(const P& rp){
return {x-rp.x, y-rp.y};
}
bool P::operator==(const P& rp){
return abs(x-rp.x) < EPS && abs(y-rp.y) < EP... | a.cc: In function 'double abs(P)':
a.cc:33:16: error: 'sqrt' was not declared in this scope
33 | return sqrt(p.x * p.x + p.y * p.y);
| ^~~~
|
s552551662 | p00215 | Java | ### constant
MAX_INT = (1 << 31) - 1
### subroutines
def dist(nd0, nd1)
(nd0[0] - nd1[0]).abs + (nd0[1] - nd1[1]).abs
end
### main
while true
w, h = gets.strip.split(' ').map{|s| s.to_i}
break if w == 0 && h == 0
nodes = 7.times.map{[]}
start = nil
goal = nil
for y in (0...h)
hl = gets.strip.sp... | Main.java:1: error: illegal character: '#'
### constant
^
Main.java:1: error: illegal character: '#'
### constant
^
Main.java:1: error: illegal character: '#'
### constant
^
Main.java:3: error: class, interface, enum, or record expected
MAX_INT = (1 << 31) - 1
^
Main.java:5: error: illegal character: '#'
### subrout... |
s315339681 | p00215 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Comparator;
class Point{
public static int nextId = 0;
public int id;
public int x;
... | Main.java:236: error: cannot find symbol
List<Point> nextPointList = pointListByType.get((type + 1) % 5);
^
symbol: variable type
location: class Main
1 error
|
s301067533 | p00215 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Comparator;
class Point{
public static int nextId = 0;
public int id;
public int x;
... | Main.java:60: error: cannot find symbol
return p1.distanceToGoal - p1.distanceToGoal;
^
symbol: variable distanceToGoal
location: variable p1 of type Point
Main.java:60: error: cannot find symbol
return p1.dis... |
s728109220 | p00215 | Java | function main(){
var i = 0;
while(true){
var fieldInfo = input[i].split(' ');
var width = fieldInfo[0] - 0;//toInt
var height = fieldInfo[1] - 0;//toInt
// 0 0が入力された
if(width == 0 && height == 0){
break;
}
var start;
var goal;
var elem = [[],[],[],[],[]];
for(var ... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
function main(){
^
(use --enable-preview to enable unnamed classes)
Main.java:15: error: illegal start of expression
var elem = [[],[],[],[],[]];
^
Main.java:48: error: illegal start of expression
var dp = ... |
s837360121 | p00215 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// 読み込んでフィールドを作る
Scanner sc = new Scanner(System.in);
while (true) {
int x = sc.nextInt();
int y = ... | Main.java:166: error: cannot find symbol
int mask = a >> 31;
^
symbol: variable a
location: class Pachimon
1 error
|
s102095548 | p00215 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// 読み込んでフィールドを作る
Scanner sc = new Scanner(System.in);
while (true) {
int x = sc.nextInt();
int y = ... | Main.java:166: error: cannot find symbol
int mask = a >> 31;
^
symbol: variable a
location: class Pachimon
1 error
|
s216370736 | p00215 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Main {
public static final BufferedReader br =
new BufferedReader(new InputStreamRead... | Main.java:19: error: List is abstract; cannot be instantiated
new List<List<Point> >();
^
1 error
|
s878266724 | p00215 | Java | +import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Comparator;
class Point implements Comparable<Point>{
public static int nextId = 0;
public int id;
public int ... | Main.java:1: error: class, interface, enum, or record expected
+import java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:4: error: class, inte... |
s976153179 | p00215 | Java | +import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Comparator;
class Point implements Comparable<Point>{
public static int nextId = 0;
public int id;
public int ... | Main.java:1: error: class, interface, enum, or record expected
+import java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:4: error: class, inte... |
s243085762 | p00215 | Java | import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Dijkstra {
/**
* @param args
*/
public static void main(String[] args) ... | Main.java:10: error: class Dijkstra is public, should be declared in a file named Dijkstra.java
public class Dijkstra {
^
1 error
|
s382524440 | p00215 | Java | import java.awt.Point;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class Main {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ??????????????????_X */
static int mapSizeX = 0;
/** ????????????????... | Main.java:131: error: class, interface, enum, or record expected
import java.awt.Point;
^
Main.java:132: error: class, interface, enum, or record expected
import java.util.ArrayList;
^
Main.java:133: error: class, interface, enum, or record expected
import java.util.Collections;
^
Main.java:134: error: class, interface... |
s333579619 | p00215 | Java | import java.awt.Point;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class Pachimon {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ??????????????????_X */
static int mapS... | Main.java:9: error: class Pachimon is public, should be declared in a file named Pachimon.java
public class Pachimon {
^
1 error
|
s172706401 | p00215 | Java | import java.awt.Point;
import java.util.Scanner;
public class Dijkstra {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ??????????????????_X */
static int mapSizeX = 0;
/** ??????????????????_Y */
static int mapSizeY = 0;
/** ??????????????° */
static int maxNode = 0;
/** ????????? */
st... | Main.java:4: error: class Dijkstra is public, should be declared in a file named Dijkstra.java
public class Dijkstra {
^
1 error
|
s195404337 | p00215 | Java | import java.awt.Point;
import java.util.Scanner;
public class Main {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ??????????????????_X */
static int mapSizeX = 0;
/** ??????????????????_Y */
static int mapSizeY = 0;
/** ??????????????° */
static int maxNode = 0;
/** ????????? */
// sta... | Main.java:48: error: method main(String[]) is already defined in class Main
public static void main(String[] args) {
^
1 error
|
s433961692 | p00215 | Java | import java.awt.Point;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class Main {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ??????????????????_X */
static int mapSizeX... | Main.java:60: error: cannot find symbol
if (output.y == Integer.MAX_VALUE) {
^
symbol: variable output
location: class Main
Main.java:63: error: cannot find symbol
System.out.println(output.x + WHITE_SPACE + output.y);
^
symbol: variable output
location: class Main
Main.... |
s211753740 | p00215 | Java | import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class Pachimon {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ?... | Main.java:10: error: class Pachimon is public, should be declared in a file named Pachimon.java
public class Pachimon {
^
1 error
|
s750530200 | p00215 | Java | import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class Pachimon {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ?... | Main.java:10: error: class Pachimon is public, should be declared in a file named Pachimon.java
public class Pachimon {
^
1 error
|
s584698996 | p00215 | Java | import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class Main {
/** ????§??????? */
static final String WHIT... | Main.java:43: error: cannot find symbol
String input = br.readLine();
^
symbol: variable br
location: class Main
1 error
|
s972245828 | p00215 | Java | import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Pachimon {
/** ????§??????? */
static final String WHITE_SPACE = " ";
/** ??????????????????_X */
static int mapSizeX = 0;
/** ????... | Main.java:8: error: class Pachimon is public, should be declared in a file named Pachimon.java
public class Pachimon {
^
1 error
|
s244965923 | p00215 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class PachimonCreature {
public static void main(String... args) {
for (List<String> mapStrings ... | Main.java:10: error: class PachimonCreature is public, should be declared in a file named PachimonCreature.java
public class PachimonCreature {
^
1 error
|
s627047537 | p00215 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String... args) {
for (List<String> mapStrings : getMapStri... | Main.java:273: error: package PachimonCreature does not exist
return new ArrayList<PachimonCreature.PachimonType>() {{
^
1 error
|
s804569283 | p00215 | Java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Main {
/** ゲームごとのマップのリスト */
private static List<String[][]> mapList = new ArrayList<String[][]>();
/** スタート地... | Main.java:161: error: reached end of file while parsing
}
^
1 error
|
s949009992 | p00215 | Java |
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class P0215 {
int INF = 1 << 28;
int[][] map;
P s, g;
int w, h, node;
void run() {
Scanner sc = new Scanner(System.in);
for(;;) {
w = sc.nextInt();
h = sc.nextInt();
if((w|h) == 0) break;
LinkedList<P>[... | Main.java:7: error: class P0215 is public, should be declared in a file named P0215.java
public class P0215 {
^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
|
s875605741 | p00215 | C | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <cassert>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <complex>
#include <list>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bi... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s602171356 | p00215 | C++ | import java.util.*;
@SuppressWarnings("unchecked")
class Main{
int w, h;
//char[][] map;
ArrayList[] list;
void solve(){
Scanner sc = new Scanner(System.in);
while(true){
w = sc.nextInt(); h = sc.nextInt();
if(w==0 && h==0) break;
list = new Array... | a.cc:3:1: error: stray '@' in program
3 | @SuppressWarnings("unchecked")
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:18: error: expected constructor, destructor, or type conversion before... |
s734078577 | p00215 | C++ | #include<cstdio>
#include<vector>
#include<map>
#include<algorithm>
#include<cstring>
#define INF 1<<28
#define F first
#define S second
using namespace std;
int sx, sy, gx, gy;
typedef pair < int, int > P;
vector < P > p[5];
int memo[5][5][1111];
int dist(P a, P b){
return abs(a.F - b.F) + abs(a.S, b.S);
}
int ... | a.cc: In function 'int dist(P, P)':
a.cc:17:30: error: no matching function for call to 'abs(int&, int&)'
17 | return abs(a.F - b.F) + abs(a.S, b.S);
| ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/bits/stl_algo.h:71,
... |
s751770561 | p00215 | C++ | #include<cstdio>
#include<vector>
#include<map>
#include<algorithm>
#include<cstring>
#define INF 1<<28
#define F first
#define S second
using namespace std;
int sx, sy, gx, gy;
typedef pair < int, int > P;
vector < P > v[5];
int memo[5][5][1111];
int dist(P a, P b){
return abs(a.F - b.F) + abs(a.S - b.S);
}
int... | a.cc: In function 'int main()':
a.cc:61:13: error: expected ';' before ':' token
61 | b == INF:puts("NA"):printf("%d %d\n", a, b);
| ^
|
s273295002 | p00215 | C++ |
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
new Main().run();
}
private void run() throws IOException {
Scanner scanner = new Scanner(Sy... | a.cc:102:17: error: stray '@' in program
102 | @Override
| ^
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | ... |
s837821852 | p00215 | C++ | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Comparator;
class Point {
public static int nextId = 0;
public int id;
public int x;
... | a.cc:224:33: error: stray '@' in program
224 | @Override
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'im... |
s299766763 | p00215 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
const int MAX_V = 5050;
const int INF = 1 << 15;
short cost[MAX_V][MAX_V];
short d[MAX_V];
bool used[MAX_V];
int V;
void dijkstra(int s)
{
fill(d, d + V, INF);
fill(used, used + V, false);
d[s] = 0;
while (true){
int v = -1;
fo... | a.cc: In function 'void dijkstra(int)':
a.cc:28:17: error: no matching function for call to 'min(short int&, int)'
28 | d[u] = min(d[u], d[v] + cost[v][u]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-... |
s206909927 | p00215 | C++ | function main(){
var i = 0;
while(true){
var fieldInfo = input[i].split(' ');
var width = fieldInfo[0] - 0;//toInt
var height = fieldInfo[1] - 0;//toInt
// 0 0が入力された
if(!width && !height){
break;
}
var start;
var goal;
var elem = [[],[],[],[],[]];
... | a.cc:141:9: error: empty character constant
141 | input = '';
| ^~
a.cc:144:27: warning: multi-character character constant [-Wmultichar]
144 | process.stdin.setEncoding('utf8');
| ^~~~~~
a.cc:145:18: warning: multi-character character constant [-Wmultichar]
145 | pro... |
s352138888 | p00215 | C++ | #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdli... | a.cc: In function 'P solve(int, int, int, int, std::vector<std::vector<int> >&)':
a.cc:51:73: error: invalid types 'int[int]' for array subscript
51 | REP(i, MAX_H) REP(j, MAX_W) REP(k, L) REP(l, (1 << L)) closed[i][j][k][l] = INF;
| ^
|
s952025027 | p00215 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<list>
#include<cctype>
#include<climits>
using namespace std;
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };
//----?????°????????????????????????????????£??????????????????
template ... | a.cc: In function 'int main()':
a.cc:106:35: error: cannot bind non-const lvalue reference of type 'Data&' to an rvalue of type 'Data'
106 | q.enqueue(Data(sx, sy, 0, i));
| ^~~~~~~~~~~~~~~~~~
a.cc:44:29: note: initializing argument 1 of 'void myQueue<... |
s436756860 | p00215 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<list>
#include<cctype>
#include<climits>
using namespace std;
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };
//----------------Pakuri Code------------------------
template <class T>
... | a.cc: In function 'int main()':
a.cc:106:35: error: cannot bind non-const lvalue reference of type 'Data&' to an rvalue of type 'Data'
106 | q.enqueue(Data(sx, sy, 0, i));
| ^~~~~~~~~~~~~~~~~~
a.cc:44:29: note: initializing argument 1 of 'void myQueue<... |
s419227637 | p00215 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<list>
#include<cctype>
#include<climits>
using namespace std;
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };
struct Data
{
int x, y, dist, state;
Data() {}
Data(int _x, int _y, in... | a.cc: In function 'int main()':
a.cc:93:35: error: cannot bind non-const lvalue reference of type 'Data&' to an rvalue of type 'Data'
93 | q.Enqueue(Data(sx, sy, 0, i));
| ^~~~~~~~~~~~~~~~~~
a.cc:39:28: note: initializing argument 1 of 'void MockQueue... |
s318975668 | p00215 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<list>
#include<cctype>
#include<climits>
using namespace std;
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };
struct Data
{
int x, y, dist, state;
Data() {}
Data(int _x, int _y, in... | a.cc: In function 'int main()':
a.cc:94:35: error: cannot bind non-const lvalue reference of type 'Data&' to an rvalue of type 'Data'
94 | q.Enqueue(Data(sx, sy, 0, i));
| ^~~~~~~~~~~~~~~~~~
a.cc:40:28: note: initializing argument 1 of 'void MockQueue... |
s749956757 | p00215 | C++ | #include <iostream>
#include <vector>
#include <cctype>
#include <queue>
#include <functional>
#include <cmath>
#include <algorithm>
constexpr int MAX = 1000, INF = INT_MAX;
struct edge {
int toX_, toY_;
edge() = default;
edge(int x, int y) : toX_(x), toY_(y) {}
};
struct Node {
int cost_, x_, y_, num_, cnt_;
N... | a.cc:9:33: error: 'INT_MAX' was not declared in this scope
9 | constexpr int MAX = 1000, INF = INT_MAX;
| ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
7 | #include <algorithm>
+++ |+#include <c... |
s345068116 | p00215 | C++ | #include <iostream>
#include <vector>
#include <cctype>
#include <queue>
#include <functional>
#include <cmath>
#include <algorithm>
constexpr int MAX = 1000, INF = INT_MAX;
struct edge {
int toX_, toY_;
edge() = default;
edge(int x, int y) : toX_(x), toY_(y) {}
};
struct Node {
int cost_, x_, y_, num_, cnt_;
N... | a.cc:9:33: error: 'INT_MAX' was not declared in this scope
9 | constexpr int MAX = 1000, INF = INT_MAX;
| ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
7 | #include <algorithm>
+++ |+#include <c... |
s227266673 | p00215 | C++ | #include <iostream>
#include <math.h>
char map[1000 + 2][1000 + 2];
int gx, gy;
int size_x, size_y;
int ans;
int ans_el;
using namespace std;
int calc(int x, int y, int get, int have, int dist)
{
if (have == get){
if (dist + abs(x - gx) + abs(y - gy) < ans){
ans = dist + abs(x - gx) + abs(y - gy);
ans_el =... | a.cc: In function 'int main()':
a.cc:46:9: error: 'memset' was not declared in this scope
46 | memset(map, -1, size_x * size_y);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <math.h>
+++ |+#include... |
s795523066 | p00215 | C++ | #include<cstdio>
#include<vector>
#define mp make_pair
#define pb push_back
using namespace std;
typedef pair<int,int> pii;
char field[1000][1001];
int memo[1000][5];
int dis(const pii &a,const pii &b){
return abs(a.first-b.first)+abs(a.second-b.second);
}
int main(){
for(int w,h;scanf("%d%d",&w,&h),w;){
pii ... | a.cc: In function 'int dis(const pii&, const pii&)':
a.cc:15:16: error: 'abs' was not declared in this scope
15 | return abs(a.first-b.first)+abs(a.second-b.second);
| ^~~
|
s764308797 | p00215 | C++ | #include<cstdio>
#include<vector>
#define mp make_pair
#define pb push_back
using namespace std;
typedef pair<int,int> pii;
int memo[1000][5];
int dis(const pii &a,const pii &b){
return abs(a.first-b.first)+abs(a.second-b.second);
}
int main(){
for(int w,h;scanf("%d%d",&w,&h),w;){
pii s,g;
vector<pii> pach[... | a.cc: In function 'int dis(const pii&, const pii&)':
a.cc:14:16: error: 'abs' was not declared in this scope
14 | return abs(a.first-b.first)+abs(a.second-b.second);
| ^~~
|
s970320985 | p00215 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;
struct P{int x,y,cost;};
#define INF (1<<25)
#define rep(i,n) for(int i=0; i<n ;i++)
int dist(P a,P b){
return abs(a.x-b.x) + abs(a.y-b.y);
}
int main(){
int w,h;
while(cin >> w >> h , w) {
vector<P> data[5];
P start , goal ;
s... | a.cc: In function 'int main()':
a.cc:26:65: error: expected initializer before '.' token
26 | else P t = {j,i,0} , data[c-'1'].push_back(t);
| ^
|
s923761496 | p00215 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <complex>
using namespace std;
#define INF 1 << 16
typedef complex<int> P;
int abs(int n) {
return n < 0 ? -n : n;
}
int main() {
int W, H;
while (cin >> W >> H, W || H) {
vector<P> v;
vector<int> type;
vector< vector<int... | a.cc: In function 'int main()':
a.cc:51:46: error: expected primary-expression before ';' token
51 | cost[i][j] = ;
| ^
|
s477058868 | p00215 | C++ | #include <cstdio>
#include <vector>
#include <utility>
#include <queue>
#include <algorithm>
using namespace std;
#define inf (1<<27)
#define abs(n) ((n)>=0?(n):-(n))
#define next(p) ((p)%5+1)
typedef pair<int,int> P;
typedef pair<int,P> P2;
int d[6][1000];
int o[6];
int dist(P &a,P &b) {return abs(a.first-b.first)+abs... | In file included from /usr/include/c++/14/queue:66,
from a.cc:4:
/usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, std::pair<int, int> > >, std::greater<std::pair<int, std::pair<int, int> > > >':
a.cc:37:45: required f... |
s740918407 | p00215 | C++ |
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#inclu... | a.cc:59:14: error: '#' is not followed by a macro parameter
59 | #define ALL(a)  (a).begin(),(a).end()
| ^
a.cc:74:16: error: '#' is not followed by a macro parameter
74 | #define REP(i,n)  FOR(i,0,n)
| ^
a.cc:95:18: error: stray '#' in program
95 | const doubl... |
s668085106 | p00215 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<algorithm>
#include<cstring>
#define INF 1<<28
using namespace std;
int sx, sy, gx, gy;
typedef pair < int, int > P;
vector < P > p[5];
int memo[5][5][1111];
int a, b;
int solve(int k, int t, int q){
if(k == 4) return abs(p[t][q].F-gx) + abs(p[t][q].S-gy);... | a.cc: In function 'int solve(int, int, int)':
a.cc:17:33: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'F'
17 | if(k == 4) return abs(p[t][q].F-gx) + abs(p[t][q].S-gy);
| ... |
s659511033 | p00216 | Java | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | Main.java:5: error: ';' expected
Scanner scan = new Scanner(System.in)
^
1 error
|
s628277966 | p00216 | Java | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | Main.java:5: error: ';' expected
Scanner scan = new Scanner(System.in)
^
1 error
|
s544411742 | p00216 | Java | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150;
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125;
else if ( 30 < i ) cost += 160... | Main.java:5: error: ';' expected
Scanner scan = new Scanner(System.in)
^
1 error
|
s263924732 | p00216 | Java | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | Main.java:5: error: ';' expected
Scanner scan = new Scanner(System.in)
^
1 error
|
s641472447 | p00216 | Java | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | Main.java:5: error: ';' expected
Scanner scan = new Scanner(System.in)
^
1 error
|
s394147235 | p00216 | Java | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | Main.java:5: error: ';' expected
Scanner scan = new Scanner(System.in)
^
1 error
|
s407955935 | p00216 | Java | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | Main.java:5: error: ';' expected
Scanner scan = new Scanner(System.in)
^
1 error
|
s682152984 | p00216 | C | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost;}
int main(){
for( int w; cin >> w && w >= 0; )... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s957050628 | p00216 | C | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost;
}
int main(){
for( int w; cin >> w && w >= 0; ... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s784743471 | p00216 | C | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost;
}
int main(){
for( int w; cin >> w && w >= 0; ... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s117384054 | p00216 | C | #include<stdio.h>
int main(void)
{
int a,d=1150;
while(scanf("%d",&a),a!=-1){
if(a>30){
d=d+160*(a-30);
a=30;
}
if(a>20){
d=d+140*(a-20);
a=20;
}
if(a>10)
d=d+140*(a-10);
d=10;
}
if(a<=10){
printf("%d?\n",d-4280);
}
}
return 0;
} | main.c:22:1: error: expected identifier or '(' before 'return'
22 | return 0;
| ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
23 | }
| ^
|
s528268551 | p00216 | C | #include <stdio.h>
int main()
{
int b,c,d,e,w,e,f;
int x;
for(;;){
scanf("%d",&w);
if(w==-1){
break;
}
if(w<=10){
b=1150;
}
else if(w>10&&w<=20){
d=w-10;
b=1150+d*125;
}
else if(w>20&&w<=30){
e=w-20;
b=1150+1250+e*140;
}
else if(w>30){
f=w-30;
b=1150+1250+1400+f*160;
}
c=4280-b;
printf("%d... | main.c: In function 'main':
main.c:4:23: error: redeclaration of 'e' with no linkage
4 | int b,c,d,e,w,e,f;
| ^
main.c:4:19: note: previous declaration of 'e' with type 'int'
4 | int b,c,d,e,w,e,f;
| ^
|
s926405866 | p00216 | C | main(w,s){for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(w,s){for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:1:1: erro... |
s892261929 | p00216 | C | main(){for(int w,s;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){for(int w,s;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;}
| ^~~~
main.c: In function 'main':
main.c:1:27: error: implicit declaration of function 'scanf' [-Wimplicit-funct... |
s570295091 | p00216 | C | main(){int w,s;for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){int w,s;for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;}
| ^~~~
main.c: In function 'main':
main.c:1:28: error: implicit declaration of function 'scanf' [-Wimplicit-func... |
s156308178 | p00216 | C | int main(){int w,s;for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;} | main.c: In function 'main':
main.c:1:32: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | int main(){int w,s;for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;}
| ^~~~~
main.c:1:1: ... |
s670982860 | p00216 | C | #include <iostream>
int main(){
int w;
while(std::cin >> w, w+1){
int p = 1150;
if(w > 30)p += 2650 + (w-30) * 160;
else if(w > 20)p += 1250 + (w-20) * 140;
else if(w > 10)p += (w-10) * 125;
std::cout << 4280 - p << std::endl;
}
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s795960780 | p00216 | C | #include<stdio.h>
int main(){
int w;
int m = 1150;
int t;
do{
scanf("%d", &w);
t = w;
t -= 30;
}
if(w > 30){
m += 10 * 125 + 10 * 140 + t * 160;
}else if(w > 20){
t = w - 20;
m += 10 * 125 + t *140;
}else if(w > 10){
t = w - 10;
m += r * 125;
}else{
m = m;
}
printf("%d\n", 4... | main.c: In function 'main':
main.c:13:17: error: expected 'while' before 'if'
13 | if(w > 30){
| ^~
main.c:15:18: error: 'else' without a previous 'if'
15 | }else if(w > 20){
| ^~~~
main.c:20:30: error: 'r' undeclared (first use in this ... |
s934497347 | p00216 | C | #include <iostream>
using namespace std;
int main(){
int w,money,flag,i;
while(1){
money = 1150;
cin >> w;
if(w == -1){
break;
}
if(w <= 10){
cout << 4280 - money << endl;
}
else {
w -= 10;
flag = 9;
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s784647450 | p00216 | C | include<stdio.h>
main(){
int i,w,en=0,flg;
while(1){
scanf("%d",&w);
if(w==-1)break;
for(i=11,en=1150;i<=w;i++){
if(i<=20)en+=125;
else if(i<=30)en+=140;
else en+=160;
}
printf("%d\n",4280-en);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s084396527 | p00216 | C | #include <stdio.h>
int main(void)
{
int w, a;
while(scanf("%d", &w) != EOF && w != -1){
int rates = 1150;
if(w > 30){
rates += (1250 + 1400);
if()
rates += (w - 30) * 160;
}
else{
if(w > 20){
rates += 1250;
rates += (w % 20) * 140;
}
if(10 < w && w < 20){
rates += (... | main.c: In function 'main':
main.c:14:28: error: expected expression before ')' token
14 | if()
| ^
|
s390769742 | p00216 | C++ | /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
| |
s556073513 | p00216 | C++ | #include<iostream>
using namespace srd;
int main(){
int w,r;
while(1){
cin >> w;
if(w<=10)r = 4280-1150;
else if(10<w<=20)r = 4280 - (1150 + (w-10) * 125);
else if(20<w<=30)r = 4280 - (1150 + 1250 + (w-20) * 140);
else if(30<w)r = 4280 - (1150 + 1250 + 1400 + (w-20) * 160);
else if(w==-1)break;
cout << r <<... | a.cc:2:17: error: 'srd' is not a namespace-name
2 | using namespace srd;
| ^~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> w;
| ^~~
| std::cin
In file included from a.cc:1:
/u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.