submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s621365690 | p00011 | C++ | #include<iostream>
#include"Header.h"
using namespace std;
#define size_n 4
#define size_num 30
int main(){
int swap_times;
int num_length;
char n[size_n]={'\0'};
int num[size_num] = {0};
int temp;
cin >> num_length;
cin >> swap_times;
for(int i=1;i <= num_length;i++){
num[i] = i;
}
for(int i=1;i<=swap_t... | a.cc:2:9: fatal error: Header.h: No such file or directory
2 | #include"Header.h"
| ^~~~~~~~~~
compilation terminated.
|
s138261353 | p00011 | C++ | #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
int w, n;
int a[30], b[30];
int now[30];
int x, y;
cin >> w;
cin >> n;
for (int i = 0; i < n; i++){
scanf_s("%d,%d", &x, &y);
a[i] = x;
b[i] = y;
}
for (int j = 0; j < n; j++){
for (int i = 0; i < w; i++){
if (now[i] == a[j... | a.cc: In function 'int main()':
a.cc:16:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
16 | scanf_s("%d,%d", &x, &y);
| ^~~~~~~
| scanf
|
s030180220 | p00011 | C++ | #include <iostream>
#include<cstdio>
using namespace std;
int main (){
int w,N,d[30],sub;
int a,b;
cin>>w>>N;
for(int j=1;j<=w;j++){
d[j]=j;
}
for(int i=0;i<N;i++){
scanf("%d,%d",&a,&b);
sub=d[b];
d[b]=c[a];
c[a]=sub;
}
for(int k=1;k<=w;k++){
cout<<d[k]<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:22: error: 'c' was not declared in this scope
15 | d[b]=c[a];
| ^
|
s183177010 | p00011 | C++ | #include <iostream>
#include<cstdio>
using namespace std;
int main (){
int w,N,d[31],sub;
int a,b;
cin>>w>>N;
for(int j=1;j<=w;j++){
d[j]=j;
}
for(int i=0;i<N;i++){
scanf("%d,%d",&a,&b);
sub=d[b];
d[b]=d[a];
c[a]=sub;
}
for(int k=1;k<=w;k++){
cout<<d[k]<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:17: error: 'c' was not declared in this scope
16 | c[a]=sub;
| ^
|
s550371382 | p00011 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int w, n;
cin >> w >> n;
vector<int> v(w);
iota(v.begin(), v.end(), 1);
int a, b;
char c;
for (int i=0; i<n; ++i) {
cin >> a >> c >> b;
swap(v[a - 1], v[b - 1]);
}
for (i... | a.cc: In function 'int main()':
a.cc:12:5: error: 'iota' was not declared in this scope
12 | iota(v.begin(), v.end(), 1);
| ^~~~
|
s548811157 | p00011 | C++ | import java.util.Scanner;
public class Main{
private static void change(int data[],int f,int s){
int temp = data[f-1];
data[f-1] = data[s-1];
data[s-1] = temp;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int w = scan.nextInt();
int n = scan.nextInt();
int[] data = ... | 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{
| ^~~~~~
|
s185883634 | p00012 | Java |
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
double y3 = sc.nextDouble();
double xp = sc.nextDoub... | Main.java:6: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s528811182 | p00012 | Java | import java.util.*;
public class main {
private static Scanner sc=new Scanner(System.in);
static int x1,x2,x3,y1,y2,y3,xp,yp;
public static void main(String[] args) {
while(sc.hasNextInt()){
int xm[ ]=new int[3];
int ym[]=new int[3];
for (int i = 0; i < 3; i++) {
xm[i]=sc.nextInt();
ym[i]=sc.nextI... | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s336566048 | p00012 | Java | import java.util.Arrays;
import java.util.Scanner;
public class main2 {
private static Scanner sc=new Scanner(System.in);
static double xp,yp;
public static void main(String[] args) {
while(sc.hasNextDouble()){
double xm[]=new double[3];
double ym[]=new double [3];
for (int i = 0; i < 3; i++) {
xm[i]=... | Main.java:3: error: class main2 is public, should be declared in a file named main2.java
public class main2 {
^
1 error
|
s956400351 | p00012 | Java | import java.util.Arrays;
import java.util.*;
public class main {
private static Scanner sc=new Scanner(System.in);
static double xp,yp;
public static void main(String[] args) {
while(sc.hasNextDouble()){
double xm[]=new double[3];
double ym[]=new double [3];
for (int i = 0; i < 3; i++) {
xm[i]=sc.next... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s819310742 | p00012 | Java | import java.util.Arrays;
import java.util.*;
public class main {
private static Scanner sc=new Scanner(System.in);
static double xp,yp;
public static void main(final String[] args) {
while(sc.hasNextDouble()){
double xm[]=new double[3];
double ym[]=new double [3];
for (int i = 0; i < 3; i++) {
xm[i]=s... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s906576001 | p00012 | Java | import java.util.Arrays;
import java.util.*;
public class main {
private static Scanner sc=new Scanner(System.in);
static double xp,yp;
public static void main(final String[] args) {
while(sc.hasNextDouble()){
double xm[]=new double[3];
double ym[]=new double [3];
for (int i = 0; i < 3; i++) {
xm[i]=s... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s801012657 | p00012 | Java | import java.io.IOException;
import java.util.Scanner;
public class Main {
static double cross(double x1, double x2, double y1, double y2, double xp, double yp){
return (x2-x1) * (yp-y2) - (y2-y1) * (xp-x2);
public static void main(String[] args) throws IOException {
Scanner sc = new Scanne... | Main.java:8: error: illegal start of expression
public static void main(String[] args) throws IOException {
^
1 error
|
s656582584 | p00012 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNextDouble()){
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
... | Main.java:51: error: cannot find symbol
public Line(Point p1, Point p2){
^
symbol: class Point
location: class Line
Main.java:51: error: cannot find symbol
public Line(Point p1, Point p2){
^
symbol: class Point
location: class Line
Main.java:64: error: cannot find symbo... |
s629413713 | p00012 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNextDouble()){
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
double x2 = sc.nextDouble();
double y2 = sc.nextDouble();
double x3 = sc.nextDouble();
... | Main.java:138: error: reached end of file while parsing
}
^
1 error
|
s226227919 | p00012 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
public class Main {
public static void main(String[] args) {
print();
}
public static void print() {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
St... | Main.java:44: error: reached end of file while parsing
}
^
1 error
|
s467504449 | p00012 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
public class AOJ0012 {
public static void main(String[] args) throws IOException {
//input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((s... | Main.java:6: error: class AOJ0012 is public, should be declared in a file named AOJ0012.java
public class AOJ0012 {
^
Note: Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
|
s470365137 | p00012 | Java | import java.util.Scanner;
import static java.lang.Math.*;
class Main {
public static void main (String args[]) {
Scanner scan = new Scanner(System.in);
double[] p = new double[6];
double[] S = new double[4];
while (scan.hasNext()) {
for (int i=0; i<6; i++) {
p[i] = scan.nextDouble();
}
doubl... | Main.java:41: error: variable S is already defined in method main(String[])
double S = round(S[0] + S[1] + S[2]);
^
Main.java:41: error: array required, but double found
double S = round(S[0] + S[1] + S[2]);
^
Main.java:41: error: array required, but double found
double... |
s464998906 | p00012 | Java | import java.io.BufferedRender;
import java.io.IOException;
import java.io.InputStreamRender;
public class main{
public static void main(String[] args) throws IOException{
BufferedRender br = new BufferRender(new InputStreamReader(System.in));
String str = br.readLine();
Boolean isNull = str.equals("");
while(!isNull){... | Main.java:5: error: class main is public, should be declared in a file named main.java
public class main{
^
Main.java:1: error: cannot find symbol
import java.io.BufferedRender;
^
symbol: class BufferedRender
location: package java.io
Main.java:3: error: cannot find symbol
import java.io.Inpu... |
s504038994 | p00012 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class main{
public static void main(String[] args) throws IOException{
BufferedRender br = new BufferRender(new InputStreamReader(System.in));
String str = br.readLine();
Boolean isNull = str.equals("");
while(!isNull){... | Main.java:5: error: class main is public, should be declared in a file named main.java
public class main{
^
Main.java:7: error: cannot find symbol
BufferedRender br = new BufferRender(new InputStreamReader(System.in));
^
symbol: class BufferedRender
location: class main
Main.java:7: error: cannot find symb... |
s359331633 | p00012 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferReader(new InputStreamReader(System.in));
String str = br.readLine();
Boolean isNull = str.equals("");
while(!isNull){... | Main.java:5: error: class main is public, should be declared in a file named main.java
public class main{
^
Main.java:7: error: cannot find symbol
BufferedReader br = new BufferReader(new InputStreamReader(System.in));
^
symbol: class BufferReader
location: class main
2 errors
|
s503623453 | p00012 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
Boolean isNull = str.equals("");
while(!isNull... | Main.java:5: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s804040510 | p00012 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class APointInATriangle {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
Boolean isNull = str==nu... | Main.java:5: error: class APointInATriangle is public, should be declared in a file named APointInATriangle.java
public class APointInATriangle {
^
1 error
|
s045577024 | p00012 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<String> list = new ArrayList<String>();
while(scan.hasNext()){
x1 = scan.nextDouble();
y1 = scan.nextDouble();
x2 = scan.nextDouble();
y2 = scan.nextDouble(... | Main.java:9: error: cannot find symbol
x1 = scan.nextDouble();
^
symbol: variable x1
location: class Main
Main.java:10: error: cannot find symbol
y1 = scan.nextDouble();
^
symbol: variable y1
location: class Main
Main.java:11: error: cannot find symbol
x2 = scan.nextDouble();
^
symbol: ... |
s791489042 | p00012 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
double x1 = scan.nextDouble();
double y1 = scan.nextDouble();
double x2 = scan.nextDouble();
double y2 = scan.nextDouble();
double x3 = s... | Main.java:25: error: cannot find symbol
if(S_abc == S_pab + S_pac + P_pbc){
^
symbol: variable P_pbc
location: class Main
1 error
|
s560970280 | p00012 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
double[] x = new double[3];
double[] y = new double[3];
for(int i = 0; i < 3; i++){
x[i] = scan.nextDouble();
y[i] = scan.nextdouble();... | Main.java:12: error: cannot find symbol
y[i] = scan.nextdouble();
^
symbol: method nextdouble()
location: variable scan of type Scanner
1 error
|
s001925355 | p00012 | Java | import java.util.*;
public class V0p012 {
Scanner sc;
void run() {
sc = new Scanner(System.in);
Point[] a = new Point [4];
while (sc.hasNext()){
for (int i=0;i<4;i++) {
double x = sc.nextDouble();
double y = sc.nextDouble();
a[i] = new Point(x,y);
}
Line[] l = new Line[3];
Line[] lc =... | Main.java:4: error: class V0p012 is public, should be declared in a file named V0p012.java
public class V0p012 {
^
1 error
|
s268441081 | p00012 | Java | import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
void run() {
while ( sc.hasNext() ) {
Point[] p = new Point[4];
for(int i=0;i<4;i++) {
p[i] = new Point( sc.nextDouble(),sc.nextDouble() );
}
if(!isInner(p[0], p[1], p[2], p[3])) System.out.println("NO");
else Sy... | Main.java:26: error: cannot find symbol
new Main.run();
^
symbol: class run
location: class Main
1 error
|
s014429971 | p00012 | Java | import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main
{
public static void main(String[] arg) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
while((s=br.readLine())!=null){
double x1 = Doubl... | Main.java:23: error: illegal character: '\u3000'
else ?System.out.println("NO");
^
1 error
|
s910772220 | p00012 | Java | import java.util.Scanner;
public class main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double xa,ya,xb,yb,xc,yc,xp,yp;
double abc, abp, bcp, cap;
xa = sc.nextDouble();
ya = sc.nextDouble();
xb = sc.nextDouble();
yb = sc.nextDouble();
xc = sc.nextDouble();
... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s647237616 | p00012 | C | #iclude<stdio.h>
int main()
{
double x1,y1,x2,y2,x3,y3,xp,yp,maxx=0,maxy=0,minx=0,miny=0;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){
{
maxx=x1;
if(x2>max)
maxx=x2;
else if(x3>max)
maxx=x3;
}
{
minx=x1;
if(x2<minx)
minx=x2;
else if(x3<minx)
minx=... | main.c:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
1 | #iclude<stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:5:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | while(scanf("%lf %lf %lf %lf %lf %lf %lf... |
s866735902 | p00012 | C | #include <stdio.h>
int sign(double x);
int main(void)
{
double x1, y1, x2, y2, x3, y3;
double xp, yp;
double vec12_x_vec1p, vec23_x_vec2p, vec31_x_vec3p_g3;
int judge;
while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
&x1, &y1, &x2, &y2, &x3, &y3, &xp, &yp) != EOF) {
vec12_... | main.c: In function 'main':
main.c:17:9: error: 'vec31_x_vec3p' undeclared (first use in this function); did you mean 'vec31_x_vec3p_g3'?
17 | vec31_x_vec3p = (x1 - x3) * (yp - y3) - (y1 - y3) * (xp - x3);
| ^~~~~~~~~~~~~
| vec31_x_vec3p_g3
main.c:17:9: note: each undeclared ident... |
s497198086 | p00012 | C | #include <stdio.h>
int main(void)
{
double x1,x2,x3,xp,y1,y2,y3,yp,v1,v2,v3;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){
v1=(x2-x1)*(xp-x1)+(y2-y1)*(yp-y1);
v2=(x3-x2)*(xp-x2)+(y3-y2)*(yp-y2);
v3=(x1-x3)*(xp-x3)+(y1-y3)*(yp-y3);
if((v1>0 && v2>0 && v3>0) printf("YES\... | main.c: In function 'main':
main.c:10:42: error: expected ')' before 'printf'
10 | if((v1>0 && v2>0 && v3>0) printf("YES\n");
| ~ ^~~~~~~
| )
main.c:13:9: error: expected expression before '}' token
13 | ... |
s751984973 | p00012 | C | #include <stdio.h>
int main(void)
{
double x1,x2,x3,xp,y1,y2,y3,yp,v1,v2,v3;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){
v1=(x2-x1)*(xp-x1)+(y2-y1)*(yp-y1);
v2=(x3-x2)*(xp-x2)+(y3-y2)*(yp-y2);
v3=(x1-x3)*(xp-x3)+(y1-y3)*(yp-y3);
if(v1>0 && v2>0 && v3>0) printf("YES\n... | main.c: In function 'main':
main.c:12:43: error: lvalue required as left operand of assignment
12 | else if(v1=0 && v2=0 && v3=0) printf("YES\n");
| ^
|
s822929421 | p00012 | C | #include<stdio.h>
int main() {
double a, b, c, p1[2], p2[2], p3[2], pp[2];
while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &p1[0], &p1[1], &p2[0], &p2[1], &p3[0], &p3[1], &pp[0], &pp[1]) != EOF) {
a = p2[1] - p1[1]; b = p1[0] - p2[0]; c = p2[0] * p1[1] - p1[0] * p2[1];
if ((a * p3[0] + b * p3[1] + c) * (a *... | main.c: In function 'main':
main.c:14:9: error: expected '}' before 'else'
14 | } else {
| ^~~~
|
s721808750 | p00012 | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define DEBUG
#define POINT_NUMBER 8
double get_area(double x1, double x2, double x3, double y1, double y2, double y3);
main()
{
double x1, y1, x2, y2, x3, y3, px, py;
while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3, &px, &py) != EOF)
... | main.c:11:1: error: return type defaults to 'int' [-Wimplicit-int]
11 | main()
| ^~~~
main.c: In function 'main':
main.c:23:40: error: 'abp' undeclared (first use in this function); did you mean 'abs'?
23 | printf("%lf\n%lf\n%lf\n%lf\n", abp, bcp, cap, abc);
| ... |
s273173401 | p00012 | C | #include<stdio.h>
#include<math.h>
int main( void )
{
double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;
double xp = 0, yp = 0;
double sum = 0, s = 0, s1 = 0, s2 = 0, s3 = 0;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &xp, &yp) != EOF)
{
... | main.c: In function 'main':
main.c:14:103: error: expected ')' before 's1'
14 | s = fabs(((x1 * y2) + (x2 * y3) + (x3 * y1) - (y1 * x2) - (y2 * x3) - (y3 * x1)) / 2.0
| ~ ^
| ... |
s069463565 | p00012 | C | #include <stdio.h>
#include<math.h>
struct Vector {
double x;
double y;
};
struct Vector sub_vector(struct Vector a, struct Vector b) {
struct Vector ret;
ret.x = a.x - b.x;
ret.y = a.y - b.y;
return ret;
}
int main(void)
{
struct Vector a1, b2, c3, dp, a1, b2, c3, dp;
struct Vector vecAB,vecBP, vecBC,vecCP,v... | main.c: In function 'main':
main.c:17:39: error: redeclaration of 'a1' with no linkage
17 | struct Vector a1, b2, c3, dp, a1, b2, c3, dp;
| ^~
main.c:17:23: note: previous declaration of 'a1' with type 'struct Vector'
17 | struct Vector a1, b2, c3, dp, a... |
s486605250 | p00012 | C | #include <stdio.h>
#include <math.h>
int main(void)
{
int n;
int i;
double x1, y1, x2, y2, x3, y3;
double a, b, c, d, e, f;
double px, py, r;
scanf("%d",&n);
for(i=0; i<n; i++)
{
scanf("%lf%lf%lf%lf%lf%lf",&x1, &y1, &x2, &y2, &x3, &y3);
a = 2 * (x1 -x2);
b = 2 * (y1 -y2);
c = 2 * (x1 -x3)... | In file included from main.c:2:
main.c: In function 'main':
main.c:31:32: error: 'distance' undeclared (first use in this function)
31 | if(islessequal(distance, 0.001))
| ^~~~~~~~
main.c:31:32: note: each undeclared identifier is reported only once for each funct... |
s755284083 | p00012 | C | #include
#include
int debug=0;
int main(void){
ツ ツ double ax, ay, bx, by, cx, cy, px, py;
ツ ツ double a, b, c, ap, bp, cp;
ツ ツ double tmp;
ツ ツ double s2, sa2, sb2, sc2;
ツ ツ double s, sa, sb, sc;
ツ ツ while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &ax, &ay, &bx, &by, &cx, &cy, &px, &py) != -1){
ツ ツ ツ ツ //ツ各ツ静シツ閉ェツづ個陳... | main.c:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
main.c:2:10: error: #include expects "FILENAME" or <FILENAME>
2 | #include
| ^
main.c: In function 'main':
main.c:7:3: error: stray '\343' in program
7 | <U+30C4><U+3000><U+30C4><U+3000>double ax, ay... |
s829619472 | p00012 | C | main(){for(float d,e,f,g,h,i,m,n;~scanf("%f%f%f%f%f%f%f%f",&d,&e,&f,&g,&h,&i,&m,&n);puts((f-d)*(n-e)*(f=(h-f)*(n-g)-(m-f)*(i-g))>f*(m-d)*(g-e)&f*(d-h)*(n-i)>f*(m-h)*(e-i)?"YES":"NO"));} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){for(float d,e,f,g,h,i,m,n;~scanf("%f%f%f%f%f%f%f%f",&d,&e,&f,&g,&h,&i,&m,&n);puts((f-d)*(n-e)*(f=(h-f)*(n-g)-(m-f)*(i-g))>f*(m-d)*(g-e)&f*(d-h)*(n-i)>f*(m-h)*(e-i)?"YES":"NO"));}
| ^~~~
main.c: In function 'main':
main.c:1:35: error:... |
s977230389 | p00012 | C | using System;
using System.Collections.Generic;
using System.Linq;
namespace AOJ
{
class Point
{
public double X { get; private set; }
public double Y { get; private set; }
public Point(double x, double y)
{
X = x;
Y = y;
}
public static Point operator+ (Point p1, Point p2)
... | main.c:1:1: error: unknown type name 'using'
1 | using System;
| ^~~~~
main.c:2:1: error: unknown type name 'using'
2 | using System.Collections.Generic;
| ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
2 | using System.Collections.Generic;
| ... |
s678247377 | p00012 | C | #include <stdio.h>
double hantei(double,double,double,double,double,double,double,double);
int main(){
double x1,x2,x3,y1,y2,y3,xp,yp;
double heix,heiy;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){
f=0;
heix=(x1+x2+x3)/3;
heiy=(y1+y2+y3)/3;
if(hantei(x1,y1,x2,y2,xp,yp,heix,he... | main.c: In function 'main':
main.c:10:1: error: 'f' undeclared (first use in this function)
10 | f=0;
| ^
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears in
|
s155999701 | p00012 | C | import math
def L(x1,y1,x2,y2):
return math.sqrt((x1-x2)**2+(y1-y2)**2)
def S(a,b,c):
s=(a+b+c)/2
return math.sqrt(s*(s-a)*(s-b)*(s-c))
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float, raw_input().split())
a = L(x1,y1,x2,y2)
b = L(x1,y1,x3,y3)
c = L(x2,y2,x3,y3)
... | main.c:1:1: error: unknown type name 'import'
1 | import math
| ^~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'def'
3 | def L(x1,y1,x2,y2):
| ^~~
main.c:3:1: error: unknown type name 'def'
|
s784700491 | p00012 | C | #include<stdio.h>
#include<math.h>
int main(void) {
    double x[4]={0};
    double y[4]={0};
    double t1, t2, t3, s1, s2;
    while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x[1],&y[1],&x[2],&y[2],&x[3],&y[3],&x[0],&y[0]) != EOF){
 &... | main.c: In function 'main':
main.c:4:2: error: stray '#' in program
4 |     double x[4]={0};
| ^
main.c:4:1: error: lvalue required as unary '&' operand
4 |     double x[4]={0};
| ^
main.c:4:8: error: stray '#' in program
4 |     doubl... |
s523183328 | p00012 | C | #include<stdio.h>
#include<math.h>
int main(void){
double x[4],y[4],a,b,c;
while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3])!=EOF){
x[0]-=x[3];
x[1]-=x[3];
x[2]-=x[3];
y[0]-=y[3];
y[1]-=y[3];
y[2]-=y[3];
a=sqrt(x[0]*x[0]+y[0]*y[0]);
b=sqrt(x[1]*x[1]+y[1]*y[1]);
... | main.c: In function 'main':
main.c:27:40: error: expected ';' before '}' token
27 | printf("YES\n")
| ^
| ;
28 | }
| ~
|
s607722892 | p00012 | C | #include<stdio.h>
#include<math.h>
int dist(int x1,int y1,int x2,int y2){
return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
}
int area(int p,int q,int r){
int s=(p+q+r)/2;
return sqrt(s*(s-p)*(s-q)*(s-r));
}
int main(void){
double x[4],y[4],a,b,c,d;
while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2... | main.c: In function 'dist':
main.c:5:53: error: expected ';' before '}' token
5 | return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
| ^
| ;
6 | }
| ~ ... |
s134693640 | p00012 | C++ | #include <iostream>
#include <complex>
using namespace std;
double cross(complex<double> A, complex<double> B){
return (conj(A)*B).imag();
}
int main(){
complex<double> Points[3], P;
while(true){
double x, y;
for(int i=0; i<3; i++){
cin >> x >> y;
V[i] = {x, y};
... | a.cc: In function 'int main()':
a.cc:15:13: error: 'V' was not declared in this scope
15 | V[i] = {x, y};
| ^
|
s792749927 | p00012 | C++ | #include <iostream>
using namespace std;
double distance(double x1, double y1, double x2, double y2)
{
return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
double helon(double a, double b, double c)
{
double s = (a + b + c) / 2;
return sqrt(s * (s - a) * (s - b) * (s - c));
}
double helon(double x1, do... | a.cc: In function 'double distance(double, double, double, double)':
a.cc:7:16: error: 'sqrt' was not declared in this scope
7 | return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
| ^~~~
a.cc: In function 'double helon(double, double, double)':
a.cc:14:16: error: 'sqrt' was not... |
s063142620 | p00012 | C++ | 0.0 0.0 1.0 4.0 5.0 3.0 -1.0 3.0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 0.0 0.0 1.0 4.0 5.0 3.0 -1.0 3.0
| ^~~
|
s447468575 | p00012 | C++ | import sys
def side(p1, p2, p3): return (p3[1]-p1[1])*(p2[0]-p1[0])-(p2[1]-p1[1])*(p3[0]-p1[0])>0
for s in sys.stdin:
x = map(float, raw_input().split())
p1 = x[0:2]
p2 = x[2:4]
p3 = x[4:6]
p0 = x[6:]
print ["NO","YES"][(side(p1, p2, p0)==side(p2, p3, p0) and side(p2, p3, p0)==side(p3, p1, p0))] | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s502837550 | p00012 | C++ | #define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) static_cast<bitset<16> >(x)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))
#define ALL(a) (a).begin(),... | a.cc:124:9: error: 'vector' does not name a type
124 | typedef vector<P> G;
| ^~~~~~
a.cc:127:16: error: 'G' was not declared in this scope
127 | int containsGP(G g, P p)
| ^
a.cc:127:23: error: expected primary-expression before 'p'
127 | int containsGP(G g, P p)
| ... |
s431187891 | p00012 | C++ | #include <iostream>
#include <vector>
#include <limits.h>
using namespace std;
struct Point
{
Point() :x(0.0), y(0.0) {}
Point(double _x, double _y) : x(_x), y(_y) {}
double x;
double y;
};
bool HalfPlaneTest(const Point& P1, const Point& P2, const Point& P)
{
return ((P2.y - P1.y) * P.x - (P2.x - P1.x) * P.y + (P... | a.cc: In constructor 'Triangle::Triangle()':
a.cc:18:27: error: 'DBL_MAX' was not declared in this scope
18 | Triangle() : minX(DBL_MAX), maxX(DBL_MIN), minY(DBL_MAX), maxY(DBL_MIN) {}
| ^~~~~~~
a.cc:4:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixabl... |
s378329555 | p00012 | C++ | #include <iostream>
#include <vector>
#include <limits>
using namespace std;
struct Point
{
Point() :x(0.0), y(0.0) {}
Point(double _x, double _y) : x(_x), y(_y) {}
double x;
double y;
};
bool HalfPlaneTest(const Point& P1, const Point& P2, const Point& P)
{
return ((P2.y - P1.y) * P.x - (P2.x - P1.x) * P.y + (P2.... | a.cc: In constructor 'Triangle::Triangle()':
a.cc:18:27: error: 'DBL_MAX' was not declared in this scope
18 | Triangle() : minX(DBL_MAX), maxX(DBL_MIN), minY(DBL_MAX), maxY(DBL_MIN) {}
| ^~~~~~~
a.cc:4:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixabl... |
s995393739 | p00012 | C++ | #include <cstdio>
#include <iostream>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
bool judge(double x[3], double y[3]) {
double rad1 = atan2(y[0], x[0]);
cout << rad1 << endl;
double rad2 = atan2(y[1], x[1]);
cout << rad2 << endl;
double rad3 = atan2(y[2], x[2]);
cout << rad3 << endl;
if... | a.cc: In function 'bool judge(double*, double*)':
a.cc:8:23: error: 'atan2' was not declared in this scope
8 | double rad1 = atan2(y[0], x[0]);
| ^~~~~
|
s392129940 | p00012 | C++ | #include <cstdio>
#include <iostream>
#include <cmath>
using namespace std;
bool judge(double x[2], double y[2]) {
double cross = x[0] * y[1] - y[0] * x[1];
if(cross >= 0) return true;
else return false;
}
int main() {
double x1, y1, x2, y2, x3, y3, xp, yp;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y... | a.cc: In function 'int main()':
a.cc:17:17: error: 'x' was not declared in this scope; did you mean 'ax'?
17 | x[0] = x2 - x1;
| ^
| ax
a.cc:18:17: error: 'y' was not declared in this scope; did you mean 'ay'?
18 | y[0] = y2 - y1;
|... |
s729862721 | p00012 | C++ | #include <iostream>
#include <iomanip>
#include <math.h>
#include <utility>
#include <cstdlib>
using namespace std;
int main(){
int n;
cin >> n;
while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp){
bool ans=true;
double x[3],y[3],xp,yp;
cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >>... | a.cc: In function 'int main()':
a.cc:11:22: error: 'x' was not declared in this scope
11 | while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp){
| ^
a.cc:11:30: error: 'y' was not declared in this scope
11 | while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> ... |
s829954920 | p00012 | C++ | #include <iostream>
#include <iomanip>
#include <math.h>
#include <utility>
#include <cstdlib>
using namespace std;
int main(){
while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp){
bool ans=true;
double x[3],y[3],xp,yp;
cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp;
//????... | a.cc: In function 'int main()':
a.cc:9:22: error: 'x' was not declared in this scope
9 | while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp){
| ^
a.cc:9:30: error: 'y' was not declared in this scope; did you mean 'yn'?
9 | while(cin >> x[0] >> y[0] >... |
s207981512 | p00012 | C++ | #include <iostream>
#include <iomanip>
#include <math.h>
#include <utility>
#include <cstdlib>
using namespace std;
int main(){
double x[3],y[3],xp,yp;
cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp)
bool ans=true;
for(int i=0;i<3;i++){
double gaiseki;
int k = (i+1)%3;
double vx,vy,vpx,... | a.cc: In function 'int main()':
a.cc:10:72: error: expected ';' before ')' token
10 | cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp)
| ^
| ... |
s959764426 | p00012 | C++ | #include <iostream>
#include <iomanip>
#include <math.h>
#include <utility>
#include <cstdlib>
using namespace std;
int main(){
double x[3],y[3],xp,yp;
cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp
bool ans=true;
for(int i=0;i<3;i++){
double gaiseki;
int k = (i+1)%3;
double vx,vy,vpx,v... | a.cc: In function 'int main()':
a.cc:10:72: error: expected ';' before 'bool'
10 | cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp
| ^
| ;
... |
s828362127 | p00012 | C++ | def side(p1, p2)
#the line from p1(a,b) to p2(c,d). return [e,f,g] where ex+fy=g
a,b = p1
c,d = p2
e = b - d
f = c - a
g = b*c - d*a
return [e,f,g]
end
def between?(p1, p2, p3, q)
#Is q between p1 ~ line from p2 to p3?
a,b,c = side(p2,p3)
dist_array = [p1, q].map{|point| (point[0]*a + poi... | a.cc:2:5: error: invalid preprocessing directive #the
2 | #the line from p1(a,b) to p2(c,d). return [e,f,g] where ex+fy=g
| ^~~
a.cc:12:5: error: invalid preprocessing directive #Is
12 | #Is q between p1 ~ line from p2 to p3?
| ^~
a.cc:1:1: error: 'def' does not name a type
1 | def ... |
s894985699 | p00012 | C++ | import java.util.*;
public class Main{
private static String a;
static double xp,yp,z,x1,y1;
public static double[] w(double[] x, double[] y) {
x[2] = -x[2];
y[2] = -y[2];
z = (x[0] * y[1] )- (x[1] * y[0]);
x1 = +(y[1] * x[2]) - (x[1] * y[2]);
y1 = +(x[0] * y[2]) - (y[0] * x[2]);
return new doub... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
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{
| ^~~~~~
|
s279569203 | p00012 | C++ | Ginclude <iostream>
#include <algorithm>
using namespace std;
int check(double x1, double y1, double x2, double y2, double x3, double y3){
double ab = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
double bc = sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3));
double ca = sqrt((x3 - x1) * (x3 - x1) + (y3 - ... | a.cc:1:1: error: 'Ginclude' does not name a type
1 | Ginclude <iostream>
| ^~~~~~~~
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... |
s132775477 | p00012 | C++ | #include <stdio.h>
using namespace std;
int main(){
double px,py;
double tx[3],ty[3];
bool flag;
bool v[3];
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&tx[0],&ty[0],&tx[1],&ty[1],&tx[2],&ty[2],&px,&py) == 8){
for(int i=0;i<3;i++){
tx[i]=tx[i]-px;
ty[i]=ty[i]-py;
}
//t[i]→t[i+1]のベクトルに対してt[i]→(px,py)のベクトルが同じ方向を向いているかを... | a.cc: In function 'int main()':
a.cc:23:1: error: 'cout' was not declared in this scope
23 | cout<<"NO"<<endl;
| ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <stdio.h>
+++ |+#include <iostream>
2 | using name... |
s657939068 | p00012 | C++ | #include <stdio.h>
using namespace std;
int main(){
double px,py;
double tx[3],ty[3];
bool flag;
bool v[3];
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&tx[0],&ty[0],&tx[1],&ty[1],&tx[2],&ty[2],&px,&py) == 8){
for(int i=0;i<3;i++){
tx[i]=tx[i]-px;
ty[i]=ty[i]-py;
}
for(int i=0;i<3;i++){
if((tx[i%3]*ty[(i+1)%3])-(ty[i... | a.cc: In function 'int main()':
a.cc:21:1: error: 'cout' was not declared in this scope
21 | cout<<"NO"<<endl;
| ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <stdio.h>
+++ |+#include <iostream>
2 | using name... |
s788035207 | p00012 | C++ | #include <bits/stdc++.h>
using namespace std;
class D3
{
public:
long double X , Y , Z , EPS;
D3(long double , long double , long double);
bool operator== (D3 Partner);
D3 operator*(long double);
D3 operator/(long double);
};
class Point :private D3
{
public:
Point(long double , long double , long double);
l... | a.cc: In function 'int main()':
a.cc:278:29: error: 'class D3' has no member named 'S_point'
278 | if(abs(calc.S_point(X , Y , Z) - ( calc.S_point(X , Y , P) + calc.S_point(X , Z , P) + calc.S_point(Z , Y , P) )) < 1e-6)
| ^~~~~~~
a.cc:278:57: error: 'class D3' has no... |
s533751293 | p00012 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
#define DEBUG(x) cout<<#x<<": "<<x... | a.cc: In function 'double dot(P, P)':
a.cc:22:43: error: expected ';' before '}' token
22 | double dot(P a,P b){return real(conj(a)*b)};
| ^
| ;
a.cc: In function 'double cross(P, P)':
a.cc:23:45: error: expected ';' befo... |
s125750846 | p00012 | C++ | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.InputStream;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodu... |
s144097941 | p00012 | C++ | $ cat A_point_in_a_triangle.cpp
#include<bits\stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a),end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;
double dist(double x1, double y1, double x2, do... | a.cc:2:9: fatal error: bits\stdc++.h: No such file or directory
2 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s338336908 | p00012 | C++ | #include<bits\stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a),end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;
double dist(double x1, double y1, double x2, double y2){
return sqrt( ((x2 ... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s320608404 | p00012 | C++ | #include<bits\stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a),end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;
double dist(double x1, double y1, double x2, double y2){
return sqrt( ((x2 ... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s037112290 | p00012 | C++ | #include<bits\stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a),end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;
double dist(double x1, double y1, double x2, double y2){
return sqrt( ((x2 ... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s189418341 | p00012 | C++ | #include<iostream>
using namespace std;
struct Point { long double px, py; };
long double dot(const Point& a, const Point& b) { return a.px * b.px + a.py * b.py; }
long double crs(const Point& a, const Point& b) { return a.px * b.py - a.py * b.px; }
long double norm(Point a) { return a.x*a.x + a.y*a.y; }
Point Minus(Po... | a.cc: In function 'long double norm(Point)':
a.cc:6:38: error: 'struct Point' has no member named 'x'; did you mean 'px'?
6 | long double norm(Point a) { return a.x*a.x + a.y*a.y; }
| ^
| px
a.cc:6:42: error: 'struct Point' has no... |
s781390575 | p00012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
double x1, y1, x2, y2, x3, y3, xp, yp;
while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){
double a = x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2);
double b = x*(y1 - y2) + x1*(y2 - y) + x2*(y - y1);
double c = x*(y2 - y3) + x2*(y3 - y) ... | a.cc: In function 'int main()':
a.cc:11:16: error: 'x' was not declared in this scope
11 | double b = x*(y1 - y2) + x1*(y2 - y) + x2*(y - y1);
| ^
a.cc:11:39: error: 'y' was not declared in this scope
11 | double b = x*(y1 - y2) + x1*(y2 - y) + x2*(y - y1);
| ... |
s479079037 | p00012 | C++ | using namespace std;
typedef complex<double> xy_t;
xy_t a, b, c, p;
double x1, x2, x3, xp, y_1, y2, y3, yp;
double s1, s2, s3;
int main()
{
while(cin >> x1 >> y_1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp)
{
a=xy_t(x1, y_1);
b=xy_t(x2, y2);
c=xy_t(x3, y3);
p=xy_t(xp, yp);
s1=(conj(a-p)*(b-p)).imag();
s2=(conj(b... | a.cc:2:9: error: 'complex' does not name a type
2 | typedef complex<double> xy_t;
| ^~~~~~~
a.cc:3:1: error: 'xy_t' does not name a type
3 | xy_t a, b, c, p;
| ^~~~
a.cc: In function 'int main()':
a.cc:8:15: error: 'cin' was not declared in this scope
8 | while(cin >> x1 >> y_1 >... |
s543915655 | p00012 | C++ | #include<iostream>
#include<complex>
#include<cmath>
#include<queue>
using namespace std;
typedef complex<double> xy_t;
double cross_product(xy_t p,xy_t q);
{
return (conj(p)*q).imag();
}
int main()
{
double x[4],y[4];
while(true){
for( int i = 0; i < 4; ++i) cin >> x[i] >> y[i];
if(!cin) break;
xy_t ... | a.cc:8:1: error: expected unqualified-id before '{' token
8 | {
| ^
|
s510835495 | p00012 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
double x[4],y[4],r[3];
void che(a,b){
if(x[a]>x[b]){
swap(x[a],x[b]);
swap(y[a],y[b]);
}
}
int main(){
int m=0;
while(cin>>x[0]>>y[0]>>x[1]>>y[1]>>x[2]>>y[2]>>x[3]>>y[3]){
che(0,1);
che(1,2);
che(0,1);
if(y[0]<=y[3] && y[3]<=y[1]){
r[0]=x[0]... | a.cc:5:6: error: variable or field 'che' declared void
5 | void che(a,b){
| ^~~
a.cc:5:10: error: 'a' was not declared in this scope
5 | void che(a,b){
| ^
a.cc:5:12: error: 'b' was not declared in this scope
5 | void che(a,b){
| ^
a.cc: In function 'int main()':
a... |
s024588328 | p00012 | C++ | #include<iostream>
using namespace std;
double cross(double x1, double y1, double x2, double y2){
return (x1 * y2) - (y1 * x2);
}
int main(){
double x[3], y[3], x, y;
while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> px >> py){
double ret[3];
for(int i = 0; i < 3; ++i ){
int n =( i+1 ) % 3;
ret[... | a.cc: In function 'int main()':
a.cc:7:28: error: conflicting declaration 'double x'
7 | double x[3], y[3], x, y;
| ^
a.cc:7:16: note: previous declaration as 'double x [3]'
7 | double x[3], y[3], x, y;
| ^
a.cc:7:31: error: conflicting decla... |
s163764995 | p00012 | C++ | #include <iostream>
using namespace std;
class point{ // as necessary
private:
static const double EPS=1e-5;
public:
static const int COUNTER_CLOCKWISE=1;
static const int CLOCKWISE=-1;
static const int ONLINE_BACK=2;
static const int ONLINE_FRONT=-2;
static const int ON_SEGMENT=0;
double x;
double ... | a.cc:6:37: error: 'constexpr' needed for in-class initialization of static data member 'const double point::EPS' of non-integral type [-fpermissive]
6 | static const double EPS=1e-5;
| ^~~
a.cc: In member function 'double point::abs()':
a.cc:32:32: error: 's... |
s521740937 | p00012 | C++ | #include <bits/stdc++.h>
using namespace std;
using db = double;
const db eps = 1e-6;
struct poi {
db x, y;
void r() { cin >> x >> y; }
poi operator -(poi p) {
return {x - p.x, y - p.y};
}
db cross(poi p) {
return x * p.y - y * p.x;
}
};
db xmul(poi a, poi b, poi c) {
return (b - a).cross(c - a);
}
int ma... | a.cc: In function 'int main()':
a.cc:26:28: error: conversion from 'double' to non-scalar type 'poi' requested
26 | poi s = abs(xmul(a, b, c));
| ~~~^~~~~~~~~~~~~~~
a.cc:27:65: error: conversion from 'double' to non-scalar type 'poi' requested
27 | poi... |
s704945076 | p00012 | C++ | #include <iostream>
using namespace std;
struct TPoint
{
double x;
double y;
};
double GetCrossProduct(const TPoint& V1, const TPoint& V2)
{
return V1.x * V2.y - V1.y * V2.x;
}
double Vector(const TPoint& P1, const TPoint& P2)
{
return {P2.x - P1.x, P2.y - P1.y};
}
bool IsSameSide(const TPoint& P1, const TPoint... | a.cc: In function 'double Vector(const TPoint&, const TPoint&)':
a.cc:17:41: error: cannot convert '<brace-enclosed initializer list>' to 'double' in return
17 | return {P2.x - P1.x, P2.y - P1.y};
| ^
a.cc: In function 'bool IsSameSide(const TPoint&, const TPoint... |
s249628667 | p00012 | C++ | #include<iostream>
using namespace std;
int main()
double x
{
double x1,y1,x2,y2,x3,y3,xp,yp;
while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>xp>>yp)
{
if(y1<y2&&y3<y2)
{
for(double i=x1;i<=x3;i+=0.0001)
{x=i;
if((y1-y2)/(x1-x2)*x+y1-((y1-y2)/(x1-x2)*x1)>(y1-y2)/(x1-x2)*xp+y1-((y1-y2)/(x1-x2)*x1)&&(y2-y3)/(x2-x3)*x+y2-((y2-y3)/(... | a.cc:4:1: error: expected initializer before 'double'
4 | double x
| ^~~~~~
|
s960108040 | p00012 | C++ | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
public static void main(String args[])throws Exception{
Scanner cin= new Scanner(System.in);
while(cin.hasNextDouble()){
double in[] = new double[8];
for(int i=0;i<8;i++) in[i]= cin.nextDouble();
int t1,t2,t3;
t1... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s556911540 | p00012 | C++ | import java.util.Scanner;
class Main
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
while (true)
{
double x1, y1, x2, y2, x3, y3, xp, yp;
try
{
x1 = sc.nextDouble();
y1 = sc.nextDouble();
x2 = sc.nextDouble();
y2 = sc.nextDouble();
x3 = sc.nextDo... | 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:5:15: error: expected ':' before 'static'
5 | public static void main(String args[])
| ^~~~~~~
| :
a.... |
s361848089 | p00012 | C++ | #include <iostream>
#include <cmath>
#define mul(s, t) ((s-t)*(s-t))
using namespace std;
int main()
{
double x[3], y[3], u[2], s, t, v;
while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> s >> t){
bool f = true;
for(int i = 0; i < 3; i++){
int p = 0;
for(int j = 0; j < 3; j++){
if(i != j){... | a.cc: In function 'int main()':
a.cc:22:34: error: expected primary-expression before '<' token
22 | if(u[0] =< v || u[1] =< v){
| ^
a.cc:22:47: error: expected primary-expression before '<' token
22 | if(u[0] =< v || u[1] =< v... |
s733098666 | p00012 | C++ | #include <iostream>
using namespace std;
double x[4],y[4],px,py,ax,ay,bx,by;
int main()
{
while(true)
{
for(int i = 1;i<=3;i++){cin >> x[i];cin >> y[i];}
if(cin.eof()){break;}
cin >> px;
cin >> py;
double m,n;
ax = x[2]-x[1];
ay = y[2]-y[1];
bx = x[3]-x[1];
by = y[3]-y[1];
double det = ax*by-ay*bx... | a.cc: In function 'int main()':
a.cc:21:43: error: expected ';' before '}' token
21 | else {cout << "NO" << endl};
| ^
| ;
|
s888387318 | p00012 | C++ | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
public class Main {
Scanner sc;
void run() {
sc = new Scanner(System.in);
Point[] a = new Point [4];
while (sc.hasNext()){
for (int i=0;i<4;i++) {
double x = sc.nextDouble();
double y = sc.nextDouble();
a[i]... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.lang.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1... |
s338547741 | p00012 | C++ | #include <iostream>
#include <cstdlib>
using namespace std;
int main(){
double x1, y1, x2, y2, x3, y3, xp, yp;
while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>xp>>yp){
double sall = (x1-x2)*(y1+y2) + (x2-x3)*(y2+y3) + (x3-x1)*(y3+y1);
double s1 = (x1-x2)*(y1+y2) + (x2-xp)*(y2+yp) + (xp-x1)*(yp+y1);
double s2 = (x1-xp)*(y1+... | a.cc: In function 'int main()':
a.cc:12:20: error: 'fabs' was not declared in this scope; did you mean 'labs'?
12 | if(fabs(sall) == fabs(s1)+fabs(s2)+fabs(s3)){
| ^~~~
| labs
|
s055962959 | p00012 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(void){
ツ ツ double x1, y1, x2, y2, x3, y3, px, py;
ツ ツ double a, b, c, ap, bp, cp;
ツ ツ double tmp;
ツ ツ double s2, sa2, sb2, sc2;
ツ ツ double s, sa, sb, sc;
ツ ツ while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>px>>py){
ツ ツ ツ ツ a = sqrt(fabs((x2-x3) * (x2-x3) + (y2-y3)... | a.cc:6:1: error: extended character is not valid in an identifier
6 | ツ ツ double x1, y1, x2, y2, x3, y3, px, py;
| ^
a.cc:6:1: error: extended character is not valid in an identifier
a.cc:7:1: error: extended character is not valid in an identifier
7 | ツ ツ double a, b, c, ap, bp, cp;
| ^
a.cc:... |
s735136979 | p00012 | C++ | #include <iostream> |#include <iostream>
using namespace std; |#include <stdio.h>
|#include <m... | a.cc:1:90: warning: extra tokens at end of #include directive
1 | #include <iostream> |#include <iostream>
| ^
a.cc:2:91: error: stray '#' in program
... |
s724691793 | p00012 | C++ | #include <iostream>
#include <algorithm>
#include <utility>
using namespace std;
pair<double,double> tp[3];
pair<double,double> p;
bool flag=true;
int main(){
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&tp[0].first,&tp[0].second,&tp[1].first,&tp[1].second,&tp[2].first,&tp[2].second,&p.first,&p.second) ... | a.cc:50:1: error: extended character is not valid in an identifier
50 |
| ^
a.cc:50:1: error: '\U00003000' does not name a type
50 |
| ^~
|
s777314583 | p00012 | C++ | #include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<cfloat>
using namespace std;
double EPS = 1e-10;
double add(double a, double b){
if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
return a+b;
}
struct point{
double x, y;
point(){}
point(double x,double y) : x(... | a.cc: In function 'int inside(point, std::vector<point>)':
a.cc:70:11: error: 'ymn' was not declared in this scope; did you mean 'yn'?
70 | if(a.y<=ymn||a.y>=ymx)return 0;
| ^~~
| yn
a.cc:70:21: error: 'ymx' was not declared in this scope
70 | if(a.y<=ymn||a.y>=ymx)return 0;
... |
s581394675 | p00012 | C++ | struct Vec2 {
double x, y;
Vec2(double x_, double y_) : x(x_), y(y_) {}
};
bool in_the_triangle(const Vec2& a, const Vec2& b, const Vec2& c, const Vec2& p) {
Vec2 aa(a.x-p.x, a.y-p.y);
Vec2 bb(b.x-p.x, b.y-p.y);
Vec2 cc(c.x-p.x, c.y-p.y);
double k = aa.x*bb.y - bb.x*aa.y;
double l = bb.x*cc.y - cc.x*bb.y... | a.cc: In function 'int main()':
a.cc:17:6: error: no matching function for call to 'Vec2::Vec2()'
17 | Vec2 a,b,c,p;
| ^
a.cc:3:3: note: candidate: 'Vec2::Vec2(double, double)'
3 | Vec2(double x_, double y_) : x(x_), y(y_) {}
| ^~~~
a.cc:3:3: note: candidate expects 2 arguments, 0 provided... |
s805220544 | p00012 | C++ | struct Vec2 {
double x, y;
Vec2(double x_, double y_) : x(x_), y(y_) {}
};
bool in_the_triangle(const Vec2& a, const Vec2& b, const Vec2& c, const Vec2& p) {
Vec2 aa(a.x-p.x, a.y-p.y);
Vec2 bb(b.x-p.x, b.y-p.y);
Vec2 cc(c.x-p.x, c.y-p.y);
double k = aa.x*bb.y - bb.x*aa.y;
double l = bb.x*cc.y - cc.x*bb.y... | a.cc: In function 'int main()':
a.cc:18:8: error: 'scanf' was not declared in this scope
18 | while (scanf("%f%f%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f,&g,&h)) {
| ^~~~~
a.cc:19:3: error: 'puts' was not declared in this scope
19 | puts(in_the_triangle(Vec2(a,b),Vec2(c,d),Vec2(e,f),Vec2(g,h)) ? "YES" : "NO"... |
s812411683 | p00012 | C++ | /*problem C*/
#include<stdio.h>
typedef struct{
double x,y;
}point_obj;
int isClossLine(double x1,double y1,double x2,double y2,double x3,double y3,double x4,double y4){
return ( (x1-x2)*(y3-y1)+(y1-y2)*(x1-x3))*((x1-x2)*(y4-y1)+(y1-y2)*(x1-x4));
}
int main(){
point_obj p[5];
int i,j;
p[3].x=0;
p[3].y=0;
wh... | a.cc: In function 'int main()':
a.cc:19:15: error: 'cin' was not declared in this scope
19 | while(cin>>p[0].x){
| ^~~
a.cc: At global scope:
a.cc:50:9: error: expected unqualified-id before 'return'
50 | return 0;
| ^~~~~~
a.cc:51:1: error: expected declaration b... |
s826512622 | p00012 | C++ | /*problem C*/
#include <iostream>
using namespace std;
typedef struct{
double x,y;
}point_obj;
int isClossLine(double x1,double y1,double x2,double y2,double x3,double y3,double x4,double y4){
return ( (x1-x2)*(y3-y1)+(y1-y2)*(x1-x3))*((x1-x2)*(y4-y1)+(y1-y2)*(x1-x4));
}
int main(){
point_obj p[5];
int i,j;
p[... | a.cc:51:9: error: expected unqualified-id before 'return'
51 | return 0;
| ^~~~~~
a.cc:52:1: error: expected declaration before '}' token
52 | }
| ^
|
s689336780 | p00012 | C++ |
double x1, y1, x2, y2, x3, y3, xp, yp;
while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
pair<double, double> a, b, p;
a.first = x2 - x1;
a.second = y2 - y1;
b.first = x3 - x1;
b.second = y3 - y1;
p.first = xp - x1;
p.second = yp - y1;
... | a.cc:3:16: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
3 | double x1, y1, x2, y2, x3, y3, xp, yp;
| ^~
a.cc:4:5: error: expected unqualified-id before 'while'
4 | while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
| ... |
s685915095 | p00012 | C++ |
double x1, y1, x2, y2, x3, y3, xp, yp;
while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
pair<double, double> a, b, p;
a.first = x2 - x1;
a.second = y2 - y1;
b.first = x3 - x1;
b.second = y3 - y1;
p.first = xp - x1;
p.second = yp - y1;
... | a.cc:3:16: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
3 | double x1, y1, x2, y2, x3, y3, xp, yp;
| ^~
a.cc:4:5: error: expected unqualified-id before 'while'
4 | while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
| ... |
s281727900 | p00012 | C++ | #include<iostream>
#include<stdio.h>
using namespace std;
#define EPS 1e-10
struct point{
double x;
double y;
};
struct line{
double a; // 傾き
double b; // 切片
};
int recog_point_place( const point& a , const point&b , const point& c );
bool get_line( const point& a , const point& b , line *a_b );
int main(void)... | a.cc: In function 'bool get_line(const point&, const point&, line*)':
a.cc:63:13: error: 'fabs' was not declared in this scope; did you mean 'labs'?
63 | if( fabs(a.x - b.x) < EPS )
| ^~~~
| labs
a.cc: In function 'int recog_point_place(const point&, const point&, const po... |
s891567548 | p00012 | C++ | def side(p1, p2, p3):
return (p3[1]-p1[1])*(p2[0]-p1[0])-(p2[1]-p1[1])*(p3[0]-p1[0])>0
while True:
try:
x = map(float, raw_input().split())
p1 = x[0:2]
p2 = x[2:4]
p3 = x[4:6]
p0 = x[6:]
if (side(p1, p2, p0)==side(p2, p3, p0) and side(p2, p3, p0)==side(p3, p1, p0... | a.cc:1:1: error: 'def' does not name a type
1 | def side(p1, p2, p3):
| ^~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.