criyle/codenet-compile-errors huggingface dataset:
Language: C++

// 0011.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//#include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ld long double
int main()
{
	int w, n;

	cin.tie(0);
	ios::sync_with_stdio(false);
	cin >> w >> n;
	int a[32];
	for (int i = 0; i < 32; i++)
	{
		a[i] = i + 1;
	}
	for (int i = 0; i < n; i++) {
		string s;
		cin >> s;
		string d[2];
		for (int i = 0; i < s.length; i++) {
			if (s[i] == ',') { d[0] = s.substr(0, i); d[i] = s.substr(i + 1); break; }
		}
		int swap[2];
		for (int i = 0; i < 2; i++) {
			swap[i] = stoi(d[i]);
		}
		int before = a[swap[0] - 1];
		a[swap[0] - 1] = a[swap[1] - 1];
		a[swap[1] - 1] = before;
	}
	for (int i = 0; i < n; i++) {
		cout << a[i] << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:39: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   42 |                 for (int i = 0; i < s.length; i++) {
      |                                     ~~^~~~~~
      |                                             ()
Language: C++

// 0011.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#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>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define roop(a,t) for(ll a=0;a<t;a++)
int main()
{
	ll w, n;

	cin.tie(0);
	ios::sync_with_stdio(false);
	cin >> w >> n;
	ll a[32];
	roop(i, 32) {
		a[i] = i + 1;
	}
	roop(i, n) {
		string s;
		cin >> s;
		string d[2];
		roop(i, s.length()) {
			if (s[i] == ',') { d[0] = s.substr(0, i); d[i] = s.substr(i + 1); break; }
		}
		ll swap[2];
		roop(i, 2) {
			swap[i] = stoll(d[i]);
		}
		ll before = a[swap[0] - 1];
		a[swap[0] - 1] = a[swap[1] - 1];
		a[swap[1] - 1] = before;
	}
	roop(i, n) {
		cout << a[i] << endl;
	}
	return 0;
}


Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

// 0011.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#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>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
#include <typeinfo>
using namespace std;
#define ll long long
#define ld long double
#define roop(a,t) for(ll a=0;a<t;a++)
int main()
{
	ll w, n;

	cin.tie(0);
	ios::sync_with_stdio(false);
	cin >> w >> n;
	ll a[32];
	roop(i, 32) {
		a[i] = i + 1;
	}
	roop(i, n) {
		string s;
		cin >> s;
		string d[2];
		roop(i, s.length()) {
			if (s[i] == ',') { d[0] = s.substr(0, i); d[i] = s.substr(i + 1); break; }
		}
		ll swap[2];
		roop(i, 2) {
			swap[i] = stoll(d[i]);
		}
		ll before = a[swap[0] - 1];
		a[swap[0] - 1] = a[swap[1] - 1];
		a[swap[1] - 1] = before;
	}
	roop(i, n) {
		cout << a[i] << endl;
	}
	return 0;
}


Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

include<iostream>
using namespace std;
int main(){
    int w,n,tmp;
    cin>>w>>n;
    int a[w];
    string s;
    for(int i=0;i<w;i++) a[i]=i+1;
    for(int i=0;i<n;i++){
        cin>>s;
        int x=s[0]-(int)'1',y=s[2]-(int)'1';
        tmp=a[x];
        a[x]=a[y];
        a[y]=tmp;
    }
    for(int i=0;i<w;i++) cout<<a[i]<<endl;
    return 0;
}



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>w>>n;
      |     ^~~
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s;
      |     ^~~~~~
a.cc:10:14: error: 's' was not declared in this scope
   10 |         cin>>s;
      |              ^
a.cc:13:16: error: 'y' was not declared in this scope
   13 |         a[x]=a[y];
      |                ^
a.cc:16:26: error: 'cout' was not declared in this scope
   16 |     for(int i=0;i<w;i++) cout<<a[i]<<endl;
      |                          ^~~~
a.cc:16:38: error: 'endl' was not declared in this scope
   16 |     for(int i=0;i<w;i++) cout<<a[i]<<endl;
      |                                      ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<utility>
#include<cstdio>

int main(void){
    int w,n;
    std::cin>>w;
    std::vector<int> state(w+1);
    for(int i=1;i<=w;i++) state[i]=i;
    std::cin>>n;
    int a,b;
    for(int i=0;i<n;i++){
        scanf("%d,%d",&a,&b);
        std::swap(state[a[i]],state[b[i]]);
    }
    for(int i=1;i<=w;i++) std::cout<<w[i]<<std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: invalid types 'int[int]' for array subscript
   15 |         std::swap(state[a[i]],state[b[i]]);
      |                          ^
a.cc:15:38: error: invalid types 'int[int]' for array subscript
   15 |         std::swap(state[a[i]],state[b[i]]);
      |                                      ^
a.cc:17:39: error: invalid types 'int[int]' for array subscript
   17 |     for(int i=1;i<=w;i++) std::cout<<w[i]<<std::endl;
      |                                       ^
Language: C++

#include<iostream>
#include<vector>
#include<utility>
#include<cstdio>

int main(void){
    int w,n;
    std::cin>>w;
    std::vector<int> state(w+1);
    for(int i=1;i<=w;i++) state[i]=i;
    std::cin>>n;
    int a,b;
    for(int i=0;i<n;i++){
        scanf("%d,%d",&a,&b);
        std::swap(state[a],state[b]);
    }
    for(int i=1;i<=w;i++) std::cout<<w[i]<<std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:39: error: invalid types 'int[int]' for array subscript
   17 |     for(int i=1;i<=w;i++) std::cout<<w[i]<<std::endl;
      |                                       ^
Language: C++

#include <iostream>
#include <string>
#include <sstring>

using namespace std;

int main(){
    int w, n;
    int d[31];
    while(cin >> w >> n){
        for(int i=1;i<=w;i++) d[i] = i;
        for(int i=0;i<n;i++){
            string s; cin >> s;
            istringstream iss >> s;
            for(int j=0;j<s.size();j++)
                if(s[j]==',') s[j] = ' ';
            int a, b; iss >> a >> b;
            swap(d[a], d[b]);
        }
        for(int i=1;i<=w;i++) cout << d[i] << endl;
    }
}

Compiler output:
a.cc:3:10: fatal error: sstring: No such file or directory
    3 | #include <sstring>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(){
    int w, n;
    int d[31];
    while(cin >> w >> n){
        for(int i=1;i<=w;i++) d[i] = i;
        for(int i=0;i<n;i++){
            string s; cin >> s;
            istringstream iss >> s;
            for(int j=0;j<s.size();j++)
                if(s[j]==',') s[j] = ' ';
            int a, b; iss >> a >> b;
            swap(d[a], d[b]);
        }
        for(int i=1;i<=w;i++) cout << d[i] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: expected initializer before '>>' token
   14 |             istringstream iss >> s;
      |                               ^~
a.cc:17:23: error: 'iss' was not declared in this scope
   17 |             int a, b; iss >> a >> b;
      |                       ^~~
Language: C++

#include <stdio.h>

using namespace std;

int main(){
    int w, n;
    int d[31];
    char s[30];
    while(~scanf("%d %d", &w, &n)){
        for(int i=1;i<=w;i++) d[i] = i;
        for(int i=0;i<n;i++){
            scanf("%s", s);
            int a, b;
            sscanf(s, "%d,%d", &a, &b);
            swap(d[a], d[b]);
        }
        for(int i=1;i<=w;i++) cout << d[i] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'swap' was not declared in this scope
   15 |             swap(d[a], d[b]);
      |             ^~~~
a.cc:17:31: error: 'cout' was not declared in this scope
   17 |         for(int i=1;i<=w;i++) cout << d[i] << 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 | 
a.cc:17:47: error: 'endl' was not declared in this scope
   17 |         for(int i=1;i<=w;i++) cout << d[i] << endl;
      |                                               ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 |
Language: C++

 /*
Let's play Amidakuji.

In the following example, there are five vertical lines and four horizontal lines. The horizontal lines can intersect (jump across) the vertical lines.
	
						[picture]
	
In the starting points (top of the figure), numbers are assigned to vertical lines in ascending order from left to right. At the first step, 2 and 4 are swaped by the first horizontal line which connects second and fourth vertical lines (we call this operation (2, 4)). Likewise, we perform (3, 5), (1, 2) and (3, 4), then obtain "4 1 2 5 3" in the bottom.

Your task is to write a program which reads the number of vertical lines w and configurations of horizontal lines and prints the final state of the Amidakuji. In the starting pints, numbers 1, 2, 3, ..., w are assigne to the vertical lines from left to right.
 */
 
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;
 
int main() {
	int w; cin >> w;
	int n; cin >> n;
	int a,b;
	vector<int> ans(w);
	for (int i=0; i<w; i++)
		ans[i] = i+1;
	for (int i=0; i<n; i++) {
		scanf("%d, %d\n", &a, &b)
		swap(ans[a-1], ans[b-1]);
	}
	for (int i=0; i<w; i++)
		cout << ans[i] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:42: error: expected ';' before 'swap'
   28 |                 scanf("%d, %d\n", &a, &b)
      |                                          ^
      |                                          ;
   29 |                 swap(ans[a-1], ans[b-1]);
      |                 ~~~~
Language: C++

#include <cstdio>
 #include <algorithm>
 
 int main(){
 	int array[50];
 	int w,n,a,b;
 
 	for(int i=0 ; i<50 ; i++){
 		array[i] = i;
 	}
 	
 	scanf("%d", &w);
 	scanf("%d", &n);
 	for(int i=0 ; i<n ; i++){
 		scanf("%d,%d", &a, &b);
 		swap( array[a] , array[b] );
 	}
 	for(int i=1 ; i<=w ; i++){
 		printf("%d\n", array[i]);
 	}
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'swap' was not declared in this scope
   16 |                 swap( array[a] , array[b] );
      |                 ^~~~
a.cc:16:17: note: suggested alternatives:
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_pair.h:1106:5: note:   'std::swap'
 1106 |     swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete;
      |     ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:61:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
Language: C++

#include <stdio.h>

void swap(int *a, int *b){
int c=*a;
*a=*b;
*b=c;
return;
}

int main(void)
{
int w,n;
scanf("%d",&w);
int list[w];
scanf("%d",&n);
for(int i=0;i<n;i++){
int a,b;
scanf("%d,%d",&a,&b);
swap(list[a],list[b]);
}
for(int i=0;i<w;i++){
printf("%d\n",list[i]);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   19 | swap(list[a],list[b]);
      |      ~~~~~~^
      |            |
      |            int
a.cc:3:16: note:   initializing argument 1 of 'void swap(int*, int*)'
    3 | void swap(int *a, int *b){
      |           ~~~~~^
a.cc:19:20: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   19 | swap(list[a],list[b]);
      |              ~~~~~~^
      |                    |
      |                    int
a.cc:3:24: note:   initializing argument 2 of 'void swap(int*, int*)'
    3 | void swap(int *a, int *b){
      |                   ~~~~~^
Language: C++

#include<stdio.h>
int main(void){
	int w,n,x,y,temp;
	int a[31];
	char str[7];
	for(int i = 0; i < 31; i++){
		a[i] = i;
	}
	scanf("%d %d",&w,&n);
	for(int i = 0; i < n; i++){
		getline(str);
		if(str[3] == ',')
			str[3] = ' ';
		else
			str[2] = ' ';
		sscanf(str,"%d %d",&x,&y);
		temp = a[x];
		a[x] = a[y];
		a[y] = temp;
	}

	for(int i = 0; i < w; i++){
		printf("%d\n",&a[i + 1];
	}
	return 0;
}

	

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: cannot convert 'char*' to 'char**'
   11 |                 getline(str);
      |                         ^~~
      |                         |
      |                         char*
In file included from a.cc:1:
/usr/include/stdio.h:697:45: note:   initializing argument 1 of '__ssize_t getline(char**, size_t*, FILE*)'
  697 | extern __ssize_t getline (char **__restrict __lineptr,
      |                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~
a.cc:23:40: error: expected ')' before ';' token
   23 |                 printf("%d\n",&a[i + 1];
      |                       ~                ^
      |                                        )
Language: C++

#include<stdio.h>
int main(void){
	int w,n,x,y,temp;
	int a[31];
	char str[7];
	for(int i = 0; i < 31; i++){
		a[i] = i;
	}
	scanf("%d %d",&w,&n);
	for(int i = 0; i < n; i++){
		getline(str,6);
		if(str[3] == ',')
			str[3] = ' ';
		else
			str[2] = ' ';
		sscanf(str,"%d %d",&x,&y);
		temp = a[x];
		a[x] = a[y];
		a[y] = temp;
	}

	for(int i = 0; i < w; i++){
		printf("%d\n",&a[i + 1]);
	}
	return 0;
}

	

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: cannot convert 'char*' to 'char**'
   11 |                 getline(str,6);
      |                         ^~~
      |                         |
      |                         char*
In file included from a.cc:1:
/usr/include/stdio.h:697:45: note:   initializing argument 1 of '__ssize_t getline(char**, size_t*, FILE*)'
  697 | extern __ssize_t getline (char **__restrict __lineptr,
      |                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~
Language: C++

#include<stdio.h>
int main(void){
	int w,n,x,y,temp;
	int a[31];
	char str[7];
	for(int i = 0; i < 31; i++){
		a[i] = i;
	}
	scanf("%d %d",&w,&n);
	for(int i = 0; i < n; i++){
		gets(str,6);
		if(str[3] == ',')
			str[3] = ' ';
		else
			str[2] = ' ';
		sscanf(str,"%d %d",&x,&y);
		temp = a[x];
		a[x] = a[y];
		a[y] = temp;
	}

	for(int i = 0; i < w; i++){
		printf("%d\n",&a[i + 1]);
	}
	return 0;
}

	

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |                 gets(str,6);
      |                 ^~~~
      |                 getw
Language: C++

#include<iostream>
int main(void){
	int w,n,x,y,temp;
	int a[31];
	char c;
	string str;
	istringstream is(str);
	for(int i = 0; i < 31; i++){
		a[i] = i;
	}
	scanf("%d %d",&w,&n);
	for(int i = 0; i < n; i++){
		getline(str,7);
		is >> x >> c >> y;
		temp = a[x];
		a[x] = a[y];
		a[y] = temp;
	}

	for(int i = 0; i < w; i++){
		cout << a[i + 1] << endl;
	}
	return 0;
}

	

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string str;
      |         ^~~~~~
a.cc:6:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:9: error: 'istringstream' was not declared in this scope; did you mean 'std::istringstream'?
    7 |         istringstream is(str);
      |         ^~~~~~~~~~~~~
      |         std::istringstream
/usr/include/c++/14/iosfwd:152:41: note: 'std::istringstream' declared here
  152 |   typedef basic_istringstream<char>     istringstream;
      |                                         ^~~~~~~~~~~~~
a.cc:13:25: error: 'str' was not declared in this scope; did you mean 'std'?
   13 |                 getline(str,7);
      |                         ^~~
      |                         std
a.cc:14:17: error: 'is' was not declared in this scope; did you mean 'i'?
   14 |                 is >> x >> c >> y;
      |                 ^~
      |                 i
a.cc:21:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |                 cout << a[i + 1] << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |                 cout << a[i + 1] << endl;
      |                                     ^~~~
      |                                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <cstdio>
#include <iostream>
#include <algorhythm>
using namespace std;

int main()
{
  int w,n;
  int c[]={0};
  int a,b;
  //  int temp;

  scanf("%d",&w);
  scanf("%d",&n);

  for(int i=0; i<=n; i++){
    c[i]=i;
  }

  for(int i=0; i<n; i++){
    scanf("%d,%d", &a,&b);
    swap(c[a], c[b]);
  }

  for(int i=1; i<=w; i++){
    printf("%d\n",c[i]);
  }
}

Compiler output:
a.cc:3:10: fatal error: algorhythm: No such file or directory
    3 | #include <algorhythm>
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>
#include <iostream>
#include <algorhythm.h>
using namespace std;

int main()
{
  int w,n;
  int c[]={0};
  int a,b;
  //  int temp;

  scanf("%d",&w);
  scanf("%d",&n);

  for(int i=0; i<=n; i++){
    c[i]=i;
  }

  for(int i=0; i<n; i++){
    scanf("%d,%d", &a,&b);
    swap(c[a], c[b]);
  }

  for(int i=1; i<=w; i++){
    printf("%d\n",c[i]);
  }
}

Compiler output:
a.cc:3:10: fatal error: algorhythm.h: No such file or directory
    3 | #include <algorhythm.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <cmath>
#include <vector>

using namespace std;

double dist(double x1, double y1, double x2, double y2){
	return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
}

int main(){
	int w, n;

	char bar[10];
	vector<int> a(31);
	const char delim = ',';
	int left, right;

	for(int i = 1; i <= 30; i++){
		a[i] = i;
	}

	cin >> w >> n;

	while(n--){
		cin >> bar;
		left = atoi(strtok(bar, &delim));
		right = atoi(strtok(NULL, &delim));
		swap(a[left], a[right]);
	}

	for(int i = 1; i <= w; i++){
		cout << a[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:29: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   27 |                 left = atoi(strtok(bar, &delim));
      |                             ^~~~~~
      |                             strtoq
Language: C++

#include <iostream>
#include <list>
#include <vector>
#include <map>
#include <string>
#include <algorithm>

using namespace std;

int main(){
	int widthCount = 0, heightCount = 0;
	string tmp;

	cin >> widthCount >> heightCount;

	vector<int> width(widthCount);
	for(int i = 0; i < widthCount; i++){
		width[i] = i + 1;
	}
	
	pair<int,int> height;
	/*height.first = vector<int>(heightCount,0);
	height.second = vector<int>(heightCount,0);*/

	char *a = new char[4];
	char *tp;

	for(int i = 0; i < heightCount; i++){
		cin >> tmp;
		
		strcpy(a,tmp.c_str());
		
		tp = strtok(a,",");
		height.first = atoi(tp);
		tp = strtok(NULL,",");
		height.second = atoi(tp);

		swap(width[height.first - 1],width[height.second - 1]);

	}

	for(int i = 0; i < widthCount; i++){
		cout << width[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: 'strcpy' was not declared in this scope
   31 |                 strcpy(a,tmp.c_str());
      |                 ^~~~~~
a.cc:7:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <algorithm>
  +++ |+#include <cstring>
    7 | 
a.cc:33:22: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   33 |                 tp = strtok(a,",");
      |                      ^~~~~~
      |                      strtoq
Language: C++

#include <iostream>
#include <list>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <cstdlib>

using namespace std;

int main(){
	int widthCount = 0, heightCount = 0;
	string tmp;

	cin >> widthCount >> heightCount;

	vector<int> width(widthCount);
	for(int i = 0; i < widthCount; i++){
		width[i] = i + 1;
	}
	
	pair<int,int> height;
	/*height.first = vector<int>(heightCount,0);
	height.second = vector<int>(heightCount,0);*/

	char *a = new char[4];
	char *tp;

	for(int i = 0; i < heightCount; i++){
		cin >> tmp;
		
		strcpy(a,tmp.c_str());
		
		tp = strtok(a,",");
		height.first = atoi(tp);
		tp = strtok(NULL,",");
		height.second = atoi(tp);

		swap(width[height.first - 1],width[height.second - 1]);

	}

	for(int i = 0; i < widthCount; i++){
		cout << width[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'strcpy' was not declared in this scope
   32 |                 strcpy(a,tmp.c_str());
      |                 ^~~~~~
a.cc:8:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <cstdlib>
  +++ |+#include <cstring>
    8 | 
a.cc:34:22: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   34 |                 tp = strtok(a,",");
      |                      ^~~~~~
      |                      strtoq
Language: C++

#include <iostream>
#include <cstdio>
#include <stdio.h>
using namespace std;
int main(){
	int w,n;
	int a,b,c;
	cin>>w;
	cin>>n;
	int num[30] = {0};
	for(int i=-0;i<w;i++){
		num[i] = i+1;
	}
	for(int j=0;j<n;j++){
		scanf_s("%d,%d",&a,&b);
		c = num[a-1];
		num[a-1] = num[b-1];
		num[b-1] = c;
	}
	for(int k=0;k<w;k++){
		printf("%d\n",num[k]);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |                 scanf_s("%d,%d",&a,&b);
      |                 ^~~~~~~
      |                 scanf
Language: 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_times;i++){
		cin >> n;
		temp					= num[(int)n[0]-(int)'0'];
		num[(int)n[0]-(int)'0'] = num[(int)n[2]-(int)'0'];
		num[(int)n[2]-(int)'0'] = temp;

		//データの初期化
		for(int i=0;i<size_n;i++){
			n[i] = '\0';
		}
	}

	for(int i=1;i<=num_length;i++){
		cout << num[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc:2:9: fatal error: Header.h: No such file or directory
    2 | #include"Header.h"
      |         ^~~~~~~~~~
compilation terminated.
Language: 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]){
				now[i] = b[j];
				now[b[j]] = a[j];
				break;
			}
		}
	}

	for (int i = 0; i < n; i++){
		printf("%d\n", now[i]);
	}

	return 0;
}

Compiler output:
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
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: 'c' was not declared in this scope
   15 |                 d[b]=c[a];
      |                      ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'c' was not declared in this scope
   16 |                 c[a]=sub;
      |                 ^
Language: 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 (int i=0; i<w; ++i) {
        cout << v[i] << endl;
    }

    return 0;
}

Compiler output:
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);
      |     ^~~~
Language: 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 = new int[w];
		for(int i=0;i<w;i++){
			data[i]=i+1;
		}
		int first =0;
		int second =0;
		scan.useDelimiter(",");
		for(int i=0;i<n;i++){
			first = scan.nextInt();
			second = scan.nextInt();
			change(data,first,second);
		}
		for(int i=0;i<=n;i++)
			System.out.println(data[i]);
	}

}

Compiler output:
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{
      | ^~~~~~
Language: 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.nextDouble();
			double yp = sc.nextDouble();

			// 三角形ABCの面積
			double s = TriangleArea(x3 - x1, y3 - y1, x2 - x1, y2 - x1);
			double s1 = TriangleArea(xp - x1, yp - y1, x2 - x1, y2 - x1);
			double s2 = TriangleArea(xp - x1, yp - y1, x3 - x1, y3 - x1);
			double s3 = TriangleArea(xp - x2, yp - y2, x3 - x2, y3 - y2);

			// System.out.println((xp - x2) + " " + (yp - y2) + " " + (x3 - x2)
			// + " " + (y3 - x2));

			if (s == s1 + s2 + s3) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}
		sc.close();

	}

	double TriangleArea(double x1, double y1, double x2, double y2) {

		double s = ((x1 * y2) - (x2 * y1)) / 2;
		if (s <= 0) {
			s *= -1;
		}

		return s;
	}

	public static void main(String[] args) {
		new Main().run();
	}

}

Compiler output:
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
Language: 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.nextInt();
		  }
		 xp=sc.nextInt();yp=sc.nextInt();
		 Arrays.sort(xm);
		 Arrays.sort(ym);
		 if(xm[0]<xp){
			 if(xm[3]>xp){
				 if(ym[0]<yp){
					 if(ym[3]<yp){
						 System.out.println("Yes");
					 }else{mm();}
				 }else{mm();}
			 }else{mm();}
		 }else{mm();}
		 
		 
		 
		}
		
	
	}
	private static void  mm(){
		System.out.println("No");
		
	}

}

Compiler output:
Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: 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]=sc.nextDouble();
			 ym[i]=sc.nextDouble();
		  }
		 xp=sc.nextDouble();yp=sc.nextDouble();
		 Arrays.sort(xm);
		 Arrays.sort(ym);
		 for (int i = 0; i < 3; i++) {
			 if(xm[i]==xp&&ym[i]==yp)
				 break;
			 }
			 
		 
		 if(xm[0]<xp&&xm[2]>xp&&ym[0]<yp&&ym[2]>yp){
			 System.out.println("Yes");
					 }else{mm();}
		 
		 
		}
	}
	private static void  mm(){
		System.out.println("No");
		
	}

}

Compiler output:
Main.java:3: error: class main2 is public, should be declared in a file named main2.java
public class main2 {
       ^
1 error
Language: 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.nextDouble();
			 ym[i]=sc.nextDouble();
		  }
		 xp=sc.nextDouble();yp=sc.nextDouble();
		 Arrays.sort(xm);
		 Arrays.sort(ym);
		 for (int i = 0; i < 3; i++) {
			 if(xm[i]==xp&&ym[i]==yp)
				 break;
			 }
			 
		 
		 if(xm[0]<xp&&xm[2]>xp&&ym[0]<yp&&ym[2]>yp){
			 System.out.println("Yes");
					 }else{mm();}
		 
		 
		}
	}
	private static void  mm(){
		System.out.println("No");
		
	}

}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: 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]=sc.nextDouble();
			 ym[i]=sc.nextDouble();
		  }
		 xp=sc.nextDouble();yp=sc.nextDouble();
		 Arrays.sort(xm);
		 Arrays.sort(ym);
		 for (int i = 0; i < 3; i++) {
			 if(xm[i]==xp&&ym[i]==yp)
				 break;
			 }
			 
		 
		 if(xm[0]<xp&&xm[2]>xp&&ym[0]<yp&&ym[2]>yp){
			 System.out.println("Yes");
					 }else{mm();}
		 
		 
		}
	}
	private static void  mm(){
		System.out.println("No");
		
	}

}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: 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 Scanner(System.in);
        while (sc.hasNext()){
            final double x1 = sc.nextDouble();
            final double y1 = sc.nextDouble();
            final double x2 = sc.nextDouble();
            final double y2 = sc.nextDouble();
            final double x3 = sc.nextDouble();
            final double y3 = sc.nextDouble();
            final double xp = sc.nextDouble();
            final double yp = sc.nextDouble();
            
            double c1 = cross(x1, x2, y1, y2, xp, yp);
            double c2 = cross(x2, x3, y2, y3, xp, yp);
            double c3 = cross(x3, x1, y3, y1, xp, yp);
            /*
            double c1 = (x2-x1) * (yp-y2) - (y2-y1) * (xp-x2);
            double c2 = (x3-x2) * (yp-y3) - (y3-y2) * (xp-x3);
            double c3 = (x1-x3) * (yp-y1) - (y1-y3) * (xp-x1);
            */
            if ((c1 > 0&& c2 > 0 && c3 > 0)||(c1 < 0 && c2 < 0 && c3 < 0)){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
}

Compiler output:
Main.java:8: error: illegal start of expression
    public static void main(String[] args) throws IOException {
    ^
1 error
Language: 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();
			double y3 = sc.nextDouble();
			double xp = sc.nextDouble();
			double yp = sc.nextDouble();
			
			Point p1 = new Point(x1, y1);
			Point p2 = new Point(x2, y2);
			Point p3 = new Point(x3, y3);
			Point pp = new Point(xp, yp);
					
			Triangle t = new Triangle(p1, p2, p3);
			
			if(t.isInThisTriangle(pp)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	}
	
}

class Line{
	
	double p;
	double q;
	double r;
	
	/**
	 * ??´???px+qy=r??????????????????
	 * 
	 * @param p
	 * @param q
	 * @param r
	 */
	Line(double p, double q, double r){
		this.p = p;
		this.q = q;
		this.r = r;
	}
	
	public Line(Point p1, Point p2){
	
		if(p1.getX() != p2.getX()) {
			this.p = -(p1.getY()-p2.getY())/(p1.getX()-p2.getX());
			this.q = 1;
			this.r = p1.getX()* this.p +p1.getY();
		}else {
			if(p1.getY() != p2.getY()) {
				this.p = 1;
				this.q = 0;
				this.r = 0;
			}else {
				this.p = 1;
				this.q = 1;
				this.r = 1;
			}
		}
	}
	
	/**
	 * ????????´???????????????2????????????????????´????????????????????????????????????
	 * 
	 * @param x
	 * @param y
	 * @return 2???x, y???????????´???????????°true
	 */
	boolean isTheSameSide(Point x, Point y){
		double result = (this.calcPX_QY(x.getX(), x.getY()) - this.r)
				* (this.calcPX_QY(y.getX(), y.getY()) - this.r);
		return (result > 0) ? true: false;
	}
	
	/**
	 * ???????????????x, y????????????px+qy????¨?????????????
	 * 
	 * @param x
	 * @param y
	 * @return
	 */
	double calcPX_QY(double x, double y){
		return x * p + y * q;
	}
}

class Triangle{
	
	Point p1;
	Point p2;
	Point p3;
	
	Triangle(Point p1, Point p2, Point p3){
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
	}
	
	Point getCenter(){
		return new Point((p1.getX() + p2.getX() + p3.getX()) / 3, (p1.getY()
				+ p2.getY() + p3.getY()) / 3);
	}
	
	boolean isInThisTriangle(Point p) {
		Line l12 = new Line(p1, p2);
		Line l23 = new Line(p2, p3);
		Line l31 = new Line(p3, p1);
		Point center = this.getCenter();
		
		return l12.isTheSameSide(p, center) && l23.isTheSameSide(p, center) && l31.isTheSameSide(p, center);
	}
}

class Point{
	
	private double x;
	private double y;
	
	public double getX(){
		return this.x;
	}
	
	public double getY(){
		return this.y;
	}
	
	public Point(double d, double e){
		this.x = d;
		this.y = e;
	}

Compiler output:
Main.java:138: error: reached end of file while parsing
	}
	 ^
1 error
Language: 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));
			String str = br.readLine();

			while (str != null) {
				String[] dataSet = str.split(" ", 0);
				BigDecimal x1 = new BigDecimal(dataSet[0]).setScale(1);
				BigDecimal y1 = new BigDecimal(dataSet[1]).setScale(1);
				BigDecimal x2 = new BigDecimal(dataSet[2]).setScale(1);
				BigDecimal y2 = new BigDecimal(dataSet[3]).setScale(1);
				BigDecimal x3 = new BigDecimal(dataSet[4]).setScale(1);
				BigDecimal y3 = new BigDecimal(dataSet[5]).setScale(1);
				BigDecimal x = new BigDecimal(dataSet[6]).setScale(1);
				BigDecimal y = new BigDecimal(dataSet[7]).setScale(1);

				BigDecimal xMax = x1.max(x2.max(x3));
				BigDecimal xMin = x1.min(x2.max(x3));

				BigDecimal yMax = y1.max(y2.max(y3));
				BigDecimal yMin = y1.min(y2.max(y3));

				if (x.compareTo(xMax) < 0 && x.compareTo(xMin) > 0 && y.compareTo(yMax) < 0 && y.compareTo(yMin) > 0) {
					System.out.print("YES" + "\n");
				} else {
					System.out.print("NO" + "\n");
				}
				str = br.readLine();
			}

		} catch (IOException e) {
			e.printStackTrace();
		}
	}

