submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s190714598
p00858
C++
#include <iostream> #include <vector> #include <complex> #include <queue> #include <algorithm> using namespace std; typedef complex<double> P; struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; class Node { public: int pos; double cost; Node(int pos, double cost) : pos(pos), cost(cost) {} bool operator < (const No...
a.cc: In function 'void dijkstra(const graph&, int, int, const std::vector<std::complex<double> >&)': a.cc:83:20: error: 'visit' was not declared in this scope 83 | if(visit[pos]) continue; | ^~~~~ a.cc:6:1: note: 'std::visit' is defined in header '<variant>'; this is probabl...
s099915338
p00858
C++
#include <cstdio> #include <iostream> #include <vector> #include <list> #include <cmath> #include <fstream> #include <algorithm> #include <string> #include <queue> #include <set> #include <map> #include <complex> #include <iterator> #include <cstdlib> #include <cstring> #include <sstream> using namespace std; #define...
a.cc: In function 'int main()': a.cc:347:59: error: 'from' was not declared in this scope; did you mean 'fromfp'? 347 | d[from][to]=INF; | ^~~~ | ...
s297364250
p00858
C++
#include <cstdio> #include <iostream> #include <vector> #include <list> #include <cmath> #include <fstream> #include <algorithm> #include <string> #include <queue> #include <set> #include <map> #include <complex> #include <iterator> #include <cstdlib> #include <cstring> #include <sstream> using namespace std; #define...
a.cc: In function 'int main()': a.cc:345:59: error: 'from' was not declared in this scope; did you mean 'fromfp'? 345 | d[from][to]=INF; | ^~~~ | ...
s000751344
p00858
C++
#include<iostream> #include<complex> #include<vector> #include<set> #include<algorithm> #include<queue> #include<map> using namespace std; typedef complex<long long> P; typedef pair<long long,long long> Pi; #define cvPPi(a) make_pair(a.real(),a.imag()) long long cross(const P &a, const P &b){return a.real() * b.imag...
a.cc: In function 'void add_proh(P, P, P, P)': a.cc:122:3: error: 'assert' was not declared in this scope 122 | assert(a!=x && b!=x && c!=x ); | ^~~~~~ a.cc:8:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 7 | #include<map> +++ |+#include <c...
s336078099
p00858
C++
#include <iostream> #include <vector> #include <complex> #include <algorithm> #include <map> #include <queue> using namespace std; typedef complex<double> Point; struct Segment{ Point p1, p2; }; typedef Segment Line; const double EPS = 1e-8; const double INF = 1e50; bool equals(double a, double b){ return abs(a - b...
a.cc:104:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 104 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:109:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double') 109 | cin >> s.real() >> s.imag(); ...
s057060816
p00859
Java
import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.PriorityQueue; public class AOJ { public static void main(String[] args) { while (true) { int N = nextInt(); if (N == 0) { break; } int M = nextInt(); ArrayList<Edge> list = new ArrayList<Edge>...
Main.java:6: error: class AOJ is public, should be declared in a file named AOJ.java public class AOJ { ^ 1 error
s852508956
p00859
C
#include<stdio.h> #define MAX_N 150 #define INF 10e8 typedef struct { int a; int b; int w; } hen; int par[MAX_N]; int rank[MAX_N]; int n,m; hen dis[20000]; void init(int n){ int i; for(i=0;i<n;i++){ par[i] = i; rank[i] = 0; } } int find(int x){ if(par[x]==x){ return x; }else { return par[x] = find(par...
main.c: In function 'Kruskal': main.c:72:10: error: 'eles' undeclared (first use in this function) 72 | }eles { | ^~~~ main.c:72:10: note: each undeclared identifier is reported only once for each function it appears in main.c:72:14: error: expected ';' before '{' token 72 | }eles {...
s403654007
p00859
C
#include<stdio.h> #define MAX_N 150 #define INF 10e8 typedef struct { int a; int b; int w; } hen; int par[MAX_N]; int rank[MAX_N]; int n,m; hen dis[20000]; void init(int n){ int i; for(i=0;i<n;i++){ par[i] = i; rank[i] = 0; } } int find(int x){ if(par[x]==x){ return x; }else { return par[x] = find(par...
main.c: In function 'Kruskal': main.c:72:10: error: 'eles' undeclared (first use in this function) 72 | }eles { | ^~~~ main.c:72:10: note: each undeclared identifier is reported only once for each function it appears in main.c:72:14: error: expected ';' before '{' token 72 | }eles {...
s641083524
p00859
C++
#include <iostream> #include <vector> #include <deque> using namespace std; class UnionFind {/*{{{*/ private: vector<int> parent; int root(int x) { if (parent[x] < 0) { return x; } else { return parent[x] = root(parent[x]); } } public: UnionFind(int size) : pa...
a.cc: In function 'int solve(int, std::deque<edge>)': a.cc:63:13: error: 'numeric_limits' was not declared in this scope 63 | int ans = numeric_limits<int>::max(); | ^~~~~~~~~~~~~~ a.cc:63:28: error: expected primary-expression before 'int' 63 | int ans = numeric_limits<int>::max(); | ...
s432472655
p00859
C++
4 5 1 2 3 1 3 5 1 4 6 2 4 6 3 4 7 4 6 1 2 10 1 3 100 1 4 90 2 3 20 2 4 80 3 4 40 2 1 1 2 1 3 0 3 1 1 2 1 3 3 1 2 2 2 3 5 1 3 6 5 10 1 2 110 1 3 120 1 4 130 1 5 120 2 3 110 2 4 120 2 5 130 3 4 120 3 5 110 4 5 120 5 10 1 2 9384 1 3 887 1 4 2778 1 5 6916 2 3 7794 2 4 8336 2 5 5387 3 4 493 3 5 6650 4 5 1422 5 8 1 2 1 2 3 1...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 5 | ^
s803648188
p00860
C++
#include <cstdio> #include <cstring> #include <cctype> using namespace std; unsigned short vis[1 << 24]; char c[16][20]; bool wall[256]; int tm0; vector<int> q[2]; bool check(int u, int v){ for(int i = 0; i < 24; i += 8){ int p1 = v >> i & 255; if(p1){ int j = (i + 8) % 24; if(wall[p1]){ return false; } ...
a.cc:10:1: error: 'vector' does not name a type 10 | vector<int> q[2]; | ^~~~~~ a.cc: In function 'int solve(int, int)': a.cc:34:9: error: 'q' was not declared in this scope 34 | q[0].clear(); | ^
s023071895
p00860
C++
#include <iostream> #include <array> #include <vector> #include <cctype> #include <unordered_set> #include <queue> #include <algorithm> #include <cassert> #define repeat(i,n) for (int i = 0; (i) < (n); ++(i)) #define repeat_from(i,m,n) for (int i = (m); (i) < (n); ++(i)) #define repeat_reverse(i,n) for (int i = (n)-1; ...
a.cc:36:1: error: 'uint32_t' does not name a type 36 | uint32_t encode(array<point_t,3> const & s) { | ^~~~~~~~ a.cc:9:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 8 | #include <cassert> +++ |+#include <cstdint> 9 | #define repeat(i,n) ...
s271192375
p00860
C++
// forked from http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=1587939#1 #include <iostream> #include <array> #include <vector> #include <cctype> #include <unordered_set> #include <queue> #include <algorithm> #include <cassert> #define repeat(i,n) for (int i = 0; (i) < (n); ++(i)) #define repeat_from(i,m,n) for (i...
a.cc:53:1: error: 'uint32_t' does not name a type 53 | uint32_t encode(array<point_t,3> const & s) { | ^~~~~~~~ a.cc:10:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 9 | #include <cassert> +++ |+#include <cstdint> 10 | #define repeat(i,n)...
s057593573
p00860
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; ld eps=1e-9; short memo[16][16][16][16][16][16]; const int dx[4] = { -1,0,1,0 }; const int dy[4] = { 0,1,0,-1 }; int mg...
a.cc: In function 'int main()': a.cc:55:25: error: no matching function for call to 'std::queue<aa>::push(std::vector<std::pair<int, int> >&, int)' 55 | que.push(s, 0); | ~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/queue:66, from /usr/include/x86_64...
s826451034
p00860
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) #define int short int using namespace std; struct P{ int ay,ax,by,bx,cy,cx,cost; P(int a1,int a2,int b1,int b2,int c1,int c2,int c){ ax=a1;ay=a2; bx=b1;by=b2; cx=c1;cy=c2; cost=c; } }; int h,w,n,gx[3],gy[3],sx[3],sy[3]; string s[14],ir...
a.cc:3:19: error: '::main' must return 'int' 3 | #define int short int | ^~~ a.cc:91:1: note: in expansion of macro 'int' 91 | int main(){ | ^~~
s804867684
p00860
C++
#include<iostream> #include<queue> #include<set> #include<map> #include<string> #include<algorithm> using namespace std; #define SIZE 16 #define INF (1 << 21) int dx[]={0,0,1,-1,0}; int dy[]={1,-1,0,0,0}; short cost[3][16][16]; string m[16]; void bfs(int row,int column,int num,int ini); class ghost{ public: int p[3],...
a.cc: In member function 'int ghost::calc(int)': a.cc:28:16: error: no matching function for call to 'max(int&, short int&)' 28 | ret = max(ret,cost[i][p[i]/column][p[i]%column]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s728717311
p00860
C++
#include <iostream> #include <vector> #include <string> using namespace std; bool wall[16*16]; int mv[] = {0, 1, -1, 16, -16}; int compress(int pa, int pb, int pc){ return (pa)|(pb<<8)|(pc<<16); } int solve(int start, int goal){ static bool visit[16*16*16*16*16*16]; memset(visit, false, sizeof(visit)); visit[st...
a.cc: In function 'int solve(int, int)': a.cc:16:9: error: 'memset' was not declared in this scope 16 | memset(visit, false, sizeof(visit)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> ++...
s015095790
p00860
C++
#include <cstdio> #include <queue> #include <string> #include <cctype> #include <iostream> using namespace std; char f[16][16]; int fx,fy,N; int dx[] = {0, 0, -1, 1, 0}; int dy[] = {0, -1, 0, 0, 1}; class Ghost { public: int x[3],y[3],c; bool r; Ghost(int* i, int* j, int c, bool r) :r(r),c(c) { for(int k=0; ...
a.cc: In function 'int main()': a.cc:59:17: error: 'memset' was not declared in this scope 59 | memset(h,0,sizeof(h)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <iostream> +++ |+...
s758672686
p00860
C++
#include <cstdio> #include <queue> #include <cstring> #include <string> #include <cctype> #include <iostream> using namespace std; char f[16][16]; int fx,fy,N; int dx[] = {0, 0, -1, 1, 0}; int dy[] = {0, -1, 0, 0, 1}; class Ghost { public: int x[3],y[3],c; bool r; Ghost(int* i, int* j, int c, bool r) :r(r),c(c)...
a.cc: In function 'int main()': a.cc:67:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 67 | gets(s); | ^~~~ | getw
s937720670
p00860
C++
#include<iostream> #include<cstdio> #include<queue> #include<vector> #include<algorithm> #include<cmath> #include<cassert> #include<deque> #include<cstdlib> #include<map> #include<set> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) #define MAX 17 using namespace std; typedef u...
a.cc: In function 'ull getHash(char (*)[17])': a.cc:75:11: error: reference to 'hash' is ambiguous 75 | hash[i][j] = e; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/1...
s120105824
p00860
C++
#include<iostream> #include<cstdio> #include<queue> #include<vector> #include<algorithm> #include<cmath> #include<cassert> #include<iomanip> #include<ctime> #include<deque> #include<cstdlib> #include<map> #include<set> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) #define MAX ...
a.cc: In function 'ull getHash(char (*)[17])': a.cc:77:11: error: reference to 'hash' is ambiguous 77 | hash[i][j] = e; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/1...
s800573058
p00861
C++
#include <iostream> #include <string> #include <regex> #include <vector> #include <map> using namespace std; string str; int array_size[58] = {}; map<int, int> values[58]; regex re_left(R"((.)\[([^=]+)\](.*))"); regex re_right(R"(=(.+))"); int valueOf(string s) { smatch m; if (regex_match(s, m, re_left)) { ...
a.cc: In function 'int main()': a.cc:54:43: error: use of deleted function 'bool std::regex_match(const __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&&, __cxx11::match_results<typename __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>&, const __cxx11::basic_regex<_Ch_type, _Rx_tra...
s274467155
p00861
C++
#include <iostream> #include <string> #include <regex> #include <vector> #include <map> using namespace std; string str; int array_size[58] = {}; map<int, int> values[58]; regex re_left(R"((.)\[([^=]+)\](.*))"); regex re_right(R"(=(.+))"); int valueOf(string s) { smatch m; if (regex_match(s, m, re_left)) { ...
a.cc: In function 'int main()': a.cc:54:43: error: use of deleted function 'bool std::regex_match(const __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&&, __cxx11::match_results<typename __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>&, const __cxx11::basic_regex<_Ch_type, _Rx_tra...
s221647435
p00861
C++
#include <iostream> #include <string> #include <regex> #include <vector> #include <map> using namespace std; string str; int array_size[58] = {}; map<int, int> values[58]; regex re_left(R"((.)\[([^=]+)\](.*))"); regex re_right(R"(=(.+))"); int valueOf(string s) { smatch m; if (regex_match(s, m, re_left)) { ...
a.cc: In function 'int main()': a.cc:54:43: error: use of deleted function 'bool std::regex_match(const __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&&, __cxx11::match_results<typename __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>&, const __cxx11::basic_regex<_Ch_type, _Rx_tra...
s177991351
p00861
C++
#include<iostream> #include<string> #include<vector> #include<map> using namespace std; vector<string> L; int size[52]; map<pair<int, int>, int> V; map<pair<int, int>, bool> A; int idx(char ch){ if ( ch <= 'z' ) return ch - 'a'; else return ch - 'A' + 26; } int getInt(string str, int &p ){ string num = ...
a.cc: In function 'int getInt(std::string, int&)': a.cc:24:21: error: reference to 'size' is ambiguous 24 | if ( v == -1 || size[n] <= v || !A[make_pair(n, v)] ) return -1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_...
s427624727
p00861
C++
#include<iostream> #include<string> #include<vector> #include<cstring> #include<map> using namespace std; vector<string> L; int size[52]; map<pair<int, int>, int> V; map<pair<int, int>, bool> A; int idx(char ch){ if ( ch <= 'z' ) return ch - 'a'; else return ch - 'A' + 26; } int getInt(string str, int &p ){...
a.cc: In function 'int getInt(std::string, int&)': a.cc:25:21: error: reference to 'size' is ambiguous 25 | if ( v == -1 || size[n] <= v || !A[make_pair(n, v)] ) return -1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_...
s372453091
p00861
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> #include <map> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const double EPS = 1e-9; static const double PI = acos(-1.0...
a.cc: In function 'int main()': a.cc:41:12: error: 'gets' was not declared in this scope; did you mean 'getw'? 41 | while (gets(str), str[0] != '.') { | ^~~~ | getw
s496979554
p00861
C++
#include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <climits> #include <cfloa...
a.cc: In function 'bool substitute(std::string&)': a.cc:52:23: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 52 | int i=dfs(s.substr(2,eq-3),idx); | ~~~~~~~~^~~~~~~~ a.cc:2...
s605858249
p00862
Java
import java.util.*; import java.awt.geom.*; import java.awt.geom.Point2D.Double; import static java.lang.Math.*; public class Main { final Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().init(); } void init(){ new Q2007I(); } class Q2007I{ int N; Q2007I(){ wh...
Main.java:63: error: cannot find symbol cuts[i] = new Line2D.Double(sum(p1, v1), sum(p2, v1)); ^ symbol: method sum(Point2D,Point2D) location: class Main.Q2007I Main.java:63: error: cannot find symbol cuts[i] = new Line2D.Double(sum(p1, v1), sum(p2, v1)); ...
s570915104
p00862
Java
import java.util.*; import java.awt.geom.*; import java.awt.geom.Point2D.Double; import static java.lang.Math.*; public class Main { final Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().init(); } void init(){ new Q2007I(); } class Q2007I{ int N; Q2007I(){ wh...
Main.java:63: error: cannot find symbol cuts[i] = new Line2D.Double(sum(p1, v1), sum(p2, v1)); ^ symbol: method sum(Point2D,Point2D) location: class Main.Q2007I Main.java:63: error: cannot find symbol cuts[i] = new Line2D.Double(sum(p1, v1), sum(p2, v1)); ...
s507963926
p00862
C++
#include <algorithm> #include <cmath> #include <cstdlib> #include <functional> #include <iostream> #include <numeric> #include <vector> using namespace std; constexpr double EPS = 1e-8; template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; } struct point { double x, y; explicit point(double x_ =...
a.cc: In function 'double dist(const polygon&, const point&)': a.cc:109:22: error: 'INT_MAX' was not declared in this scope 109 | double res = INT_MAX; | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 6...
s474225637
p00862
C++
#include<bits/stdc++.h> #include<windows.h> using namespace std; typedef complex<double> P; //Point typedef pair<P,P> L; //Line, Segment const double EPS = 1e-7; const double PI = 6.0 * asin(0.5); namespace std { bool operator < (const P& a, const P& b){ return fabs(real(a)-real(b)) < EPS ? imag(a) < imag(b) ...
a.cc:2:9: fatal error: windows.h: No such file or directory 2 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s128806680
p00862
C++
#include<bits/stdc++.h> #include<windows.h> using namespace std; typedef complex<double> P; //Point typedef pair<P,P> L; //Line, Segment const double EPS = 1e-8; const double PI = 6.0 * asin(0.5); namespace std { bool operator < (const P& a, const P& b){ return fabs(real(a)-real(b)) < EPS ? imag(a) < imag(b) ...
a.cc:2:9: fatal error: windows.h: No such file or directory 2 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s403464661
p00862
C++
#include <bits/stdc++.h> using namespace std; typedef complex<double> P; //Point typedef pair<P,P> L; //Line, Segment const double EPS = 1e-8; const double PI = 6.0 * asin(0.5); namespace std { bool operator < (const P& a, const P& b){ return fabs(real(a)-real(b)) < EPS ? imag(a) < imag(b) : real(a) < real(b); ...
a.cc:44:1: error: 'h' does not name a type 44 | h | ^ a.cc: In function 'int main()': a.cc:70:11: error: 'check' was not declared in this scope 70 | if(!check(pol,M)) R=M-EPS; | ^~~~~ a.cc: In function 'P crossPoint(L, L)': a.cc:31:1: warning: control reaches end of non-void function [...
s265551788
p00862
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef double D; // 座標値の型。doubleかlong doubleを想定 typedef complex<D> P; // Point typedef pair<P, P> L; // Line typedef vector<P> VP; typedef vector<VP> Vcon; const D EPS = 1e-10; // 許容誤差。問題によって変える #define X real() #define Y ima...
a.cc: In function 'int main()': a.cc:218:28: error: expected '}' at end of input 218 | printf("%.6f\n",l); | ^ a.cc:205:20: note: to match this '{' 205 | while(cin>>n,n){ | ^ a.cc:218:28: error: expected '}' at end of input 218 | printf...
s913211758
p00862
C++
#include<iostream> #include<complex> #include<cmath> #include<vector> #include<iomanip> #include<cassert> using namespace std; typedef long double elem; typedef complex<elem> point,vec; typedef pair<point,point> seg,line; const elem eps = 1e-8; enum CCW{BACK=0x01,FRONT=0x02,RIGHT=0x04,LEFT=0x08,OVER=0x10}; bool eq(el...
a.cc: In function 'void andrewConvexHull(const std::vector<std::complex<long double> >&, std::vector<std::complex<long double> >&)': a.cc:89:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 89 | sort( T.begin(), T.end(), cmpXy ); | ^~~~ | sqrt a.cc: In function 'bool regularCon...
s635107943
p00862
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <ctime> #include <cassert> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include...
a.cc: In constructor 'Line::Line(const Point&, const Point&)': a.cc:125:29: error: lvalue required as left operand of assignment 125 | this->first.real() += 1e-12; | ~~~~~~~~~~~~~~~~^~ a.cc: In function 'Convex convex_cut(const Convex&, const Line&)': a.cc:188:28: error: 'ip_LL' was not ...
s016458238
p00864
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; import java.text.DecimalFormat; public cla...
Main.java:30: error: variable ma_h might not have been initialized ma_h=Math.max(ma_h,h[p]); ^ Main.java:34: error: variable ma_h might not have been initialized ans.add(new Fraction(ma-i,ma).multiply(new Fraction(h[i],ma_h))); ^ 2 error...
s276448567
p00864
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; import java.text.DecimalFormat; public cla...
Main.java:35: error: cannot find symbol out.println(df.format(ans.doubleValue())); ^ symbol: variable df location: class Main 1 error
s017035599
p00864
C++
#!/usr/bin/env python import sys import math import itertools as it from collections import deque sys.setrecursionlimit(10000000) while True: n, w = map(int, raw_input().split()) if n == 0: break lst = [] for i in range(n): num = input() num /= w lst.append(num) ma...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python | ^ a.cc:3:1: error: 'import' does not name a type 3 | import sys | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
s805096173
p00864
C++
3 50 100 0 100 3 50 100 100 50 10 10 1 2 3 4 5 16 17 18 29 30 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 50 | ^
s481318034
p00864
C++
#include<iostream> #include<cmath> #define eps 1e8 using namespace std; int n,w; double histogram[10]; double calc(double bar){ double hightest=0; for(int i=0;i<bar;i++){ hightest=max(hightest,histogram[i]); } double res=0; for(int i=0;i<bar;i++){ res+=(histogram[i]/hightest) * ((bar-1-i)/(bar-1))...
a.cc: In function 'int main()': a.cc:23:5: error: 'memset' was not declared in this scope 23 | memset(histogram,0,sizeof(histogram)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cmath> +++ |+#include <cst...
s096628164
p00864
C++
#include <iostream> using namespace std; int main(){ int N,W,x; while(cin >> N >> W, N){ int n = 0; double p[11] = {0}; for(int i = 0 ; i < N ; i++){ cin >> x; p[x/W]++; n = max(n,x/W); } double den = *max_element(p,p+11); double ans = 0,t = n; for(int i = 0 ; i < n ; i++){...
a.cc: In function 'int main()': a.cc:14:19: error: 'max_element' was not declared in this scope 14 | double den = *max_element(p,p+11); | ^~~~~~~~~~~
s870468502
p00864
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(true){ int n = sc.nextInt(); int w = sc.nextInt(); if(n+w==0)break; int[] cnt = new int[100]; for (int i = 0; i < n; i++) { cnt[sc.nextInt()/w]++; } double high=...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s956034464
p00864
C++
#include<iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <queue> #include <string> #include <cmath> #include <set> #include <functional> using namespace std; int v[102]; int m[102]; int main() { while(true){ int n,w; cin>>n>>w; if(n==0) ...
a.cc: In function 'int main()': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(m,0,sizeof(m)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <functional> +++ |+#include <cstr...
s530707387
p00864
C++
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; import java.text.DecimalFormat; public cl...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.InputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodu...
s830059449
p00864
C++
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; int n; int w; int[] h; void run(){ for(;;){ n=sc.nextInt(); w=sc.nextInt(); if((n|w)==0){ break; } h=new int[20]; int vMax=0; ...
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:2:1: error: 'import' does not name a type 2 | import java.lang.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s972551672
p00864
C++
#include <iostream> #include <fstream> using namespace std; int main(){ int n, w, h[11]; while(cin >> n >> w, n){ memset(h, 0, sizeof(h)); int mx = 0, tmp; for(int i=0;i<n;i++){ cin >> tmp; mx = max(mx, tmp); h[tmp/w]++; } int size = mx/w, hist = 0; for(int i=0;i<=size;i++) hist = max(hist, ...
a.cc: In function 'int main()': a.cc:9:17: error: 'memset' was not declared in this scope 9 | memset(h, 0, sizeof(h)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <fstream> +++ |+...
s459523288
p00864
C++
#include<iostream> #include<algorithm> using namespace std; const int MAX = 15; int data[MAX],n,w; int main(){ while(cin >> n >> w && n+w){ fill(data,data+MAX,0); double lim = 0; while(n--){ double in; cin >> in; lim = max(lim,in/w); data[(int)in/w]++; } int mValue = ...
a.cc: In function 'int main()': a.cc:12:10: error: reference to 'data' is ambiguous 12 | fill(data,data+MAX,0); | ^~~~ 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:...
s645242717
p00864
C++
#include <iostream> #include <string> #include <cctype> #include <memory> #include <vector> #include <array> #include <algorithm> //auto in = freopen("input", "r", stdin); using namespace std; int main(){ cout << setprecision(20); while(true){ int n, w; cin >> n >> w; if(n==0 && w==0) break; vector<int> l...
a.cc: In function 'int main()': a.cc:14:17: error: 'setprecision' was not declared in this scope 14 | cout << setprecision(20); | ^~~~~~~~~~~~ a.cc:8:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>' 7 | #include <...
s534304892
p00865
C
#include<cstdio> #include<cmath> using namespace std; typedef long double D; int n,m,k,N; D rec(int d,int sum){ if(d==n){ sum -= k; if(sum<1)sum = 1; return (D)sum/N; } D res = 0; for(int i=1;i<=m;i++)res += rec(d+1,sum+i); return res; } int main(){ while(scanf("%d%d%d",&n,&m,&k),n+m+k){ ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s812807549
p00865
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> #include <...
a.cc: In function 'int main()': a.cc:76:19: error: expected primary-expression before 'else' 76 | else hist[nxt][j+k] += hist[crt][j]; | ^~~~
s327836887
p00865
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <cstring> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #incl...
a.cc: In function 'int main()': a.cc:38:50: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = long long int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<...
s695603158
p00865
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <vector> #include <string> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> using namespace std; #define rep(i,j) REP((i), 0, (j)) #define REP(i,j,k) for(int i=(j)...
a.cc:1:21: warning: extra tokens at end of #include directive 1 | #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <vector> #include <string> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> using namespace s...
s984557646
p00865
C++
#include <fstream> #include <vector> using namespace std; int main(){ int n, m ,k; while(cin >> n >> m >> k, n){ vector<double> cur(n*m+1, 0.0); cur[0] = 1.0; for(int i=0;i<n;i++){ vector<double> next(n*m+1, 0.0); for(int j=0;j+m<=n*m;j++) for(int l=1;l<=m;l++) next[j+l] += cur[j]/m; cur = n...
a.cc: In function 'int main()': a.cc:8:15: error: 'cin' was not declared in this scope 8 | while(cin >> n >> m >> k, n){ | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <vector> +++ |+#include...
s687684166
p00865
C++
#include <iostream> #include <vector> #include <algorithm> #include <stack> #include <cstring> #include <queue> #define rep(i,n) for(int i = 0; i < (n); i++) #define all(v) (v).begin(), (v).end() #define rev(v) (v).rbegin(), (v).rend() #define MP make_pair using namespace std; typedef vector<int> vi; typedef pair<int...
a.cc: In function 'int main()': a.cc:42:28: error: 'pow' was not declared in this scope 42 | double d = pow((double)m, n); | ^~~
s001002366
p00865
C++
#include <iostream> #include <string> #include <cctype> #include <memory> #include <vector> #include <array> #include <algorithm> #include <iomanip> #include <stack> //auto in = freopen("input", "r", stdin); using namespace std; struct Value{ Value(long long v, long long count=1) : count(count), v(v){}; int count;...
a.cc: In function 'int main()': a.cc:42:34: error: 'powf' is not a member of 'std' 42 | cout << sum/std::powf((long double)m,n) << endl; | ^~~~
s295277078
p00866
C++
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define fs first #define sc second #define all(c) c.begin(),c.end() typedef pair<int,int> P; vector<int> clock[60][60],t; int main(){ rep(i,12) rep(j,60) rep(k,60){ int h[3]={5*i+j/...
a.cc:11:25: error: 'std::vector<int> clock [60][60]' redeclared as different kind of entity 11 | vector<int> clock[60][60],t; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /us...
s260639591
p00866
C++
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define fs first #define sc second #define all(c) c.begin(),c.end() typedef pair<int,int> P; vector<int> clock[60][60],t; int main(){ rep(i,12) rep(j,60) rep(k,60){ int h[3]={5*i+j/...
a.cc:11:25: error: 'std::vector<int> clock [60][60]' redeclared as different kind of entity 11 | vector<int> clock[60][60],t; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /us...
s516909086
p00866
C++
#include <fstream> #include <vector> #include <algorithm> using namespace std; void printAns(int t1, int t2){ int h1 = t1/3600, m1 = (t1%3600)/60, s1 = t1%60; int h2 = t2/3600, m2 = (t2%3600)/60, s2 = t2%60; printf("%02d:%02d:%02d %02d:%02d:%02d\n", h1, m1, s1, h2, m2, s2); } int main(){ int n; while(cin >> n, ...
a.cc: In function 'int main()': a.cc:15:15: error: 'cin' was not declared in this scope 15 | while(cin >> n, n){ | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <algorithm> +++ |+#include <iost...
s860970562
p00867
C++
#include<iostream> #include<complex> #include<vector> #include<cmath> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back typedef complex<int> P; const double eps = 1e-10; namespace std{ bool operator==(const P &a,const P &b){ return a.real()=...
a.cc:495:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 495 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:503:18: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 503 | rep(j,2)cin>>inp[i].d[j].real()>>...
s067100624
p00867
C++
#include<iostream> #include<complex> #include<csdtlib> #include<vector> #include<cmath> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back typedef complex<int> P; const double eps = 1e-10; namespace std{ bool operator==(const P &a,const P &b){ ...
a.cc:3:9: fatal error: csdtlib: No such file or directory 3 | #include<csdtlib> | ^~~~~~~~~ compilation terminated.
s365402804
p00867
C++
#include<iostream> #include<complex> #include<vector> #include<cmath> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back typedef complex<int> P; const double eps = 1e-10; namespace std{ bool operator==(const P &a,const P &b){ return a.real()=...
a.cc:498:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 498 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:506:18: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 506 | rep(j,2)cin>>inp[i].d[j].real()>>...
s876925610
p00867
C++
#include <fstream> #include <iostream> #include <vector> #include <complex> #include <cmath> #include <cstring> using namespace std; typedef complex<int> P; typedef pair<P, P> L; int root[1000]; int cross(P a, P b) { return imag(conj(a)*b); } bool onLP(L l, P p){ double d1 = sqrt((double)norm(l.first-p))+sqrt((do...
a.cc: In function 'int main()': a.cc:111:57: error: 'reverse' was not declared in this scope 111 | reverse(point.begin(), point.end()); | ^~~~~~~
s571120259
p00867
C++
#include <cstdio> void dfs(int v) { u[v]=true; o[k++]=v; for (int i=0; i<n; ++i) if (g[v][i] && !u[i]) dfs(i); } bool online(Point p,int i) { return p==a[i] || p==b[ii] || p.x==a[i].x+b[i].x && p.y==a[i].y+b[i].y; } bool find(int dep) { if (dep==k) { } for (int i=0; i<k; ++i) if (!used[i]) { used[i...
a.cc: In function 'void dfs(int)': a.cc:5:9: error: 'u' was not declared in this scope 5 | u[v]=true; | ^ a.cc:6:9: error: 'o' was not declared in this scope 6 | o[k++]=v; | ^ a.cc:6:11: error: 'k' was not declared in this scope 6 | o[k++]=v; | ...
s309606390
p00868
C++
#include <bits/stdc++.h> #define double long double using namespace std; const double EPS = 1e-8; const double INF = 1e9; struct p3{ double x,y,z,r; p3(){x=y=z=r=0;} p3(double x,double y,double z):x(x),y(y),z(z){}; p3(double x,double y,double z,double r):x(x),y(y),z(z),r(r){}; p3 operator + (const p3 a)const...
a.cc:19:3: error: 'P' does not name a type 19 | P xz()const{return P(x,z);} | ^ a.cc:20:3: error: 'P' does not name a type 20 | P xy()const{return P(x,y);} | ^ a.cc:21:3: error: 'P' does not name a type 21 | P yz()const{return P(y,z);}; | ^
s152323393
p00868
C++
#include <cstdio> #include <cmath> #include <vector> #include <algorithm> using namespace std; #define INF 1e10 #define EPS 1e-8 class Point3 { public: double x,y,z; Point3() {} Point3(double x, double y, double z) :x(x),y(y),z(z) {} Point3 operator-(const Point3& p) const { return Point3(x-p.x, y-p.y, ...
a.cc: In function 'bool intersectSpS(const Point3&, const Point3&, const Sphere&)': a.cc:111:23: error: cannot bind non-const lvalue reference of type 'Point3&' to an rvalue of type 'Point3' 111 | double vc=dot(Point3(l[1]-l[0]), Point3(s.p-l[0])); | ^~~~~~~~~~~~~~~~~ a.cc:53:20: n...
s263068665
p00869
C++
#include<iostream> #include<vector> #include<queue> using namespace std; #define REP(i, N) for(int i = 0; i < (int)(N); ++i) enum {migi, hidari, mae, ushiro, ccw, cw}; int dx[] = {0,0,1,-1,0,0}; int dy[] = {1,-1,0,0,0,0}; int op[6][6] = { {4,1,0,3,5,2}, {2,1,5,3,0,4}, {3,0,2,5,4,1}, {1,5,2,0,4,3}, {0,4,1,2,3,5},...
a.cc: In function 'int main()': a.cc:124:17: error: 'memset' was not declared in this scope 124 | memset(memo, -1, sizeof(memo)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> ...
s985625461
p00869
C++
// 2008ƒAƒWƒA’n‹æ—\‘IF : Traveling Cube #include <iostream> #include <queue> #include <string> using namespace std; class Node{ public: int x, y, p, d0, d1, c; Node(int x, int y, int p, int d0, int d1, int c) : x(x), y(y), p(p), d0(d0), d1(d1), c(c) {} }; char dx[] = {-1,1,0,0}; char dy[] = {0,0,-1,1}; // ƒTƒCƒRƒ...
a.cc: In function 'char getUpper(int, int)': a.cc:34:34: error: 'i' was not declared in this scope 34 | return dice_color[(side[(i+1)%4]-side[i]+6)%6 < 3 ? 2 : 5]; | ^ a.cc: In function 'int main()': a.cc:49:17: error: 'memset' was not declared in this scope 49 | ...
s203766199
p00869
C++
// 2008ƒAƒWƒA’n‹æ—\‘IF : Traveling Cube #include <iostream> #include <queue> #include <string> using namespace std; class Node{ public: int x, y, p, d0, d1, c; Node(int x, int y, int p, int d0, int d1, int c) : x(x), y(y), p(p), d0(d0), d1(d1), c(c) {} }; char dx[] = {-1,1,0,0}; char dy[] = {0,0,-1,1}; // ƒTƒCƒRƒ...
a.cc: In function 'char getUpper(int, int)': a.cc:34:55: error: expected ')' before ';' token 34 | return dice_color[(side[(b-a+6)%6 < 3 ? 2 : 5]; | ~ ^ | ) a.cc:34:55: error: expected ']' be...
s135571950
p00870
C++
#include <bits/stdc++.h> using namespace std; int n; int m; string t; char buf[114514]; string des[114514]; char cs[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; bool dp[1 << 12][5001]; int main() { while (1) { scanf("%d%d", &n, &m); if (n == 0 && m == 0) return 0; sum = 0; for (int i...
a.cc: In function 'int main()': a.cc:17:5: error: 'sum' was not declared in this scope 17 | sum = 0; | ^~~
s690945136
p00870
C++
#include<iostream> #include<vector> #include<cmath> #include<complex> using namespace std; #define REP(i, N) for(int i = 0; i < (int)(N); i++) bool dp[32][1 << 12]; int main() { for(int N, M; cin >> N >> M, (N || M); ) { string str; string word[12]; REP(i, N) cin >> word[i]; REP(i, M) { string s; cin >...
a.cc: In function 'int main()': a.cc:22:17: error: 'memset' was not declared in this scope 22 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<complex> +++ ...
s302319464
p00870
C++
#include <iostream> #include <cstdio> using namespace std; int l; int n,m; char c[12][21]; char s[5001]; int A[128],B[128]; bool D[12]; int check(){ int remain = false; for(int i = 'a' ; i <= 'z' ; i++){ if( B[i] != A[i] ){ return false; }else{ remain |= B[i]; } } if( !remain ) return true; f...
a.cc: In function 'int main()': a.cc:49:33: error: 'strlen' was not declared in this scope 49 | int L = strlen(c[i]); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #incl...
s754163679
p00870
C++
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int l; int n,m; char c[12][21]; char s[5001]; int A[128],B[128]; bool D[12]; int check(){ int remain = false; for(int i = 'a' ; i <= 'z' ; i++){ if( B[i] != A[i] ){ return false; }else{ remain |= B[i]; } } if( !remain...
a.cc: In function 'int main()': a.cc:50:33: error: 'strlen' was not declared in this scope 50 | int L = strlen(c[i]); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #incl...
s555234613
p00870
C++
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int l; int n,m; string c[20]; string s; int A[128],B[128]; bool D[20]; int check(){ int remain = false; for(int i = 'a' ; i <= 'z' ; i++){ if( B[i] != A[i] ){ return false; }else{ remain |= B[i]; } } if( !remain ) retu...
a.cc: In function 'int main()': a.cc:60:34: error: 'assert' was not declared in this scope 60 | if( len > 5000 ) assert(0); | ^~~~~~ a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 3 | #inclu...
s837022688
p00870
C++
#include <iostream> #include <queue> #include <string> using namespace std; #define MAXSTACK 300000 #define MAXSIZE 5010 #define MAXN 12 struct obj { short int p, m; } tmpobj, s[MAXSTACK]; bool starts[MAXSIZE][MAXN], ins[MAXSIZE][1<<MAXN]; int main() { int N, M, i, j, k, l[MAXN], RES, FULL, E; string n[MAXN], i...
a.cc: In function 'int main()': a.cc:31:1: error: 'memset' was not declared in this scope 31 | memset(starts, false, sizeof(starts)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> +++ |+#include <cstring> ...
s174484958
p00872
C++
#include <bits/stdc++.h> #define reo(i,n) for(int i=0;i<n;i++) using namespace std; struct Poly { vector<int> c; Poly() : c(1, 1) {;} Poly(int s, int i) : c(s, i) {;} Poly(vector<int> v) {c = v;} int size() const { return c.size(); } void print(){ int flag = 0; for(int i=size()-1;i>=1;i--){ if...
a.cc: In member function 'Poly Poly::operator+(const Poly&) const': a.cc:45:9: error: 'i' was not declared in this scope 45 | REP(i,c7.size()) ret[i] = ret[i] + c7[i]; | ^ a.cc:45:5: error: 'REP' was not declared in this scope 45 | REP(i,c7.size()) ret[i] = ret[i] + c7[i]; | ^~~ a....
s072657478
p00872
C++
#include <bits/stdc++.h> #define reo(i,n) for(int i=0;i<n;i++) using namespace std; struct Poly { vector<int> c; Poly() : c(1, 1) {;} Poly(int s, int i) : c(s, i) {;} Poly(vector<int> v) {c = v;} int size() const { return c.size(); } void print(){ int flag = 0; for(int i=size()-1;i>=1;i--){ if...
a.cc: In member function 'Poly Poly::operator+(const Poly&) const': a.cc:45:9: error: 'i' was not declared in this scope 45 | REP(i,c7.size()) ret[i] = ret[i] + c7[i]; | ^ a.cc:45:5: error: 'REP' was not declared in this scope 45 | REP(i,c7.size()) ret[i] = ret[i] + c7[i]; | ^~~ a....
s259355151
p00873
C++
#include<iostream> #include<algorithm> #include<complex> #include<queue> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define mp make_pair #define ALL(C) (C).begin(),(C).end() const double eps = 1e-10; #define EQ(a,...
a.cc: In function 'void solve(int, P*)': a.cc:228:20: error: 'inf' was not declared in this scope; did you mean 'in'? 228 | if (ans.first == inf)exit(1); | ^~~ | in a.cc: At global scope: a.cc:232:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wret...
s096998807
p00873
C++
#include<iostream> #include<algorithm> #include<complex> #include<queue> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define mp make_pair #define ALL(C) (C).begin(),(C).end() const double eps = 1e-10; #define EQ(a,...
a.cc: In function 'void solve(int, P*)': a.cc:229:20: error: 'inf' was not declared in this scope; did you mean 'in'? 229 | if (ans.first == inf)exit(1); | ^~~ | in a.cc: At global scope: a.cc:233:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wret...
s078975385
p00873
C++
#include<iostream> #include<algorithm> #include<complex> #include<queue> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define mp make_pair #define ALL(C) (C).begin(),(C).end() const double eps = 1e-10; #define EQ(a,...
In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683, from /usr/include/c++/14/bits/requires_hosted.h:31, from /usr/include/c++...
s583158847
p00874
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; import static java.lang.Integer.parseInt; /** * Problem A: Cubist Artwork */ public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new Buff...
Main.java:18: error: cannot find symbol P1295 main = new P1295(); ^ symbol: class P1295 location: class Main Main.java:18: error: cannot find symbol P1295 main = new P1295(); ^ symbol: class P1295 location: class Main 2 errors
s303835205
p00874
Java
import java.util.*; import java.io.*; public class Main{ public static void main(String[] args){ new Main().solve(); } void solve(){ Scanner cin = new Scanner(System.in); while() { int h = cin.nextInt(); int d = cin.nextInt(); if(h==0) return; int[] a = new int[h]; int[] b = new int[d]; ...
Main.java:12: error: illegal start of expression while() ^ 1 error
s388353470
p00874
C
main(w,d,c,i,q,r[21],s[21]){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
main.c:1:17: error: expected ')' before '[' token 1 | main(w,d,c,i,q,r[21],s[21]){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}} | ^ | )...
s560638254
p00874
C
w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
main.c:1:1: warning: data definition has no type or storage class 1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}} | ^ main.c:1:1: error: type ...
s729901936
p00874
C++
5 5 1 2 3 4 5 1 2 3 4 5 5 5 2 5 4 1 3 4 1 5 3 2 5 5 1 2 3 4 5 3 3 3 4 5 3 3 7 7 7 7 7 7 3 3 4 4 4 4 3 4 4 3 4 2 2 4 4 2 1 4 4 2 8 8 8 2 3 8 3 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 9 20 1 20 20 20 20 20 18 20 20 20 20 20 20 7 20 20 20 20 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 5 | ^
s331477288
p00874
C++
test
a.cc:1:1: error: 'test' does not name a type 1 | test | ^~~~
s290313531
p00874
C++
5 5 1 2 3 4 5 1 2 3 4 5 5 5 2 5 4 1 3 4 1 5 3 2 5 5 1 2 3 4 5 3 3 3 4 5 3 3 7 7 7 7 7 7 3 3 4 4 4 4 3 4 4 3 4 2 2 4 4 2 1 4 4 2 8 8 8 2 3 8 3 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 9 20 1 20 20 20 20 20 18 20 20 20 20 20 20 7 20 20 20 20 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 5 | ^
s081309430
p00874
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int w = sc.nextInt(); int d = sc.nextInt(); if (w == 0 && d == 0) break; int[] h1 = new int[w]; int[] h2 = new int[d]; int[] count1 = new int[21]; int ans =...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s059641258
p00874
C++
#include<iostream> #include<vector> #include<iterator> using namespace std; int main(){ int i, n, m, x, sum; vector<int> data; vector<int>::iterator j; while(1){ cin >> n >> m; if(n == 0 && m == 0) break; sum = 0; for(i=0; i<n; ++i){ cin >> x; data.push_back(x); } for(i=...
a.cc: In function 'int main()': a.cc:25:15: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 25 | j = find(data.begin(), data.end(), x); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/locale_facets.h...
s414176352
p00874
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main (int argc, char const* argv[]) { int w,d; cin >> w >> d; while(w||d) { int s = 0; auto count = vector<int>(21,0); for (unsigned int i = 0; i < w; i += 1) { int n; cin >> n; s += n; if(n > max) count[n]+...
a.cc: In function 'int main(int, const char**)': a.cc:20:30: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>' 20 | if(n > max) | ~~^~~~~
s589133800
p00874
C++
5 5 1 2 3 4 5 1 2 3 4 5 5 5 2 5 4 1 3 4 1 5 3 2 5 5 1 2 3 4 5 3 3 3 4 5 3 3 7 7 7 7 7 7 3 3 4 4 4 4 3 4 4 3 4 2 2 4 4 2 1 4 4 2 8 8 8 2 3 8 3 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 9 20 1 20 20 20 20 20 18 20 20 20 20 20 20 7 20 20 20 20 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 5 | ^
s262831676
p00875
Java
import java.util.*; public class Asia2009B_Ito{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); if(n == 0) break; String a[] = new String[n], b[] = new String[n]; for(int i=0;i<n;i++){ a[i] = sc.next(); b[i] = sc.next(); } ...
Main.java:3: error: class Asia2009B_Ito is public, should be declared in a file named Asia2009B_Ito.java public class Asia2009B_Ito{ ^ 1 error
s158509160
p00875
C++
#include<bits/stdc++.h> using namespace std; string sed(string s, string a, string b){ string res; int S = (int)s.size(); int A = (int)a.size(); int B = (int)b.size(); for(int i = 0; i < S; i++){ if(i + A > S){ res += s[i]; continue; } bool flag = t...
a.cc: In function 'int main()': a.cc:70:21: error: 'Srt' was not declared in this scope; did you mean 'Set'? 70 | Srt.insert(next); | ^~~ | Set
s300768582
p00875
C++
#include<iostream> #include<set> #include<algorithm> #include<queue> #include<string> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) string edge[10][2]; string substitute(string tar,string &from,string &to){ string ret; for(int i=0;i<tar.size();i++){ bool flag=true; ...
a.cc:58:2: error: unterminated argument list invoking macro "rep" 58 | } | ^ a.cc: In function 'std::string substitute(std::string, std::string&, std::string&)': a.cc:15:5: error: 'rep' was not declared in this scope 15 | rep(j,from.size() && i+j <tar.size() | ^~~ a.cc:15:8: error: expected '...
s913726857
p00876
C++
#include<iostream> #include<cmath> #include<algorithm> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define ALL(C) (C).begin(),(C).end() #define pb push_back const double MID = 1000; const double GOAL = 2000; const double eps = 1e-10; const d...
a.cc: In function 'int solve(int, std::vector<state>&)': a.cc:48:5: error: 'assert' was not declared in this scope 48 | assert(ans >0 && mint>0); | ^~~~~~ a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 4 | #include<vector> +++ |+...
s167865686
p00876
C++
#include <iostream> #include <vector> #include <queue> #include <utility> using namespace std; typedef pair<int, int> pii; struct Swimmer { int t, c, e; Swimmer(int t, int c, int e) : t(t), c(c), e(e) { } }; const int INF = 1000000000; int main(){ while(true){ int n; cin >> n; if(n == 0){ break; } vector<p...
a.cc: In function 'int main()': a.cc:24:17: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(input.begin(), input.end()); | ^~~~ | short
s511665487
p00877
Java
import java.awt.*; import java.util.*; import java.awt.geom.*; public class mattya_1203_1 { public static void main(String args[])throws Exception{ Scanner cin= new Scanner(System.in); int n,m; for(;;){ n=cin.nextInt(); m=cin.nextInt(); // System.out.printf("%d %d\n",n,m); if(n==0 && m==0) b...
Main.java:5: error: class mattya_1203_1 is public, should be declared in a file named mattya_1203_1.java public class mattya_1203_1 { ^ 1 error
s192686911
p00877
C++
#include <map> #include <set> #include <cmath> #include <ctime> #include <queue> #include <stack> #include <cstdio> #include <string> #include <vector> #include <cstring> #include <sstream> #include <iostream> #include <algorithm> #include <bitset> #include <climits> using namespace std; #define wh while #define FOR(i...
a.cc:61:5: error: expected unqualified-id before 'return' 61 | return A.x*B.x + A.y*B.y; | ^~~~~~ a.cc:62:1: error: expected declaration before '}' token 62 | } | ^ a.cc: In function 'bool OnSegment(const Point&, const Point&, const Point&)': a.cc:104:49: error: 'Dot' was not declared in this ...
s153106754
p00877
C++
#include <cmath> #include <cstdio> #include <vector> #include <cstring> #include <algorithm> using namespace std; #define wh while #define FOR(i, n) for(int i = 0; i < n; i++) #define REP(i,n) for(int i = 1; i <= n; i++) #define sf scanf #define pf printf #define PB(x) push_back(x) #define MP(x, y) make_pair(x, y) #de...
a.cc:52:5: error: expected unqualified-id before 'return' 52 | return A.x*B.x + A.y*B.y; | ^~~~~~ a.cc:53:1: error: expected declaration before '}' token 53 | } | ^ a.cc: In function 'bool OnSegment(const Point&, const Point&, const Point&)': a.cc:95:49: error: 'Dot' was not declared in this s...