submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s589330959
p01416
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { new CopyOfMain().run(); return; } Scanner scanner = new Scanner(System.in); int m; int[][][] tile = new int[26][2][2]; boolean[] cantGet =new boolean[26]; int score = 0; void run() { m = scanner.nextInt(); ...
Main.java:7: error: cannot find symbol new CopyOfMain().run(); ^ symbol: class CopyOfMain location: class Main 1 error
s516073135
p01416
C++
#include <cstdio> #include <cstring> #include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; typedef pair<int,int> P; int m,n; vector<P> data[30]; vector<int> xindex; vector<int> yindex; int field[180][180]; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int pickl[4]; int picklx...
a.cc: In function 'int main()': a.cc:29:33: error: reference to 'data' is ambiguous 29 | data[str[j]-'A'+1].push_back(P(j,i)); | ^~~~ In file included from /usr/include/c++/14/string:53, from a.cc:3: /usr/include/c++/14/bits/range...
s105879699
p01416
C++
#include <cstdio> #include <cstring> #include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; typedef pair<int,int> P; int m,n; vector<P> data[30]; vector<int> xindex; vector<int> yindex; int field[250][250]; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int pickl[4]; int picklx...
a.cc: In function 'int main()': a.cc:24:16: error: 'fie' was not declared in this scope 24 | memset(fie,0,sizeof(fie)); | ^~~ a.cc:30:33: error: reference to 'data' is ambiguous 30 | data[str[j]-'A'+1].push_back(P(j,i)); | ...
s949478911
p01416
C++
#include <cstdio> #include <cstring> #include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; typedef pair<int,int> P; int m,n; vector<P> data[30]; vector<int> xind; vector<int> yind; int field[190][190]; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int pickl[4]; int picklx[4];...
a.cc: In function 'int main()': a.cc:30:33: error: reference to 'data' is ambiguous 30 | data[str[j]-'A'+1].push_back(P(j,i)); | ^~~~ In file included from /usr/include/c++/14/string:53, from a.cc:3: /usr/include/c++/14/bits/range...
s480681180
p01416
C++
#include <iostream> #include <vector> #include <tuple> using namespace std; using T=tuple<int,int,char>; int main(){ int M,N; cin>>M>>N; vector<T> V; for(int i=0;i<M;i++){ for(int j=0;j<N;j++){ char c; cin>>c; if(c!='.'){ V.emplace_back(j,i,c);...
a.cc: In function 'int main()': a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(X.begin(), X.end()); | ^~~~ | short a.cc:28:13: error: 'unique' was not declared in this scope 28 | X.erase(unique(X.begin(), X.end()),X.end()); | ...
s802238099
p01416
C++
#include<iostream> using namespace std; int main(){ int n; string s; int n,m; cin >> n >> m; cerr << n << m << endl; for(int i=0;i<n;i++){ cin >> s; cerr << s << endl; } cout << "3" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: redeclaration of 'int n' 9 | int n,m; | ^ a.cc:6:7: note: 'int n' previously declared here 6 | int n; | ^
s639269516
p01416
C++
#include<iostream> using namespace std; int main(){ int n; string s; int n,m; while(cin >> n >> m){ cerr << n << m << endl; for(int i=0;i<n;i++){ cin >> s; cerr << s << endl; } cout << "3" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: redeclaration of 'int n' 9 | int n,m; | ^ a.cc:6:7: note: 'int n' previously declared here 6 | int n; | ^
s763491111
p01417
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; public class Main{ static PrintWriter out...
Main.java:19: error: incompatible types: int[][] cannot be converted to double[][] double[][] c=new int[n][3]; ^ 1 error
s120825337
p01417
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; public class Main{ static PrintWriter out...
Main.java:42: error: cannot find symbol DecimalFormat df=new DecimalFormat("0.000000000"); ^ symbol: class DecimalFormat location: class Main Main.java:42: error: cannot find symbol DecimalFormat df=new DecimalFormat("0.000000000"); ^ symbol: class DecimalFormat location: class Main...
s729113948
p01417
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:31: error: ';' expected double d=0.0 ^ 1 error
s719990013
p01417
C++
#include <iostream> #include <vector> #define MAX(a,b) ((a>b)?a:b) using namespace std; struct ds{ float L; float a; float b; }; int main(){ auto f = [](float x,float y,float z){return x*x+y*y+z*z;}; int i,j,N,M; vector<ds> cls; cin>>N>>M; for(i=0;i<N;i++){ struct ds buf; ...
a.cc: In function 'int main()': a.cc:37:12: error: 'next_permutation' was not declared in this scope 37 | }while(next_permutation(tg.begin(),tg.end())); | ^~~~~~~~~~~~~~~~
s108944394
p01417
C++
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstring> #include <cmath> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> usi...
a.cc: In function 'int main()': a.cc:61:2: error: expected '}' at end of input 61 | } | ^ a.cc:33:12: note: to match this '{' 33 | int main() { | ^
s619224558
p01417
C++
#include <cstdio> #include <cstdlib> #include <utility> #include <typeinfo> #include <cmath> #include <numeric> #include <algorithm> #include <iostream> #include <sstream> #include <iomanip> #include <vector> #include <string> #define REP(i,n) for(int i=0;i<n;i++) typedef long long ll; using namespace std; typedef vect...
a.cc: In function 'int main()': a.cc:68:2: error: expected '}' at end of input 68 | } | ^ a.cc:22:1: note: to match this '{' 22 | { | ^
s035169242
p01417
C++
import java.io.*; import java.util.*; public class Main { FastScanner in = new FastScanner(System.in); PrintWriter out = new PrintWriter(System.out); long[][] pascalTriangleLong(int n) { long[][] res = new long[n+1][n+1]; res[0][0] = 1; for (int i = 1; i <= n; i++) { for (int j = 0; j <= i; j++) { ...
a.cc:3:1: error: 'import' does not name a type 3 | import java.io.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.util.*; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: ...
s053839362
p01417
C++
from itertools import combinations as comb def cube_dist(a,b): return sum([(a[i]-b[i])**2 for i in range(3)]) def cal_total_dist(t): if len(t) == 1: return 0 return sum([cube_dist(ca,cb) for ca, cb in comb(t,2)]) N, M = map(int,raw_input().split()) color = [tuple(map(float,raw_input().split())) for i in range(N)]...
a.cc:1:1: error: 'from' does not name a type 1 | from itertools import combinations as comb | ^~~~
s149129581
p01417
C++
#include<iostream>I don't know #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;} string itos(int x){stringstream ss;ss<<x;return ss.str();} double ta[300][3]; b...
a.cc:1:21: warning: extra tokens at end of #include directive 1 | #include<iostream>I don't know | ^~~ a.cc:1:24: warning: missing terminating ' character 1 | #include<iostream>I don't know | ^ a.cc:1:9: fatal error: iostream>: No such file or directory ...
s916535436
p01417
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; vector<double> l(n),a(n),b(n); for(int i=0;i<n;i++) cin>>l[i]>>a[i]>>b[i]; double res=0; int comb=(1<<m)-1; while(comb<1<<n){ double sum=0; vector<int> us...
a.cc: In function 'int main()': a.cc:35:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 35 | int main(){ | ^~ a.cc:35:9: note: remove parentheses to default-initialize a variable 35 | int main(){ | ^~ | -- a.cc:35:9: note: or re...
s062845014
p01417
C++
#include<bits/stdc++.h> #define r(i,a,n) for(int i=a;i<n;i++) double a[21][3],ans=0,p;int n,m,c[21]; using namespace std; double cal(){p=0; r(i,0,m)r(j,i+1,m) p+=pow(a[c[i]][0]-a[c[j]][0],2)+pow(a[c[i]][1]-a[c[j]][1],2)+pow(a[c[i]][2]-a[c[j]][2],2); ans=max(ans,p); } void dfs(int x,int d){ if(d==m){cal();return...
a.cc: In function 'double cal()': a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type] 9 | } | ^ a.cc: In function 'int main()': a.cc:16:12: error: expected ';' before 'for' 16 | cin>>n>>m | ^ | ; a.cc:17:7: error: 'i' was not declared in...
s248170518
p01417
C++
#include<iostream> #include<algorithm> #include<iomanip> using namespace std; int n,m; double a[20][3],d[20][20]; int main(){ cin>>n>>m; for(int i=0;i<n;i++){ for(int j=0;j<3;j++)cin>>a[i][j]; for(int j=0;j<i;j++){ double cnt=0.0; for(int k=0;k<3;k++)cnt+=(a[i][k]-a[j][k])*(a[i][k]-a[j][k]); d[i][j]=cnt,...
a.cc: In function 'int main()': a.cc:17:20: error: 'memset' was not declared in this scope 17 | bool b[20];memset(b,0,n); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<iomanip> +++ |+#inc...
s868546645
p01417
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <bitset> #include <cstring> using namespace std; #define FOR(I,A,B) for(int I...
a.cc: In function 'int main()': a.cc:34:19: error: invalid types 'double [N][__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}]' for array subscript 34 | mx += (L[v[k]] - L[v[j]]) * (L[v[k]] - L[v[j]]); | ^ a.cc:34:29: error: invalid types 'double [N...
s978119306
p01417
C++
Z:~/contest$ ./a.out 3 3 5 ... .## ..# 1 1 1 1 0 0 1 1 0 3 3 3 3 0 0 3 3 0 5 4 5 4 0 0 5 4 0 1 0 2 1 0 2 2 0 0 0 x y is 2 1 Time is 1 res is 3 x y is 3 1 Time is 2 res is 6 x y is 3 2 Time is 3 res is 9 x y is 3 1 Time is 4 res is 11 x y is 2 1 Time is 5 res is 15 x y is 1 1 Time is 6 res is 18 x y is 1 2 Time is 7 res...
a.cc:4:2: error: stray '##' in program 4 | .## | ^~ a.cc:5:3: error: stray '#' in program 5 | ..# | ^ a.cc:1:1: error: 'Z' does not name a type 1 | Z:~/contest$ ./a.out | ^
s009551998
p01417
C++
#include <stdio.h> #include <string.h> #include <math.h> #include <algorithm> using namespace std; typedef double db; const db PI = acos(-1.0); const db G = 9.8; struct box{ db s,t; box(){}box(db s,db t):s(s),t(t){} bool operator <(const box &i)const{ return s < i.s; } }; const int MaxN = 128; ...
a.cc: In function 'void makeX(int, int, int)': a.cc:46:20: error: expected primary-expression before ')' token 46 | db b = atan2(x,) | ^
s752709434
p01417
C++
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> #define INF 0x7fffffff #define MOD 10000007 #define N 30 using namespace std; typedef long long LL; typedef __int64 INT; struct node { double a,b,c; } color[N]; int ans[N]; int n,m; double Min; /*f[n][k][0]=min ...
a.cc:14:9: error: '__int64' does not name a type; did you mean '__int64_t'? 14 | typedef __int64 INT; | ^~~~~~~ | __int64_t
s288059814
p01417
C++
/*豕ィ諢乗イ。譛牙?蟋句喧*/ #include<stdio.h> #include<iostream> #include<memory.h> #include<math.h> using namespace std; const int maxn=30; double dis[maxn][maxn]; typedef struct { double x,y,z; }node; node p[maxn]; bool flag[maxn]; int subset[maxn]; int mark=0; int main() { int N,M; scanf("%d %d",&N,&M); if(M==1) { print...
a.cc: In function 'int main()': a.cc:24:17: error: return-statement with no value, in function returning 'int' [-fpermissive] 24 | return; | ^~~~~~
s259263315
p01417
C++
#include<cstdio> #include<algorithm> #include<vector> #include<cmath> using namespace std; struct node { double x,y,z; }; struct node x[21]; vector<double>a; int b[25],i,n,m,j; double d[21][21],max=0,ans; double dis(int i,int j) { return ((x[i].x-x[j].x)*(x[i].x-x[j].x)+(x[i].y-x[j].y)*(x[i].y-x[j].y)+(x[i].z-x[j]....
a.cc: In function 'void dfs(int, int)': a.cc:37:18: error: reference to 'max' is ambiguous 37 | if(ans/2>max)max=ans/2; | ^~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidates are: 'templat...
s719313908
p01417
C++
#include<stdio.h> #include<iostream> #include<algorithm> #include<string.h> #include<string> #include<stdlib.h> #include<ctype.h> #include<math.h> #include<stack> #include<map> #include<set> #include<queue> #include<vector> using namespace std; #define _pi acos(-1.0) int _gcd(int x, int y){ return x%y==0?y:_gcd(y,x%y);...
a.cc:23:18: error: 'int select [25]' redeclared as different kind of entity 23 | int n,m,select[25]; | ^ In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179, from /usr/include/stdlib.h:514, from /usr/include/c++/14/cstdlib:79, ...
s197823447
p01417
C++
#include <algorithm> #include <cstdio> #include <cstdlib> #include <vector> using namespace std; template<class T> inline void chmax(T& a, const T& b) { if(b > a) a = b; } int main() { int n, m; scanf("%d %d", &n, &m); vector<double> l(n), a(n), b(n); for(int i = 0; i < n; ++i) scanf("%lf %lf %lf", &l[i], &a[i...
a.cc: In function 'int main()': a.cc:44:2: error: expected '}' at end of input 44 | } | ^ a.cc:9:12: note: to match this '{' 9 | int main() { | ^
s391989958
p01417
C++
#include <iostream> #include <vector> #include <math.h> #include <cstdio> using namespace std; #define N 20 #define DELTA 0.000001 typedef struct Lab{ double L; double a; double b; }Lab_t; Lab_t cl[N]; double slct[N]; int n,m; double mx; void combi(int,int); int main(int argc, char const *argv[]) { cin>>n>>m;...
a.cc: In function 'void combi(int, int)': a.cc:44:42: error: invalid types 'Lab_t [20] {aka Lab [20]}[double]' for array subscript 44 | sum+=((cl[slct[i1]].L-cl[slct[i2]].L)*(cl[slct[i1]].L-cl[slct[i2]].L)); | ^ a.cc:44:57: error: invalid...
s786760621
p01418
C++
#include <cstdio> #include <cmath> double P, E, T; double dfs(int K, double L, double R) { double H = 0.5*(L+R); if (K == 0) return (std::abs(T-H) < E)? 1.0:0.0; double LH = dfs(K-1, L, H, P, E, T); double HR = dfs(K-1, H, R, P, E, T); if (H >= T) { return P * HR + (1.0-P) * LH; } else { return P...
a.cc: In function 'double dfs(int, double, double)': a.cc:10:18: error: too many arguments to function 'double dfs(int, double, double)' 10 | double LH = dfs(K-1, L, H, P, E, T); | ~~~^~~~~~~~~~~~~~~~~~~~ a.cc:6:8: note: declared here 6 | double dfs(int K, double L, double R) { | ...
s712487978
p01418
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:77:2: error: expected '}' at end of input 77 | } | ^ a.cc:53:12: note: to match this '{' 53 | int main() { | ^
s100949450
p01418
C++
#include <bits/stdc++.h> using namespace std; double amax,amin,pp=0,p,t,k; void ppsum(vector<bool> v){ double tmp=1; for(int i=0;i<v.size();i++){ if(v[i])tmp*=(1-p); else tmp*=p; } pp+=tmp; } void night(double r,double l,vector<bool> v){ double h=(l+r)/2; if(v.size()==k||v.siz...
a.cc: In function 'void night(double, double, std::vector<bool>)': a.cc:17:23: error: invalid use of member function 'std::vector<bool, _Alloc>::size_type std::vector<bool, _Alloc>::size() const [with _Alloc = std::allocator<bool>; size_type = long unsigned int]' (did you forget the '()' ?) 17 | if(v.size()==k||...
s835578396
p01418
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s063812011
p01418
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <cmath> using namespace std; const int Max = 64; char mp[Max][Max]; int Csum[Max][Max],On[Max][Max],Off[Max][Max]; int Fa[Max*Max],pre[Max][Max]; int getFa(int x){return Fa[x] == -1?x:Fa[x] = getFa(Fa[x]);} void merge(int x,int y){ ...
a.cc: In function 'int main()': a.cc:31:25: error: 'Csm' was not declared in this scope; did you mean 'Csum'? 31 | scanf("%d",&Csm[i][j]); | ^~~ | Csum a.cc:39:23: error: 'Vx' was not declared in this scope 39 | scanf("%d%d",&Vx[i],&V...
s563764737
p01418
C++
#include<cstdio> #include<algorithm> #include<cmath> using namespace std; int k,i,j; double l,r,p,t,pp=0,e; void sleep(double l,double r,double gl,int k) { double h; h=(l+r)/2; if(gl<0.000001)return 0; if(k==0) { if(fabs(h-t)<=e) pp=pp+gl; return ; } if(h<t) { sleep(h,r,gl*(1-p),k-1); sleep(l,h,gl*p...
a.cc: In function 'void sleep(double, double, double, int)': a.cc:12:31: error: return-statement with a value, in function returning 'void' [-fpermissive] 12 | if(gl<0.000001)return 0; | ^
s609495992
p01419
C
#include <iostream> #include <vector> #include <stdlib.h> #include <string.h> #define nm 51 using namespace std; int n, m, nrt, a[nm][nm], pc[nm][nm], on[nm][nm], of[nm][nm], timp, viz[nm][nm], viz2[nm][nm], prim, ultim, k, aux[nm*nm], nraux; vector <int> t[nm][nm]; struct punct { int x, y; } p[1005], d[]={{0,0},{1...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s749331169
p01419
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = a; i < (int)b; i++) #define rep(i, n) REP(i, 0, n) typedef pair<int, int> pii; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, -1, 0, 1}; template <class T> constexpr bool in_range(T y, T x, T H, T W) { return 0 <= y && y < H && 0 <= x &&...
a.cc: In function 'std::vector<std::pair<int, int> > make_path()': a.cc:80:15: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'? 80 | reverse(all(pt)); | ^~~ | std::filesystem::perms::all In file included from /usr/include/c++/14/fi...
s120135872
p01419
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = a; i < (int)b; i++) #define rep(i, n) REP(i, 0, n) typedef pair<int, int> pii; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, -1, 0, 1}; template <class T> constexpr bool in_range(T y, T x, T H, T W) { return 0 <= y && y < H && 0 <= x &&...
a.cc: In function 'std::vector<std::pair<int, int> > make_path()': a.cc:80:15: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'? 80 | reverse(all(pt)); | ^~~ | std::filesystem::perms::all In file included from /usr/include/c++/14/fi...
s852064739
p01419
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int dx[] = { -1, 0, 1, 0 }; int dy[] = { 0, -1, 0, 1 }; int R, C, M; string field[50]; bool visited[50][50]; bool dfs(int px, int py, int gx, int gy, vector<int>& res) { if(visited[px][py]) return false; visited[px]...
a.cc: In function 'int main()': a.cc:76:17: error: 'memset' was not declared in this scope 76 | memset(visited, 0, sizeof(visited)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algo...
s615789421
p01420
C
#include<stdio.h> #include<string.h> #define eps 1e-14 double f_pow(double x,int n){ double res=1; while(n--)res*=x; return res; } struct Man{ double p,t,v; void get(){ scanf("%lf%lf%lf",&p,&t,&v); p/=100; } }; Man man[100]; int N,M; double L; double tim[100][51],tsum[100][51]; double rate[100][51]; double C...
main.c:12:19: error: expected ':', ',', ';', '}' or '__attribute__' before '{' token 12 | void get(){ | ^ main.c:17:1: error: unknown type name 'Man'; use 'struct' keyword to refer to the type 17 | Man man[100]; | ^~~ | struct main.c: In function 'get_data': main.c:37:...
s222260905
p01420
C++
#include<bits/stdc++.h> using namespace std; using ld=long double; int main(){ int n,m,l; cin>>n>>m>>l; vector<ld> p(n); vector<int> t(n),v(n); for(int i=0;i<n;i++){ cin>>p[i]>>t[i]>>v[i]; p[i]/=100; } vector<vector<ld>> pos(n,vector<ld>(m+1,0)); for(int i=0;i<n;i++){ ...
a.cc: In function 'int main()': a.cc:20:20: error: expected ';' before '}' token 20 | pos | ^ | ; 21 | } | ~
s536716773
p01420
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cstring> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <numeric> #include <cctype> #include <tuple> #include <array> // BEGIN CUT HE...
a.cc:45:17: error: 'double time [110][110]' redeclared as different kind of entity 45 | double time[N][N]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/...
s792451817
p01420
C++
#include<map> #include<set> #include<stack> #include<queue> #include<cmath> #include<ctime> #include<vector> #include<cctype> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; typedef long long LL; const double pi=3.141592653; const double eps=1e-10; const int INF=0x3f3f3f...
a.cc: In function 'int main()': a.cc:53:32: error: 'i' was not declared in this scope 53 | printf("%.8lf\n",v[i]?1:0); | ^
s985830263
p01420
C++
#include<iostream> #include<stdio.h> #include<math.h> using namespace std; int p[100],t[100],v[100]; unsigned long long c[50][50]; double rest[100][50],time[100][50]; int main() { int n,m,l; scanf("%d%d%d",&n,&m,&l); c[0][0]=1; for(int i=1;i<50;i++){ c[i][i]=c[i][0]=1; for(int j=1;j<i;j++){ c[i][j]=c[i-1][j]+c[i-1]...
a.cc:7:34: error: 'double time [100][50]' redeclared as different kind of entity 7 | double rest[100][50],time[100][50]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, fro...
s735031852
p01420
C++
t[n][m+1], p[n][m+1], sump[n][m+1]; for (int i=0; i<n; ++i) { double pp, tt; cin >> pp>>tt>>v[i]; pp/=100; for (int k=0; k<=m; ++k) { p[i][k] = 1; for (int l=0; l<=m; ++l) { if (l < k) p[i][k] *= m-l; if (k-l >= 1) { ...
a.cc:1:2: error: 't' does not name a type 1 | t[n][m+1], p[n][m+1], sump[n][m+1]; | ^ a.cc:2:5: error: expected unqualified-id before 'for' 2 | for (int i=0; i<n; ++i) { | ^~~ a.cc:2:19: error: 'i' does not name a type 2 | for (int i=0; i<n; ++i) { | ^ a.cc:...
s560197850
p01420
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define EPS (1e-10) #define EQ(a,b) (abs((a)-(b))<EPS) struct runner{ int t,v; double p; }; const int INF=1000000000; vector<runner> vr; double mem[101][51][101]; // k‚Í‹xŒe‚·‚éêŠ‚̐” double calcPer(int n,int k,int idx){ if(!EQ(mem...
a.cc: In function 'int main()': a.cc:55:60: error: 'pow' was not declared in this scope 55 | double cper=calcPer(m,j,i)*pow((double)(1-vr[i].p),m-j); | ^~~
s393668899
p01420
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> using namespace std; #define eps 0.0000001 bool zero(double a,double b){ if((a-b)<eps && (a-b)>-eps)return true; return false; } double c[110][110]; int n,m; double l; struct player{ double p; double t; double v; }pl[210]; do...
a.cc: In function 'int main()': a.cc:129:14: error: expected ';' before '}' token 129 | break | ^ | ; 130 | } | ~
s738033248
p01420
C++
//10 #include<iostream> #include<vector> #include<utility> #include<cmath> #include<algorithm> using namespace std; double fact(int x){ double r=1; while(x){ r*=x--; } return r; } int main(){ int n,m,l; cin>>n>>m>>l; double ap[100][51],acp[100][52]={{}}; double at[100][51]; for(int i=0;i<n;i++)...
a.cc: In function 'int main()': a.cc:38:54: error: 'x1e' was not declared in this scope 38 | int x=lower_bound(at[k],at[k]+m+1,at[i][j]+x1e-9)-at[k]; | ^~~
s382835377
p01421
C++
#include<stdio.h> #include <iostream> #include <math.h> #include <numeric> #include <vector> #include <map> #include <functional> #include <stdio.h> #include <array> #include <algorithm> #include <string> #include <string.h> #include <assert.h> #include <stdio.h> #include <queue> #include<iomanip> #include<bitset> #inc...
a.cc:108:17: error: 'INT_MAX' was not declared in this scope 108 | const int INF = INT_MAX; | ^~~~~~~ a.cc:22:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 21 | #include <complex> +++ |+#include <climits> 22 | using namespace...
s248712903
p01421
C++
#include<iostream> #include<vector> #include<set> #include<cstring> #include<string> #include<cstdio> #include<cstdlib> #include<queue> using namespace std; struct edge{ int to, cap, rev; }; int n,m,s,t; int x[1000],y[1000]; int fl,v; bool visitv[300],visite[1000]; vector<int> r; vector<edge> G[300]; bool used[300];...
a.cc: In function 'void add_edge(int, int, int)': a.cc:23:46: warning: narrowing conversion of 'G[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing] 23 | G[from].push_back( (edge){to,cap,G[to].size()}); | ~~~~...
s787603173
p01421
C++
#include<iostream> #include<queue> using namespace std; const int inf=1000000000; const int N=305; int n,a[N][N],pre[N],l[N],ans,e[N*N][2],c[N*N]; queue <int> Q; int min(int x,int y) { if (x<y) return x; else return y; } void addflow(int s,int t,int d) { int i=t; int j=pre[t]; while (i!=s) { ...
a.cc: In function 'void flow(int, int)': a.cc:35:11: error: 'memset' was not declared in this scope 35 | memset(pre,-1,sizeof(pre)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<queue> +++ |+#i...
s392472790
p01421
C++
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <map> #include <limits.h> #include <algorithm> #include <vector> #include <ctime> #include <queue> #include <set> #include <string> using namespace std; const int MM = 900010; const int NN = 3010; const int INF =...
a.cc: In function 'int aug(int, int)': a.cc:71:35: error: 'mytmp' was not declared in this scope; did you mean 'mktemp'? 71 | if (p->w > 0 && h[p->v] < mytmp){ | ^~~~~ | mktemp a.cc:77:20: error: 'mytmp' was not declared in this ...
s489595811
p01421
C++
/* * E.cpp * * Created on: Oct 9, 2012 * Author: carber */ #include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> using namespace std; const int NV = 305; const int NE = 45000; struct ISAP { int n, size; int head[NV]; int dis[NV], gap[NV],...
a.cc:93:9: error: expected unqualified-id before 'return' 93 | return maxflow; | ^~~~~~ a.cc:94:6: error: expected ';' after struct definition 94 | }//ISAP | ^ | ; a.cc: In member function 'int ISAP::MaxFlow(int, int)': a.cc:71:31: error: 'INT_MAX' was not declared ...
s995119849
p01421
C++
#include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <ctime> #include <c...
a.cc:98:37: error: macro "EACH" requires 3 arguments, but only 2 given 98 | EACH(e, g[u]) { | ^ a.cc:53:9: note: macro "EACH" defined here 53 | #define EACH(i,t,c) for(t::const_iterator i=(c).begin();i!=(c).end();i++) | ^~~~ a.cc: In ...
s745011835
p01422
C
#include<iostream> #include<cstdio> #include<algorithm> #define rep(i,a,b) for(int i=a;i<=b;++i) using namespace std; const int maxn=22; int n,a[maxn]; double f[maxn][200010]; //f[i][j]=min(f[i-1][p]+(a[i]-p)/a[i] (j%p==0)) int main() { //freopen("in.txt","r",stdin); cin>>n; rep(i,1,n)cin>>a[i]; sort(a+1,a+n+1); r...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s464700853
p01422
C++
#include <vector> #include <iostream> #include <cstdio> #include <cstring> #include <cmath> using namespace std; const int inf = 0xfffffff; double a[22]; double dp[22][212345]; void init(){ for(int i=0;i<22;i++){ for(int j=0;j<212345;j++){ dp[i][j]=inf; } } } int main() { int n; while(scanf("%d",&n)!=EOF)...
a.cc: In function 'int main()': a.cc:25:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 25 | sort(a,a+n); | ^~~~ | sqrt
s686654887
p01422
C++
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <cmath> using namespace std; int gcd(int a,int b) {return b==0?a:gcd(b,a%b);} struct ConfusionRatio { int fm,fz; ConfusionRatio(int a=1,int b=1) { int g=gcd(a,b); fz=a/g; fm=b/g; } bool ope...
a.cc: In function 'bool check(int)': a.cc:33:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 33 | __int64 delt=t[id].fz*1LL*a[i]/t[id].fm; | ^~~~~~~ | __ynf64 a.cc:34:32: error: 'delt' was not declared in this scope 34 | l[i]=(int)max(1LL,a[i...
s729163565
p01422
C++
#include<stdio.h> int a[30]; double dp[30][200005]; double Abs(double x){ return x>=0?x:-x; } main(){ int n; int i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } int j; int Max=a[n-1]*2; for(i=0;i<n;i++) for(j=1;j<Max;j++) dp[i][j]=0x3f3f3f3f; for(i=1;i<Max;i++) dp[0][i]=Abs((double)(a[0]-i)...
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:33:16: error: redeclaration of 'double ans' 33 | double ans=0x3f3f3f3f; | ^~~ a.cc:22:16: note: 'double ans' previously declared here ...
s201026000
p01422
C++
#include <bits/stdc++.h> #define N 30 using namespace std; typedef long long ll; int n,A[N]; unordered_map<ll,double> mem[N]; double calc(double a,double b){return abs(a-b)/a;} double dfs(int idx,ll num){ if(idx==n) return 0; if(mem[idx].count(num))return mem[idx][num]; double res=1LL<<55; for(int i=num;;i+=...
a.cc: In function 'int main()': a.cc:25:28: error: expected ')' before ';' token 25 | printf("%.10f\n",dfs(0,1);); | ~ ^ | ) a.cc:25:29: error: expected primary-expression before ')' token 25 | printf("%.10f\n",dfs(0,1);); | ...
s718823401
p01422
C++
#include <bits/stdc++.h> #define N 30 using namespace std; typedef long long ll; int n,A[N]; unordered_map<ll,double> mem[N]; double calc(double a,double b){return abs(a-b)/a;} double dfs(int idx,ll num){ if(idx==n) return 0; if(mem[idx].count(num))return mem[idx][num]; double res=1LL<<55; for(int i=num;;i+=...
a.cc: In function 'int main()': a.cc:25:28: error: expected ')' before ';' token 25 | printf("%.10f\n",dfs(0,1);); | ~ ^ | ) a.cc:25:29: error: expected primary-expression before ')' token 25 | printf("%.10f\n",dfs(0,1);); | ...
s461707293
p01422
C++
#include <bits/stdc++.h> #define N 30 using namespace std; typedef long long ll; int n,A[N]; unordered_map<ll,double> mem[N]; double calc(double a,double b){return abs(a-b)/a;} double dfs(int idx,ll num){ if(idx==n) return 0; if(mem[idx].count(num))return mem[idx][num]; double res=1LL<<55; for(int i=num;;i+=...
a.cc: In function 'int main()': a.cc:25:28: error: expected ')' before ';' token 25 | printf("%.10f\n",dfs(0,1);); | ~ ^ | ) a.cc:25:29: error: expected primary-expression before ')' token 25 | printf("%.10f\n",dfs(0,1);); | ...
s084203524
p01422
C++
#include <bits/stdc++.h> #define N 30 using namespace std; typedef long long ll; int n,A[N]; unordered_map<ll,double> mem[N]; double calc(double a,double b){return abs(a-b)/a;} double dfs(int idx,ll num){ if(idx==n) return 0; if(mem[idx].count(num))return mem[idx][num]; double res=1LL<<55; for(int i=idx;i<n;...
a.cc:54:5: error: redefinition of 'int n' 54 | int n,A[N]; | ^ a.cc:5:5: note: 'int n' previously declared here 5 | int n,A[N]; | ^ a.cc:54:7: error: redefinition of 'int A [30]' 54 | int n,A[N]; | ^ a.cc:5:7: note: 'int A [30]' previously declared here 5 | int n,A[N]; ...
s033144091
p01422
C++
#include <vector> #include <bitset> #include <map> #include <queue> #include <climits> #include <algorithm> #include <iostream> #include <cmath> using namespace std; const double INF = DBL_MAX / 2; int main() { int n; cin >> n; vector<int> a(n); for(int i=0; i<n; ++i) cin >> a[i]; int m = a[n-1] * 2; vector...
a.cc:11:20: error: 'DBL_MAX' was not declared in this scope 11 | const double INF = DBL_MAX / 2; | ^~~~~~~ a.cc:9:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>' 8 | #include <cmath> +++ |+#include <cfloat> 9 | using namesp...
s326556368
p01422
C++
// OBツ嘉ッツ嘉債宿2011 Day3 F : Beautiful Currency #include <iostream> #include <cstdio> #include <stdlib> using namespace std; int main(){ int N; int a[20]; while(cin >> N){ for(int i=0;i<N;i++) cin >> a[i]; static double dp[2][200001]; for(int i=1;i<=200000;i++){ dp[0][i] = abs(a[0]-i)/(double)a[0]; } in...
a.cc:5:10: fatal error: stdlib: No such file or directory 5 | #include <stdlib> | ^~~~~~~~ compilation terminated.
s751217144
p01423
Java
#include <iostream> #include <vector> #include <algorithm> using namespace std; int c[109][109], n, m, p, q, r, maxn; void dfs(vector<int>vec) { if (vec.size() >= 2) { int sum = 0; for (int i = 0; i < vec.size(); i++) { int minx = 1000009; for (int j = 0; j < vec.size(); j++) { if (i == j) continue; ...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:2: error: illegal character: '#' #include <vector> ^ Main.java:3: error: illegal character: '#' #include <algorithm> ^ Main.java:6: error: class, interface, enum, or record expected int c[109][109], n, m, p, q, r, maxn; ^ Main.java:8: error: unn...
s299849063
p01423
C
#include <string.h> #include <iostream> #include <queue> #include <set> #include <vector> using namespace std; const int MAX_N = 101; const int MAX_M = 101; const int MAX_F = 1000000; int table[MAX_N][MAX_N]; int status[MAX_M][MAX_N]; int N, M; typedef unsigned long long ULL; typedef vector<int> VI; typedef set<int>...
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s780200217
p01423
C++
#include <cmath> #include <cstdlib> #include <iostream> #include <map> #include <numeric> #include <vector> using namespace std; template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; } template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; } constexpr int MAX_N = 100; int n, m; m...
a.cc: In function 'void calc(const std::vector<int>&)': a.cc:34:37: error: 'INT_MAX' was not declared in this scope 34 | int score = INT_MAX; | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#in...
s351363458
p01423
C++
#include<iostream> #include<string.h> #include<vector> #include<algorithm> #include<set> #include<map> #include<queue> #include<stack> #include<math.h> using namespace std; typedef unsigned long long ll; const int mod=1000000007; int n,m,u,v,f; int ma[102][102]; int invite[102]; int dfs(int cur, int in){ if(cur...
a.cc: In function 'int dfs(int, int)': a.cc:25:19: error: 'INT_MAX' was not declared in this scope 25 | int t=INT_MAX; | ^~~~~~~ a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 9 | #include<math.h> +++ |+#i...
s585273512
p01423
C++
#include <bits/stdc++.h> using namespace std; const int INF = 1000000000; #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);++i) #define rep(i,n) REP(i, 0, n) int w[101][101]; int N, M, ans; vector<int> use; void dfs(int depth) { if(depth == N) { if(use.size() < 2) return; int sum = 0; for(i...
a.cc: In function 'int main()': a.cc:44:25: error: expected '}' at end of input 44 | printf("%d\n", ans); | ^ a.cc:33:12: note: to match this '{' 33 | int main() { | ^
s421555834
p01423
C++
#include <iostream> #include <fstream> #include <vector> using namespace std; const int NMax = 150; int A[NMax][NMax]; int used[NMax]; int N, M; int bkt (int x, int y) { if (x >= N) { if (y < 2) return 0; int ans = 0; for (int i = 0; i < y; ++i) { int Min = INT_MAX; fo...
a.cc: In function 'int bkt(int, int)': a.cc:22:23: error: 'INT_MAX' was not declared in this scope 22 | int Min = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <vector> ...
s951898098
p01423
C++
#include <iostream> #include <cstring> #include <vector> #include <algorithm> using namespace std; int N,M; int graph[100][100]; bool friendly(vector<int>& u, int k) { for(int i=0; i<u.size(); i++) if(graph[u[i]][k] == 0) return false; return true; } int solve(vector<int>& u, int k) { int res = 0; for(int i...
a.cc: In function 'int main()': a.cc:61:23: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 61 | cout << solve(vector<int>(), 0) << endl; | ^~~~~~~~~~~~~ a.cc:19:24: note: initializing argument 1 of 'int solve(std...
s526528595
p01423
C++
#include <iostream> #include <vector> #include <map> using namespace std; typedef vector<int> VI; typedef pair<int, int> PII; int N, M; int u, v, f; const int MAX_N = 101; const int MAX_F = 1000000; int maxv = 0; int table[MAX_N][MAX_N]; bool att[MAX_N]; void solve(int last) { int ret = 0; for(int i=0; i<last+1; ...
a.cc: In function 'int main()': a.cc:48:9: error: 'memset' was not declared in this scope 48 | memset(table, 0, sizeof(int) * MAX_N * MAX_N); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <map> +++ ...
s238212052
p01423
C++
#include<iostream> using namespace std; int rab1[101],rab2[101],fri[101]; int n,m; int usemin[101]; int getpoint(int usemap[101],int count){ int ans = 0; for(int i=1;i<=n;i++){ if(usemap[i]==count-1){ ans += usemin[i]; }else if(usemap[i]){ return 0; } } return ans; } int solve(int usemap[101],int i...
a.cc: In function 'int main()': a.cc:53:9: error: 'memset' was not declared in this scope 53 | memset(usemin,(1000*1000+1),sizeof(usemin)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> ++...
s613343344
p01423
C++
#include <stdio.h> #include <malloc.h> typedef struct Node { int data; int num; struct Node *next; }*LNode; int main() { int n, m; int x; LNode head, p, q; scanf ("%d%d", &n, &m); p = (Node*)malloc(sizeof(Node)); scanf ("%d", &p->data); p->num = 1; head = p; for (int i = 2; i <= n; i ++) { q = (Nod...
a.cc: In function 'int main()': a.cc:49:9: error: 'system' was not declared in this scope 49 | system("pause"); | ^~~~~~
s849125612
p01424
C++
#include <iostream> #include <cstdio> #include <cassert> #include <cstring> #include <vector> #include <valarray> #include <array> #include <queue> #include <set> #include <unordered_set> #include <map> #include <unordered_map> #include <algorithm> #include <cmath> #include <complex> #include <random> using namespace ...
a.cc:40:5: error: 'bitset' does not name a type 40 | bitset<V> used; | ^~~~~~ a.cc: In member function 'void SCC<V>::dfs(int)': a.cc:42:9: error: 'used' was not declared in this scope 42 | used[v] = true; | ^~~~ a.cc: In member function 'void SCC<V>::rdfs(int, int)': a.cc:52:9:...
s020469247
p01424
C++
#include<stdio.h> #include<string> #include<cstring> #include<iostream> #include<map> #include<algorithm> using namespace std; struct NODE{ int lid ,llen; int rid, rlen; string rem; NODE(){} NODE(int _l,int _ll ,int _r,int _rl,string &s){ lid = _l;llen = _ll;rid =_r;rlen = _rl;rem = s; }...
a.cc: In function 'int dfs(NODE, int)': a.cc:48:8: error: reference to 'hash' is ambiguous 48 | if(hash.count(s) > 0 && fin[s] == 2) { | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include...
s576533175
p01424
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> using namespac
a.cc:1:20: warning: extra tokens at end of #include directive 1 | #include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> using namespac | ^ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gn...
s698086727
p01425
C
#include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <queue> #include <vector> #include <cmath> #include <stack> #include <string> #include <map> #include <set> #define pi acos(-1) #define LL long long #define ULL unsigned long long #define inf 0x3f3f3f3f #define INF 1e18 #define lson ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s617266052
p01425
C
#include<stdio.h> #include<math.h> #include<string.h> #include<iostream> #include<algorithm> #define maxn 55 #define eps 1e-8 const double g=9.8; using namespace std; int n; double v,x,y; double l[maxn],b[maxn],r[maxn],t[maxn]; double cal(double t,double vy) { return vy*t-g*t*t/2; } int cmp(double lowb,double upb,d...
main.c:4:9: fatal error: iostream: No such file or directory 4 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s606930103
p01425
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define All(X) X.begin(),X.end() #define FO...
a.cc: In function 'int check(int, int, int, int, int, int)': a.cc:52:3: error: expected '}' before 'else' 52 | else {//cout << rs1 << " " <<rs2<<endl; return rs1 * rs2;} | ^~~~ a.cc:51:13: note: to match this '{' 51 | if(wY3<Y) {//cout <<"todokanai"<<endl;return -1;} | ^ a.cc:54:9: w...
s825121518
p01425
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define All(X) X.begin(),X.end() #define FO...
a.cc: In function 'int main()': a.cc:64:23: error: expected ';' before '}' token 64 | R[i] = min(R[i],X) | ^ | ; 65 | } | ~
s328504636
p01425
C++
#include<stdio.h> #include<vector> #include<math.h> #include<algorithm> using namespace std; #define sqr(x) ((x)*(x)) typedef pair<double,double> point; const double g=9.8; const double eps=1e-8; double v; struct para { double a,b; para(){a=b=0;} para(double te){b=te;a=-g*(b*b+1)/2/v/v;} double qz(double x) {retu...
a.cc: In function 'void solve()': a.cc:98:45: error: '__gnu_cxx::__alloc_traits<std::allocator<para>, para>::value_type' {aka 'struct para'} has no member named 'xl' 98 | if(x>tet[l].xl-eps&&x<tet[l].xu+eps&&tet[l].qz(x)>ret[j].yl+eps&&y<ret[j].yl+eps) break; | ...
s810713955
p01425
C++
#include <set> #include <map> #include <cmath> #include <queue> #include <stack> #include <cstdio> #include <string> #include <vector> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define MP make_pair #define PB push_back typedef double DB; typedef long long LL; const DB eps = 1e...
a.cc: In function 'bool Check()': a.cc:150:21: error: 'delta' was not declared in this scope 150 | for (double i = delta, delta = PI / 2 / 15000.0; i <= PI / 2; i += delta) { | ^~~~~
s140829027
p01425
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define RREP(i,s,e) for (i = s; i >= e; i--) #define rrep(i,n) RREP(i,n,0) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) #define INF 100000000 typedef long long ll; int n, v, x, y; int l[50], b[50], r[50], t[50];...
a.cc: In function 'bool solve(int, int)': a.cc:31:40: error: 'sqrt' was not declared in this scope 31 | double t2 = (-2*(g*by-v*v)+i*v*sqrt(v*v-2*g*by))/(g*g); | ^~~~
s927384408
p01425
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <iostream> #include <stack> #include <queue> #include <math.h> #include <set> #include <map> #include <string> #include <list> #include <string.h> using namespace std; typedef long long int ll; typedef pair <double, double> P; const int INF = 1000000000; const...
a.cc: In function 'bool check(int, int)': a.cc:53:32: error: expected primary-expression before '<' token 53 | if( X =< bl[i].r && loc >= bl[i].b && bl[i].t >= Y) res = false; | ^
s123709268
p01425
C++
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int Maxn=60; const double g=9.8; const double eps= 1e-8; int N; double V,X,Y; double L[Maxn],B[Maxn],R[Maxn],T[Maxn]; double Calcy(double vy,double t){return vy*t-0.5*g*t*t;} double Calcx(double vx,double t){r...
a.cc: In function 'bool Check(double, double)': a.cc:32:23: error: 'sqrt' was not declared in this scope 32 | double t=sqrt((-b+sqrt(delta)*op)/(2.0*a)); | ^~~~ a.cc:32:14: error: 'sqrt' was not declared in this scope 32 | double t=sqrt((-b+sqrt(delta)*op)/(2.0*a)); | ...
s284409198
p01425
C++
#include <bits/stdc++.h> using namespace std; const double g = 9.8; const double eps = 1e-10; double calc(double vy, double t){ return vy * t - 0.5 * g * t * t; } const int N = 60; int n; double v,x,y, fy; double L[N],B[N],R[N],T[N],sR[i]; bool cmp(int i, double vx, double vy) { if (L[i] > x || L[i] > R[i]) re...
a.cc:11:31: error: 'i' was not declared in this scope 11 | double L[N],B[N],R[N],T[N],sR[i]; | ^ a.cc: In function 'bool cmp(int, double, double)': a.cc:15:9: error: 'sR' was not declared in this scope; did you mean 'R'? 15 | if (sR[i] > x && fy > T[i] && y < T[i]) return f...
s003098988
p01425
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; const double g = 9.8; pair<double, double> tanth(int a, int b, int v) { double d = a*a*v*v*v*v - g*a*(g*a-2*v*v*b); if(d<0) return make_pair<double, double>(-1,-1); double kai1 = (a*v*v + sqrt(d)) / g*a; double kai2 = (a*v*v - sqrt(d...
a.cc: In function 'std::pair<double, double> tanth(int, int, int)': a.cc:13:32: error: 'sqrt' was not declared in this scope 13 | double kai1 = (a*v*v + sqrt(d)) / g*a; | ^~~~ a.cc:15:42: error: cannot bind rvalue reference of type 'double&&' to lvalue of type 'double' ...
s691255172
p01425
C++
#include <iostream> #include<cmath> #include<cstdio> using namespace std; #define g 9.80 #define eps 1e-8 int top; int n; double v,xx,yy; struct point { double x,y; }p[201]; struct rectangle { double l,r,b,t; }rec[101]; bool judge(double a,double len ) { int i; for ( i=1;i<=top;i++ ) ...
a.cc: In function 'int main()': a.cc:67:11: error: 'memset' was not declared in this scope 67 | memset(p,0,sizeof(p)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<cstdio> +++ |+#include <cstri...
s374700672
p01425
C++
const double EPS = 1e-6; int cmp(double a, double b) { const double diff = a-b; if(fabs(diff) < EPS) return 0; return diff < 0 ? -1 : 1; } struct Rect { P lb, rt; Rect() {} Rect(const P &lb, const P &rt) : lb(lb), rt(rt) {} double top() const { return rt.imag(); } double bottom() con...
a.cc: In function 'int cmp(double, double)': a.cc:5:8: error: 'fabs' was not declared in this scope 5 | if(fabs(diff) < EPS) return 0; | ^~~~ a.cc: At global scope: a.cc:10:5: error: 'P' does not name a type 10 | P lb, rt; | ^ a.cc:13:16: error: 'P' does not name a type 13 | ...
s749809832
p01425
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(int)(n); ++i) using namespace std; const double g = 9.8; const double EPS = 1e-8; namespace solver{ int n; double v, gx, gy; double x1[50], x2[50], y1[50], y2[50]; double calc_y(double vx, double vy, double x){ double t = x / vx; ...
a.cc: In function 'bool solver::check(double, double)': a.cc:49:101: error: 'gh' was not declared in this scope; did you mean 'fh'? 49 | if(comp(x1[i], x2[i], gx) == 0 && comp(y1[i], y2[i], gy) <= 0 && comp(y1[i], y2[i], gh) >= 0) { | ...
s912726531
p01426
C++
#include <bits/stdC++.h> using namespace std; const int N = 105, M = N * N; const double inf = 1000, eps = 1e-8; //最小?形? int n, m, tot, pre[N], vis[N], id[N]; double in[N], v[N][N]; struct Edge { int u, v; double dis; Edge(){} Edge(int u, int v, double dis): u(u), v(v), dis(dis){}; }e[M]; int sgn(double x) { if (f...
a.cc:1:10: fatal error: bits/stdC++.h: No such file or directory 1 | #include <bits/stdC++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s408114017
p01426
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>>; const ld eps=1e-9; //// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Downloa...
a.cc: In function 'std::pair<long double, std::vector<std::vector<Edge> > > chu_liu(const Graph&, int, int)': a.cc:364:46: error: 'M' was not declared in this scope 364 | auto p=chu_liu(newg, start, (M*(M + 1))); | ^ a.cc: In function 'ld getdis(const...
s540248213
p01426
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = double; const ld eps = 1e-9; // < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\deb...
a.cc:101:109: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 101 | /*ティツヲツ?ァツエツ?ヲツ閉ーテ」ツ?ッEdgeテ」ツ?ョテヲツ閉ーテ」ツ??」ツ?妥」ツ?ァティツ可ッテ」ツ??/ a.cc:112:109: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 112 | /*ティツヲツ?ァツエツ?ヲツ閉ーテ」ツ?ッEdgeテ」ツ?ョテヲツ閉ーテ」ツ??」ツ?妥」ツ?ァティツ可ッテ」ツ??...
s121819821
p01426
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = double; const ld eps = 1e-9; // < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\deb...
a.cc:101:109: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 101 | /*ティツヲツ?ァツエツ?ヲツ閉ーテ」ツ?ッEdgeテ」ツ?ョテヲツ閉ーテ」ツ??」ツ?妥」ツ?ァティツ可ッテ」ツ??/ a.cc:112:109: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 112 | /*ティツヲツ?ァツエツ?ヲツ閉ーテ」ツ?ッEdgeテ」ツ?ョテヲツ閉ーテ」ツ??」ツ?妥」ツ?ァティツ可ッテ」ツ??...
s216678431
p01426
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = double; const ld eps = 1e-9; // < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\deb...
a.cc:101:109: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 101 | /*ティツヲツ?ァツエツ?ヲツ閉ーテ」ツ?ッEdgeテ」ツ?ョテヲツ閉ーテ」ツ??」ツ?妥」ツ?ァティツ可ッテ」ツ??/ a.cc:112:109: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 112 | /*ティツヲツ?ァツエツ?ヲツ閉ーテ」ツ?ッEdgeテ」ツ?ョテヲツ閉ーテ」ツ??」ツ?妥」ツ?ァティツ可ッテ」ツ??...
s186473010
p01427
Java
#include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; const double EPS = 1e-8; int main(){ int H, W; string f[600]; while(cin >> H >> W){ for(int i=H-1;i>=0;i--) cin >> f[i]; vector< pair<double, int> > vd; // ????????°??????????????????????????????. // ??????(...
Main.java:2: error: illegal character: '#' #include <iostream> ^ Main.java:3: error: illegal character: '#' #include <vector> ^ Main.java:4: error: illegal character: '#' #include <cmath> ^ Main.java:5: error: illegal character: '#' #include <algorithm> ^ Main.java:9: error: class, interface, enum, or record expected c...
s077067386
p01427
C++
#include <cmath> #include <cstdlib> #include <iostream> #include <vector> using namespace std; template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int h, w; cin >> h >> w; vector<string> field(1, string(w + 1, '.')); field.rese...
a.cc: In function 'int main()': a.cc:45:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 45 | sort(events.begin(), events.end()); | ^~~~ | sqrt
s331758311
p01427
C++
#include <iostream> #include <cstdio> #include <vector> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <cstring> #include <functional> #include <cmath> #include <complex> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) #define rep1(i,n) for(in...
a.cc:69:5: error: redefinition of 'int H' 69 | int H,W; | ^ a.cc:23:5: note: 'int H' previously declared here 23 | int H,W; | ^ a.cc:69:7: error: redefinition of 'int W' 69 | int H,W; | ^ a.cc:23:7: note: 'int W' previously declared here 23 | int H,W; | ^ a.cc:70:...
s235172386
p01427
C++
#include<iostream> #include<algorithm> #include<vector> #include<tuple> using namespace std; int H, W, x[1000][1000], maxn = 1, cnt = 1; vector<tuple<long double, int, int>>tup; int analysis(int p, int q) { int D = x[p - 1][q - 1] * 1 + x[p - 1][q] * 2; D += x[p][q - 1] * 4 + x[p][q] * 8; if (D == 8 || D == 7)return...
a.cc: In function 'int main()': a.cc:34:44: error: 'fabs' was not declared in this scope; did you mean 'labs'? 34 | if (i < tup.size() - 1)B = fabs(get<0>(tup[i]) - get<0>(tup[i + 1])); | ^~~~ | labs
s398465604
p01427
C++
#include <iostream> #include <cmath> #include <vector> #include <set> using namespace std; constexpr double EPS = 1e-4; struct point { double x, y; point() {} point(double x, double y): x(x), y(y) {} point operator + (const point& o) const { return point(x+o.x, y+o.y); } point operator - (const p...
a.cc: In function 'int main()': a.cc:117:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 117 | sort(begin(ps), end(ps), [](point p, point q) { | ^~~~ | sqrt