Compiler output:
Main.java:44: error: reached end of file while parsing
	}
	 ^
1 error
Language: 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 ((str = br.readLine()) != null) {

			//Get point
			String[] num = str.split(" ", 0);
			point O = new point(num[0], num[1]);
			point A = new point(num[2], num[3]);
			point B = new point(num[4], num[5]);
			point P = new point(num[6], num[7]);

			//Get vector
			vector OA = new vector(O, A);
			vector OB = new vector(O, B);
			vector OP = new vector(O, P);

			//Calculation of coefficient
			BigDecimal XaYb = new BigDecimal(OA.vx.multiply(OB.vy).toPlainString());
			BigDecimal XbYa = new BigDecimal(OA.vy.multiply(OB.vx).toPlainString());
			BigDecimal XaPy = new BigDecimal(OA.vx.multiply(OP.vy).toPlainString());
			BigDecimal XbPy = new BigDecimal(OB.vx.multiply(OP.vy).toPlainString());
			BigDecimal YaPx = new BigDecimal(OA.vy.multiply(OP.vx).toPlainString());
			BigDecimal YbPx = new BigDecimal(OB.vy.multiply(OP.vx).toPlainString());

			BigDecimal temp_s = new BigDecimal(YbPx.subtract(XbPy).toPlainString());
			BigDecimal temp_t = new BigDecimal(XaPy.subtract(YaPx).toPlainString());
			BigDecimal XaYb_YaXb = new BigDecimal(XaYb.subtract(XbYa).toPlainString());

			BigDecimal co_S = new BigDecimal(temp_s.toPlainString());
			co_S = co_S.divide(XaYb_YaXb, 3, BigDecimal.ROUND_HALF_UP);
			BigDecimal co_T = new BigDecimal(temp_t.toPlainString());
			co_T = co_T.divide(XaYb_YaXb, 3, BigDecimal.ROUND_HALF_UP);

			BigDecimal total = new BigDecimal(co_S.add(co_T).toPlainString());

			if ((co_S.compareTo(BigDecimal.ZERO) >= 0) && (co_T.compareTo(BigDecimal.ZERO) >= 0)) {
				if ((total.compareTo(BigDecimal.ZERO) >= 0) && (total.compareTo(BigDecimal.ONE) <= 0)) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				System.out.println("NO");
			}
		}

	}

}
//Definition of point
class point {
	BigDecimal x;
	BigDecimal y;

