submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s220707954
p00877
C++
#define _USE_MATH_DEFINES #include<iostream> #include<cstdio> #include<algorithm> #include<climits> #include<string> #include<vector> #include<list> #include<map> #include<set> #include<cmath> #include<queue> #include<cstring> #include<stack> using namespace std; #define EPS 1e-10 #define INF 1000000 struct Point{ ...
a.cc: In function 'int ccw(Point, Point, Point)': a.cc:80:14: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'? 80 | if(cross(v1,v2)>EPS) return +1; //a->b->c 縺悟渚譎りィ亥屓繧? if(cross(v1,v2)<-EPS) return -1; //a->b->c 縺梧凾險亥屓繧? if(dot(v1,v2)<-EPS) return +2; //c縺径-b繧医j蠕後m c<-a->b ...
s183250383
p00877
C++
#include "bits/stdc++.h" #pragma warning(disable:4996) using namespace std; /* 幾何の基本 */ #include <complex> typedef long double ld; typedef complex<ld> Point; #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() const ld eps = 1e-9, pi = acos(-1.0); const ld dtop = pi / 180.; const ld p...
a.cc: In function 'int main()': a.cc:552:9: error: jump to label 'a' 552 | a:0; | ^ a.cc:526:54: note: from here 526 | goto a; | ^ a.cc:532:25: note: crosses initialization of 'Polygo...
s797740446
p00877
C++
//?????????????????????????????? #include <iostream> #include <algorithm> #include <vector> #include <complex> using namespace std; typedef complex<double> Point; namespace std { bool operator < (const Point& a, const Point& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } } double cr...
a.cc: In function 'bool is_hit_line(Point, Point, Point, Point)': a.cc:66:28: error: cannot bind non-const lvalue reference of type 'Point&' {aka 'std::complex<double>&'} to an rvalue of type 'std::complex<double>' 66 | double u = cross(b - a, c - a) * cross(b - a, d - a); | ~~...
s952452523
p00877
C++
//?????????????????????????????? #include <iostream> #include <algorithm> #include <vector> #include <complex> using namespace std; typedef complex<double> Point; namespace std { bool operator < (const Point& a, const Point& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } } double cr...
a.cc: In function 'bool is_hit_line(Point, Point, Point, Point)': a.cc:66:28: error: cannot bind non-const lvalue reference of type 'Point&' {aka 'std::complex<double>&'} to an rvalue of type 'std::complex<double>' 66 | double u = cross(b - a, c - a) * cross(b - a, d - a); | ~~...
s923596377
p00877
C++
import java.awt.*; import java.util.*; import java.awt.geom.*; public class Main { public static void main(String args[])throws Exception{ Scanner cin= new Scanner(System.in); int n,m; Point2D.Double[] w = new Point2D.Double[200]; Point2D.Double[] b = new Point2D.Double[200]; for(;;){ n=cin.next...
a.cc:1:1: error: 'import' does not name a type 1 | import java.awt.*; | ^~~~~~ 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.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1:...
s224499294
p00877
C++
#include<iostream> #include<cfloat> #include<cassert> #include<cmath> #include<vector> using namespace std; #define EPS (1e-8) #define equals(a, b) (fabs((a) - (b)) < EPS ) #define dle(a, b) (equals(a, b) || a < b ) class Point{ public: double x, y; Point ( double x = 0, double y = 0): x(x), y(y){} ...
a.cc: In function 'Polygon andrewScan(Polygon)': a.cc:86:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 86 | sort(s.begin(), s.end()); | ^~~~ | sqrt a.cc:106:5: error: 'reverse' was not declared in this scope 106 | reverse(l.begin(), l.end()); | ^~~~~~~
s398900658
p00877
C++
#include <iostream> #include <vector> #include <complex> using namespace std; typedef complex<long long> P; inline P::value_type cross(const P& a, const P& b) { return a.real()*b.imag() - b.real()*a.imag(); } bool ok(const vector<P>& ps, int N, int i1, int i2) { const int NM = ps.size(); const int color = i1 < N;...
a.cc: In function 'int main()': a.cc:90:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'long long int') 90 | cin >> ps[i].real() >> ps[i].imag(); | ~~~ ^~ ~~~~~~~~~~~~ | | | | | long l...
s213667263
p00877
C++
#include <iostream> #include <vector> #include <complex> using namespace std; typedef complex<long long> P; inline P::value_type cross(const P& a, const P& b) { return a.real()*b.imag() - b.real()*a.imag(); } bool ok(const vector<P>& ps, int N, int i1, int i2) { const int NM = ps.size(); const int color = i1 < N;...
a.cc: In function 'int main()': a.cc:90:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'long long int') 90 | cin >> ps[i].real() >> ps[i].imag(); | ~~~ ^~ ~~~~~~~~~~~~ | | | | | long l...
s285932205
p00877
C++
#include<cmath> #include<algorithm> #include<iostream> #include<vector> using namespace std; double EPS = 1e-10; 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(){} point(double x,double y) : x(x) , y(y){} point operator - (po...
a.cc: In function 'int contain(point, std::vector<point>)': a.cc:59:15: error: 'DBL_MAX' was not declared in this scope 59 | double ymx=-DBL_MAX,ymn=DBL_MAX; | ^~~~~~~ a.cc:5:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>' 4 | #incl...
s907466024
p00877
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:170:1: error: jump to label 'show' 170 | show: | ^~~~ a.cc:107:30: note: from here 107 | goto show; | ^~~~ a.cc:117:22: note: crosses initialization of 'bool scrumbled' 117 | bool scrumbled=fa...
s635421757
p00878
C++
#include<iostream> #include<queue> #include<vector> #include<complex> 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 const double eps = 1e-10; const int N = 2000; typedef complex<double> P; bool adj[N][N]; bool up[N][N];//up[i][j] = 1 i >=j c...
a.cc: In function 'std::pair<std::complex<double>, std::complex<double> > make_line(P, P)': a.cc:79:11: error: lvalue required as left operand of assignment 79 | tmp.real()/=2;tmp.imag()/=2; | ~~~~~~~~^~ a.cc:79:25: error: lvalue required as left operand of assignment 79 | tmp.real()/=2;tmp.imag()/=2;...
s117027409
p00878
C++
#include<iostream> #include<queue> #include<vector> #include<complex> 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 const double eps = 1e-10; const int N = 2000; typedef complex<double> P; bool adj[N][N]; bool up[N][N];//up[i][j] = 1 i >=j bo...
a.cc: In function 'void Convex_cut(std::vector<std::complex<double> >, P&, P&, std::vector<std::complex<double> >&, std::vector<std::complex<double> >&)': a.cc:81:45: error: expected ')' before ';' token 81 | ori.pb(intersection_ll(now,next,a1,a2); | ~ ^ | ...
s000818402
p00879
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <map> #include <cctype> using namespace std; #define DEBUG(x) cerr << #x << " = " << x << endl typedef string::const_iterator Iter; struct Result { map<string, int> m; void add(const string& s, const int value) { m[s] += va...
a.cc: In function 'int main()': a.cc:116:18: error: no matching function for call to 'std::vector<Rational>::push_back(int&, int&)' 116 | b.push_back(kv.second, base); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/1...
s887716825
p00879
C++
#include <iostream> #include <string> #include <vector> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <cstdio> #include <cstdlib> #include <boost/rational.hpp> using namespace std; typedef unordered_map<string,long long> molecule; molecule dfs(const vector<string> &s,int L,int R){ mo...
a.cc:9:10: fatal error: boost/rational.hpp: No such file or directory 9 | #include <boost/rational.hpp> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated.
s212150032
p00879
C++
#include "inspect.hpp" #include <iostream> #include <string> #include <vector> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <cstdio> #include <cstdlib> using namespace std; typedef unordered_map<string,long long> molecule; long long gcd2(long long x,long long y){return y?gcd2(y,x%y):...
a.cc:1:10: fatal error: inspect.hpp: No such file or directory 1 | #include "inspect.hpp" | ^~~~~~~~~~~~~ compilation terminated.
s188424765
p00879
C++
#include<iostream> #include<string> #include<cmath> using namespace std; char equation[100]; int element[100][5]; int i,j,l,left_begin,left_end,right_begin,right_end,sum,sum_term,sum_term_left,sum_term_right,sum_element,present,aim,pre,ai,term,p,p1,p2,same,now,x,y,xx,xy,xz,t; int k,fenzi,fenmu,fz,fm,ii,t1,t2,tt,temp,f...
a.cc:35:1: error: stray '\1' in program 35 | <U+0001> while (true) { | ^~~~~~~~
s774745319
p00879
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> #include <string> #include <map> #include <set> using namespace std; typedef long long ll; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP(i, n) for ...
a.cc: In function 'int main()': a.cc:254:10: error: 'gets' was not declared in this scope; did you mean 'getw'? 254 | while (gets(str), str[0] != '.') { | ^~~~ | getw
s951280512
p00879
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> #include <string> #include <map> #include <set> using namespace std; typedef long long ll; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP(i, n) for ...
a.cc: In function 'int main()': a.cc:254:10: error: 'ggets' was not declared in this scope; did you mean 'fgets'? 254 | while (ggets(str, 9999, stdin), str[0] != '.') { | ^~~~~ | fgets
s226019462
p00879
C++
#include<vector> #include<string> #include<map> #include<fstream> #include<iostream> using namespace std; string str; map<string,int> Idx; int atom=0; int pos=0; int num=0; bool rev; vector<int> read(){ vector<int> res(atom,0); if(str.size()<=pos || str[pos]=='+' || str[pos]=='.' || str[pos]==')' || str[pos]=='-'){...
a.cc: In function 'int main()': a.cc:69:46: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int)' 69 | vector<vector<int> > v(atom,0); | ^ In file included from /usr/include/c++/14/vector:66, fro...
s777500830
p00879
C++
#include<vector> #include<string> #include<map> #include<fstream> #include<iostream> #include<math.c> using namespace std; string str; map<string,int> Idx; int atom=0; int pos=0; int num=0; bool rev; vector<int> read(){ vector<int> res(atom,0); if(str.size()<=pos || str[pos]=='+' || str[pos]=='.' || str[pos]==')' |...
a.cc:6:9: fatal error: math.c: No such file or directory 6 | #include<math.c> | ^~~~~~~~ compilation terminated.
s614951895
p00879
C++
#include<vector> #include<string> #include<map> #include<fstream> #include<iostream> #include<cmath> using namespace std; string str; map<string,int> Idx; int atom=0; int pos=0; int num=0; bool rev; vector<int> read(){ vector<int> res(atom,0); if(str.size()<=pos || str[pos]=='+' || str[pos]=='.' || str[pos]==')' ||...
a.cc: In function 'int main()': a.cc:70:46: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int)' 70 | vector<vector<int> > v(atom,0); | ^ In file included from /usr/include/c++/14/vector:66, fro...
s197424190
p00879
C++
#include<vector> #include<string> #include<map> #include<fstream> #include<iostream> #include<cstdlib> using namespace std; string str; map<string,int> Idx; int atom=0; int pos=0; int num=0; bool rev; vector<int> read(){ vector<int> res(atom,0); if(str.size()<=pos || str[pos]=='+' || str[pos]=='.' || str[pos]==')' ...
a.cc: In function 'int main()': a.cc:70:46: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int)' 70 | vector<vector<int> > v(atom,0); | ^ In file included from /usr/include/c++/14/vector:66, fro...
s251137280
p00879
C++
#include<vector> #include<string> #include<map> #include<fstream> #include<iostream> #include<cstdlib> using namespace std; string str; map<string,int> Idx; int atom=0; int pos=0; int num=0; bool rev; vector<int> read(){ vector<int> res(atom,0); if(str.size()<=pos || str[pos]=='+' || str[pos]=='.' || str[pos]==')' ...
a.cc: In function 'int main()': a.cc:70:47: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int)' 70 | vector< vector<int> > v(atom,0); | ^ In file included from /usr/include/c++/14/vector:66, f...
s486826024
p00879
C++
#include<vector> #include<string> #include<map> #include<fstream> #include<iostream> #include<cstdlib> using namespace std; string str; map<string,int> Idx; int atom=0; int pos=0; int num=0; bool rev; vector<int> read(){ vector<int> res(atom,0); if(str.size()<=pos || str[pos]=='+' || str[pos]=='.' || str[pos]==')' ...
a.cc: In function 'int main()': a.cc:70:47: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int)' 70 | vector< vector<int> > v(atom,0); | ^ In file included from /usr/include/c++/14/vector:66, f...
s898448146
p00879
C++
#include<vector> #include<string> #include<map> #include<fstream> #include<iostream> #include<cstdlib> using namespace std; string str; map<string,int> Idx; int atom=0; int pos=0; int num=0; bool rev; vector<int> read(){ vector<int>res(atom,0); if(str.size()<=pos || str[pos]=='+' || str[pos]=='.' || str[pos]==')' |...
a.cc: In function 'int main()': a.cc:70:46: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int)' 70 | vector< vector<int> >v(atom,0); | ^ In file included from /usr/include/c++/14/vector:66, fro...
s830239745
p00879
C++
#include<iostream> #include<vector> #include<string> #include<map> using namespace std; string S; map<string,int> M; int size; int pos=0; vector<vector<int> > V; bool rev; int gcd(int a, int b){ return a%b ? gcd(b, a%b) : b; } int lcm(int a, int b){ return a/gcd(a,b)*b; } vector<int> read(){ vector<int> res(size,0...
a.cc: In function 'std::vector<int> read()': a.cc:19:25: error: reference to 'size' is ambiguous 19 | vector<int> res(size,0); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /u...
s270187662
p00879
C++
/*?e?X?g*/
/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
s564522873
p00880
C
#include <iostream> #include <cmath> #include <iomanip> using namespace std; const double EPS = 1e-8; typedef pair<double, double> pt; #define x first #define y second double sq(double a) { return a * a; } double dist(pt p, pt q) { return sqrt(sq(p.x - q.x) + sq(p.y - q.y)); } bool equal(double x, double y) { ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s462533939
p00880
C
#include <iostream> #include <cmath> typedef std::pair<double,double> Point; #define x first #define y second double dist(Point a, Point b){ double x = a.x - b.x; double y = a.y - b.y; return sqrt(x*x+y*y); } int main(){ Point A; Point B; Point C; std::cin >> A.x >> A.y >> B.x >> B.y >> C.x >> C.y; whi...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s422432235
p00880
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <tuple> #include <queue> #include <stack> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <set> #include <numeric> #include <unordered_map> #includ...
a.cc: In function 'P is_ll(L, L)': a.cc:195:25: error: no match for 'operator*' (operand types are 'P' {aka 'std::complex<double>'} and 'ld' {aka 'long double'}) 195 | return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv); | ~~ ^ ~~~~~~~~~~~~~~~~~~~~ | | ...
s201513056
p00880
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <tuple> #include <queue> #include <stack> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <set> #include <numeric> #include <unordered_map> #includ...
a.cc: In function 'P is_ll(L, L)': a.cc:195:25: error: no match for 'operator*' (operand types are 'P' {aka 'std::complex<double>'} and 'ld' {aka 'long double'}) 195 | return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv); | ~~ ^ ~~~~~~~~~~~~~~~~~~~~ | | ...
s139052554
p00880
C++
// Taimur Azhar z5116684 // Prog Chal // Week 6 Problem A - Malfatti Circles #include <stdlib.h> #include <iostream> #include <cmath> using namespace std; struct Point{ double x,y; }p1,p2,p3,ic; double dist(Point p1,Point p2) { return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - ...
a.cc: In function 'int main()': a.cc:30:21: error: 'A' was not declared in this scope 30 | ic.x = (a * A.x + b * B.x + c * C.x) / (a + b + c); | ^ a.cc:30:31: error: 'B' was not declared in this scope 30 | ic.x = (a * A.x + b * B.x + c * C.x) / (a + b + c); | ...
s836005135
p00880
C++
// 2009ツアツジツアツ地ツ凝ヲツ予ツ選 G : Malfatti Circles #include <fstream> #include <complex> #include <stdio.h> using namespace std; const double EPS = 1e-12; typedef complex<double> P; struct L{ P p, q; L(P p, P q) : p(p), q(q) {} }; double cross(P a, P b) { return imag(conj(a)*b); } double lpDist(L l, P p){ return abs(cro...
a.cc: In function 'int main()': a.cc:27:15: error: 'cin' was not declared in this scope 27 | while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3){ | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <compl...
s419362528
p00881
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int m = sc.nextInt(); int n = sc.nextInt(); if (m == 0 && n == 0) break; boolean[][] dset = new boolean[n][m];...
Main.java:102: error: class, interface, enum, or record expected import java.util.*; ^ 1 error
s365877220
p00881
Java
import java.util.*; public class Main { static int minmin; public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int m = sc.nextInt(); int n = sc.nextInt(); if (m == 0 && n == 0) break; List<boolean[]>...
Main.java:143: error: reached end of file while parsing } ^ 1 error
s303289834
p00881
C++
#include <array> #include <algorithm> #include <bitset> #include <cstdlib> #include <iostream> #include <vector> using namespace std; template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; } constexpr int MAX_M = 11; int m, n; int memo[1 << MAX_M][1 << MAX_M]; int dfs(int used, int result, const v...
a.cc: In function 'int main()': a.cc:51:17: error: 'memset' was not declared in this scope 51 | memset(memo, -1, sizeof(memo)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <vector> ...
s359373746
p00881
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; #define INF (1 << 30) int b(string str){ int res = 0; for(int i = 0;i < str.size();i++){ res += (str[i] - '0') << i; } return res; } int num[108], n, m; int dp[1 << 11][1 << 11]; int solve(int asked, int answer){ int &res = dp[aske...
a.cc: In function 'int main()': a.cc:42:17: error: 'memset' was not declared in this scope 42 | memset(dp, -1 ,sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> +...
s684563365
p00881
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; #define INF (1 << 30) int b(string str){ int res = 0; for(int i = 0;i < str.size();i++){ res += (str[i] - '0') << i; } return res; } int num[108], n, m; int dp[1 << 11][1 << 11]; int solve(int asked, int answer){ int &res = dp[aske...
a.cc: In function 'int main()': a.cc:42:17: error: 'memset' was not declared in this scope 42 | memset(dp, -1 ,sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> +...
s814912597
p00881
C++
#include <iostream> #include <string> #include <vector> #include <map> #include <numeric> #include <algorithm> #include <cstdio> using namespace std; map<set<int>,int>memo; int M,N; vector<string>v; int dfs(set<int> &t){ if(t.size()==1)return 0; if(memo.find(t)!=memo.end())return memo[t]; int r=1<<30; for(int j=0;...
a.cc:9:5: error: 'set' was not declared in this scope 9 | map<set<int>,int>memo; | ^~~ a.cc:8:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 7 | #include <cstdio> +++ |+#include <set> 8 | using namespace std; a.cc:9:12: error: wrong number o...
s694981686
p00881
C++
#include <iostream> #include <string> #include <vector> #include <set> #include <map> #include <algorithm> #include <cstdio> using namespace std; map<set<int>,int>memo; int M,N; vector<string>v; int dfs(set<int> &t){ if(t.size()==1)return 0; if(memo.find(t)!=memo.end())return memo[t]; int r=1<<30; for(int j=0;j<M;...
a.cc: In function 'int dfs(std::set<int>&)': a.cc:19:50: error: 'class std::set<int>' has no member named 'push_back' 19 | for(auto &e:t)(v[e][j]=='0'?a:b).push_back(e); | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:29:28: error: no matching f...
s067035750
p00881
C++
#include <iostream> #include <string> #include <vector> #include <set> #include <map> #include <algorithm> #include <cstdio> using namespace std; map<set<int>,int>memo; int M,N; vector<string>v; int dfs(set<int> &t){ if(t.size()==1)return 0; if(memo.find(t)!=memo.end())return memo[t]; int r=1<<30; for(int j=0;j<M;...
a.cc: In function 'int dfs(std::set<int>&)': a.cc:19:50: error: 'class std::set<int>' has no member named 'push_back' 19 | for(auto &e:t)(v[e][j]=='0'?a:b).push_back(e); | ^~~~~~~~~
s165890252
p00881
C++
class in{struct It{int it;const bool rev;explicit constexpr It(int it_, bool rev=false):it(it_),rev(rev){}int operator*(){return it;}bool operator!=(It& r){return it!=r.it;}void operator++(){rev?--it:++it;}};const It i,n;public:explicit constexpr in(int n):i(0),n(n<0?0:n){}explicit constexpr in(int i,int n):i(i,n<i),n(...
a.cc: In function 'int main()': a.cc:24:9: error: 'function' was not declared in this scope 24 | function<int(int, int)> dfs = [&](int s1, int s2) { | ^~~~~~~~ a.cc:5:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>' 4 |...
s472959951
p00881
C++
#include <iostream> #include <numeric> #include <cstdlib> #include <climits> #include <cmath> #include <cstdio> #include <cfloat> #include <map> #include <utility> #include <set> #include <memory> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include ...
a.cc: In function 'int main()': a.cc:71:5: error: 'memset' was not declared in this scope 71 | memset(memo, -1, sizeof(memo)); | ^~~~~~ a.cc:18:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 17 | #include <queue> +++ |+#include <cstring>...
s232918179
p00881
C++
#include <iostream> #include <numeric> #include <cstdlib> #include <climits> #include <cmath> #include <cstdio> #include <cfloat> #include <map> #include <utility> #include <set> #include <memory> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include ...
a.cc: In function 'int main()': a.cc:72:5: error: 'memset' was not declared in this scope 72 | memset(memo, -1, sizeof(memo)); | ^~~~~~ a.cc:18:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 17 | #include <queue> +++ |+#include <cstring>...
s998846114
p00881
C++
#include <iostream> #include <vector> #include <string> using namespace std; // X Y int memo[2048];//[2048]; // 判定したか * それぞれのtrue or false = 判定最小回数 int m; // features int n; // objects vector<int> objects; int treeSearch(int X, int Y,const vector<int> & partObjectIds, int depth){ int minLeafDepth = depth...
a.cc: In function 'int treeSearch(int, int, const std::vector<int>&, int)': a.cc:25:53: error: conversion from '__normal_iterator<const int*,[...]>' to non-scalar type '__normal_iterator<int*,[...]>' requested 25 | for(vector<int>::iterator id=partObjectIds.begin(); id!=partObjectIds.end(); ++id){ | ...
s274167658
p00881
C++
#include <iostream> #include <vector> #include <string> using namespace std; // X Y int memo[2048];//[2048]; // 判定したか * それぞれのtrue or false = 判定最小回数 int m; // features int n; // objects vector<int> objects; int treeSearch(int X, int Y,const vector<int> & partObjectIds, int depth){ int minLeafDepth = depth...
a.cc: In function 'int main()': a.cc:56:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 56 | memset((void *)*memo, 0, sizeof(int)*2048*2048); | ^~~~~~~~~~~~~ a.cc:56:5: error: 'memset' was not declared in this scope 56 | memset((void *)*memo, 0, sizeof(...
s092637190
p00881
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <cstdio> using namespace std; // X Y int memo[2048];//[2048]; // 判定したか * それぞれのtrue or false = 判定最小回数 int m; // features int n; // objects vector<int> objects; int treeSearch(int X, int Y,const vector<int> & partObjectIds, i...
a.cc: In function 'int main()': a.cc:58:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 58 | memset((void *)*memo, 0, sizeof(int)*2048*2048); | ^~~~~~~~~~~~~ a.cc:58:5: error: 'memset' was not declared in this scope 58 | memset((void *)*memo, 0, sizeof(...
s496995605
p00883
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:133:62: error: cannot bind non-const lvalue reference of type 'vs&' {aka 'std::vector<std::__cxx11::basic_string<char> >&'} to an rvalue of type 'vs' {aka 'std::vector<std::__cxx11::basic_string<char> >'} 133 | vs &nf=change(n.f,y,x)...
s373472986
p00883
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:134:72: error: cannot bind non-const lvalue reference of type 'pii&' {aka 'std::pair<int, int>&'} to an rvalue of type 'std::pair<int, int>' 134 | node nnode(nf,make_pair(y,x)); | ...
s912560104
p00883
C++
#include <bits/stdc++.h> using namespace std; int n; bool onmp(int x,int y){return x>=0&&y>=0&&x<n&&y<n;} bool check(const vector<string> &A){ for(int i=0;i<n;i++) for(int j=0;j<n;j++)if(A[i][j]=='#')return 0; return 1; } int count(int x,int y,const vector<string> &A){ int res=0; for(int i=-1;i<=1;i++)...
a.cc: In function 'int bfs(std::vector<std::__cxx11::basic_string<char> >)': a.cc:51:5: error: 'pr' was not declared in this scope 51 | pr(A); | ^~
s735877879
p00883
C++
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <map> #include <fstream> #include <set> using namespace std; const int dy[]={-1,-1,-1,0,0,1,1,1}; const int dx[]={-1,0,1,-1,1,-1,0,1}; typedef pair<int,int> pii; typedef pair<int,pii> sit; int n; char field[6][6]; pii sp; int bfs(...
a.cc:75:9: error: expected unqualified-id before 'return' 75 | return -1; | ^~~~~~ a.cc:76:1: error: expected declaration before '}' token 76 | } | ^ a.cc: In function 'int bfs()': a.cc:74:9: warning: control reaches end of non-void function [-Wreturn-type] 74 | } | ...
s617164600
p00883
C++
#include <set> #include <deque> #include <algorithm> #include <queue> #include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <string> using namespace std; #define MP make_pair #define EXIST(s,e) ((s).find(e)!=(s).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0...
a.cc: In function 'int main()': a.cc:121:49: error: expected ';' before 'continue' 121 | if(EXIST(vsi,tb)continue; | ^~~~~~~~ a.cc:122:65: error: expected ')' before ';' token 122 | q.push_back(MP(t...
s651780104
p00884
Java
// Membership Management import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { int n = scanner.nextInt(); if (n == 0) break; String[] data = new String[n]; for (int i = 0; i < n; i++) data[i] = scanner.next(); ...
Main.java:19: error: illegal escape character String[] members = data[group].split("[:,\.]"); ^ 1 error
s129222837
p00884
Java
import java.util.HashSet; import java.util.List; import java.util.regex.Pattern; import java.io.*; public class ASA_A { public static void main(String[] args) { try { run(); }catch(IOException e) { System.out.println(e); } } private static void run() throws IOException{ int n; int input; String ...
Main.java:6: error: class ASA_A is public, should be declared in a file named ASA_A.java public class ASA_A { ^ 1 error
s430240127
p00884
Java
import java.util.*; import java.util.ArrayList; import java.io.*; public class P2010_Asia_B{ public static String reverse(String source) { StringBuffer dest = new StringBuffer(); for (int i = source.length() - 1; i >= 0; i--) dest.append(source.charAt(i)); return dest.toString()...
Main.java:5: error: class P2010_Asia_B is public, should be declared in a file named P2010_Asia_B.java public class P2010_Asia_B{ ^ 1 error
s920473350
p00884
Java
// Membership Management import java.util.*; public class Main2 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { int n = scanner.nextInt(); if (n == 0) break; String[][] data = new String[n][]; for (int i = 0; i < n; i++) { String str = scanne...
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s680922375
p00884
C
#include<iostream> #include<cstdlib> #include<cstring> #include<cstdio> #include<cmath> #include<ctime> #include<algorithm> #include<list> #include<queue> #include<stack> #include<vector> #include<set> #include<map> #include<string> #define REP(it,end) for (int it = 1; it <= (end); it++) #define FOR(it,begin,end) for (...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s586588765
p00884
C++
// Membership Management import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { int n = scanner.nextInt(); if (n == 0) break; String[][] data = new String[n][]; for (int i = 0; i < n; i++) data[i] = scanner.next...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s511662010
p00884
C++
2 development:alice,bob,design,eve. design:carol,alice. 3 one:another. another:yetanother. yetanother:dave. 3 friends:alice,bob,bestfriends,carol,fran,badcompany. bestfriends:eve,alice. badcompany:dave,carol. 5 a:b,c,d,e. b:c,d,e,f. c:d,e,f,g. d:e,f,g,h. e:f,g,h,i. 4 aa:bb. cc:dd,ee. ff:gg. bb:cc. 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^
s547818272
p00884
C++
#include<bits/stdc++.h> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) map<string, vector<string>> data; string startkey; bool input(){ data.clear(); int n; cin>>n; if(n==0)return false; rep(i,n){ string str; cin>>str; string key; vector<...
a.cc: In function 'bool input()': a.cc:13:3: error: reference to 'data' is ambiguous 13 | data.clear(); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, ...
s215821464
p00884
C++
#include<bits/stdc++.h> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) map<string, vector<string>> data; string startkey; bool input(){ data.clear(); int n; cin>>n; if(n==0)return false; rep(i,n){ string str; cin>>str; string key; vector<...
a.cc: In function 'bool input()': a.cc:13:3: error: reference to 'data' is ambiguous 13 | data.clear(); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, ...
s139482895
p00884
C++
#include <bits/stdc++.h> using namespace std; #define for_(i,a,b) for(int i=a;i<b;++i) #define allof(a) a.begin(),a.end() #define minit(a,b) memset(a,b,sizeof(a)) typedef long long lint; typedef pair<int, int> pii; int n; string group[110]; vector<string> split_all(string s, string t) { vector<string> res; for (i...
a.cc:26:18: error: 'int link [110][110]' redeclared as different kind of entity 26 | int link[110][110]; | ^ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c++/14/csignal:42, ...
s702888119
p00884
C++
#include <bits/stdc++.h> using namespace std; #define for_(i,a,b) for(int i=a;i<b;++i) #define allof(a) a.begin(),a.end() #define minit(a,b) memset(a,b,sizeof(a)) typedef long long lint; typedef pair<int, int> pii; int n; string group[110]; vector<string> split_all(string s, string t) { vector<string> res; for (i...
a.cc:26:18: error: 'int link [110][110]' redeclared as different kind of entity 26 | int link[110][110]; | ^ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c++/14/csignal:42, ...
s695198623
p00884
C++
#include <vector> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <bitset> #include <climits> #define all(c) (c).begin(), (c).end() #define rep(i,n) for(int i=0;i<(n);i++) #define pb(e) push_back(e) #define mp(a, b) make_pair(a, b) #define fr first #define sc second const int ...
a.cc: In function 'void solve()': a.cc:58:5: error: 'cin' was not declared in this scope 58 | cin>>s; | ^~~ a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 8 | #include <climits> +++ |+#include <iostream> 9 | a.cc:78:5: e...
s236207930
p00884
C++
#include <vector> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <bitset> #include <climits> #define all(c) (c).begin(), (c).end() #define rep(i,n) for(int i=0;i<(n);i++) #define pb(e) push_back(e) #define mp(a, b) make_pair(a, b) #define fr first #define sc second const int ...
a.cc: In function 'void solve()': a.cc:58:5: error: 'cin' was not declared in this scope 58 | cin>>s; | ^~~ a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 8 | #include <climits> +++ |+#include <iostream> 9 | a.cc:78:5: e...
s069338433
p00884
C++
#include <vector> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <bitset> #include <climits> #define all(c) (c).begin(), (c).end() #define rep(i,n) for(int i=0;i<(n);i++) #define pb(e) push_back(e) #define mp(a, b) make_pair(a, b) #define fr first #define sc second const int ...
a.cc: In function 'void solve()': a.cc:58:5: error: 'cin' was not declared in this scope 58 | cin>>s; | ^~~ a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 8 | #include <climits> +++ |+#include <iostream> 9 | a.cc:78:5: e...
s996987642
p00884
C++
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <vector> #include <queue> #include <cmath> #include <stack> #include <map> #include <set> using namespace std; set<string>st; map<string,int>mp; bool vis[105] char s[1111111]; struct group { int cnt; char member[11][20],name[...
a.cc:15:1: error: expected initializer before 'char' 15 | char s[1111111]; | ^~~~ a.cc: In function 'void dfs(int)': a.cc:23:8: error: 'vis' was not declared in this scope 23 | if(vis[id]) return ; | ^~~ a.cc:24:5: error: 'vis' was not declared in this scope 24 | vis[id]=1; | ...
s398432393
p00884
C++
#include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <cstring> #include <vector> #include <cmath> #include <queue> #include <map> using namespace std; vector <string>ans; vector <string>m[150]; map<string ,int >index; int vis[1500]; int n; char s[150000]; char tmp[1500]; void gao(i...
a.cc:13:18: error: 'std::map<std::__cxx11::basic_string<char>, int> index' redeclared as different kind of entity 13 | map<string ,int >index; | ^~~~~ In file included from /usr/include/string.h:462, from a.cc:4: /usr/include/strings.h:50:20: note: previous declaration 'const ...
s148114387
p00884
C++
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <algorithm> #include <queue> #include <vector> #include <stack> #include <string.h> #include <cstdio> #include <set> #include <map> #include <string> #include <iostream> #include <sstream> #define mod 1e9+7 using namespace std; int n,i,j,k,m,num,b[1005]=...
a.cc: In function 'int ds(int)': a.cc:24:15: error: expected ';' before 'for' 24 | b[x]=1 | ^ | ; 25 | for(int i=1;i<=mp[x][0];i++) ds(mp[x][i]); | ~~~ a.cc:25:36: error: expected ';' before ')' token 25 | for(int i=1;i<=mp[x][0]...
s593795652
p00884
C++
#include <stdio.h> #include <iostream> #include <iterator> #include <vector> #include <set> #include <map> #include <string> #include <algorithm> #include <functional> void pushset( std::map< std::string, std::vector< std::string > > *mp, std::set< std::string > *ans, std::string name, std::set< std::string > *group, ...
a.cc: In function 'int solve()': a.cc:49:23: error: 'strtok' was not declared in this scope; did you mean 'strtoq'? 49 | tok = strtok( tstr, ":,."); | ^~~~~~ | strtoq
s535663466
p00884
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <cmath> #include <queue> #include <vector> #include <map> #include <string> #include <set> using namespace std; int vis[1000]; map<string,int> ma; int Sum = 0; int Vis; string s; set<int> se; vector<int> v[1000]; int tt; char ch[1000...
a.cc: In function 'int main()': a.cc:46:13: error: 'gets' was not declared in this scope; did you mean 'getw'? 46 | gets(ch); | ^~~~ | getw
s330767070
p00884
C++
#include<iostream> #include<string> #include<vector> #include<queue> #include<algorithm> using namespace std; #define MAX_N 10000 queue<int>Q; int n; string S,T; int C[MAX_N]; int used[MAX_N]; string GR[MAX_N]; vector<int>Y[MAX_N]; vector<string>X[MAX_N]; vector<string>P; vector<string>B; int main(){ while(true){ ...
a.cc: In function 'int main()': a.cc:69:35: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'push_bacK'; did you mean 'push_back'? 69 | B.push_bacK(P); | ^~~~~~~~~ | push_...
s357695608
p00884
C++
4 1 6 4 2 10 10 10 10 10 10 10 1 901 1 10 20 15 21 95 38 46 34 82 13 5 32 120 6 15 32 25 3 2 17 71
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s235008388
p00884
C++
#include<map> #include<string> #include<vector> #include<sstream> #include<iostream> #define pb push_back #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; map< string,vector<string> > f; vector<string> solve(const string &g){ vector<string> member=f[g]; rep(i,member.size())if(f.count(member[i])>0){ ...
a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > solve(const std::string&)': a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(member.begin(),member.end()); | ^~~~ | short a.cc:23:22: error: 'unique' was not declared in this ...
s460705305
p00884
C++
#include <iostream> #include <sstream> #include <string> #include <map> #include <set> using namespace std; map<string,string> m; set<string> parsed; set<string> result; void dfs(string s){ if(parsed.count(s)) return; parsed.insert(s); string tbp = m[s]; //to be parsed for(int i=0; i<tbp.size(); i++) ...
a.cc:64:20: error: redefinition of 'std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > m' 64 | map<string,string> m; | ^ a.cc:9:20: note: 'std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > m' previously declared here 9 | map<string,s...
s090471131
p00885
C++
#include"bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>; #define FOR(k,m,n) for(ll (k)=(m);(k)<(n);(k)++) #define REP(i,n) FOR((i),0,(n)) #define WAITING(str) int str;std::cin>>str; #define DEBUGING(str) cout<< #str << " " str<<en...
a.cc: In function 'int main()': a.cc:65:9: error: jump to label 'end' 65 | end:; | ^~~ a.cc:60:38: note: from here 60 | goto end; | ^~~ a.cc:63:21: note: crosses initialization of 'int res' 63 | ...
s055179594
p00885
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc: In function 'int main()': a.cc:64:23: error: no matching function for call to 'std::priority_queue<state>::push(<brace-enclosed initializer list>)' 64 | P.push({ 0, 0, 0, 0 }); | ~~~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/queue:66, fr...
s740883065
p00885
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb...
a.cc: In function 'int main()': a.cc:64:17: error: jump to label 'end' 64 | end:; | ^~~ a.cc:58:38: note: from here 58 | goto end; | ^~~ a.cc:61:21: note: crosses initialization of 'int out' 61 ...
s029980456
p00885
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb...
a.cc: In function 'int main()': a.cc:64:17: error: jump to label 'en' 64 | en:; | ^~ a.cc:58:38: note: from here 58 | goto en; | ^~ a.cc:61:21: note: crosses initialization of 'int out' 61 | ...
s253910519
p00885
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb...
a.cc: In function 'int main()': a.cc:64:17: error: jump to label 'end' 64 | end:; | ^~~ a.cc:58:38: note: from here 58 | goto end; | ^~~ a.cc:61:21: note: crosses initialization of 'int out' 61 ...
s409267381
p00885
C++
#include<bits/stdc++.h> #define INF 0x3f3f3f3f #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; typedef pair<int, int>P; int dp[41][4], p[41], t[41]; int main() { int n; while (scanf("%d", &n), n) { rep(i, n) scanf("%d%d", &p[i + 1], &t[i + 1]); memset(dp, 0x3f, sizeof(dp)); dp[0][0] = 0; rep(i, n...
a.cc: In function 'int main()': a.cc:35:9: error: jump to label 'g' 35 | g:; | ^ a.cc:29:60: note: from here 29 | printf("NG %d\n", i); goto g; | ^ a.cc:32:21: note: crosses initialization of...
s952442896
p00885
C++
#include <bits/stdc++.h> using namespace std; const int INF = 1e9; // dp[i][j] := i??????????¢¨????????§?????????, j????¢¨???????????£???????????¨?????????????????¢ int dp[50][5]; void solve(const int n, const vector<int> & p, const vector<int> & t) { for (int i = 0; i < 50; ++i) for (int j = 0; j < 5; ++j) dp[i][j...
a.cc: In function 'void solve(int, const std::vector<int>&, const std::vector<int>&)': a.cc:30:41: error: 'chmin' was not declared in this scope 30 | chmin(dp[i][j + 1], dp[i - 1][j] + dist); | ^~~~~ a.cc:38:37: error: 'chmin' was ...
s965225991
p00885
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:94:17: error: jump to label 'next' 94 | next:; | ^~~~ a.cc:84:38: note: from here 84 | goto next; | ^~~~ a.cc:88:21: note: crosses initialization of 'int ans' ...
s036593238
p00886
C++
#include <iostream> #include <vector> #include <set> using namespace std; int n; int d[190], c[401]; int t[20][20]; set< vector<int> > S; void search(int L, int R){ if(L+1==R){ vector<int> v; for(int i=0;i+1<n;i++) v.push_back(t[i][i+1]); S.insert(v); return ; } int idx = 0; while(c[d[idx]]==0) idx++;...
a.cc: In function 'int main()': a.cc:52:17: error: 'memset' was not declared in this scope 52 | memset(c, 0, sizeof(c)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <set> +++ |+#in...
s287650788
p00886
C++
#include <iostream> #include <vector> #include <set> using namespace std; int n; int d[190], c[401]; int t[20][20]; set< vector<int> > S; void search(int L, int R){ if(L+1==R){ vector<int> v; for(int i=0;i+1<n;i++) v.push_back(t[i][i+1]); S.insert(v); return ; } int idx = 0; while(c[d[idx]]==0) idx++;...
a.cc: In function 'int main()': a.cc:52:17: error: 'memset' was not declared in this scope 52 | memset(c, 0, sizeof(c)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <set> +++ |+#in...
s943243338
p00886
C++
#include <iostream> #include <fstream> #include <vector> #include <set> using namespace std; int n; int d[190], c[401]; int t[20][20]; set< vector<int> > S; int abs(int x){ x > 0 ? x : -x; } void search(int L, int R){ if(L+1==R){ vector<int> v; for(int i=0;i+1<n;i++) v.push_back(t[i][i+1]); S.insert(v); ...
a.cc: In function 'int abs(int)': a.cc:13:33: warning: no return statement in function returning non-void [-Wreturn-type] 13 | int abs(int x){ x > 0 ? x : -x; } | ^ a.cc: In function 'int main()': a.cc:55:17: error: 'memset' was not declared in this scope 55 | ...
s358304277
p00887
Java
import java.util.*; public class D{ int n,m,d; public void run(){ Scanner cin = new Scanner(System.in); while(true){ m = cin.nextInt(); n = cin.nextInt(); d = cin.nextInt(); if(m==0) break; int i,j,k,l; int[] board = new int[n * m]; for(i=0;i<n;i++){ for(j=0;j<m;j++){ board[i * m + ...
Main.java:3: error: class D is public, should be declared in a file named D.java public class D{ ^ 1 error
s022053933
p00887
C++
#include <vector> #include <bitset> #include <iostream> #include <algorithm> #define coor(i,j) ((i)+(j)*m) #define in(i,j) (0<=(i)&&(i)<m&&0<=(j)&&(j)<n) using namespace std; vector<bitset<626> > M(625); int main(){ int m,n,d; int i,j,k; int success,ans; for(;cin>>m>>n>>d,d;cout<<ans<<endl){ //create M for(j=0...
a.cc:48:1: error: expected declaration before '}' token 48 | } | ^
s863718094
p00888
C++
#include <cassert> #include <cmath> #include <cstdlib> #include <functional> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; constexpr double EPS = 1e-8; struct state { double a, b; state(double a_, double b_):a(a_), b(b_) {} bool operator<(const state &s) const { ret...
a.cc: In function 'double dijkstra(const std::vector<int>&, const std::vector<int>&)': a.cc:52:44: error: 'upper_bound' was not declared in this scope 52 | const int curr_a = upper_bound(begin(x), end(x), static_cast<int>(a)) - begin(x) - 1; | ...
s311765390
p00888
C++
#include <queue> #include <set> #include <unordered_set> #include <cstdio> #include <cstdlib> using namespace std; typedef pair<int,int> pii; /// pair<int,int> hasher namespace std{ template<typename I> class hash<pair<I,I>>{ public: size_t operator()(const pair<I,I> &p) const {return hash<long long>() (((long l...
a.cc: In function 'double solve(const std::vector<std::pair<int, int> >&)': a.cc:61:43: error: 'hypot' was not declared in this scope 61 | q.push({c-hypot(mx[l]-mx[l+i],my[l]-my[l+i])-hypot(mx[r]-mx[r+j],my[r]-my[r+j]),{l+i,r+j}}); | ^~~...
s232482474
p00888
C++
#include <queue> #include <set> #include <unordered_set> #include <cstdio> #include <cstdlib> using namespace std; typedef pair<int,int> pii; /// pair<int,int> hasher namespace std{ template<typename I> class hash<pair<I,I>>{ public: size_t operator()(const pair<I,I> &p) const {return hash<long long>() (((long l...
a.cc: In function 'double solve(const std::vector<std::pair<int, int> >&)': a.cc:60:62: error: 'fabs' was not declared in this scope; did you mean 'labs'? 60 | if(0<=l+i&&l+i<m && 0<=r+j&&r+j<m && fabs(my[l+i]-my[r+j])<1e-9) | ...
s784398548
p00888
C++
#include <iostream> #include <queue> #include <vector> #include <cmath> using namespace std; using pii = pair<int, int>; constexpr double INF = (1LL << 55); double dist(double x1, double y1, double x2, double y2) { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); } struct State { double d; in...
a.cc: In function 'int main()': a.cc:101:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 101 | sort(v.begin(), v.end()); | ^~~~ | sqrt a.cc:102:17: error: 'unique' was not declared in this scope 102 | v.erase(unique(v.begin(), v.end()), v.end()); ...
s134219705
p00888
C++
#include <bits/stdc++.h> using namespace std; const double INF = 1e20; typedef tuple< double, int, int > Pi; int main() { int N, A[100], B[100]; while(cin >> N, N) { vector< int > height; for(int i = 0; i < N; i++) { cin >> A[i] >> B[i]; height.push_back(B[i]); } sort(begin(h...
a.cc: In function 'int main()': a.cc:37:47: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = double; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const s...
s678040110
p00888
C++
#include<map> #include<cmath> #include<queue> #include<cstdio> #include<vector> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; typedef pair<double,double> pdd; const double EPS=1e-9; int n,x[100],y[100]; struct Pos{ double a,b; Pos(double A,double B):a(A),b(B){} bool operator<(const Pos &p)const{...
a.cc: In function 'double height(double)': a.cc:71:9: error: 'assert' was not declared in this scope 71 | assert(0); | ^~~~~~ a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 4 | #include<cstdio> +++ |+#include <cassert> ...
s093348443
p00889
C++
#include <vector> #include <map> #include <cstdio> using namespace std; vector<int> a; int N,S,W,Q,g,i; int hard(){ int answer = 0, base = 1, sum = 0 map<int,int> freq; freq[0] = 1; for(i=a.size()-1; i>=0; i--){ sum = (a[i]*base + sum) % Q; base = (base*10) % Q; if(a[i])answer += freq[sum]; freq[sum] ++; }...
a.cc: In function 'int hard()': a.cc:9:9: error: expected ',' or ';' before 'map' 9 | map<int,int> freq; | ^~~ a.cc:10:9: error: 'freq' was not declared in this scope 10 | freq[0] = 1; | ^~~~ a.cc: At global scope: a.cc:27:1: warning: ISO C++ forbids declaration of 'ma...
s659693025
p00890
C++
#include<iostream> #include<vector> using namespace std; int n,m,c; const int M=100000001; void solve(){ int res=0; int dp[100][100]; int cost[100][100]; memset(cost,-1,sizeof(cost)); memset(dp,M,sizeof(dp)); for(int i=0;i<m;i++){ int in,out; cin>>in>>out; in--;out--; cin>>cost[in][out]; } bool updat...
a.cc: In function 'void solve()': a.cc:12:9: error: 'memset' was not declared in this scope 12 | memset(cost,-1,sizeof(cost)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <c...
s710304413
p00890
C++
#include <vector> #include <algorithm> #include <utility> #include <queue> #include <cstdio> #include <iostream> #include <string> #include <stdio.h> using namespace std; typedef pair<int, int> PII; typedef pair<int, PII> TIII; #define PB push_back #define MP make_pair #define MT(a,b,c) MP(a, MP(b, c)) #define T1 firs...
a.cc: In function 'int main()': a.cc:29:17: error: 'memset' was not declared in this scope 29 | memset(memo, -1, sizeof(memo)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <iostream>...
s739523010
p00891
C++
#include <bitset> #include <cstdlib> #include <iostream> #include <unordered_map> #include <vector> using namespace std; string convert[128]; inline string to_binary_string(int x) { return bitset<6>(x).to_string(); } inline void init() { for(int i = 0; i < 26; ++i) { convert['A' + i] = to_binary_string(i); con...
a.cc: In function 'int main()': a.cc:130:48: error: 'reverse' was not declared in this scope 130 | for(auto &s : pattern) reverse(begin(s), end(s)); | ^~~~~~~
s876184251
p00891
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; vector<vector<int>>mirror(vector<vector<int>>from) { vector<vector< int>>to(from.size(), vector< int>(from...
a.cc: In function 'int main()': a.cc:162:41: error: 'else' without a previous 'if' 162 | else { | ^~~~
s323333845
p00891
C++
#include <bits/stdc++.h> using namespace std; #define MAX 1001 #define MAX_T 12 typedef unsigned long long ull; int N,M,P; char field[MAX][MAX],patterns[MAX_T][MAX][MAX]; char pattern[MAX][MAX],tmp2[MAX][MAX]; set<ull> st; ull hash[MAX][MAX],tmp[MAX][MAX]; void compute_hash(char a[MAX][MAX],int n,int m){ ...
a.cc: In function 'void compute_hash(char (*)[1001], int, int)': a.cc:40:13: error: reference to 'hash' is ambiguous 40 | 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, f...