submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s477472647 | p00022 | C++ | #include <iostream>
#include <algorithm>
#include <cstdlib>
using namespace std;
int main(){
const int nmax = 5001;
int n;
int nums[nmax];
while(cin >> n){
if(n == 0) break;
int a;
for(int i = 1;i <= n; i++){
cin >> a;
nums[i] = a;
}
int total_max = -INT_MAX;
for(int i = 1; i <= n; i++){
int t... | a.cc: In function 'int main()':
a.cc:17:34: error: 'INT_MAX' was not declared in this scope
17 | int total_max = -INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #incl... |
s200626154 | p00022 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
vector<int> r;
while (true)
{
scanf("%d", &n);
if (n==0)break;
int max=INT_MIN,now=0,in=0;
for (int i=0; i<n; i++)
{
cin >> in;
now += in;
if (now > max) max=now;
if (now < 0) now=0;
}
r.push_back(max);
}
for... | a.cc: In function 'int main()':
a.cc:12:25: error: 'INT_MIN' was not declared in this scope
12 | int max=INT_MIN,now=0,in=0;
| ^~~~~~~
a.cc:3:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <ve... |
s354474899 | p00022 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <functional>
#include <sstream>
#include <complex>
using namespace std;
#define REP(i,a,n) for(int i=(a);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#... | a.cc: In function 'int main()':
a.cc:25:31: error: 'INT_MIN' was not declared in this scope
25 | int sum=0,ans=INT_MIN;
| ^~~~~~~
a.cc:13:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
12 | #include <... |
s319358901 | p00022 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <iostream>
using namespace std;
int main()
{
int n;
int a[5000];
while (true)
{
scanf("%d", &n);
if (n == 0)
break;
for (int i = 0; i < n; ++i)
scanf("%d", a+i);
... | a.cc: In function 'int main()':
a.cc:26:27: error: 'INT_MIN' was not declared in this scope
26 | int res = INT_MIN;
| ^~~~~~~
a.cc:9:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
8 | #include <iostream>... |
s262166324 | p00022 | C++ | 7
-5
-1
6
4
9
-6
-7
13
1
2
3
2
-2
-1
1
2
3
2
1
-2
1
3
1000
-200
201
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 7
| ^
|
s899334548 | p00022 | C++ | #include <iostream>
using namespace std;
int main()
{
int n, a[5000], i, j, k, l, sum, max;
while (cin >> n)
{
if (n == 0) break;
for (i = 0; i < n; i++)
cin >> a[i];
max = INT_MIN;
for (i = 0; i < n; i++)
{
for (j = 0; j < n - i; j++)
{
for (k = 0; k < n - i; k++)
{
sum = 0;
... | a.cc: In function 'int main()':
a.cc:15:23: error: 'INT_MIN' was not declared in this scope
15 | max = INT_MIN;
| ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include <iostream>
+++ |... |
s792611741 | p00022 | C++ | #include<iostream>
#include<cstdlib>
#include<cstring>
using namespace std;
#define NMAX 5100
//int dp[NMAX][NMAX];
int a[NMAX];
int main()
{
int n;
while(cin>>n)
{
if(n==0)break;
memset(dp,0,sizeof(int)*NMAX);
memset(a,0,sizeof(int)*NMAX);
for(int i =1;i<=n;++i)
{... | a.cc: In function 'int main()':
a.cc:16:16: error: 'dp' was not declared in this scope
16 | memset(dp,0,sizeof(int)*NMAX);
| ^~
|
s568466331 | p00022 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
vector<int> v,s(1001);
int a,b,o=0;
while(cin>>b){
fill(s.begin(),s.end(),0);
o =0;
if(b==0) break;
else{
for(int i=0;i<b;i++){
cin>>a;
v.push_back(a);
}
for(int i = 0; i < b; i++){
... | a.cc: In function 'int main()':
a.cc:24:10: error: expected '}' at end of input
24 | }
| ^
a.cc:13:9: note: to match this '{'
13 | else{
| ^
a.cc:24:10: error: expected '}' at end of input
24 | }
| ^
a.cc:9:16: note: to match this '{'
9 | wh... |
s242274011 | p00022 | C++ | include <cstdio>
#include <algorithm>
using namespace std;
int N,K[5001],T;
int main()
{
scanf("%d",&N);
if (N == 0) return 0;
T = 0;
for (int i=1;i<=N;i++){
scanf("%d",K+i);
}
for (int i=1;i<=N;i++) {
K[i] += K[i-1];
}
... | a.cc:1:1: error: 'include' does not name a type
1 | include <cstdio>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gn... |
s733727492 | p00022 | C++ | #include<iostream>
int n;
int a[1000];
void add( int i, int x )
{
while( i <= n ){
a[i] += x;
i += i & (-i);
}
return;
}
int sum( int i )
{
if( i == 0 ) return 0;
int s = 0;
while( i > 0 ){
s += a[i];
i -= i & (-i);
}
return s;
}
int main()
{
while( 1 ){
memset( a, 0, sizeof( a ) );
std... | a.cc: In function 'int main()':
a.cc:32:17: error: 'memset' was not declared in this scope
32 | memset( a, 0, sizeof( a ) );
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+... |
s646490446 | p00022 | C++ | #include <iostream>
#define max(X,Y) ((X > Y)?X:Y)
int main(void)
{
while(true)
{
int n;
int m=0,prev=0;
std::cin >> n;
if(!n)
break;
max = prev = -1000001;
for(int i=0; i<n; i++)
{
int a;
std::cin >> a;
prev = max( a, prev + a );
m = max( m, prev );
}
std::cout << m << std::endl;
... | a.cc: In function 'int main()':
a.cc:15:17: error: 'max' was not declared in this scope; did you mean 'std::max'?
15 | max = prev = -1000001;
| ^~~
| std::max
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bit... |
s292319286 | p00022 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
int b;
int c;
int d;
int e;
while(cin >>n){
if(n!=0){break;}
int a[n];
b=0;
while(b<n){
cin >>a[b];
b=b+1;}
d=a[0];
b=0;
while(b<n){
e=0;
c=b;
while(c<n){
e=e+a[c];
if(e>d){d=e;}
c=c+1;}
b=b+1;}
cout <<d<<endl;} | a.cc: In function 'int main()':
a.cc:26:17: error: expected '}' at end of input
26 | cout <<d<<endl;}
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s464664814 | p00022 | C++ | #include <iostr;eam>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
vector<int> maxsums, a;
int n, tmp;
while (true) {
cin >> n;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> tmp;
a.push_back(tmp);
}
for (int i = 0; i < a.size(); i++) ... | a.cc:1:10: fatal error: iostr;eam: No such file or directory
1 | #include <iostr;eam>
| ^~~~~~~~~~~
compilation terminated.
|
s143171135 | p00022 | C++ | include <iostream>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
vector<int> maxsums, a;
int n, tmp;
a.reserve(5000);
while (true) {
cin >> n;
if (n == 0)
break;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
tmp = a[i];
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu... |
s925434094 | p00022 | C++ | /**
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0022&lang=jp
*/
#include <stdio.h>
#include <stdlib.h>
int getsign(int d){
return d >= 0 ? 1 : -1;
}
int seqsum(int n){
int a[5000];
int b[5000];
int c = 0;
int s = 0;
scanf("%d", a);
b[0] = a[0];
s = getsign(a[0]);
for(int i=1; i<n; ++i){
... | a.cc: In function 'int seqsum(int)':
a.cc:37:29: error: '__max' was not declared in this scope
37 | m = __max(m, a[i]);
| ^~~~~
|
s094762109 | p00022 | C++ | #include <iostream>
int main()
{
while (true) {
int n;
std::cin >> n;
if (n == 0) break;
int a[5000];
for (int i = 0; i < n; ++i) std::cin >> a[i];
int max = INT_MIN;
for (int i = 0; i < n; ++i) {
int sum = a[i];
if (max < a[i]) max ... | a.cc: In function 'int main()':
a.cc:13:19: error: 'INT_MIN' was not declared in this scope
13 | int max = INT_MIN;
| ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include <iostream>
+++ |+#includ... |
s006678103 | p00022 | C++ | #include <iostream>
#include <vector>
#include <numeric>
#include <iterator>
using namespace std;
int main(void){
int N;
while (cin >> N, N) {
vector<int> a(N);
for (int i = 0; i < N; i++)
cin >> a[i];
vector<int> sums;
sums.push_back(0);
partial_sum(a.begin(), a.end(), back_inserter(sums));
int m = ... | a.cc: In function 'int main()':
a.cc:17:25: error: 'INT_MIN' was not declared in this scope
17 | int m = INT_MIN;
| ^~~~~~~
a.cc:5:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <iterator>
+... |
s480013390 | p00022 | C++ | 3
1000
-200
201 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s643710569 | p00022 | C++ | include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
using namespace std;
int main(){
int n,k[5000],max;
while(1){
cin >> n;
if(n==0)break;
for(int i=0;i<n;i++){
cin >> k[i];
}
max=0;
int sum=0;
for(int i=0;i<n;i++,sum=0){
for(int j=i;j<n;j++){
sum +=... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:4:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type... |
s730943408 | p00022 | C++ | /* AOJ 0022 Maximum Sum Sequence */
#include <iostream>
#include <climits>
using namespace std;
void update(int i, int x);
void init();
const int MAX_N = 5000;
const int MIN_A = -100000;
int max_sum[MAX_N + 1];
int
main()
{
for (;;) {
int n, i;
cin >> n;
if (n == 0) break;
in... | a.cc: In function 'int main()':
a.cc:35:18: error: 'max_element' was not declared in this scope
35 | cout << *max_element(max_sum + 1, max_sum + n + 1) << endl;
| ^~~~~~~~~~~
|
s406915955 | p00022 | C++ | while n = gets.to_i do
break if n == 0
s = Array.new
d = - Float::INFINITY
n.times do |i|
s[i] = gets.to_i
end
n.times do |i|
sum = 0
(i..n).each do |j|
sum = sum + s[j].to_i
d = [d, sum].max
end
end
puts d
end | a.cc:1:1: error: expected unqualified-id before 'while'
1 | while n = gets.to_i do
| ^~~~~
|
s665828311 | p00022 | C++ | #include <iostream>
int main(){
int n, num;
while(cin >> n){
if(n==0) return 0;
num = 0;
for(int i=0;i<n;i++){
cin >> n;
num += n;
if(num<0) num = 0;
}
cout << num << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | while(cin >> n){
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ... |
s157862022 | p00022 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n, num, a, maxx;
while(cin >> n){
if(n==0)
break;
num = 0;
for(int i=0;i<n;i++){
cin >> a;
num += a;
if(i == 0)
max = a;
if(num<0) num = 0;
maxx = max(maxx,num);
}
cout <... | a.cc: In function 'int main()':
a.cc:18:15: error: overloaded function with no contextual type information
18 | max = a;
| ^
|
s204832692 | p00022 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
int *a,maxi;
for(int n;cin >> n,n;){
maxi = INT_MIN;
a = new int[n];
for(int i=0;i<n;i++)
cin >> a[i];
for(int i=0;i<n;i++)
for(int j=i,sum=0;j<n;j++)
maxi=max(maxi,sum+=a[j]);
delete [] a;
cout << maxi << endl;
}... | a.cc: In function 'int main()':
a.cc:9:24: error: 'INT_MIN' was not declared in this scope
9 | maxi = INT_MIN;
| ^~~~~~~
a.cc:3:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <algorithm>
+++... |
s303889760 | p00022 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc: In function 'void solve(long long int, short int)':
a.cc:33:17: error: reference to 'array' is ambiguous
33 | solve(sum + array[i], i + 1);
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
... |
s494117621 | p00022 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc: In function 'void solve(long long int, short int)':
a.cc:33:17: error: reference to 'array' is ambiguous
33 | solve(sum + array[i], i + 1);
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
... |
s635475158 | p00022 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc: In function 'void solve(long long unsigned int, short int)':
a.cc:33:17: error: reference to 'array' is ambiguous
33 | solve(sum + array[i], i + 1);
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
... |
s565688816 | p00022 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
//#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんど... | a.cc: In function 'void solve(long long int, short int)':
a.cc:33:17: error: reference to 'array' is ambiguous
33 | solve(sum + array[i], i + 1);
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
... |
s654042026 | p00022 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
//#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんど... | a.cc: In function 'void solve(long long int, short int)':
a.cc:33:17: error: reference to 'array' is ambiguous
33 | solve(sum + array[i], i + 1);
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
... |
s647654779 | p00022 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(... | a.cc: In function 'int main()':
a.cc:8:34: error: no match for 'operator<' (operand types are 'int' and 'std::vector<int>')
8 | #define loop(i,a,b) for(int i=a;i<b;i++)
| ^
a.cc:9:18: note: in expansion of macro 'loop'
9 | #define rep(i,a) loop(i,0,a)
| ... |
s441644279 | p00023 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
double xa = 0;
double ya = 0;
double ra = 0;
... | Main.java:6: error: '{' expected
class Main
^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws NumberFormatException, IOException {
^
(use --enable-preview to enable unnamed classes)
Main.java:47: error: clas... |
s949224052 | p00023 | Java | import java.io.*;
class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n=Integer.parseInt(br.readLine());
for(int i=0; i<n; i++){
String str = br.readLine();
String[] s = str.split(" ");
double xa = Double.parseDouble(s[0]);
double ya = Double.... | Main.java:6: error: unreported exception IOException; must be caught or declared to be thrown
int n=Integer.parseInt(br.readLine());
^
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
String str = br.readLine();
^
2 e... |
s141033572 | p00023 | Java | public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int n = scan.nextInt();
// while(n-->0){}
for(int i = 0; i < n; i++){
double xa = scan.nextDouble();
double ya = scan.nextDouble();
double ra = scan.nextDouble();
double xb = sc... | Main.java:19: error: ';' expected
System.out.printf("%d\n", 2)
^
1 error
|
s602976680 | p00023 | Java | public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int n = scan.nextInt();
// while(n-->0){}
for(int i = 0; i < n; i++){
double xa = scan.nextDouble();
double ya = scan.nextDouble();
double ra = scan.nextDouble();
double xb = sc... | Main.java:2: error: cannot find symbol
private static final Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:2: error: cannot find symbol
private static final Scanner scan = new Scanner(System.in);
^
sy... |
s858268266 | p00023 | Java | import java.util.Scanner;
public class CircleOverlap {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=Integer.parseInt(sc.nextLine());
for(int i=0;i<n;i++){
String[] str= sc.nextLine().split(" ");
double[] d = new double[6];
... | Main.java:4: error: class CircleOverlap is public, should be declared in a file named CircleOverlap.java
public class CircleOverlap {
^
1 error
|
s970861473 | p00023 | Java | import java.util.*;class Main{public static void main(String[]e){Scanner s=new Scanner(System.in);for(double t=s.nextInt(),a,b;t-->0;){double[]d=new double[6];for(int i=6;i-->0;)d[i]=s.nextDouble();a=(a=d[5]-=d[2])*a+(a=d[4]-=d[1])*a;b=d[3]+d[0];System.out.println(b*b<a?0:(b+=2*d[0])*b<=a?1:d[3]>d[0]?2:-2);}} | Main.java:1: error: reached end of file while parsing
import java.util.*;class Main{public static void main(String[]e){Scanner s=new Scanner(System.in);for(double t=s.nextInt(),a,b;t-->0;){double[]d=new double[6];for(int i=6;i-->0;)d[i]=s.nextDouble();a=(a=d[5]-=d[2])*a+(a=d[4]-=d[1])*a;b=d[3]+d[0];System.out.println(b... |
s572683968 | p00023 | Java | import java.io.*;
import java.util.Scanner;
public class Main{
public static void main(String[] args) throws IOException{
int n = 0;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
n = Integer.parseInt(br.readLine());
for(int i=0;i < n;i++){
Scanner scanner... | Main.java:19: error: incompatible types: String cannot be converted to float
float xa = scanner.next();
^
Main.java:20: error: incompatible types: String cannot be converted to float
float ya = scanner.next();
^
Main.java:21: error: incompatible types: S... |
s109063948 | p00023 | Java | import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
for (int i = 0; i < n; i++) {
double[] x = new double[2];
double[] y = new double[2];
double[] ... | Main.java:23: error: cannot find symbol
} else if (Math.abs(rdiff0) <= xy && xy <= rsum) {
^
symbol: variable rdiff0
location: class Main
1 error
|
s592379940 | p00023 | C | #include <stdio.h>
#include <math.h>
int main()
{
int n, t;
double x1, y1, r1, x2, y2, r2;
double d;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &r1, &x2, &y2, &r2);
d = sqrt(pow(x2-x1, 2) + pow(y2-y1, 2));
if (d >= r1 + r2) t = 0;
else if (d == r1 + r2 || ... | /usr/bin/ld: /tmp/ccX1sYeB.o: in function `main':
main.c:(.text+0x92): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xc4): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xdc): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
|
s710728825 | p00023 | C | #include <stdio.h>
#include <math.h>
int main()
{
int n, t;
double x1, y1, r1, x2, y2, r2;
double d;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &r1, &x2, &y2, &r2);
d = sqrt(pow(x2-x1, 2) + pow(y2-y1, 2));
if (d >= r1 + r2) t = 0;
else if (d == r1 + r2 || ... | /usr/bin/ld: /tmp/ccMt2emY.o: in function `main':
main.c:(.text+0x92): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xc4): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xdc): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
|
s558834978 | p00023 | C | #include <stdio.h>
#include <math.h>
int main()
{
int n, t;
double x1, y1, r1, x2, y2, r2;
double d;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &r1, &x2, &y2, &r2);
d = (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1);
if (d >= (r1 + r2)*(r1 + r2)) t = 0;
else if (d == (... | /usr/bin/ld: /tmp/ccAU36DH.o: in function `main':
main.c:(.text+0x17c): undefined reference to `sqrt'
/usr/bin/ld: main.c:(.text+0x1a7): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
|
s759153615 | p00023 | C | #include <stdio.h>
main(){
int n, i;
double xa, ya, xb, yb, ra, rb, ab;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb);
ab=(xa-xb)*(xa-xb)+(ya-yb)*(ya-yb);
if(ab>(ra+rb)*(ra+rb)) printf("0\n");
else if(ab==(ra+rb)*(ra+rb)) printf("1\n");
e... | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:15:18: error: expected expression before '<' token
15 | else if(ab=<(rb-ra)*(rb-ra)) printf("-2\n");
| ^
|
s353833735 | p00023 | C | #include <stdio.h>
#include <math.h>
int main(void){
double xa,ya,xb,yb,ra,rb,d;
int n;
for(scanf("%d",&n);n--;){
scanf("%lf%lf%lf%lf%lf%lf",&xa,&ya,&ra,&xb,&yb,&rb);
d=hypot(xa-xb,ya-yb);
if(d>ra+rb)puts("0");
else if(ra>rb+d)puts("2");
else if(rb>ra+d)puts("-2");
else puts("1");
}
}
return 0;
} | main.c:15:9: error: expected identifier or '(' before 'return'
15 | return 0;
| ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
16 | }
| ^
|
s567022746 | p00023 | C | #include<stdio.h>
#include<math.h>
double d,r,s,z[6];
int n,i,j,a[50];
int main(){
for(scanf("%d",&n);n--;){
for(i=0;i<6;i++)
scanf("%lf",z+i);
r=z[2];
s=z[5];
d=hypot(*z-z[3],z[1]-z[4]);
printf("%d\n",a[j++]=d>r+s?0:r>d+s?2:s>d+r?-2:1);
}
return
n==14 ;
/*
a[0]==1 &&
a[1]==1 &&
a[2]==1 &&
... | main.c: In function 'main':
main.c:17:17: error: unterminated comment
17 | /*
| ^
main.c:16:17: error: expected declaration or statement at end of input
16 | n==14 ;
| ^
|
s770356787 | p00023 | C | #include <stdio.h>
#include <math.h>
double dist(double x1, double y1, double x2, double y2)
{
//return (pow(x1 - x2, 2) + pow(y1 - y2, 2));
return (hypot(x1 - x2, y1 - y2));
}
int main(void)
{
double ax, ay;
double bx, by;
double ar, br;
double abdist;
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++){
... | main.c: In function 'main':
main.c:23:29: error: expected expression before '<' token
23 | if (abdist =< ar || abdist =< br){
| ^
|
s146911454 | p00023 | C | #include <stdio.h>
#include <math.h>
#define sq(x) (x)*(x)
int main(void)
{
int n,i;
double xa,ya,ra,xb,yb,rb;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%lf %lf %lf %lf %lf %lf",&xa,&ya,&ra,&xb,&yb,&rb);
if((sq(xa-xb)+sq(ya-yb))<sq(rb-ra))
{
if(ra>rb)
{
printf("%d",-2);
continue;
}
if(rb>... | main.c: In function 'main':
main.c:24:54: error: expected ')' before '{' token
24 | if(((sq(xa-xb)+sq(ya-yb))<=sq(ra+rb))
| ~ ^
| )
25 | {
| ~ ... |
s999966211 | p00023 | C | #include<stdio.h>
#include<math.h>
int main(void){
double xa,ya,ra,xb,yb,rb,r,d;
int i,n;
scanf("%d",&n);
for(i=0; i<n; i++){
scanf("%lf%lf%lf%lf%lf%lf",&xa,&ya,&ra,&xb,&yb,&rb);
if(ra<rb){
r=ra;
ra=rb;
rb=r;
r=0;
}
d=sqrt((... | main.c: In function 'main':
main.c:18:27: error: 'a' undeclared (first use in this function)
18 | }else if((ra+rb)<=a || a<=(ra-rb)){
| ^
main.c:18:27: note: each undeclared identifier is reported only once for each function it appears in
|
s735783959 | p00023 | C | #include <stdio.h>
#include <math.h>
int rel_c_c( double, double, double, double, double, double );
int main( void ) {
int n;
double xa, ya, ra, xb, yb, rb;
for ( scanf( "%d", &n ); n--; printf( "%d\n", rel_c_c( xa, ya, ra, xb, yb, rb ) ) )
scanf( "%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb );
ret... | main.c: In function 'rel_c_c':
main.c:32:31: error: expected expression before '<' token
32 | if ( R - r <= d && d =< R + r )
| ^
|
s349088734 | p00023 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
double xa, ya, ra, xb, yb, rb, d;
cin >> n;
for(int i = 0; i < n; i++) {
cin >> xa >> ya >> ra >> xb >> yb >> rb;
d =sqrt(pow(xa - xb, 2.0) + pow(ya - yb, 2.0));
if(d + rb < ra) { co... | a.cc:1:2: error: extended character is not valid in an identifier
1 | #include <iostream>
| ^
a.cc:1:2: error: extended character is not valid in an identifier
a.cc:1:2: error: extended character is not valid in an identifier
a.cc:1:2: error: invalid preprocessing directive #include\U000000a0\U00000... |
s225122924 | p00023 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
double xa, ya, ra, xb, yb, rb, d;
cin >> n;
for(int i = 0; i < n; i++) {
cin >> xa >> ya >> ra >> xb >> yb >> rb;
d =sqrt(pow(xa - xb, 2.0) + pow(ya - yb, 2.0));
if(d + rb < ra) { c... | a.cc:1:2: error: extended character is not valid in an identifier
1 | #include <iostream>
| ^
a.cc:1:2: error: extended character is not valid in an identifier
a.cc:1:2: error: extended character is not valid in an identifier
a.cc:1:2: error: invalid preprocessing directive #include\U000000a0\U00000... |
s934466227 | p00023 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
double xa, ya, ra, xb, yb, rb, d;
cin >> n;
for(int i = 0; i < n; i++) {
cin >> xa >> ya >> ra >> xb >> yb >> rb;
d =sqrt(pow(xa - xb, 2.0) + pow(ya - yb, 2.0));
if(d + rb < ra) { c... | a.cc:1:2: error: extended character is not valid in an identifier
1 | #include <iostream>
| ^
a.cc:1:2: error: extended character is not valid in an identifier
a.cc:1:2: error: extended character is not valid in an identifier
a.cc:1:2: error: invalid preprocessing directive #include\U000000a0\U00000... |
s526282086 | p00023 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
double xa, ya, ra, xb, yb, rb, d;
cin >> n;
for(int i = 0; i < n; i++) {
cin >> xa >> ya >> ra >> xb >> yb >> rb;
d =sqrt(pow(xa - xb, 2.0) + pow(ya - yb, 2.0));
if(d + rb < ra) { cout ... | a.cc:7:1: error: extended character is not valid in an identifier
7 | int n;
| ^
a.cc:7:1: error: extended character is not valid in an identifier
a.cc:7:1: error: extended character is not valid in an identifier
a.cc:7:1: error: extended character is not valid in an identifier
a.cc:8:1: error: ex... |
s702094379 | p00023 | C++ | #include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <string.h>
using namespace std;
#define ISEQ(c) (c).begin(), (c).end()
typedef long long ll;
int main() {
int ... | a.cc: In function 'int main()':
a.cc:31:4: error: expected '}' at end of input
31 | }
| ^
a.cc:18:12: note: to match this '{'
18 | int main() {
| ^
|
s860347254 | p00023 | C++ | #include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <string.h>
using namespace std;
#define ISEQ(c) (c).begin(), (c).end()
typedef long long ll;
int main() {
int ... | a.cc: In function 'int main()':
a.cc:31:4: error: expected '}' at end of input
31 | }
| ^
a.cc:18:12: note: to match this '{'
18 | int main() {
| ^
|
s076910188 | p00023 | C++ | #include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
long double xa,ya,xb,yb,ra,rb;
for(int i=0;i<n;i++){
cin>>xa>>ya>>ra>>xb>>yb>>rb;
if(abs(ra+rb)<sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<0<<endl;}
else if(abs(ra+rb)>=sqrt(pow(xa-xb,2)+pow(ya-yb,2)) && abs(ra-r... | a.cc: In function 'int main()':
a.cc:14:46: error: 'else' without a previous 'if'
14 | else{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}
| ^~~~
|
s516491077 | p00023 | C++ | #include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
long double xa,ya,xb,yb,ra,rb;
for(int i=0;i<n;i++){
cin>>xa>>ya>>ra>>xb>>yb>>rb;
if(abs(ra+rb)<sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<0<<endl;}
else if(abs(ra+rb)>=sqrt(pow(xa-xb,2)+pow(ya-yb,2)) && abs(ra-r... | a.cc: In function 'int main()':
a.cc:14:46: error: 'else' without a previous 'if'
14 | else{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}
| ^~~~
|
s221300297 | p00023 | C++ | #include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
long double xa,ya,xb,yb,ra,rb;
for(int i=0;i<n;i++){
cin>>xa>>ya>>ra>>xb>>yb>>rb;
if(abs(ra+rb)<sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<0<<endl;}
else if(abs(ra+rb)>=sqrt(pow(xa-xb,2)+pow(ya-yb,2)) && abs(ra-r... | a.cc: In function 'int main()':
a.cc:14:47: error: 'else' without a previous 'if'
14 | else{{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}}
| ^~~~
|
s965715623 | p00023 | C++ | #include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
double xa,ya,xb,yb,ra,rb;
for(int i=0;i<n;i++){
cin>>xa>>ya>>ra>>xb>>yb>>rb;
if(abs(ra+rb)<sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<0<<endl;}
else if(abs(ra+rb)>=sqrt(pow(xa-xb,2)+pow(ya-yb,2)) && abs(ra-rb)<=s... | a.cc: In function 'int main()':
a.cc:14:47: error: 'else' without a previous 'if'
14 | else{{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}}
| ^~~~
|
s166616088 | p00023 | C++ | //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <... | a.cc: In function 'int main()':
a.cc:84:26: error: 'd2' was not declared in this scope; did you mean 'd'?
84 | }else if(d2<(ra+rb)){
| ^~
| d
|
s619032814 | p00023 | C++ | #include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int N;
cin>>N;
while(N--){
int ans;
double ax,ay,ar,bx,by,br;
cin>>ax>>ay>>ar>>bx>>by>>br;
double x;
x=sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by));
if(x>(ar+br))ans=0;
else if(abs(ar-br)<=x&&x<=(ar+br))ans=1;
else if(x<abs(ar-br)&&ar... | a.cc: In function 'int main()':
a.cc:13:19: error: 'sqrt' was not declared in this scope
13 | x=sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by));
| ^~~~
|
s009323984 | p00023 | C++ | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
double r(double x1,double y1,double x2,double y2){
return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
int main() {
// your code goes here
int n;
double x1,x2,y1,y2,r1,r2;
cin>>n;
for(int j=0;j<n;j++){
cin>>x1>>y1>>r1>>x2>>y2>>r2;
... | a.cc: In function 'int main()':
a.cc:22:69: error: expected primary-expression before '<' token
22 | else if(r(x1,y1,x2,y2)>=fabs(r1-r2)&&r(x1,y1,x2,y2)=<r1+r2){
| ^
|
s800039487 | p00023 | C++ | #include <iostream>
#include <array>
#include <math.h>
int main(){
std::array<double, 3> a; //0:xa 1:ya 2:ra
std::array<double, 3> b;
int N;
std::cin >> N;
for(int i = 0; i < N; ++i){
for(int j = 0; j < 3; ++j)
std::cin >> a[j];
for(int j = 0; j < 3; ++j)
std::cin >> b[j];
double ab = sqrt( (... | a.cc:39:9: error: expected unqualified-id before 'return'
39 | return 0;
| ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
41 | }
| ^
|
s747953842 | p00023 | C++ | #include <iostream>
#include <array>
#include <math.h>
int main(){
std::array<double, 3> a; //0:xa 1:ya 2:ra
std::array<double, 3> b;
int N;
std::cin >> N;
for(int i = 0; i < N; ++i){
for(int j = 0; j < 3; ++j)
std::cin >> a[j];
for(int j = 0; j < 3; ++j)
std::cin >> b[j];
double ab = hypot( ... | a.cc: In function 'int main()':
a.cc:22:34: error: no matching function for call to 'hypot(std::array<double, 3>::value_type)'
22 | double ab = hypot( (a[0] - b[0]) + (a[1] - b[1]) );
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/... |
s401827852 | p00023 | C++ | #include <iostream>
#include <array>
#include <math>
int main(){
std::array<double, 3> a; //0:xa 1:ya 2:ra
std::array<double, 3> b;
int N;
std::cin >> N;
for(int i = 0; i < N; ++i){
for(int j = 0; j < 3; ++j)
std::cin >> a[j];
for(int j = 0; j < 3; ++j)
std::cin >> b[j];
double ab = hypot( (a[... | a.cc:3:10: fatal error: math: No such file or directory
3 | #include <math>
| ^~~~~~
compilation terminated.
|
s007873172 | p00023 | C++ | #include <iostream>
#include <array>
inline double squ_minus(double a, double b){
double x = a - b;
return x * x;
}
inline double squ_plus(double a, double b){
double x = a + b;
return x * x;
}
int main(){
int n; // the number of datasets
cin >> n;
for(int i = 0; i < n; i++){
std::array<double, 6> cir; //... | a.cc: In function 'int main()':
a.cc:16:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
16 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ... |
s980585498 | p00023 | C++ | #include <iostream>
#include <array>
inline double squ_minus(double a, double b){
double x = a - b;
return x * x;
}
inline double squ_plus(double a, double b){
double x = a + b;
return x * x;
}
int main(){
int n; // the number of datasets
cin >> n;
for(int i = 0; i < n; i++){
std::array<double, 6> cir; //... | a.cc: In function 'int main()':
a.cc:16:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
16 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ... |
s804580927 | p00023 | C++ | #include <iostream>
#include <cmath>
#include <deque>
inline double distance(double x1,double y1,double x2,double y2){
return sqrt( (x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2) );
}
int main(){
int dataSetNum;
std::cin >> dataSetNum;
std::deque<int> number;
for(int i = 0; i < dataSetNum; ++i){
double xa, ya, ra... | a.cc: In function 'int main()':
a.cc:20:42: error: 'class std::deque<int>' has no member named 'push_buck'; did you mean 'push_back'?
20 | if(dis > ra + rb) number.push_buck( 0 );
| ^~~~~~~~~
| push_back
a.c... |
s150616591 | p00023 | C++ | #include <iostream>
#include <cmath>
int main(){
int data;
std::cin >> data; //dataset
std::array<double, data>xa;
std::array<double, data>ya;
std::array<double, data>ra;
std::array<double, data>xb;
std::array<double, data>yb;
std::array<double, data>rb;
for(int i=0; i<data; ++i){
std::cin >> xa[i]... | a.cc: In function 'int main()':
a.cc:10:32: error: the value of 'data' is not usable in a constant expression
10 | std::array<double, data>xa;
| ^
a.cc:6:13: note: 'int data' is not const
6 | int data;
| ^~~~
a.cc:10:32: note: in template arg... |
s549582697 | p00023 | C++ | #include <iostream>
#include <array>
#include <cmath>
int main(){
int data;
std::cin >> data; //dataset
std::array<double, data>xa;
std::array<double, data>ya;
std::array<double, data>ra;
std::array<double, data>xb;
std::array<double, data>yb;
std::array<double, data>rb;
for(int i=0; i<data; ++i){
... | a.cc: In function 'int main()':
a.cc:11:32: error: the value of 'data' is not usable in a constant expression
11 | std::array<double, data>xa;
| ^
a.cc:7:13: note: 'int data' is not const
7 | int data;
| ^~~~
a.cc:11:32: note: in template arg... |
s280365821 | p00023 | C++ | #include <iostream>
#include <array>
#include <cmath>
int main(){
int data;
std::cin >> data; //dataset
std::array<double, data>xa;
std::array<double, data>ya;
std::array<double, data>ra;
std::array<double, data>xb;
std::array<double, data>yb;
std::array<double, data>rb;
for(int i=0; i<data; ++i){
... | a.cc: In function 'int main()':
a.cc:11:32: error: the value of 'data' is not usable in a constant expression
11 | std::array<double, data>xa;
| ^
a.cc:7:13: note: 'int data' is not const
7 | int data;
| ^~~~
a.cc:11:32: note: in template arg... |
s477398128 | p00023 | C++ | //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
//#include <sstream>
//#include <queue>
using namespace std;
int main(){
int n,... | a.cc: In function 'int main()':
a.cc:29:21: error: 'sqrt' was not declared in this scope
29 | R = sqrt((xa - xb)*(xa - xb) + (ya - yb)*(ya - yb));
| ^~~~
|
s741609935 | p00023 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
double xa, ya, ra, xb, yb, rb;
cin >> n;
while(n--){
cin >> xa >> ya >> ra >> xb >> yb >> rb;
//B in A
if( hypot(xa - xb, ya - yb) + rb < ra )
cout << 2 << endl;
//A in B
else if( hypot(xa - xb, ya - yb) + ra < rb )
cout << -2 << endl;
... | a.cc: In function 'int main()':
a.cc:13:21: error: 'hypot' was not declared in this scope
13 | if( hypot(xa - xb, ya - yb) + rb < ra )
| ^~~~~
|
s318020216 | p00023 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void){
int n;
cin>>n;
for(int i=0;i<n;i++){
double xa,ya,ra,xb,yb,rb;
cin>>xa>>ya>>ra>>xb>>yb>>rb;
double d;
d = sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
int ans;
d<ra-rb ? ans=... | a.cc: In function 'int main()':
a.cc:13:14: error: 'sqrt' was not declared in this scope
13 | d = sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
| ^~~~
|
s811482416 | p00023 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
TIMES(n) {
// ??\???
double ax, ay, ar, bx, by, br;
cin >> ax >> ay >> ar >> bx >> by >> br;
// ?????¢????±???????
... | a.cc: In function 'int main()':
a.cc:15:6: error: 'TIMES' was not declared in this scope
15 | TIMES(n) {
| ^~~~~
|
s491828324 | p00023 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double ax,ay,ar,bx,by,br;
cin >> ax >> ay >> ar >> bx >> by >> br;
double dis_x = abs(ax-bx),
double dis_y = abs(ay-by),
double dist = sqrt(d... | a.cc: In function 'int main()':
a.cc:12:9: error: expected unqualified-id before 'double'
12 | double dis_y = abs(ay-by),
| ^~~~~~
a.cc:14:14: error: 'dist' was not declared in this scope
14 | if ( dist > ar + br ) {
| ^~~~
|
s345412676 | p00023 | C++ | #include <iostream>
#include <cmath>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double ax,ay,ar,bx,by,br;
cin >> ax >> ay >> ar >> bx >> by >> br;
double dis_x = abs(ax-bx),
double dis_... | a.cc: In function 'int main()':
a.cc:14:9: error: expected unqualified-id before 'double'
14 | double dis_y = abs(ay-by),
| ^~~~~~
a.cc:16:14: error: 'dist' was not declared in this scope
16 | if ( dist > ar + br ) {
| ^~~~
|
s361104815 | p00023 | C++ | #include <iostream>
#include <cmath>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double ax,ay,ar,bx,by,br;
cin >> ax >> ay >> ar >> bx >> by >> br;
double dis_x = abs(ax-bx);
double dis_... | a.cc: In function 'int main()':
a.cc:18:1: error: 'else' without a previous 'if'
18 | else if ( dist + ar < br ) {
| ^~~~
a.cc:18:11: error: 'dist' was not declared in this scope
18 | else if ( dist + ar < br ) {
| ^~~~
a.cc:18:18: error: 'ar' was not declared in this scope
18 | else if (... |
s638117072 | p00023 | C++ | #include <cstdio>
#include <complex>
#include <vector>
#include <cmath>
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
typedef complex<double> P;
typedef vector<P> VP;
const double EPF = 1e-5
#define X real()... | a.cc:22:1: error: expected ',' or ';' before 'double'
22 | double dot(P a, P b) {
| ^~~~~~
a.cc: In function 'double distPP(P, P)':
a.cc:32:15: error: 'dot' was not declared in this scope
32 | return sqrt(dot(a-b,a-b));
| ^~~
|
s105677523 | p00023 | C++ |
#include<iostream>
#include<stdio.h>
#include<string>
#include<math.h>
#include<iomanip>
#include<algorithm>
#include<string.h>
#include<cctype>
#include<map>
#include<set>
#include<vector>
#include<sstream>
#include<stack>
using namespace std;
double abs(double x)
{
if(x<0) return -x;
else ... | a.cc:18:21: error: 'double abs(double)' conflicts with a previous declaration
18 | double abs(double x)
| ^
In file included from /usr/include/c++/14/cstdlib:81,
from /usr/include/c++/14/ext/string_conversions.h:43,
from /usr/include/c++/14/bits/basic_stri... |
s968598087 | p00023 | C++ | #include<bits/stdc++.h>
using namespace std;
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
typedef long long ll;
typedef pair<int, int> ii;
#define EPS 1e-8
int main(){
int n;
cin >> n;
while(n--){
... | a.cc: In function 'int main()':
a.cc:24:52: error: expected ';' before 'cout'
24 | else if(d2 == (ra + rb) * (ra + rb) cout << 1 << endl;
| ^~~~~
| ;
a.cc:25:17: error: expected primary-e... |
s880154955 | p00023 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
for(int i = 0; i < n; i++){
float x[2], y[2], r[2];
for(int j = 0; j < 2; j++)
cin >> x[j] >> y[j] >> r[j];
// 2??????????????????????????¢
f... | a.cc: In function 'int main()':
a.cc:16:15: error: conflicting declaration 'float r'
16 | float r = r[0] + r[1];
| ^
a.cc:9:27: note: previous declaration as 'float r [2]'
9 | float x[2], y[2], r[2];
| ^
a.cc:18:14: error: invalid operands of ty... |
s144208428 | p00023 | C++ | #include<iostream>
#include<cmath>
define
int main(){
int n;
double xa,ya,ra,xb,yb,rb,d;
std::cin >> n;
for(int i=0;i<n;i++){
std::cin >> xa >> ya >> ra
>> xb >> yb >> rb;
d = std::sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
if(ra+rb <= d){
std::cout << 0 << std::endl;
break;... | a.cc:4:1: error: 'define' does not name a type
4 | define
| ^~~~~~
|
s786125571 | p00023 | C++ | #include<iostream>
#include<cmath>
int main(){
int n;
double xa,ya,ra,xb,yb,rb,d;
std::cin >> n;
for(int i=0;i<n;i++){
std::cin >> xa >> ya >> ra
>> xb >> yb >> rb;
d = std::sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
/*if(ra+rb < d){
std::cout << (int)0 << std::endl;
break;
... | a.cc: In function 'int main()':
a.cc:27:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
27 | cout << (d<=ra+rb?d+rb>=ra?d+ra>=rb?1:-2:2:0) << endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
... |
s596865109 | p00023 | C++ | #include<iostream>
#include<cmath>
int main(){
int n;
double xa,ya,ra,xb,yb,rb,d;
std::cin >> n;
for(int i=0;i<n;i++){
std::cin >> xa >> ya >> ra
>> xb >> yb >> rb;
d = std::sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
/*if(ra+rb < d){
std::cout << (int)0 << std::endl;
break;
... | a.cc: In function 'int main()':
a.cc:27:59: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
27 | std::cout << (d<=ra+rb?d+rb>=ra?d+ra>=rb?1:-2:2:0) << endl;
| ^~~~
| ... |
s630872741 | p00023 | C++ |
#include "stdafx.h"
#include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
... | a.cc:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s690024409 | p00023 | C++ | #include<bits/stdc++.h>
using namespace std;
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
typedef long long ll;
typedef pair<int, int> ii;
#define EPS 1e-8
int main(){
int n;
cin >> n;
... | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:3:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
9 |
| ^
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:1... |
s897348210 | p00023 | C++ | #include<bits/stdc++.h>
using namespace std;
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
typedef long long ll;
typedef pair<int, int> ii;
#define EPS 1e-8
int main(){
int n;
c... | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:3:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
9 |
| ^
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:1... |
s399417033 | p00023 | C++ | #include<iostream>
#include<vector>
int main()
{
int n;
std::cin >> n;
for (int i = 0; i < n; i++)
{
double xa, ya, ra, xb, yb, rb;
std::cin >> xa >> ya >> ra >> xb >> yb >> rb;
double d = hypot(xa - xb, ya - yb);
if (d > ra + rb)
{
std::cout << 0 << std::endl;
}
else
{
if (d == ra + rb || abs... | a.cc: In function 'int main()':
a.cc:11:28: error: 'hypot' was not declared in this scope
11 | double d = hypot(xa - xb, ya - yb);
| ^~~~~
|
s233359200 | p00023 | C++ | #include<iostream>
#include<vector>
int main()
{
int n;
std::cin >> n;
for (int i = 0; i < n; i++)
{
double xa, ya, ra, xb, yb, rb;
std::cin >> xa >> ya >> ra >> xb >> yb >> rb;
double d = hypot(xa - xb, ya - yb);
if (d > ra + rb)
{
std::cout << 0 << std::endl;
}
else if (d == ra + rb || d > abs(ra... | a.cc: In function 'int main()':
a.cc:11:28: error: 'hypot' was not declared in this scope
11 | double d = hypot(xa - xb, ya - yb);
| ^~~~~
|
s513265555 | p00023 | C++ | #include<iostream>
#include<cmath>
struct Point{
Point(void){
x=y=r=0;
}
double x,y;
double r;
};
double d(struct Point a,struct Point b){
return sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2));
}
int main(void){
int n;
std::cin>>n;
struct Point a,b;
for(int i=0;i<n;i++){
int ... | a.cc: In function 'int main()':
a.cc:23:19: error: 'd' cannot be used as a function
23 | double d=d(a,b);
| ~^~~~~
|
s087770156 | p00023 | C++ | #include <iostream>
using namespace std;
int main(int argc, char **argv)
{
int n;
float x1, y1, r1, x2, y2, r2, u;
cin >> n;
for(int i = 0; i < n; i++){
cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
u = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);
if(u+r2 < r1){
cout << "2" << endl;
} else if(u+r1 < r2){
cout... | a.cc: In function 'int main(int, char**)':
a.cc:19:41: error: expected primary-expression before ')' token
19 | } else if(u-r1 == r2 || ){
| ^
|
s780454027 | p00023 | C++ | #include <iostream>
#include <math>
using namespace std;
int main(int argc, char **argv)
{
int n;
float x1, y1, r1, x2, y2, r2, u;
cin >> n;
for(int i = 0; i < n; i++){
cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
u = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
if(u+r2 < r1){
cout << "2" << endl;
} else ... | a.cc:2:10: fatal error: math: No such file or directory
2 | #include <math>
| ^~~~~~
compilation terminated.
|
s607586169 | p00023 | C++ | RMSHYJAE | a.cc:1:1: error: 'RMSHYJAE' does not name a type
1 | RMSHYJAE
| ^~~~~~~~
|
s640540917 | p00023 | C++ | a;main(){a=!puts("1\n1\n1\n0\n2\n2\n-2\n0\n0\n1\n1\n-2\n1\n2");} | a.cc:1:1: error: 'a' does not name a type
1 | a;main(){a=!puts("1\n1\n1\n0\n2\n2\n-2\n0\n0\n1\n1\n-2\n1\n2");}
| ^
a.cc:1:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | a;main(){a=!puts("1\n1\n1\n0\n2\n2\n-2\n0\n0\n1\n1\n-2\n1\n2");}
| ^~~~
a.cc: In function 'in... |
s429675283 | p00023 | C++ | #include<iostream>
using namespace std;
int main(){
double x[2];
double y[2];
double r[2];
double dist;
int n;
cin >> n;
for(int i=0;i<n;i++){
cin >> x[0] >> y[0] >> r[0] >> x[1] >> y[1] >> r[1];
dist = hypot(x[0] - x[1], y[0] - y[1]);
if(r[0] > dist + r[1]){
printf("2\n");
}else if(r[1] > dist + r[0... | a.cc: In function 'int main()':
a.cc:13:24: error: 'hypot' was not declared in this scope
13 | dist = hypot(x[0] - x[1], y[0] - y[1]);
| ^~~~~
|
s076578380 | p00023 | C++ | #include <iostream>
using namespace std;
int main()
{
int num;
double xa,xb,ya,yb,ra,rb;
double dist;
cin >> num;
for( int i = 0; i < num; i++ ) {
cin >> xa >> ya >> ra >> xb >> yb >> rb;
dist = (xa-xb)*(xa-xb) + (ya-yb)*(ya-yb);
if( dist > ra + rb ) {
cout << 0 << endl;
}
else if( ra - d > rb) {... | a.cc: In function 'int main()':
a.cc:18:31: error: 'd' was not declared in this scope
18 | else if( ra - d > rb) {
| ^
|
s442850454 | p00023 | C++ | /*AOJ 0023*/
#include<iostream>
#include<vector>
using namespace std;
class Circle_obj{
public:
double x,y,r;
};
int isCircleToCircle(Circle_obj a,Circle_obj b){
double tmpX = a.x - b.x;
double tmpY = a.y - b.y;
double R = sqrt(tmpX*tmpX + tmpY*tmpY);
if(a.r >= b.r){
if( R + b.r <= a.r){
return 2;
}
... | a.cc: In function 'int isCircleToCircle(Circle_obj, Circle_obj)':
a.cc:18:20: error: 'sqrt' was not declared in this scope
18 | double R = sqrt(tmpX*tmpX + tmpY*tmpY);
| ^~~~
|
s490524386 | p00023 | C++ | #include<iostream>
using namespace std;
int intersection(double xa,double ya,double ra,double xb,double yb,double rb)
{
double d=sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
if(ra+rb<d)
{
return 0;
}
else if(ra+d<rb)
{
return -2;
}
else if(rb+d<ra)
{
return 2;
}
else{
return 1;
}
}
int main(void)
{
in... | a.cc: In function 'int intersection(double, double, double, double, double, double)':
a.cc:7:18: error: 'sqrt' was not declared in this scope
7 | double d=sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
| ^~~~
|
s875401475 | p00023 | C++ | #include<iostream>
#include<algorithm>
#include<cctype>
#include<cstring>
#include<cstdlib>
#include<vector>
#include<string>
#include<cmath>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
const int N = 2;
int main(){
int n;
cin >>n;
REP(z,... | a.cc: In function 'int main()':
a.cc:21:51: error: expected ')' before ';' token
21 | double rr = (r[0] + (r[1]) * (r[0] + r[1]);
| ~ ^
| )
|
s482015402 | p00023 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long int ll;
double ab(double a){
if(a>=0)return a;
return -a;
}
int main()
{
int n;
double xa,ya,ra,xb,yb,rb;
cin >> n;
for(int i=0;i<n;i++){
cin >> xa >> ya >> ra >> xb >> yb >> rb;
d... | a.cc: In function 'int main()':
a.cc:19:18: error: 'sqrt' was not declared in this scope
19 | double a=sqrt((yb-ya)*(yb-ya)+(xb-xa)*(xb-xa));
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.