	public point (String a, String b) {
		this.x = new BigDecimal(a);
		this.y = new BigDecimal(b);
	}

	public point (BigDecimal a, BigDecimal b) {
		this.x = new BigDecimal(a.toPlainString());
		this.y = new BigDecimal(b.toPlainString());
	}
}

//Definition of vector
class vector {
	BigDecimal vx;
	BigDecimal vy;

	public vector (point a, point b) {
		this.vx = new BigDecimal(b.x.toPlainString());
		vx = vx.subtract(a.x);
		this.vy = new BigDecimal(b.y.toPlainString());
		vy = vy.subtract(a.y);
	}
	public vector (BigDecimal p, BigDecimal q) {
		this.vx = new BigDecimal(p.toPlainString());
		this.vy = new BigDecimal(q.toPlainString());
	}
}

Compiler output:
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
Language: 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();
	    }

	    double xp = scan.nextDouble();
	    double yp = scan.nextDouble();

	    double a, b, c, s;
	    for (int i=0; i<6; i+=2) {
		if (i == 4) {
		    a = sqrt(pow(p[0]-p[4], 2) + pow(p[1]-p[5], 2));
		    b = sqrt(pow(xp-p[4], 2) + pow(yp-p[5], 2));
		    c = sqrt(pow(xp-p[0], 2) + pow(yp-p[1], 2));
		}
		else {
		    a = sqrt(pow(p[i+2]-p[i], 2) + pow(p[i+3]-p[i+1], 2));
		    b = sqrt(pow(xp-p[i], 2) + pow(yp-p[i+1], 2));
		    c = sqrt(pow(xp-p[i+2], 2) + pow(yp-p[i+3], 2));
		}

		s = (a+b+c) / 2.0;
		S[i/2] = (sqrt(s*(s-a)*(s-b)*(s-c)));
	    }

	    a = sqrt(pow(p[2]-p[0], 2) + pow(p[3]-p[1], 2));
	    b = sqrt(pow(p[4]-p[2], 2) + pow(p[5]-p[3], 2));
	    c = sqrt(pow(p[0]-p[4], 2) + pow(p[1]-p[5], 2));
	    s = (a+b+c) / 2.0;
	    S[3] = (sqrt(s*(s-a)*(s-b)*(s-c)));

	    double S = round(S[0] + S[1] + S[2]);
	    S[3] = round(S[3]);

	    if (S == S[3]) {
		System.out.println("YES");
	    }
	    else {
		System.out.println("NO");
	    }
	}
    }
}

