submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s955239697 | p03865 | C++ | #include<string>
#include<iostream>
using namespace std;
int main(void){
string s; cin >> s;
cout << ( (s.size()%2 == 0) ^ (s.front() == s.back()) )?"Second":"First" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:82: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout << ( (s.size()%2 == 0) ^ (s.front() == s.back()) )?"Second":"First" << endl;
| ... |
s081358641 | p03865 | C++ | #include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <numeric>
using namespace std;
#define repl(i,a,b) for(i... | a.cc: In function 'int main()':
a.cc:42:17: error: no matching function for call to 'max(int, long long int)'
42 | long j = max(0, (need-i*b+d)/d);
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from a.cc:3:
/usr/include/c++/14/bits/stl_algobase.... |
s146613038 | p03865 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
int const N = 1e5 + 41;
char s[N];
int n, rem;
int main(){
scanf("%s",&s);
n = strlen(s);
if(s[0] == s[n-1]){
rem = 1;
}else{
rem = 0;
}
if((n - rem) % 2 == 1){
printf("First\n");
}else{
printf("Second\n");
... | a.cc: In function 'int main()':
a.cc:14:13: error: 'strlen' was not declared in this scope
14 | n = strlen(s);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<vector>
+++ |+#include <cstring>
... |
s364823227 | p03865 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// standard input
String s = sc.next();
// process
boolean isStrLenEvenNumber = (s.length() % 2 == 0);
boolean isSameFirstAndLast = (s.charAt(0) == (s.charAt(s.length() - 1));
... | Main.java:13: error: ')' expected
boolean isSameFirstAndLast = (s.charAt(0) == (s.charAt(s.length() - 1));
^
1 error
|
s709499814 | p03865 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int moves=0;
int i=1;
while(s.size()>2)
{
int f=0;
if((i+1)<s.size())
{
if(s[i-1]!=s[i+1])
{
r=s;
r.erase(i,1);
f=1;
... | a.cc: In function 'int main()':
a.cc:16:17: error: 'r' was not declared in this scope
16 | r=s;
| ^
a.cc:21:15: error: 'r' was not declared in this scope
21 | s=r;
| ^
a.cc:27:12: error: invalid operands of types '<unresolved overloaded functio... |
s112784010 | p03865 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int moves=0;
int i=1;
while(s.size()>2)
{
int f=0;
if((i+1)<s.size())
{
if(s[i-1]!=s[i+1])
{
r=s;
r.erase(i,1);
f=1;
... | a.cc: In function 'int main()':
a.cc:16:17: error: 'r' was not declared in this scope
16 | r=s;
| ^
a.cc:21:15: error: 'r' was not declared in this scope
21 | s=r;
| ^
a.cc:27:12: error: invalid operands of types '<unresolved overloaded functio... |
s394385946 | p03865 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair< int, int > pii;
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef vector< ll > vl;
typedef vector< vl > vvl;
typedef vector< pii > vp;
typedef vector< vp > vvp;
typedef vector< string > vs;
typedef vector< double > vd;
typedef ... | a.cc: In function 'void solve()':
a.cc:41:50: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to binary 'operator=='
41 | cout << msg[ ( S.size() % 2 == 0 ) ^ ( S.front == S.back() ) ] << endl;
| ... |
s936200712 | p03865 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair< int, int > pii;
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef vector< ll > vl;
typedef vector< vl > vvl;
typedef vector< pii > vp;
typedef vector< vp > vvp;
typedef vector< string > vs;
typedef vector< double > vd;
typedef ... | a.cc: In function 'void solve()':
a.cc:41:50: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to binary 'operator=='
41 | cout << msg[ ( S.size() % 2 == 0 ) ^ ( S.front == S.back() ) ] << endl;
| ... |
s224074538 | p03865 | C++ | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <iostream>
#include <queue>
#include <list>
#include <stack>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define REP(i,a,n) for(int i=(a)... | a.cc: In function 'bool solve(std::string&)':
a.cc:36:28: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
36 | if(solve(S.substr(0,i) + S.substr(i+1))) flg = false;
| ~~~~~~~~... |
s869352114 | p03865 | C++ | #include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <numeric>
#include <cassert>
#include <cmath>
#include <map>
#include <set>
using namespace std;
typedef unsigned int uint;
typedef long long LL;
typedef pair<LL, LL> PLL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<... | a.cc: In function 'int main(int, char**)':
a.cc:32:9: error: 'string' was not declared in this scope
32 | string s;
| ^~~~~~
a.cc:10:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
9 | #include <set>
+++ |+#include <string>
... |
s007201447 | p03865 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
int n=s.size();
int idx;
if(s[0]==s[n-1]) idx=1;
else idx=0;
if(idx){
if(n%2) cout<<Second;
else cout<<First;
}
else {
if(n%2) cout<<First;
else cout<<Second;
}
} | a.cc: In function 'int main()':
a.cc:11:23: error: 'Second' was not declared in this scope
11 | if(n%2) cout<<Second;
| ^~~~~~
a.cc:12:20: error: 'First' was not declared in this scope
12 | else cout<<First;
| ^~~~~
a.cc:15:23: error: 'First' wa... |
s315655293 | p03865 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
/*
_ooOoo_
o8888888o
88" . "88
(| -_- |)
O\ = /O
____/`--... | Main.java:30: error: class D is public, should be declared in a file named D.java
public class D {
^
1 error
|
s713764754 | p03865 | C++ |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#includ... | a.cc: In function 'int main()':
a.cc:27:17: error: 'strlen' was not declared in this scope
27 | int n = strlen(str);
| ^~~~~~
a.cc:20:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
19 | #include <queue>
+++ |+#include <cs... |
s434620953 | p03865 | C++ | //In the Name of God
//Ya Ali
#include<bits/stdc++.h>
#define err(A) cout<<#A<<" = "<<(A)<<endl
using namespace std;
int main()
{
ios::sync_with_stdio(0);cin.tie(0);
string s;
cin>>s;
if(s[0]==s[n-1] xor (n&1))
cout<<"Second"<<endl;
else
cout<<"First"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:17:14: error: 'n' was not declared in this scope
17 | if(s[0]==s[n-1] xor (n&1))
| ^
|
s790451398 | p03865 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
#include <cstring>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <map>
#include <iostream>
#include <algorithm>
using namespace std;
#define MP make_pair
#define PB push_back
typedef long long LL;
typedef pair<int, int... | a.cc: In function 'int main()':
a.cc:43:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
43 | if(l >= 0 && r < n && r >= l & &l < n&&s[l]!=s[r]){
| ~~~^~~
|
s029751679 | p03865 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ull;
int main() {
string s;
cin>>s;
char f,l;
f=s[0],l=s[s.size()-1];
int rest;
if(f==l){
rest=3;
}else{
rest=0;
char t=l;
for(int i=0;i<s.size();i++){
if(t==l){
if(s[i]==f){
rest++;
t=f;
}
}else{
if(s[i]==l){
... | a.cc: In function 'int main()':
a.cc:36:18: error: expected '}' at end of input
36 | return 0;
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s274168847 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
void solve(long long x_s, long long y_s, long long x_t, long long y_t,
long long N, std::vector<long long> x, std::vector<long long> y,
std::vector<long long> r) {}
// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You
// u... | a.cc:13:23: error: stray '#' in program
13 | scanf("%lld", &x_s);#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:13:24: error: 'include' was not declared in this scope
13 | scanf("%lld", &x_s);#include <bits/stdc++.h>
| ^~~~~~~
a.cc:13... |
s106307818 | p03866 | C++ | // #pragma GCC optimize("Ofast")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC optimize("no-stack-protector")
// #pragma GCC optimize("fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,popcnt,avx,avx2,tune=native")
#include <bits/stdc++.h>
using namespace std;
... | a.cc: In member function 'long double circle::dist(const circle&) const':
a.cc:84:16: error: expected primary-expression before 'long'
84 | #define double long double
| ^~~~
a.cc:98:20: note: in expansion of macro 'double'
98 | return max(double(0), rast - p.r - r);
| ... |
s161778195 | p03866 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
inline int ri() { int n; cin >> n; return n;}
//経路復元なしDijkstra法
template<class T>
vector<T> dijkstra(int start, const vector<vector<pair<int,T>>>& Hen){
T INF = numeric_limits<T>::max();
int N = Hen.size();
vector<T> dist(N, INF);
dist[start] = 0... | a.cc: In instantiation of 'std::vector<_Tp> dijkstra(int, const std::vector<std::vector<std::pair<int, T> > >&) [with T = double]':
a.cc:57:49: required from here
57 | cout << fixed <<setprecision(12) << dijkstra(0,hen)[1] << '\n';
| ~~~~~~~~^~~~~~~
a.cc:15:17: err... |
s068677567 | p03866 | C++ |
#include <bits/stdc++.h>
//#include "bits/stdc++.h"
#include <algorithm>
#include <array>
#ifdef _MSC_VER
#include <intrin.h>
#endif
namespace atcoder {
namespace internal {
// @param n `0 <= n`
// @return minimum non-negative `x` s.t. `n <= 2**x`
int ceil_pow2(int n) {
int x = 0;
while ((1U << x) < (uns... | a.cc: In function 'void dijkstra(int)':
a.cc:2191:26: error: 'i_i' was not declared in this scope; did you mean 'i_d'?
2191 | que.push(i_i(d[e.to],e.to));
| ^~~
| i_d
|
s511641497 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
#define f0r(a, b) for (long long a = 0; a < b; a++)
#define f1r(a, b, c) for (long long a = b; a < c; a++)
#define f0rd(a, b) for (long long a = b; a >= 0; a--)
#define f1rd(a, b, c) for (long long a = b; a >= c; a--)
#define ms(arr, v) memset(arr, v, sizeof(arr))
#define... | In file included from /usr/include/c++/14/queue:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<std::pair<double, long long int>, std::vector<std::pair<double, int> >, std... |
s726221600 | p03866 | C++ | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define endl '\n'
#define x first
#define y second
#define int long long
#define double long double
#define pii pair<int, int>
#define ... | a.cc: In function 'void solve()':
a.cc:111:27: error: no matching function for call to 'std::priority_queue<std::pair<long double, long long int> >::emplace(<brace-enclosed initializer list>)'
111 | se.emplace({-dist[nxt.y], nxt.y});
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file in... |
s448655649 | p03866 | C++ | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define endl '\n'
#define x first
#define y second
#define int long long
#define double long double
#define pii pair<int, int>
#define ... | a.cc: In function 'long double get_dist(std::vector<long long int>&, std::vector<long long int>&)':
a.cc:70:19: error: no matching function for call to 'max(double, long double)'
70 | return max(0., sqrtl((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) - (double)(r1 + r2));
| ~~~^~~~~~~~~... |
s354250793 | p03866 | C | #include <algorithm> //STL ????
#include <bitset> //STL ????
#include <cctype> //????
#include <cerrno> //?????
#include <cfloat> //?????
#include <ciso646> //?????????
#include <climits> //?????????????
#include <clocale> //???????
#include <cmath> //??????
#include <complex> //???
#in... | main.c:1:10: fatal error: algorithm: No such file or directory
1 | #include <algorithm> //STL ????
| ^~~~~~~~~~~
compilation terminated.
|
s583389270 | p03866 | C | #include<bits/stdc++.h>
using namespace std;
const double INF=1e18;
const int N=1010;
int n;
struct Edge{
int nxt,to;
double dis;
}edge[N*N];
int head[N],edge_num;
void add(int f,int t,double d){
edge[edge_num].nxt=head[f];
edge[edge_num].dis=d;
edge[edge_num].to=t;
head[f]=edge_num++;
return;
}
struct node{
... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s662090303 | p03866 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include<math.h>
using namespace std;
#define inf 0x3f3f3f3f
#define N 1005
long double maze[N][N], dis[N];
int n;
int vis[N];
void Dijkstra()
{
int i, j, minn, indx;
memset(vis, 0, sizeof(vis));
vis[0] = 1;
for (i = 0; i <= n + 1; i++)
dis[i] = maze[0][... | a.cc: In function 'int main()':
a.cc:46:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
46 | scanf_s("%d%d%d%d", &s[0].x, &s[0].y, &xx, &yy);
| ^~~~~~~
| scanf
|
s963460555 | p03866 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include<math.h>
using namespace std;
#define inf 0x3f3f3f3f
#define N 1005
double maze[N][N], dis[N];
int n;
int vis[N];
void Dijkstra()
{
int i, j, minn, indx;
memset(vis, 0, sizeof(vis));
vis[0] = 1;
for (i = 0; i <= n + 1; i++)
dis[i] = maze[0][i];
... | a.cc: In function 'int main()':
a.cc:46:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
46 | scanf_s("%d%d%d%d", &s[0].x, &s[0].y, &xx, &yy);
| ^~~~~~~
| scanf
|
s392225646 | p03866 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
#include <functional>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define REP(i, n) for (int i = 1; i <... | a.cc:24:13: error: '::main' must return 'int'
24 | #define int ll
| ^~
a.cc:28:1: note: in expansion of macro 'int'
28 | int main() {
| ^~~
|
s070274480 | p03866 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#define flush fflush(stdout)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
typedef pair<double, int> Pd;
const int mod = (int)1e9 + 7, INF = (int)1e9;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };
int mai... | a.cc: In function 'int main()':
a.cc:50:28: error: 'sqrt' was not declared in this scope
50 | nds = max(0.0, sqrt(dx * dx + dy * dy) - r[pv] - r[i]);
| ^~~~
|
s850096676 | p03866 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#define flush fflush(stdout)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
typedef pair<double, int> Pd;
const int mod = (int)1e9 + 7, INF = (int)1e9;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };
int mai... | a.cc: In function 'int main()':
a.cc:50:28: error: 'sqrt' was not declared in this scope
50 | nds = max(0.0, sqrt(dx * dx + dy * dy) - r[pv] - r[i]);
| ^~~~
|
s147303339 | p03866 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#define flush fflush(stdout)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
typedef pair<double, int> Pd;
const int mod = (int)1e9 + 7, INF = (int)1e9;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };
int mai... | a.cc: In function 'int main()':
a.cc:50:28: error: 'sqrt' was not declared in this scope
50 | nds = max(0.0, sqrt(dx * dx + dy * dy) - r[pv] - r[i]);
| ^~~~
|
s158972373 | p03866 | C++ | // AtCoder.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
// AtCoder.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#define _USE_MATH_DEFINES
#include<math.h>
//#include<cmath>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<c... | a.cc: In function 'int32_t main()':
a.cc:336:32: error: invalid types 'll {aka long long int}[int]' for array subscript
336 | printf("%.15lf\n", dist[N+1]);
| ^
|
s157920730 | p03866 | C++ | // AtCoder.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
// AtCoder.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#define _USE_MATH_DEFINES
#include<math.h>
//#include<cmath>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<c... | a.cc: In function 'int32_t main()':
a.cc:305:37: error: expected primary-expression before 'long'
305 | chmax(cost, long double(0));
| ^~~~
a.cc:47:28: note: in definition of macro 'chmax'
47 | #define chmax(x,y) x=max(x,y)
| ... |
s235238491 | p03866 | C++ | #include <iostream>
#include <iomanip>
//#include <string>
#include <vector>
#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
#include <queue>
//#include <deque>
//#include <bitset>
//#include <math.h>
using namespace std ;
using ll = long long ;
using ld = long double ;
using vll = vector<ll... | a.cc: In lambda function:
a.cc:65:24: error: 'sqrt' was not declared in this scope
65 | return sqrt((a-c)*(a-c)+(b-d)*(b-d)) ;
| ^~~~
|
s002391083 | p03866 | C++ | #ifndef DEBUG
# define NDEBUG
#endif
#include <iostream>
#include <algorithm>
#include <string>
#include <iterator>
#include <utility>
#include <type_traits>
#include <limits>
#include <cassert>
#include <numeric>
#include <vector>
#include <queue>
using namespace std;
// template {{{
// misc {{{
using Z = long long... | a.cc: In function 'int main()':
a.cc:157:29: error: 'hypot' was not declared in this scope
157 | double dist = max(0., hypot(ix(x, i) - ix(x, j), ix(y, i) - ix(y, j)) - ix(r, i) - ix(r, j));
| ^~~~~
|
s665675342 | p03866 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <cmath>
#include <limits>
#define REP(i,n) for(int i=0;i<(n);++i)
using namespace std;
typedef long long LL;
double calc_dist(double Xa, double Ya, double Ra, double Xb, double Yb, double Rb) {
d... | a.cc: In function 'int main()':
a.cc:24:24: error: expression list treated as compound expression in initializer [-fpermissive]
24 | bool visited(N, false);
| ^
a.cc:38:12: error: invalid types 'bool[int]' for array subscript
38 | visited[idx] = true;
| ^
a.cc:4... |
s763565639 | p03866 | C++ | #include <bits/stdc++.h>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/adaptor/indexed.hpp>
#define FOR(i,k,n) for(int i = (k);i < (n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) begin(x),end(x)
using namespace std;
using namespa... | a.cc:2:10: fatal error: boost/range/algorithm.hpp: No such file or directory
2 | #include <boost/range/algorithm.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s845349896 | p03866 | Java | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
static boolean DEBUG;
public static void main(String[] args) {
DEBUG = args.length > 0 && args[0].equals("-DEBUG");
Solver solver = new Solver();
solver.solve();
solver.exit();
}
static class FastScanner {
private final InputSt... | Main.java:888: error: integer number too large
int x = 1000000000000;
^
1 error
|
s767648292 | p03866 | Java | import java.io.Serializable;
import java.util.AbstractCollection;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.Iterator;
import jav... | Main.java:64: error: incompatible types: double[] cannot be converted to boolean[]
boolean[] visited = new double[graph.size()];
^
1 error
|
s521539310 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector <ll> vi;
typedef pair<ll,double> pd;
typedef pair<double,ll> pdi;
typedef vector <pd> vpi;
typedef pair<pi,ll> pii;
#define f first
#define s second
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e)... | a.cc: In function 'int main()':
a.cc:57:31: error: expected ';' before 'cin'
57 | cout<<setprecision(10)
| ^
| ;
58 |
59 | cin>>st.f>>st.s>>e.f>>e.s;
| ~~~
|
s239555937 | p03866 | C++ | #include <algorithm>
#include <bits/stdc++.h>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using na... | In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<std::pair<double, ... |
s857784721 | p03866 | C++ | 4 -2 -2 4
3
0 0 2
4 0 1
0 4 1 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4 -2 -2 4
| ^
|
s150485041 | p03866 | C++ | #define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_A&lang=ja"
#include<bits/stdc++.h>
using namespace std;
#include "../../datastructure/FibHeapMap.cpp"
namespace dijkstra_n {
template<class W>
struct Edge {
using type = Edge<W>;
int to;
W w;
template<class... Args> Edge(int t, Args... | a.cc:7:10: fatal error: ../../datastructure/FibHeapMap.cpp: No such file or directory
7 | #include "../../datastructure/FibHeapMap.cpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s765244524 | p03866 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<un... | a.cc:58:10: error: conflicting declaration 'const DD INF'
58 | const DD INF = 1LL<<60; // to be set appropriately
| ^~~
a.cc:29:10: note: previous declaration as 'const ll INF'
29 | const ll INF=1LL<<60 ;
| ^~~
a.cc:65:8: error: using typedef-name 'Point' after 'struct'
65 | ... |
s858914377 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pll = pair<ll, ll>;
constexpr long double INF = 1e10;
constexpr int MAX_N = 2000;
vector<long double> d(MAX_N, INF);
priority_queue<pair<long double, ll>, vector<pair<long double, ll>>, greater<pair<long double, ll>>> que;
vector<vector<pair... | a.cc: In function 'int main()':
a.cc:56:35: error: no matching function for call to 'max(double, long double)'
56 | long double dist = max(0.0, (points[i]-points[j]).abs() - points[i].r - points[j].r);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s574291269 | p03866 | C++ | #include<iostream>
#include<algorithm>
#include<functional>
#include<queue>
#include<vector>
#include<cmath>
#include<iomanip>
using namespace std;
typedef pair<double, int> P;
struct Edge {
int to;
double cost;
Edge(int a, double b) { to = a, cost = b; }
};
struct shelter {
double x, y, r;
shelter(double a, d... | a.cc: In function 'int main()':
a.cc:75:51: error: cannot bind non-const lvalue reference of type 'shelter&' to an rvalue of type 'shelter'
75 | E[0].push_back(Edge(i + 1, getdis(shelter(sx, sy, 0), S[i])));//どうせ最初のスタートに戻らないので一方通行の辺でもいい
| ^~~~~~... |
s915666093 | p03866 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
struct edge{
int to;
double cost;
};
using namespace std;
//ダイクストラで多用する型
typedef pair<double, int> P;//(その頂点までの距離,頂点)として使う。
vector<edge> G[1'010];//頂点iから出る辺の配... | a.cc: In function 'int main()':
a.cc:72:22: error: 'setprecision' was not declared in this scope
72 | cout << fixed << setprecision(10) << ans << endl;
| ^~~~~~~~~~~~
a.cc:5:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iom... |
s811545645 | p03866 | C++ | #include <iostream>
#include <vector>
#include <queue>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
struct edge{
int to;
double cost;
};
using namespace std;
//ダイクストラで多用する型
typedef pair<double, int> P;//(その頂点までの距離,頂点)として使う。
vector<edge> G[1'010];//頂点iから出る辺の配列G[i]の配列。
double ... | a.cc: In function 'int main()':
a.cc:63:16: error: 'hypot' was not declared in this scope
63 | temp = hypot(x[j]-x[i], y[j]-y[i]) - r[i] - r[j];
| ^~~~~
a.cc:71:22: error: 'setprecision' was not declared in this scope
71 | cout << fixed << setprecision(10) << ans << endl;
| ... |
s413886318 | p03866 | C++ | #include <iostream>
#include <vector>
#include <queue>
#define REP(i,n) for(int i=0;i<n;i++)
struct edge{
int to;
double cost;
};
using namespace std;
//ダイクストラで多用する型
typedef pair<double, int> P;//(その頂点までの距離,頂点)として使う。
vector<edge> G[1'010];//頂点iから出る辺の配列G[i]の配列。
double dist[1'010];//特定の頂点から各頂点への距離が格納される。
bool... | a.cc: In function 'int main()':
a.cc:52:10: error: 'i' was not declared in this scope
52 | REPP(i,n){
| ^
a.cc:52:5: error: 'REPP' was not declared in this scope; did you mean 'REP'?
52 | REPP(i,n){
| ^~~~
| REP
a.cc:62:16: error: 'hypot' was not declared in this scope
... |
s303720769 | p03866 | C++ | #include <iostream>
#include <vector>
#include <queue>
#define REP(i,n) for(int i=0;i<n;i++)
struct edge{
int to;
double cost;
};
using namespace std;
//ダイクストラで多用する型
typedef pair<double, int> P;//(その頂点までの距離,頂点)として使う。
vector<edge> G[1'010];//頂点iから出る辺の配列G[i]の配列。
double dist[1'010];//特定の頂点から各頂点への距離が格納される。
bool... | a.cc: In function 'int main()':
a.cc:52:10: error: 'i' was not declared in this scope
52 | REPP(i,n){
| ^
a.cc:52:5: error: 'REPP' was not declared in this scope; did you mean 'REP'?
52 | REPP(i,n){
| ^~~~
| REP
a.cc:62:16: error: 'hypot' was not declared in this scope
... |
s200931317 | p03866 | C | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rep1(i,n) for(int i=1;i<=(int)(n);++i)
#define rep11(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define repm(i,n) for(int i=(... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s870135235 | p03866 | C++ | #define LOCAL
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <vector>
#include <numeric>
#include <algorithm>
#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include <functional>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>... | a.cc: In function 'int main()':
a.cc:104:29: error: 'hypot' was not declared in this scope
104 | auto cost = hypot(1.0 * circles[i].x - circles[el].x, 1.0 * circles[i].y - circles[el].y);
| ^~~~~
|
s841060356 | p03866 | C++ | /// kAAzuki Hoshino
/*
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext... | a.cc:41:46: error: 'double y1' redeclared as different kind of entity
41 | double dist[1003],x[1003],y[1003],r[1003],x1,y1;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
... |
s390526437 | p03866 | C++ | /// kAAzuki Hoshino
/*
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext... | a.cc:41:42: error: 'ld y1' redeclared as different kind of entity
41 | ld dist[1003],x[1003],y[1003],r[1003],x1,y1;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
... |
s198891089 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, double> lpair;
typedef pair<double, ll> lpair2;
const ll MOD = 1e9 + 7;
#define rep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define print2(x,y) cout ... | a.cc: In function 'int main()':
a.cc:55:51: error: expected '}' at end of input
55 | cout << setprecision(12) << dist[N+1] << endl;
| ^
a.cc:14:11: note: to match this '{'
14 | int main(){
| ^
|
s586791593 | p03866 | C |
//#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <queue>
#define ll long long
#define fri(n) for(i=0;i<(n);i++)
#define frj(n) for(j=0;j<(n);i++)
#define min(p,q) ((p)<(q)?(... | main.c:8:10: fatal error: vector: No such file or directory
8 | #include <vector>
| ^~~~~~~~
compilation terminated.
|
s508493555 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repe(i,n) rep(i,(n)+1)
#define per(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define pere(i,n) rep(i,(n)+1)
#define all(x) (x).begin(),(x).end()
#define SP <<" "<<
#define MOD 1000000007
#define IINF 1000000000
#define LINF 10... | a.cc: In function 'int main()':
a.cc:31:18: error: no matching function for call to 'max(double, long double)'
31 | e[i][j]=max(0.0,sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]))-r[i]-r[j]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included f... |
s433716358 | p03866 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <utility>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <climits>
#include <numeric>
#include<stdio.h>
#include <queue>
#include <iomanip>
#include <float.h>
#include <set>
#include<functional>
#include <stack>
#include <tim... | a.cc: In function 'double kyori(p, p)':
a.cc:107:16: error: 'sqrt' was not declared in this scope
107 | return sqrt((x.first - y.first)*(x.first - y.first) + (x.second - y.second)*(x.second - y.second));
| ^~~~
|
s194821956 | p03866 | C++ | #include<iostream>
#include<iomanip>
#include<cmath>
#include<climits>
#include<queue>
using namespace std;
#define SQ(x) ((x)*(x))
struct B {
long long x,y,r;
double dist(B b) {
long long sqd = SQ(b.x - x) + SQ(b.y - y);
if (sqd <= SQ(b.r + r)) return 0;
return sqrt(sqd) - b.r - r;
}
};
typedef pair<double... | a.cc: In function 'int main()':
a.cc:43:31: error: 'DBL_MAX' was not declared in this scope
43 | vector<double> d(n+2, DBL_MAX);
| ^~~~~~~
a.cc:6:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
5 | #include<que... |
s460736949 | p03866 | C++ | #include<iostream>
#include<iomanip>
#include<cmath>
#include<queue>
using namespace std;
#define SQ(x) ((x)*(x))
struct B {
long long x,y,r;
double dist(B b) {
long long sqd = SQ(b.x - x) + SQ(b.y - y);
if (sqd <= SQ(b.r + r)) return 0;
return sqrt(sqd) - b.r - r;
}
};
typedef pair<double, int> P;//cost, t... | a.cc: In function 'int main()':
a.cc:42:31: error: 'DBL_MAX' was not declared in this scope
42 | vector<double> d(n+2, DBL_MAX);
| ^~~~~~~
a.cc:5:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
4 | #include<que... |
s993899977 | p03866 | C++ | #include<iostream>
#include<queue>
using namespace std;
#define SQ(x) ((x)*(x))
struct B {
long long x,y,r;
double dist(B b) {
long long sqd = SQ(b.x - x) + SQ(b.y - y);
if (sqd <= SQ(b.r + r)) return 0;
return sqrt(sqd) - b.r - r;
}
};
typedef pair<double, int> P;//cost, to
int main()
{
cin.tie(0);
ios:... | a.cc: In member function 'double B::dist(B)':
a.cc:11:24: error: 'sqrt' was not declared in this scope
11 | return sqrt(sqd) - b.r - r;
| ^~~~
a.cc: In function 'int main()':
a.cc:40:31: error: 'INT32_MAX' was not declared in this scope
40 | vector<double> d(n+... |
s271700787 | p03866 | C++ | #include<iostream>
#include<queue>
#include<bitset>
#include<algorithm>
#include<climits>
#include<vector>
#include<deque>
#include<cmath>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
... | a.cc: In function 'int main()':
a.cc:15:19: error: 'memset' was not declared in this scope
15 | #define fill(x,y) memset(x,y,sizeof(x))
| ^~~~~~
a.cc:45:3: note: in expansion of macro 'fill'
45 | fill(used, false);
| ^~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>';... |
s863666309 | p03866 | C++ | import java.util.*;
import java.lang.*;
import java.io.*;
class Pair<E extends Comparable<E>,F extends Comparable<F>> implements Comparable<Pair<E,F>>{
E first;
F second;
public Pair(E first, F second){
this.first=first;
this.second=second;
}
public E getFirst(){return first;}
pu... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.lang.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1... |
s720542623 | p03866 | C++ | #include<queue>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
void Read(int &p)
{
p=0;
int f=1;
char c=getchar();
while(c<'0' || c>'9')
{
if(c=='-') f=-1;
c=getchar();
}
while(c>='0' && c<='9')
p=p*10+c-'0',c=getchar();
p*=f;
}
const int MAXN=1000+24;
int N,... | a.cc: In function 'int Spfa()':
a.cc:34:43: error: 'INF' was not declared in this scope
34 | for(int i=1;i<=N;i++) Dis[i]=(i==s)?0:INF;
| ^~~
a.cc:42:9: error: expected primary-expression before 'for'
42 | for(int i=1;i<=N;i++)
| ^~~
a.cc:4... |
s935796354 | p03866 | C++ | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
using namespace std;
const int MAXN = 1000 + 10;
#define y1 __y1
#define y2 __y2
struct barrier
{
int x, y, r;
};
int N;
int x1, x2, y1, y2;
vector <barrier> vbar;... | a.cc:13:12: error: 'int __y1' redeclared as different kind of entity
13 | #define y1 __y1
| ^~~~
a.cc:22:13: note: in expansion of macro 'y1'
22 | int x1, x2, y1, y2;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/... |
s777252818 | p03866 | C++ | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
using namespace std;
const int MAXN = 1000 + 10;
struct barrier
{
int x, y, r;
};
int N;
int x1, x2, y1, y2;
vector <barrier> vbar;
double dist[MAXN];
bool inQueue[... | a.cc:19:13: error: 'int y1' redeclared as different kind of entity
19 | int x1, x2, y1, y2;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/c++con... |
s858308092 | p03866 | C++ | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
using namespace std;
const int MAXN = 1000 + 10;
struct barrier
{
int x, y, r;
};
int N;
int x1, x2, y1, y2;
vector <barrier> vbar;
double dist[MAXN];
bool inQueue[... | a.cc:19:13: error: 'int y1' redeclared as different kind of entity
19 | int x1, x2, y1, y2;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/c++con... |
s683226753 | p03866 | C++ | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
using namespace std;
const int MAXN = 1000 + 10;
struct barrier
{
int x, y, r;
};
int N;
int x1, x2, y1, y2;
vector <barrier> vbar;
double dist[MAXN];
bool inQueue[MAXN];
double ge... | a.cc:18:13: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
18 | int x1, x2, y1, y2;
| ^~
a.cc: In function 'double getDist(int, int)':
a.cc:27:16: error: 'sqrt' was not declared in this scope
27 | return max(sqrt(deltaX * deltaX + deltaY * deltaY) -... |
s772181722 | p03866 | C++ | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
using namespace std;
const int MAXN = 1000 + 10;
struct barrier
{
int x, y, r;
};
int N;
int x1, x2, y1, y2;
vector <barrier> vbar;
double dist[MAXN];
bool inQueue[MAXN];
double ge... | a.cc:18:13: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
18 | int x1, x2, y1, y2;
| ^~
a.cc: In function 'double getDist(int, int)':
a.cc:27:16: error: 'sqrt' was not declared in this scope
27 | return max(sqrt(deltaX * deltaX + deltaY * deltaY) -... |
s288866195 | p03866 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#define REP(x,y) for(int i=x;i<=y;i++)
using namespace std;
struct point {
double x; double y;
};
double INF = 100000000000000000;
int const MAX = 1005;
point a[MAX];
double radius[MAX];
double g[MAX][MAX];
int color[MAX];
double dist[MAX];
int main() {
cin >>... | a.cc: In function 'int main()':
a.cc:32:59: error: 'sqrt' was not declared in this scope
32 | g[i][j] = g[j][i] = max(double(0),sqrt(dist_x*dist_x + dist_y * dist_y)-radius[i]-radius[j]);
| ^~~~
|
s743788182 | p03866 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long ll;
typedef double D;
typedef pair<D,int> P;
#define M 1000000007
#define F first
#define S second
#define PB push_back
v... | a.cc: In function 'int main()':
a.cc:26:28: error: 'sqrt' was not declared in this scope
26 | g[0].PB(P(max(D(0),sqrt((xs-x[i])*(xs-x[i])+(ys-y[i])*(ys-y[i]))-r[i]),i));
| ^~~~
a.cc:31:32: error: 'sqrt' was not declared in this scope
31 | g[i].PB(P(max(D(0),sqr... |
s226792738 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using P = pair<lint, lint>;
class Dijkstra
{
int V;
double inf;
vector<double> distance;
double eps;
public:
vector<vector<double> > e;
Dijkstra(int V, double inf) : V(V), inf(inf), eps(1E-5)
{
e = vector<vect... | a.cc: In function 'int main()':
a.cc:82:13: error: 'set_' was not declared in this scope
82 | cout << set_ << dij.dijkstra(0, N+1) << endl;
| ^~~~
|
s565447771 | p03866 | C++ | #include "bits/stdc++.h"
#define ll long long
#define rep2(i,a,b) for(int i=(a);i<=(b);++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define pii pair<int,int>
#define ti3 tuple<int,int,int>
ll int MOD=998244353;
double INF=1000000000.0;
using namespace std;
string alphabet("abcdefghijklmnopqrstuvwxyz");
main(){
dou... | a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
13 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:38:37: error: no matching function for call to 'max(double, long double)'
38 | d[i]=min(d[i],d[pos]+max(0.0,sqrt((pow(t[pos][0]-t[i][0],2)
| ... |
s708447487 | p03866 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <algorithm>
#include <string>
using namespace std;
typedef long long ll;
double dis[1002][1002];
double px[1002], py[1002], r[1002];
double cost[1002];
bool used[1002];
double euclid(int i, int j){... | a.cc: In function 'double euclid(int, int)':
a.cc:21:12: error: 'sqrt' was not declared in this scope
21 | return sqrt(square);
| ^~~~
|
s415757105 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2000;
long double x[N], y[N], r[N];
long double a[N][N];
long double dist(long double x1, long double y1, long double x2, long double y2) {
return sqrt(pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0));
}
int main() {
//freopen("input.... | a.cc: In function 'int main()':
a.cc:30:26: error: no matching function for call to 'max(double, long double)'
30 | a[i][j] = max(0.0, dist(x[i], y[i], x[j], y[j]) - r[i] - r[j]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/... |
s434549473 | p03866 | C++ | #include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <vector>
using namespace std;
const int N = 1010;
struct node
{
int x,y,r;
} a[N];
struct edge
{
int v;
double cost;
edge(int x,double b):v(x),cost(b){};
};
int n;
double d[N];
bool vis[N];
vector<edge> G[N];
double cal(int ... | a.cc: In function 'double cal(int, int)':
a.cc:32:26: error: no matching function for call to 'sqrt()'
32 | double ans = sqrt();
| ~~~~^~
In file included from /usr/include/c++/14/math.h:36,
from a.cc:3:
/usr/include/c++/14/cmath:454:5: note: candidate: 'template<c... |
s694418370 | p03866 | C++ | #include<bits/stdc++.h>
using namespace std;
struct node
{
int x,y,r;
}s[1005];
int n;
double map1[1005][1005],double d[1005];
bool vis[1005];
long double cal(node a,node b)
{
return (long double)sqrt((long double)(a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
void dijkstra(int s)
{
d[s]=0;
while(1)
... | a.cc:9:25: error: expected unqualified-id before 'double'
9 | double map1[1005][1005],double d[1005];
| ^~~~~~
a.cc: In function 'void dijkstra(int)':
a.cc:18:5: error: 'd' was not declared in this scope
18 | d[s]=0;
| ^
a.cc: In function 'int main()':
a.cc:57:9: error... |
s335200138 | p03866 | C++ | #include <cstdio>
#include <queue>
#include <functional>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); i++)
typedef pair<double, int> P;
const int N_MAX = 1000;
const int V_MAX = N_MAX + 2;
const double INF = 1e10;
int xs, ys, xt, yt;
int N;
in... | a.cc: In function 'void dijkstra(int)':
a.cc:35:21: error: 'sqrt' was not declared in this scope
35 | double dist = sqrt((x[u] - x[v]) * (x[u] - x[v]) + (y[u] - y[v]) * (y[u] - y[v]));
| ^~~~
|
s202470736 | p03866 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
using namespace std;
#define dump(x) cout << #x << " = " << (x) << endl;
#define YES(n) cout << ((n) ? "YES" : "NO" ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl
#define POSSIBLE(n) cou... | a.cc:147:24: error: 'edges' was not declared in this scope
147 | Dijkstra dijk(move(edges),n,x.size());
| ^~~~~
a.cc:147:31: error: 'n' was not declared in this scope; did you mean 'yn'?
147 | Dijkstra dijk(move(edges),n,x.size());
| ^
|... |
s694070388 | p03866 | C++ | // see https://github.com/LumaKernel/vimfiles/tree/master/snippets/cp-cpp/temp.snip
/// --- .lumrc Template {{{ ///
// #define DEBUG
// #define assert(...)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = tuple<ll, ll>;
using P3 = tup... | a.cc: In function 'ld dis(int, int)':
a.cc:127:13: error: no matching function for call to 'max(long double, double)'
127 | return max(norm(ps[ida] - ps[idb]) - r[ida] - r[idb], .0);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
... |
s152971563 | p03866 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<cstring>
using namespace std;
#define fi(a,b) for(int i=a;i<b;++i)
#define fj(a,b) for(int j=a;j<b;++j)
typedef long long ll;
typedef long double ld;
///////////////////
int const N = 1e3 + 41;
ld const INF = 9e18 + 41;
int n;
ld xa, ya, xb, yb;
ld x[N... | a.cc: In function 'ld getdist(ld, ld, ld, ld)':
a.cc:28:16: error: 'sqrt' was not declared in this scope; did you mean 'sqr'?
28 | return sqrt( sqr(x0 - x1) + sqr(y0 - y1) );
| ^~~~
| sqr
|
s949181300 | p03866 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<cmath>
#include<complex>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define pb push_back
using namespace std;
//const int INF = 1e9;
typedef long long ll;
#define MV 1010
const double EPS = 1e-8;
const ... | a.cc: In function 'void dijkstra(int)':
a.cc:72:3: error: expected primary-expression before '}' token
72 | }
| ^
|
s884970435 | p03866 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<queue>
using namespace std;
struct P {
double x,y,r;
};
using Q = pair<int,double>;
double dist (P& a, P& b) {
return max(hypot(a.x-b.x,a.y-b.y)-a.r-b.r,0.0);
}
int main () {
double xs,ys,xt,yt; cin>>xs>>ys>>xt>>yt;
int n; cin>>... | a.cc: In function 'int main()':
a.cc:39:24: error: 'using Q = struct std::pair<int, double>' {aka 'struct std::pair<int, double>'} has no member named 'SE'
39 | if(dp[id] < qf.SE)continue;
| ^~
|
s478690919 | p03866 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<queue>
using namespace std;
struct P {
double x,y,r;
};
using Q = pair<int,double>;
double dist (P& a, P& b) {
return max(hypot(a.x-b.x,a.y-b.y)-a.r-b.r,0.0);
}
int main () {
double xs,ys,xt,yt; cin>>xs>>ys>>xt>>yt;
int n; cin>>... | a.cc: In function 'int main()':
a.cc:39:21: error: 'pf' was not declared in this scope; did you mean 'qf'?
39 | if(dp[id] < pf.SE)continue;
| ^~
| qf
|
s607383271 | p03866 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define P pair<double,int>
#define PP pair<P,int>
#define fi first
#define se second
#define INF 1e9
#define MOD 1000000007
#define REP(i,n) for(int i=0;i<n;i+... | a.cc: In function 'int main()':
a.cc:65:24: error: unable to find numeric literal operator 'operator""LL'
65 | t.cost=max(0.0LL,sqrt(pow(vec[i].x-vec[j].x,2)+pow(vec[i].y-vec[j].y,2))-vec[i].r-vec[j].r);
| ^~~~~
|
s608609088 | p03866 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define P pair<double,int>
#define PP pair<P,int>
#define fi first
#define se second
#define INF 1e9
#define MOD 1000000007
#define REP(i,n) for(int i=0;i<n;i+... | a.cc: In function 'int main()':
a.cc:65:23: error: no matching function for call to 'max(double, long double)'
65 | t.cost=max(0.0,sqrt(pow(vec[i].x-vec[j].x,2)+pow(vec[i].y-vec[j].y,2))-vec[i].r-vec[j].r);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s402512925 | p03866 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
const ll mod = 1e9 + 7;
const ld INF = 1e9;
const int MAX_N = 1002;
struct edge { int to; ld cost; };
typedef pair<ld, int>P;
i... | In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = dou... |
s348601329 | p03866 | C++ | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
struct s
{
int x, y, r;
};
s f;
s p[(int)1005];
long double dist(s x, s y)
{
// cout << x.x << " " << x.y << " " << x.r << endl ;
// cout << y.x << " " << y.y << " " << y.r << endl ;
long double X = x.x-y.x;
X*=X;
// cout << X << "... | a.cc: In function 'long double dist(s, s)':
a.cc:25:15: error: no matching function for call to 'max(double, long double&)'
25 | return max(0.0,X);
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s469008119 | p03866 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
struct circle {
double x, y, r;
};
double x1, y1, x2, y2;
double dist(double x, double y) {
return ((x1 - x) * (x1 - x)) + ((y1 - y) * (y1 - y));
}
double meh(double a1, double b1, double a2, double b2) {
return sqrt(((a1 - a2) * (a1 - a2))... | a.cc:8:12: error: 'double y1' redeclared as different kind of entity
8 | double x1, y1, x2, y2;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/c+... |
s307475537 | p03866 | C++ | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
//#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f... | a.cc: In function 'long double get_distance(Circle, Point)':
a.cc:414:19: error: no matching function for call to 'max(double, long double)'
414 | return max(0.0, get_distance(c.c, p) - c.r);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
... |
s416844021 | p03866 | C++ | #include<bits\stdc++.h>
using namespace std;
typedef pair<int,int> pii;
typedef pair<double,double > pdd;
typedef pair<int,pii > pipdd;
typedef pair<int,double> pid;
typedef pair<pii,pdd> ppiipdd;
typedef pair<double,int> pdi;
vector<ppiipdd> V;
vector<pid> G[1010];
int N;
double sx,sy,gx,gy;
double D[1010];
int ma... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s409228160 | p03866 | C++ | def calcs(x,y,ax,ay,bx,by) ((ax-x)*(by-y)-(bx-x)*(ay-y))/2.0 end
def inpf() a=gets.chomp.split(" ").map(&:to_f)end
def inps() a=gets.chomp.split(" ")end
def copy(a) Marshal.load(Marshal.dump(a)) end
def kaizyo(n)(n < 2)? 1 : (2..n).inject(:*) end
def scount(a) b=na(a.max+1);a.each{|n|b[n]+=1};return b end
def na(n,d=... | a.cc:5:28: error: too many decimal points in number
5 | def kaizyo(n)(n < 2)? 1 : (2..n).inject(:*) end
| ^~~~
a.cc:23:8: error: too many decimal points in number
23 | tab = (1..n+1).to_a
| ^~~~
a.cc:1:1: error: 'def' does not name a type
1 | def calcs(x,y,ax,ay,... |
s355024354 | p03866 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 100000000
#de... | a.cc: In function 'void dijkstra(int)':
a.cc:42:35: error: expected primary-expression before '.' token
42 | P p=que.top();que/.pop();
| ^
|
s930789098 | p03866 | C++ | struct edge{
int to;
double cost;
edge(int _to, double _cost) :to(_to), cost(_cost){}
};
vector<edge> G[1010];
double xs, ys, xt, yt;
int n;
double d[1010];
void dijkstra(){
REP(i, 1010)d[i] = 1e18;
d[0] = 0;
typedef pair<double, int> PD;
priority_queue<PD, vector<PD>, greater<PD>> que;
que.push(pair<double,... | a.cc:7:1: error: 'vector' does not name a type
7 | vector<edge> G[1010];
| ^~~~~~
a.cc: In function 'void dijkstra()':
a.cc:13:13: error: 'i' was not declared in this scope
13 | REP(i, 1010)d[i] = 1e18;
| ^
a.cc:13:9: error: 'REP' was not declared in this scope
13 | REP... |
s399004999 | p03866 | C++ | #include<bits/stdc++.h>
#define EPS (1e-10)
#define INF (double)(0x3f3f3f3f)
#define equals(a,b)(fabs((a)-(b))<EPS)
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef pair<double, int>P;
struct Point {
double x, y;
Point(double x = 0, double y = 0) :x(x), y(y) {}
Point operator+(Point p) { return Poi... | a.cc: In function 'double getDistance(Circle, Circle)':
a.cc:44:19: error: no matching function for call to 'max(long double, double)'
44 | return max(0.0L, getDistance(c1.c, c2.c) - c1.r - c2.r);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/1... |
s479777025 | p03866 | C++ | #include <iostream>
#include <cmath>
#include <cstdio>
#include <queue>
#include <utility>
#define INF 1000000005
#define MP make_pair
using namespace std;
long long int x[1005],y[1005],r[1005],n,dis[1005],edge[1005][1005];
bool use[1005];
pair<double,int> P;
priority_queue<pair<double,int>>Q;
double cal(double a,do... | a.cc: In function 'int main()':
a.cc:34:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
34 | for(int i=0;i<n+2:i++){
| ^
a.cc:34:22: error: expected ';' before ':' token
34 | for(int i=0;i<n+2:i++){
|... |
s153883798 | p03866 | C++ | #include<bits/stdc++.h>
using namespace std;
#define MAX_N 1111
#define pb push_back
#define fi first
#define sc second
typedef pair<ouble,int> P;
int N;
double Xs,Ys,Xt,Yt;
double X[MAX_N],Y[MAX_N],R[MAX_N];
double cost[MAX_N][MAX_N];
double s[MAX_N];
double dis(int i,int j);
int main()
{
cout.precision(22);cin.preci... | a.cc:7:14: error: 'ouble' was not declared in this scope; did you mean 'double'?
7 | typedef pair<ouble,int> P;
| ^~~~~
| double
a.cc:7:23: error: template argument 1 is invalid
7 | typedef pair<ouble,int> P;
| ^
a.cc: In function 'int main()':
a... |
s410862910 | p03866 | C++ | #include <iostream>
#include <cmath>
#include <cstdio>
#include <queue>
#include <pair>
#define INF 1000000005
#define MP make_pair
using namespace std;
long long int x[1005],y[1005],r[1005],n,dis[1005],edge[1005][1005];
bool use[1005];
pair<double,int> P;
priority_queue<pair<double,int>>Q;
double cal(double a,doubl... | a.cc:5:10: fatal error: pair: No such file or directory
5 | #include <pair>
| ^~~~~~
compilation terminated.
|
s834338037 | p03866 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<cmath>
#include<queue>
#include<set>
using namespace std;
const int MAX_V=1010;//頂点数の最大値
const double INF=999999999999.9;
double cost[MAX_V][MAX_V];//cost[u][v]は辺e=(u,v)のコスト、辺が無い場合はINF
double d[MAX_V];//頂点sからの最小距離
bool used... | a.cc: In function 'int main()':
a.cc:55:10: error: invalid types 'int[int]' for array subscript
55 | x[i]=1.0*x; y[i]=1.0*y; r[i]=1.0*r;
| ^
a.cc:55:22: error: invalid types 'int[int]' for array subscript
55 | x[i]=1.0*x; y[i]=1.0*y; r[i]=1.0*r;
| ^
a.cc:5... |
s896571172 | p03866 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <algorithm>
#include <sstream>
#include <tuple>
#include <queue>
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
using namespace std;
typedef unsigned long long ull;
typedef long ... | a.cc: In function 'int main()':
a.cc:71:21: error: request for member 'push_back' in '(& path)->std::vector<double>::operator[](((std::vector<double>::size_type)j))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'}
71 | path[j].push_back(d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.