submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s283706376
p03987
C++
题解,解压密码ssd2 https://www.51nod.com/upload/%E6%A8%A1%E6%B5%8B2.rar 比赛网址 https://www.51nod.com/Contest/ContestDescription.html#!#contestId=119
a.cc:1:1: error: '\U00009898\U000089e3\U0000ff0c\U000089e3\U0000538b\U00005bc6\U00007801ssd2' does not name a type 1 | 题解,解压密码ssd2 | ^~~~~~~~~~~~~~~~~~
s944482109
p03987
C++
#include <bits/stdc++.h> #include <iostream> #include <iomanip> #include <ios> #include <vector> #include <string> #include <algorithm> #include <functional> #include <queue> #include <stack> #include <set> #include <cmath> #include <bitset> #include <map> using namespace std; typedef long long ll; #define mp make_pair...
a.cc: In function 'int main()': a.cc:70:2: error: expected '}' at end of input 70 | } | ^ a.cc:44:12: note: to match this '{' 44 | rep1(g,n){ | ^ a.cc:70:2: error: expected '}' at end of input 70 | } | ^ a.cc:39:1: note: to match this '{' 39 | { | ^
s506485335
p03987
C++
#include<bits/stdc++.h> using namespace std; long a[1<<18][1<<18],ans; int main(){ long N; cin>>N; for(int i=0;i<N;i++){ cin>>a[0][i]; ans+=a[0][i]; } for(int i=1;i<N;i++){ for(int j=i;j<N;j++){ a[i][j]=min(a[i-1][j],a[i-1][j-1]); ans+=a[i][j]; } } cout<<ans<<endl; }
/tmp/ccXzg8p6.o: in function `main': a.cc:(.text+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccXzg8p6.o a.cc:(.text+0x75): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccXzg8p6.o a.cc:(.text+0x150): relocation ...
s586613004
p03987
C++
#include<bits/stdc++.h> using namespace std; long N,a[1<<18][1<<18],ans; int main(){ cin>>N; for(int i=0;i<N;i++){ cin>>a[0][i]; ans+=a[0][i]; } for(int i=1;i<N;i++){ for(int j=i;j<N;j++){ a[i][j]=min(a[i-1][j],a[i-1][j-1]); ans+=a[i][j]; } } cout<<ans<<endl; }
/tmp/cc8qHw0T.o: in function `main': a.cc:(.text+0x6e): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc8qHw0T.o a.cc:(.text+0x78): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc8qHw0T.o a.cc:(.text+0x156): relocation ...
s594357096
p03987
C++
/* ID: div1der LANG: C++ 17 MOOD: CALM READINESS: PRETTY WELL */ #include <iostream> #include <fstream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <queue> #include <deque> #include <stack> #include <set> #include <map> #include <bitset> #incl...
a.cc: In function 'int main()': a.cc:155:28: error: expected ')' before ';' token 155 | scnaf("%lld", &a[i];) | ~ ^ | ) a.cc:155:29: error: expected primary-expression before ')' token 155 | scnaf("%lld", &a[i];) | ...
s092611157
p03987
C++
int main()return 0;
a.cc: In function 'int main()': a.cc:1:18: error: expected identifier before numeric constant 1 | int main()return 0; | ^ a.cc:1:11: error: named return values are no longer supported 1 | int main()return 0; | ^~~~~~ a.cc:1:20: error: expected '{' at end of input 1 | i...
s673954822
p03987
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s891942319
p03987
C++
#include<bits/stdc++.h> #define mp make_pair using namespace std; int n; int arr[2000005]; stack< pair<int,int> > st; int main() { cin >> n; for(int i = 0; i < n; i++) cin >> arr[i]; int curSum = 0, res = 0; for (int j = 0; j < n; j++) { if((!st.empty()) && arr[j] >= st.top().fir...
a.cc: In function 'int main()': a.cc:34:14: error: expected '}' at end of input 34 | return 0; | ^ a.cc:12:1: note: to match this '{' 12 | { | ^
s096228548
p03987
C++
#include<bits/stdc++.h> #define mp make_pair using namespace std; int n; int arr[100005]; stack< pair<int,int> > st; int main() { cin >> n; for(int i = 0; i < n; i++) cin >> arr[i]; int curSum = 0, res = 0; for (int j = 0; j < n; j++) { if((!st.empty()) && arr[j] >= st.top().firs...
a.cc: In function 'int main()': a.cc:34:14: error: expected '}' at end of input 34 | return 0; | ^ a.cc:12:1: note: to match this '{' 12 | { | ^
s082789752
p03987
C++
#include <bits/stdc++.h> using namespace std; using lint=long long; int main(){ lint sum=0ll; int n;cin>>n; vector<lint> a(n); vector<int> pos(n),l(n),r(n); for(int i=0;i<n;i++){ cin>>a[i];pos[a[i]]=i; } for(int i=0;i<n;i++){ l[i]=i; r[i]=i; } for(int i=n;i>=1;i--){ int p=pos[i]; sum+=i*(p-l[p]+1...
a.cc: In function 'int main()': a.cc:22:27: error: expected ';' before ']' token 22 | if(p<n-1)l[r[p+1]]]=l[p]; | ^ | ; a.cc:22:26: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_...
s755961057
p03987
C++
#include "/Users/daikikodama/Desktop/stdc++.h" //#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) #define int long long #define double long double #define mod 1000000007 #define F first #define S second #define P pair<long long,long long> #define all(a) a.begin(),a.end() #define INF 10000000000000000 ...
a.cc:1:10: fatal error: /Users/daikikodama/Desktop/stdc++.h: No such file or directory 1 | #include "/Users/daikikodama/Desktop/stdc++.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s314102998
p03987
C++
#include <stdio.h> #include <algorithm> #include <set> #include <vector> #include <string.h> #include <string> #include <bitset> #include <stdlib.h> #include <assert.h> #include <cmath> #include <chrono> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vecto...
a.cc: In function 'int main()': a.cc:32:5: error: 'cout' was not declared in this scope 32 | cout<<ans<<endl; | ^~~~ a.cc:12:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 11 | #include <chrono> +++ |+#include <iostream> 12 | #de...
s260143887
p03987
C++
#include <stdio.h> #include <algorithm> #include <set> #include <vector> #include <string.h> #include <string> #include <bitset> #include <stdlib.h> #include <assert.h> #include <cmath> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All...
a.cc: In function 'int main()': a.cc:31:5: error: 'cout' was not declared in this scope 31 | cout<<ans<<endl; | ^~~~ a.cc:11:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 10 | #include <cmath> +++ |+#include <iostream> 11 | #def...
s420821403
p03987
C++
#include <stdio.h> #include <algorithm> #include <set> #include <vector> #include <string.h> #include <string> #include <bitset> #include <stdlib.h> #include <assert.h> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All(c) (c).begin(),(...
a.cc: In function 'int main()': a.cc:30:5: error: 'cout' was not declared in this scope 30 | cout<<ans<<endl; | ^~~~ a.cc:10:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 9 | #include <assert.h> +++ |+#include <iostream> 10 | #...
s428833386
p03987
C++
#include <stdio.h> #include <algorithm> #include <set> #include <vector> #include <string.h> #include <string> #include <stdlib.h> #include <assert.h> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All(c) (c).begin(),(c).end() using nam...
a.cc: In function 'int main()': a.cc:29:5: error: 'cout' was not declared in this scope 29 | cout<<ans<<endl; | ^~~~ a.cc:9:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 8 | #include <assert.h> +++ |+#include <iostream> 9 | #d...
s450506974
p03987
C++
#include <stdio.h> #include <algorithm> #include <set> #include <vector> #include <string.h> #include <string> #include <stdlib.h> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All(c) (c).begin(),(c).end() using namespace std; int in()...
a.cc: In function 'int main()': a.cc:28:5: error: 'cout' was not declared in this scope 28 | cout<<ans<<endl; | ^~~~ a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 7 | #include <stdlib.h> +++ |+#include <iostream> 8 | #d...
s344357081
p03987
C++
#include <stdio.h> #include <algorithm> #include <set> #include <vector> #include <string.h> #include <string> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All(c) (c).begin(),(c).end() using namespace std; int in() {int x;scanf("%d",&...
a.cc: In function 'int main()': a.cc:27:5: error: 'cout' was not declared in this scope 27 | cout<<ans<<endl; | ^~~~ a.cc:7:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include <string> +++ |+#include <iostream> 7 | #def...
s781531093
p03987
C++
#include <stdio.h> #include <set> #include <vector> #include <string.h> #include <string> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All(c) (c).begin(),(c).end() using namespace std; int in() {int x;scanf("%d",&x);return x;} int mai...
a.cc: In function 'int main()': a.cc:26:5: error: 'cout' was not declared in this scope 26 | cout<<ans<<endl; | ^~~~ a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include <string> +++ |+#include <iostream> 6 | #def...
s135209699
p03987
C++
#include <stdio.h> #include <set> #include <vector> #include <string.h> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All(c) (c).begin(),(c).end() using namespace std; int in() {int x;scanf("%d",&x);return x;} int main(){ int n=in(...
a.cc: In function 'int main()': a.cc:25:5: error: 'cout' was not declared in this scope 25 | cout<<ans<<endl; | ^~~~ a.cc:5:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include <string.h> +++ |+#include <iostream> 5 | #d...
s715180472
p03987
C++
#include <stdio.h> #include <set> #include <vector> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;i++) #define rep(i,n) for(ll i=0;i<n;i++) #define vec vector<int> #define All(c) (c).begin(),(c).end() using namespace std; int in() {int x;scanf("%d",&x);return x;} int main(){ int n=in(); ll ans=0; ...
a.cc: In function 'int main()': a.cc:24:5: error: 'cout' was not declared in this scope 24 | cout<<ans<<endl; | ^~~~ a.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <vector> +++ |+#include <iostream> 4 | #def...
s342050310
p03987
C++
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <unordered_map> #include <utility> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cstdio> #include <math.h> #include...
a.cc:47:1: error: expected ',' or ';' before 'const' 47 | const ll MAX_N = 1LL << 17; | ^~~~~ a.cc:48:15: error: 'MAX_N' was not declared in this scope 48 | ll n,dat[ 2 * MAX_N - 1 ]; | ^~~~~ a.cc: In function 'void init(long long int)': a.cc:61:40: error: 'dat' was not declared in this ...
s938308052
p03987
C++
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <unordered_map> #include <utility> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cstdio> #include <math.h> #include...
a.cc: In function 'long long int query(long long int, long long int, long long int, long long int, long long int)': a.cc:76:14: error: 'INT_MAX' was not declared in this scope 76 | return INT_MAX; | ^~~~~~~ a.cc:18:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable...
s777353978
p03987
C++
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <unordered_map> #include <utility> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cstdio> #include <math.h> #include...
a.cc: In function 'void init(long long int)': a.cc:61:49: error: 'INT_MAX' was not declared in this scope 61 | for( ll i = 0; i < 2 * n - 1 ; i++ ) dat[i] = INT_MAX; | ^~~~~~~ a.cc:18:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable...
s566262388
p03987
C++
#include <iostream> #include <vector> #include <set> using namespace std; #define int long long int main() { int N; vector<int> A(N + 1); cin >> N; for (int i = 1; i <= N; i++) cin >> A[i]; vector<long> idx(N + 1); for (int i = 1; i <= N; i++) idx[A[i]] = i; long res = 0; set<int> st ...
cc1plus: error: '::main' must return 'int'
s890677497
p03987
C++
#include <iostream> #include <string> #include <vector> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #include <map> #include <stack> #include <queue> #include <set> #include <cstring> using namespace std; // ascending order #define vsort(v) sort(v.begin(), v.end()) // descending order #de...
a.cc: In function 'void init(int)': a.cc:43:53: error: 'INT_MAX' was not declared in this scope 43 | for(int i = 0; i < 2 * n - 1; i++) dat[i] = INT_MAX; | ^~~~~~~ a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable b...
s343410937
p03987
C++
import java.util.*; public class Main { static int[] bit; static int n; public static void main(String[] args){ Scanner sc = new Scanner(System.in); n = sc.nextInt(); bit = new int[n+1]; int[] pos = new int[n+1]; int[] a = new int[n+1]; for(int i=1;i<=n;i++){...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s813349903
p03987
C++
#include <bits/stdc++.h> using namespace std; const ll N=5e5; ll n,A; ll a[N],l[N],k[N],r[N]; ll cmp(ll x,ll y) { return a[x]>a[y]; } int main() { cin>>n; for (ll i=0;++i<=n;) scanf("%d",a+i), l[i]=i-1,k[i]=i,r[i]=i+1; sort(k+1,k+n+1,cmp); for (ll i=0;++i<=n;) { A+=a[k[i]]*(r[k[i]]-k[i]...
a.cc:3:7: error: 'll' does not name a type 3 | const ll N=5e5; | ^~ a.cc:5:3: error: 'll' does not name a type 5 | ll n,A; | ^~ a.cc:6:3: error: 'll' does not name a type 6 | ll a[N],l[N],k[N],r[N]; | ^~ a.cc:7:1: error: 'll' does not name a type 7 | ll cmp(ll x,ll y) ...
s642966906
p03987
C
#include <cstdio> #include <cstdint> #include <iostream> #include <iomanip> #include <string> #include <queue> #include <stack> #include <vector> #include <set> #include <map> #include <unordered_map> #include <algorithm> #include <utility> #include <cmath> #include <climits> #include <bitset> #define ll long long int...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s709565778
p03987
C
#include <cstdio> #include <cstdint> #include <iostream> #include <iomanip> #include <string> #include <queue> #include <stack> #include <vector> #include <set> #include <map> #include <unordered_map> #include <algorithm> #include <utility> #include <cmath> #include <climits> #include <bitset> #define ll long long int...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s013854533
p03987
Java
import java.io.*; import java.util.*; /* * // Given an array A[] , calculate the sum of minimum of all subarrays of A. * e.g, A[] = {1, 2, 3} , ans = sum( min({1}), min({2}), min({3}), min({1, 2}), min({2, 3}), min({1, 2, 3}) ) = 10 2 5 8 9= 2*4+5*3+8*2+9*1 6 4 1 7 8 6 1 1=1*1 4 1 2=2*1 1 1 5=3*3 7 4 5=...
Main.java:26: error: ']' expected int rightSmall[]=new int[n+2; ^ 1 error
s338453299
p03987
C++
int main() { int n;cin>>n; vector<long long> a(n+1),r(n+1); for(int i=1;i<=n;i++){ cin>>a[i]; r[a[i]]=i; } // priority_queue<long long,vector<long long>,greater<long long>> q; // vector<long long> v; map<long long,int> m; m[r[1]]=0; // q.push(r[1]); // v.push_back(r[1]); long long ans=(n-r[1]+1)*r[1]; for(...
a.cc: In function 'int main()': a.cc:2:15: error: 'cin' was not declared in this scope 2 | int n;cin>>n; | ^~~ a.cc:3:9: error: 'vector' was not declared in this scope 3 | vector<long long> a(n+1),r(n+1); | ^~~~~~ a.cc:3:16: error: expected primary-expression be...
s554101660
p03987
C++
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using vpii = vector<pii>; using...
a.cc: In function 'int main()': a.cc:30:5: error: 'vvl' was not declared in this scope; did you mean 'vvll'? 30 | vvl D(2, vl(n)); | ^~~ | vvll a.cc:37:13: error: 'D' was not declared in this scope 37 | D[_][i] = i - stk.back().ss; | ^ a.cc:42:17: error: 'D' w...
s208260746
p03987
C++
#include<iostream> #include<fstream> #include<string> #include<cstring> #include<stdio.h> #include<algorithm> #include<functional> #include<vector> #include<set> #include<queue> #include<list> #include<stdio.h> #include<stdlib.h> #include<map> #include<cstdio> #include <iomanip> using namespace std; template<class...
a.cc: In function 'int main()': a.cc:60:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 60 | #define scanf scanf_s | ^~~~~~~ a.cc:63:9: note: in expansion of macro 'scanf' 63 | scanf("%d", &n); | ^~~~~
s714077235
p03987
C
#include <iostream> #include <bitset> #include <fstream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <numeric> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <functional> #include <cc...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s599130324
p03987
C++
#include "iostream" #include "algorithm" #include "string" #include "vector" #include "cmath" #include "bitset" #include "queue" #include "functional" #include "map" #include "unordered_map" #include "set" #include "stack" #define lp(n) for (int i = 0; i < n; i++) #define LP(n,i) for (int i = 0; i < n; i++) #define m...
a.cc: In function 'int main()': a.cc:39:17: error: 'it2' was not declared in this scope; did you mean 'it'? 39 | it2--; | ^~~ | it
s051835870
p03987
C++
#include "iostream" #include "algorithm" #include "string" #include "vector" #include "cmath" #include "bitset" #include "queue" #include "functional" #include "map" #include "unordered_map" #include "set" #include "stack" #define lp(n) for (int i = 0; i < n; i++) #define LP(n,i) for (int i = 0; i < n; i++) #define m...
a.cc: In function 'int main()': a.cc:54:18: error: expected '}' at end of input 54 | return 0; | ^ a.cc:27:11: note: to match this '{' 27 | int main(){ | ^
s481915358
p03987
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.*; public class AGC005B{ static int SZ=500; public static void main(String[] args) throws IOException { MyScanner sc = new MyScanner(System.in); int n=sc.nextInt(); long[] a...
Main.java:7: error: class AGC005B is public, should be declared in a file named AGC005B.java public class AGC005B{ ^ 1 error
s581275164
p03987
C++
#include<bits/stdc++.h> using namespace std; #define int long long const int N = 2e5+5, L = 18; int st[N][L], A[N], n, rt; int gt(int x) { for(int i=1;;i++) if((1<<i)>x) return(i-1); } int get(int l, int r){ int d = r-l+1; int g = gt(d); return(min(st[l][g], st[r-(1<<g)+1][g])); } int32_t main(){ scanf(...
a.cc: In function 'int32_t main()': a.cc:35:17: error: invalid type argument of unary '*' (have 'long long int') 35 | if(l^n ** get(i, l+1)==A[i]) l++; | ^~~~~~~~~~~~~
s776974246
p03987
C++
#include <iostream> #include <set> #include <algorithm> #include <bits/stdc++.h> using namespace std; int main(){ long long i,n,a[200010],b[200010],x,ans=0; set<long long> s; cin >> n; for(i=0;i<n;i++){ cin >> a[i]; b[a[i]] = i; } s.insert(n+1); s.insert(-1); for(i=0;i<n...
a.cc: In function 'int main()': a.cc:18:32: error: no match for 'operator-' (operand types are 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} and 'std::set<long long int>::it...
s472903695
p03987
C++
#include <iostream> #include <fstream> #include <cmath> #include <cstdlib> #include <ctime> #include <algorithm> #include <numeric> #include <functional> #include <string> #include <vector> #include <bitset> #include <map> #include <set> #include <stack> #include <queue> #include <deque> using namespace std; using ...
a.cc: In function 'int main()': a.cc:573:61: error: expected ';' before 'll' 573 | ios::sync_with_stdio(false); cin.tie(0); cout.tie(0) | ^ | ; 574 | 575 | ll N; cin...
s703557988
p03987
C++
#include <iostream> #include <fstream> #include <cmath> #include <cstdlib> #include <ctime> #include <algorithm> #include <numeric> #include <functional> #include <string> #include <vector> #include <bitset> #include <map> #include <set> #include <stack> #include <queue> #include <deque> using namespace std; using ...
a.cc: In function 'int main()': a.cc:573:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 573 | ll N; scanf_s("%d",&N); | ^~~~~~~ | scanf
s653906562
p03987
C++
#include<iostream> #include <cstdio> #include <vector> #include <algorithm> #include <cstring> using namespace std; #ifdef NO_UNLOCK_IO #define getchar_unlocked getchar #define putchar_unlocked putchar #endif struct FastIO { static const size_t BUFFER_SIZE = 1 << 17; static char inbuf[BUFFER_SIZE | 1], *inptr; st...
a.cc: In function 'int main()': a.cc:119:42: error: 'class UnionFindTree' has no member named 'size' 119 | res *= (long)uni.size(A[index - 1]) + 1; | ^~~~ a.cc:119:47: error: 'A' was not declared in this scope 119 | res *...
s261096134
p03987
Java
import javafx.scene.layout.Priority; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.*; public class Main { static int N; static int[] A; static int[] X; public static void main(String[] args) { FastSca...
Main.java:1: error: package javafx.scene.layout does not exist import javafx.scene.layout.Priority; ^ 1 error
s983292370
p03987
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=a;i<b;i++) #define rep(i,b) FOR(i,0,b) #define INF mugen #define dump(x) cerr<<#x<<"="<<x<<endl #define all(a) (a).begin(),(a).end() typedef vector<int> vi; typedef vector<vi> vii; typedef vector<vii> viii; typedef pair<int,int> P; template <cla...
a.cc: In function 'int main()': a.cc:24:5: error: 'pos' was not declared in this scope; did you mean 'pow'? 24 | pos[a[i]]=i; | ^~~ | pow a.cc:28:12: error: 'N' was not declared in this scope 28 | s.insert(N); | ^ a.cc:32:14: error: 'pos' was not declared in this scope; ...
s539832368
p03987
C++
#include <bits/stdc++.h> using namespace std; int n, w[201000], p[201000]; set<int>Set; long long res; int main(){ int i, a ,b; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&w[i]); p[w[i]] = i; } Set.insert(0); Set.insert(n+1); for(i=1;i<=n;i++){ set<int>::iterator ...
a.cc:31:5: error: redefinition of 'int n' 31 | int n, w[201000], p[201000]; | ^ a.cc:4:5: note: 'int n' previously declared here 4 | int n, w[201000], p[201000]; | ^ a.cc:31:8: error: redefinition of 'int w [201000]' 31 | int n, w[201000], p[201000]; | ^ a.cc:4:8: note: 'int w...
s523935667
p03987
C++
#include<stdio.h> #include<string.h> #include<algorithm> #include<iostream> #include<math.h> #include<queue> #define mem(a,b) memset(a,b,sizeof(a)) #define mod 20123 #define inf 123456789 #define LL long long #define big 1e18 using namespace std; int max(int a,int b){ return a>b?a:b;} int maxn (int a,int b,int c){retu...
a.cc: In function 'long long int dfs(long long int, long long int)': a.cc:22:9: error: return-statement with no value, in function returning 'long long int' [-fpermissive] 22 | return ; | ^~~~~~ a.cc:27:12: warning: control reaches end of non-void function [-Wreturn-type] 27 | dfs(l,...
s815931145
p03987
C++
#include<bits/stdc++.h> using namespace std; #define inf 1e9 #define ll long long #define M 1000000007 #define P pair<int,int> #define FOR(i,m,n) for(int i=m;i<n;i++) #define rep(i,n) FOR(i,0,n) const int vx[4] = {0,1,0,-1}; const int vy[4] = {1,0,-1,0}; #define PI 3.14159265 int n; ll b[210000]; set<int> s; ll ans; ...
a.cc: In function 'int main()': a.cc:30:33: error: no match for 'operator-' (operand types are 'std::_Rb_tree_const_iterator<int>' and 'int') 30 | ans+=i*(*it-b[i])*(b[i]-*(it-1)); | ~~^~ | | | | | int ...
s513661038
p03987
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <cmath> #include <stack> #include <string> #include <fstream> #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) #define FI first #define SE second #define VE vector<int> #define PB push_b...
a.cc: In function 'int main()': a.cc:59:11: error: 'll' was not declared in this scope; did you mean 'LL'? 59 | ans+=(ll)A[i]*(i-L[i]+1)*(R[i]-i+1); | ^~ | LL
s886176337
p03987
C++
#include <iostream> #include <algorithm> #include <string> #include <queue> #include <vector> #include <set> #include <bitset> #include <stack> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) #define FI first #define SE second #define MA(i,j) make_pair(i,j) #define PA...
a.cc: In function 'void init(int)': a.cc:38:12: error: 'INT_MAX' was not declared in this scope 38 | DAT[i]=INT_MAX; | ^~~~~~~ a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 9 | #include <cmath> +++ |+#include <climits> ...
s628410558
p03987
C++
#include <iostream> #include <set> #include <vector> using namespace std; int main(){ long sum = 0; int n; set<int> data; cin >> n; int a[n + 1]; int pos[n + 1]; for (int i = 1; i <= n; i++) { cin >> a[i]; pos[a[i]] = i; } data.insert(0); data.insert(n + 1)...
a.cc: In function 'int main()': a.cc:31:16: error: expected primary-expression before 'long' 31 | sum += long i * r * l; | ^~~~
s734693480
p03987
C++
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define INF 1e9+7 #define pf2 pop_front #define pb2 pop_back #define pb push_back #define pf push_front #define fi first #define se second #define sz size #define eps 1e-7 #define fod find_by_order #define fastio ios::sync_with_stdio(0);cin.tie(NULL);co...
a.cc: In function 'int main()': a.cc:81:20: error: expected ';' before 'l' 81 | sum l+= r * (t - gg) * (val - t); | ^~ | ;
s154468493
p03987
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int N; ll ans; ll a[200001]; int main() { cin >> N; for(int i = 0; i < N; i++) cin >> a[i]; for(int i = 0; i < N; i++) { ll m = a[i]; ans += m; for(int j = i+1; j < N; j++) { if(m > a[j]) { m = a[j]; ans += m;h } ...
a.cc: In function 'int main()': a.cc:19:18: error: 'h' was not declared in this scope 19 | ans += m;h | ^
s288181763
p03987
C++
#include<string> #include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<functional> using namespace std; typedef long long int llint; #define pub push_back #define mp make_pair #define fir first #define sec second #define res resize const int big=((llint)1<<30); int main(void){ int q,n,i,g...
a.cc: In function 'int main()': a.cc:19:53: error: 'set' was not declared in this scope 19 | llint ans=0;vector<int> let;vector<int> doc;set<int> used; | ^~~ a.cc:7:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '...
s142038242
p03987
C++
#include <iostream> #include <vector> using namespace std; typedef long long ll; struct para { int m, M; }; vector<para> T; int l, size; void Stworz(int n) { int p = 1; while (p < n) p *= 2; l = p; size = 2 * p - 1; for (int i = 0; i <= size; ++i) T.push_back({1e9, -1e9}); }...
a.cc: In function 'void Stworz(int)': a.cc:22:5: error: reference to 'size' is ambiguous 22 | size = 2 * p - 1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s861462098
p03987
C++
file:///home/nikita/for-practice/minsum.c
a.cc:1:1: error: 'file' does not name a type 1 | file:///home/nikita/for-practice/minsum.c | ^~~~
s582250931
p03987
C++
#include <string.h> #include <string> #include <vector> #include <deque> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <iterator> #include <functional> #include <algorithm> #include <numeric> #include <iostream> #include <sstream> #include <iomanip> #include <cmath> #include <...
a.cc: In function 'int main()': a.cc:52:28: error: no matching function for call to 'std::vector<int>::insert(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)' 52 | oldh.insert(-vec[i]); | ~~~~~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/vector:66, ...
s357814057
p03987
C++
#include <string.h> #include <string> #include <vector> #include <deque> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <iterator> #include <functional> #include <algorithm> #include <numeric> #include <iostream> #include <sstream> #include <iomanip> #include <cmath> #include <...
a.cc: In function 'int main()': a.cc:48:20: error: no matching function for call to 'std::vector<int>::insert(int)' 48 | oldh.insert(0); | ~~~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:1484:9: note: candid...
s763637512
p03987
C++
a #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i,a,b) for(int i=a;i<b;++i) #define rep(i,n) REP(i,0,n) typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define all(a) begin(a),end(a) #define ifnot(a) if(not (a)) #define dump(x) cerr << #...
a.cc:1:1: error: 'a' does not name a type 1 | a | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:6: /usr/include/c++/14/ext/type_...
s959564869
p03987
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<queue> #include<map> #include<set> #include<algorithm> #include<complex> #include<string> #include<cstring> using namespace std; #define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) #define INF 100000000 #de...
a.cc:26:17: error: 'int index [200005]' redeclared as different kind of entity 26 | int index[200005]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:11: /usr/include/strings.h:50:20: note: previous declarati...
s954654009
p03987
C++
#include <algorithm> #include <iostream> #include <cstdio> #include <map> #include <numeric> #include <cmath> #include <set> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <complex> #include <string.h> #include <unordered_set> #include <unordered_map> #include <bitset>...
a.cc: In constructor 'SegmentTree<T>::SegmentTree(int)': a.cc:59:50: error: 'INT_MAX' was not declared in this scope 59 | for (int i = 0; i < 2*n-1; i++) dat[i] = INT_MAX; | ^~~~~~~ a.cc:21:1: note: 'INT_MAX' is defined in header '<climits>'; this is pro...
s601951127
p03987
Java
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner in = new Scanner(System.in)) { int N = in.nextInt(); int[] A = new int[N]; for (int i = 0; i < N; i...
Main.java:20: error: cannot find symbol private static long solve(int l, int r, RMQ rmq){ ^ symbol: class RMQ location: class Main Main.java:16: error: cannot find symbol System.out.println(solve(0, A.length - 1, new RMQ(A))); ...
s111838600
p03987
Java
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner in = new Scanner(System.in)) { int N = in.nextInt(); int[] A = new int[N]; for (int i = 0; i < N; i...
Main.java:20: error: cannot find symbol private static long solve(int l, int r, RMQ rmq){ ^ symbol: class RMQ location: class Main Main.java:16: error: cannot find symbol System.out.println(solve(0, A.length - 1, new RMQ(A))); ...
s097501641
p03987
Java
import java.io.*; import java.util.*; public final class minimum_sums_dsu { static BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); static FastScanner sc=new FastScanner(br); static PrintWriter out=new PrintWriter(System.out); static int[] parent,depth,size; static int getParent(int ...
Main.java:3: error: class minimum_sums_dsu is public, should be declared in a file named minimum_sums_dsu.java public final class minimum_sums_dsu ^ 1 error
s013868353
p03987
C++
#include <iostream> #include <unordered_map> #include <set> #include <vector> static const int INF = 100000000; using namespace std; int main() { int N(8); int res(0); vector<int> v{5,4,8,1,2,6,7,3}; int min = v[0]; for (int j = 0; j < N; ++j){ for (int r = j; r < N; ++r){ ...
a.cc: In function 'int main()': a.cc:20:17: error: 'mat' was not declared in this scope 20 | mat[j][r] = v[j]; | ^~~
s112537251
p03987
C++
#include<stdio.h> long long int n, a[200100],sum; int main(){ int i,j; scanf("%lld",&n); a[0]=0; for(i=1;i<=n;i++){ scanf("%lld",a+i); j=i-1; while(a[i]<a[j]){ a[j]=a[i]; j--; s=s-a[i]+a[j]; } sum=sum+s; } printf("%lld",sum); }
a.cc: In function 'int main()': a.cc:13:25: error: 's' was not declared in this scope 13 | s=s-a[i]+a[j]; | ^ a.cc:15:25: error: 's' was not declared in this scope 15 | sum=sum+s; | ^
s631239395
p03987
C++
#include<iostream> #include<vector> #include<algorithm> #include<cstdio> #include<queue> #include<cmath> #include<map> #include<set> using namespace std; const int INF = 1 << 29; const double EPS = 1e-9; typedef long long ll; #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #def...
a.cc: In member function 'int RMQ::rec(int, int, int, int, int)': a.cc:27:16: error: 'INT_MAX' was not declared in this scope 27 | return INT_MAX; | ^~~~~~~ a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #includ...
s751916414
p03987
C++
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int a[200000]; int N; int i, j; unsigned long long ans = 0; unsigned long long *minwa; int prev; minwa = (unsigned long long *)calloc(200000, sizeof(unsigned long long)); scanf("%d", &N); for (i = 0; i < N; i++) {...
a.cc: In function 'int main()': a.cc:57:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 57 | cout << ans << endl; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostrea...
s120167358
p03987
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back typedef long long ll; const ll INF = 1000000000ll; const ll MOD = 1000000007ll; const double EPS = 1e-8; int main(void) { //ios_base::sync_with_stdio(false); //cin.tie(0); int n; vector<int> a; set<int> p; int pos[200005]; long long ...
a.cc: In function 'int main()': a.cc:36:104: error: expected ';' before ')' token 36 | ans += (long long)i* (long long)(abs((*l) - pos[i])) * (long long)(abs((*r) - pos[i]) )); | ^ | ...
s476439515
p03987
C++
#include <algorithm> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define SREP(s,i,m) for(unsigned int i = s; i < m; ++i) #define REP(i,m) SREP(0,i,m) using namespace std; #ifdef _MSC_V...
a.cc:21:23: error: expected ';' before '__int64' 21 | using ULONG = unsigned __int64; | ^~~~~~~~ | ; a.cc:28:1: error: 'ULONG' does not name a type; did you mean 'LONG'? 28 | ULONG result = 0; | ^~~~~ | LONG a.cc: In function 'void calculate()': ...
s215318737
p03987
C++
#include <algorithm> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define SREP(s,i,m) for(unsigned int i = s; i < m; ++i) #define REP(i,m) SREP(0,i,m) using namespace std; #ifdef _MSC_V...
a.cc: In function 'int main()': a.cc:64:8: error: ambiguous overload for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'ULONG' {aka '__int128 unsigned'}) 64 | cout << result << endl; | ~~~~ ^~ ~~~~~~ | | | | | ULONG {aka __int128 unsigned} ...
s516052825
p03987
C++
#include <iostream> using namespace std; // int main(){ // long long int sum = 0; // int n; // int a[200001]; // cin >> n; // for (int i = 0; i < n; ++i) // { // cin >> a[i]; // } // for (int l = 0; l < n; ++l) // { // int min = 200001; // for (int r = l; r < n; ++r) // { // if(min > a[r]) min =...
a.cc: In function 'int main()': a.cc:52:39: error: expected ';' before '}' token 52 | sum += a[l][r] | ^ | ; 53 | } | ~
s090800074
p03987
C++
#include <iostream> #include <vector> #include <string> #include <stack> #include <queue> #include <cmath> #include <set> #include <algorithm> #include <functional> #include <cstring> #include <iterator> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) int main() { int N; cin >> N; ve...
a.cc: In function 'int main()': a.cc:39:9: error: 'retu' was not declared in this scope 39 | retu | ^~~~ a.cc:39:13: error: expected '}' at end of input 39 | retu | ^ a.cc:17:1: note: to match this '{' 17 | { | ^
s625512166
p03987
C++
#include<bits/stdc++.h> using namespace std; long long index1[200005]; map<long long ,long long > mp; int main() { int n; cin>>n; long long i,j,a; for(i=1;i<=n;i++) { cin>>a; index1[a]=i; } mp[0]=1; mp[n+1]=1; long long l,r; map<long long ,long long> ::iterator it; long long left,right,this_...
a.cc: In function 'int main()': a.cc:22:43: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript 22 | it = mp.upper_bound(index[i]); | ^
s320957561
p03987
C++
#include<bits/stdc++.h> using namespace std; long long index[200005]; map<long long ,long long > mp; int main() { int n; cin>>n; long long i,j,a; for(i=1;i<=n;i++) { cin>>a; index[a]=i; } mp[0]=1; mp[n+1]=1; long long l,r; map<long long ,long long> ::iterator it; long long left,right,this_in...
a.cc:3:24: error: 'long long int index [200005]' redeclared as different kind of entity 3 | long long index[200005]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bit...
s954839192
p03987
C++
#include <iostream> #include <vector> using namespace std; int main(){ int N; cin >> N; vector<int> a(N); vector<pair<int,int> > ord(N); for(int i = 0; i < N; ++i){ cin >> a[i]; ord[i].first = a[i]; ord[i].second = i; } sort(ord.begin(), ord.end()); vector<int>...
a.cc: In function 'int main()': a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(ord.begin(), ord.end()); | ^~~~ | short
s299249530
p03987
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> using namespace std; struct rmqsegtree{ vector< pair<int, int> > t; //<data, at> pair<int, int> re; int n; void dflt(void){ re.first = INT_MAX; re.second = -1; return; } void use(void){ int i; dflt(); for(i = 0;;++i)if((1 << i)...
a.cc: In member function 'void rmqsegtree::dflt()': a.cc:12:31: error: 'INT_MAX' was not declared in this scope 12 | void dflt(void){ re.first = INT_MAX; re.second = -1; return; } | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by a...
s416706252
p03987
C++
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <sstream> #include <vector> #include <map> #include <set> #include <deque> #include <list> #include <stack> #include <queue> #include <complex> #include <ctime> #include<cstdlib> #define _USE_MATH_DEFINES #include <math.h> #include<c...
a.cc: In function 'int RMQUtil(int*, int, int, int, int, int)': a.cc:143:24: error: 'INT_MAX' was not declared in this scope 143 | return INT_MAX; | ^~~~~~~ a.cc:28:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'...
s698827159
p03987
C
#include<stdio.h> #include<stdlib.h> int main() { int minx; int sum = 0; int n; int *a; int loop; int loop1, loop2; scanf("%d", &n); a = malloc(sizeof(int)*n); for (loop = 0; loop < n; loop++)scanf("%d", &a[loop]); for (loop1 = 0; loop1 < n; loop1++) { minx = a[loop1]; for (loop2 = loop1; loop2 < n; lo...
main.c: In function 'main': main.c:19:32: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 19 | minx = min(minx, a[loop2]); | ^~~ | main
s230371911
p03987
C++
#include <iostream> #include <thread> #include <vector> using namespace std; int main(int argc, char const *argv[]) { int N; cin >> N; vector<int> v; for(int i = 0; i < N; i++) { int t; cin >> t; v.push_back(t); } atomic<unsigned long long> total(0); int tr = 0; thread a = thread([&]{ ...
a.cc: In function 'int main(int, const char**)': a.cc:19:3: error: 'atomic' was not declared in this scope 19 | atomic<unsigned long long> total(0); | ^~~~~~ a.cc:4:1: note: 'std::atomic' is defined in header '<atomic>'; this is probably fixable by adding '#include <atomic>' 3 | #include <vector> +++...
s013309269
p03987
C++
#include <iostream> #include <array> #include <vector> #include <map> #include <utility> #include <cstring> #include <cstdio> #include <cmath> #include <cstdlib> #include <queue> #include <stack> #include <deque> #include <set> #include <string> #include <limits> using namespace std; int n_; int n; //int height; int...
a.cc: In function 'void makeTable(int)': a.cc:30:17: error: 'INT_MAX' was not declared in this scope 30 | pt[i] = INT_MAX; | ^~~~~~~ a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 13 | #include <set> +++ |+#inclu...
s777561867
p03987
C++
#include <iostream> #include <array> #include <vector> #include <map> #include <utility> #include <cstring> #include <cstdio> #include <cmath> #include <cstdlib> #include <queue> #include <stack> #include <deque> #include <set> #include <string> using namespace std; int n_; int n; int height; vector<int> st; int *p...
a.cc: In function 'void makeTable(int)': a.cc:31:17: error: 'INT_MAX' was not declared in this scope 31 | pt[i] = INT_MAX; | ^~~~~~~ a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 13 | #include <set> +++ |+#inclu...
s668521122
p03987
C++
#include<iostream> #include<string> #include<cstring> #include<cstdio> #include<cmath> #include <utility> #include<cstdlib> #include<vector> #include<set> #include<map> #include<list> #include<queue> #include<functional> #include<algorithm> #define ms0(a) memset(a,0,sizeof(a)) #define ms1(a) memset(a,-1,sizeof(a)) #def...
a.cc:20:9: error: '__int64' does not name a type; did you mean '__int64_t'? 20 | typedef __int64 ll; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:99:5: error: 'll' was not declared in this scope 99 | ll asr = 0; | ^~ a.cc:105:9: error: 'asr' was not declare...
s570387548
p03987
C++
//C++14 (Clang 3.8.0) #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #includ...
a.cc: In member function 'int RMQ::rec(int, int, int, int, int)': a.cc:37:16: error: 'INT_MAX' was not declared in this scope 37 | return INT_MAX; | ^~~~~~~ a.cc:22:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 21 | #inclu...
s535175989
p03987
C++
#include <string> #include <vector> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <ctime> #include <cstring> #include <cctype> #include <cassert> #include <limits> #include <functional> #include <...
a.cc: In member function 'void segtree::init()': a.cc:48:37: error: 'INT_MAX' was not declared in this scope 48 | rep(i, BT * 2 - 1) seg[i] = INT_MAX; | ^~~~~~~ a.cc:19:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include ...
s535074602
p03987
C++
#include <vector> #include <cassert> #include <algorithm> #ifdef _WIN32 inline unsigned int __builtin_clz(unsigned int x) { unsigned long r; _BitScanReverse(&r, x); return 31 - r; } #endif template<class Type> class SparseTable { private: std::vector<std::vector<Type> > st; public: void init(std::vector<Type> v) ...
a.cc: In instantiation of 'void SparseTable<Type>::init(std::vector<Type>) [with Type = int]': a.cc:34:37: required from 'SparseTable<Type>::SparseTable(std::vector<Type>) [with Type = int]' 34 | SparseTable(std::vector<Type> v) { init(v); } | ^~~~ a.cc:45:2...
s925644664
p03987
C
#include <stdio.h> int N, a[212345], tmp = 0; __int64 ans; int main(void) { scanf("%d", &N); for (int i = 0; i < N; ++i) { scanf("%d", &a[i]); } for (int l = 0; l < N; ++l) { for (int r = l; r < N; ++r) { for (int i = l; i <= r; ++i) { if (i == l) { tmp = a[i]; } if (tmp > a[i]) { tmp = a[i]; } } ...
main.c:4:1: error: unknown type name '__int64'; did you mean '__int64_t'? 4 | __int64 ans; | ^~~~~~~ | __int64_t
s105069073
p03987
C
#include <stdio.h> #include <algorithm> using namespace std; int N, a[212345], tmp = 0; __int64 ans; int main(void) { scanf("%d", &N); for (int i = 0; i < N; ++i) { scanf("%d", &a[i]); } for (int l = 0; l < N; ++l) { for (int r = l; r < N; ++r) { for (int i = l; i <= r; ++i) { if (i == l) { tmp = a[i]; ...
main.c:2:10: fatal error: algorithm: No such file or directory 2 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s007165483
p03987
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; const long long int MAX_N = 1<<17; long long int n, dat[2*MAX_N-1]; void init(long long int n_) { n = 1; while (n < n_) n *= 2; for (long long int i = 0; i < 2*n-1; i++) dat[i] = INT_MAX; } void update(long long int k, long long int a)...
a.cc: In function 'void init(long long int)': a.cc:15:60: error: 'INT_MAX' was not declared in this scope 15 | for (long long int i = 0; i < 2*n-1; i++) dat[i] = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; thi...
s923814799
p03987
C
#include<stdio.h> #define min(x, y) ((x > y)? y : x) int a[200000]; int N; void hoge(void){ int i; for(i = 0; i < N - 1; i++) a[i] = min(a[i], a[i+1]); N--; } int main(void){ __int64 ans = 0; int i; scanf("%ld", &N); for(i = 0; i < N; i++){ scanf("%ld", &(a[i]));...
main.c: In function 'main': main.c:18:5: error: unknown type name '__int64'; did you mean '__int64_t'? 18 | __int64 ans = 0; | ^~~~~~~ | __int64_t
s025740027
p03987
C++
/*input 8 5 4 8 1 2 6 7 3 */ #include <bits/stdc++.h> #include <stdio.h> #include <string.h> using namespace std; #define mod 1000000007 #define llu long long unsigned #define lld long long #define ld long #define sc(a) scanf("%lld",&a) #define sc2(a,b) scanf("%lld%lld",&a,&b) #define sc3(a,b,c) scanf("%lld%lld%...
a.cc: In function 'int main()': a.cc:116:13: error: reference to 'prev' is ambiguous 116 | prev[P.second]=i; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gn...
s263650840
p03987
C++
/*input 8 5 4 8 1 2 6 7 3 */ #include <bits/stdc++.h> #include <stdio.h> #include <string.h> using namespace std; #define mod 1000000007 #define llu long long unsigned #define lld long long #define ld long #define sc(a) scanf("%lld",&a) #define sc2(a,b) scanf("%lld%lld",&a,&b) #define sc3(a,b,c) scanf("%lld%lld%...
a.cc: In function 'int main()': a.cc:97:13: error: reference to 'next' is ambiguous 97 | next[P.second]=i; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu...
s976352248
p03987
C++
#include<iostream> using namespace std; int main() { int n; cin>>n; int Array[n]; for(int i=0;i<n;i++) cin>>Array[i]; long long ans=0; for(int i=0;i<n;i++) { int x=INT_MAX; for(int j=i;j<n;j++) { x=min(x,Array[j]); ans+=x; } } cout<<ans<<"\n"; }
a.cc: In function 'int main()': a.cc:13:23: error: 'INT_MAX' was not declared in this scope 13 | int x=INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include<iostream> +++ |+...
s687325364
p03987
C++
3#define DINGER_GISBAR #include <bits/stdc++.h> using namespace std; const long long MOD = static_cast<int>(1e9) + 7; //{{{TEMPLATE_BEGIN #include <unistd.h> using namespace std::rel_ops; #ifdef ZEROKUGI #include <dumper.hpp> #define dump(x) dumper::dumper(cerr, __LINE__, (#x), (x), 50, 1, 1) #define tick(...) dumper::...
a.cc:1:2: error: stray '#' in program 1 | 3#define DINGER_GISBAR | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3#define DINGER_GISBAR | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, ...
s853636757
p03988
C++
#include <algorithm>    //STL 通用算法 #include <bitset>     //STL 位集容器 #include <cctype> //字符处理 #include <cerrno>      //定义错误码 #include <cfloat>     //浮点数处理 #include <ciso646> //对应各种运算符的宏 #include <climits>     //定义各种数据类型最值的常量 #include <clocale>     //定义本地化函数 #include <cmath>      //定义数学函数 #include <comple...
a.cc:1:10: error: extended character   is not valid in an identifier 1 | #include <algorithm>    //STL 通用算法 | ^ a.cc:1:10: error: extended character   is not valid in an identifier a.cc:1:10: error: extended character   is not valid in an identifier a.cc:1:10: fatal error: algorithm>  ��: No such fil...
s215925327
p03988
C++
#include<bits/stdc++.h> using namespace std; void ans(bool b) { cout << (b ? "Possible" : "Impossible") << endl; exit(0); } int main() { int64_t N; cin >> N; vector<int64_t> a(N); for (int64_t& A : a) { cin >> A; } int64_t one_num = count(a.begin(), a.end(), 1); if (one_nu...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Ite...
s521605620
p03988
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vec; typedef vector<vec> mat; typedef pair<ll,ll> pll; const ll mod=1e9+7; //const ll mod=998244353; const ll inf=1LL<<61; int main() { ll n; cin >> n; vec a(n); for(ll i=0;i<n;i++) cin >> a[i]; sort(a.begin(),a.end()); l...
a.cc: In function 'int main()': a.cc:26:12: error: lvalue required as left operand of assignment 26 | if(mx%2&&i=mx/2&&cnt[i]!=1) f=0; | ~~~~^~~
s827105941
p03988
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() using ll = long long; using P = pair<int, int>; const int INF = 1e9; const long long LINF = 1e18; const long long MOD = 1e9 + 7; signed main() { int n; cin >> n; int mx = 0; ...
a.cc: In function 'int main()': a.cc:37:18: error: 't' was not declared in this scope 37 | for (int i = t + 1; i <= mx; i++){ | ^
s113831025
p03988
C++
#include <bits/stdc++.h> using namespace std; int o; int n, m; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> m; if (m == 1) o++; } if (o > 1 && n > 2) cout << "Impossible"; else cout << "Possible" return 0; }
a.cc: In function 'int main()': a.cc:18:23: error: expected ';' before 'return' 18 | cout << "Possible" | ^ | ; 19 | return 0; | ~~~~~~
s793307356
p03988
C++
#include <bits.stdc++.h> using namespace std; int main(){ int n; scanf("%d", &n); int arr[n+1]; for(int i = 0; i < n; i++){ scanf("%d", &arr[i]); } sort(arr, arr+n); arr[n] = 0; int top = arr[0] * 2; if(arr[1] == arr[0]) --top; if(arr[2] == arr[0]){ printf("Impossible"); return 0; } ...
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory 1 | #include <bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s241394119
p03988
C++
#include<bits/stdc++.h> using namespace std; const int N=105; int n,a[N],vi[N]; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",&a[i]); ++vi[a[i]]; } sort(a+1,a+n+1); int k=a[n],res=INT_MAX; for(int i=0;i<=k;i++){ int d=max(k-i,i); res=min(res,d); if(!vi[d]){ puts("Impossible"); ret...
a.cc:34:11: error: redefinition of 'const int N' 34 | const int N=105; | ^ a.cc:3:11: note: 'const int N' previously defined here 3 | const int N=105; | ^ a.cc:35:5: error: redefinition of 'int n' 35 | int n,a[N],vi[N]; | ^ a.cc:4:5: note: 'int n' previously declared ...