Compiler output:
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 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:42: error: array required, but double found
	    S[3] = round(S[3]);
	     ^
Main.java:42: error: array required, but double found
	    S[3] = round(S[3]);
	                  ^
Main.java:44: error: array required, but double found
	    if (S == S[3]) {
	              ^
7 errors
Language: 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){
String[] datas = str.split(" ",8);
double x1 = Double.parseDouble(datas[0]);
double y1 = Double.parseDouble(datas[1]);
double x2 = Double.parseDouble(datas[2]);
double y2 = Double.parseDouble(datas[3]);
double x3 = Double.parseDouble(datas[4]);
double y3 = Double.parseDouble(datas[5]);
double xp = Double.parseDouble(datas[6]);
double yp = Double.parseDouble(datas[7]);
double x = xp-x1;
double y = yp-y1;
double p = x2-x1;
double q = y2-y1;
double r = x3-x1;
double u = y3-y1;
double[] coefficient = Simultaneous(p,r,x,q,u,y);
double s = coefficient[0];
double t = coefficient[1];
if(s<0||t<0){
System.out.println("NO");
}else if(s+t>0 && s+t<1){
System.out.println("YES");
}else{
System.out.println("NO");
}
str = br.readLine();
isNull = str.equals("");

}
}
private static double[] Simultaneous(double a,double b,double c,double d,double e,double f){
double x = (double) (e*c-b*f)/(a*e-b*d);
double y = (double) (a*f-c*d)/(a*e-b*d);
double[] answer = {x,y};
return answer;
}
}

