submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s665891231
p03774
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main () { ll N,M; cin >> N >> M; ll x[N],y[N],a[M],b[M]; for(int i=0; i<N; i++) { cin >> x[i] >> y[i] ; } for(int i=0; i<M; i++) { cin >> a[i] >> b[i]; } for(int i=0; i<M; i++) { ll ans = INT_MAX; ll ind = 0; fo...
a.cc: In function 'int main()': a.cc:21:62: error: expected primary-expression before ')' token 21 | if( ans < abs(x[i] - a[j]) + abs(y[i] - b[j]) ) ) { | ^
s286041302
p03774
C++
#include<iostream> #include<string> #include<vector> #include<utility> #include<queue> #include<algorithm> #include<cmath> #define INF 2147483647 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long using namespace std; int plus(int a){ if(a<0) a=-a; return a; } int ...
a.cc: In function 'int main()': a.cc:37:13: error: reference to 'plus' is ambiguous 37 | int c=plus((a-pii[i].F)); | ^~~~ In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios...
s134092869
p03774
C++
#include <bits/stdc++.h> using namespace std; inline cal(int a,int b,int c,int d){ return abs(a-c) + abs(b-d); } int main() { int n,m,x,y; cin >> n >> m; vector < pair < int , int > > st; vector < pair < int , int > > chk; for(int i=0;i<n;i++){ cin >> x >> y; st.push_back(make_...
a.cc:4:8: error: ISO C++ forbids declaration of 'cal' with no type [-fpermissive] 4 | inline cal(int a,int b,int c,int d){ | ^~~
s929816782
p03774
C++
#include<iostream> #include<cmath> using namespace std; int x1[100], y1[100], x2[100], y2[100]; int main(){ int N, M; cin >> N >> M; for(int i = 1; i <= N; i++){ cin >> x1[i] >> y1[i]; } for(int i = 0; i < M; i++){ cin >> x2[i] >> y2[i]; int ans, maxim; mini = 1000000000; for(int j = 1; j <= N; j++){ int hoge = abs(...
a.cc:6:20: error: 'int y1 [100]' redeclared as different kind of entity 6 | int x1[100], y1[100], x2[100], y2[100]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_...
s836201685
p03774
C++
#include<iostream> #include<vector> #include<stack> #include<algorithm> #include<string> #include<set> #include<numeric> #include<functional> #include<unordered_map> #include<cmath> #include<cstdlib> #include<cassert> using namespace std; int main() { int N, M; cin >> N >> M; vector<long long> a(N), b(N), c(M), d(M...
a.cc: In function 'int main()': a.cc:24:46: error: 'INT_MAX' was not declared in this scope 24 | int ans = -1, min_distance = INT_MAX; | ^~~~~~~ a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include...
s684277083
p03774
C++
#include<bits\stdc++.h> using namespace std; #define fi first #define se second #define MAX 40000000000000001 typedef pair<int,int> pii; typedef long long ll; int N,M; pii A[100],B[100]; int main() { scanf("%d%d",&N,&M); for(int i = 0; i < N; i++)scanf("%d%d",&A[i].fi ,&A[i].se); for(int i = 0; i < M; i...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s077018279
p03774
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int main() { int i, n, m, a[50], b[50], c[50], d[50]; cin >> n >> m; for(i=0; i<n; i++) cin >> a[i] >> b[i]; for(i=0; i<m; i++) cin >> c[i] >> d[i]; int cp, dis, dmin; for(int i=0; i<n; i++){ ...
a.cc: In function 'int main()': a.cc:17:26: error: expected ';' before 'for' 17 | dmin = 1000000007 | ^ | ; 18 | for(int j=0; j<m; j++){ | ~~~ a.cc:18:22: error: 'j' was not declared in this scope 18 | ...
s377709833
p03774
C++
#include "iostream" using namespace std; int main(){ long long int N,M,a,b,c,d,min=200000001; cin>>N>>M; for(int i=1;i<=N;i++){ cin>>a>>b; } for(int j=1;j<=M;j++){ cin>>c>>d; } for(int k=1;k<=N;k++){ if(min>abs(a-b)+abs(c-d)){ for(int l=1;l<=M;l++){ min=abs(a-b)+abs(c-d); } cout<<min<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s160268885
p03774
C++
#include "iostream" using namespace std; int main(){ long long int N,M,a,b,c,d,min=200000001; cin>>N>>M; for(int i=1;i<=N;i++){ cin>>a>>b; } for(int j=1;j<=M;j++){ cin>>c>>d; } for(int k=1;k<=N;k++){ if(min>abs(a-b)+abs(c-d)){ for(int l=1;l<=M;l++){ min=abs(a-b)+abs(c-d); } cout<<mim<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:7: error: 'mim' was not declared in this scope; did you mean 'min'? 17 | cout<<mim<<endl; | ^~~ | min a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s126501651
p03774
C++
#include<iostream> using namespace std; int main(){ int n, m; vector<long long> a, b, c, d; cin >> n >> m; a.resize(n); b.resize(n); c.resize(m); d.resize(m); for(int i=0; i < n; i++) cin >> a[i] >> b[i]; for(int i=0; i<m;i++) cin >> c[i] >> d[i]; for (int i=0;i<n;i++){ long long m = 10000000000; int id= 0; for (in...
a.cc: In function 'int main()': a.cc:7:1: error: 'vector' was not declared in this scope 7 | vector<long long> a, b, c, d; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include<iostream> +++ |+#include <vector> 2 |...
s868359769
p03774
C++
#include <iostream> #include <cmath> #include <vector> #include <string> #include <map> #include <algorithm> #include <tuple> using namespace std; using ll = long long; using ull = unsigned long long; #define out(S) cout<<(S)<<endl; #define REP(i,b) for(size_t i=0;i<(b);i++) #define rREP(i,b) for(int i=(b)-1;i>=0;i--...
a.cc: In function 'int main()': a.cc:26:13: error: 'INT_MAX' was not declared in this scope 26 | #define INF INT_MAX/2 | ^~~~~~~ a.cc:46:28: note: in expansion of macro 'INF' 46 | int _min = INF; | ^~~ a.cc:8:1: note: 'INT_MAX' is defined in heade...
s241446345
p03774
C++
#include<iostream> #include<cstdlib> #include<algorithm> using namespace std; int main(){ int n,m; cin >> n >> m; long long int a[n],b[n]; for(int i=0;i<n;i++) cin >> a[i] >> b[i]; int c[m],d[m]; for(int i=0;i<m;i++) cin >> c[i] >> d[i]; for(int i=0;i<n;i++){ long long int minl=200000001,minn=51; ...
a.cc: In function 'int main()': a.cc:16:56: error: no matching function for call to 'min(long long int&, int)' 16 | if(minl==abs(a[i]-c[j])+abs(b[i]-d[j]))minn=min(minn,j+1); | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s706603564
p03774
C++
#include<iostream> #include<algorithm> #include<limits> #include<cmath> using namespace std; int N,M; int n[51],m[51]; int nx[51],ny[51]; int cx[51],cy[51]; int main(){ cin>>N>>M; for(int i=0;i<N;i++){ cin>>nx[i]>>ny[i]; } for(int i=1;i<=M;i++){ cin>>cx[i]>>cy[i]; } for(int i=0;i<N;i++){ int mi,mid=INT_MAX;...
a.cc: In function 'int main()': a.cc:19:28: error: 'INT_MAX' was not declared in this scope 19 | int mi,mid=INT_MAX; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include<cmath> ...
s452338220
p03774
C++
#include <iostream> #include <vector> using namespace std; int main() { int N, M; cin >> N >> M; vector<int> a(N, 0), b(N, 0), c(M, 0), d(M, 0); for (int i = 0; i != N; ++i) cin >> a[i] >> b[i]; for (int i = 0; i != M; ++i) cin >> c[i] >> d[i]; for (int n = 0; n != N; ++n){ int dist = 1...
a.cc: In function 'int main()': a.cc:15:52: error: invalid types 'int[int]' for array subscript 15 | int d = abs(a[n] - c[m]) + abs(b[n] - d[m]); | ^
s875396792
p03774
C++
N, M = map(int, input().split(" ")) student = []; pos = []; for i in range(N) : a, b = map(int, input().split(" ")) student.append((a, b)) for i in range(M) : a, b = map(int, input().split(" ")) pos.append((a,b)) for st in student : ans = -1; score = 100000000; for i in range(M) : tmpscore = abs(st[0] - pos...
a.cc:1:1: error: 'N' does not name a type 1 | N, M = map(int, input().split(" ")) | ^ a.cc:4:1: error: 'pos' does not name a type 4 | pos = []; | ^~~ a.cc:5:1: error: expected unqualified-id before 'for' 5 | for i in range(N) : | ^~~ a.cc:15:9: error: 'score' does not name a type 15 | ...
s215239887
p03774
Java
import java.util.Scanner; public Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int human = scan.nextInt(); int checkPoint = scan.nextInt(); int[] humanx = new int[human]; int[] humany = new int[human]; int[] checkPointX = new int[checkPoint]; int[] checkPoi...
Main.java:3: error: class, interface, enum, or record expected public Main { ^ Main.java:4: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) Main.java:40: error: class, interface...
s101072234
p03774
C++
#include<iostream> #include<vector> #include<cstdlib> #include<algorithm> #include<functional> using namespace std; void main() { int N, M; typedef pair<long, long> p; vector<p> n, m; vector<int> res; cin >> N >> M; for (int i = 0;i < N;i++) { long a, b; cin >> a >> b; n.push_back(make_pair(a, b)); } ...
a.cc:9:1: error: '::main' must return 'int' 9 | void main() { | ^~~~ a.cc: In function 'int main()': a.cc:42:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 42 | return; | ^~~~~~
s342482455
p03774
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> #include <map> #include <utility> #include <functional> using namespace std; int main() { int n, m, ab[50][2], cd[50][2]; cin >> n >> m; for (int i = 0; i < n; ++i) cin >> ab[i][0] >> ab[i][1]; for (int i = 0; i < m; ...
a.cc: In function 'int main()': a.cc:22:37: error: 'INT_MAX' was not declared in this scope 22 | pair<int, int> minp(INT_MAX, INT_MAX); | ^~~~~~~ a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits...
s137555251
p03774
C++
#include <iostream> #include <cmath> #include <vector> #include <limits> using namespace std; class Point{ public: int x,y; void set(int x1,int y1){x=x1;y=y1;} }; int calcDistance(Point p1, Point p2){ return abs(p1.x-p2.x)+abs(p1.y-p2.y); } int main(){ int N,M; vector<Point> spvec; cin >> N >...
a.cc: In function 'int main()': a.cc:33:19: error: 'INT_MAX' was not declared in this scope 33 | 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> +++ |+#include ...
s230473064
p03774
C++
#include <iostream> #include <cmath> #include <vector> using namespace std; class Point{ public: int x,y; void set(int x1,int y1){x=x1;y=y1;} }; int calcDistance(Point p1, Point p2){ return abs(p1.x-p2.x)+abs(p1.y-p2.y); } int main(){ int N,M; vector<Point> spvec; cin >> N >> M; for(int i...
a.cc: In function 'int main()': a.cc:32:19: error: 'INT_MAX' was not declared in this scope 32 | 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> +++ |+#include ...
s537946376
p03774
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.begin(),X.end() #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) for(int i=0;i<(int)(n);i++) #define pb push_back #define pii pair<int,int> #define mp make_...
a.cc: In function 'int main()': a.cc:19:11: error: redeclaration of 'int n' 19 | int n,n; | ^ a.cc:19:9: note: 'int n' previously declared here 19 | int n,n; | ^ a.cc:20:17: error: 'm' was not declared in this scope 20 | cin >> n >> m; | ^
s122872268
p03774
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.begin(),X.end() #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) for(int i=0;i<(int)(n);i++) #define pb push_back #define pii pair<int,int> #define mp make_...
a.cc: In function 'int main()': a.cc:19:11: error: redeclaration of 'int n' 19 | int n,n; | ^ a.cc:19:9: note: 'int n' previously declared here 19 | int n,n; | ^ a.cc:20:17: error: 'm' was not declared in this scope 20 | cin >> n >> m; | ^
s430839919
p03774
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.begin(),X.end() #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) for(int i=0;i<(int)(n);i++) #define pb push_back #define pii pair<int,int> #define mp make_...
a.cc: In function 'int main()': a.cc:19:11: error: redeclaration of 'int n' 19 | int n,n; | ^ a.cc:19:9: note: 'int n' previously declared here 19 | int n,n; | ^ a.cc:20:17: error: 'm' was not declared in this scope 20 | cin >> n >> m; | ^
s188390637
p03774
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.begin(),X.end() #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define REP(i,n) for(int i=0;i<(int)(n);i++) #define pb push_back #define pii pair<int,int> #define mp make_...
a.cc: In function 'int main()': a.cc:19:11: error: redeclaration of 'int n' 19 | int n,n; | ^ a.cc:19:9: note: 'int n' previously declared here 19 | int n,n; | ^ a.cc:20:17: error: 'm' was not declared in this scope 20 | cin >> n >> m; | ^
s818254785
p03774
C++
N,M = list(map(int, input().split())) s = [list(map(int,input().split())) for i in range(n)] c = [list(map(int,input().split())) for j in range(n)] for t1 in s: l = list(map(lambda x: abs(t1[0] - x[0]) + abs(t1[1] - x[1]), c)) print(l.index(min(l)) + 1)
a.cc:1:1: error: 'N' does not name a type 1 | N,M = list(map(int, input().split())) | ^
s983013754
p03774
C++
N,M = list(map(int, input().split())) s = [list(map(int,input().split())) for i in range(n)] c = [list(map(int,input().split())) for j in range(n)] for t1 in s: l = list(map(lambda x: abs(t1[0] - x[0]) + abs(t1[1] - x[1]), c)) print(l.index(min(l)) + 1)
a.cc:1:1: error: 'N' does not name a type 1 | N,M = list(map(int, input().split())) | ^
s863119633
p03774
C++
open System open System.IO let readInt () = int (Console.ReadLine()) let readInts () = (Console.ReadLine().Split(' ')) |> (Array.map int) let read2Ints () = let t = readInts() (t.[0], t.[1]) let read3Ints () = let t = readInts() (t.[0], t.[1], t.[2]) let inf = 1000000000 let manhattan (x, y) (z,...
a.cc:23:24: error: too many decimal points in number 23 | let s = [|for i in 1..n -> read2Ints() |] | ^~~~ a.cc:24:24: error: too many decimal points in number 24 | let p = [|for i in 1..m -> read2Ints() |] | ^~~~ a.cc:1:1: error: 'open' does not n...
s499492837
p03774
C++
// This file is a "Hello, world!" in C++ language by GCC for wandbox. #include <iostream> #include <cstdlib> using namespace std; int main() { int n,m; int x,y,z; int q = 1000000000; cin >> n >> m; int a[n],b[n],c[m],d[m]; int result[n]; for(int i = 0...
a.cc: In function 'int main()': a.cc:50:21: error: 'j' was not declared in this scope 50 | result[i] = j + 1; | ^
s987307277
p03774
C
#include <stdio.h> int Man(int x,y,z,w){ int e = x - y; int f = z - w; if(e<<0){ e = e * (-1); } if(f<<0){ f = f * (-1); } int g = e + f; return g; } int main(){ int N,M; int a[N],b[N],c[M],d[M]; int S; scanf("%d%d",&N,&M); for(int i=0;i<<N;i++){ scanf("%d%d\n",a[i],b[i]); } for(int i=0;i<<M;i++){...
main.c:2:15: error: unknown type name 'y' 2 | int Man(int x,y,z,w){ | ^ main.c:2:17: error: unknown type name 'z' 2 | int Man(int x,y,z,w){ | ^ main.c:2:19: error: unknown type name 'w' 2 | int Man(int x,y,z,w){ | ^ main.c: In function 'main'...
s715848405
p03774
C++
int main(void){ int N,M; cin >> N >> M; const int NMMAX = 50; int A[NMMAX], B[NMMAX], C[NMMAX], D[NMMAX]; for( int i = 0 ; i < N; ++i){ cin >> A[i] >> B[i]; } for( int j = 0; j < M; ++j){ cin >> C[j] >> D[j]; } for( int i = 0; i < N; ++ i){ int min_di...
a.cc: In function 'int main()': a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> N >> M; | ^~~ a.cc:18:20: error: 'abs' was not declared in this scope 18 | int min_dist = abs(A[i] - C[0]) + abs(B[i] - D[0]) , checkpoint = 1; | ^~~ a.cc:25:17: error: 'che...
s296014209
p03774
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; int a[n], b[n]; int i, j; for(i=1; i<=n; i++){ cin >> a[i] >> b[i];} int c[m], d[m]; for(j=1; j<=m; j++){ cin >> c[j] >> d[j];} int min[n], number[n], k, l; for(l=1; l<=n; l++){ min[l] = abs(a[l]-c[1])+abs(b[l]-d[1]); ...
a.cc: In function 'int main()': a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 21 | if(min > abs(a[l]-c[k])+abs(b[l]-d[k])){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:22:17: error: incompatible types in assignment of 'int' to 'int [n]' 22 | ...
s055156967
p03774
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; int a[n], b[n]; int i, j; for(i=1; i<=n; i++){ cin >> a[i] >> b[i];} int c[m], d[m]; for(j=1; j<=m; j++){ cin >> c[j] >> d[j];} int min[n], number[n], k, l; for(l=1; l<=n; l++){ min[l] = abs(a[l]-c[1])+abs(b[l]-d[1]); ...
a.cc: In function 'int main()': a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 21 | if(min > abs(a[l]-c[k])+abs(b[l]-d[k])){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:22:17: error: incompatible types in assignment of 'int' to 'int [n]' 22 | ...
s611044461
p03774
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; int a[n], b[n]; int i, j; for(i=1; i<=n; i++){ cin >> a[i] >> b[i];} int c[m], d[m]; for(j=1; j<=m; j++){ cin >> c[j] >> d[j];} int min[n], number[n], k, l; for(l=1; l<=n; l++){ min[l] = abs(a[l]-c[1])+abs(b[l]-d[1]); ...
a.cc: In function 'int main()': a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 21 | if(min > abs(a[l]-c[k])+abs(b[l]-d[k]){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:21:47: error: expected ')' before '{' token 21 | if(min > abs(a[l]-c[k])...
s102729324
p03774
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; int a[n], b[n]; int i, j; for(i=1; i<=n; i++){ cin >> a[i] >> b[i]}; int c[m], d[m]; for(j=1; j<=m; j++){ cin >> c[j] >> d[j]}; int min[n], number[n], k, l; for(l=1; l<=n; l++){ min[l] = abs(a[l]-c[1])+abs(b[l]-d[1]); ...
a.cc: In function 'int main()': a.cc:11:24: error: expected ';' before '}' token 11 | cin >> a[i] >> b[i]}; | ^ | ; a.cc:14:24: error: expected ';' before '}' token 14 | cin >> c[j] >> d[j]}; | ^ | ...
s073429728
p03774
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; int a[n], b[n]; int i, j; for(i=1; i<=n; i++) cin >> a[i] >> b[i]; int c[m], d[m]; for(j=1; j<=m; j++) cin >> c[j] >> d[j]; int min[n], number[n], k, l; for(l=1; l<=n; l++) min[l] = abs(a[l]-c[1])+abs(b[l]-d[1]); numbe...
a.cc: In function 'int main()': a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 21 | if(min > abs(a[l]-c[k])+abs(b[l]-d[k]){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:21:47: error: expected ';' before '{' token 21 | if(min > abs(a[l]-c[k])...
s660948009
p03774
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; int a[n], b[n]; int i, j; for(i=1; i<=n; i++) cin >> a[i] >> b[i]; int c[m], d[m]; for(j=1; j<=m; j++) cin >> c[j] >> d[j]; int min[n], number[n], k, l; for(l=1; l<=n; l++) min[l] = abs(a[l]-c[1])+abs(b[l]-d[1]); numbe...
a.cc: In function 'int main()': a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 21 | if(min > abs(a[l]-c[k])+abs(b[l]-d[k]){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:21:47: error: expected ';' before '{' token 21 | if(min > abs(a[l]-c[k])...
s191104218
p03774
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int data = 99999999; int check = 0; int min = 99999999; for(int i =...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s010115156
p03774
Java
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int min = 99999999; int index = 0; int ...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s872474618
p03774
Java
import java.util.Scanner; public class cheakpoint { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int min = 99999999; int index = 0; ...
Main.java:3: error: class cheakpoint is public, should be declared in a file named cheakpoint.java public class cheakpoint { ^ 1 error
s146021729
p03774
Java
import java.util.Scanner; public class B_cheakpoint { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int min = 99999999; int index = 0...
Main.java:3: error: class B_cheakpoint is public, should be declared in a file named B_cheakpoint.java public class B_cheakpoint { ^ 1 error
s195292776
p03774
Java
import java.util.Scanner; public class cheak { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int min = 100000001,index = 0,date = 100...
Main.java:2: error: class cheak is public, should be declared in a file named cheak.java public class cheak { ^ 1 error
s802889252
p03774
Java
import java.util.Scanner; public class cheak { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int min = 100000001,index = 0,date = 100...
Main.java:2: error: class cheak is public, should be declared in a file named cheak.java public class cheak { ^ 1 error
s730763114
p03774
Java
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int data = 99999999; int check = 0; int min...
Main.java:2: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s779562396
p03774
Java
import java.util.Scanner; public class B_checkpoint { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int data = 99999999; int check = 0; ...
Main.java:2: error: class B_checkpoint is public, should be declared in a file named B_checkpoint.java public class B_checkpoint { ^ 1 error
s360298263
p03774
Java
import java.util.Scanner; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int data = 99999999,check = 0,min = 99999999; for(int i = 0;i < n;i++){ a...
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s945065280
p03774
Java
import java.util.Scanner; public class B_checkpoint { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int data = 99999999,check = 0,min...
Main.java:2: error: class B_checkpoint is public, should be declared in a file named B_checkpoint.java public class B_checkpoint { ^ 1 error
s301457223
p03774
Java
package spring; import java.util.Scanner; public class B_checkpoint { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int[] a = new int[n]; int[] b = new int[n]; int[] c = new int[m]; int[] d = new int[m]; int data = 0,chec...
Main.java:3: error: class B_checkpoint is public, should be declared in a file named B_checkpoint.java public class B_checkpoint { ^ 1 error
s802919635
p03774
C++
#include<bits/stdc++.h> using namespace std; void rd(int &x){ int k, m=0; x=0; for(;;){ k = getchar_unlocked(); if(k=='-'){ m=1; break; } if('0'<=k&&k<='9'){ x=k-'0'; break; } } for(;;){ k = getchar_unlocked(); if(k<'0'||k>'9'){ break; } x=x*10...
a.cc: In function 'int main()': a.cc:56:29: error: expected primary-expression before ';' token 56 | for(Lj4PdHRW=0;Lj4PdHRW<;Lj4PdHRW++){ | ^ a.cc:63:29: error: expected primary-expression before ';' token 63 | for(KL2GvlyY=0;KL2GvlyY<;KL2GvlyY++){ | ...
s240049012
p03774
Java
public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner s=new Scanner(System.in); int N=s.nextInt();//学生 int M=s.nextInt();//チェックポイント long a[]=new long[N];//学生の位置 long b[]=new long[N]; long c[]=new long[M];//チェックポイントの位置 long d[]=new long[M]; long...
Main.java:6: error: cannot find symbol Scanner s=new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner s=new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s385938143
p03774
C++
#include <bits/stdc++.h> #define pb push_back #define F first #define S second #define MAX_N 60 using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef vector<int> vi; pii students[MAX_N]; pii checkP[MAX_N]; int main(){ ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int n,m; ...
a.cc: In function 'int main()': a.cc:27:75: error: 'pii' {aka 'struct std::pair<int, int>'} has no member named 'A' 27 | cdist = (abs(students[i].F - checkP[i].F)) + (abs(students[i].A - checkP[i].S)); | ^
s328220031
p03774
Java
import java.util.*; public class Main{ public static void main(String[] args){ try(Scanner sc = new Scanner(System.in) { int N = sc.nextInt(), M = sc.nextInt(); long[] a = new long[N], b = new long[N]; long[] c = new long[M...
Main.java:9: error: illegal start of type for(int i = 0; i < N; i++) { ^ Main.java:9: error: > or ',' expected for(int i = 0; i < N; i++) { ^ Main.java:9: error: <identifier> expected ...
s770677103
p03774
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int a[]=new int[n]; int b[]=new int[n]; int c[]=new int[m]; int d[]=new int[m]; int e[]=new int[m]; int min[]=new int[n]; int minIdx[]=n...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s314805077
p03774
C++
#include <iostream> using namespace std; int main() { int N, M; cin >> N >> M; int student[N][2], check[M][2]; for (int i = 0; i< N; i++) cin >> student[i][0] >> student[i][1]; for (int i = 0; i< M; i++) cin >> check[i][0] >> check[i][1]; int distance[N][M]; for (int i = 0; ...
a.cc: In function 'int main()': a.cc:20:9: error: expected ',' or ';' before 'for' 20 | for (; j < M; j++) | ^~~ a.cc:20:26: error: expected ';' before ')' token 20 | for (; j < M; j++) | ^ | ;
s859196228
p03774
C++
#include<iostream> #include<math.h> using namespace std; int main(){ int N,M,i,j; cin >> N,M; cout << abs(N) < endl; int a[N],b[N],c[M],d[M]; for(i=0;i<N;i++){ cin >> a[i] >>b[i]; } for(j=0;j<M;j++){ cin >> c[j] >>d[j]; } for(i=0; i < N;i++){ int temp=0; for(j=0;j<M;j++){ if(abs...
a.cc: In function 'int main()': a.cc:8:18: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout << abs(N) < endl; | ~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c...
s537250033
p03774
C++
#include<iostream> #include<math.h> using namespace std; int main(){ int N,M,i,j; cin >> N,M; cout << abs(N) < endl; int a[N],b[N],c[M],d[M]; for(i=0;i<N;i++){ cin >> a[i] >>b[i]; } for(j=0;j<M;j++){ cin >> c[j] >>d[j]; } for(i=0; i < N;i++){ int temp=0; for(j=0;j<M;j++){ if(abs...
a.cc: In function 'int main()': a.cc:8:18: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout << abs(N) < endl; | ~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c...
s047604241
p03774
C++
#include<iostream> #include<math.h> using namespace std; int main(){ int N,M,i,j; cin >> N,M; cout << abs(N) < endl; int a[N],b[N],c[M],d[M]; for(i=0;i<N;i++){ cin >> a[i] >>b[i]; } for(j=0;j<M;j++){ cin >> c[j] >>d[j]; } for(i=0; i < N;i++){ int temp=0; for(j=0;j<M;j++){ if(abs...
a.cc: In function 'int main()': a.cc:8:18: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout << abs(N) < endl; | ~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c...
s379336620
p03774
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cmath> using namespace std; typedef pair<int, int> P; #define rep(i, n) for (int i=0; i<(n); i++) #define all(c) (c).begin(), (c).end() #define uniq(c) c.erase(unique(...
a.cc: In function 'int main()': a.cc:32:13: error: 'INT_MAX' was not declared in this scope 32 | int m = INT_MAX, mi = -1; | ^~~~~~~ a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 9 | #include <cmath> +++ |+#include <cl...
s321042813
p03774
C++
#include<stdio.h> int main(void) { int n,m,i,j,t; int a[51],b[51],c[51],d[51]; int dist[51][51]; scanf("%d %d",&n,&m); for(i=0;i<n;i++) scanf("%d %d",&a[i],&b[i]); for(i=0;i<m;i++) scanf("%d %d",&c[i],&d[i]); for(i=0;i<n;i++){ for(j=0;j<m;j++){ dist[i][j]=abs(a[i]-c[j])+abs(b[i]-d[j]); } t=0; for(...
a.cc: In function 'int main()': a.cc:14:36: error: 'abs' was not declared in this scope 14 | dist[i][j]=abs(a[i]-c[j])+abs(b[i]-d[j]); | ^~~
s506734859
p03774
Java
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); int students [] [] = new int [n] [2]; int points [] [] = new int [m] [2]; for (int i = 0 ; i < n ; i++) { students [i] ...
Main.java:31: error: cannot find symbol System.out.prntln(result [i]); ^ symbol: method prntln(int) location: variable out of type PrintStream 1 error
s885944227
p03774
Java
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); int students [] [] = new int [n] [2]; int points [] [] = new int [m] [2]; for (int i = 0 ; i < n ; i++) { students [i] ...
Main.java:31: error: cannot find symbol System.out.prntln(results [i]); ^ symbol: variable results location: class Main 1 error
s886677816
p03774
Java
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); int students [] [] = new int [n] [2]; int points [] [] = new int [m] [2]; for (int i = 0 ; i < n ; i++) { students [i] ...
Main.java:31: error: cannot find symbol System.out.prntln(results [i]); ^ symbol: variable results location: class Main 1 error
s677727731
p03774
C++
#include <iostream> #Include <vector> #include <algorithm> using namespace std; struct Point { int x, y; Point(int x, int y):x(x), y(y) { } }; int main() { int N, M; cin >> N >> M; vector<Point> a(N); vector<Point> b(M); for (int i = 0; i < N; i++) { int x, y; cin >> x >> y; a[i] = Point(x, ...
a.cc:2:2: error: invalid preprocessing directive #Include; did you mean #include? 2 | #Include <vector> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:14:3: error: 'vector' was not declared in this scope 14 | vector<Point> a(N); | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined ...
s254538443
p03774
Java
import java.util.Scanner; public class ABC057B { public static void main(String[] args) { ABC057BSolve solve = new ABC057BSolve(); solve.main(); } } class ABC057BSolve { Point[] checkPoints; Point[] students; int N; int M; ABC057BSolve() { Scanner cin = new Scanner(System.in); this.N = cin.nextInt()...
Main.java:2: error: class ABC057B is public, should be declared in a file named ABC057B.java public class ABC057B { ^ 1 error
s713291155
p03774
C++
#include<bits/stdc++.h> #include<stdlib.h> using namespace std; int a[100],b[100], c[100], d[100], ans[100], mini[100]; int main(void){ int n, m; cin >> n >> m; for(int i=0;i<n;i++) cin >> a[i] >> b[i]; for(int i=0;i<m;i++) cin >> c[i] >> d[i]; for(int i=0;i<n;i++){ mini[i] = INT_MAX; for(int j=0;j<m;j++){ if...
a.cc: In function 'int main()': a.cc:13:74: error: no matching function for call to 'abs()' 13 | if (abs(a[i]-c[j])+abs(b[i]-d[j])<mini[i]) {ans[i] = j+1; mini[i] = abs()+abs();} | ~~~^~ In file included from /usr/include/c++/14/valarray:6...
s465843924
p03774
C++
#include<bits/stdc++.h> using namespace std; int a[100],b[100], c[100], d[100], ans[100], mini[100]; int main(void){ int n, m; cin >> n >> m; for(int i=0;i<n;i++) cin >> a[i] >> b[i]; for(int i=0;i<m;i++) cin >> c[i] >> d[i]; for(int i=0;i<n;i++){ mini[i] = INT_MAX; for(int j=0;j<m;j++){ if (abs(a[i]-c[j])+ab...
a.cc: In function 'int main()': a.cc:12:74: error: no matching function for call to 'abs()' 12 | if (abs(a[i]-c[j])+abs(b[i]-d[j])<mini[i]) {ans[i] = j+1; mini[i] = abs()+abs();} | ~~~^~ In file included from /usr/include/c++/14/valarray:6...
s038416900
p03774
C++
#include<bits/stdc++.h> using namespace std; int a[100],b[100], c[100], d[100], ans[100], mini[100]; int main(void){ int n, m; cin >> n >> m; for(int i=0;i<n;i++) cin >> a[i] >> b[i]; for(int i=0;i<m;i++) cin >> c[i] >> d[i]; for(int i=0;i<n;i++){ mini[i] = INT_MAX; for(int j=0;j<m;j++){ if (abs(a[i]-c[j])+ab...
a.cc: In function 'int main()': a.cc:12:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if (abs(a[i]-c[j])+abs(b[i]-d[j])<mini) {ans[i] = j+1; mini[i] = abs()+abs();} | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ a.cc:12:71: error: no matching function for call to 'abs()' ...
s340358487
p03774
Java
public class Main { public static void main(String a[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), m = sc.nextInt(); int s[] = new int [n * 2]; int c[] = new int [m * 2]; for (int i = 0; i < n; ++i) { s[i * 2] = sc.nextInt(); s[i * 2 + 1] = sc.nextInt(); } for (int i = 0; i...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s842159770
p03774
C++
#include<iostream> #include<cmath> #define MAX 1000000007 using namespace std; int a[55][2]; int b[55][2]; int main(){ int n,m; int i,j,k; int s[2]; cin>>n>>m; for(i=0;i<n;i++){ cin>>a[i][0]>>a[i][1]; } for(i=0;i<m;i++){ cin>>b[i][0]>>b[i][1]; } for(i=0;i<n;i++){ s[0]=MAX,s[1]=0; for(j=0;j<m;j++)a{ ...
a.cc: In function 'int main()': a.cc:21:34: error: expected ';' before '{' token 21 | for(j=0;j<m;j++)a{ | ^ | ;
s508255081
p03774
Java
import java.util.*; import java.io.*; public class CF_C { public static void main(String[] args) throws Exception { FastScanner fs = new FastScanner(); PrintWriter out = new PrintWriter(System.out); int n = fs.nextInt(), m = fs.nextInt(); int[][] a = new int[n][2]; int[][] ...
Main.java:4: error: class CF_C is public, should be declared in a file named CF_C.java public class CF_C { ^ 1 error
s878504294
p03774
C
#include <stdio.h> #include <stdlib.h> int main(int argc, char const *argv[]) { int n, m, answer[50]; long a[50], b[50], c[50], d[50]; int i, j, min, mindex, temp; long min, temp; scanf("%d%d", &n, &m); for(i=0;i<n;i++) { scanf("%ld%ld", a+i, b+i); } for(i=0;i<m;i++) { scanf("%ld%ld", c+i, d+i)...
main.c: In function 'main': main.c:9:8: error: conflicting types for 'min'; have 'long int' 9 | long min, temp; | ^~~ main.c:8:13: note: previous declaration of 'min' with type 'int' 8 | int i, j, min, mindex, temp; | ^~~ main.c:9:13: error: conflicting types for 'temp'; have ...
s490226453
p03774
C++
#include <stdio.h> #include <stdlib.h> int main(int argc, char const *argv[]) { int n, m, a[50], b[50], c[50], d[50], answer[50]; int i, j, k, min, mindex; scanf("%d%d", &n, &m); for(i=0;i<n;i++) { scanf("%d", a+i, b+i); } for(i=0;i<m;i++) { scanf("%d", c+i, b+i); } for(i=0;i<n;i++) { min =...
a.cc: In function 'int main(int, const char**)': a.cc:17:15: error: expected ';' before ':' token 17 | mindex = 0: | ^ | ; a.cc:18:20: error: expected ';' before ')' token 18 | for(j=0;j<m;j++) { | ^ | ;
s733464295
p03774
C++
#include <stdio.h> #include <string.h> #include <iostream> #include <vector> #include <math.h> using namespace std; // 問2 class cPOINT{ public: long lnX; long lnY; cPOINT() { lnX = 0; lnY = 0; }; cPOINT& operator=(const cPOINT &obj); cPOINT operator-(const cPOINT &obj); double calc(); }; cPOINT& cPOINT::operat...
a.cc: In function 'int main()': a.cc:70:36: error: 'LONG_MAX' was not declared in this scope 70 | double dbNearVal = LONG_MAX; // 1番近いチェックポイントまでの距離 | ^~~~~~~~ a.cc:7:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#...
s264105676
p03774
Java
1. import java.util.*; 2. class Main{ 3. public static void main(String[]args){ 4. Scanner cin=new Scanner(System.in); 5. int numS; 6. int numC; 7. int count =0; 8. int kx; 9. int ky; 10. int result; 11. int temp; 12. 13. numS = cin.nextIn...
Main.java:1: error: class, interface, enum, or record expected 1. import java.util.*; ^ Main.java:2: error: class, interface, enum, or record expected 2. class Main{ ^ Main.java:3: error: illegal start of type 3. public static void main(String[]args){ ^ Main.java:4: error: not a statement 4. Scanner cin=new...
s581514785
p03774
Java
import java.util.*; class Main{ public static void main(String[]args){ Scanner cin=new Scanner(System.in); int numS; int numC; int student = new int[]; int checkp = new int[]; int count =0; int kx; int ky; int result; int temp; ...
Main.java:7: error: array dimension missing int student = new int[]; ^ Main.java:8: error: array dimension missing int checkp = new int[]; ^ Main.java:33: error: illegal character: '\u3000' ??? result = 0; ^ Main.java:33: error: illegal charac...
s014419791
p03774
C++
#include <bits/stdc++.h> #include <iomanip> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef pair<LL, LL> PLL; typedef long double LD; typedef pair<LD, LD> PLDLD; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define CLR(a) memset((a), 0 ,sizeof(a)) #define AL...
a.cc: In function 'int main()': a.cc:52:7: error: expected primary-expression before '/' token 52 | }*/ | ^ a.cc:53:1: error: expected primary-expression before '}' token 53 | } | ^
s355699313
p03774
C++
#include<stdio.h> #include<math.h> int main() { int n, m; scanf("%d%d", &n, &m); double a[50]; double b[50]; double c[50]; double d[50]; double h = pow(10, 8),i,g; for (int k = 0; k < n; k++) { scanf_s("%lf%lf", &a[k], &b[k]); } for (int k = 0; k < m; k++) { scanf_s("%lf%lf", &c[k], &d[k]); } for (int e...
a.cc: In function 'int main()': a.cc:12:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 12 | scanf_s("%lf%lf", &a[k], &b[k]); | ^~~~~~~ | scanf a.cc:15:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? ...
s552654574
p03774
C++
#include<stdio.h> #include<math.h> int main() { int n, m; scanf_s("%d%d", &n, &m); double a[50]; double b[50]; double c[50]; double d[50]; double h = pow(10, 8),i,g; for (int k = 0; k < n; k++) { scanf_s("%lf%lf", &a[k], &b[k]); } for (int k = 0; k < m; k++) { scanf_s("%lf%lf", &c[k], &d[k]); } for (int...
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d%d", &n, &m); | ^~~~~~~ | scanf
s287789681
p03774
C
#include<stdio.h> #include<math.h> int main() { int n, m; scanf_s("%d%d", &n, &m); double a[50]; double b[50]; double c[50]; double d[50]; double h = pow(10, 8),i,g; for (int k = 0; k < n; k++) { scanf_s("%lf%lf", &a[k], &b[k]); } for (int k = 0; k < m; k++) { scanf_s("%lf%lf", &c[k], &d[k]); } for (int...
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%d%d", &n, &m); | ^~~~~~~ | scanf
s903795954
p03774
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { // freopen("/Users/balazskemenes/Documents/temp/practise/src/problems/input.txt","r",stdin); int studentCount; cin >> studentCount; int checkpointCount; cin >> checkpointCount; vector<i...
a.cc: In function 'int main()': a.cc:83:30: error: 'INT_MAX' was not declared in this scope 83 | double minDistance = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <cma...
s064707400
p03774
Java
public class ABC057b { static int[] measureDistance(int x,int y,int[] arrx, int[] arry){ int[] arrDistance = new int[arrx.length]; for(int i = 0; i < arrx.length; i++) { int dx = x - arrx[i]; int dy = y - arry[i]; if(dx < 0){ dx = -1 * dx; ...
Main.java:1: error: class ABC057b is public, should be declared in a file named ABC057b.java public class ABC057b { ^ Main.java:36: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class ABC057b Main.java:36: error: cannot find symbol ...
s604802614
p03774
C++
#pragma warning(disable:4996) #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<vector> #include<algorithm> #include<iostream> #include<time.h> #include<map> #include<set> #include<sstream> #include<cassert> using namespace std; const int INF = 0x3f3f3f3f; int p1() { int a,b; cin >> ...
a.cc: In function 'void p2()': a.cc:45:14: error: 'INT_MAX' was not declared in this scope 45 | int ma = INT_MAX; | ^~~~~~~ a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 13 | #include<cassert> +++ |+#include <climits> ...
s576258108
p03774
C++
#include <iostream> #include <math.h> using namespace std; int n, m, a[50], b[50], c[51], d[51], ans = 0, max = 0; int main(){ cin >> n >> m; for (int i = 0; i < n; i++){ cin >> a[i] >> b[i]; } for (int i = 1; i <= m; i++){ cin >> c[i] >> d[i]; } for (int i = 0; i < n; i++){ max = abs(a[i] - c[1]) + abs...
a.cc: In function 'int main()': a.cc:18:17: error: reference to 'max' is ambiguous 18 | max = abs(a[i] - c[1]) + abs(b[i] - d[1]); | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from...
s158218370
p03774
C++
#include<bits/stdc++.h> using namespace std; int n,m; set<int>q; int dis(int x1,int y1,int x2,int y2) { return abs(x1-x2)+abs(y1-y2); } int x1[10000],y1[100000],x2[10000],y2[100000]; int main() { cin>>n>>m; for(int i=1;i<=n;i++) { cin>>x1[i]>>y1[i]; } for(int i=1;i<=m;i++) { ...
a.cc:9:24: error: 'int y1 [100000]' redeclared as different kind of entity 9 | int x1[10000],y1[100000],x2[10000],y2[100000]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /us...
s711000595
p03774
C++
#include<cstdio> #include<conio.h> #include<math.h> #include<algorithm> using namespace std; int a[100],b[100],x[100],y[100],lon[100],ans[100]; int main(){ int n,m,i,j; scanf("%d %d",&n,&m); for(i=0;i<n;i++){ scanf("%d %d",&a[i],&b[i]); } for(i=0;i<m;i++){ scanf("%d %d"...
a.cc:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s912354797
p03774
C++
#include <iostream> #include <vector> using namespace std; int main() { // // // int A; // cin >> A; //// A = 9; // // int B; // cin >> B; //// B = 12; // // // cout << (A + B) % 24; // ------------------------------------------------------------------------------------------ ...
a.cc: In function 'int main()': a.cc:97:30: error: 'INT_MAX' was not declared in this scope 97 | double minDistance = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <vec...
s726727424
p03774
C++
#include <string> #include <vector> #include <utility> #include <map> #include <algorithm> using namespace std; typedef pair<int, int> coord; int distance(int x1, int y1, int x2, int y2) { return abs(x1 - x2) + abs(y1 - y2); } int main() { int N, M; cin >> N >> M; vector<coord> students(N); vector<coord> ...
a.cc: In function 'int main()': a.cc:19:3: error: 'cin' was not declared in this scope 19 | cin >> N >> M; | ^~~ a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include <algorithm> +++ |+#include <iostream> 6 | a.cc:35:3...
s735625251
p03774
C++
#include <bits/stdc++.h> using namespace std; int a[100], b[100], c[100], d[100]; int n, m; int main(){ scanf("%d %d", &n, &m); for(int i = 0; i < n; i++) scanf("%d %d", a+i, b+i); for(int i = 0; i < m; i++) scanf("%d %d", c+i, d+i); for(int i = 0; i < n; i++){ int ans = 0, mn = 1000000000; for(int j...
a.cc: In function 'int main()': a.cc:21:64: error: invalid types 'int[int]' for array subscript 21 | int d = abs(a[i] - c[j]) + abs(b[i] - d[j]); | ^
s318893430
p03774
C++
#include <set> #include <map> #include <queue> #include <deque> #include <cstdio> #include <string> #include <vector> #include <math.h> #include <time.h> #include <utility> #include <cstdlib> #include <sstream> #include <cstring> #include <stdio.h> #include <iomanip> #include <conio.h> #include <iostream> #include <alg...
a.cc:16:10: fatal error: conio.h: No such file or directory 16 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s278927648
p03774
C++
#include <stdio.h> #include <cstdlib> int main(void) { int n, m; scanf("%i %i", &n, &m); int a[n], b[n]; for (int i = 0; i < n; i++) { scanf("%i %i", &a[i], &b[i]); } int c[m], b[m]; for (int i = 0; i < m; i++) { scanf("%i %i", &c[i], &d[i]); } for (int i = 0; i < n; i++) { int ...
a.cc: In function 'int main()': a.cc:13:13: error: conflicting declaration 'int b [m]' 13 | int c[m], b[m]; | ^ a.cc:8:13: note: previous declaration as 'int b [n]' 8 | int a[n], b[n]; | ^ a.cc:15:28: error: 'd' was not declared in this scope 15 | scanf("%i %i", &c[...
s368371073
p03774
C++
#include <iostream> #include <cmath> #define INF 1e+9 using namespace std; int main(){ int n,m,a[50],b[50],c[50],d[50]; cin >> n >> m; for(int i = 0;i < n;i++){ cin >> a[i] >> b[i]; } for(int i = 0;i < m;i++) cin >> c[i] >> d[i]; for(int i = 0;i < n;i++){ int mi = INF,mii; for(int j = 0;j < m;j++){ int ...
a.cc: In function 'int main()': a.cc:16:64: error: invalid types 'int[int]' for array subscript 16 | int d = abs(a[i] - c[j]) + abs(b[i] - d[j]); | ^
s748965617
p03775
C++
#include <bits/stdc++.h> using namespace std; const int64_t MOD = 1000000007; typedef int64_t ll; typedef uint64_t ull; #define FOR(i, start, end) for(uint64_t i=start; i<end; i++) #define REP(i, n) FOR(i, 0, n) // 最大公約数gcd // 最小公倍数lcm=m*n/gcd uint64_t gcd(uint64_t m, uint64_t n) { uint64_t temp; while (m % n !=...
a.cc: In function 'int main()': a.cc:124:11: error: 'z' was not declared in this scope 124 | a = n;z | ^
s613907365
p03775
C++
#include <bits/stdc++.h> using namespace std; int Decimal(int N){ int num=0; while(N!=0){ N=N/10; num++; } return num; } int main(){ int N; //Nの数 long B=1; //AとBの数の入れ物を用意 int ans=12; /////入力部///// cin >> N; int ans=Decimal(N); //1の時の値 for (long A=2;A*A<=N;A++){ if(N%i ==...
a.cc: In function 'int main()': a.cc:21:7: error: redeclaration of 'int ans' 21 | int ans=Decimal(N); //1の時の値 | ^~~ a.cc:17:7: note: 'int ans' previously declared here 17 | int ans=12; | ^~~ a.cc:24:10: error: 'i' was not declared in this scope 24 | if(N%i == 0){ | ...
s037851236
p03775
C++
#include <bits/stdc++.h> using namespace std; int Decimal(int N){ int num=0; while(N!=0){ N=N/10; num++; } return num; } int main(){ int N; //Nの数 int A=1,B=1,C=0; //AとBの数の入れ物を用意 int ans=12; /////入力部///// cin >> N; int ans=Decimal(N); //1の時の値 for (long i=2;i^2<=N;i++){ if...
a.cc: In function 'int main()': a.cc:21:7: error: redeclaration of 'int ans' 21 | int ans=Decimal(N); //1の時の値 | ^~~ a.cc:17:7: note: 'int ans' previously declared here 17 | int ans=12; | ^~~
s991290176
p03775
C++
#include <bits/stdc++.h> using namespace std; int Decimal(int N){ int num=0; while(N==0){ N=N/10; num++; } return num; } int main(){ int N; //Nの数 int A=1,B=1,C=0; //AとBの数の入れ物を用意 int ans=12; /////入力部///// cin << N; for (int i=1;i<=N;i++){ for(int j=1;j<=N;j++){ if(i*j == N)...
a.cc: In function 'int main()': a.cc:18:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 18 | cin << N; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:18:7: note: candidate: 'oper...
s428162841
p03775
C++
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using ll = long long; const int mod = 1000000007; const double PI = acos(-1); int main() { ll n; cin >> n; ll ans = INT_MAX; for (ll a = 1; a <= sqrt(n); a++) { ll b = n / a; ll f = max(to_string(a).size(), to_string(b).size()); ans = min(a...
a.cc:2:10: fatal error: atcoder/all: No such file or directory 2 | #include <atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s841558430
p03775
C++
#include <bits/stdc++.h> using namespace std; using namespace atcoder; using ll = long long; using mint = modint; const int mod = 1000000007; const double PI = acos(-1); int main() { ll n; cin >> n; int ans = INT_MAX; for (ll a = 1; a <= sqrt(n); a++) { ll b = n / a; int f = max(to_string(a).size(), to_string(...
a.cc:3:17: error: 'atcoder' is not a namespace-name 3 | using namespace atcoder; | ^~~~~~~ a.cc:5:14: error: 'modint' does not name a type; did you mean 'mode_t'? 5 | using mint = modint; | ^~~~~~ | mode_t
s695147508
p03775
C++
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using mint = modint; const int mod = 1000000007; const double PI = acos(-1); int main() { ll n; cin >> n; int ans = INT_MAX; for (ll a = 1; a <= sqrt(n); a++) { ll b = n / a; int f = max(to_strin...
a.cc:2:10: fatal error: atcoder/all: No such file or directory 2 | #include <atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s551229345
p03775
Java
import java.util.*; public class Main2 { public static void main(String args[]) { Scanner sc=new Scanner(System.in); long n=sc.nextLong(); long right; long left; long min=1000000000; long max; for(long i=1;i<=n/2;i++) { if(n%i==0) { right=n/i; if(right>i) max=right; else max=i;...
Main.java:5: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s157699182
p03775
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long ll keta(ll n){ ll i,ans=0; while(n>0){ n/=10; ans++; } return ans; } int main(){ ll n; cin >> n; ll i,cp=n,ans=1000; for(i=1;i*i<=n;i++){ if(cp%i==0){ ll q=cp/i; ...
a.cc:30:1: error: expected declaration before '}' token 30 | } | ^
s478811699
p03775
C++
#include<bits/stdc++.h> using namespace std; int check( int i ) { int count = 0; while( i ) { i /= 10; count++; } return count; } int main( void ) { long int N; cin >> N; long int A, B; long int = max, min; min = 1000; for( int i = 1; i <= N; i++ ) { if( i * ( N / i ) == N ) { ...
a.cc: In function 'int main()': a.cc:20:12: error: expected unqualified-id before '=' token 20 | long int = max, min; | ^ a.cc:22:9: error: overloaded function with no contextual type information 22 | min = 1000; | ^~~~ a.cc:29:15: error: overloaded function with no contextual t...