submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s048833452 | p03702 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int n,a,b,h[100005];
bool check(long long k)
{
long long ck=k;
for(int i=0;i<n;i++)
{
if(k*b>=(long long) h[i]);
else if(k*a>=(long long) h[i])
{
t-=(long long) ceil((double) ((double) (h[i]-k*b))/((double) (a-b)));
if(t<0) return false;
}
els... | a.cc: In function 'bool check(long long int)':
a.cc:13:25: error: 't' was not declared in this scope
13 | t-=(long long) ceil((double) ((double) (h[i]-k*b))/((double) (a-b)));
| ^
|
s355340846 | p03702 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>
using namespace std;
const long long int mod=1000000009;
const long long int INF=1000000000;
const long long int MAX=1000000000;
int main()
{
long long int ... | a.cc: In function 'int main()':
a.cc:35:58: error: 'k' was not declared in this scope
35 | t+=max(0,(int)(ceil((float)(h[i]-k*b)/(float)a)));
| ^
|
s476415714 | p03702 | C++ | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f... | a.cc: In lambda function:
a.cc:28:33: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
28 | x += max(0, (h[i] - k*B + (A - B - 1)) / (A - B));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~... |
s956668168 | p03702 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int a,b;
cin>>a>>b;
float arr[n];
int mx = 0;
for(int i = 0;i<n;i++)
{
cin>>arr[i];
mx += int(ceil(arr[i]/a));
}
int mn = 1;
while(mn!= mx)
{
int mid = (mn+mx)/2;
int rem = mid;
long long int b_cm = mid*b;
int i;
for( i = 0;i<n;i++)
{
if(arr[i... | a.cc: In function 'int main()':
a.cc:41:10: error: expected '}' at end of input
41 | cout<<mn;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s466865025 | p03702 | C++ | #include "bits/stdc++.h"
#define MOD 1000000007
#define INF 11234567890
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;
LL N, A, B, h[112345];
LL low, high, mid;
bool check(LL T)
{
LL res = 0;
rep(i, N)
{
if (h[i] > B*T)
{
res += (h[i] - B*T) / (A ... | a.cc:8:1: error: extended character is not valid in an identifier
8 |
| ^
a.cc:11:1: error: extended character is not valid in an identifier
11 |
| ^
a.cc:25:1: error: extended character is not valid in an identifier
25 |
| ^
a.cc:30:1: error: extended character is not valid in... |
s087787431 | p03702 | C++ | #include <iostream>
typedef long long in;
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
in a,b,diff,h[123456],mid,l,r,temp,t=0,res;
int n;
cin>>n>>a>>b;
diff=a-b;
l=1; r=10e9+10;
in res=r;
for (int i=0;i<n;i++) cin>>h[i];
while (r-l>1){
mid = (l+r... | a.cc: In function 'int main()':
a.cc:13:8: error: redeclaration of 'in res'
13 | in res=r;
| ^~~
a.cc:8:44: note: 'in res' previously declared here
8 | in a,b,diff,h[123456],mid,l,r,temp,t=0,res;
| ^~~
|
s396757049 | p03702 | C++ | #include <iostream>
typedef long long in;
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
in a,b,diff,h[123456],mid,l,r,temp,t=0;
int n;
cin>>n>>a>>b;
diff=a-b;
l=1; r=10e9+10;
for (int i=0;i<n;i++) cin>>h[i];
while (r-l>1){
mid = (l+r)/2;
t=0;
... | a.cc: In function 'int main()':
a.cc:25:23: error: 'res' was not declared in this scope
25 | else r=mid-1; res=mid;
| ^~~
|
s418723759 | p03702 | C++ | #include <iostream>
#include <algorithm>
typedef long long ll;
#define FOR(i,a,b) for(ll i = (a);i < (b);++i)
#define REP(i,n) FOR(i,0,n)
#define debug(x) cout << #x << "=" << x << endl;
using namespace std;
int N,A,B;
int enemyLP[100000];
bool check(ll mid){
ll cnt = 0;
int addDmg = A-B;
int splashD... | a.cc: In function 'bool check(ll)':
a.cc:25:20: error: 'ceil' was not declared in this scope
25 | cnt += ceil((enemyLP[i] - splashDmg * mid) / addDmg);
| ^~~~
|
s928022905 | p03702 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<queue>
#include<map>
#include<stdio.h>
#include<string.h>
#include<string>
#include<string>
#include<set>
#include<stdlib.h>
#include<bitset>
#include<algorithm>
using namespace std;
#define ll long long
int n,a,b;
vector<int>v;
bool check(lon... | a.cc: In function 'bool check(long long int)':
a.cc:29:39: error: 'ceil' was not declared in this scope
29 | sum += max((ll)0, (ll)ceil((double)(v[i] - b*x) / (a - b)));
| ^~~~
|
s195767313 | p03702 | C++ | #include<iostream>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
using namespace std;
int main()
{
// 整数の入力
long long remain,i,N,temp,A,B,kari,remainCount,ACount,total,minBOnly,BOnlyCount,maxAOnly,AOnlyCount,minHP;
bool endFlag = false;
maxAOnly = 0;
vector<long long> hit... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from... |
s295184200 | p03702 | C++ | #include <bits/stdc++.h>
#define ALL(a) (a).begin(),(a).end()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) FOR(i,0,n)
#define RFOR(i,a,b) for(int i=(a)-1;i>=(b);i--)
#define rrep(i,n) RFOR(i,n,0)
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define vint vector<int>
#define vdbl vector<double>
#define vstr ... | a.cc: In function 'int main()':
a.cc:46:9: error: 'sum' was not declared in this scope
46 | sum = 0;
| ^~~
|
s117440974 | p03702 | C++ | // ARC057-D.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
#define int long long
#define INF (int)(1e9 + 7)
int n, a, b;
vector<int> h;
signed main()
{
cin.tie(0);
ios::sync_with_stdio(false);
cin... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s116868281 | p03702 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#define CK(N,A,B) (A<=N&&N<B)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define RREP(i,a,b) for(int i=(b-1);... | a.cc: In function 'bool check(long long int)':
a.cc:30:27: error: no matching function for call to 'max(int, long long int)'
30 | REP(i,0,N) sum += max(0, (H[i]-k*B+(A-B-1))/(A-B));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s263256546 | p03702 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
ll a, b, h[100000];
int can(ll k){
ll s = 0;
for(int i = 0; i < n; i++){
s += max(0, ((h[i] - a * k) + b - 1) / b);
if(s > k) return 0;
}
return 1;
}
int main(){
scanf("%d%lld%lld", &n, &a, &b);
for(int i = 0; i < n; i++) scanf("%ll... | a.cc: In function 'int can(ll)':
a.cc:11:25: error: no matching function for call to 'max(int, ll)'
11 | s += max(0, ((h[i] - a * k) + b - 1) / b);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/incl... |
s705705614 | p03702 | C++ | #include<iostream>
#include<fstream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<math.h>
#include<algorithm>
#include<iomanip>
#include<set>
using namespace std;
int n;
long long a, b, c, ans = 0;
vector<long long> h;
bool f(long long aa) {
long long an= 0;
for (int i = 0; i < n; i++... | a.cc: In function 'bool f(long long int)':
a.cc:23:42: error: expected ';' before ')' token
23 | an += (d+c-1) / c);
| ^
| ;
|
s576798869 | p03702 | C++ | #include<iostream>
#include<fstream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<math.h>
#include<algorithm>
#include<iomanip>
#include<set>
using namespace std;
int n;
long long a, b, c, ans = 0;
vector<long long> h;
bool f(long long aa) {
long long an= 0;
for (int i = 0; i < n; ... | a.cc: In function 'int main()':
a.cc:48:6: error: 'm' was not declared in this scope; did you mean 'ma'?
48 | if(f(m)) cout << mm << endl;
| ^
| ma
|
s926619863 | p03702 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int n,a,b;
cin>>n>>a>>b;
long long int h[n];
for(int i=0;i<n;++i){
cin>>h[i];
}
long long int l = -1, r = (long long int)1e9;
while(r-l>1){
long long int m=(l+r)/2;
long long int req=0;
for(int i=0;i<n;++i){
if(h[... | a.cc: In function 'int main()':
a.cc:16:43: error: 'res' was not declared in this scope; did you mean 'req'?
16 | if(h[i]-m*b < a-b)res++;
| ^~~
| req
a.cc:17:54: error: 'res' was not declared in t... |
s951143516 | p03702 | C++ | #include <iostream>
#include <vector>
using namespace std;
void display();
vector<long long> v;
int main(int argc, const char * argv[]) {
long long n, a, b;
long long x;
long long cnt, num;
//初期化
cnt = 0;
cin >> n >> a >> b;
for (long long i = 0; i < n; i++) {
... | a.cc: In function 'int main(int, const char**)':
a.cc:27:9: error: 'sort' was not declared in this scope; did you mean 'short'?
27 | sort(v.begin(), v.end());
| ^~~~
| short
|
s301901622 | p03702 | C++ | int main() {
ll N, A, B, Diff, h[100002];
scanf("%lld %lld %lld", &N, &A, &B);
Diff = A - B;
for (int i = 0; i < N; i++)
scanf("%lld", h + i);
std::sort(h, h + N);
h[N] = 0x7fffffffffffffffll;
ll up = 1000000000, down = 0, center = (up + down) / 2;
while (1 < (up - down)) {
ll adown;
for (adown = 0; ... | a.cc: In function 'int main()':
a.cc:2:9: error: 'll' was not declared in this scope
2 | ll N, A, B, Diff, h[100002];
| ^~
a.cc:3:34: error: 'N' was not declared in this scope
3 | scanf("%lld %lld %lld", &N, &A, &B);
| ^
a.cc:3:38: error: 'A' ... |
s122847950 | p03702 | C++ | #include <bits/stdc++.h>
#define ALL(a) (a).begin(),(a).end()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) FOR(i,0,n)
#define RFOR(i,a,b) for(int i=(a)-1;i>=(b);i--)
#define rrep(i,n) RFOR(i,n,0)
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define vint vector<int>
#define vdbl vector<double>
#define vstr ... | a.cc: In function 'int main()':
a.cc:58:27: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
58 | cout << 1 << end;
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/istream:41,
... |
s658830432 | p03702 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n,a,b;
cin >> n >> a >> b;
int h[n];
for(int i=0;i<n;i++){
cin >> h[i];
}
sort(h,h+n);
int ans=1;
int x=0;
bool flag=false;
while(){
while(h[x]<=ans*b){
x++;
if(x>=n-1){
flag=true;
br... | a.cc: In function 'int main()':
a.cc:18:9: error: expected primary-expression before ')' token
18 | while(){
| ^
|
s428300832 | p03702 | C++ | #include <iostream>
using namespace std;
int main(void){
int n,a,b;
int h[100000];
int m=0;
bool f;
cin >> n >> a >> b;
for (int i=0; i<n; i++) cin >> h[i];
while(1){
f=1;
sort(h,h+n);
h[n-1] -= a;
if(h[n-1]>0) f=0;
for (int i=0; i<n-1; i++){
h[i] -= b;
if(h[i]>0) f=0;
... | a.cc: In function 'int main()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(h,h+n);
| ^~~~
| short
|
s510704997 | p03702 | C++ | #include <stdio.h>
#include <algorithm>
using ll = long long;
int main() {
ll N, A, B, Diff, h[100001];
scanf("%lld %lld %lld", &N, &A, &B);
Diff = A - B;
for (int i = 0; i < N; i++)
scanf("%lld", h + i);
std::sort(h, h + N);
h[N] = LLONG_MAX;
ll up = 1000000000, down = 0, center = (up + down) / 2;
while (1... | a.cc: In function 'int main()':
a.cc:13:16: error: 'LLONG_MAX' was not declared in this scope
13 | h[N] = LLONG_MAX;
| ^~~~~~~~~
a.cc:3:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <algorithm>
+++ |+#inc... |
s152333375 | p03702 | C++ | #include <iostream>
#include <sstream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#include <cfloat>
#include <cmath>
#include <functional>
#include <forward_list>
#include <list>
#define DEBUG(x) cout << #x << "\t:" << x << endl;
#define EPS (1e-9)
#define I... | a.cc: In member function 'int Main::getAns(std::vector<int>&, int, int)':
a.cc:49:29: error: 'INT_MAX' was not declared in this scope
49 | int right = INT_MAX/2;
| ^~~~~~~
a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding... |
s521929965 | p03702 | C++ | 5 2 1
900000000
900000000
1000000000
1000000000
1000000000
-----------
この上が
読み込む
データ
この下は自由に
使える
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5 2 1
| ^
|
s809234829 | p03702 | C++ | #include<cstdio>
#include<algorithm>
#include<queue>
#include<iostream>
using namespace std;
const int N=1e5+1e3+7;
const long long M=1e10+1e3+7;
long long n,a,b,h[N],ans,dam,k,hh[N];
bool can(long long m)
{
ans=0;
memset(hh,0,sizeof(hh));
for(int i=1;i<=n;i++)
hh[i]=h[i]-b*m;
for(int i=1;i<=n;i++)
{
if(hh... | a.cc: In function 'bool can(long long int)':
a.cc:16:9: error: 'memset' was not declared in this scope
16 | memset(hh,0,sizeof(hh));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<iostream>
+++ |+#in... |
s724947194 | p03702 | C++ | #include<cstdio>
#include<algorithm>
#include<queue>
#include<iostream>
using namespace std;
const int N=1e5+1e3+7;
const long long M=1e10+1e3+7;
long long n,a,b,h[N],ans,dam,k,hh[N];
bool can(int m)
{
ans=0;
memset(hh,0,sizeof(hh));
for(int i=1;i<=n;i++)
hh[i]=h[i]-b*m;
for(int i=1;i<=n;i++)
{
if(hh[i]<=0... | a.cc: In function 'bool can(int)':
a.cc:16:9: error: 'memset' was not declared in this scope
16 | memset(hh,0,sizeof(hh));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<iostream>
+++ |+#include <cst... |
s409001752 | p03702 | C++ | #include<cstdio>
#include<algorithm>
#include<queue>
#include<iostream>
using namespace std;
const int N=1e5+1e3+7;
const long long M=1e10+1e3+7;
long long n,a,b,h[N],ans,dam,k,hh[N];
bool can(int m)
{
ans=0;
memset(hh,0,sizeof(hh));
for(int i=1;i<=n;i++)
hh[i]=h[i]-b*m;
for(int i=1;i<=n;i++)
{
if(hh[i]<=0... | a.cc: In function 'bool can(int)':
a.cc:16:9: error: 'memset' was not declared in this scope
16 | memset(hh,0,sizeof(hh));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<iostream>
+++ |+#include <cst... |
s849584149 | p03702 | C++ | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include... | a.cc: In function 'int main()':
a.cc:41:27: error: no matching function for call to 'max(long long int, int64)'
41 | int64 tt = max(0LL, h[j] - B * m);
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/... |
s496189664 | p03702 | C++ | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include... | a.cc: In function 'int main()':
a.cc:41:27: error: no matching function for call to 'max(long long int, int64)'
41 | int64 tt = max(0LL, h[j] - B * m);
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/... |
s733344605 | p03702 | C | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered_map>
#in... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s741594441 | p03702 | C++ | v | a.cc:1:1: error: 'v' does not name a type
1 | v
| ^
|
s869329257 | p03702 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<vector>
#include<unordered_map>
#include<unordered_set>
#include<list>
#include<queue>
#include<stack>
#include<string.h>
#include<functional>
#include<limits.h>
#define int long long
using namespace std;
int ... | a.cc: In function 'int main()':
a.cc:25:24: error: 'pow' was not declared in this scope
25 | int S = 0, G = pow(10, 15);//[S,G)
| ^~~
|
s691939199 | p03703 | Java | // copied
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdio>
#include <map>
using namespace std;
typedef long long LL;
const int maxn = 2e5 + 100;
int n, k;
LL a[maxn], c[maxn*4];
map<LL, int> M;
vector<LL> V;
void Modify(int x, int s){
for(; x <= n; x += x&(-x)) c[x] += s;
}
LL Query(int ... | Main.java:2: error: illegal character: '#'
#include <algorithm>
^
Main.java:3: error: illegal character: '#'
#include <iostream>
^
Main.java:4: error: illegal character: '#'
#include <vector>
^
Main.java:5: error: illegal character: '#'
#include <cstdio>
^
Main.java:6: error: illegal character: '#'
#include <map>
^
Mai... |
s658875859 | p03703 | C++ | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
using namespace __gnu_pbds;
using namespace std;
typedef
tree<
pair<ll,int>,
null_type,
less<pair<ll,int>>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
#define F... | a.cc:11:8: error: 'll' was not declared in this scope
11 | pair<ll,int>,
| ^~
a.cc:11:14: error: template argument 1 is invalid
11 | pair<ll,int>,
| ^
a.cc:13:13: error: 'll' was not declared in this scope
13 | less<pair<ll,int>>,
| ^~
a.cc:13:16: error: ... |
s198002561 | p03703 | C++ | //#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
//#include <x86intrin.h>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <bitset>
#include <vector>
#include <cmath>
#include <deque>
#include <queue>
#include <iomanip>
#include <stack>
#include <map>
#include <set... | a.cc:60:1: error: 'ordered_set' does not name a type
60 | ordered_set < pair <ll, int> > s;
| ^~~~~~~~~~~
a.cc: In function 'void Solve()':
a.cc:74:7: error: 's' was not declared in this scope
74 | s.in ({pref[i - 1] - k * (i - 1), i - 1});
| ^
|
s165633146 | p03703 | C++ | k | a.cc:1:1: error: 'k' does not name a type
1 | k
| ^
|
s715255526 | p03703 | C++ | /// IN THE NAME OF METAL
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pll;
#define sz(x) (ll) x.size()
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
... | a.cc: In function 'int main()':
a.cc:37:28: error: 'p' was not declared in this scope
37 | scanf("%lld%lld", &n, &p);
| ^
|
s353870185 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
using llong = long long int;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
const int MOD = 1000000007;
const int INF = 10000... | a.cc: In function 'int main(int, char**)':
a.cc:60:20: error: no matching function for call to 'std::vector<long long int>::erase(__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >, <unresolved overloaded function type>)'
60 | compresed.erase(unique(all(compresed)), compresed.end);
|... |
s953714426 | p03703 | C++ | #include <iterator>
#include <numeric>
#include <vector>
using namespace std;
int main(int argc, const char *argv[]) {
using ll = long long;
int n;
ll k;
cin >> n >> k;
vector<ll> va(n);
for (auto &a : va) {
cin >> a;
}
ll ans = 0;
vector<ll> csum{0};
partial_sum(va.begin(), va.end(), back_in... | a.cc: In function 'int main(int, const char**)':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >> n >> k;
| ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include <vector>
+++ |+#include <iostream>
... |
s189847117 | p03703 | C++ | #define ASIZE 200005
#include <bits/stdc++.h>
using namespace std;
long long ft[ASIZE],n=ASIZE+1;
typedef pair<long long,long long> pii;
void increment(long long p){
for(;p<=n;p+=(p & -p))ft[p]++;
}
long long query(long long p){
long long sum=0;
for(;p>0;p-=(p & -p))sum+=ft[p];
return sum;
}
long long main()... | cc1plus: error: '::main' must return 'int'
|
s759430621 | p03703 | C++ | #ifdef LOCAL
#pragma GCC optimize ("O0")
#else
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target ("avx")
#endif
#include <vector>
#include <set>
#include <map>
#include <tuple>
#include <queue>
#include <stack>
#include <bitset>
#include <functional>
#include <algorithm>
#include <ut... | In file included from /usr/include/c++/14/vector:63,
from a.cc:9:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <templa... |
s695401729 | p03703 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
import java.util.function.IntUnaryOperator;
import java.util.function.LongUnaryOperator;
import static com.yu212.Utils.println;
class Main {
static In in = new In();
sta... | Main.java:9: error: package com.yu212 does not exist
import static com.yu212.Utils.println;
^
Main.java:9: error: static import only from classes and interfaces
import static com.yu212.Utils.println;
^
Main.java:33: error: cannot find symbol
println(pair, segmentTree.get(pair.second))... |
s951127536 | p03703 | C++ | #include "bits/stdc++.h"
#define ll long long
#define fr first
#define sc second
using namespace std;
const int mnx = 1e7 + 9;
const int mod = 1e9 + 7;
const double PI = acos(-1);
ll n, k, a[mnx], t[mnx], h;
pair <int, int> z[mnx];
get(int x){
ll res = 0;
for(; x > 0; x -= (x & -x)){
res += t[x];
... | a.cc:14:1: error: ISO C++ forbids declaration of 'get' with no type [-fpermissive]
14 | get(int x){
| ^~~
a.cc:24:1: error: ISO C++ forbids declaration of 'upd' with no type [-fpermissive]
24 | upd(int x){
| ^~~
a.cc: In function 'int upd(int)':
a.cc:28:1: warning: no return statement in function retu... |
s796512096 | p03703 | C++ | #include "bits/stdc++.h"
#define ll long long
#define fr first
#define sc second
using namespace std;
const int mnx = 1e7 + 9;
const int mod = 1e9 + 7;
const double PI = acos(-1);
ll n, k, a[mnx], t[mnx], h;
pair <int, int> z[mnx];
get(int x){
ll res = 0;
for(; x > 0; x -= (x & -x)){
res += t[x];
... | a.cc:14:1: error: ISO C++ forbids declaration of 'get' with no type [-fpermissive]
14 | get(int x){
| ^~~
a.cc:24:1: error: ISO C++ forbids declaration of 'upd' with no type [-fpermissive]
24 | upd(int x){
| ^~~
a.cc: In function 'int upd(int)':
a.cc:28:1: warning: no return statement in function retu... |
s603908775 | p03703 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <string>
#include <cmath>
#include <map>
#include <iomanip>
#include <tuple>
#define INF 1000000009
#define LINF 1000000000000000009
#define double long double
#define all(a) a.begin(),a.end()
using namespace std;
typede... | a.cc: In function 'int main()':
a.cc:64:31: error: too few arguments to function 'll query(ll, ll, ll, ll, ll)'
64 | ll res = query(262143, 262144 + s[i], 262143,524287);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:32:4: note: declared here
32 | ll query(ll a,... |
s101978600 | p03703 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define MOD 1000000007
using namespace std;
//https://ei1333.github.io/luzhiled/snippets/structure/segment-tree.html
template <typename... | a.cc:16:15: error: 'function' does not name a type; did you mean 'union'?
16 | using F = function<Monoid(Monoid, Monoid)>;
| ^~~~~~~~
| union
a.cc:21:11: error: 'F' does not name a type
21 | const F f;
| ^
a.cc:24:30: error: 'F' does not name a type
... |
s588973617 | p03703 | C++ | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, int> P;
template<typename Monoid>
struct SegmentTree {
using F = function<Monoid(Monoid, Monoid)>;
int sz;
vector<Monoid> seg;
const F f;
const Monoid M1;
... | a.cc:11:15: error: 'function' does not name a type; did you mean 'union'?
11 | using F = function<Monoid(Monoid, Monoid)>;
| ^~~~~~~~
| union
a.cc:16:11: error: 'F' does not name a type
16 | const F f;
| ^
a.cc:19:30: error: 'F' does not name a type
... |
s221025726 | p03703 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<cmath>
using namespace std;
const int N=200005;
struct node{
long long tot;
int id;
};
int n,k;
long long a[N];
node b[N];
bool cmp(node a,node b)
{
return a.tot<b.tot;
}
int lowbit(int x)
{
return (x&-x);
}
void... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from a.cc:3:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterat... |
s634923496 | p03703 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(int argc, char** argv) {
long long N, K;
cin >> N >> K;
vector<long long> a(N), a_sum(N+1);
for (int i = 0; i < N; i++)
cin >> a[i];
a_sum[0] = 0;
for (int i = 1; i <= N; i++)
a_sum[i] = a_sum[i - 1] + ... | a.cc: In function 'int main(int, char**)':
a.cc:24:26: error: 'sqrt' was not declared in this scope; did you mean 'n_sqrt'?
24 | int n_sqrt = int(sqrt(N)) + 1;
| ^~~~
| n_sqrt
|
s828010208 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef pair<ll, int> lli;
typedef vector<lli> vlli;
int bit[100010], N;
//0--iまでの和
int sum(int i){
ans=0;
while(i>0){
ans+=bits[i];
i-=i&-i;
}
return ans;
}
int add(int i, int x){
w... | a.cc: In function 'int sum(int)':
a.cc:14:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
14 | ans=0;
| ^~~
| abs
a.cc:16:10: error: 'bits' was not declared in this scope; did you mean 'bit'?
16 | ans+=bits[i];
| ^~~~
| bit
a.cc: In function ... |
s683302891 | p03703 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
struct BIT {
int N;
vector<int> data;
explicit BIT(int n) : N(n + 1), data(n + 1) {}
void add(int i, int v) {
for(int x = i; x < N; x += x & -x) {
data[x] += v;
}
}
int get(int i) {
int ret = 0;
for(int x ... | a.cc: In function 'int main()':
a.cc:28:10: error: 'll' was not declared in this scope
28 | vector<ll> A(N);
| ^~
a.cc:28:12: error: template argument 1 is invalid
28 | vector<ll> A(N);
| ^
a.cc:28:12: error: template argument 2 is invalid
a.cc:30:13: error: invalid types 'int[... |
s424725431 | p03703 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#include <cmath>
#include <iomanip>
#include <numeric>
#include <set>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
typed... | a.cc: In function 'int main()':
a.cc:82:5: error: 'memset' was not declared in this scope
82 | memset(bit, 0, sizeof(bit));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include <set>
+++ |+#include <cstring>
1... |
s212620658 | p03703 | C++ | #include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<ctime>
#include<set>
#include<iomanip>
#define sqr(x) (x)*(x)
#define fz1(i,n) for ((i)=1;(i)<=(n);(i)++)
#define fd1(i,n) for ((i)=(n);(i)>=1;(i)--)
#define fz0g(i,n) for ((i)=0;(i)<=... | a.cc: In function 'void split(long long int, long long int, long long int&, long long int&)':
a.cc:46:33: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
46 | split(r[x],y,r[x],sr);
| ~~~^
a.cc:37:47: note: initializ... |
s994986927 | p03703 | C++ |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=500005;
ll ans,a[MAXN],s[MAXN],c[MAXN],ss[MAXN],n,k;
map to;
ll lowbit(ll x){
return x & -x;
}
void change(ll x,ll y){
while (x<=n){
// printf("%d ",x);
c[x]+=y;
x+=lowbit(x);
}
return;
}
ll sum(ll x){
ll s=0;
while (x>=1){
s+=c[... | a.cc:11:5: error: class template argument deduction failed:
11 | map to;
| ^~
a.cc:11:5: error: no matching function for call to 'map()'
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:2:
/usr/include... |
s815895840 | p03703 | C++ | #include<bits/stdc++.h>
using namespace std;
long long aa;bool bb;char ch;
long long scan()
{
while(ch=getchar(),(ch<'0'||ch>'9')&&ch!='-');
ch=='-'?(bb=1,aa=0):(bb=0,aa=ch-48);
while(ch=getchar(),(ch>='0'&&ch<='9'))
aa=aa*10+ch-48;
return (bb?(-aa):(aa));
}
//用树状数组求逆序数
long long Length;
struct Node
{
... | a.cc: In function 'int main()':
a.cc:66:17: error: reference to 'array' is ambiguous
66 | array[i]=scan()-k;
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_6... |
s726119503 | p03703 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define N 200010
using namespace std;
int n,k,
long long ans=0,aux[N],sum[N];
long long tree[N<<2];
int lowbit(int x)
{
return x&-x;
}
long long getsum(int x)
{
long long ans=0;
for(int i=x;i;i-=lowbit(i))
ans+=tree[i];
return ans;
}
void ad... | a.cc:8:1: error: expected unqualified-id before 'long'
8 | long long ans=0,aux[N],sum[N];
| ^~~~
a.cc: In function 'int main()':
a.cc:29:16: error: 'sum' was not declared in this scope
29 | memset(sum,0,sizeof(sum));
| ^~~
a.cc:30:16: error: 'aux' was not declared in this scope... |
s551676479 | p03703 | C++ | #include <bits/stdc++.h>
#define lowbit(x) x & -x
using namespace std;
const int N = 1e5 + 10;
typedef long long LL:
LL n, k;
LL a[N], sum[N], c[N];
inline void insert(LL x) {
for(; x <= n; x += lowbit(x))
c[x] += 1;
}
inline LL query(LL x) {
int ans = 0;
for(; x; x -= lowbit(x))
ans += c[x];
return ans;... | a.cc:8:21: error: found ':' in nested-name-specifier, expected '::'
8 | typedef long long LL:
| ^
| ::
a.cc:8:19: error: 'LL' has not been declared
8 | typedef long long LL:
| ^~
a.cc:10:4: error: expected initializer before 'n'
10 |... |
s347333142 | p03703 | C++ | #include <bits/stdc++.h>
typedef long long LL;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
random_device rnd;
mt19937 mt(rnd());
class Myset {
Myset *lch, *rch;
LL value;
LL size;
Myset* update() {
this->size = sz(this->lch) + 1 + sz(this->rch);
return... | a.cc: In constructor 'Myset::Myset()':
a.cc:37:54: error: class 'Myset' does not have any field named 'pri'
37 | Myset() : lch(NULL), rch(NULL), value(0), size(1), pri(mt()) {}
| ^~~
a.cc: In constructor 'Myset::Myset(LL)':
a.cc:38:58: error: class 'Myset'... |
s008528006 | p03703 | C++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 2e5 + 5;
int n, k, a[N], used[N], cnt = 0;
long long f[N], bit[N];
vector <pair <long long, int> > comp;
void update (int x, int val) {
for (int i = x; i < N; i += i & -i) bit[i] += val;
}
long long get (int x) {
long long a... | cc1plus: error: '::main' must return 'int'
|
s405283256 | p03703 | Java | import java.io.*;
import java.math.*;
import java.util.*;
import static java.util.Arrays.fill;
import static java.lang.Math.*;
import static java.util.Arrays.sort;
import static java.util.Collections.sort;
public class MeaningfulMean {
public static int mod = 1000000007;
public static long INF = (1L << 60);
stati... | Main.java:10: error: class MeaningfulMean is public, should be declared in a file named MeaningfulMean.java
public class MeaningfulMean {
^
1 error
|
s473013735 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mod=1e9+7;
ll
ll cnt=0;
void fun(ll length,ll k)
{
ll sum=0;
ll num=0;
ll flag=-1,flag1=1;
ll n=pow((float)2,length);
for(int i=0; i<n; i++)
{
sum=0;
num=0;
flag=-1;
flag1=1;
ll t... | a.cc:3:12: error: 'long long long' is too long for GCC
3 | #define ll long long
| ^~~~
a.cc:6:1: note: in expansion of macro 'll'
6 | ll cnt=0;
| ^~
a.cc:3:17: error: 'long long long' is too long for GCC
3 | #define ll long long
| ^~~~
a.cc:6:1: note: in expansio... |
s971409415 | p03703 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=200005;
ll num[maxn],a[maxn],ans;
int n,rank[maxn],f[maxn],k,ky;
inline int read(){
int x=0; char ch=getchar();
for(;!isdigit(ch);ch=getchar());
for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
return x;
}
inline void update(int x,int y){... | a.cc: In function 'int main()':
a.cc:24:31: error: reference to 'rank' is ambiguous
24 | for(int i=1;i<=n;i++) rank[i]=lower_bound(num+1,num+ky+1,a[i])-num;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/... |
s394782713 | p03703 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=200005;
ll num[maxn],a[maxn],ans;
int n,rank[maxn],f[maxn],k,ky;
inline int read(){
int x=0; char ch=getchar();
for(;!isdigit(ch);ch=getchar());
for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
return x;
}
inline void update(int x,int y){... | a.cc: In function 'int main()':
a.cc:24:31: error: reference to 'rank' is ambiguous
24 | for(int i=1;i<=n;i++) rank[i]=lower_bound(num+1,num+ky+1,a[i])-num;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/... |
s182647384 | p03703 | C++ | #include<iostream>
#define MAX 200002
#define MAX_A 1000000002
using namespace std;
int a[MAX];
int l[MAX / 2 + 2], r[MAX / 2 + 2];
long long Merge(int a[], int n, int left, int mid, int right) {
int i, j;
long long cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (i = 0; i < n1; i++) {
l[i] = a[left + ... | a.cc: In function 'int main()':
a.cc:59:9: error: 'reverse' was not declared in this scope
59 | reverse(a, a + n);
| ^~~~~~~
|
s262309593 | p03703 | C++ | #include <bits/stdc++.h>
#define maxn 200010
using namespace std;
typedef long long LL;
LL c[maxn], a[maxn], b[maxn];
int n, k;
int lowbit(int x) { return x & (-x); }
LL query(int x) { LL ret=0; while (x) ret += c[x], x -= lowbit(x); return ret; }
void add(int x) { while (x <= tot) ++c[x], x += lowbit(x); }
int main() ... | a.cc: In function 'void add(int)':
a.cc:9:31: error: 'tot' was not declared in this scope
9 | void add(int x) { while (x <= tot) ++c[x], x += lowbit(x); }
| ^~~
|
s725848722 | p03703 | C++ | #include <iostream>
#include <vector>
#include <deque>
#include <math.h>
#include <set>
#include <iomanip>
#include <time.h>
#include <list>
#include <stdio.h>
#include <queue>
#include <map>
#include <algorithm>
#include <assert.h>
#include <memory.h>
#define mk make_pair
#define sc second
#define fr first
#define pb... | a.cc: In function 'void Merge_sort(long long int, long long int)':
a.cc:49:20: error: expected primary-expression before ';' token
49 | ans += ;
| ^
a.cc: At global scope:
a.cc:59:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
59 | main ()
... |
s293837753 | p03703 | C++ | //#include "IntMod.h"
//typedef IntMod<1000000007> MInt;
//#include "Union_Find.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include <functional>
#include <cmath>
#include <stack>
#include <queue>
#include <... | a.cc: In instantiation of 'T SegmentTree<T>::Query(int, int) [with T = int]':
a.cc:173:17: required from here
173 | ans += S.Query(0, C[i].second + 1);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:121:15: error: 'assert' was not declared in this scope
121 | assert(Is_val... |
s242304853 | p03703 | C++ | 80 75 73 93 73 73 10101 97 -1 -1 114 -1 10113 118 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 80 75 73 93 73 73 10101 97 -1 -1 114 -1 10113 118
| ^~
|
s594606091 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int const N = 200 * 1000 + 16;
int a[N];
int n, k;
struct node {
static mt19937 rd = mt19937(time(0));
ll x;
int s = 1;
int y = rd();
node* l = 0;
node* r = 0;
node(ll v) {
x = v;
}
~node() {
delete l;
delete... | a.cc:12:18: error: in-class initialization of static data member 'std::mt19937 node::rd' of non-literal type
12 | static mt19937 rd = mt19937(time(0));
| ^~
a.cc:12:38: error: call to non-'constexpr' function 'std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __... |
s332409965 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int const N = 200 * 1000 + 16;
int a[N];
int n, k;
struct node {
static mt19937 rd(time(0));
ll x;
int s = 1;
int y = rd();
node* l = 0;
node* r = 0;
node(ll v) {
x = v;
}
~node() {
delete l;
delete r;
}
... | a.cc:12:21: error: 'time' is not a type
12 | static mt19937 rd(time(0));
| ^~~~
a.cc:12:26: error: expected ')' before numeric constant
12 | static mt19937 rd(time(0));
| ~^
| )
a.cc:12:26: error: expected ')' before numeri... |
s882648786 | p03703 | C++ | #include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;
struct poi{ll sum,pos;}a[200010];
ll n,k,ans,cnt,tree[200010],lisan[200010];
void read(ll &k)
{
k=0;int f=1;char c=getchar();
while(c<‘0‘||c>‘9‘)c==‘-‘&&(f=-1),c=getchar();
w... | a.cc:13:13: error: extended character ‘ is not valid in an identifier
13 | while(c<‘0‘||c>‘9‘)c==‘-‘&&(f=-1),c=getchar();
| ^
a.cc:13:13: error: extended character ‘ is not valid in an identifier
a.cc:13:20: error: extended character ‘ is not valid in an identifier
13 | while(c<‘0‘||c>‘9... |
s779492377 | p03703 | C | #include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
#define INF 0x3f3f3f3f
typedef long long LL;
const int MAX_N = 200000 +10;
int f[MAX_N][20];
int query(int i,int j)
{
int k = log2(j-i+1);
return max(f[i][k],f[j-(1 << k... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s300956958 | p03703 | C++ | #include<iostream>
#include<cstdio>
#include<map>
#include<algorithm>
using namespace std;
typedef long long ll;
map<ll,int> t;
int cnt;
const int N=2e5+5;
int n;ll k,a[N]={0},as[N];
int bit[N]={0};
void add(int x,int val) {
while(x<cnt) bit[x]+=val,x+=x&-x;
}
int sum(int x) {
int s=0;while(x) s+=bit[x],x-=x&-x... | a.cc: In function 'int main()':
a.cc:29:25: error: expected ';' before '}' token
29 | add(t[a[i]],1);a
| ^
| ;
30 | }
| ~
|
s584855321 | p03703 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
const int maxn=200005;
struct node
{
ll index,value;
}a[maxn];
ll C[maxn],n,k;
//离散化排序;
int cmp1(node a,node b)
{
if(a.value!=b.value)
return a.value<b.value;
return a.index<b.index;
}
int cmp2(node a,node... | a.cc:10:5: error: 'll' does not name a type
10 | ll index,value;
| ^~
a.cc:12:1: error: 'll' does not name a type
12 | ll C[maxn],n,k;
| ^~
a.cc: In function 'int cmp1(node, node)':
a.cc:17:10: error: 'struct node' has no member named 'value'
17 | if(a.value!=b.value)
| ^... |
s133634543 | p03703 | C++ | #include <bits/stdc++.h>
#define show(x) cout << #x << " = " << x << endl
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v)
{
os << "sz=" << v.size() << "\n[";
for (const auto& p : v) {
... | a.cc:188:10: error: redefinition of 'template<class T> std::ostream& operator<<(std::ostream&, const std::vector<_Tp>&)'
188 | ostream& operator<<(ostream& os, const vector<T>& v)
| ^~~~~~~~
a.cc:11:10: note: 'template<class T> std::ostream& operator<<(std::ostream&, const std::vector<_Tp>&)' previousl... |
s347854816 | p03703 | C++ | #include<stdio.h>
#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<math.h>
#include<queue>
#include<stack>
#include<map>
using namespace std;
const int size=2e6+10;
const int INF=1e9;
typedef long long LL;
//LL tree[size];
LL a[size];
LL b[size];
//int lowbit(int x)... | a.cc:16:6: error: reference to 'size' is ambiguous
16 | LL a[size];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44... |
s098932344 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
const int size=1e5+10;
const int INF=1e9;
int tree[size];
int a[size];
typedef long long LL;
int lowbit(int x)
{
return x&(-x);
}
void update(int x)
{
while(x<size)
{
tree[x]+=1;
x+=lowbit(x);
}
}
int ask(int x)
{
int sum=0;
while(x)
... | a.cc:5:10: error: reference to 'size' is ambiguous
5 | int tree[size];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/inclu... |
s654060820 | p03703 | Java | import java.util.*;
public class TaskE { // Main
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
long k = scanner.nextLong();
long[] a = new long[n];
for(int i = 0; i < n; i ++) {
a[i] = scanner.nextLong() - k;
}
long[] sum = new long[n];
... | Main.java:3: error: class TaskE is public, should be declared in a file named TaskE.java
public class TaskE { // Main
^
1 error
|
s000297724 | p03703 | C++ | #include<iostream>
using namespace std;
int main() {
int n=0,k=0,r=0;
int a[2*(10^5)];
cin >> n >> k;
}
cout << r << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:20: warning: result of '10^5' is 15; did you mean '1e5'? [-Wxor-used-as-pow]
6 | int a[2*(10^5)];
| ^
| ---
| 1e
a.cc:6:18: note: you can silence this warning by using a hexadecimal constant (0xa ra... |
s062092106 | p03703 | C++ | #include<iostream>
using namespace std;
int main() {
int n=0,k=0,r=0;
int a[2e50];
cin >> n>>k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; ++i) {
int z = 0;
for (int j = i; j < n; ++j)
{
z += a[j];
if (z / (j+1-i) >= k) {
++r;
}
}
}
cout << r << endl;
return 0... | a.cc: In function 'int main()':
a.cc:6:15: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
6 | int a[2e50];
| ^~~~
a.cc:6:15: error: could not convert '2.0000000000000002e+50' from 'double' to 'long unsigned int'
6 | int a[2e50];
... |
s681734472 | p03703 | C++ | #include<iostream>
using namespace std;
int main() {
int n=0,k=0,r=0;
int a[2*10^50];
cin >> n;
cin >> k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; ++i) {
int z = 0;
for (int j = i; j < n; ++j)
{
z += a[j];
r++
}
}
cout << r << endl;
} | a.cc: In function 'int main()':
a.cc:19:28: error: expected ';' before '}' token
19 | r++
| ^
| ;
20 |
21 | }
| ~
|
s762851169 | p03703 | C++ | int main(){
while(){}} | a.cc: In function 'int main()':
a.cc:2:7: error: expected primary-expression before ')' token
2 | while(){}}
| ^
|
s429228279 | p03703 | C | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
#define rep(i,n) for(long long i = 0; i < (long long)(n); i++)
#define repi(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define mt make... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s751794179 | p03703 | C++ | #![allow(unused_imports)]
use std::io;
use std::cmp::*;
use std::collections::*;
#[allow(dead_code)]
const M: i64 = 1e9 as i64 + 7;
fn read_line() -> String {
let stdin = io::stdin();
let mut buf = String::new();
stdin.read_line(&mut buf).unwrap();
buf
}
#[allow(dead_code)]
fn read<T>() -> T where T: s... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #![allow(unused_imports)]
| ^
a.cc:5:2: error: invalid preprocessing directive #[
5 | #[allow(dead_code)]
| ^
a.cc:14:2: error: invalid preprocessing directive #[
14 | #[allow(dead_code)]
| ^
a.cc:18:2: error: invalid preprocessing ... |
s382818942 | p03703 | Java | /**
* @author Finn Lidbetter
*/
import java.util.*;
import java.io.*;
import java.awt.geom.*;
public class TaskE {
static long[] t;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();... | Main.java:8: error: class TaskE is public, should be declared in a file named TaskE.java
public class TaskE {
^
1 error
|
s251258334 | p03703 | C++ | #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
typedef long long ll;
const int M = 2e5 + 10;
struct TnT {
int pos;
ll val;
}nn[M];
struct node {
int l , r;
ll sum;
}T[M << 2];
bool cmp(TnT a , TnT b) {
if(a.val == b.val) return a.pos < b.pos;
return a.val < b.val;
... | a.cc: In function 'int main()':
a.cc:61:5: error: 'sort' was not declared in this scope; did you mean 'short'?
61 | sort(nn + 1 , nn + 1 + n , cmp);
| ^~~~
| short
|
s483805550 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fs first
#define se second
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb emplace_back
using pii = pair<int, int>;
using vi = vector<int>;
using lint = long long;
const int inf = 1001001001;
const l... | cc1plus: error: '::main' must return 'int'
|
s360967557 | p03703 | C++ | 3 6
7
5
7
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 6
| ^
|
s687808051 | p03703 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
const int maxn=2e5+10;
typedef long long LL;
#define x first
#define y second
int n;
LL k;
LL a[maxn];
pair<LL,int> sum[maxn];
int rank[maxn];
LL ans,bit[maxn];
int lowbit(int p)
{
return p&(-p);
}
LL search(int p)
{
LL ans=0;
while(p>0)
{
ans+=bit[p]... | a.cc: In function 'int main()':
a.cc:57:13: error: reference to 'rank' is ambiguous
57 | rank[sum[i].y]=i;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/alg... |
s303019885 | p03703 | Java | import java.util.*;
import java.io.*;
import java.math.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class Main{
static long mod=1000000007;
static int dx[]={1,-1,0,0};
static int dy[]={0,0,1,-1};
// static int dx[]={1,-1,0,... | Main.java:47: error: illegal start of expression
ans += bit.sum(public void testName() throws Exception {
^
Main.java:49: error: illegal start of type
});
^
Main.java:50: error: <identifier> expected
bit.add(t,1);
^
Main.java:50: error: <identifie... |
s066813638 | p03703 | 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:68:9: error: 'UNIQUE' was not declared in this scope
68 | UNIQUE(B);
| ^~~~~~
a.cc:75:9: error: 'BITree' was not declared in this scope
75 | BITree BIT(size);
| ^~~~~~
a.cc:79:9: error: 'BIT' was not declared in this scope
79 | ... |
s648093349 | p03703 | C++ | #include <cstdio>
#include <cstdint>
#include <cinttypes>
#include <iostream>
#include <vector>
#include <set>
#include <utility>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <string>
using u8t = std::uint64_t;
using i8t = std::int64_t;
#define F(I,N) for(i8t I=0,_N=N;I<_N;I++)
#define R(V) i8t V;s... | a.cc: In function 'int main()':
a.cc:37:18: error: no match for 'operator-' (operand types are 'std::_Rb_tree_const_iterator<long int>' and 'std::multiset<long int>::iterator' {aka 'std::_Rb_tree<long int, long int, std::_Identity<long int>, std::less<long int>, std::allocator<long int> >::const_iterator'})
37 | ... |
s251824642 | p03703 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
struct data {
int pos, num;
};
main()
{
int n, k;
int sum[200005] = {}
bool flag[200005] = {};
int ans = 0;
queue < data > que;
cin >> n >> k;
for(int i = 1; i <= n; i++) {
cin >> sum[i];
sum[i] += sum[i - 1];
if(sum[... | a.cc:10:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
10 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'bool'
14 | bool flag[200005] = {};
| ^~~~
a.cc:16:16: error: template argument 1 is invalid
16 | queue < data... |
s847649736 | p03703 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int N, K, a;
cin >> N >> K;
vector<int> vec(N, 0);
for(int i = 0; i < N; i ++)
{
cin >> a;
vec[i] = a - K;
}
long long sum;
long long count = 0;
for(int i = 0; i < N; i ++)
{
sum =... | a.cc: In function 'int main()':
a.cc:19:9: error: 'sum_comp' was not declared in this scope
19 | sum_comp = 0;
| ^~~~~~~~
|
s812229274 | p03703 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered_map>
#in... | In file included from /usr/lib/gcc/x86_64-linux-gnu/14/include/smmintrin.h:812,
from /usr/lib/gcc/x86_64-linux-gnu/14/include/nmmintrin.h:31,
from a.cc:18:
/usr/lib/gcc/x86_64-linux-gnu/14/include/popcntintrin.h: In member function 'int Bitvector::rank(int, bool)':
/usr/lib/gcc/x86_64-... |
s974929712 | p03703 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered_map>
#in... | In file included from /usr/lib/gcc/x86_64-linux-gnu/14/include/smmintrin.h:812,
from /usr/lib/gcc/x86_64-linux-gnu/14/include/nmmintrin.h:31,
from a.cc:18:
/usr/lib/gcc/x86_64-linux-gnu/14/include/popcntintrin.h: In member function 'int Bitvector::rank(int, bool)':
/usr/lib/gcc/x86_64-... |
s062255906 | p03703 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const long long N=4e5+1e3+7;
long long n,a[N],k,s[N],ans;
long long tot,root,size[N],num[N],key[N],fa[N],son[N][2];
void pushup(long long x)
{
size[x]=size[son[x][0]]+size[son[x][1]]+num[x];
}
void rotate(long long x)
... | a.cc: In function 'void pushup(long long int)':
a.cc:15:9: error: reference to 'size' is ambiguous
15 | size[x]=size[son[x][0]]+size[son[x][1]]+num[x];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s139793370 | p03703 | C++ | #include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<sstream>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using namespace std;
using uint = unsigned int;
using ll = long long;
const int M = 1e9 + 7;
const ll ... | a.cc: In function 'int main()':
a.cc:96:9: error: 'printBTree' was not declared in this scope; did you mean 'printArr'?
96 | printBTree(sorted.root);
| ^~~~~~~~~~
| printArr
|
s749519368 | p03703 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int N = 0, K = 0;
int ans = 0;
cin >> N >> K;
vector<double> v(N);
for (int i = 0; i < N;i++){
cin >> v[i];
}
for (int i = 0; i < N;i++){
double sum = 0;
double c = 0;
... | a.cc: In function 'int main()':
a.cc:21:22: error: expected primary-expression before '>' token
21 | if(sum/c=>K)
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.