Compiler output:
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.InputStreamRender;
              ^
  symbol:   class InputStreamRender
  location: package java.io
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 symbol
BufferedRender br = new BufferRender(new InputStreamReader(System.in));
                        ^
  symbol:   class BufferRender
  location: class main
Main.java:7: error: cannot find symbol
BufferedRender br = new BufferRender(new InputStreamReader(System.in));
                                         ^
  symbol:   class InputStreamReader
  location: class main
6 errors
Language: 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){
String[] datas = str.split(" ",8);
double x1 = Double.parseDouble(datas[0]);
double y1 = Double.parseDouble(datas[1]);
double x2 = Double.parseDouble(datas[2]);
double y2 = Double.parseDouble(datas[3]);
double x3 = Double.parseDouble(datas[4]);
double y3 = Double.parseDouble(datas[5]);
double xp = Double.parseDouble(datas[6]);
double yp = Double.parseDouble(datas[7]);
double x = xp-x1;
double y = yp-y1;
double p = x2-x1;
double q = y2-y1;
double r = x3-x1;
double u = y3-y1;
double[] coefficient = Simultaneous(p,r,x,q,u,y);
double s = coefficient[0];
double t = coefficient[1];
if(s<0||t<0){
System.out.println("NO");
}else if(s+t>0 && s+t<1){
System.out.println("YES");
}else{
System.out.println("NO");
}
str = br.readLine();
isNull = str.equals("");

}
}
private static double[] Simultaneous(double a,double b,double c,double d,double e,double f){
double x = (double) (e*c-b*f)/(a*e-b*d);
double y = (double) (a*f-c*d)/(a*e-b*d);
double[] answer = {x,y};
return answer;
}
}

Compiler output:
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 symbol
BufferedRender br = new BufferRender(new InputStreamReader(System.in));
                        ^
  symbol:   class BufferRender
  location: class main
3 errors