submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s339232878 | p03774 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
int[][] a = new int[n][2];
for(int i=0; i<n; i++){
for(int j=0; j<2; j++){
a[i][j] = scn.nextInt();
... | Main.java:32: error: reached end of file while parsing
}
^
1 error
|
s153915545 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,M,min_i,min_j,check;
cin >> N >> M;
vector<int> a(N);vector<int> b(N);vector<int> c(M);vector<int> d(M);
for(int i=0; i<N; i++) cin >> a.at(i) >> b.at(i);
for(int i=0; i<M; i++) cin >> c.at(i) >> d.at(i);
for(int i=0; i<N; i++){
min_i = ab... | a.cc: In function 'int main()':
a.cc:21:27: error: expected '}' at end of input
21 | cout << check << endl;
| ^
a.cc:11:25: note: to match this '{'
11 | for(int i=0; i<N; i++){
| ^
a.cc:21:27: error: expected '}' at end of input
21 | cout ... |
s559102005 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
template<typename T> void drop(const T &x){cout<<x<<endl;exit(0);}
int man(int x1, int x2, int y1, int y2) {
return abs(x1-x2)+abs(y1-y2);
}
void solve() {
int n, m;
cin >> n >> m;
vector<pair<int,int>> a(n), b(m);
for(int i=0; i<n; ++i) c... | a.cc: In function 'void solve()':
a.cc:29:1: error: a template declaration cannot appear at block scope
29 | template<typename T> void drop(const T &x){cout<<x<<endl;exit(0);}
| ^~~~~~~~
a.cc:35:14: error: a function-definition is not allowed here before '{' token
35 | void solve() {
| ^
... |
s682239469 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
int main() {
ll N,M;
cin>>N>>M;
vector<vector<ll>> A(2,vector<ll>(N));
for(ll i=0;i<N;i++) {
cin>>vec[0][i]>>vec[1][i];
}
vector<vector<ll>> B(2,vector<ll>(M));
for(ll i=0;i<M;i++) {
cin>>B[0][i]>>B[1][i];... | a.cc: In function 'int main()':
a.cc:11:6: error: 'vec' was not declared in this scope
11 | cin>>vec[0][i]>>vec[1][i];
| ^~~
a.cc:23:49: error: expected ')' before '{' token
23 | if(L>abs(A[0][i]-B[0][j])+abs(A[1][i]-B[1][j]) {
| ~ ^~
| ... |
s756467603 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:89:2: error: expected '}' at end of input
89 | }
| ^
a.cc:56:12: note: to match this '{'
56 | int main() {
| ^
|
s656366232 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
define inf 1072114514
define llinf 4154118101919364364
define mod 1000000007
define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int a,in... | a.cc:4:1: error: 'define' does not name a type
4 | define inf 1072114514
| ^~~~~~
a.cc:47:10: error: 'i' was not declared in this scope; did you mean 'ii'?
47 | int forr(i,a,b) for(int i=(a); i<(b); i++)
| ^
| ii
a.cc:47:12: error: 'a' was not declared in this scope
47 | in... |
s926826629 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
define inf 1072114514
define llinf 4154118101919364364
define mod 1000000007
define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int a,in... | a.cc:4:1: error: 'define' does not name a type
4 | define inf 1072114514
| ^~~~~~
a.cc:47:1: error: 'define' does not name a type
47 | define forr(i,a,b) for(int i=(a); i<(b); i++)
| ^~~~~~
a.cc:47:35: error: 'i' does not name a type; did you mean 'ii'?
47 | define forr(i,a,b) for(int i=(a); i<(b)... |
s549906471 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:62:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'at'
62 | cin >> s.at(i).at(0) >> s.at(i).at(1) ;
| ^~
a.cc:62:37: error: '__gnu_c... |
s595359125 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:62:16: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'} and 'int')
62 | cin >> s[i][0] >> s[i][1] ;
| ^
a.cc:62:27: error: n... |
s573412213 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N , M ;
cin >> N >> M ;
vector<int> A(N) ;
vector <int> B(N) ;
for ( int i=0 ; i<N ; i++){
cin >> A[i] >> B[i] ;
}
vector<int> C(N) ;
vector <int> D(N) ;
for ( int i=0 ; i<M ; i++){
cin >> C[i] >> D[i] ;
}
vector<int> p(N)... | a.cc: In function 'int main()':
a.cc:28:12: error: 'i' was not declared in this scope
28 | cout << p[i] << endl;
| ^
|
s552422138 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N , M ;
cin >> N >> M ;
vector<int> A(N) ;
vector <int> B(N) ;
for ( int i=0 ; i<N ; i++){
cin >> A[i] >> B[i] ;
}
vector<int> C(N) ;
vector <int> D(N) ;
for ( int i=0 ; i<M ; i++){
cin >> C[i] >> D[i] ;
}
vector<int> p(N)... | a.cc: In function 'int main()':
a.cc:24:40: error: expected ')' before ';' token
24 | md[i]=abs(C[j]-A[i])+abs(D[j]-B[i] ;
| ~ ^ ~
| )
a.cc:28:12: error: 'i' was not declared in this scope
28 | cout << p[i] << endl;
... |
s098314905 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N , M ;
cin >> N >> M ;
vector<int> A(N) ;
vector <int> B(N) ;
for ( int i=0 ; i<N ; i++){
cin >> A[i] >> B[i] ;
}
vector<int> C(N) ;
vector <int> D(N) ;
for ( int i=0 ; i<M ; i++){
cin >> C[i] >> D[i] ;
}
vector<int> p(N)... | a.cc: In function 'int main()':
a.cc:22:10: error: no match for call to '(std::vector<int>) (int&)'
22 | if (md(i)>abs(C(j)-A(i))+abs(D(j)-B(i))){
| ~~^~~
a.cc:22:19: error: no match for call to '(std::vector<int>) (int&)'
22 | if (md(i)>abs(C(j)-A(i))+abs(D(j)-B(i))){
| ... |
s235187440 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N , M ;
cin >> N >> M ;
vector<int> A(N) ;
vector <int> B(N) ;
for ( int i=0 ; i<N ; i++){
cin >> A[i] >> B[i] ;
}
vector<int> C(N) ;
vector <int> D(N) ;
for ( int i=0 ; i<M ; i++){
cin >> C[i] >> D[i] ;
}
vector<int> p(N)... | a.cc: In function 'int main()':
a.cc:22:10: error: no match for call to '(std::vector<int>) (int&)'
22 | if (md(i)>abs(C(j)-A(i))+abs(D(j)-B(i))){
| ~~^~~
a.cc:22:19: error: no match for call to '(std::vector<int>) (int&)'
22 | if (md(i)>abs(C(j)-A(i))+abs(D(j)-B(i))){
| ... |
s912354634 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
int a[n][2], c[m][2];
int i, j;
for(i=0; i<n; i++){
cin >> a[i][0] >> a[i][1];
}
for(i=0; i<m; i++){
cin >> c[i][0] >> c[i][1];
}
int dist[n][m];
int minDistIndex[n];
for(i=0; i<n; i++){
for(j=0; j<m... | a.cc: In function 'int main()':
a.cc:20:63: error: expected ';' before '}' token
20 | dist[i][j] = abs(a[i][0]-c[j][0]) + abs(a[i][1]-c[j][1])
| ^
| ;
21 | }
| ... |
s559123765 | p03774 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <math.h>
#include <algorithm>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<long long> a(n), b(n);
vector<long long> c(m), d(m);
for (int i=0; i<n; i++) {
cin >> a[i];
cin >> b[i];
}
for (int i=0... | a.cc: In function 'int main()':
a.cc:24:26: error: 'LONG_LONG_MAX' was not declared in this scope
24 | long long min_dist = LONG_LONG_MAX;
| ^~~~~~~~~~~~~
|
s232816913 | p03774 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<long long> a(n), b(n);
vector<long long> c(m), d(m);
for (int i=0; i<n; i++) {
cin >> a[i];
cin >> b[i];
}
for (int i=0; i<m; i++) {
... | a.cc: In function 'int main()':
a.cc:23:26: error: 'LONG_LONG_MAX' was not declared in this scope
23 | long long min_dist = LONG_LONG_MAX;
| ^~~~~~~~~~~~~
|
s845904512 | p03774 | C++ | #include<bits/stdc++.h>
#include<math.h>
using namespace std;
int N,M,i,j;
int x0[52],y0[52],x1[52],y1[52];
int main()
{
cin>>N>>M;
for(i=0;i<N;i++){
cin>>x0[i]>>y0[i];
}
for(j=0;j<M;j++){
cin>>x1[j]>>y1[j];
}
for(i=0;i<N;i++){
int min_dist=abs(x0[i]-x1[0])+abs(y0[i]-y... | a.cc:6:17: error: 'int y0 [52]' redeclared as different kind of entity
6 | int x0[52],y0[52],x1[52],y1[52];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gn... |
s986559752 | p03774 | C++ | #include<bits/stdc++.h>
#include<math.h>
#define Max 52
using namespace std;
int N,M,i,j;
int x0[Max],y0[Max],x1[Max],y1[Max];
int main()
{
cin>>N>>M;
for(i=0;i<N;i++){
cin>>x0[i]>>y0[i];
}
for(j=0;j<M;j++){
cin>>x1[j]>>y1[j];
}
for(i=0;i<N;i++){
int min_dist=abs(x0[i]... | a.cc:7:19: error: 'int y0 [52]' redeclared as different kind of entity
7 | int x0[Max],y0[Max],x1[Max],y1[Max];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-li... |
s224732031 | p03774 | C++ | #include<bits/stdc++.h>
#include<math.h>
#define Max 52
using namespace std;
int N,M,i,j;
int x0[Max],y0[Max],x1[Max],y1[Max],a[Max]={0};
int indexx(int a[],int M)
{ int temp=a[0],x;
for(int i=0; i<M; i++) {
if(temp>a[i]) {
temp=a[i];
x=i+1;
}
}
if(temp==a[0]) return 1;
else... | a.cc:7:19: error: 'int y0 [52]' redeclared as different kind of entity
7 | int x0[Max],y0[Max],x1[Max],y1[Max],a[Max]={0};
| ^
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/includ... |
s460072229 | p03774 | C++ | #include<bits/stdc++.h>
#include<math.h>
#define Max 52
using namespace std;
int N,M,i,j;
int x0[Max],y0[Max],x1[Max],y1[Max],a[Max]={0};
int indexx(int a[],int M)
{ int temp=a[0],x;
for(int i=0; i<M; i++) {
if(temp>a[i]) {
temp=a[i];
x=i+1;
}
}
if(temp==a[0]) return 1;
else... | a.cc:7:19: error: 'int y0 [52]' redeclared as different kind of entity
7 | int x0[Max],y0[Max],x1[Max],y1[Max],a[Max]={0};
| ^
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/includ... |
s455227831 | p03774 | C++ | #include<bits/stdc++.h>
#include<math.h>
using namespace std;
int N,M,i,j;
long long int x0[52],y0[52],x1[52],y1[52],a[52]={0};
int indexx(long long int a[],int M)
{ int temp=a[0],x;
for(int i=0; i<M; i++) {
if(temp>a[i]) {
temp=a[i];
x=i+1;
}
}
if(temp==a[0]) return 1;
else... | a.cc:6:27: error: 'long long int y0 [52]' redeclared as different kind of entity
6 | long long int x0[52],y0[52],x1[52],y1[52],a[52]={0};
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
... |
s168615176 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int N,M,i,j;
int x0[52],y0[52],x1[52],y1[52],a[52]={0};
int indexx(int a[],int M)
{ int temp=a[0],x;
for(int i=0; i<M; i++) {
if(temp>a[i]) {
temp=a[i];
x=i+1;
}
}
if(temp==a[0]) return 1;
else return x;
}
int main()
{
cin>>N... | a.cc:6:17: error: 'int y0 [52]' redeclared as different kind of entity
6 | int x0[52],y0[52],x1[52],y1[52],a[52]={0};
| ^
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_6... |
s955816376 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m;
cin >> n >> m;
vector<pair<int,int>> a(n);
vector<pair<int,int>> b(m);
for ( int i=0; i<n; i++ ) cin >> a[i].first >> a[i].second;
for ( int i=0; i<m; i++ ) cin >> b[i].first >> b[i].second;
for ( int i=0; i<n; i++ ) {
int ans=0,mi=1... | a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s904825949 | p03774 | C++ | #include <bits/stdc++.h>
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define SIZE 200005
#define INF 1000000005LL
#define MOD 1000000007
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
int main(){
ll n,m;
cin >> n>>m;
vector<pair<ll,ll>> student(n);
vector<pair<ll,ll>> che... | a.cc: In function 'int main()':
a.cc:28:24: error: no matching function for call to 'min(ll&, int&)'
28 | k = min(now,k);
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s493490396 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define IOS ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
#define ff first
#define ss second
#define pb push_back
#define debug(val) cerr << "The value of " << #val << " is = " << val << '\n';
typedef long long ll;
typedef unsigned long long ull;
... | a.cc:15:38: error: 'int y1 [55]' redeclared as different kind of entity
15 | int n, m, x[55], y[55], x1[55], y1[55];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from... |
s303630546 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define IOS ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
#define ff first
#define ss second
#define pb push_back
#define debug(val) cerr << "The value of " << #val << " is = " << val << '\n';
typedef long long ll;
typedef unsigned long long ull;
... | a.cc:15:38: error: 'int y1 [55]' redeclared as different kind of entity
15 | int n, m, x[55], y[55], x1[55], y1[55];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from... |
s199134328 | p03774 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <deque>
#include <queue>//for queue and priority_queue
#include <fstream>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <set>
#include <map>
#include <list>
#define endl "\n"
typedef long long ll;
using namespace std;
... | a.cc: In function 'int main()':
a.cc:35:24: error: 'LLONG_MAX' was not declared in this scope
35 | ll n, m, res = LLONG_MAX, dis,indx=0;
| ^~~~~~~~~
a.cc:14:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
13 | #inc... |
s574040711 | p03774 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <deque>
#include <queue>//for queue and priority_queue
#include <fstream>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <set>
#include <map>
#include <list>
#define endl "\n"
typedef long long ll;
using namespace std;
... | a.cc: In function 'int main()':
a.cc:35:24: error: 'LLONG_MAX' was not declared in this scope
35 | ll n, m, res = LLONG_MAX, dis,indx=0;
| ^~~~~~~~~
a.cc:14:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
13 | #inc... |
s352374070 | p03774 | C++ | #inlude<bits/stdc++.h>
using namespace std;
int dis(int a, int b) {
return max(a - b, b - a);
}
int main () {
int N, M;
cin >> N >> M;
int sx[100];
int sy[100];
int cx[100];
int cy[100];
for (int i = 0; i < N; i ++) cin >> sx[i] >> sy[i];
for (int i = 0; i < M; i ++) cin >> cx[i] >> cy[i];
for (int ... | a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
1 | #inlude<bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int dis(int, int)':
a.cc:4:10: error: 'max' was not declared in this scope
4 | return max(a - b, b - a);
| ^~~
a.cc: In function 'int m... |
s115488806 | p03774 | C | #include<stdio.h>
#include<stdlib.h>
int main()
{
int n,m,gakusei[51][3],point[51][3],s,t=200000001,num,i,j;
scanf("%d%d",&n,&m);
for(i=0;i<n;i++)
for(j=0;j<2;j++)
scanf("%d",&gakusei[i][j]);
for(i=0;i<m;i++)
for(j=0;j<2;j++)
scanf("%d",&point[i][j]);
for(i=0;i<n;i++){
for(j=0;j<m;j++){
s=abs(gaku... | main.c: In function 'main':
main.c:23:31: error: 'u' undeclared (first use in this function)
23 | printf("%d\n",u+1);
| ^
main.c:23:31: note: each undeclared identifier is reported only once for each function it appears in
|
s683386150 | p03774 | C | #include<stdio.h>
#include<stdlib.h>
int main()
{
int n,m,gakusei[51][3],point[51][3],s,t=200000001,num,i,j;
scanf("%d%d",&n,&m);
for(i=0;i<n;i++)
for(j=0;j<2;j++)
scanf("%d",&gakusei[i][j]);
for(i=0;i<m;i++)
for(j=0;j<2;j++)
scanf("%d",&point[i][j]);
for(i=0;i<n;i++){
for(j=0;j<m;j++){
s=abs(gaku... | main.c: In function 'main':
main.c:20:33: error: 'u' undeclared (first use in this function)
20 | u=j;
| ^
main.c:20:33: note: each undeclared identifier is reported only once for each function it appears in
|
s055632012 | p03774 | C++ | //#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<cstdio>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<utility>
#include<algorithm>
#include<cstring>
#include<sstream>
#include <iomanip>
using namespace std;
typedef long long ll ;
typedef double db;
typedef... | a.cc: In function 'int main()':
a.cc:48:30: error: 'INT_MAX' was not declared in this scope
48 | ll x,pos,mn =INT_MAX;
| ^~~~~~~
a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
14 | #include <io... |
s533887616 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin>>n>>m;
vector<int>a(n);
vector<int>b(n);
vector<int>c(n);
vector<int>d(n);
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 mn=100000000;
int cou=0;
... | a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
27 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s947977077 | p03774 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=sc.nextInt(),m=sc.nextInt(),e=0;
long[] a=new long[n],b=new long[n],c=new long[m],d=new long[m];
long min=Infinity;
for(int i=0;i<n;i++){
a[i]=sc.nextLong();
b[i]... | Main.java:9: error: cannot find symbol
long min=Infinity;
^
symbol: variable Infinity
location: class Main
1 error
|
s842823565 | p03774 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=sc.nextInt(),m=sc.nextInt(),e=0;
long[] a=new long[n],b=new long[n],c=new long[m],d=new long[m];
long min=10000000000;
for(int i=0;i<n;i++){
a[i]=sc.nextLong();
b... | Main.java:9: error: integer number too large
long min=10000000000;
^
1 error
|
s039785579 | p03774 | C++ | #include <iostream>
#include <map>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <math.h>
#include <string>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n , m;
cin >> n >> m;
ll a[n][n] ... | a.cc: In function 'int main()':
a.cc:30:6: error: expected '}' at end of input
30 | }
| ^
a.cc:13:12: note: to match this '{'
13 | int main() {
| ^
|
s311767278 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin >> N >> M;
vector<int> a(N);
vector<int> b(N);
vector<int> c(M);
vector<int> d(M);
for (int i = 0; i < N; i++){
cin >> a.at(i) >> b.at(i);
}
for (int i = 0; i < M; i++){
cin >> c.at(i) >> d.at(i) >> endl;
}
int A = 1000... | a.cc: In function 'int main()':
a.cc:15:31: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>')
15 | cin >> c.at(i) >> d.at(i) >> endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file in... |
s592525137 | p03774 | C++ | #include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int absolute_value(int n){
if(n >= 0) return n;
if(n < 0) return -n;
}
int main(){
int N,M;
cin >> N >> M;
vector<vector<int>> student(N, vector<int>(2));
vector<vector<int>> check_point(N, vector<int>(2));
... | a.cc: In function 'int main()':
a.cc:30:16: error: expected ';' before '}' token
30 | P = i+1
| ^
| ;
31 | }
| ~
a.cc: In function 'int absolute_value(int)':
a.cc:8:1: warning: control reaches end of non-void function [-Wreturn-type]
... |
s277645495 | p03774 | C++ | #include/bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int absolute_value(int n){
if(n >= 0) return n;
if(n < 0) return -n;
}
int main(){
int N,M;
cin >> N >> M;
vector<vector<int>> student(N, vector<int>(2));
vector<vector<int>> check_point(N, vector<int>(2));
... | a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include/bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
12 | cin >> N >> M;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixabl... |
s632413553 | p03774 | C++ | #includ/bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int absolute_value(int n){
if(n >= 0) return n;
if(n < 0) return -n;
}
int main(){
int N,M;
cin >> N >> M;
vector<vector<int>> student(N, vector<int>(2));
vector<vector<int>> check_point(N, vector<int>(2));
... | a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ/bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
12 | cin >> N >> M;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '... |
s723371598 | p03774 | Java | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
public class B57 {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
static void solve() {
int n = ni();
int m = ni();
... | Main.java:7: error: class B57 is public, should be declared in a file named B57.java
public class B57 {
^
1 error
|
s670259631 | p03774 | C++ | #define _GLIBCXX_DEBUG
#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rep2(i,s,n) fo... | a.cc: In function 'int main()':
a.cc:27:18: error: 'b' was not declared in this scope
27 | rep(i,m) cin >>b[i].first>>b[i].second;
| ^
a.cc:28:34: error: 'b' was not declared in this scope
28 | rep(i,n) ans[i]=abs(a[i].first-b[0].first)+abs(a[i].second-b[0].second);
| ... |
s912849543 | p03774 | C++ | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define DEC(i, a, b) for (int i = (a); i > (b); --i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(x) cerr << #x << ": " << x << '\n'
using... | a.cc: In function 'int main()':
a.cc:26:22: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::push_back(long long int&, long long int&)'
26 | student.push_back(a, b);
| ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/vector:66,
... |
s577516095 | p03774 | C++ | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define DEC(i, a, b) for (int i = (a); i > (b); --i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(x) cerr << #x << ": " << x << '\n'
using... | a.cc: In function 'int main()':
a.cc:5:37: error: no match for 'operator<' (operand types are 'long long int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
5 | #define REP(i, n) for (int i = 0; i < (n); ++i)
| ^ ~~~
a.cc:23:3: note: in expansion of macro 'REP'... |
s904043926 | p03774 | C++ | #include <iostream>
#include <vector>
#include <alogorithm>
using namespace std;
using ll = long long int;
using pll = pair<ll,ll>;
ll dist(pll a, pll b){
return max(abs(a.first-b.first),abs(a.second-b.second));
}
int main(){
int n,m; cin >> n >> m;
vector<pll> stu,chk;
for(int i=0;i<n;i++){
ll a,b; cin >... | a.cc:3:10: fatal error: alogorithm: No such file or directory
3 | #include <alogorithm>
| ^~~~~~~~~~~~
compilation terminated.
|
s949856923 | p03774 | C++ | n,m = gets.split.map(&:to_i)
l = []
o = []
n.times do
a,b = gets.split.map(&:to_i)
l << a
o << b
end
p = []
q = []
m.times do
c,d = gets.split.map(&:to_i)
p << c
q << d
end
(0..n - 1).each do |i|
k = 100000000000000
point = 0
(0..m - 1).each do |j|
dist = (p[j] - l[i]).a... | a.cc:20:2: error: too many decimal points in number
20 | (0..n - 1).each do |i|
| ^~~~
a.cc:23:6: error: too many decimal points in number
23 | (0..m - 1).each do |j|
| ^~~~
a.cc:1:1: error: 'n' does not name a type
1 | n,m = gets.split.map(&:to_i)
| ^
|
s057400646 | p03774 | C++ | #include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n) for(int i=0; i<(int)(n); ++i)
int main() {
long int a,b,c=0;
cin>>a>>b;
vector<pair<long int,long int>>d(a);
vector<pair<long int,long int>>e(b);
rep(i,a)cin>>d[i].first>>d[i].second;
rep(i,b)cin>>e[i].first>>d[i].second... | a.cc: In function 'int main()':
a.cc:15:9: error: 'ads' was not declared in this scope; did you mean 'abs'?
15 | g=ads(d[i].first-e[o].first)+ads(d[i].second-e[o].second);
| ^~~
| abs
|
s369137322 | p03774 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
int main(){
ll n,m;
cin>>n>>m;
vector<ll> a(n),b(n),c(m),d(m),ans(n,-1);
... | a.cc: In function 'int main()':
a.cc:25:18: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<long long int>')
25 | rep(i,n) cout<<a<<endl;
| ~~~~^~~
| | |
| | std::vector<long long... |
s133459146 | p03774 | C++ | N, M = map(int,input().split())
ab = []
cd = []
for _ in range(N): ab.append(list(map(int,input().split())))
for _ in range(M): cd.append(list(map(int,input().split())))
def distance(x1, x2, y1, y2):
return abs(x1 - x2) + abs(y1 - y2)
ans_distance = [float('inf')] * N
ans = [float('inf')] * N
for i in range(N):
... | a.cc:10:23: warning: multi-character character constant [-Wmultichar]
10 | ans_distance = [float('inf')] * N
| ^~~~~
a.cc:11:14: warning: multi-character character constant [-Wmultichar]
11 | ans = [float('inf')] * N
| ^~~~~
a.cc:14:10: error: invalid preprocessing d... |
s414121823 | p03774 | C++ | #include<iostream>
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
const int NMMAX=50;
int A[NMMAX],B[NMMAX],C[NMMAX],D[NMMAX];
1
8
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
for(int i=0;i<N;++i){
cin >> A[i] >> B[i];
}
for(int j=0;j<M;++j){
cin ... | a.cc: In function 'int main()':
a.cc:8:2: error: expected ';' before numeric constant
8 | 1
| ^
| ;
9 | 8
| ~
a.cc:11:17: error: 'i' was not declared in this scope
11 | for(int i=0;i<N;++i){
| ^
|
s605063549 | p03774 | C++ | int main(void){
int N,M;
cin >> N >> M;
const int NMMAX=50;
int A[NMMAX],B[NMMAX],C[NMMAX],D[NMMAX];
1
8
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
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... | a.cc: In function 'int main()':
a.cc:3:1: error: 'cin' was not declared in this scope
3 | cin >> N >> M;
| ^~~
a.cc:6:2: error: expected ';' before numeric constant
6 | 1
| ^
| ;
7 | 8
| ~
a.cc:9:17: error: 'i' was not declared in this scope
9 | for(int i=0;i<N;++i){
... |
s776074316 | p03774 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt(),m=sc.nextInt(),ans=0;
int[] a=new int[n],b=new int[n],c=new int[m],d=new int[m];
for(int i=0;i<n;i++) {
a[i]=sc.nextInt();
b[i]=sc.nextInt();
}
for(int i=0;i<m;... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s985398790 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF = 1000000000;
int main() {
int n,m;cin>>n>>m;
ll an[n],bn[n], cn[m],dn[m];
rep(i,n) cin>>an[i]>>bn[i];
rep(j,m) cin>>cn[j]>>dn[j];
ll d, dmin, dx;
rep(i,n) {
dmin=INF;
... | a.cc: In function 'int main()':
a.cc:16:15: error: 'c' was not declared in this scope
16 | d = abs(c[j]-an[i]) + abs(d[j]-bn[i]);
| ^
a.cc:16:34: error: invalid types 'll {aka long long int}[int]' for array subscript
16 | d = abs(c[j]-an[i]) + abs(d[j]-bn[i]);
| ... |
s350933090 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m; cin >> n >> m;
vettor<vector<int>> ab(2,n),cd(2,m);
for(int i=0; i<n; i++){
cin >> ab[0][i] >> ab[1][i];
}
for(int i=0; i<m; i++){
cin >> cd[0][i] >> cd[1][i];
}
vector<int> ans(n);
for(int i=0; i<n; i++){
int x,y;
x... | a.cc: In function 'int main()':
a.cc:6:3: error: 'vettor' was not declared in this scope
6 | vettor<vector<int>> ab(2,n),cd(2,m);
| ^~~~~~
a.cc:6:20: error: expected primary-expression before '>' token
6 | vettor<vector<int>> ab(2,n),cd(2,m);
| ^~
a.cc:6:23: error: 'ab' was ... |
s948121640 | p03774 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main() {
int n,m;
cin >> n >> m;
vector<P> st(n);
vector<P> ch(m);
rep(i,n) c... | a.cc: In function 'int main()':
a.cc:27:28: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>')
27 | rep(i,n) cin >> ans[i] >> endl;
| ~~~~~~~~~~~~~~^~~~~~~
In file included... |
s730941040 | p03774 | C++ | #include <iostream>
#include <vector>
using namespace std;
using P = pair<int,int>;
int absi(int x){
return int(abs(x));
}
int main(){
int D,n,m,p1,p2;
cin >> n >> m;
vector<P> DaN(n);
vector<P> sts(n);
for(int i=0;i<n;i++){
cin >> sts[i].first >> sts[i].second;
DaN.first = 1e9;
DaN.second = 0;
... | a.cc: In function 'int main()':
a.cc:15:9: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
15 | DaN.first = 1e9;
| ^~~~~
a.cc:16:9: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
16 | DaN.second = 0;
| ^~~~~~
|
s461739564 | p03774 | C++ | //#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
const int INF= 1e9+5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>>vvi;
int main(){
int n,m;
cin>>n>>m;
vi a(n);
vi b(n);
vi c(m);
vi d(m);
vi ans(n);
for(int i=0;i<n;i++)cin>>a[... | a.cc: In function 'int main()':
a.cc:21:12: error: expected ';' before '-' token
21 | for(int i-0;i<m;i++)cin>>c[i]>>d[i];
| ^
| ;
a.cc:21:18: error: expected ')' before ';' token
21 | for(int i-0;i<m;i++)cin>>c[i]>>d[i];
| ~ ^
| )
... |
s545112592 | p03774 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int [] x1 = new int [a];
int [] y1 = new int [a];
int [] x2 = new int [a];
int [] y2 = new int [a];
int [] ans = new int [a];
f... | Main.java:18: error: incompatible types: possible lossy conversion from long to int
for(int i=0;i<a;i++){int b = 0; int c = Long.MAX_VALUE;
^
Main.java:19: error: incompatible types: int cannot be converted to Long
for(int j=0;j<a;j++){Long d = c-c;
... |
s722278977 | p03774 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int [] x1 = new int [a];
int [] y1 = new int [a];
int [] x2 = new int [a];
int [] y2 = new int [a];
int [] ans = new int [a];
f... | Main.java:21: error: incompatible types: int cannot be converted to Long
for(int j=0;j<a;j++){d = 0;
^
Main.java:24: error: incompatible types: Long cannot be converted to int
if(d<c){b=j;c=d;}
^
2 errors
|
s200056285 | p03774 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
double [] x1 = new double [a];
double [] y1 = new double [a];
double [] x2 = new double [a];
double [] y2 = new double [a];
int [] ans = new i... | Main.java:20: error: method pow in class Math cannot be applied to given types;
d+=Math.pow(x1[i]-x2[j]);
^
required: double,double
found: double
reason: actual and formal argument lists differ in length
Main.java:21: error: method pow in class M... |
s416032659 | p03774 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int [] x1 = new int [a];
int [] y1 = new int [a];
int [] x2 = new int [a];
int [] y2 = new int [a];
int [] ans = new int [a];
f... | Main.java:20: error: method pow in class Math cannot be applied to given types;
d+=Math.pow(x1[i]-x2[j]);
^
required: double,double
found: int
reason: actual and formal argument lists differ in length
Main.java:21: error: method pow in class Math... |
s289109210 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m;
cin >> n >> m;
vector<int>a(n);
vector<int>b(n);
vector<int>c(m);
vector<int>d(m);
for(int i=0;i<n;i++){
cin >> a.at(i) >> b.at(i);
}
for(int i=0;i<m;i++){
cin >> c.at(i) >> d.at(i);
}
for(in... | a.cc: In function 'int main()':
a.cc:23:61: error: expected ')' before ';' token
23 | com=abs(a.at(i)-c.at(j))+abs(b.at(i)-d.at(j);
| ~ ^
| )
|
s341327595 | p03774 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=1;i<=n;i++)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define ll int64_t
using namespace std;
bool compare_by_b(pair<string,int> a,pair<string,int> b){
if(a.second != b.se... | a.cc: In function 'int main()':
a.cc:34:6: error: expected '}' at end of input
34 | }
| ^
a.cc:15:11: note: to match this '{'
15 | int main(){
| ^
|
s216098200 | p03774 | C++ | #include <bits/stdc++.h>
int main(){
std::cin >> N >> M;
std::vector<long long> a(N), b(N), c(M), d(M);
for(int i = 0; i < N; ++i){
std::cin >> a[i] >> b[i];
}
for(int j = 0; j < M; ++j){
std::cin >> c[j] >> d[j];
}
for(int i = 0; i < N; ++i){
int count = -1;
long long min_length= 100000... | a.cc: In function 'int main()':
a.cc:5:15: error: 'N' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:5:20: error: 'M' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:17:7: error: 'length' was not declared in this scope
17 | ... |
s781902921 | p03774 | C++ | #include <bits/stdc++.h>
int main(){
std::cin >> N >> M;
std::vector<long long> a(N), b(N), c(M), d(M);
for(int i = 0; i < N; ++i){
std::cin >> a[i] >> b[i];
}
for(int j = 0; j < M; ++j){
std::cin >> c[j] >> d[j];
}
for(int i = 0; i < N; ++i){
int count = -1;
long long min_length= 100000... | a.cc: In function 'int main()':
a.cc:5:15: error: 'N' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:5:20: error: 'M' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:17:7: error: 'length' was not declared in this scope
17 | ... |
s444315028 | p03774 | C++ | #include <bits/stdc++.h>
int main(){
std::cin >> N >> M;
std::vector<long long> a(N), b(N), c(M), d(M);
for(int i = 0; i < N; ++i){
std::cin >> a[i] >> b[i];
}
for(int j = 0; j < M; ++j){
std::cin >> c[j] >> d[j];
}
for(int i = 0; i < N; ++i){
int count = -1;
long long min_length= 100000... | a.cc: In function 'int main()':
a.cc:5:15: error: 'N' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:5:20: error: 'M' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:17:7: error: 'length' was not declared in this scope
17 | ... |
s181868447 | p03774 | C++ | #include <bits/stdc++.h>
int main(){
std::cin >> N >> M;
std::vector<long long> a(N), b(N), c(M), d(M);
for(int i = 0; i < N; ++i){
std::cin >> a[i] >> b[i];
}
for(int j = 0; j < M; ++j){
std::cin >> c[j] >> d[j];
}
for(int i = 0; i < N; ++i){
int count = -1;
long long min_length= 100000... | a.cc: In function 'int main()':
a.cc:5:15: error: 'N' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:5:20: error: 'M' was not declared in this scope
5 | std::cin >> N >> M;
| ^
a.cc:17:7: error: 'length' was not declared in this scope
17 | ... |
s072810858 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int f(int a,int b,int c,int d){
return max(a,b)+max(c,d)-min(a,b)-min(c,d);
}
int main(){
int N,M,l,x,y;
cin>>N>>M;
vector<int>a(N),b(N),c(M),d(M);
for(int i=0;i<N;i++)cin>>a.at(i)>>b.at(i);
for(int i=0;i<M;i++)cin>>c.at(i)>>d.at(i);
for(int i=0;i<N;i++){
... | a.cc: In function 'int main()':
a.cc:15:79: error: expected ';' before 'x'
15 | if(f(a.at(i),b.at(i),c.at(x),d.at(x))>f(a.at(i),b.at(i),c.at(j),d.at(j))x=i;
| ^
| ... |
s648042740 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int f(int a,int b,int c,int d){
return max(a,b)+max(c,d)-min(a,b)-min(c,d);
}
int main(){
int N,M,l,x,y;
cin>>N>>M;
vector<int>a(N),b(N),c(M),d(M);
for(int i=0;i<N;i++)cin>>a.at(i)>>b.at(i);
for(int i=0;i<M;i++)cin>>c.at(i)>>d.at(i);
for(int i=0;i<N;i++){
... | a.cc: In function 'int main()':
a.cc:15:79: error: expected ';' before 'x'
15 | if(f(a.at(i),b.at(i),c.at(x),d.at(x))>f(a.at(i),b.at(i),c.at(j),d.at(j))x=i;
| ^
| ... |
s347700845 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int f(int a,int b,int c,int d){
return max(a,b)+max(c,d)-min(a,b)-min(c,d);
}
int main(){
int N,M,l,x,y;
cin>>N>>M;
vector<int>a(N),b(N),c(M),d(M);
for(int i=0;i<N;i++)cin>>a.at(i)>>b.at(i);
for(int i=0;i<M;i++)cin>>c.at(i)>>d.at(i);
for(int i=0;i<N;i++){
... | a.cc: In function 'int main()':
a.cc:13:11: error: expected primary-expression before ';' token
13 | x=0,y=;
| ^
a.cc:16:5: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:15:47: error: expected ')' before '}' token
15 | if(y,f(a.at(i),b.at(i),c.at(j)... |
s595573444 | p03774 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main() {
int n, m, a[100], b[100], c[100], d[100], i, j, minm = 1e9, minn;
cin >> n >> m;
for (i = 1; i <= n; i++)
cin >> a[i] >> b[i];
for (i = 1; i <= m; i++)
cin >> c[i] >> d[i];
for (i = 1; i <= n; i++)
{
minm = 1e9;
for (j = 1; j <= m; j++)
... | a.cc: In function 'int main()':
a.cc:15:67: error: 'minv' was not declared in this scope; did you mean 'minn'?
15 | if (abs(c[j] - a[i]) + abs(d[j] - b[i]) < minv)
| ^~~~
| ... |
s997948721 | p03774 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main() {
int n, m, a[100], b[100], c[100], d[100], i, j, minm = 1e9, minn;
cin >> n >> m;
for (i = 1; i <= n; i++)
cin >> a[i] >> b[i];
for (i = 1; i <= m; i++)
cin >> c[i] >> d[i];
for (i = 1; i <= n; i++)
{
minv = 1e9;
for (j = 1; j <= m; j++)
... | a.cc: In function 'int main()':
a.cc:13:17: error: 'minv' was not declared in this scope; did you mean 'minn'?
13 | minv = 1e9;
| ^~~~
| minn
|
s730889869 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[51],b[51],c[51],d[51];
int main()
{
int n,m,dis=0,num,far;
cin>>n>>m;
for(int i=1;i<=n;i++)
cin>>a[i]>>b[i];
for(int i=1;i<=m;i++)
cin>>c[i]>>d[i];
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
far=abs(a[i]-c[j])+abs(b[i]-d... | a.cc: In function 'int main()':
a.cc:16:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | ans=far;
| ^~~
| abs
|
s059260788 | p03774 | C++ | #intclude<bits/stdc++.h>
using namespace std;
int main (){
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 i=0;i<m;++i){
cin >> C[i] >> D[i];
}
for(int i=0;i<n;i++){
int checkpoint = 1;
int min_dist = abs(A[i]-C[0])... | a.cc:1:2: error: invalid preprocessing directive #intclude; did you mean #include?
1 | #intclude<bits/stdc++.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | cin >> n >> m;
| ^~~
a.cc:1:1: note: 'std::cin' is de... |
s281947256 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int dist(int x, int y){
return (int)(abs(x)+abs(y));
}
int main(){
int N,M;
cin>>N>>M;
vector<int> a(N),b(N);
vector<int> c(M),d(M);
for(int i=0;i<N;i++){
cin>>a.at(i)>>b.at(i);
}
for(int i=0;i<M;i++){
cin>>c.at(i)>>d.at(i);
}
for(int i=0;i<N;i... | a.cc: In function 'int main()':
a.cc:20:5: error: 'k' was not declared in this scope
20 | k=0;
| ^
|
s645868459 | p03774 | C++ | include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
const int INF = 1001001001;
using namespace std;
int main()
{
int N, M;
int a[51], b[51], c[51], d[51];
int res[51];
cin >> N >> M;
rep(i,N) cin >> a[i] >> b[i];
rep(i,M) cin >> c[i] >> d[i];
rep(i,N){
int minmd = INF;
rep(j,M){
... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >> N >> M;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '... |
s000760960 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long n,m;
cin >> n >> m;
long a[100],b[100],c[100],d[100];
for(int i=1; i<=n; i++) cin >>a[i]>>b[i];
for(int i=1; i<=m; i++) cin >>c[i]>>d[i];
vector<vector<long>> e(100,vector<long>(100);
vector<long> f(100,1000000000);
int g[100];
f... | a.cc: In function 'int main()':
a.cc:12:47: error: expected ')' before ';' token
12 | vector<vector<long>> e(100,vector<long>(100);
| ~ ^
| )
|
s722164083 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long n,m;
cin >> n >> m;
long a[100],b[100],c[100],d[100];
for(int i=1; i<=n; i++) cin >>a[i]>>b[i];
for(int i=1; i<=m; i++) cin >>c[i]>>d[i];
vector<vector<long>> e(100,vector<long>(100,);
long f[100,1000000000];
int g[100];
for(int ... | a.cc: In function 'int main()':
a.cc:12:42: error: expected primary-expression before '(' token
12 | vector<vector<long>> e(100,vector<long>(100,);
| ^
a.cc:12:47: error: expected primary-expression before ')' token
12 | vector<vector<long>> e(100,vector<long>(10... |
s242271038 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long n,m;
cin >> n >> m;
long a[100],b[100],c[100],d[100];
for(int i=1; i<=n; i++) cin >>a[i]>>b[i];
for(int i=1; i<=m; i++) cin >>c[i]>>d[i];
vector<vector<long>> d(100,vector<long>(100,1000000000));
long e[100],f[100];
for(int i=1; i<=n... | a.cc: In function 'int main()':
a.cc:12:24: error: conflicting declaration 'std::vector<std::vector<long int> > d'
12 | vector<vector<long>> d(100,vector<long>(100,1000000000));
| ^
a.cc:8:29: note: previous declaration as 'long int d [100]'
8 | long a[100],b[100],c[100],d[100];
... |
s110582169 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long n, m;
cin >> n >> m;
long a[n], b[n];
for(int i=0; i<n; i++) cin >> a[i] >> b[i];
long c[n], d[n];
for(int i=0; i<n; i++) cin >> c[i] >> d[i];
long e[n][m];
long t[n, 1000000000];
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
... | a.cc: In function 'int main()':
a.cc:14:11: error: expected ']' before ',' token
14 | long t[n, 1000000000];
| ^
| ]
a.cc:14:13: error: expected unqualified-id before numeric constant
14 | long t[n, 1000000000];
| ^~~~~~~~~~
a.cc:19:9: error: 't' was not decla... |
s944910215 | p03774 | C++ | #include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,l,n) for(int i=(l);i<=(n);i++)
template<class T>
using vt = vector<T>;
template<class T>
using vvt = vector<vector<T>>;
template<class T>
using P = pair<int,int>
int main(){
int N,M;
ci... | a.cc:15:11: error: two or more data types in declaration of 'type name'
15 | using P = pair<int,int>
| ^~~~~~~~~~~~~
|
s838624998 | p03774 | C++ | #include<bits/stdc++.h>
typedef long long ll;
typedef pair<int,int> P;
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,l,n) for(int i=(l);i<=(n);i++)
template<class T>
using vt = vector<T>;
template<class T>
using vvt = vector<vector<T>>;
int main(){
int N,M;
cin >> N >> M;
... | a.cc:4:9: error: 'pair' does not name a type
4 | typedef pair<int,int> P;
| ^~~~
a.cc: In function 'int main()':
a.cc:19:12: error: 'P' was not declared in this scope
19 | vector<P> student(N);
| ^
a.cc:19:13: error: template argument 1 is invalid
19 | vector<P> student(... |
s735144161 | p03774 | C++ | //#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <iomanip>
#include<cmath>
using namespace std;
#define FAST ios_base :: sync_with_stdio(false); cin.tie(NULL);
#define endl "\n"
typedef long long int ll;
pair<int,int> first[51];
pair<int,int... | a.cc: In function 'int main()':
a.cc:49:18: error: expected '}' at end of input
49 | return 0;
| ^
a.cc:24:1: note: to match this '{'
24 | {
| ^
|
s736101003 | p03774 | C++ | #include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(in... | a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory
2 | #include<boost/multi_array.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s737444025 | p03774 | C++ | #include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(in... | a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory
2 | #include<boost/multi_array.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s974743527 | p03774 | C | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main() {
int n, m, x1[55], y1[55], x2[55], y2[55], res[55], menor = 100000, k;
scanf("%d%d", &n, &m);
for (int i = 0; i < n; i++) {
scanf("%d%d", &x1[i], &y1[i]);
}
for (int i = 0; i < m; i++) {
scanf("%d%d", &x2[i], &y2[i]);
}
for ... | main.c: In function 'main':
main.c:30:3: error: expected declaration or statement at end of input
30 | }
| ^
|
s109038117 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int dn(int a,int b,int c,int d){
return abs(c-a)+abs(d-b);
}
int main(){
int n,m,i,j;
cin>>n>>m;
int a[n],b[n],c[m],d[m];
for(i=0;i<n;i++){
cin>>a[i]>>b[i];
}
for(i=0;i<m;i++){
cin>>c[i]>>d[i];
}
int m[n];
for(i=0;i<n;i++){
m[i]=0;
for(j... | a.cc: In function 'int main()':
a.cc:18:7: error: conflicting declaration 'int m [n]'
18 | int m[n];
| ^
a.cc:9:9: note: previous declaration as 'int m'
9 | int n,m,i,j;
| ^
a.cc:20:6: error: invalid types 'int[int]' for array subscript
20 | m[i]=0;
| ^
a.cc:22:50:... |
s846002913 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
vector<int> a(n),b(n),c(n),d(n),l(n);
int kyo;
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 kyo=400000001;
for(int j=0;j<m;j++){
... | a.cc:29:5: error: redefinition of 'int main()'
29 | int main(){
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main(){
| ^~~~
|
s062577479 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;cin>>n>>m;
vector<pair<int,int>>a(n),c(m);
for(int i=0;i<n;i++)cin>>a.at(i).first>>a.at(i).second;
for(int i=0;i<m;i++)cin>>c.at(i).first>>c.at(i).second;
for(int i=0;i<n;i++){
long int l=bebc201;int p=0
for(int j=0;j<m;j++){
long ... | a.cc: In function 'int main()':
a.cc:9:16: error: 'bebc201' was not declared in this scope
9 | long int l=bebc201;int p=0
| ^~~~~~~
a.cc:10:5: error: expected ',' or ';' before 'for'
10 | for(int j=0;j<m;j++){
| ^~~
a.cc:10:17: error: 'j' was not declared in this scope
1... |
s985054520 | p03774 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int a[105], b[105], c[105], d[105];
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 kyori == INT_MAX;
int index = 0;
... | a.cc: In function 'int main()':
a.cc:15:27: error: expected initializer before '==' token
15 | int kyori == INT_MAX;
| ^~
a.cc:20:33: error: 'kyori' was not declared in this scope
20 | if (z < kyori) {
| ... |
s454693292 | p03774 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int a[105], b[105], c[105], d[105];
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 kyori = INT_MAX;
int index = 0;
... | a.cc: In function 'int main()':
a.cc:15:29: error: 'INT_MAX' was not declared in this scope
15 | int kyori = INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include<cmath>... |
s576212710 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,a[55],b[55],c[55],d[55],i,j,minn,ans;
cin>>n>>m;
for(i=1;i<=n;i++)
cin>>a[i]>>b[i];
for(i=1;i<=m;i++)
cin>>c[i]>>d[i];
for(i=1;i<=n;i++){
minv=1<<30;
for(j=1;j<=m;j++)
if(abs(c[j]-a[i])+abs(d... | a.cc: In function 'int main()':
a.cc:11:9: error: 'minv' was not declared in this scope; did you mean 'minn'?
11 | minv=1<<30;
| ^~~~
| minn
|
s152935016 | p03774 | C++ | V#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define ll long long
ll a[60], b[60], c[60], d[60];
int main()
{
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];
ll min = 0;
int p = 0;
for (int i = 0; i < N; i++)... | a.cc:1:2: error: stray '#' in program
1 | V#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'V' does not name a type
1 | V#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
9 | cin >> N >> M;
| ^~~
a.cc:17:29: er... |
s721769138 | p03774 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)
int int_len(int n) {
int s=0;
while(n!=0) s++, n/=10;
return s;
}
int int_sum(int n) {
int m=0,s=0,a=n;
while(a!=0) s++, a/=10;
for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
return m;
}... | a.cc: In function 'int main()':
a.cc:33:44: error: 'a' was not declared in this scope
33 | for (int i = 0; i < N; i++) cin >> a[i] >> b[i];
| ^
a.cc:33:52: error: 'b' was not declared in this scope
33 | for (int i = 0; i < N; i++) cin >> a[i] >> b[i... |
s883437088 | p03774 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int64_t minn(int64_t a,int64_t b){
if(a >= b) return b;
else return a;
}
int main(){
int N,M;
cin >> N>>M;
vector<int64_t> A(N);
vector<int64_t> B(N);
vector<int64_t> C(M);
vector<int64_t> D(M);
for(int i = 0;i < N;i++){... | a.cc:33:1: error: expected declaration before '}' token
33 | }
| ^
|
s032274619 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n), b(n), c(m), d(m);
for (int i=0; i<n; i++){
cin >> a.at(i) >> b.at(i);
}
for (int i=0; i<m; i++){
cin >> c.at(i) >> d.at(i);
}
for (int i=0; i<n; i++){
int md = MAX_INT;
int num;
... | a.cc: In function 'int main()':
a.cc:17:14: error: 'MAX_INT' was not declared in this scope; did you mean 'MAX_INPUT'?
17 | int md = MAX_INT;
| ^~~~~~~
| MAX_INPUT
|
s370804353 | p03774 | C++ | #include<bits/stdc++.h>
#define REPI(i, n) for(int i = 0; i < n; i++)
#define REPJ(j, n) for(int j = 0; j < n; j++)
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n, m; cin >> n >> m;
int a[n], b[n], minimum[n], ans[n], x[m], y[m];
REPI(i, n){
cin >> a[i] >... | a.cc: In function 'int main()':
a.cc:25:63: error: expected '}' at end of input
25 | int man_dis = abs(a[i] - x[j]) + abs(b[i] - y[j]);
| ^
a.cc:24:19: note: to match this '{'
24 | REPJ(j, m){
| ^
a.cc:... |
s221298982 | p03774 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll a[60], b[60], c[60], d[60];
int main()
{
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];
ll min = 0;
int p = 0;
for (int i = 0; i < N; i++) {
min = mod;
for (int j ... | a.cc: In function 'int main()':
a.cc:14:23: error: 'mod' was not declared in this scope; did you mean 'modf'?
14 | min = mod;
| ^~~
| modf
|
s907947734 | p03774 | C++ | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = int64_t;
#define int ll
#define FOR(i, a, b) for (int i = int(a); i < int(b); i++)
#define REP(i, b) FOR(i, 0, b)
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(x) x.begin(), x.end()
using pi = pair<int, int>;... | a.cc:5:13: error: '::main' must return 'int'
5 | #define int ll
| ^~
a.cc:16:1: note: in expansion of macro 'int'
16 | int main() {
| ^~~
|
s036417676 | p03774 | C++ | #include <iostream>
#include <vector>
#include <map>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<pair<long long int, long long int>> Students(N);
vector<pair<long long int, long long int>> Points(N);
for(int i = 0;i < N; i++){
long long int a, b;
cin >> a >> b;
Student... | a.cc: In function 'int main()':
a.cc:38:19: error: 'tp' was not declared in this scope; did you mean 'tm'?
38 | ans.push_back(tp);
| ^~
| tm
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.