submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s216417164 | p00668 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <cmath>
#include <queue>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define MP make_pair
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
int s[1<<20];
int size;
// k人目の状態をseg-treeで管理
// ノード... | a.cc: In function 'void init(int)':
a.cc:23:9: error: reference to 'size' is ambiguous
23 | size = 1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s380901290 | p00669 | C++ | import std.stdio;
import std.c.stdio;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.regex;
import std.typecons;
void main() {
int n, k;
int[] x;
... | a.cc:1:1: error: 'import' does not name a type
1 | import std.stdio;
| ^~~~~~
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 std.c.stdio;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s808352996 | p00669 | C++ | //O(N^2 * NK)やる。
#include<iostream>
using namespace std;
int n, p;
int c[114];
int getscore() {
int ret = 0;
int i, j;
for( i = 0; i < n; i++ ) {
int score = 1;
for( j = 0; j < p; j++ ) {
if ( i + j >= n )
break;
score *= c[i+j];
}
if ( j == p )
ret = max(score, ret);
}
return ret;
}
void s... | a.cc:50:1: error: expected declaration before '}' token
50 | }
| ^
|
s527658895 | p00669 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n,k;
while(1) {
cin >> n >> k;
if(n == 0 && k == 0) break;
int a[101] ={};
for(int i=0;i<n;i++) cin >> a[i];
int ck = -1;
int site = 0;
for(int i=0;i<=n-k;i++) {
int t = 1;
for(int j=0;j<k;j+... | a.cc: In function 'int main()':
a.cc:40:5: error: 'else' without a previous 'if'
40 | else cout << ck2-ck <<endl;
| ^~~~
|
s497280097 | p00669 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int n, m, c[100];
inline int solve() {
int ret = 0, u = 1;
for(int i = 0; i < m - 1; i++) u *= c[i];
for(int i = m - 1; i < n; i++) u *= c[i], ret = max(ret, u), c /= c[i - m + 1];
return ret;
}
int main() {
while(scanf("%d%d", &n, &m), n) {
for(int i ... | a.cc: In function 'int solve()':
a.cc:8:72: error: invalid operands of types 'int [100]' and 'int' to binary 'operator/'
8 | for(int i = m - 1; i < n; i++) u *= c[i], ret = max(ret, u), c /= c[i - m + 1];
| ~~^~~~~~~~~~~~~~~
a.cc:8:7... |
s617882962 | p00669 | C++ | #include <iostream>
using namespace std;
template <class T> void swap(T& x,T& y){
T tmp=x;y=x;x=tmp;
}
int main(){
while(true){
int n,k;
cin>>n>>k;
if(n==0)return 0;
int c[100];
for(int i=0;i<n;i++)
cin>>c[i];
int nowc=calc(c,k,n);
int cmax;
for(int i=0;i<n;i++){
for(int ... | a.cc: In function 'int main()':
a.cc:14:14: error: 'calc' was not declared in this scope; did you mean 'calloc'?
14 | int nowc=calc(c,k,n);
| ^~~~
| calloc
a.cc:19:13: error: call of overloaded 'swap(int&, int&)' is ambiguous
19 | swap(c[i],c[j]);
| ... |
s571738851 | p00669 | C++ | #include <iostream>
using namespace std;
template <class T> void swap(T& x,T& y){
T tmp=x;y=x;x=tmp;
}
int calc(int*,int,int);
int main(){
while(true){
int n,k;
cin>>n>>k;
if(n==0)return 0;
int c[100];
for(int i=0;i<n;i++)
cin>>c[i];
int nowc=calc(c,k,n);
int cmax;
for(int i=0;... | a.cc: In function 'int main()':
a.cc:20:13: error: call of overloaded 'swap(int&, int&)' is ambiguous
20 | swap(c[i],c[j]);
| ~~~~^~~~~~~~~~~
a.cc:3:25: note: candidate: 'void swap(T&, T&) [with T = int]'
3 | template <class T> void swap(T& x,T& y){
| ^~~~
In f... |
s914504681 | p00669 | C++ |
#include <iostream>
using namespace std;
int calc(int*,int,int);
int main(){
while(true){
int n,k;
cin>>n>>k;
if(n==0)return 0;
int c[100];
for(int i=0;i<n;i++)
cin>>c[i];
int nowc=calc(c,k,n);
cerr<<nowc<<endl;
int cmax=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
... | a.cc: In function 'int calc(int*, int, int)':
a.cc:34:28: error: expected '}' at end of input
34 | for(int i=0;i<n-k+1;i++){
| ~^
a.cc:34:28: error: expected '}' at end of input
a.cc:32:29: note: to match this '{'
32 | int calc(int* c,int k,int n){
| ... |
s456406277 | p00669 | C++ | // This program was compiled from OCaml by js_of_ocaml 1.3
function caml_raise_with_arg (tag, arg) { throw [0, tag, arg]; }
function caml_raise_with_string (tag, msg) {
caml_raise_with_arg (tag, new MlWrappedString (msg));
}
function caml_invalid_argument (msg) {
caml_raise_with_string(caml_global_data[4], msg);
}
... | a.cc:2:1: error: 'function' does not name a type; did you mean 'union'?
2 | function caml_raise_with_arg (tag, arg) { throw [0, tag, arg]; }
| ^~~~~~~~
| union
a.cc:3:1: error: 'function' does not name a type; did you mean 'union'?
3 | function caml_raise_with_string (tag, msg) {
| ^~~~~~~~
... |
s226295993 | p00670 | Java | #include <stdio.h>
#define uint unsigned int
inline int in() {
int x = 0, c;
for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
return x;
}
int main(){
int n,S;
while(... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:2: error: illegal character: '#'
#define uint unsigned int
^
Main.java:5: error: class, interface, enum, or record expected
for (; (uint)((c = getcha... |
s038205607 | p00670 | Java | #include <stdio.h>
#define uint unsigned int
int in() {
int x = 0, c;
for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
return x;
}
int main(){
int n,S;
while(n=in(),... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:2: error: illegal character: '#'
#define uint unsigned int
^
Main.java:5: error: class, interface, enum, or record expected
for (; (uint)((c = getcha... |
s891073742 | p00670 | C++ | while True:
n,S = map(int, raw_input().split())
if n == 0 and S == 0:
break
r = []
for i in range(n):
r.append(input())
ans = 0
for i in range(n):
for j in range(i + 1, n):
if r[i] + r[j] > S:
ans += 1
print ans | a.cc:1:1: error: expected unqualified-id before 'while'
1 | while True:
| ^~~~~
|
s193727666 | p00670 | C++ | #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#includ... | a.cc: In function 'int main()':
a.cc:62:2: error: expected '}' at end of input
62 | }
| ^
a.cc:33:12: note: to match this '{'
33 | int main() {
| ^
|
s951422215 | p00670 | C++ | #define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
#include <complex>
#incl... | a.cc: In function 'int main()':
a.cc:69:61: error: expected ';' before 'else'
69 | ans+=r[i]*(r[i]-1)/2
| ^
| ;
70 | ... |
s597376405 | p00670 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int n, s;
int main() {
while(scanf("%d%d", &n, &s), n) {
int a[102] = {0};
for(int i = 0; i < n; i++) scanf("%d", &r), a[r]++;
int ret = 0;
for(int i = 1; i <= 100; i++) {
for(int j = max(i, s - i + 1); j <= 100; j++) {
ret += a[i] * a[j];
... | a.cc: In function 'int main()':
a.cc:8:57: error: 'r' was not declared in this scope
8 | for(int i = 0; i < n; i++) scanf("%d", &r), a[r]++;
| ^
|
s527226176 | p00670 | C++ | #include<bits/stdc++.h>
using namespace std;
signed main(){
int a,b;
int c[20000];
while(cin>>a>>b,a|b){
for(int d=0;d<a;d++)cin>>c[d];
sort(c,c+a);
int s=0;
for(int e=0;e<a-1;e++){
s+=c+a-lower_bound(c+e;1,c+a,b-c[e]);
}
printf("%d\n",s);
}
} | a.cc: In function 'int main()':
a.cc:12:31: error: expected ')' before ';' token
12 | s+=c+a-lower_bound(c+e;1,c+a,b-c[e]);
| ~ ^
| )
a.cc:12:44: error: expected ';' before ')' token
12 | s+=c+a-lower_bound(c+e;1,c+a,b-c[e]);
... |
s112572083 | p00670 | C++ | #include <cstdio>
#include <vector>
#include <iostream>
using namespace std;
int in(){ int a; scanf("%d",&a); return a; }
int main(){
int n,S;
while(n=in(),S=in(),(n||S)){
int w[101]={};
int ans = 0;
for(int i = 0 ; i < n ; i++) w[in()]++;
for(int i = 0 ; i <= 100 ; i++){
if(w[i]==0)continue;
for(int... | a.cc:24:2: error: stray '#' in program
24 | }#include <cstdio>
| ^
a.cc:24:3: error: 'include' does not name a type
24 | }#include <cstdio>
| ^~~~~~~
a.cc:28:5: error: redefinition of 'int in()'
28 | int in(){ int a; scanf("%d",&a); return a; }
| ^~
a.cc:5:5: note: 'int in()' previousl... |
s517536323 | p00670 | C++ | include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n, S, r[20001];
while(cin >> n >> S && (n|S)) {
for(int i = 0; i < n; ++i) cin >> r[i];
sort(r,r+n);
int res = 0;
for(int i = 0; i < n; ++i) {
int* begin = lower_bound(r,r+n,S-r[i]);
res += distance(begin,r+n)... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __... |
s691935253 | p00670 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
while(true){
int n,S;
cin >> n >> S;
vector<int> R(n);
for(int i=0;i<n;i++) cin >> R[i];
if(n==0)return 0;
sort(R.begin(),R.end());
vector<int> Rcount(101);
for(int i=1;i<101;i++){
Rcou... | a.cc: In function 'int main()':
a.cc:26:21: error: no match for call to '(std::vector<int>) (int&)'
26 | retval+=Rcount(i)*(Rsum(100)-Rsum(S-i-1));
| ~~~~~~^~~
a.cc:26:30: error: no match for call to '(std::vector<int>) (int)'
26 | retval+=Rcount(i)*(Rsum(100)-Rsum(S-i-1));
|... |
s255096096 | p00670 | C++ | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
for(;;)
{
int n=in.nextInt();
int S=in.nextInt();
if((n|S)==0)
return;
int a[]=new int[n];
int cnt=0;
ArrayList<Integer>AL=new ArrayList<Integer>();
for(int i=0;i<n;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: expected unqualified-id before 'public'
2 | public class Main
| ^~~~~~
|
s033830930 | p00671 | C++ | XF#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <utility>
#include <cctype>
#include <numeric>
using namesp... | a.cc:1:3: error: stray '#' in program
1 | XF#include <cstdio>
| ^
a.cc:1:1: error: 'XF' does not name a type
1 | XF#include <cstdio>
| ^~
In file included from /usr/include/c++/14/cmath:45,
from a.cc:4:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __g... |
s509767492 | p00671 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int c,d,w,x;
while(cin>>c>>d>>w>>x,c||d||w||x){
int e[20][35],f[20][35];
for(int i=0;i<c;i++)
for(int j=0;j<d;j++)
cin>>e[i][j];
for(int i=0;i<c;i++)
for(int j=0;j<d;j++)
cin>>f[i][j];
int dp[35][55][10];
memset(dp,-1,sizeof(d... | a.cc: In function 'int main()':
a.cc:15:17: error: 'memset' was not declared in this scope
15 | memset(dp,-1,sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++... |
s647512474 | p00671 | C++ | #include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
template<class T> inline void chmax(T& a, T b) { if(b > a) a = b; }
int main() {
cin.tie(false);
ios::sync_with_stdio(false);
for(int c, d, w, x; cin >> c >> d >> w >> x, c;) {
vector<vector<int> > e(c, vector<int>(d));
for(int i = ... | a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)'
9 | cin.tie(false);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
from /usr/include/c++/14/ostream:40,
from /usr/inclu... |
s897009094 | p00673 | C++ | #include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
#include<queue>
#include<functional>
#include<map>
using namespace std;
typedef pair<int,int> P;
struct edge{
int to,cap,cost,rev;
};
const int N=602;
const int INF=1<<29;
int V;
vector<vector<edge> > G;
int h[N];
int dist[N];
int prevv[N],... | a.cc: In function 'void add_edge(int, int, int, int)':
a.cc:33:24: error: 'fromK' was not declared in this scope; did you mean 'from'?
33 | if(from<0||G.size()<=fromK)for(;;);
| ^~~~~
| from
|
s090264742 | p00673 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
using namespace std;
#define V 10000
#define INF 100000000
typedef pair<int,int> P;
struct edge {int to,cap,cost,rev;};
int n,m[110],g,a,b;
int x[110][30],y[110][30],c[110][30];
vector<int> time[30];
int v;
vector... | a.cc:17:20: error: 'std::vector<int> time [30]' redeclared as different kind of entity
17 | vector<int> time[30];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-... |
s479097086 | p00673 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
using namespace std;
#define V 10000
#define INF 100000000
typedef pair<int,int> P;
struct edge {int to,cap,cost,rev;};
int n,m[110],g,a,b;
int x[110][30],y[110][30],c[110][30];
vector<int> time[30];
int v;
vector... | a.cc:17:20: error: 'std::vector<int> time [30]' redeclared as different kind of entity
17 | vector<int> time[30];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-... |
s723756346 | p00673 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
using namespace std;
#define V 6000
#define INF 100000000
typedef pair<int,int> P;
struct edge {
int to,cap,cost,rev;
edge(int a,int b,int c,int d){to = a;cap = b,cost = c;rev = d;}
};
int n,m[110],g,a,b;
int x... | a.cc:20:20: error: 'std::vector<int> time [30]' redeclared as different kind of entity
20 | vector<int> time[30];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-... |
s223055854 | p00673 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
using namespace std;
#define V 6000
#define INF 100000000
typedef pair<int,int> P;
struct edge {
int to,cap,cost,rev;
edge(int a,int b,int c,int d){to = a;cap = b,cost = c;rev = d;}
};
int n,m[110],g,a,b;
int x... | a.cc:20:20: error: 'std::vector<int> time [30]' redeclared as different kind of entity
20 | vector<int> time[30];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-... |
s559029653 | p00673 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
using namespace std;
#define V 6000
#define INF 100000000
typedef pair<int,int> P;
struct edge {
int to,cap,cost,rev;
edge(int a,int b,int c,int d){to = a;cap = b,cost = c;rev = d;}
};
int n,m[110],g,a,b;
int x... | a.cc:20:20: error: 'std::vector<int> time [30]' redeclared as different kind of entity
20 | vector<int> time[30];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-... |
s690455020 | p00674 | C++ | #include<iostream>
#include<complex>
#include<vector>
using namespace std;
typedef complex<long double> P;
typedef vector<P> Polygon;
double cross(P a,P b){
return (conj(a)*b).imag();
}
double area(const Polygon &p){
double a=0;
for(int i=0;i<p.size();i++){
a+=cross(p[(i+1)%p.size()],p[i]);
}
return f... | a.cc: In function 'int main()':
a.cc:34:32: error: no match for 'operator/' (operand types are 'std::complex<long double>' and 'double')
34 | c[i]=(p[0]+p[i+1]+p[i+2])/2.;
| ~~~~~~~~~~~~~~~~~~~~^~~
| | |
| | double
|... |
s149684600 | p00674 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i,n) for(ll i = 0; i < (n); ++i)
#define ALL(c) (c).begin(), (c).end()
template<typename F> ld bsearch(ld lower, ld upper, ld k, ll max_loop, F f) {
if (upper < lower) swap(upper, lower);
ld nu = upper - lower, nl = 0;
if (k < f(0)) s... | a.cc:9:22: error: 'ld' does not name a type; did you mean 'll'?
9 | template<typename F> ld bsearch(ld lower, ld upper, ld k, ll max_loop, F f) {
| ^~
| ll
a.cc: In constructor 'L::L(P, P)':
a.cc:27:21: error: no matching function for call to 'L::push_back()'
... |
s189244382 | p00674 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define REP(i,n) for(ll i = 0; i < (n); ++i)
#define ALL(c) (c).begin(), (c).end()
template<typename F> ld bsearch(ld lower, ld upper, ld k, ll max_loop, F f) {
if (upper < lower) swap(upper, lower);
ld nu = upper - lower, ... | a.cc: In constructor 'L::L(P, P)':
a.cc:28:21: error: no matching function for call to 'L::push_back()'
28 | #define PB push_back()
| ~~~~~~~~~^~
a.cc:49:23: note: in expansion of macro 'PB'
49 | L(P a, P b) { PB(a); PB(b); }
| ^~
In file included from /usr/inc... |
s766094742 | p00674 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define REP(i,n) for(ll i = 0; i < (n); ++i)
#define ALL(c) (c).begin(), (c).end()
template<typename F> ld bsearch(ld lower, ld upper, ld k, ll max_loop, F f) {
if (upper < lower) swap(upper, lower);
ld nu = upper - lower, ... | a.cc: In function 'int main()':
a.cc:109:32: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'long double')
109 | REP (i, n) cin >> g[i].X >> g[i].Y;
| ~~~ ^~
| |
| ... |
s017099145 | p00674 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define REP(i,n) for(ll i = 0; i < (n); ++i)
#define ALL(c) (c).begin(), (c).end()
template<typename F> ld bsearch(ld lower, ld upper, ld k, ll max_loop, F f) {
if (upper < lower) swap(upper, lower);
ld nu = upper - lower, ... | a.cc: In function 'int main()':
a.cc:123:25: error: 'va' was not declared in this scope
123 | REP (i, va.size() - 1) {
| ^~
a.cc:7:37: note: in definition of macro 'REP'
7 | #define REP(i,n) for(ll i = 0; i < (n); ++i)
| ^
a.c... |
s594043839 | p00674 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
typedef vector<int> vi; typedef vector<ll> vl; typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<vd> vvd;
#define REP(i,n) for(ll i = 0; i < (n); ++i)
#define ALL(c) (c).begin(), (c).end()
#define FOR(i,s,... | a.cc: In function 'G convex_cut(CR<std::vector<std::complex<long double> > >, CR<L>)':
a.cc:33:35: error: 'const class std::vector<std::complex<long double> >' has no member named 'SZ'
33 | #define NEXT(x, i) (x[(i + 1) % x.SZ])
| ^~
a.cc:88:31: note: in expansion of macro 'NE... |
s130339752 | p00674 | C++ | ツ!
4
-100 -100
100 -100
100 100
-100 100
4
-99 -100
100 -100
100 100
-99 100
4
-100 -99
100 -99
100 100
-100 100
14
-99 -70
-92 -79
10 -98
37 -100
62 -95
77 -69
88 -47
92 -10
96 28
100 91
42 92
-62 92
-88 91
-98 64
0 | a.cc:1:1: error: '\U000030c4\U0000ff01' does not name a type
1 | ツ!
| ^~~~
|
s805122428 | p00674 | C++ | main(n,i){for(;scanf("%d",&n),n;){for(;n--;)scanf("%*d%*d");puts("0.000000000000000 0.000000000000000");}exit(0);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n,i){for(;scanf("%d",&n),n;){for(;n--;)scanf("%*d%*d");puts("0.000000000000000 0.000000000000000");}exit(0);}
| ^
|
s683350196 | p00674 | C++ | main() | a.cc:1:7: error: expected constructor, destructor, or type conversion at end of input
1 | main()
| ^
|
s474319118 | p00674 | C++ | main(); | a.cc:1:7: error: expected constructor, destructor, or type conversion before ';' token
1 | main();
| ^
|
s451890420 | p00674 | C++ | #include <cstdio>
main(){
cout<<"hello world"<<endl;
} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:1: error: 'cout' was not declared in this scope
3 | cout<<"hello world"<<endl;
| ^~~~
a.cc:3:22: error: 'endl' was not declared in this scope
3 | cout<<... |
s207220565 | p00674 | C++ | main; | a.cc:1:1: error: 'main' does not name a type
1 | main;
| ^~~~
|
s300135272 | p00674 | C++ | main; | a.cc:1:1: error: 'main' does not name a type
1 | main;
| ^~~~
|
s914234712 | p00674 | C++ | 4
-100 -100
100 -100
100 100
-100 100
4
-99 -100
100 -100
100 100
-99 100
4
-100 -99
100 -99
100 100
-100 100
14
-99 -70
-92 -79
10 -98
37 -100
62 -95
77 -69
88 -47
92 -10
96 28
100 91
42 92
-62 92
-88 91
-98 64
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4
| ^
|
s840405201 | p00674 | C++ | #include <iostream>
#include <complex>
#include <vector>
#include <cstdio>
using namespace std;
#define FOREACH(it,c) for(__typeof(c.begin()) it = c.begin(); it != c.end(); ++it)
#define TIMES(i,n) for(int i = 0; i < (n); ++i)
typedef complex<double> P;
static const double PI = acos(-1.0);
static const double EPS = ... | a.cc: In function 'int main()':
a.cc:193:17: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
193 | cin >> point.real() >> point.imag();
| ~~~ ^~ ~~~~~~~~~~~~
| | |
| | ... |
s069818757 | p00674 | C++ | #include <iostream>
#include <complex>
#include <vector>
#include <cstdio>
using namespace std;
#define FOREACH(it,c) for(__typeof(c.begin()) it = c.begin(); it != c.end(); ++it)
#define TIMES(i,n) for(int i = 0; i < (n); ++i)
typedef complex<double> P;
static const double PI = acos(-1.0);
static const double EPS = ... | a.cc: In function 'int main()':
a.cc:193:17: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
193 | cin >> point.real() >> point.imag();
| ~~~ ^~ ~~~~~~~~~~~~
| | |
| | ... |
s111077991 | p00674 | C++ | #include <iostream>
#include <complex>
#include <vector>
#include <cstdio>
using namespace std;
#define FOREACH(it,c) for(__typeof(c.begin()) it = c.begin(); it != c.end(); ++it)
#define TIMES(i,n) for(int i = 0; i < (n); ++i)
typedef complex<double> P;
static const double PI = acos(-1.0);
static const double EPS = ... | a.cc: In function 'int main()':
a.cc:193:17: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
193 | cin >> point.real() >> point.imag();
| ~~~ ^~ ~~~~~~~~~~~~
| | |
| | ... |
s756136835 | p00674 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
#define EPSILON 1e-9
#define ALL(x) (x).begin(), (x).end()
class point_t;
class vector_t {
public:
double x;
double y;
double z;
public:
vector_t(double x = 0, double y = 0, double z = 0)... | a.cc: In member function 'void matrix_t::identitize()':
a.cc:152:5: error: 'memset' was not declared in this scope
152 | memset(matrix_, 0, sizeof(matrix_));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <vect... |
s104704025 | p00675 | C++ | #include<iostream>
#include<sstream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define fr(i,c) for(__typeof(c.begin()) i=c.begi... | a.cc: In function 'bool calc_potential()':
a.cc:73:14: error: 'h' was not declared in this scope
73 | fill(h,h+V+1,0);
| ^
a.cc:73:18: error: 'V' was not declared in this scope
73 | fill(h,h+V+1,0);
| ^
a.cc:74:28: error: 'v' was not declared in this scope... |
s288581449 | p00675 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const ... | a.cc:37:2: error: stray '#' in program
37 |   int src;
| ^
a.cc:38:2: error: stray '#' in program
38 |   int dest;
| ^
a.cc:39:2: error: stray '#' in program
39 |   Weight weight;
| ^
a.cc:40:2: error: stray '#' in program
40 |   Edge(int src, int dest, Weight weight... |
s688445027 | p00676 | C | $<.each{|s| a,b,c=s.split.map{|x|x.to_f};p Math.sqrt(4*b*b-a*a)*a/4+Math.sqrt(c*c+2*b*c)*b/2} | main.c:1:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | $<.each{|s| a,b,c=s.split.map{|x|x.to_f};p Math.sqrt(4*b*b-a*a)*a/4+Math.sqrt(c*c+2*b*c)*b/2}
| ^
|
s166786686 | p00676 | C++ | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
fixed(cout);
cout << setprecision(13);
while (!cin.eof()) {
long a,l,x;
cin >> a >> l >> x;
auto h_1 = sqrt(l * l - a * a / 4.0);
auto h_2 = sqrt((x + l) * (x + l) / 4.0 - l * l / 4.0);
cout << h_1 << endl;
cout << h_2 << endl;
co... | a.cc: In function 'int main()':
a.cc:10:28: error: 'sqrt' was not declared in this scope
10 | auto h_1 = sqrt(l * l - a * a / 4.0);
| ^~~~
|
s763029583 | p00676 | C++ | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
fixed(cout);
cout << setprecision(13);
while (!cin.eof()) {
long a,l,x;
cin >> a >> l >> x;
double h_1 = sqrt(l * l - a * a / 4.0);
double h_2 = sqrt((x + l) * (x + l) / 4.0 - l * l / 4.0);
cout ... | a.cc: In function 'int main()':
a.cc:10:22: error: 'sqrt' was not declared in this scope
10 | double h_1 = sqrt(l * l - a * a / 4.0);
| ^~~~
|
s397985442 | p00676 | C++ | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
fixed(cout);
cout << setprecision(13);
while (!cin.eof()) {
long a,l,x;
cin >> a >> l >> x;
auto h_1 = sqrt<double>(l * l - a * a / 4.0);
auto h_2 = sqrt<double>((x + l) * (x + l) / 4.0 - l * l / 4.0);
... | a.cc: In function 'int main()':
a.cc:10:20: error: 'sqrt' was not declared in this scope
10 | auto h_1 = sqrt<double>(l * l - a * a / 4.0);
| ^~~~
a.cc:10:25: error: expected primary-expression before 'double'
10 | auto h_1 = sqrt<double>(l * l - a * a / 4.0);
| ... |
s284584286 | p00676 | C++ |
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double a,l,x;
double s;
cout<<setprecision(10)<<setiosflags(ios::fixed);
while(cin>>a>>l>>x){
x+=l;
s = sqrt(l*l - a*a/4.0) * a / 2.0;
s += sqrt(x*x/4.0 - l*l/4.0) * l;
cout<<s<<endl;
}
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'setprecision' was not declared in this scope
10 | cout<<setprecision(10)<<setiosflags(ios::fixed);
| ^~~~~~~~~~~~
a.cc:4:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
3 | #i... |
s186375959 | p00676 | C++ | #include<cstdio>
#include<math>
main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;} | a.cc:2:9: fatal error: math: No such file or directory
2 | #include<math>
| ^~~~~~
compilation terminated.
|
s810517359 | p00676 | C++ | #include<cmath>
main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){for(float a,l,x;~scanf("%f%f%f",&a,&l,&x);printf("%.9f\n",sqrt(l*l-a*a/4)*a/2+sqrt(x*x/4-l*l/4)*l))x+=l;}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:25: error: 'scanf' was not declared in this scope
2 | mai... |
s615332708 | p00676 | C++ | #include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;
#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int,int> pii;
const int INF = 1<<29;
c... | a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
20 | while(cin>>a>>l>>x) {
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include <stack>
+++ |+#include <iostream>
5 | u... |
s879662807 | p00676 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
double a, l, x;
cout.precision(10);
while (cin >> a >> l >> x) {
double area = sqrt(l * l - a * a / 4.0) * a / 2.0 + sqrt((l + x) * (l + x) / 4.0 - l * l / 4.0) * l;
cout << fixed << area << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:31: error: 'sqrt' was not declared in this scope
10 | double area = sqrt(l * l - a * a / 4.0) * a / 2.0 + sqrt((l + x) * (l + x) / 4.0 - l * l / 4.0) * l;
| ^~~~
|
s865128719 | p00677 | Java | public class Main {
static int s;
static int d;
static int m;
static Map<Integer,Kanmi> Fmap = new HashMap<>();
public static void main(String[] args) {
while(true){
Scanner scan = new Scanner(System.in);
String s = scan.next();
if(s.equals("EOF")){
break;
}
Main.s = new Integer(s);
Main.d ... | Main.java:5: error: cannot find symbol
static Map<Integer,Kanmi> Fmap = new HashMap<>();
^
symbol: class Map
location: class Main
Main.java:33: error: cannot find symbol
static Map<Integer,Map<Integer,int[]>> dp = new HashMap<>();
^
symbol: class Map
location: class Main
Main.java:33: erro... |
s994576267 | p00677 | Java | import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
static int s;
static int d;
static int m;
static Map<Integer,Kanmi> Fmap = new HashMap<>();
public void solve(){
Scanner scan = new Scanner(System.in);
while(scan.hasNextLine()){
Main.s... | Main.java:70: error: reached end of file while parsing
}
^
1 error
|
s208768731 | p00677 | C++ | import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
static int s;
static int d;
static int m;
static Map<Integer,Kanmi> Fmap = new HashMap<>();
public static int main(String[] args) {
while(true){
Scanner scan = new Scanner(System.in);
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.ArrayList;
| ^~~~~~
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.util.HashMap;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodule... |
s016513731 | p00677 | C++ |
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
static int s;
static int d;
static int m;
static Map<Integer,Kanmi> Fmap = new HashMap<>();
public static void main(String[] args) {
while(true){
Scanner scan = new Scanner(System.in);
... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.ArrayList;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.util.HashMap;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodule... |
s693612062 | p00677 | C++ | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#in... | cc1plus: error: '::main' must return 'int'
|
s975963449 | p00677 | C++ | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#in... | a.cc: In function 'int main()':
a.cc:79:67: error: no matching function for call to 'min(const short int&, int)'
79 | dp[idx+1][j] = min(min(dp[idx][j],dp[idx+1][j]),dp[idx][j-w]+p);
| ~~~^~~~~~~~~~~~... |
s276924348 | p00678 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, e) for(int i = (int)s; i < (int) e; i++)
#define rep(i, n) REP(i, 0 ,n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long ll;
d... | a.cc: In lambda function:
a.cc:27:79: error: 'EPS' was not declared in this scope
27 | rep(i, n) rep(j, i) if(dist(x[i]-x[j], y[i]-y[j]) > (r[i]+r[j])*m+EPS) return false;
| ^~~
|
s261763709 | p00679 | C++ | #include <bits/stdc++.h>
using namespace std;
#define dump(...) cout<<"# "<<#__VA_ARGS__<<'='<<(__VA_ARGS__)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define all(c) begin(c),end(c)
#define mp mak... | a.cc: In function 'int main()':
a.cc:74:19: error: 'sync_width_stdio' is not a member of 'std::ios_base'
74 | ios_base::sync_width_stdio(false);
| ^~~~~~~~~~~~~~~~
|
s587440225 | p00679 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;
struct po {
int index;
vector<long long int> coors;
po(int _d):coors(_d) {
index = -1;
}
po(int index_, const vector<long long int>&coors_) :i... | a.cc: In function 'int main()':
a.cc:141:61: error: no matching function for call to 'po::po(int, std::vector<int>)'
141 | po p(0, vector<int>{x, y, z});
| ^
a.cc:19:9: note: candidate: 'po::po()'
19 | po() {}... |
s316449087 | p00679 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<map>
#include<iostream>
#include<cmath>
#include<ctime>
#define INF 1000001LL
#define INF2 1000001000000LL
using namespace std;
typedef long long ll;
struct cord{
int d,k;
vector<ll> c;
cord(void){d = k = 0;c.clear();}
cord(vector<ll> v){d = v.siz... | a.cc: In function 'int main()':
a.cc:97:25: error: 'a' was not declared in this scope
97 | for(int i=0;i<n;i++)a[i] = v[i];
| ^
|
s719415966 | p00680 | C++ | #include<bits/stdc++.h>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-8)
#define equals(a,b) (fabs((a)-(b))<EPS)
using namespace std;
typedef pair<int,int> ii;
bool LT(double a,double b) { return !equals(a,b) && a < b ; }
struct Edge {
int to,cap;
double cost;
int rev;
}... | a.cc:108:23: error: stray '#' in program
108 | cin >> N >> s >> t#include<bits/stdc++.h>
| ^
a.cc: In function 'void add_edge(int, int, int, double)':
a.cc:29:50: warning: narrowing conversion of 'G[to].std::vector<Edge>::size()' from 'std::vector<Edge>::size_type' {aka 'long unsigned ... |
s096034647 | p00682 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:52: error: ';' expected
public String toString{return "("+this.x+","+this.y+")";}
^
1 error
|
s030211770 | p00682 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:27: error: cannot find symbol
n=ir.nextInt();
^
symbol: variable n
location: class Main
Main.java:28: error: cannot find symbol
if(n==0) break;
^
symbol: variable n
location: class Main
Main.java:29: error: cannot find symbol
Vector[] vs=new Vector[n];
^
symbol: varia... |
s192464709 | p00682 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int Case = 1;
while(true){
int n = sc.nextInt();
if(n==0)break;
double a[][] = new double[n][2];
for(int i=0;i<n;i++){
a[i][0] = sc.nextDouble();
a[i][1] = sc.nextDouble();
}
double area = ... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s143551312 | p00682 | Java | import java.io.*;
import java.util.*;
public class AreaofPolygons {
public static void main(String[] args) throws IOException{
int j = 1;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in),1);
while(true){
ArrayList<Integer> x = new ArrayList<>... | Main.java:4: error: class AreaofPolygons is public, should be declared in a file named AreaofPolygons.java
public class AreaofPolygons {
^
1 error
|
s989684732 | p00682 | Java | import java.io.*;
import java.util.*;
public class AreaofPolygons {
public static void main(String[] args) throws IOException{
int j = 1;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in),1);
while(true){
ArrayList<Integer> x = new ArrayList<>... | Main.java:4: error: class AreaofPolygons is public, should be declared in a file named AreaofPolygons.java
public class AreaofPolygons {
^
1 error
|
s096459799 | p00682 | Java | import java.util.Scanner;
public class polygons {
public static void main(String args[]){
int n;
int cnt=0;
Scanner sc=new Scanner(System.in);
while (true){
n=sc.nextInt();
if (n==0) break;
double s=0.0;
int [][] ver=new int[n][2];
for (int i=0;i<n;i++){
ver[i][0]=sc.nextInt();
ver[i][1]... | Main.java:2: error: class polygons is public, should be declared in a file named polygons.java
public class polygons {
^
1 error
|
s988652198 | p00682 | Java | import java.util.Scanner;
public class main {
public static void main(String args[]){
int n;
int cnt=0;
Scanner sc=new Scanner(System.in);
while (true){
n=sc.nextInt();
if (n==0) break;
double s=0.0;
int [][] ver=new int[n][2];
for (int i=0;i<n;i++){
ver[i][0]=sc.nextInt();
ver[i][1]=sc.... | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s042242955 | p00682 | Java | import java.util.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String...args) {
while(sc.hasNext()) {
final int n = sc.nextInt();
if (n == 0)
break;
solve(n);
}
private static void solve(final int n) {
final int[] x = new in... | Main.java:12: error: illegal start of expression
private static void solve(final int n) {
^
1 error
|
s261965245 | p00682 | Java | import java.util.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String...args) {
while(sc.hasNext()) {
final int n = sc.nextInt();
if (n == 0)
break;
solve(n);
}
private static int case = 1;
private static void solve(final int... | Main.java:12: error: illegal start of expression
private static int case = 1;
^
Main.java:12: error: <identifier> expected
private static int case = 1;
^
Main.java:23: error: illegal start of expression
System.out.println(case++ + " " + (.5 * Math.abs(ans)));
^
Main.... |
s917963362 | p00682 | Java | import java.util.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String...args) {
while(sc.hasNext()) {
final int n = sc.nextInt();
if (n == 0)
break;
solve(n);
}
}
private static int case = 1;
private static void solve(fi... | Main.java:13: error: <identifier> expected
private static int case = 1;
^
Main.java:24: error: illegal start of expression
System.out.println(case++ + " " + (.5 * Math.abs(ans)));
^
Main.java:24: error: : or -> expected
System.out.println(case++ + " " + (.5 * Math.ab... |
s770988645 | p00682 | Java | import java.util.*;
import java.lang.Math;
public class AOJ1100
{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
for(int a=1;;a++){
Polygo pol =new Polygo();
int n=sc.nextInt();
if(n==0)break;
for(int i=0;i<n;i++){
pol.addXY(sc.nextDouble(),sc.nextDouble());
... | Main.java:3: error: class AOJ1100 is public, should be declared in a file named AOJ1100.java
public class AOJ1100
^
1 error
|
s290656674 | p00682 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main{
static int N, D, money;
static int[] prices;
private static int solve(){
int answer = 0;
if (prices[0] * 2 > money) return 0;
if (prices[prices.length - 1] + prices[prices.length - 2] <= m... | Main.java:28: error: cannot find symbol
prices[i] = Integer.parseInt(be.readLine());
^
symbol: variable be
location: class Main
Main.java:29: error: cannot find symbol
Arrays.Sort(prices);
^
symbol: method Sort(int[])
location: class... |
s990664127 | p00682 | C | #include <math.h>
#include <stdio.h>
#pragma warning(disable : 4996)
int n, c, x[100], y[100];
double s(int xa, int ya, int xb, int yb, int xc, int yc) {
return abs((xb - xa) * (yc - ya) - (xc - xa) * (yb - ya)) * 0.5;
}
int main() {
while (true) {
scanf("%d", &n);
if (n == 0) break;
for (int i = 0; i < n; i++)... | main.c: In function 's':
main.c:6:16: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
6 | return abs((xb - xa) * (yc - ya) - (xc - xa) * (yb - ya)) * 0.5;
| ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
2 | #include <std... |
s471012434 | p00682 | C | import java.util.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String...args) {
while(sc.hasNext()) {
final int n = sc.nextInt();
if (n == 0)
break;
solve(n);
}
}
private static int case = 1;
private static void solve(fi... | main.c:1:1: error: unknown type name 'import'
1 | import java.util.*;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.util.*;
| ^
main.c:3:1: error: unknown type name 'public'
3 | public class Main {
| ^~~~~~
main.c:... |
s362129453 | p00682 | C | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s978208697 | p00682 | C++ | #include <stdio.h>
int main(){
int n, cnt = 1;
scanf_s("%d", &n);
while (n){
float s = 0, x0, y0, xa, xb, ya, yb;
scanf_s("%f %f", &x0, &y0);
xb = x0;
yb = y0;
for (int i = n - 1; i>0; i--){
xa = xb;
ya = yb;
scanf_s("%f %f", &xb, &yb);
s += (xb + xa)*(yb - ya);
}
s += (x0 + xb)*(y0 - yb);... | a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
5 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s319374532 | p00682 | C++ | e#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <string>
#include <climits>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#defi... | a.cc:1:2: error: stray '#' in program
1 | e#include <iostream>
| ^
a.cc:1:1: error: 'e' does not name a type
1 | e#include <iostream>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include... |
s988887942 | p00682 | C++ | printf("www"); | a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
1 | printf("www");
| ^
|
s090044104 | p00682 | C++ | #include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
// ------ Classes ------ //
class Point {
public:
long double px, py;
Point() : px(0), py(0) {};
Point(long double px_, long double py_) : px(px_), py(py_) {};
friend bool operator==(const Point& p1, const Point& p2) { ... | a.cc: In function 'int main()':
a.cc:42:17: error: 'p' was not declared in this scope
42 | p.resize(n);
| ^
|
s796358714 | p00682 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<complex>
#include<vector>
#include<queue>
using namespace std;
typedef complex<int> xy_t;
int main()
{
int n;
double x,y,sum = 0.0;
queue<int> answer;
while(cin >> n && n > 0){
vector<xy_t> p(n);
for( int i = 0; i < n; ++i){
cin >> x >> ... | a.cc: In function 'int main()':
a.cc:27:28: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
27 | printf("%.1f\n",answer.top());
| ^~~
| pop
|
s790395998 | p00682 | C++ | vf | a.cc:1:1: error: 'vf' does not name a type
1 | vf
| ^~
|
s589487844 | p00682 | C++ | #incluce <iostream>
#include <stdio.h>
#include <cmath>
#include <vector>
struct vertex{
int x;
int y;
vertex(int x0, int y0){x = x0, y = y0;}
};
typedef std::vector<vertex> convex;
int judgeCurve(vertex p1, vertex p2, vertex p3){
double vec1_x = p2.x - p1.x, vec1_y = p2.y - p1.y;
double vec2_x = p3.x - p1.x, v... | a.cc:1:2: error: invalid preprocessing directive #incluce; did you mean #include?
1 | #incluce <iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:57:1: error: 'cin' was not declared in this scope; did you mean 'sin'?
57 | cin >> n;
| ^~~
| sin
|
s623139835 | p00682 | C++ | #include <stdio.h>
#include <math>
struct vertex{
int x;
int y;
};
double areaTriangle(vertex p1, vertex p2, vertex p3)
{
double vec1_x = p2.x - p1.x, vec1_y = p2.y - p1.y;
double vec2_x = p3.x - p1.x, vec2_y = p3.y - p1.y;
return (vec1_x * vec2_y - vec1_y * vec2_x) / 2;
}
int main(void)
{
int cnt = 0;
int ... | a.cc:2:10: fatal error: math: No such file or directory
2 | #include <math>
| ^~~~~~
compilation terminated.
|
s316206657 | p00682 | C++ | import java.util.Scanner;
public class Main {
public static void main(String args[]){
int n;
int cnt=0;
Scanner sc=new Scanner(System.in);
while (true){
n=sc.nextInt();
if (n==0) break;
double s=0.0;
int [][] ver=new int[n][2];
for (int i=0;i<n;i++){
ver[i][0]=sc.nextInt();
ver[i][1]=sc.... | 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 {
| ^~~~~~
|
s047439866 | p00682 | C++ | #include <vector>
#include <complex>
using namespace std;
typedef complex<double> P;
double area(vector<P> polygon)
{
const int N = polygon.size();
double s = 0.0;
for (int i = 0; i < N; i++) {
s += polygon[i].real()*polygon[(i+1)%N].imag() - polygon[i].imag()*polygon[(i+1)%N].real();
}
return abs(s)/2.0... | a.cc: In function 'int main()':
a.cc:20:10: error: 'cin' was not declared in this scope
20 | while (cin >> n && n != 0) {
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include <complex>
+++ |+#include <iostream... |
s720118512 | p00682 | C++ | #include <iostream>
#include <math>
#include <string>
using namespace std;
int main()
{
int n;
int c=1;
double x[100] = {0};
double y[100] = {0};
while( cin >> n , n)
{
double out = 0;
for( int i = 0; i < n; i++)
{
cin >> x[i] >> y[i];
}
for( int i = 0; i < n - 1 ; i++)
{
out += x[i]... | a.cc:2:10: fatal error: math: No such file or directory
2 | #include <math>
| ^~~~~~
compilation terminated.
|
s091571605 | p00682 | C++ | #include <iostream>
#include <math>
using namespace std;
int main()
{
int n;
int c=1;
double x[100] = {0};
double y[100] = {0};
while( cin >> n , n)
{
double out = 0;
for( int i = 0; i < n; i++)
{
cin >> x[i] >> y[i];
}
for( int i = 0; i < n - 1 ; i++)
{
out += x[i]*y[i+1] - x[i+1]*y[i]... | a.cc:2:10: fatal error: math: No such file or directory
2 | #include <math>
| ^~~~~~
compilation terminated.
|
s122339854 | p00682 | C++ | #include <vector>
#include <cmath>
using namespace std;
/*
double area(double x1,double y1,
double x2,double y2,
double x3,double y3){
double vx1 = x2-x1;
double vy1 = y2-y1;
double vx2 = x3-x1;
double vy2 = y3-y1;
return (abs(vx1*vy2)+abs(vy1*vx2))/2.0;
}*/
int main(){
int ... | a.cc: In function 'int main()':
a.cc:28:9: error: 'cin' was not declared in this scope
28 | cin >> n;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include <cmath>
+++ |+#include <iostream>
3 |
a.cc:4... |
s932177347 | p00682 | C++ | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int c = 0;
while(true){
c++;
int n = sc.nextInt();
if(n==0) break;
double a[][] = new double[n][2];
for(int i=0 ;i<n ;i++){
a[i][0] = sc.nextDouble(); //x
a[i][1] = sc.... | 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:4:1: error: expected unqualified-id before 'public'
4 | public class Main{
| ^~~~~~
|
s592483703 | p00682 | C++ | #include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <iterator>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
int main()
{
ios_base::sync_with_stdio... | a.cc: In function 'int main()':
a.cc:33:16: error: 'Point' was not declared in this scope
33 | vector<Point> points(nb_points);
| ^~~~~
a.cc:33:21: error: template argument 1 is invalid
33 | vector<Point> points(nb_points);
| ^
a.cc:33:21: error: temp... |
s547317212 | p00683 | Java | import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import jav... | Main.java:33: error: empty character literal
for(int i=0;i<=MAX;i++) str[i]='';
^
Main.java:39: error: empty character literal
if("char".equals(com[1])&&str[cur]!='') cur++;
^
Main.java:42: error: empty character literal
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.