submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s917802239 | p00914 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#include <iomanip>
#include <list>
#include <bitset>
#include <numeric>
using names... | a.cc: In function 'int main()':
a.cc:49:41: error: '__popcnt' was not declared in this scope
49 | rep(i, (1 << n) + 1)if (__popcnt(i) == k){
| ^~~~~~~~
|
s039820960 | p00914 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#include <iomanip>
#include <list>
#include <bitset>
#include <numeric>
using names... | a.cc: In function 'int main()':
a.cc:49:41: error: '__popcnt' was not declared in this scope
49 | rep(i, (1 << n) + 1)if (__popcnt(i) == k){
| ^~~~~~~~
|
s407892946 | p00914 | C++ | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
#define ll long long
#define ull unsigned ll
typedef long double ld;
#define ALL(a) (a).begin(),(a).end()
#define ifnot(a) if(not a)
#define dump(x) cerr << #x << " = ... | a.cc:46:1: error: 'a' does not name a type
46 | a
| ^
|
s537828029 | p00914 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main()
{
while (true) {
int n, k, s;
cin >> n >> k >> s;
if (n == 0 && k == 0 && s == 0) {
break;
}
int count = 0;
// k個選ぶ
std::string bitMask(k, 1);
// n個の中から
bitMas... | a.cc: In function 'int main()':
a.cc:33:23: error: 'prev_permutation' is not a member of 'std'; did you mean 'is_permutation'?
33 | } while (std::prev_permutation(bitMask.begin(), bitMask.end()));
| ^~~~~~~~~~~~~~~~
| is_permutation
|
s551715405 | p00914 | C++ | #include <numeric>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n,k,s,i,c,res;
while(1){
scanf("%d",&n);
scanf("%d",&k);
scanf("%d",&s);
if(!n && !k && !s){break;}
vector<int> t(n,0);
vector<int> cd(n);
iota(cd.begin(),cd.en... | a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf' was not declared in this scope
9 | scanf("%d",&n);
| ^~~~~
a.cc:23:9: error: 'printf' was not declared in this scope
23 | printf("%d\n",res);
| ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; thi... |
s513539943 | p00914 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n);
using namespace std;
int dp[21][11][160];
int dfs(int n, int k, int s){
if(k == 0) return s == 0;
int &res = dp[n][k][s];
if(res >= 0) return res;
re... | a.cc: In function 'int main()':
a.cc:28:9: error: 'memset' was not declared in this scope
28 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <c... |
s447394190 | p00915 | Java | import java.io.*;
import java.math.*;
import java.util.*;
import com.sun.media.sound.DirectAudioDeviceProvider;
import com.sun.org.apache.xml.internal.serializer.ElemDesc;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
while (cin.hasNextInt()) {
int n = cin... | Main.java:5: error: package com.sun.media.sound is not visible
import com.sun.media.sound.DirectAudioDeviceProvider;
^
(package com.sun.media.sound is declared in module java.desktop, which does not export it)
Main.java:6: error: package com.sun.org.apache.xml.internal.serializer is not visible
im... |
s570599714 | p00915 | C++ | #include<bits/stdc++.h>
using namespace std;char T,l,a,b,x[999],d[999],M,N,y[999],z[999],i,j;main(){while(1){M=0;memset(y,0,999);cin>>b>>l;if(!l){break;}for(i=1;i<=b;i++){cin>>T>>x[i];if(T=='L'){d[i]=0;M=max(M,x[i]);}else{d[i]=1;M=max(M,l-x[i]);}}N=0;for(i=1;i<M+2;i++){memset(z,0,sizeof(z));for(j=b;j>0;j--) {if(!y[j]) ... | a.cc:2:70: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std;char T,l,a,b,x[999],d[999],M,N,y[999],z[999],i,j;main(){while(1){M=0;memset(y,0,999);cin>>b>>l;if(!l){break;}for(i=1;i<=b;i++){cin>>T>>x[i];if(T=='L'){d[i]=0;M=max(M,x[i]);}else{d[i]=1;M=max(M,l-x[i]);}}N=... |
s973969153 | p00915 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n,l;
char d[100];
int x[100];
while(cin>>n>>l,n|l){
int count=0;
int leave,t=0;
rep(i,n)cin>>d[i]>>x[i];
while(count<n){
for(int i=0;i<n;i++){
if(x[i]==-1)continue;
if(d[i]=='L')x[i]--;
else x[i]++;
}
for(int ... | a.cc: In function 'int main()':
a.cc:13:21: error: 'i' was not declared in this scope
13 | rep(i,n)cin>>d[i]>>x[i];
| ^
a.cc:13:17: error: 'rep' was not declared in this scope
13 | rep(i,n)cin>>d[i]>>x[i];
| ^~~
|
s430967413 | p00915 | C++ | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
typedef pair<int,int> PII;
typedef long long LL;
#define CLR(a,b) memset(a,b,sizeof(a))
#define MP make_pair
#define FI first
#define SE second
const int N = 1000;
PII a[2][N][2];
bool in[N... | a.cc:21:11: error: 'int time [2]' redeclared as different kind of entity
21 | int time[2];
| ^
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-linux-gnu/c++/14/bits/gthr.h:157... |
s098954027 | p00916 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <map>
#include <climits>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define RREP(i,n) for(int i=(int)n-1; i>=0; i--)
#def... | a.cc:27:13: error: '::main' must return 'int'
27 | #define int ll
| ^~
a.cc:46:1: note: in expansion of macro 'int'
46 | int main(void){
| ^~~
|
s753276754 | p00916 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <cstdio>
using namespace std;
int field[200][200];
int dx[] = { 0, 1, 0,-1};
int dy[] = {-1, 0, 1, 0};
void dfs(int y, int x, int label) {
if (x < 0 || x >= 200 || y < 0 || y >= 200) return;
if (field[y][x] != -1) return;
field[y][x] = label;
... | a.cc: In function 'int main()':
a.cc:44:9: error: 'sort' was not declared in this scope; did you mean 'short'?
44 | sort(vx.begin(), vx.end());
| ^~~~
| short
|
s368312890 | p00916 | C++ | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
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/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s408276401 | p00916 | C++ | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
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/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s738384182 | p00916 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <stack>
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define MP make_pair
using namespace std;
typedef pair<int, int> P;
int l[55], t[55], r[55], b[55];
int x[... | a.cc: In function 'int main()':
a.cc:45:17: error: 'memset' was not declared in this scope
45 | memset(field, 0, sizeof(field));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <stack>
... |
s937616289 | p00916 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(a) (a).begin(),(a).end()
#define clr clear()
#define pb push_back
#define sz size()
#define INIT(a) memset(a,0,sizeof(a))
using namespace std;
typedef vector<int> vi;
typedef long long ll;
int n;
vi x,y;
int ... | a.cc: In function 'int main()':
a.cc:9:17: error: 'memset' was not declared in this scope
9 | #define INIT(a) memset(a,0,sizeof(a))
| ^~~~~~
a.cc:45:5: note: in expansion of macro 'INIT'
45 | INIT(rec);
| ^~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is ... |
s462548911 | p00917 | Java | public class GetClockHandsAngle {
private static final double MIN_PER_HOUR = 60;
private static final double FULL_DEGREE = 360;
private static final double DEGREE_PER_HOUR = FULL_DEGREE / 12;
private static final double DEGREE_PER_MINITE_HAND = FULL_DEGREE / 60;
private static final double DEGREE_P... | Main.java:1: error: class GetClockHandsAngle is public, should be declared in a file named GetClockHandsAngle.java
public class GetClockHandsAngle {
^
1 error
|
s739109892 | p00917 | Java | private static final double MIN_PER_HOUR = 60;
private static final double FULL_DEGREE = 360;
private static final double DEGREE_PER_HOUR = FULL_DEGREE / 12;
private static final double DEGREE_PER_MINITE_HAND = FULL_DEGREE / 60;
private static final double DEGREE_PER_MINITE = DEGREE_PER_HOUR / MIN_PER_H... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
private static final double MIN_PER_HOUR = 60;
^
(use --enable-preview to enable unnamed classes)
1 error
|
s932310711 | p00917 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
long long int gcd(long long int l, long long int r) {
assert(l > 0 && r > 0);
if (l > r)return gcd(r, l);
else {
con... | a.cc: In function 'int main()':
a.cc:165:42: error: no match for 'operator>=' (operand types are 'Fruction' and 'int')
165 | if (nans >= 0) {
| ~~~~ ^~ ~
| | |
| ... |
s088224833 | p00917 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
long long int gcd(long long int l, long long int r) {
assert(l > 0 && r > 0);
if (l > r)return gcd(r, l);
else {
con... | a.cc:123:6: error: redefinition of 'bool operator<(const Fruction&, const Fruction&)'
123 | bool operator<(const Fruction&l, const Fruction&r) {
| ^~~~~~~~
a.cc:120:6: note: 'bool operator<(const Fruction&, const Fruction&)' previously defined here
120 | bool operator<(const Fruction&l, const Fruction&r)... |
s061450330 | p00918 | C | #include <array>
#include <cstdio>
#include <queue>
#include <tuple>
#include <unordered_map>
#include <vector>
#define repeat(i, n) for (int i = 0; (i) < int(n); ++(i))
#define repeat_reverse(i, n) for (int i = (n)-1; (i) >= 0; --(i))
using namespace std;
const int dy[] = { -1, 1, 0, 0 };
const int dx[] = { 0, 0, 1, -... | main.c:1:10: fatal error: array: No such file or directory
1 | #include <array>
| ^~~~~~~
compilation terminated.
|
s620568106 | p00918 | C++ | #include <cstdio>
#include <cstring>
#include <queue>
#include <iostream>
using namespace std;
#define N 9
#define INF 0x3fffffff
#define MOD 1000003LL
long long start, end, input[N], states[MOD];
const int step[4] = {1, -1, 3, -3};
int costs[2], mincost[MOD];
bool inque[MOD];
inline long long encode(long long nums[... | a.cc: In function 'int solve()':
a.cc:62:20: error: reference to 'end' is ambiguous
62 | if(cost >= val(end)) continue;
| ^~~
In file included from /usr/include/c++/14/deque:68,
from /usr/include/c++/14/queue:62,
from a.cc:3:
/usr/include/c++/14/bits/ran... |
s817796675 | p00918 | C++ | //Name: Dragon's Cruller
//Level: 3
//Category: 最短経路,探索
//Note:
/**
* 状態は高々9!通りしかないので、数の並び方を適当にエンコードして状態として使い、ダイクストラで最短経路を求めればよい。
*
* オーダーは O(V log V)。
* ただしVは状態数の総数で、V=9!。
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <queue>
#include <cassert>
using namespace s... | a.cc:23:14: error: aggregate 'std::array<int, 9> field' has incomplete type and cannot be defined
23 | array<int,9> field, goal;
| ^~~~~
a.cc:18:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'
17 | #include <cassert>
+++ |+#include <... |
s250757773 | p00918 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <map>
#include <functional>
#include <queue>
#include <vector>
#define INF 1e9
typedef long long ll;
using namespace std;
map<ll,int> index;
typedef pair<int,int> P;
int dp[500000];
int fie[500000][9];
int wx[500000];
int next[4]={-3,... | a.cc:13:13: error: 'std::map<long long int, int> index' redeclared as different kind of entity
13 | map<ll,int> index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:2:
/usr/include/strings.h:50:20: note: pre... |
s034047617 | p00918 | C++ | #include <map>
#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int a, b; vector<int> r1, r2;
int solve() {
if (r1 == r2) return 0;
map<vector<int>, bool> d; d[r1] = true;
priority_queue<pair<int, vector<int> > > que; que.push(make_pair(0, r1));
int w = 0;
while (tru... | a.cc: In function 'int solve()':
a.cc:17:21: error: 'u' was not declared in this scope
17 | if (u == r2) return cost + a;
| ^
|
s964165515 | p00918 | C++ | #include <map>
#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int a, b; vector<int> r1, r2;
int solve() {
if (r1 == r2) return 0;
map<int, bool> d; d[r1] = true;
priority_queue<pair<int, vector<int> > > que; que.push(make_pair(0, r1));
int w = 0;
while (true) {
p... | a.cc: In function 'int solve()':
a.cc:10:28: error: no match for 'operator[]' (operand types are 'std::map<int, bool>' and 'std::vector<int>')
10 | map<int, bool> d; d[r1] = true;
| ^
In file included from /usr/include/c++/14/map:63,
from a.cc:1:
/usr/include... |
s289912559 | p00918 | C++ | #include <map>
#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int a, b; vector<int> r1, r2;
int solve() {
if (r1 == r2) return 0;
int zzz = 0;
for (int i = 0; i < 9; i++) zzz = zzz * 9 + r1[i];
map<int, bool> d; d[convert(r1)] = true;
priority_queue<pair<int, vecto... | a.cc: In function 'int solve()':
a.cc:12:29: error: 'convert' was not declared in this scope; did you mean 'const'?
12 | map<int, bool> d; d[convert(r1)] = true;
| ^~~~~~~
| const
|
s490299733 | p00919 | 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;
ld getdis(vector<ld>&l, vector<ld>&r) {
ld sum = 0;
for (int i = 0; i < 3; ++i) {
sum += (l[i] - r[i])*(l[i] - r[i]);
}
return sqrt(sum);
}
st... | a.cc: In constructor 'kdtree<T, Dim>::kdtree(const T&)':
a.cc:50:30: error: class 'kdtree<T, Dim>' does not have any field named 'val'
50 | kdtree(const T &p_) :val(p_), ltree(nullptr), rtree(nullptr) {
| ^~~
a.cc: In member function 'std::vector<_Tp> kdtree<T, Dim>::query(... |
s356131219 | p00919 | 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;
ld getdis(vector<ld>&l, vector<ld>&r) {
ld sum = 0;
for (int i = 0; i < 3; ++i) {
sum += (l[i] - r[i])*(l[i] - r[i]);
}
return sqrt(sum);
}
st... | a.cc: In constructor 'kdtree<T, Dim>::kdtree(const T&)':
a.cc:50:30: error: class 'kdtree<T, Dim>' does not have any field named 'val'
50 | kdtree(const T &p_) :val(p_), ltree(nullptr), rtree(nullptr) {
| ^~~
|
s340039280 | p00919 | C++ | #include "bits/stdc++.h"
using namespace std;
using ld =long double;
const ld eps = 1e-15;
ld getdis(vector<ld>&l, vector<ld>&r) {
ld sum = 0;
for (int i = 0; i < 3; ++i) {
sum += (l[i] - r[i])*(l[i] - r[i]);
}
return sqrt(sum);
}
struct po {
int index;
vector<ld> coors;
po(int _d):coors(_d) {
index = -1;
... | a.cc: In instantiation of 'kdtree<T, Dim>::kdtree(std::vector<_Tp>&, const int&, const int&, int) [with T = po; int Dim = 3]':
a.cc:164:10: required from 'kdtree<T>* make_kdtree(std::vector<_Tp>&, const int&, const int&, const int&) [with T = po]'
164 | return new kdtree<T>(ps_, l, r, depth);
... |
s567238362 | p00919 | C++ | #include "bits/stdc++.h"
using namespace std;
using ld =long double;
const ld eps = 1e-15;
ld getdis(vector<ld>&l, vector<ld>&r) {
ld sum = 0;
for (int i = 0; i < 3; ++i) {
sum += (l[i] - r[i])*(l[i] - r[i]);
}
return sqrt(sum);
}
struct po {
int index;
vector<ld> coors;
po(int _d):coors(_d) {
index = -1;
... | a.cc: In instantiation of 'kdtree<T, Dim>::kdtree(std::vector<_Tp>&, const int&, const int&, int) [with T = po; int Dim = 3]':
a.cc:164:10: required from 'kdtree<T>* make_kdtree(std::vector<_Tp>&, const int&, const int&, const int&) [with T = po]'
164 | return new kdtree<T>(ps_, l, r, depth);
... |
s363983391 | p00919 | C++ | #include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <array>
#include <map>
#include <algorithm>
#include <utility>
using namespace std;
typedef pair<int,int> pii;
typedef array<int,3> ai3;
const double EPS = 1e-8;
vector<ai3> pts;
bool lessthan(int a, int b){
return pts[a] < pts[b];
}
... | a.cc:16:1: error: 'vector' does not name a type
16 | vector<ai3> pts;
| ^~~~~~
a.cc: In function 'bool lessthan(int, int)':
a.cc:19:16: error: 'pts' was not declared in this scope; did you mean 'puts'?
19 | return pts[a] < pts[b];
| ^~~
| puts
a.cc: In funct... |
s975458081 | p00921 | C++ | #include<bits/stdc++.h>
using namespace std;
#define double long double
const double EPS = 1e-20, PI = acos(-1);
inline bool eq(double a, double b) { return abs(b - a) < EPS; }
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
enum
{
OUT, ON, IN
};
nam... | a.cc: In lambda function:
a.cc:360:13: error: inconsistent types 'long double' and 'double' deduced for lambda return type
360 | return (0.0);
| ~^~~~
|
s000594879 | p00921 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long double
const double EPS = 1e-20, PI = acos(-1);
inline bool eq(double a, double b) { return abs(b - a) < EPS; }
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
enum
{
OUT, ON, IN
};
namesp... | a.cc: In function 'long double Geometory::Contains(const Polygon&, const Point&)':
a.cc:11:27: error: invalid operands of types 'long double' and 'std::vector<Geometory::Point>::size_type' {aka 'long unsigned int'} to binary 'operator%'
11 | #define next(P, i) P[(i+1)%P.size()]
| ~~~~~^
... |
s020970289 | p00921 | C++ | #include<bits/stdc++.h>
using namespace std;
#define double long double
const double EPS = 1e-20, PI = acos(-1);
inline bool eq(double a, double b) { return abs(b - a) < EPS; }
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
enum
{
OUT, ON, IN
};... | a.cc: In lambda function:
a.cc:5:16: error: 'long long' specified with 'double'
5 | #define double long double
| ^~~~
a.cc:360:19: note: in expansion of macro 'double'
360 | return ((long double)0.0);
| ^~~~~~
a.cc:360:13: error: inconsistent types 'long double' an... |
s741429456 | p00921 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
using R = double;
const R EPS = 1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r) {return (r > EPS) - (r < -EPS);}
inline R sq(R x) {return sqrt(max(x, 0.0L));}
// Description: ????????????
// Verify... | a.cc: In function 'R sq(R)':
a.cc:8:34: error: no matching function for call to 'max(R&, long double)'
8 | inline R sq(R x) {return sqrt(max(x, 0.0L));}
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/... |
s489404139 | p00921 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
using R = double;
const R EPS = 1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r) {return (r > EPS) - (r < -EPS);}
inline R sq(R x) {return sqrt(max<R>(x, 0.0L));}
// Description: ????????????
// Ver... | a.cc: In function 'VP cross(C, C)':
a.cc:47:83: error: no match for 'operator*' (operand types are 'long double' and 'P' {aka 'std::complex<double>'})
47 | P d = b.c - a.c, w = (norm(d) + norm(a.r) - norm(b.r)) / (2.0L * norm(d)) * d;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s603566192 | p00921 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
using R = double;
const R EPS = 1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r) {return (r > EPS) - (r < -EPS);}
inline R sq(R x) {return sqrt(max<R>(x, 0.0L));}
// Description: ????????????
// Ver... | a.cc: In function 'VP cross(C, C)':
a.cc:47:83: error: no match for 'operator*' (operand types are 'long double' and 'P' {aka 'std::complex<double>'})
47 | P d = b.c - a.c, w = (norm(d) + norm(a.r) - norm(b.r)) / (2.0L * norm(d)) * d;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s455834621 | p00921 | C++ | #include<iomanip>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<vector>
using namespace std;
const double pi = acos(-1.0),pStep = 20;
const int maxn = 15;
int N; double W,X[maxn],Y[maxn],Z[maxn];
struct Node
{
double x,y;
inline double norm() con... | a.cc: In function 'int main()':
a.cc:108:44: error: expected ';' before '}' token
108 | }javascript:void(0)
| ^
| ;
109 | }
| ~
|
s159537146 | p00921 | C++ | #include <iostream>
#include <vector>
#include <complex>
#include <cstdio>
#include <utility>
using namespace std;
typedef complex<double>P;
typedef pair<P,P>, L;
typedef pair<P,double> C;
L cpcc(C a, C b){
doule d = abs(a.first-b.first), ra = a.second, rb = b.second;
double t = (ra*ra-rb*rb+d*d)/2/d, h = sqsrt(ra... | a.cc:8:18: error: expected unqualified-id before ',' token
8 | typedef pair<P,P>, L;
| ^
a.cc: In function 'L cpcc(C, C)':
a.cc:12:3: error: 'doule' was not declared in this scope; did you mean 'double'?
12 | doule d = abs(a.first-b.first), ra = a.second, rb = b.second;
| ^~~~~
... |
s083313430 | p00921 | C++ | #error ""
#include <iostream>
#include <vector>
#include <complex>
#include <cstdio>
#include <utility>
using namespace std;
typedef complex<double>P;
typedef pair<P,P> L;
typedef pair<P,double> C;
const double EPS = (1e-10);
L cpcc(C a, C b){
double d = abs(a.first-b.first), ra = a.second, rb = b.second;
double t... | a.cc:1:2: error: #error ""
1 | #error ""
| ^~~~~
|
s489506300 | p00921 | C++ | #error ""
#include <iostream>
#include <vector>
#include <complex>
#include <cstdio>
#include <utility>
using namespace std;
typedef complex<double>P;
typedef pair<P,P> L;
typedef pair<P,double> C;
const double EPS = (1e-10);
L cpcc(C a, C b){
double d = abs(a.first-b.first), ra = a.second, rb = b.second;
double t... | a.cc:1:2: error: #error ""
1 | #error ""
| ^~~~~
|
s360842880 | p00921 | C++ | #error ""
#include <iostream>
#include <vector>
#include <complex>
#include <cstdio>
#include <utility>
using namespace std;
typedef complex<double>P;
typedef pair<P,P> L;
typedef pair<P,double> C;
const double EPS = (1e-10);
L cpcc(C a, C b){
double d = abs(a.first-b.first), ra = a.second, rb = b.second;
double ... | a.cc:1:2: error: #error ""
1 | #error ""
| ^~~~~
|
s418444824 | p00921 | C++ | #tsurai
#include <iostream>
#include <vector>
#include <complex>
#include <cstdio>
#include <utility>
using namespace std;
typedef complex<double>P;
typedef pair<P,P> L;
typedef pair<P,double> C;
const double EPS = (1e-10);
L cpcc(C a, C b){
double d = abs(a.first-b.first), ra = a.second, rb = b.second;
double t ... | a.cc:1:2: error: invalid preprocessing directive #tsurai
1 | #tsurai
| ^~~~~~
|
s867922249 | p00922 | Java | import java.io.*;
import java.util.*;
import java.lang.*;
public class HiddenTree{
BufferedReader br;
PrintWriter out;
StringTokenizer st;
boolean eof;
int max(int a,int b){
return Math.max(a,b);
}
String nextToken(){
while(st==null||!st.hasMoreTokens()){
try{
st=new StringTokenizer(br.readLine()... | Main.java:5: error: class HiddenTree is public, should be declared in a file named HiddenTree.java
public class HiddenTree{
^
1 error
|
s612411590 | p00922 | C++ | #include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
const int inf=1e6;
int a[1010];
int N;
vector<int> vals;
int dp[1010][257];
struct edge{
int to,cost;
edge(){}
edge(int a,int b):to(a),cost(b){}
};
//vector<edge> G[1010];
int dp2[1010][1010];
edge G[1010*1010];
int sz[1010];
int c=0;
... | a.cc: In function 'int put(int)':
a.cc:102:10: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
102 | int solve(){
| ^~
a.cc:102:10: note: remove parentheses to default-initialize a variable
102 | int solve(){
| ^~
| --
a.cc:102:10... |
s425282412 | p00922 | C++ | #include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
const int inf=1e6;
int a[1010];
int N;
vector<int> vals;
int dp[1010][257];
struct edge{
int to,cost;
edge(){}
edge(int a,int b):to(a),cost(b){}
};
//vector<edge> G[1010];
int dp2[1010][1010];
edge G[1010*1010];
int sz[1010];
int c=0;
... | a.cc: In function 'int put(int)':
a.cc:70:21: error: redeclaration of 'int prev'
70 | int prev=-1;
| ^~~~
a.cc:47:21: note: 'int prev' previously declared here
47 | int prev=-1;
| ^~~~
|
s650546862 | p00922 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
int b[1100];
int dp[510][1010];
int next[1010];
int main(){
int a;
while(scanf("%d",&a),a){
for(int i=0;i<a;i++)scanf("%d",b+i);
int ret=1;
for(int i=0;i<510;i++)for(int j=0;j<=a;j++)
dp[i][j]=0;
for(int i=0;i<a;i++)dp[b[i]][i]=1;
for(int i=0;i<a... | a.cc: In function 'int main()':
a.cc:16:25: error: reference to 'next' is ambiguous
16 | next[i]=-1;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/us... |
s350950034 | p00922 | C++ | def power_of_2?(n)
(n & (n - 1)) == 0
end
def max_divisor(n)
(~n & (n - 1)) + 1
end
def g(sequence)
table = Hash.new(0)
table[0] = 0
sequence.each do |x|
table.to_a.each do |a, count|
table[a+x] = [table[a]+1, table[a+x]].max if a % x == 0
end
end
table.select{|a, count| power_of_2? a}.map... | a.cc:1:1: error: 'def' does not name a type
1 | def power_of_2?(n)
| ^~~
a.cc:17:41: error: expected unqualified-id before '.' token
17 | table.select{|a, count| power_of_2? a}.map{|a, count| count}.max
| ^
a.cc:17:63: error: expected unqualified-id before '.... |
s125784824 | p00922 | C++ | #include <iostream>
#include <vector>
typedef std::vector<int> vec;
int power_of_2(int n) {
return (n & (n - 1)) == 0;
}
int max_divisor(int n) {
return (~n & (n - 1)) + 1;
}
int g(const vec& sequence) {
int sum = 0;
for (int i = 0; i < sequence.size(); i++) {
sum += sequence[i];
}
... | a.cc: In function 'int f(const vec&)':
a.cc:73:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
73 | std::sort(numbers.begin(), numbers.end());
| ^~~~
| qsort
a.cc:74:24: error: 'unique' is not a member of 'std'
74 | numbers.erase(std::unique(numbers.begin(),... |
s235357643 | p00922 | C++ | #include <algorithm>
#include <iostream>
#include <limits>
#include <vector>
typedef std::vector<int> vec;
int power_of_2(int n) {
return (n & (n - 1)) == 0;
}
int max_divisor(int n) {
return (~n & (n - 1)) + 1;
}
int g(const vec& sequence) {
int sum = 0;
for (int i = 0; i < sequence.size(); i++) {
... | a.cc: In function 'vec extract(const vec&, int)':
a.cc:51:15: error: 'INT_MAX' was not declared in this scope
51 | int min = INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <vector>
+++ |... |
s020783448 | p00922 | C++ | #include <iostream>
#include <set>
#include <cstring>
using namespace std;
#define MAXN 1024
#define MAXV 512
#define MAXW 20
short int dp[MAXW][MAXN][MAXN], weight[512];
int _dp(int w, int a, int b) {
if (a == b) dp[w][a][b] = 0;
else if (dp[w][a][b] == -1) {
// cout << "considerando w = " << w << ";... | a.cc: In function 'int _dp(int, int, int)':
a.cc:17:97: error: no matching function for call to 'max(short int&, int)'
17 | if (w) for (int i=a+1; i<b; i++) if (_dp(w-1, a, i) && _dp(w-1, i, b)) dp[w][a][b] = max(dp[w][a][b], _dp(w-1, a, i)+_dp(w-1, i, b));
| ... |
s769792293 | p00924 | C++ | #include<map>
#include<queue>
#include<cmath>
#include<cassert>
#include<vector>
#include<iostream>
using namespace std;
vector<int> bits;
vector<int> after;
void print(vector<int> v){
for(auto i:v){
//cerr<<i<<" ";
}//cerr<<endl;
}
void init(){
bits.clear();
after.clear();
}
bool input(){
int n,m;
... | a.cc: In function 'int make_ans(std::vector<int>, std::vector<int>, std::vector<int>)':
a.cc:58:10: error: 'INT_MAX' was not declared in this scope
58 | return INT_MAX;
| ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
6... |
s806599976 | p00924 | C++ | #include<map>
#include<queue>
#include<cmath>
#include<cassert>
#include<vector>
#include<iostream>
using namespace std;
vector<int> bits;
vector<int> after;
void print(vector<int> v){
for(auto i:v){
//cerr<<i<<" ";
}//cerr<<endl;
}
void init(){
bits.clear();
after.clear();
}
bool input(){
int n,m;
... | a.cc: In function 'int make_ans(std::vector<int>, std::vector<int>, std::vector<int>)':
a.cc:58:10: error: 'INT_MAX' was not declared in this scope
58 | return INT_MAX;
| ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
6... |
s985972948 | p00924 | C++ | testing | a.cc:1:1: error: 'testing' does not name a type
1 | testing
| ^~~~~~~
|
s883387750 | p00925 | Java | // AOJ 1346 "Miscalculation" (ICPCアジア地区予選 2014 東京大会 Problem B)
import java.util.Scanner;
public class Main {
static int pos = 0; // 四則演算の構文解析における現在位置
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int ansOfBob = sc.nextInt();... | Main.java:13: error: cannot find symbol
it ansLeftToRight = evalLeftToRight(s);
^
symbol: class it
location: class Main
1 error
|
s169438876 | p00925 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s942111028 | p00925 | C | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <queue>
#include <vector>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#define mem(a) memset(a,0,sizeof(a))
using namespace std;
char str[30];
int ans;
int M,L;
int main()
{
//freopen("in.tx... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s867072293 | p00925 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cassert>
#include <stdio.h>
using namespace std;
string s;
long long ans;
int cur;
long long suu(){
string num = "";
while(cur < s.size() && '0' <= s[cur] && s[cur] <= '9' ){
fflush(stdout);
num += s[cur];
cur++;
}
return stoll(num);
}
long l... | a.cc: In function 'long long int siki()':
a.cc:32:22: error: expected ';' before '}' token
32 | res += siki()
| ^
| ;
33 |
34 | }
| ~
|
s607669037 | p00925 | C++ | Last login: Wed Nov 5 19:00:32 on ttys001
Darsein-MBP:B Darsein$ emacs b.cpp &
[1] 15778
Darsein-MBP:B Darsein$ gpp b
Darsein-MBP:B Darsein$ ./b < in1
I
Darsein-MBP:B Darsein$ ./b < in2
I
Darsein-MBP:B Darsein$ ./b < in3
I
Darsein-MBP:B Darsein$ ./b < in4
I
Darsein-MBP:B Darsein$ gpp b
Darsein-MBP:B Darsein$ ./b < in1... | a.cc:28:20: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
28 | b.cpp: In function 'int main()':
| ^~~~~~~~~~~~
a.cc:40:20: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
40 | b.cpp: In function 'int main()':
| ... |
s290891588 | p00925 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;
#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FO... | a.cc: In function 'long long int calc1(std::string)':
a.cc:49:34: error: no matching function for call to 'std::__cxx11::basic_string<char>::erase(std::string&, int)'
49 | str.erase(str,(int)log10((double)tmp)+1);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In fil... |
s414394210 | p00925 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string str;
int n;
cin >> str >> n;
char x = 'x';
int f = 0, s = 0;
int num[10];
bool used[10];
rep(i,10) used[i] = false;
char ope[10];
for(int i = 0; i < str.size(); i++){
if(i%2 == 0){
num[i/2] = str[i]-'0';
} else{
ope[i/2] = str[i];
}... | a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
12 | rep(i,10) used[i] = false;
| ^
a.cc:12:9: error: 'rep' was not declared in this scope
12 | rep(i,10) used[i] = false;
| ^~~
|
s171432022 | p00925 | C++ | #include "stdafx.h"
#include<iostream>
#include<string>
#include<vector>
using namespace std;
bool isM(int n,string s)
{
vector<bool> used(s.length());
for (int i = 0; i < s.length(); i++)
{
used[i] = false;
}
bool flag = false;
int sum = 0;
for (int i = 1; i < s.length(); i+= 2)
{
if (s[i] == '*')
{
... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s699075244 | p00926 | Java |
import java.io.*;
import java.util.*;
public class Q3 {
FastScanner in = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
public void run() {
int n = in.nextInt(), m = in.nextInt();
int[] array = new int[n+1];
for (int i = 0; i < m; i++) {
int c = in.nextInt(), d = in.nextInt... | Main.java:5: error: class Q3 is public, should be declared in a file named Q3.java
public class Q3 {
^
1 error
|
s205441590 | p00926 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<cmath>
#include<functional>
#include<algorithm>
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
struct Range{
int s,e;
Range(){}
Range(int s... | a.cc: In function 'int main()':
a.cc:44:38: error: cannot bind non-const lvalue reference of type 'std::vector<Range>&' to an rvalue of type 'std::vector<Range>'
44 | vector<Range> vr(merge_range(vector<Range>(r,r+m)));
| ^~~~~~~~~~~~~~~~~~~~
a.cc:23:42: note: ini... |
s421654171 | p00927 | C++ | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
typedef long long ll;
ty... | a.cc: In function 'int main()':
a.cc:33:22: error: 'FLT_MAX' was not declared in this scope
33 | double ans = FLT_MAX;
| ^~~~~~~
a.cc:13:1: note: 'FLT_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
12 | #include <stack>
+++ |+#incl... |
s878441289 | p00927 | C++ | #include <cmath>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
constexpr int MAX_N = 10;
int dist, n, max_bound;
double p[MAX_N], h[MAX_N];
constexpr double EPS = 1e-8;
// ax^2 + bx + c = 0
vector<double> solve_quadratic_equation(double a, double b, double c) {
if(abs(a) <= EPS) {
... | a.cc: In function 'int main()':
a.cc:83:22: error: 'INT_MAX' was not declared in this scope
83 | double ans = INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <vector>
+++ |+#in... |
s317896656 | p00927 | C++ | #include <bits/stdc++.h>
using namespace std;
struct Info{
int x;
long double h;
};
long double calc(long double tmp_x,long double tmp_distance){
return sqrt(tmp_x*tmp_x + (tmp_distance/(2*tmp_x))*(tmp_distance/(2*tmp_x)));
}
int main(){
double distance;
int N,bounce_limit;
scanf("%lf %d %d",&distance,&N,&bo... | a.cc: In function 'int main()':
a.cc:59:42: error: 'EPS' was not declared in this scope
59 | left = m+EPS;
| ^~~
a.cc:62:43: error: 'EPS' was not declared in this scope
62 | right = m-EPS;
| ... |
s817187430 | p00927 | C++ | #include <bits/stdc++.h>
#define EPS 0.000000001
using namespace std;
struct Info{
int x;
double h;
};
double calc(double tmp_x,double tmp_dist){
return sqrt(tmp_x*tmp_x + (tmp_dist/(2*tmp_x))*(tmp_dist/(2*tmp_x)));
}
int main(){
double dist;
int N,B;
scanf("%lf %d %d",&dist,&N,&B);
Info info[N];
for(... | a.cc: In function 'int main()':
a.cc:28:48: error: redeclaration of 'double tmp_dist'
28 | double left,right,m,tmp_x,max_x,tmp_y,tmp_dist,tmp_h,limit,maximize_x;
| ^~~~~~~~
a.cc:25:17: note: 'double tmp_dist' previously declared here
25 | doubl... |
s888274081 | p00927 | C++ | w#include<bits/stdc++.h>
using namespace std;
#define FOR(i,bg,ed) for(int i=bg;i<ed;i++)
#define REP(i,n) FOR(i,0,n)
template<typename T>
bool chmax(T& l,T r){
bool ret = l<r;
if(l<r)l=r;
return ret;
}
template<typename T>
bool chmin(T& l,T r){
bool ret = l>r;
if(l>r)l=r;
return ret;
}
typed... | a.cc:1:2: error: stray '#' in program
1 | w#include<bits/stdc++.h>
| ^
a.cc:1:1: error: 'w' does not name a type
1 | w#include<bits/stdc++.h>
| ^
a.cc: In function 'D f(D)':
a.cc:62:20: error: 'sqrt' was not declared in this scope
62 | chmax(need,sqrt(vy));
| ^~~... |
s309612534 | p00928 | C++ | #include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
using namespace std;
struct point
{
int x, y, dir, dist;
bool operator<(const point &p) const { return x!=p.x? x < p.x: y < p.y;}
bool operator==(const point &p) const { return x == p.x and y == p.y... | a.cc:18:1: error: 'vector' does not name a type
18 | vector<point> cand, ans;
| ^~~~~~
a.cc: In function 'void simulate(int, int)':
a.cc:22:9: error: 'queue' was not declared in this scope
22 | queue<point> q;
| ^~~~~
a.cc:6:1: note: 'std::queue' is defined in header '<queue>'; this is... |
s833247085 | p00928 | C++ | #include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
using namespace std;
struct point
{
int x, y, dir, dist;
bool operator<(const point &p) const { return x!=p.x? x < p.x: y < p.y;}
bool operator==(const point &p) const { return x == p.x and y == p.y... | a.cc:18:1: error: 'vector' does not name a type
18 | vector<point> cand, ans;
| ^~~~~~
a.cc: In function 'void simulate(int, int)':
a.cc:22:9: error: 'queue' was not declared in this scope
22 | queue<point> q;
| ^~~~~
a.cc:6:1: note: 'std::queue' is defined in header '<queue>'; this is... |
s139223904 | p00928 | C++ | #include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
using namespace std;
struct point
{
int x, y, dir, dist;
bool operator<(const point &p) const { return x!=p.x? x < p.x: y < p.y;}
bool operator==(const point &p) const { return x == p.x and y == p.y... | a.cc:18:1: error: 'vector' does not name a type
18 | vector<point> cand, ans;
| ^~~~~~
a.cc: In function 'void simulate(int, int)':
a.cc:22:9: error: 'queue' was not declared in this scope
22 | queue<point> q;
| ^~~~~
a.cc:6:1: note: 'std::queue' is defined in header '<queue>'; this is... |
s689453494 | p00928 | C++ | #include<cstdio>
#include<vector>
#include<string>
#include<queue>
#include<map>
#include<set>
#include<iostream>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
typedef pair<int,int> pii;
const int N = 55;
const int M = 111;
const int W = 111;
int n,stx,sty,m;
int a... | a.cc: In function 'std::vector<std::pair<int, int> > solve()':
a.cc:154:9: error: 'sort' was not declared in this scope; did you mean 'short'?
154 | sort(ret.begin(),ret.end());
| ^~~~
| short
|
s528647704 | p00928 | C++ | #include <bits/stdc++.h>
using namespace std;
#define fo(i,a,b) for (int i = (a); i < (b); i++)
#define FO(i,a,b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplace_back
#define sz(v) int(v.size())
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
int n, x0, y0, t;
bool rd[5... | a.cc:12:12: error: 'int y0' redeclared as different kind of entity
12 | int n, x0, y0, t;
| ^~
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++config... |
s930181147 | p00929 | Java | #include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
using namespace std;
struct UnionFind {
int *data;
UnionFind(int *_data, int size, bool reset = true) : data(_data) {
if(reset) for(int i = 0; i < size; i++) data[i] = -1;
}
bool unionSet(int x, int y) {
x = find(x); y = find(y);
... | Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<vector>
^
Main.java:3: error: illegal character: '#'
#include<utility>
^
Main.java:4: error: illegal character: '#'
#include<algorithm>
^
Main.java:6: error: class, interface, enum, or record expected
str... |
s591992726 | p00929 | C | #include<stdio.h>
int main(void){
int n,m,i,j,sum=0,a,b,c,sg,lg,min,anssum=0,ansb=0,past=0;
int cost[501][501]={0},flag[501][501]={0},used[501][501]={0},gu[501],con[501];
scanf("%d %d",&n,&m);
i=m;
while(i!=0){
scanf("%d %d %d",&a,&b,&c);
cost[a][b]=c;
flag[a][b]=1;
i--;
}
for(i=1;i<=n;i++){
gu[i]=i;
... | main.c: In function 'main':
main.c:76:47: error: 'nb' undeclared (first use in this function); did you mean 'b'?
76 | for(b=qn+1;b<=nb++){
| ^~
| b
main.c:76:47: note: each undeclar... |
s921814660 | p00929 | C++ | #include <bits/stdc++.h>
 
using namespace std;
 
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
 
typedef vector<int> vi;
typedef vec... | a.cc:2:2: error: stray '#' in program
2 |  
| ^
a.cc:4:2: error: stray '#' in program
4 |  
| ^
a.cc:8:2: error: stray '#' in program
8 |  
| ^
a.cc:14:2: error: stray '#' in program
14 |  
| ^
a.cc:15:14: error: '#' is not followed by a macro parameter
... |
s595635851 | p00929 | C++ | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> vi;
typedef vector<vi> vvi;
typede... | a.cc:14:14: error: '#' is not followed by a macro parameter
14 | #define all(a)  (a).begin(),(a).end()
| ^
a.cc:23:15: error: '#' is not followed by a macro parameter
23 | #define dump(x)  cerr << #x << " = " << (x) << endl;
| ^
|
s752715390 | p00929 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
using std::sort;
using std::vector;
int min(int a, int b){return (a<b)?a:b;}
const int MAXN = 500+10;
const int MAXEDGE = MAXN * MAXN;
struct edge{int u, v, c;}Edge[MAXEDGE];
bool comp(edge a, edge b){return a.c < b.c;}
vector<edge> graph[MAXN];
bool used[MAXE... | a.cc: In function 'int dfs(int, int, int)':
a.cc:35:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
35 | low = min(low, low[to]);
| ^~~
| |
| int*
a.cc:7:13: note: initializing argument 1 of 'int min(i... |
s149896537 | p00929 | C++ | #include <bits/stdc++.h>
using namespace std;
const int maxn = 50010;
struct node
{
int u,v,w;
bool mark,del,use;
node(int x = 0,int y = 0,int z = 0)
{
u = x;
v = y;
w = z;
mark = del = use = false;
}
bool operator < (const node &a,const node &b)
{
return a.w < b.w;
}
}e[maxn];
int uf[510],n,m,cnt;
b... | a.cc:15:14: error: 'bool node::operator<(const node&, const node&)' must have exactly one argument
15 | bool operator < (const node &a,const node &b)
| ^~~~~~~~
a.cc: In function 'int find(int)':
a.cc:27:41: error: 'Find' was not declared in this scope; did you mean 'find'?
27 | ... |
s894907465 | p00929 | C++ | #include <bits/stdc++.h>
#define maxn 50008
#define N 508
#define inf 200000000
#define PII pair<int,int>
using namespace std;
int n,m;
int father[N];
struct edge
{
int from,to,cost;
} edg[maxn];
int v[N];
bool cmp(edge a,edge b)
{return a.cost<b.cost;}
void init()
{
for(int i = 0;i <= n;i ++)
{
fat... | a.cc: In function 'void Union(int, int)':
a.cc:46:17: error: 'fx' was not declared in this scope; did you mean 'x'?
46 | father[fx] = fy;
| ^~
| x
a.cc:46:23: error: 'fy' was not declared in this scope; did you mean 'y'?
46 | father[fx] = fy;
| ... |
s984390512 | p00929 | C++ | a.cc:1:1: error: extended character is not valid in an identifier
1 |
| ^
a.cc:1:1: error: '\U00003000' does not name a type
1 |
| ^~
| |
s109443463 | p00929 | C++ | gd | a.cc:1:1: error: 'gd' does not name a type
1 | gd
| ^~
|
s032816345 | p00929 | C++ | #include<stdio.h>
#include <iostream>
#include <math.h>
#include <numeric>
#include <vector>
#include <map>
#include <functional>
#include <stdio.h>
#include <array>
#include <algorithm>
#include <string>
#include <assert.h>
#include <stdio.h>
#include <queue>
#include<iomanip>
#include<bitset>
#include<stack>
using na... | a.cc: In function 'int main()':
a.cc:226:49: error: request for member 'id' in 'ansid.std::vector<int>::operator[](((std::vector<int>::size_type)l))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
226 | int taiouid = (ansid[l].id % 2) ... |
s997178444 | p00929 | C++ | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);++i)
#define rep(i,n) REP(i, 0, n)
typedef long long int i64;
typedef pair<int, int> pint;
struct UnionFind {
vector<int> data;
UnionFind(int N) : data(N, -1), group(N) {}
void init(in... | a.cc: In constructor 'UnionFind::UnionFind(int)':
a.cc:11:37: error: class 'UnionFind' does not have any field named 'group'
11 | UnionFind(int N) : data(N, -1), group(N) {}
| ^~~~~
a.cc: In member function 'void UnionFind::unite(int, int)':
a.cc:18:15: error: 'group' wa... |
s570017835 | p00929 | C++ |
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi=vector<int>;
using vvi=vector<vi>;
using vs=vector<string>;
using msi=map<string,int>;
using mii=map<int,int>;
using psi=pair<string,int>;
using pii=pair<int,int>;
using vlai=valarray<int>;
#define rep(i,n) for(int i=0;i<n;i++)
#define range(i... | In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterato... |
s494499799 | p00930 | Java | himport java.util.*;
class Main{
int n, m, sz;
char[] kakko;
int[] a, bkt, add;
void solve(){
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
m = sc.nextInt();
kakko = sc.next().toCharArray();
sz = Math.max(1, (int)Math.sqrt(n) + 10);
a = new i... | Main.java:1: error: class, interface, enum, or record expected
himport java.util.*;
^
1 error
|
s503642991 | p00930 | C | #include<iostream>
#include<vector>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
#define MX 300005
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define root 1,n,1
using namespace std;
char W[MX];
int ls[MX << 2], rs[MX << 2], col_L[MX << 2],col_R[MX << 2], A[MX],B[MX];
void push_up(int... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s790763064 | p00930 | C | #include <cstdio>
#include <cctype>
#include <iostream>
#include <cstring>
#include <cmath>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <map>
#include <vector>
#define Inf 0x3f3f3f3f
#define MAXN 300010
#define MAXM 150010
#define LL long long
#define lson l,m,rt<<1
#define rso... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s396699462 | p00930 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,Q;
cin>>n>>Q;
string s;
cin>>s;
int c=0;
int l=0;
set<pair<int,int>> range;
set<int> rp;
for(int i=0;i<n;i++){
if(s[i]=='(') c++;
else c--,rp.insert(i);
if(c==0){
range.insert({l,i+1}... | a.cc: In lambda function:
a.cc:26:9: error: expected primary-expression before '/' token
26 | /s[lhs]=')';
| ^
|
s473445038 | p00930 | C++ | #include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cmath>
//#include<>
using namespace std;
typedef long long ll;
#define rep(i,j) for(i=0;i<j;i++)
#define rep_a_to(a,i,j) for(i=a;i<=j;i++)
#define rev_rep(i,j) for(i=j;i>... | a.cc:16:20: error: '#' is not followed by a macro parameter
16 | #define rev_rep(i,j) for(i=j;i>=0;i—-)
| ^
|
s626951027 | p00930 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#include <climits>
#include <set>
using namespace std;
#define repn(i,s,n) for (int i=int(s); i < int(n); i++)
#define rep(i,n) repn(i,0,n)
#define repd(i,n) for (int i=int(n)-1; i >= 0; i--)
struct Node {
int val; // この区間に足される値
int min; // この区間の最小値(valを含む)... | a.cc: In member function 'void RMQRangeAddSegTree::addRange(int, int, int, int, int, int)':
a.cc:18:18: error: 'aoj2' was not declared in this scope
18 | #define LC(k) (k*aoj2 + 1) // 左の子
| ^~~~
a.cc:44:22: note: in expansion of macro 'LC'
44 | addRange(a, b, LC(k), l, (l + r) / 2, v... |
s095203684 | p00930 | C++ | #ifndef ___Class_BIT
#define ___Class_BIT
// ------ Includes ------ //
#include <vector>
#pragma warning(disable : 4146)
// ------ Class ------ //
template <typename Type>
class BIT {
private:
unsigned size_; std::vector<Type> v;
Type sum(unsigned r) {
Type ret = 0;
while (r > 0) {
ret += v[r];
r -= r & (... | a.cc: In constructor 'StarrySkyTree<Type>::StarrySkyTree()':
a.cc:73:37: error: class 'StarrySkyTree<Type>' does not have any field named 'dat'
73 | StarrySkyTree() : size_(0), dat(std::vector<Type>()) {};
| ^~~
a.cc: In constructor 'StarrySkyTree<Type>::StarrySkyTre... |
s798438231 | p00930 | C++ | #ifndef ___Class_BIT
#define ___Class_BIT
// ------ Includes ------ //
#include <vector>
#pragma warning(disable : 4146)
// ------ Class ------ //
template <typename Type>
class BIT {
private:
unsigned size_; std::vector<Type> v;
Type sum(unsigned r) {
Type ret = 0;
while (r > 0) {
ret += v[r];
r -= r & (... | a.cc: In constructor 'StarrySkyTree<Type>::StarrySkyTree()':
a.cc:73:37: error: class 'StarrySkyTree<Type>' does not have any field named 'dat'
73 | StarrySkyTree() : size_(0), dat(std::vector<Type>()) {};
| ^~~
|
s916655080 | p00930 | C++ | #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;
ll *min_data,*max_data,*add_data;
char buf[300001];
int N = 1;
void init(ll first_N){
while(N < first_N)N *= 2;
}
void add(int left,in... | a.cc: In function 'void add(int, int, ll, int, int, int)':
a.cc:29:49: error: 'a' was not declared in this scope
29 | node_id = (node_id-1)/2;a[2*node_id+2]+add_data[2*node_id+2]);
| ^
|
s409695248 | p00930 | C++ | #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;
ll *min_data,*max_data,*add_data;
char buf[300001];
int N = 1;
void init(ll first_N){
while(N < first_N)N *= 2;
}
void add(int left,in... | a.cc: In function 'void add(int, int, ll, int, int, int)':
a.cc:29:49: error: 'a' was not declared in this scope
29 | node_id = (node_id-1)/2;a[2*node_id+2]+add_data[2*node_id+2]);
| ^
|
s695620136 | p00931 | C++ | #include <cassert>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
constexpr double EPS = 1e-9;
struct point {
double x, y;
explicit point(double x_ = 0.0, double y_ = 0.0):x(x_), y(y_) {}
point(const point &p):x(p.x), y(p.y) {}
point operator+(const po... | a.cc: In function 'double dist(const segment&, const segment&)':
a.cc:158:19: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
158 | return min({dist(s, t.a), dist(s, t.b), dist(t, s.a), dist(t, s.b)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s247047399 | p00931 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
constexpr double EPS = 1e-9;
struct point {
double x, y;
explicit point(double x_ = 0.0, double y_ = 0.0):x(x_), y(y_) {}
point(const point &p):x(p.x), y(p.y) {}
poi... | a.cc: In function 'double dijkstra(int, int, const graph&)':
a.cc:496:32: error: 'INT_MAX' was not declared in this scope
496 | vector<double> dist(n, INT_MAX);
| ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#inclu... |
s064064242 | p00931 | C++ | #include<bits/stdc++.h>
#define EQ(a,b) (abs((a)-(b)) < EPS)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define sz size()
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef long double D;
typedef complex<D> P;
typedef pair<P,P> L;
typedef vector... | a.cc: In function 'std::vector<std::vector<std::pair<long double, int> > > make_graph(std::vector<std::pair<std::complex<long double>, long double> >, std::vector<std::pair<std::complex<long double>, std::complex<long double> > >, P, P, int&, int&)':
a.cc:195:24: error: no match for 'operator/' (operand types are 'std:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.