submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s646208730 | p03866 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define all(v) (v).begin(),(v).end()
#define each(it,v) for(__typeof((v).begin()) it=(v... | a.cc: In function 'int main()':
a.cc:51:17: error: 'i' was not declared in this scope
51 | if(dist[i]<d) continue;
| ^
|
s412983750 | p03866 | Java | /*
* Code Author: Akshay Miterani
* DA-IICT
*/
import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
public class MainA {
static double eps=(double)1e-10;
static long mod=(long)1e9+7;
static final long INF = Long.MAX_VALUE / 100;
publi... | Main.java:11: error: class MainA is public, should be declared in a file named MainA.java
public class MainA {
^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
|
s928147910 | p03866 | C++ | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<vector>
#include<cmath>
#include<queue>
using namespace std;
int main(void){
long double a[1002][1002];
int n;
int x[1002];
int y[1002];
int r[1002];
long double d[1002];
int e[1002];
priority_queue<pair<double, int>> t;
pair<double, int> pai;
long... | a.cc:62:1: error: extended character is not valid in an identifier
62 |
| ^
a.cc:68:1: error: extended character is not valid in an identifier
68 |
| ^
a.cc:74:1: error: extended character is not valid in an identifier
74 |
| ^
a.cc: In function 'int main()':
a.cc:62:1: error: '\U... |
s432524166 | p03866 | C++ | #include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <set>
#include <algorithm>
#include <queue>
#include <math.h>
#include <iomanip>
using namespace std;
double max(double a, double b)
{
if(a<=b)
return b;
else
return a;
}
double dist(pair <int, int> c1, pair ... | a.cc: In function 'int main()':
a.cc:78:47: error: invalid types 'double [1005][double]' for array subscript
78 | if(fabs(q.top().first-distance[temp])<=1e-9)
| ^
a.cc:85:23: error: invalid types 'std::vector<std::pair<int, double> > [1005][double]'... |
s404385439 | p03866 | C++ | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<vector>
#include<cmath>
#include<queue>
using namespace std;
int main(void){
long double a[1002][1002];
int n;
int x[1002];
int y[1002];
int r[1002];
long double d[1002];
int e[1002];
priority_queue<pair<double, int>> t;
pair<double, int> pai;
long... | a.cc:58:1: error: extended character is not valid in an identifier
58 |
| ^
a.cc:81:1: error: extended character is not valid in an identifier
81 |
| ^
a.cc: In function 'int main()':
a.cc:58:1: error: '\U000000a0' was not declared in this scope
58 |
| ^
a.cc:81:1: error: '\U000000a... |
s954396902 | p03866 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define PrintLn(X) cout << X << endl
#define Rep(i, n) for(int i = 0; i < (int)(n); ++i)
double d[1002][1002];
double x[1002];
double y[1002];
double r[1002];
double cost[1002];
int done[1002] = {0};
int... | a.cc: In function 'int main()':
a.cc:34:42: error: 'pow' was not declared in this scope
34 | double dd = sqrt(pow(x[a] - x[b], 2) + pow(y[a] - y[b], 2)) - r[a] - r[b];
| ^~~
a.cc:34:37: error: 'sqrt' was not declared in this scope
34 | ... |
s451151207 | p03866 | C | #include <stdio.h>
#include <math.h>
#define INF 1000000000
typedef struct {
int x;
int y;
int r;
} baria;
double distance (baria a, baria b) {
double result;
result = sqrt(pow((double)a.x - (double)b.x, 2) + pow((double)a.y - (double)b.y, 2));
result -= (a.r + b.r);
if (result < 0) return... | main.c: In function 'main':
main.c:68:67: error: expected ';' before '}' token
68 | dai[j].cost = dai[i].dist[j] + dai[i].cost
| ^
| ;
69 | ... |
s918832742 | p03866 | C++ | #include <cstdio>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <vector>
#include <queue>
using namespace std;
#define INF 1e12
#define maxn 1005
int x[maxn];
int y[maxn];
int r[maxn];
int vis[maxn];
double dis[maxn];
vector<pair<int, double>>G[maxn];
struct point{
int id;
double dis;
point(int... | a.cc: In function 'int main()':
a.cc:45:9: error: 'memset' was not declared in this scope
45 | memset(vis, 0, sizeof(vis));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <queue>
+++ |+#include <cstr... |
s837190218 | p03866 | C++ | #include <iostream>
#include <cmath>
#include <queue>
#include <iomanip>
using namespace std;
typedef pair<double, int> P;
int xs, ys, xt, yt;
int N;
int x[1000], y[1000], r[1000];
struct edge {int to; double cost;};
vector<edge> G[1002];
double d[1002];
void dijkstra(int s){
priority_queue<P, vector<P>, greater<... | a.cc: In function 'void dijkstra(int)':
a.cc:17:20: error: 'DBL_MAX' was not declared in this scope
17 | fill(d, 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 <iomanip>
+++ |... |
s097288100 | p03866 | C++ | ・ソ#include <iostream>
#include <sstream>
#include <string>
#include <cmath>
#include <climits>
#include <cstdio>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <numeric>
#include <iomanip>
using namespace std;
typedef unsigned int ... | a.cc:1:4: error: stray '#' in program
1 | ・ソ#include <iostream>
| ^
a.cc:1:1: error: '\U000030fb\U0000ff7f' does not name a type
1 | ・ソ#include <iostream>
| ^~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/includ... |
s237829669 | p03866 | 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 'long double calcDist(LL, LL, LL, LL, LL, LL)':
a.cc:31:19: error: no matching function for call to 'max(long double, int)'
31 | return max(res - r - r2,0);
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/... |
s462021858 | p03867 | C++ | ll N,K,M;
ll mo=1000000007;
vector<ll> V;
ll dp[2020];
ll modpow(ll a, ll n = mo-2) {
ll r=1;
while(n) r=r*((n%2)?a:1)%mo,a=a*a%mo,n>>=1;
return r;
}
vector<ll> enumdiv(ll n) {
vector<ll> S;
for(ll i=1;i*i<=n;i++) if(n%i==0) {S.push_back(i); if(i*i!=n) S.push_back(n/i); }
sort(S.begin(),S.end());
return S;
}
... | a.cc:1:1: error: 'll' does not name a type
1 | ll N,K,M;
| ^~
a.cc:2:1: error: 'll' does not name a type
2 | ll mo=1000000007;
| ^~
a.cc:3:1: error: 'vector' does not name a type
3 | vector<ll> V;
| ^~~~~~
a.cc:4:1: error: 'll' does not name a type
4 | ll dp[2020];
| ^~
a.cc:6:1:... |
s852411197 | p03867 | C++ | #include<bits/stdc++.h>
using namespace std;
const int MOD = int(1e9) + 7;
using lint = long long;
struct modint {
int v;
modint(lint v_ = 0): v(v_ % MOD) { }
modint operator+ (const modint &m) const {
return modint(v + m.v);
}
modint operator- (const modint &m) const {
return modi... | a.cc:107:3: error: 'ac' does not name a type
107 | */ac
| ^~
|
s614522907 | p03867 | C++ | #include<algorithm>
#include<cstring>
#include<cctype>
#include<cstdio>
#define rep(i,x,y) for(int i=x; i<=y; ++i)
using namespace std;
const int N=10005,mod=1000000007;
int n,k,prm[N],c[N],a[N],tot;
typedef long long LL;
LL ret,ans;
LL getmi(LL a,LL x)
{
LL rt=1;
while(x)
{
if(x&1) rt=rt*a%mod;
a=a*a%mod,x>>=... | a.cc: In function 'int main()':
a.cc:51:21: error: 'sqrt' was not declared in this scope
51 | int x=n,lim=sqrt(n);
| ^~~~
|
s645673736 | p03867 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define MOD 1000000007
long long bipow(long long K, int p){
if(p == 0) return 1;
if(p % 2 == 0){
long long tmp = (K * K) % MOD;
return bipow(tmp, p / 2) % MOD;
}else
return (K * bipow(K, p-1)) % MOD;
}
vector<long long> div... | a.cc: In function 'int main()':
a.cc:33:5: error: 'sort' was not declared in this scope; did you mean 'short'?
33 | sort(dv.begin(), dv.end());
| ^~~~
| short
|
s581081002 | p03867 | C++ | #pragma region include
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <cstring>
#include <vector>
#include <tuple>
#include <bitset>
#include <queue>
#include <complex>
#include <set>
#include <map>
#inc... | a.cc: In function 'void solve()':
a.cc:65:16: error: 'N' was not declared in this scope
65 | cin >> N >> K;
| ^
a.cc:65:21: error: 'K' was not declared in this scope
65 | cin >> N >> K;
| ^
a.cc:66:9: error: 'dfs' was not declared in this scope; did y... |
s855799820 | p03867 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int P = 1e9+7;
const int inv = 5e8+4;
int Pow(int a,int b){
if(b==0) return 1;
int ret = Pow(a,b>>1);
ret=1ll*ret*ret%P;
if(b&1) ret=1ll*ret*a%P;
return ret;
}
int n,K,ans,q[100000];
map<int,int> POW,F;
inline add(int &x,int y ){x=(x+y)%P;... | a.cc:15:8: error: ISO C++ forbids declaration of 'add' with no type [-fpermissive]
15 | inline add(int &x,int y ){x=(x+y)%P;}
| ^~~
a.cc: In function 'int add(int&, int)':
a.cc:15:37: warning: no return statement in function returning non-void [-Wreturn-type]
15 | inline add(int &x,int y ){x=(x+y)%P;... |
s643044895 | p03867 | C++ | #include <cstdio>
#include <cmath>
#include <vector>
#include <map>
typedef long long signed int LL;
typedef long long unsigned int LU;
#define incID(i, l, r) for(int i = (l) ; i < (r); i++)
#define incII(i, l, r) for(int i = (l) ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#d... | a.cc:37:17: error: 'std::vector<long long int> div' redeclared as different kind of entity
37 | std::vector<LL> div;
| ^~~
In file included from /usr/include/c++/14/bits/std_abs.h:38,
from /usr/include/c++/14/cmath:49,
from a.cc:2:
/usr/include/stdlib.h:992:14:... |
s594158268 | p03867 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <set>
#include <map>
#include <unordered_map>
#include <vector>
#include <queue>
#include <string>
#include <iomanip>
#include <stdio.h>
#include <cstring>
#include <random>
#include <chrono>
#include <bitset>
#include <fstream>
#inclu... | a.cc: In function 'll f(ll)':
a.cc:81:9: error: expected primary-expression before ')' token
81 | for()
| ^
a.cc:84:1: error: expected primary-expression before '}' token
84 | }
| ^
a.cc:81:10: error: expected ';' before '}' token
81 | for()
| ^
| ;
...... |
s956779494 | p03868 | C++ | #include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pt(sth) cout << sth << "\n"
#define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef map<ll, ll> Map;
static const ll INF=1e... | a.cc: In function 'int main()':
a.cc:66:20: error: void value not ignored as it ought to be
66 | st.push(p[i].sc)
| ~~~~~~~^~~~~~~~~
|
s688743119 | p03868 | C++ | #include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pt(sth) cout << sth << "\n"
#define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef map<ll, ll> Map;
static const ll INF=1e... | a.cc: In function 'int main()':
a.cc:66:20: error: void value not ignored as it ought to be
66 | st.push(p[i].sc)
| ~~~~~~~^~~~~~~~~
|
s829472337 | p03868 | C++ | w#include <bits/stdc++.h>
#define rep(i, n) for (rint i = 1; i <= (n); i ++)
#define re0(i, n) for (rint i = 0; i < (int) n; i ++)
#define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;
template<typename tp> inline void read(tp &x) {
x = 0; char c = getchar(); in... | 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 'void read(tp&)':
a.cc:9:19: error: there are no arguments to 'getchar' that depend on a template parameter, so a declaration of 'get... |
s547627019 | p03868 | C++ | w#include <bits/stdc++.h>
#define rep(i, n) for (rint i = 1; i <= (n); i ++)
#define re0(i, n) for (rint i = 0; i < (int) n; i ++)
#define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;
template<typename tp> inline void read(tp &x) {
x = 0; char c = getchar(); in... | 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 'void read(tp&)':
a.cc:9:19: error: there are no arguments to 'getchar' that depend on a template parameter, so a declaration of 'get... |
s612862996 | p03868 | C++ | #include <iostream>
#include <vector>
using namespace std;
const long long mod = 1e9 + 7;
int main(void){
int n;
cin >> n;
vector<pair<int, int> > a;
for (int i = 0; i < n; ++i){
int p;
cin >> p;
a.push_back(make_pair(p, 0));
}
for (int i = 0; i < n; ++i){
int ... | a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(a.begin(), a.end());
| ^~~~
| short
|
s956608268 | p03868 | C++ | aaa | a.cc:1:1: error: 'aaa' does not name a type
1 | aaa
| ^~~
|
s553301219 | p03869 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define MOD 1000000007
#define INF 1 << 30
using namespace std;
typedef long long ll;
int main(void) {
int ax, ay, bx, by, cx, cy;
double S, r, a, b, c, m = 0.0, ans = 0.0;
cin >> ax >> ay >> bx >> by >> cx >> cy;
bx -= cx;
by -= cy;
a... | a.cc: In function 'int main()':
a.cc:21:13: error: 'sqrt' was not declared in this scope
21 | a = sqrt(abs(ax - bx) * abs(ax - bx) + abs(ay - by) * abs(ay - by));
| ^~~~
|
s296560319 | p03869 | C++ | #include<iostream>
#include<algorithm>
#include<iomanip>
#include<set>
#define DB double
DB x[3], y[3];
DB M, G[3];
DB s;
DB pow(DB n) { return n * n; }
int main() {
for (int i = 0; i < 3; i++) {
std::cin >> x[i] >> y[i];
}
for (int i = 0; i < 3; i++) {
G[i] = std::hypot(x[i] - x[(i + 1) % 3],y[i] - y[(i + 1) % ... | a.cc: In function 'int main()':
a.cc:15:29: error: 'hypot' is not a member of 'std'
15 | G[i] = std::hypot(x[i] - x[(i + 1) % 3],y[i] - y[(i + 1) % 3]);
| ^~~~~
a.cc:20:21: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
20 | DB r = std::sqrt(... |
s873702473 | p03869 | C++ | #include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long ... | a.cc: In function 'int main()':
a.cc:131:23: error: too few arguments to function 'double dLS(Pt, Pt, Pt, Pt)'
131 | if(dLS(p[0],p[1],q[0])<M-EPS)ok=false;
| ~~~^~~~~~~~~~~~~~~~
a.cc:84:8: note: declared here
84 | double dLS(Pt a, Pt b, Pt c, Pt d) {
| ^~~
a.cc... |
s389417120 | p03870 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5, MAX_M = 40;
int n, x, ans, p;
int a[MAX_N];
int l[MAX_N];
bool cnt[MAX_M];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
for (int i = 0; i < n; i++)
x ^= a[i];
for (int i = 0; i < n; i++) {
l[i] = ... | a.cc: In function 'int main()':
a.cc:20:25: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
20 | cnt[l[i]]++;
| ~~~~~~~~^
a.cc:32:30: error: use of an operand of type 'bool' in 'operator--' is forbidden
32 | cnt[i]--;
... |
s032355025 | p03870 | C++ | #include <bits/stdc++.h>
using namespace std;
const long long MAX_N = 1e5 + 5;
long long n, x, ans;
long long a[MAX_N];
long long l[MAX_N];
long long cnt[MAX_N];
long long main() {
ios::sync_with_stdio(false), cin.tie(0);
cin >> n;
for (long long i = 0; i < n; i++)
cin >> a[i];
for (long long i = 0; i < n; i... | cc1plus: error: '::main' must return 'int'
|
s443864564 | p03870 | C++ | #include<bits/stdc++.h>
using namespace std;
const int maxN = 1e3 + 13;
int n, ans, x;
bool mark[maxN];
vector<int> vec;
int main () {
cin >> n;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
x ^= a;
a = __builtin_ctz(a);
mark[a] = 1;
}
while (x) {
vec.push_back(x % 2);
x /= 2;
}
int ind... | a.cc:41:11: error: redefinition of 'const int maxN'
41 | const int maxN = 1e3 + 13;
| ^~~~
a.cc:3:11: note: 'const int maxN' previously defined here
3 | const int maxN = 1e3 + 13;
| ^~~~
a.cc:42:5: error: redefinition of 'int n'
42 | int n, ans, x;
| ^
a.cc:4:5: note:... |
s499190677 | p03870 | C++ | #include <cstdio>
int check[30];
int main() {
for (int bit = 29; bit >= 0; bit--) {
check[bit] = 0;
}
int n;
scanf("%d", &n);
int xor_sum = 0;
int a;
for (int i = 0; i < n; i++) {
scanf("%d", &a);
xor_sum ^= a;
a = a ^ (a - 1);
switch (a) {
case 1073741823:
check[29] = 1... | a.cc: In function 'int main()':
a.cc:113:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
113 | return;
| ^~~~~~
|
s211083595 | p03870 | C | #include <cstdio>
#include <unordered_set>
int a[100000];
int main() {
int n;
scanf("%d", &n);
int xor_sum = 0;
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
xor_sum ^= a[i];
}
std::unordered_set<int> s;
for (int i = 0; i < n; i++)
s.insert(a[i] ^ (a[i] - 1));
int ans = 0;
for (int ... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s323604089 | p03870 | C++ | int check[30];
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < 30; i++)
check[i] = 0;
int xor_sum = 0;
for (int i = 0; i < n; i++) {
int x;
scanf("%d", &x);
switch (x) {
case 1:
check[0] = 1;
break;
case 3:
check[1] = 1;
break;
case 7:
check... | a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf' was not declared in this scope
4 | scanf("%d", &n);
| ^~~~~
a.cc:124:5: error: 'printf' was not declared in this scope
124 | printf("-1\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable ... |
s465647899 | p03871 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<double> p(6);
vector<double> q(6);
for(int i=0;i<6;i++){
cin>>p.at(i);
}
for(int i=0;i<6;i++){
cin>>q.at(i);
}
double ans=0;
double ANS=0;
for(iny64_t X=0;X<1000000;X++){
double x=X/1000000;
ans+=max(x*p.at(0)/100,(1-x)... | a.cc: In function 'int main()':
a.cc:15:7: error: 'iny64_t' was not declared in this scope; did you mean 'int64_t'?
15 | for(iny64_t X=0;X<1000000;X++){
| ^~~~~~~
| int64_t
a.cc:15:19: error: 'X' was not declared in this scope
15 | for(iny64_t X=0;X<1000000;X++){
| ... |
s578232256 | p03871 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
long double p[10], q[10], sum, r, s; vector<pair<long double, long double>> A, B;
int main() {
for (int i = 1; i <= 6; i++) { cin >> p[i]; p[i] /= 100; }
for (int i = 1; i <= 6; i++) { cin >> q[i]; q[i] /= 100; }
for (int i = 1; i <= 6... | a.cc: In function 'int main()':
a.cc:12:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
12 | if (fabs(p[i] - q[i]) < 0.001) {
| ^~~~
| labs
|
s933647928 | p03871 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
long double p[100], q[100]; int bit[6];
pair<long double, long double> tourist(int v) {
if (bit[v - 1] == 0) {
if (fabs(p[v] - q[v]) < 0.000001)return make_pair(0.5, 0.5);
if (p[v] > q[v])return make_pair(1, 0);
return make_pair(0, 1);
}
return ma... | a.cc: In function 'std::pair<long double, long double> tourist(int)':
a.cc:9:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
9 | if (fabs(p[v] - q[v]) < 0.000001)return make_pair(0.5, 0.5);
| ^~~~
| labs
|
s669708352 | p03871 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double lf;
ll cross(pii a, pii b) {
return 1LL * a.first * b.second - 1LL * a.second * b.first;
}
int P[6], Q[6];
vector<pii> Sum, Conv;
vector<pii> mrg(vector<pii> &a, vector<pii> &b) {
vector<pii> ... | a.cc: In function 'int main()':
a.cc:73:46: error: no matching function for call to 'max(lf&, const int&)'
73 | else if(a.first < a.second) ans = max(ans, max(a.first, b.first));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algori... |
s310545058 | p03871 | C++ | asm(" .file \"ttt.cpp\"");
asm("#APP");
asm(" .file \"ttt.cpp\"");
asm(" #APP");
asm(" .file \"ttt.cpp\"");
asm(" #APP");
asm(" .file \"ttt.cpp\"");
asm(" .section .text.unlikely,\"ax\",@progbits");
asm(" .LCOLDB4:");
asm(" .text");
asm(" .LHOTB4:");
asm(" .p2align 4,,15");
asm(" .globl _Z4calce");
asm(" .type _Z4calce... | /tmp/ccN6fwU0.s: Assembler messages:
/tmp/ccN6fwU0.s:179: Warning: unterminated string; newline inserted
/tmp/ccN6fwU0.s:194: Error: invalid instruction suffix for `push'
/tmp/ccN6fwU0.s:195: Error: invalid instruction suffix for `push'
/tmp/ccN6fwU0.s:198: Error: invalid instruction suffix for `push'
/tmp/ccN6fwU0.s:1... |
s771943577 | p03871 | C++ | asm(" .file \"ttt.cpp\"");
asm("#APP");
asm(" .file \"ttt.cpp\"");
asm(" #APP");
asm(" .file \"ttt.cpp\"");
asm(" .section .text.unlikely,\"ax\",@progbits");
asm(" .LCOLDB4:");
asm(" .text");
asm(" .LHOTB4:");
asm(" .p2align 4,,15");
asm(" .globl _Z4calce");
asm(" .type _Z4calce, @function");
asm(" _Z4calce:");
asm(" .... | /tmp/cc9Chqo6.s: Assembler messages:
/tmp/cc9Chqo6.s:177: Warning: unterminated string; newline inserted
/tmp/cc9Chqo6.s:192: Error: invalid instruction suffix for `push'
/tmp/cc9Chqo6.s:193: Error: invalid instruction suffix for `push'
/tmp/cc9Chqo6.s:196: Error: invalid instruction suffix for `push'
/tmp/cc9Chqo6.s:1... |
s411343786 | p03872 | C++ | #include<iostream>
#include<iomanip>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<cassert>
#define PB push_back
#define MP make_pair
#define sz(v) (in((v).size()))
#define forn(i,n) for(in i=0;i<(n);++i)
#define forv(i,v) forn(i,sz(v))
#define fors(i,s) for(auto i=(s).begin(... | a.cc: In function 'double dist(in, in)':
a.cc:61:10: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
61 | return sqrt(sq(x[i]-x[j])+sq(y[i]-y[j]));
| ^~~~
| sq
|
s398138980 | p03872 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
const double eps = 1e-8;
///////////////////////////
//SIMPLEX
//WARNING: segfaults on empty (size 0)
//max cx st Ax<=b, x>=0
//do 2 phases; 1s... | a.cc:64:22: error: 'i' was not declared in this scope
64 | int px[N], py[N], pz[i];
| ^
a.cc: In function 'bool can(double)':
a.cc:76:24: error: 'pz' was not declared in this scope; did you mean 'py'?
76 | a[i] = pz[i]-val;
| ^~
| ... |
s953632827 | p03873 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef __int128_t LL;
#define p pair<LL,LL>
#define x first
#define y second
LL dp[10000][10000];
int main(){
LL n;
cin >> n;
p val[n];
for(LL i = 0; i < n; i++) cin >> val[i].x >> val[i].y;
for(LL i = 0; i < n; i++){
val[i].x += val[i].y;
}
LL ans = 0;
sort(val... | a.cc: In function 'int main()':
a.cc:11:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'LL' {aka '__int128'})
11 | cin >> n;
| ~~~ ^~ ~
| | |
| | LL {aka __int128}
| std::istream {ak... |
s495277196 | p03873 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef __int128 LL;
#define p pair<LL,LL>
#define x first
#define y second
LL dp[10000][10000];
int main(){
LL n;
cin >> n;
p val[n];
for(LL i = 0; i < n; i++) cin >> val[i].x >> val[i].y;
for(LL i = 0; i < n; i++){
val[i].x += val[i].y;
}
LL ans = 0;
sort(val,v... | a.cc: In function 'int main()':
a.cc:11:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'LL' {aka '__int128'})
11 | cin >> n;
| ~~~ ^~ ~
| | |
| | LL {aka __int128}
| std::istream {ak... |
s455305465 | p03873 | C++ | #include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <string>
#include <vector>
#include <bitset>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <queue>
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef long doubl... | a.cc:27:1: error: expected ',' or ';' before 'e18'
27 | e18;
| ^~~
|
s818085020 | p03873 | C++ | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <numeric>
#include <random>
#include <vector>
#include <array>
#include <bitset>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
using namespace std;
using ll = lon... | a.cc: In function 'll main2()':
a.cc:54:5: error: 'memset' was not declared in this scope
54 | memset(used, false, sizeof(used));
| ^~~~~~
a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
15 | #include <unordered_map>
+++ |+#includ... |
s882401515 | p03874 | C++ | #include <iostream>
#include <string>
using namespace std;
long long K, dp[555]; string S;
int main() {
cin >> K;
for (int i = 0; i <= 550; i++) {
unsigned long long R = 1;
for (int j = i + 1; j <= i + 7; j++) R *= j;
R /= 5040;
dp[i] = R;
}
for (int i = 549; i >= 0; i--) {
while (K >= dp[i]) { S += "L"... | a.cc: In function 'int main()':
a.cc:19:9: error: 'reverse' was not declared in this scope
19 | reverse(S.begin(), S.end());
| ^~~~~~~
|
s925150735 | p03875 | C++ | 2
0 1
1 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 2
| ^
|
s810707752 | p03876 | C++ | e polygon is simple (see notes for the definition).
Each edge of the polygon is parallel to one of the coordinate axes.
Each coordinate is an integer between 0 and 10^9, inclusive.
The vertices are numbered 1 through N in counter-clockwise order.
The internal angle at the i-th vertex is exactly a_i degrees.
| a.cc:1:1: error: 'e' does not name a type
1 | e polygon is simple (see notes for the definition).
| ^
|
s520217895 | p03878 | C | #include <iostream>
#include <iomanip>
#include <map>
#include <unordered_map>
#include <list>
#include <set>
#include <unordered_set>
#include <vector>
#include <utility>
#include <algorithm>
#include <queue>
#include <stack>
#include <cstdint>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s170645997 | p03878 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll MOD = 1000000007;
int main()
{
int n;
cin >> n;
int a[100002], b[100002];
P p[200002];
for(int i = 0; i < n; i++){
cin >> a[i];
p[i] = P(a[i], 0);
}
for(int i = 0; i < n; i++){... | a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(p, p + n * 2);
| ^~~~
| short
|
s850953136 | p03878 | C++ | #include <iostream>
#include <utility>
#include <vector>
#include <algorithm>
#define llint long long
#define mod 1000000007
using namespace std;
llint n;
vector<pair<llint, llint> > vec;
int main(void)
{
cin >> n;
llint x;
for(int i = 1; i <= n; i++){
cin >> x;
vec.push_back(make_pair(x, 1));
}
f... | a.cc: In function 'int main()':
a.cc:30:21: error: 'cnt1' was not declared in this scope; did you mean 'cnt2'?
30 | if(cnt2 == 0) cnt1++;
| ^~~~
| cnt2
a.cc:34:10: error: 'cnt1' was not declared in this scope; did you mean 'cnt2'?
34 | if(cnt1 == 0) ... |
s963995338 | p03878 | C++ | $N=<>;$\=1;($\*=($p=$%)<($%=abs($c+=$_>$N||-1))||$p)%=1e9+7for`nl|sort -nk2`;print | a.cc:1:8: error: stray '\' in program
1 | $N=<>;$\=1;($\*=($p=$%)<($%=abs($c+=$_>$N||-1))||$p)%=1e9+7for`nl|sort -nk2`;print
| ^
a.cc:1:14: error: stray '\' in program
1 | $N=<>;$\=1;($\*=($p=$%)<($%=abs($c+=$_>$N||-1))||$p)%=1e9+7for`nl|sort -nk2`;print
| ^
a.cc:1:63: error: str... |
s109658994 | p03878 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort... | a.cc: In function 'bool solve()':
a.cc:43:38: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::push_back(long long int&, int)'
43 | int x; cin >> x; A.pb(x,1);
| ~~~~^~~~~
In file included from /usr/include/c++/14/v... |
s834586609 | p03878 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
#define _overload3(_1,_2,_3,name,...) name
#def... | a.cc:48:5: error: 'cout' does not name a type
48 | cout<<ans<<endl;
| ^~~~
a.cc:49:1: error: expected declaration before '}' token
49 | }
| ^
|
s456430303 | p03878 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(I,A,B) for(ll I = int(A); I < int(B); ++I)
const ll MOD=1e9+7;
int main(){
ll N,ans=1,a;
cin >> N;
priority_queue<P> Q;
FOR(i,0,N)cin>>a,Q.push({-a,-1});
FOR(i,0,N)cin>>a,Q.push({-a,1});
a = 0;
while(!Q.empty()){
if(a != Q.top().se... | a.cc: In function 'int main()':
a.cc:9:24: error: 'P' was not declared in this scope
9 | priority_queue<P> Q;
| ^
a.cc:9:25: error: template argument 1 is invalid
9 | priority_queue<P> Q;
| ^
a.cc:9:25: error: template argument 2 is inva... |
s564634990 | p03878 | C++ | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define int ll
#define rep(i, a) for (int i = 0; (i) < (int) (a); (i)++)
#define reps(i, a, b) for (int i = (int) (a); (i) < (int) (b); (i)++)
#define rrep(i, a) for (int i = (int) a-1; (i) >= 0; (i)--)
#define rreps(i, a, b) for (int i = (int) (a)-... | a.cc: In function 'void solve()':
a.cc:149:23: error: 'ng' was not declared in this scope; did you mean 'g'?
149 | if (x[ng] != ma) ma = mi;
| ^~
| g
|
s006445027 | p03878 | C++ | #include <bits/stdc++.h>
using LL = long long;
const LL MOD = 1e9+9;
using namespace std;
int main(){
int N;cin >> N;
vector<LL> pc,outlet;
for(int a = 0;a < N;a++){
LL b;cin >> b;
pc.push_back(b);
}
for(int a = 0;a < N;a++){
LL b;cin >> b;
outlet.push_back(b);
}... | a.cc: In function 'int main()':
a.cc:53:10: error: expected ';' before numeric constant
53 | 3
| ^
| ;
54 | 3
| ~
|
s075740390 | p03878 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<set>
#include<map>
#include<queue>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);++i)
#define rrep(i,n) for(int (i)=(n)-1;(i)>=0;--i)
#define rep1(i,n) for... | a.cc:58:1: error: '::main' must return 'int'
58 | ss main()
| ^~
|
s374171882 | p03878 | C++ | #include <bits/stdc++.h>
#include <boost/functional/hash.hpp>
#define debug 0
#define esc(ret) cout << (ret) << endl,quick_exit(0)
#define fcout(d) cout << fixed << setprecision(d)
#define repU(i,s,t) for(int i = (int)(s); i <= (int)(t); ++i)
#define repD(i,s,t) for(int i = (int)(s); i >= (int)(t); --i)
#define rep(i,... | a.cc:2:10: fatal error: boost/functional/hash.hpp: No such file or directory
2 | #include <boost/functional/hash.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s890697244 | p03878 | C++ | #include <bits/stdc++.h>
#include <boost/functional/hash.hpp>
#define debug 0
#define esc(ret) cout << (ret) << endl,quick_exit(0)
#define fcout(d) cout << fixed << setprecision(d)
#define repU(i,s,t) for(int i = (int)(s); i <= (int)(t); ++i)
#define repD(i,s,t) for(int i = (int)(s); i >= (int)(t); --i)
#define rep(i,... | a.cc:2:10: fatal error: boost/functional/hash.hpp: No such file or directory
2 | #include <boost/functional/hash.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s358133749 | p03878 | C++ | #include <iostream>
using namespace std;
#include <list>
#include <stack>
#define ll long long
//00p0d0dp0p0d
int main(){
int n;
cin >>n;
int a[n];
int b[n];
list<int> vacant;
int ans=0;
ll codelen=9223372036854775807;
for(int i=0;i<n;i++){
cin >> a[i];
}
sort(a,a+n);
... | a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
19 | sort(a,a+n);
| ^~~~
| short
|
s911223538 | p03878 | C++ | #include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = ... | a.cc:33:1: error: expected ',' or ';' before 'll'
33 | ll ans=1;
| ^~
a.cc: In function 'int maint()':
a.cc:38:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
38 | ans+=i;
| ^~~
| abs
a.cc:41:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
4... |
s701936170 | p03878 | C++ | #include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = 100... | a.cc:33:1: error: expected ',' or ';' before 'll'
33 | ll ans=1;
| ^~
a.cc: In function 'int maint()':
a.cc:38:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
38 | ans+=i;
| ^~~
| abs
a.cc:41:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
4... |
s768378108 | p03878 | C | #include<stdio.h>
#include<stdlib.h>
int R=1,C=1,H[2000010],N[2000010];
//評価関数(いまはMAX)
int hyouka(int a,int b){
if(C<b)return 1;
if(C<a||b==0)return 0;
return N[H[a]]>N[H[b]]?1:0;
}
//挿入関数
void hin(int a){
int i=C++;
for(N[H[0]=R]=a;hyouka(0,i/2);i/=2)H[i]=H[i/2];
H[i]=R++;
}
//取り出す関数
int hout(){
int rt=H... | main.c:40:5: error: redefinition of 'R'
40 | int R=1,C=1,H[2000010],N[2000010];
| ^
main.c:3:5: note: previous definition of 'R' with type 'int'
3 | int R=1,C=1,H[2000010],N[2000010];
| ^
main.c:40:9: error: redefinition of 'C'
40 | int R=1,C=1,H[2000010],N[2000010];
| ^
main... |
s697856855 | p03878 | C++ | int a[101010], b[101010];
vector<pair<int, int>>v;
const int MOD = 1e9 + 7;
int main(){
int n;
cin >> n;
for (int i = 0; i < n; i++) cin >> a[i], v.emplace_back(a[i], 1);
for (int i = 0; i < n; i++) cin >> b[i], v.emplace_back(b[i], 2);
sort(ALL(v));
LL ans = 1;
int pa = 0, pb = 0;
for (int i = 0; i < 2 * n; ... | a.cc:2:1: error: 'vector' does not name a type
2 | vector<pair<int, int>>v;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> n;
| ^~~
a.cc:8:50: error: 'v' was not declared in this scope
8 | for (int i = 0; i < n; i... |
s251676954 | p03878 | Java |
import java.util.Arrays;
import java.util.Scanner;
class event implements Comparable<event>{
public int a;
public int b;
public event(int a , int b){
this.a = a;
this.b = b;
}
public int compareTo(event other){
// return b - other.b;
return Integer.compare(b , other.b);
}
}
public clas... | Main.java:49: error: cannot find symbol
size[p.t]++;
^
symbol: variable p
location: class Main
1 error
|
s883782135 | p03878 | Java | import java.util.Arrays;
import java.util.Scanner;
class event implements Comparable<event>{
public int a;
public int b;
public event(int a , int b){
this.a = a;
this.b = b;
}
public int compareTo(event other){
// return b - other.b;
return Integer.compare(b , other.b);
}
}
public class ... | Main.java:19: error: class A_1D_Matching is public, should be declared in a file named A_1D_Matching.java
public class A_1D_Matching{
^
1 error
|
s572124773 | p03878 | Java | package AtCoder_Code_Final_2016;
import java.util.Arrays;
import java.util.Scanner;
class event implements Comparable<event>{
public int a;
public int b;
public event(int a , int b){
this.a = a;
this.b = b;
}
public int compareTo(event other){
// return b - other.b;
return Integer.compare(b ,... | Main.java:21: error: class A_1D_Matching is public, should be declared in a file named A_1D_Matching.java
public class A_1D_Matching {
^
1 error
|
s306047744 | p03878 | Java | package AtCoder_Code_Final_2016;
import java.util.Arrays;
import java.util.Scanner;
class event implements Comparable<event>{
public int a;
public int b;
public event(int a , int b){
this.a = a;
this.b = b;
}
public int compareTo(event other){
// return b - other.b;
return Integer.compare(b ,... | Main.java:21: error: class A_1D_Matching is public, should be declared in a file named A_1D_Matching.java
public class A_1D_Matching {
^
1 error
|
s267032320 | p03878 | Java | import java.util.Arrays;
import java.util.Scanner;
class event implements Comparable<event>{
public int a;
public int b;
public event(int a , int b){
this.a = a;
this.b = b;
}
public int compareTo(event other){
// return b - other.b;
return Integer.compare(b , other.b);
}
}
public class ... | Main.java:19: error: class A_1D_Matching is public, should be declared in a file named A_1D_Matching.java
public class A_1D_Matching {
^
1 error
|
s043011952 | p03878 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <time.h>
#include <sys/timeb.h>
using namespace std;
int get_time(string r)
{
struct timeb rawtime;
ftime(&rawtime);
static int ms = rawtime.millitm;
static unsigned long s = rawtime.time;
int out_ms = rawt... | a.cc: In function 'int get_time(std::string)':
a.cc:14:14: warning: 'int ftime(timeb*)' is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
14 | ftime(&rawtime);
| ~~~~~^~~~~~~~~~
In file included from a.cc:7:
/usr/include/x86_64-linux-gnu/sys/timeb.h:29:12: not... |
s710842378 | p03878 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <iostream>
#include <cassert>
#include <cmath>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <cstdlib>
using namespace std;
#define TASKNAME ""
void solve(int test_number);
int main() {
ios_base::syn... | a.cc: In function 'void solve(int)':
a.cc:50:19: error: comparison between distinct pointer types 'const char*' and 'int*' lacks a cast
50 | scanf("%d"< &b[i]);
| ~~~~^~~~~~~
a.cc:50:19: error: cannot convert 'bool' to 'const char*'
50 | scanf("%d"< &b[i]);
| ... |
s916213916 | p03878 | C++ | int mai(){} | a.cc: In function 'int mai()':
a.cc:1:11: warning: no return statement in function returning non-void [-Wreturn-type]
1 | int mai(){}
| ^
/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... |
s058615661 | p03878 | C++ | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
typedef long long ll;
typedef pair... | a.cc: In function 'int main()':
a.cc:149:20: error: 'vec' was not declared in this scope; did you mean 'vec2'?
149 | if(vec[i].se==1) cur++;
| ^~~
| vec2
a.cc:156:13: error: conflicting declaration 'int cur'
156 | int cur = 0;
| ... |
s473440232 | p03878 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int N;
struct node
{
int x;
bool flag;
}arr[200001];
bool cmp(node a,node b)
{
return a.x > b.x;
}
int main()
{
while(~scanf("%d",&N))
{
for(int i=1;i<=N;i++)
{
scanf("%d",&arr[i].x);
arr[i].flag = 0;
}
for(int i=N+1;i<=2*N;... | a.cc: In function 'int main()':
a.cc:32:17: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
32 | __int64 ans = 1;
| ^~~~~~~
| __int64_t
a.cc:43:48: error: expected ';' before 'tmp'
43 | _... |
s962471304 | p03878 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int N;
struct node
{
int x;
bool flag;
}arr[200001];
bool cmp(node a,node b)
{
return a.x > b.x;
}
int main()
{
while(~scanf("%d",&N))
{
for(int i=1;i<=N;i++)
{
scanf("%d",&arr[i].x);
arr[i].flag = 0;
}
for(int i=N+1;i<=2*N;... | a.cc: In function 'int main()':
a.cc:32:17: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
32 | __int64 ans = 1;
| ^~~~~~~
| __int64_t
a.cc:43:48: error: expected ';' before 'tmp'
43 | _... |
s475740297 | p03878 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int N;
struct node
{
int x;
bool flag;
}arr[200001];
bool cmp(node a,node b)
{
return a.x > b.x;
}
int main()
{
while(~scanf("%d",&N))
{
for(int i=1;i<=N;i++)
{
scanf("%d",&arr[i]);
arr[i].flag = 0;
}
for(int i=N+1;i<=2*N;i+... | a.cc: In function 'int main()':
a.cc:32:17: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
32 | __int64 ans = 1;
| ^~~~~~~
| __int64_t
a.cc:43:48: error: expected ';' before 'tmp'
43 | _... |
s444130127 | p03878 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int N;
struct node
{
int x;
bool flag;
}arr[200001];
bool cmp(node a,node b)
{
return a.x > b.x;
}
int main()
{
while(~scanf("%d",&N))
{
for(int i=1;i<=N;i++)
{
scanf("%d",&arr[i]);
arr[i].flag = 0;
}
for(int i=N+1;i<=2*N;i+... | a.cc: In function 'int main()':
a.cc:32:17: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
32 | __int64 ans = 1;
| ^~~~~~~
| __int64_t
a.cc:43:48: error: expected ';' before 'tmp'
43 | _... |
s762181923 | p03878 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
int n; cin >> n;
vector<int> a(n, 0), b(n, 0);
for(int i = 0; i < n; ++i)
cin >> a[i];
for(int i = 0; i < n; ++i)
cin >> b[i];
sort(a.begin(), a.end());
sort(b.begin(), b.end());
int ans ... | a.cc: In lambda function:
a.cc:30:25: error: inconsistent types 'int' and 'long int' deduced for lambda return type
30 | return (rt - lf + 1);
| ~~~~~~~~~^~~~
|
s205957250 | p03878 | C++ | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.OutputStream;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmod... |
s070661480 | p03879 | C++ | # cf16-exhibition-final-openB - Inscribed Bicycle
def main():
x1, y1, x2, y2, x3, y3 = map(int, open(0).read().split())
x2 -= x1
y2 -= y1
x3 -= x1
y3 -= y1
a = ((x2 - x3) ** 2 + (y2 - y3) ** 2) ** 0.5
b = (x3 ** 2 + y3 ** 2) ** 0.5
c = (x2 ** 2 + y2 ** 2) ** 0.5
r = abs(x2 * y3 - x3 ... | a.cc:1:3: error: invalid preprocessing directive #cf16
1 | # cf16-exhibition-final-openB - Inscribed Bicycle
| ^~~~
a.cc:2:1: error: 'def' does not name a type
2 | def main():
| ^~~
|
s367923228 | p03879 | C++ | #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
double x[3], y[3];
for(int i = 0; i < 3; i++) cin >> x[i] >> y[i];
double a, b, c;
a = sqrt(pow(x[0]-x[1], 2)+pow(y[0]-y[1], 2));
b = sqrt(pow(x[1]-x[2], 2)+pow(y[1]-y[2], 2));
c = sqrt(pow(x[2]-x[0], 2)+pow(y[2]-y[0]... | a.cc: In function 'int main()':
a.cc:15:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
15 | double maxL = max({a, b, c});
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h... |
s061408854 | p03879 | C++ | #include <bits/stdc++.h>
using ll = long long;
#define int ll
namespace ext {
template <class T>
struct vec_type;
template <class T>
constexpr bool is_vec_v;
using namespace std;
template<class T>
struct Vector : std::vector<T> {
using std::vector<T>::vector;
char dil = ' ';
Vector<T> accum() {
Vector... | a.cc:126:24: error: redefinition of 'template<class T> constexpr const bool ext::is_vec_v'
126 | constexpr bool is_vec_v = vec_type<T>::value;
| ^~~~~~~~
a.cc:10:24: note: 'template<class T> constexpr const bool ext::is_vec_v<T>' previously declared here
10 | constexpr ... |
s723564845 | p03879 | C++ | #include <bits/stdc++.h>
using ll = long long;
#define int ll
namespace ext {
template <class T>
struct vec_type;
template <class T>
constexpr bool is_vec_v;
using namespace std;
template<class T>
struct Vector : std::vector<T> {
using std::vector<T>::vector;
char dil = ' ';
Vector<T> accum() {
Vector... | a.cc:126:24: error: redefinition of 'template<class T> constexpr const bool ext::is_vec_v'
126 | constexpr bool is_vec_v = vec_type<T>::value;
| ^~~~~~~~
a.cc:10:24: note: 'template<class T> constexpr const bool ext::is_vec_v<T>' previously declared here
10 | constexpr ... |
s308143659 | p03879 | C++ | #include<iostream>
using namespace std;
int main(){
double x1,y1,x2,y2,x3,y3;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
double b=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
double c=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
double s=abs((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1... | a.cc: In function 'int main()':
a.cc:8:12: error: 'sqrt' was not declared in this scope
8 | double a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
| ^~~~
a.cc:15:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
15 | cout << r*max({a,b,c})/(2+max({a,b,c})) << endl... |
s918601469 | p03879 | C++ | A=list(map(int,input().split()))
x1=A[0]
y1=A[1]
B=list(map(int,input().split()))
x2=B[0]
y2=B[1]
C=list(map(int,input().split()))
x3=C[0]
y3=C[1]
a=((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))**0.5
b=((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1))**0.5
c=((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3))**0.5
S=abs((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2
print(2*S... | a.cc:1:1: error: 'A' does not name a type
1 | A=list(map(int,input().split()))
| ^
|
s324571588 | p03879 | C++ | #include <algorithm>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i... | a.cc: In function 'int main()':
a.cc:21:13: error: 'LDBL_EPSILON' was not declared in this scope
21 | #define eps LDBL_EPSILON
| ^~~~~~~~~~~~
a.cc:38:26: note: in expansion of macro 'eps'
38 | while (ma - mi > eps) {
| ^~~
|
s495411677 | p03879 | C++ | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
#define gsort(b, e) sort(b, e, greater<decltype(*b)>())
template <typename T>
T sq(T a) {
return a * a;
}
int main() {
double x[3], y[3];
for (int i = 0; i < 3; ++i) {
cin >> x[i] >> y[i];
}
// (x[0], y[0])を原点に平行... | a.cc: In function 'int main()':
a.cc:5:21: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
5 | #define gsort(b, e) sort(b, e, greater<decltype(*b)>())
| ^~~~
a.cc:35:5: note: in expansion of macro 'gsort'
35 | gsort(r, r + 3);
| ^~~~~
|
s322314781 | p03879 | C++ | #include <iostream>
#include <cmath>
using namespace std;
double coss(int a,int b,int c,int d,int e,int f){
int aba,abb;
aba = (c - a) * (c - a) + (d - b) * (d - b);
abb = (e -a) * (e- a) + (f- b) * (f- b);
int mul = (c-a)*(e-a) + (d-b)*(f-b);
double absol= sqrt((double) aba)*sqrt((double) abb);
return (... | a.cc: In function 'bool check(double, double, int, int, int, int, double)':
a.cc:24:20: error: expected primary-expression before ')' token
24 | avx = (cos(th1)*()
| ^
a.cc:24:21: error: expected ')' before 'int'
24 | avx = (cos(th1)*()
| ~ ^
| ... |
s770518459 | p03879 | C++ | #include <bits/stdc++.h>
#include <vector>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
#define MOD 1000000007
//ll dx[4] = {1,-1,0,0};
//ll dy[4] = {0,0,1,-1};
/*ll pasc[100][100];
ll getPasc(ll n,ll k){
if(pasc[n][k]!=0){
return pasc[n][k];
}else{
pasc[n][k] = getPasc... | a.cc: In function 'int main()':
a.cc:38:7: error: expected ';' before 'a'
38 | vec2 a,b,c;
| ^~
| ;
a.cc:39:8: error: 'a' was not declared in this scope
39 | cin>>a.first>>a.second>>b.first>>b.second>>c.first>>c.second;
| ^
a.cc:39:27: error: 'b' was not declared in this s... |
s359328779 | p03879 | C++ | #include <iostream>
#include <iomanip>
#include <complex>
#include <vector>
#include <cassert>
#include <algorithm>
#include <cmath>
#include <queue>
#include <utility>
using namespace std;
//num
const double EPS = 1e-10;
const double INF = 1e12;
#define X real()
#define Y imag()
#define LE(n,m) ((n) < (m) + EPS)
#de... | a.cc: In function 'int main()':
a.cc:57:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
57 | cin >> v[i].X >> v[i].Y;
| ~~~ ^~
| |
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c+... |
s854181088 | p03879 | C++ | #include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <cstdlib>
#include <complex>
using namespace std;
typedef pair<int , int> P2;
typedef pair<pair<int , int> , int> P3;
typedef pair<pair<int , int> , pair<int , int> > P4;
#define Fst first... | a.cc:46:14: error: 'int y1' redeclared as different kind of entity
46 | int x1,x2,x3,y1,y2,y3;
| ^~
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+... |
s248743917 | p03880 | Java | import java.io.*;
import java.util.*;
class Main {
static Scanner scanner = new Scanner();
static long mod = 1000000007;
public static void main(String[]$) {
int n = scanner.nextInt();
int xor = 0;
boolean[] x = new boolean[32];
for (int i = 0; i < n; i++) {
int... | Main.java:55: error: reached end of file while parsing
}j
^
1 error
|
s906147046 | p03880 | C++ | #include "pch.h"
#include<iostream>
#include<vector>
#include<set>
#include<queue>
#include<map>
#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<stack>
using namespace std;
#define MOD 1000000007
#define REP(i,n) for(int (i)=0;(i)<(... | a.cc:1:10: fatal error: pch.h: No such file or directory
1 | #include "pch.h"
| ^~~~~~~
compilation terminated.
|
s522696378 | p03880 | C++ | #include <iostream>
#include <map>
using namespace std;
int main() {
int r = 0, n;
cin >> n;
map<int, int> m;
for (int i = 0; i < n; ++i) {
int a;
scanf("%d", &a);
r ^= a;
int u = __builtin_ffs(a);
if(!m[u-1]) m[u-1]=a;
}
int x = 1 << 30, ans = 0;
fo... | a.cc: In function 'int main()':
a.cc:24:26: error: invalid types 'std::map<int, int>::mapped_type {aka int}[int]' for array subscript
24 | r ^= m[p][0];
| ^
a.cc:25:27: error: invalid types 'std::map<int, int>::mapped_type {aka int}[int]' for array subscript
25 | ... |
s605628676 | p03880 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
const int INF = 1e9;
int N;
long long A[MAXN + 10];
long long lg(long long x) {
int cc = 0;
while(x > 1) {
x >>= 1;
cc++;
}
return cc;
}
bool cnt[40];
int main() {
scanf("%d", &N);
for(int i = 0; i < N; i++) {
... | a.cc: In function 'int main()':
a.cc:38:13: error: 'print' was not declared in this scope; did you mean 'rint'?
38 | print("-1\n");
| ^~~~~
| rint
|
s276289965 | p03880 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
const int INF = 1e9;
int N;
int A[MAXN + 10];
void done(int xr) {
printf("%d\n", xr);
exit(0);
}
int lg(int x) {
int cc = 0;
while(x > 1) {
x >>= 1;
cc++;
}
return cc;
}
bool cnt[40];
int main() {
scanf("%d", &N);... | a.cc: In function 'int main()':
a.cc:43:13: error: 'print' was not declared in this scope; did you mean 'rint'?
43 | print("-1\n");
| ^~~~~
| rint
|
s658134924 | p03880 | C++ | #include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define RFOR(i,m,n) for(int i=m;i>=n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0... | a.cc: In function 'int main()':
a.cc:34:24: error: 'N' was not declared in this scope
34 | for (size_t i=0; i<N; ++i) {
| ^
a.cc:37:11: error: 'res' was not declared in this scope; did you mean 'rep'?
37 | ++res;
| ^~~
| rep
|
s438798226 | p03880 | C++ | #include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define RFOR(i,m,n) for(int i=m;i>=n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0... | a.cc: In function 'int main()':
a.cc:34:24: error: 'N' was not declared in this scope
34 | for (size_t i=0; i<N; ++i) {
| ^
a.cc:49:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
49 | cout<<ans<<endl;
| ^~~
| abs
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.