submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s991469209
p03700
C++
#include <stdio.h> #include <queue> #include <vector> #include <algorithm> #include <iostream> using namespace std; ll n,attack1,attack2; vector<int> hp; const ll INF=1e9; inline bool check(ll x){ ll cost=0; ll i; for(i=0;i<hp.size();i++){ if(hp[i]-x*attack2>0){ ll tmp=hp[i]-x*attack2; ll tmp2=(tmp+(attack1-...
a.cc:7:1: error: 'll' does not name a type 7 | ll n,attack1,attack2; | ^~ a.cc:9:7: error: 'll' does not name a type 9 | const ll INF=1e9; | ^~ a.cc:10:19: error: 'll' was not declared in this scope 10 | inline bool check(ll x){ | ^~ a.cc: In function 'int main()': a...
s487480299
p03700
C++
#include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<cerrno> #include<cfloat> #include<ciso646> #include<climits> #include<clocale> #include<complex> #include<csetjmp> #include<csignal> #include<cstdarg> #include<cstddef> #include<cstdio> #i...
a.cc: In function 'int main()': a.cc:482:14: error: 'eathline' was not declared in this scope; did you mean 'deathline'? 482 | a-=b;eathline){ | ^~~~~~~~ | deathline
s637277543
p03700
C++
//Widespread priority_queue <int> q; int h,i,j,k,t,deathline,a,b,n,ans=0; int main(){ cin>>n>>a>>b; deathline=0; rep(i,0,n){ cin>>h;q.push(h); } a-=b; while(q.top()>deathline){ t=q.top();q.pop(); t-=a;q.push(t); ans++; deathline+=b; } cout<<ans<<endl; return 0; }
a.cc:2:1: error: 'priority_queue' does not name a type 2 | priority_queue <int> q; | ^~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin>>n>>a>>b; | ^~~ a.cc:7:9: error: 'rep' was not declared in this scope 7 | rep(...
s937114934
p03700
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<string> #include<cstring> #include<cassert> #include<cmath> #include<sstream> #include<fstream> #include<map> #include<set> #include<vector> #include<queue> #include<stack> #include<bitset> using namespace std; long long h[100005],tem; long long n,a,b; b...
a.cc: In function 'bool check(long long int)': a.cc:25:32: error: expected primary-expression before 'long' 25 | if(tem>0) res+=long long(tem/a)+(tem%a!=0); | ^~~~
s602483979
p03700
C++
#include <iostream> #include <algorithm> #include <cmath> using namespace std; typedef long long LL; const int maxn = 1e5; int n, a, b, m[maxn+3]; bool judge(LL x) { LL sum = 0; for(int i=0; i<n; ++i) { LL t = m[i]-x*b; if(t>0) { sum += ceil(t*1.0/(a-b)); i...
a.cc: In function 'int main()': a.cc:39:21: error: 'mid' was not declared in this scope 39 | printf("%lld\n",mid); | ^~~
s339770553
p03700
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <queue> using namespace std; const int MAX_N = 10000; #define ll long long int N, A, B; vector<int> h; bool enough(int T) { ll cnt = 0; for (int i = 0; i < N; i++) {...
a.cc: In function 'bool enough(int)': a.cc:18:42: error: expected ';' before 'if' 18 | cnt += (h[i]-B*T) / (A-B) | ^ | ; 19 | if( (h[i]-B*T) % (A-B) ) cnt++; | ~~ ...
s007393686
p03700
C++
#include "stdafx.h" #include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <queue> using namespace std; const int MAX_N = 10000; #define ll long long int N, A, B; vector<int> h; bool enough(int T) { ll cnt = 0; for (int i = 0; i < N; i++) { if (h[i] <= B*T) continue; cnt += (int)c...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s444299328
p03700
C++
int main() { //widespread int N,A,B; scanf("%d %d %d", &N,&A,&B); vector<int> h(N); for (int i = 0; i < N; i++) { scanf("%d", &h[i]); } int cnt= 0; while (true) { bool flag = true; int max = h[0]; int index = 0; for (int i = 0; i < N; i++) { if (max < h[i]) { max = h[i]; index = i; ...
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf' was not declared in this scope 5 | scanf("%d %d %d", &N,&A,&B); | ^~~~~ a.cc:6:9: error: 'vector' was not declared in this scope 6 | vector<int> h(N); | ^~~~~~ a.cc:6:16: error: expected primary-expression befor...
s497975919
p03700
C++
#include <iostream> #include <cstdio.h> #include <math.h> using namespace std; typedef long long LL; int N, A, B, h[(int)1e5]; bool judge(LL K) { LL sum = 0; for(int i = 0; i < N; i++) { LL t = (LL)h[i]-K*B; if (t > 0) { sum += (int)ceil(t*1.0/(A-B)); if(sum > K) ...
a.cc:2:10: fatal error: cstdio.h: No such file or directory 2 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.
s235931984
p03700
C++
#include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; bool p (vector <long long> health, int a, int b, long long tr) { int n = (int)health.size(); long long sum = tr * (a-b); for (int i = 0; i < n; i++) health[i] -= tr*b; for (int i = 0; i < n; i++) { if (health[i] >...
a.cc: In function 'int binary_search(std::vector<int>&, int, int, int, int)': a.cc:25:23: error: could not convert 'health' from 'vector<int>' to 'vector<long long int>' 25 | if (p(health, a, b, left)) | ^~~~~~ | | | ...
s683502973
p03700
C++
#include<iostream> using namespace std; int max_num(int *h, int& n) { int i; int tmp=h[0]; int ans=0; for(i=1;i<n;i++) { if(tmp<h[i]) { tmp=h[i]; ans=i; } } return ans; } int main() { int n; int a,b; cin>>n>>a>>b; int ...
a.cc: In function 'int main()': a.cc:71:14: error: expected '}' at end of input 71 | return 0; | ^ a.cc:24:1: note: to match this '{' 24 | { | ^
s749853033
p03700
C++
#include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; int main(){ int N; cin>>N; vector<int>h(N); int a,b; cin>>a>>b; int ans=0; for(int i=0;i<N;i++) cin>>h[i]; while(!(h.empty())){ sort(h.begin(),h.end(),greater<int>()); for(int i=1;i<h.size();i++) ...
a.cc: In function 'int main()': a.cc:20:18: error: no match for 'operator<=' (operand types are 'std::vector<int>::iterator' and 'int') 20 | while(h.end()<=0) | ~~~~~~~^~~ | | | | | int | std::vector<int>::iterator In file include...
s507926542
p03700
C
#include <stdio.h> int main(void) { int n, a, b, c, h[100005], h2; int mid, low, high, flg, max, x, x2, i; scanf("%d %d %d", &n, &a, &b); c = a-b; max = -1; for(i = 0; i < n; i++){ scanf("%d", &h[i]); if(max < h[i]) max = h[i]; } low = 1; high = max/b+1; while(low <= high){ mid = (low...
main.c: In function 'main': main.c:25:17: error: stray '\343' in program 25 | x -= x2;<U+3000><U+3000><U+3000><U+3000> | ^~~~~~~~ main.c:25:19: error: stray '\343' in program 25 | x -= x2;<U+3000><U+3000><U+3000><U+3000> | ^~~~~~~~ main.c:25:21: ...
s208984875
p03700
C
#include <stdio.h> int main(void) { int n, a, b, c, h[100005], h2; int mid, low, high, flg, max, x, x2, i; scanf("%d %d %d", &n, &a, &b); c = a-b; max = -1; for(i = 0; i < n; i++){ scanf("%d", &h[i]); if(max < h[i]) max = h[i]; } low = 1; high = max/b+1; while(low <= high){ mid = (low...
main.c: In function 'main': main.c:25:17: error: stray '\343' in program 25 | x -= x2;<U+3000><U+3000><U+3000><U+3000> | ^~~~~~~~ main.c:25:19: error: stray '\343' in program 25 | x -= x2;<U+3000><U+3000><U+3000><U+3000> | ^~~~~~~~ main.c:25:21: ...
s782862718
p03700
C++
#include <bits/stdc++.h> #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define SORTR(v,n) sort(v, v+n, greater<int>()); // #define int long long // %d=>%lld #define pb push_back #define INF 1000000000 using namespace std; typedef long l...
a.cc: In function 'bool solve(int)': a.cc:24:16: error: found ':' in nested-name-specifier, expected '::' 24 | while(int x:h){ | ^ | :: a.cc:24:15: error: 'x' has not been declared 24 | while(int x:h){ | ^ a.cc:24:18: error: qualified-id in dec...
s044561719
p03700
C++
#include <bits/stdc++.h> #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define SORTR(v,n) sort(v, v+n, greater<int>()); // #define int long long // %d=>%lld #define pb push_back #define INF 1000000000 using namespace std; typedef long l...
a.cc: In function 'bool solve(int)': a.cc:24:12: error: found ':' in nested-name-specifier, expected '::' 24 | while(x:h){ | ^ | :: a.cc:24:11: error: 'x' has not been declared 24 | while(x:h){ | ^ a.cc:25:12: error: 'x' was not declared in this scope 2...
s965372260
p03700
C++
#include <bits/stdc++.h> #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define SORTR(v,n) sort(v, v+n, greater<int>()); // #define int long long // %d=>%lld #define pb push_back #define INF 1000000000 using namespace std; typedef long l...
a.cc:22:12: error: 'mid' was not declared in this scope 22 | bool solve(mid){ | ^~~ a.cc: In function 'int main()': a.cc:58:17: error: 'solve' cannot be used as a function 58 | if(solve(mid)){ | ~~~~~^~~~~
s933500539
p03700
C++
#include <bits/stdc++.h> #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define SORTR(v,n) sort(v, v+n, greater<int>()); // #define int long long // %d=>%lld #define pb push_back #define INF 1000000000 using namespace std; typedef long l...
a.cc:22:12: error: 'mid' was not declared in this scope 22 | bool solve(mid){ | ^~~ a.cc: In function 'int main()': a.cc:58:17: error: 'solve' cannot be used as a function 58 | if(solve(mid)){ | ~~~~~^~~~~
s277096968
p03700
C++
#include <iostream> #include <string> using namespace std; int main(){ int a,b[100],c,min; min=0; c=0; cin>>a; for(int i=0;i<a;i++){ cin>>a[i]; c=c+a[i] } if(c%10>0){ cout<<c<<endl; } for(int j=0;j<2;j++){ for(int k=0;k>a;k++){ if(min>a[k] && a[k]%10>0){ min=a[k]; } } } if(min==0){ cout<<0<...
a.cc: In function 'int main()': a.cc:11:23: error: invalid types 'int[int]' for array subscript 11 | cin>>a[i]; | ^ a.cc:12:22: error: invalid types 'int[int]' for array subscript 12 | c=c+a[i] | ^ a.cc:19:33: error: invalid ty...
s349269642
p03700
C
#include<stdio.h> int main(void){ long long int N,A,B; long long int i; long long int h[100000]; long long int K; long long int left,right; long long int sum; scanf("%d %d %d",&N,&A,&B); for(i=0;i<N;i++){ scanf("%d",&h[i]); } left=0; right=1000000000; K=(right+left)/2 while(1){ s...
main.c: In function 'main': main.c:19:19: error: expected ';' before 'while' 19 | K=(right+left)/2 | ^ | ; 20 | 21 | while(1){ | ~~~~~
s388882528
p03700
C
#include<stdio.h> #include<math.h> int main(void){ long long N,A,B; long long i,max; long long h[100000]; long long K; long long left,right; long long sum; scanf("%d %d %d",&N,&A,&B); /*N=5; A=2; B=1; max=0;*/ for(i=0;i<N;i++){ scanf("%10d",&h[i]); if(h[i]>max){ max=h[i]; }...
main.c:53:10: error: expected declaration specifiers or '...' before string constant 53 | printf("%llu\n", left); | ^~~~~~~~ main.c:53:20: error: unknown type name 'left' 53 | printf("%llu\n", left); | ^~~~ main.c:55:3: error: expected identifier or '(' before 'return' ...
s799982972
p03700
Java
import java.util.Scanner; public class D { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); int n , k = 0; long a, b; n = stdin.nextInt(); a = stdin.nextLong(); b = stdin.nextLong(); long[] A = new long[n]; for (int i = 0; i < n; i++) { A[i] = stdin.nextInt(); } ...
Main.java:3: error: class D is public, should be declared in a file named D.java public class D { ^ 1 error
s621919991
p03700
Java
import java.util.Scanner; public class D { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); int n , k = 0; int a, b, x = 0; n = stdin.nextInt(); a = stdin.nextInt(); b = stdin.nextInt(); long[] A = new long[n]; for (int i = 0; i < n; i++) { A[i] = stdin.nextInt(); ...
Main.java:3: error: class D is public, should be declared in a file named D.java public class D { ^ 1 error
s966323819
p03700
C++
#include <iostream> #include <queue> bool check_knock(std::vector<int> hp, int a, int b, int search_num) { int less = hp[hp.size() - 1]; int div = a - b; int total = 0; for (int i = 0; i < hp.size(); i++) { hp[i] -= search_num * b; if (hp[i] > 0) { total += (hp[i] / div); ...
a.cc: In function 'int main()': a.cc:35:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 35 | std::sort(hp.begin(), hp.end(), std::greater<int>()); | ^~~~ | qsort
s646196795
p03700
C++
#include <limits> #include <bits/stdc++.h> using namespace std; bool vis[10005]={false}; int a[100005],n; int main() { long long int int i,sum=0,c,b,x; cin>>n>>c>>b; x =c-b; for(i=0;i<n;i++) {cin>>a[i]; } long long int moves =1000000000000000,temp; long long int high,low,mid; hig...
a.cc: In function 'int main()': a.cc:9:19: error: two or more data types in declaration of 'i' 9 | long long int int i,sum=0,c,b,x; | ^~~ a.cc:9:19: error: two or more data types in declaration of 'sum' a.cc:9:19: error: two or more data types in declaration of 'c' a.cc:9:19: error: ...
s321910286
p03700
C++
#include <algorithm> #include <iomanip> #include <istream> #include <map> #include <numeric> #include <ostream> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> #include <queue> using namespace std; class Solution { public: int n, a, b; vector<int> h; bool enough(i...
a.cc: In member function 'bool Solution::enough(int)': a.cc:28:20: error: 'ceil' was not declared in this scope 28 | sum += ceil((h[i] - b * t) / (double)(a - b)); | ^~~~
s833077061
p03700
C++
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <math.h> using namespace std; #define REP(i,n) for (int i=0;i<(n);i++) #define PII pair<int,int> #define LL long long LL n,a,b; LL h[100010]; LL sum=0; bool check(LL t){ LL cnt=0; LL base = t*b; REP(i,n){ LL ...
a.cc: In function 'int main()': a.cc:51:19: error: 'INT_MAX' was not declared in this scope 51 | cout<<nibutan(1,INT_MAX)<<endl; | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 5 | #include <math.h> +++ |+#i...
s323364725
p03700
C++
#include <iostream> #include <algorithm> using namespace std; typedef long long ll; int n, a, b; ll h[100000], h2[100000], hmax = 0; int main() { cin >> n >> a >> b; for (int i = 0; i < n; i++) { cin >> h[i]; hmax = max(h[i], hmax); } int left = 1, right = hmax, mid; while (right != left+1) { mid = (left ...
a.cc: In function 'int main()': a.cc:24:40: error: 'ceil' was not declared in this scope 24 | sum += ceil(h2[i] / (a - b)); | ^~~~
s927785497
p03700
C++
#include <cstdio> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <vector> #include <iostream> #include <stdlib.h> #include <math.h> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(n) for (int i=0;i<(n...
a.cc: In function 'int main()': a.cc:66:17: warning: ISO C++ forbids incrementing a pointer of type 'bool (*)(long int)' [-Wpointer-arith] 66 | q++; | ^ a.cc:66:18: error: lvalue required as increment operand 66 | q++; | ^~
s050127805
p03700
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long A = sc.nextLong(); long B = sc.nextLong(); long h[] = new long[N]; for(int i=0; i<N; i++){ h[i]=sc.nextLong(); } long fin; fin = Long.MAX_VALUE/B...
Main.java:45: error: reached end of file while parsing } ^ 1 error
s896061261
p03700
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long A = sc.nextLong(); long B = sc.nextLong(); long h[] = new long[N]; for(int i=0; i<N; i++){ h[i]=sc.nextLong(); } long answer = binarytree(0,Long.MA...
Main.java:35: error: incompatible types: possible lossy conversion from double to long times = times + Y; ^ 1 error
s242581314
p03700
C++
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; typedef long long ll; ll h[100005]; ll n,a,b; bool check(ll k){ ll cnt = k*b; int num = upper_bound(h+1,h+1+n,cnt) - h; ll sum = 0; for(int i = num;i <= n;i++) { //printf("h[i]=%lld\n",h[i]); ll tmp = h[i] ...
a.cc: In function 'int main()': a.cc:30:18: error: 'INT_MAX' was not declared in this scope 30 | ll l = 0,r = INT_MAX,mid; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<cstring> +++ |+#includ...
s818979671
p03700
C++
#include<cstdio> #include<algorithm> using namespace std; typedef long long ll; ll h[100005]; ll n,a,b; bool check(ll k){ ll cnt = k*b; int num = upper_bound(h+1,h+1+n,cnt) - h; ll sum = 0; for(int i = num;i <= n;i++) { //printf("h[i]=%lld\n",h[i]); ll tmp = h[i] - cnt; sum...
a.cc: In function 'int main()': a.cc:29:18: error: 'INT_MAX' was not declared in this scope 29 | ll l = 0,r = INT_MAX,mid; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include<algorithm> +++ |+#incl...
s515507497
p03700
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; typedef long long ll; ll h[100005]; ll n,a,b; bool check(ll k){ ll cnt = k*b; int num = upper_bound(h+1,h+1+n,cnt) - h; ll sum = 0; for(int i = num;i <= n;i++) { //printf("h[i]=%lld\n",h[i]); ll tmp = h[i] ...
a.cc: In function 'int main()': a.cc:29:18: error: 'INT_MAX' was not declared in this scope 29 | ll l = 0,r = INT_MAX,mid; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<algorithm> +++ |+#incl...
s413079458
p03700
C++
#include <cstdio> #include <vector> #include <stdlib.h> #include <algorithm> #include <functional> using namespace std; int main() { long n, a, b; scanf("%ld", &n); scanf("%ld", &a); scanf("%ld", &b); vector<long> v; vector<long> w; for (int i = 0; i < n; i++) { scanf("%ld", &v[i]); } sort(v.begin(), v.end...
a.cc: In function 'int main()': a.cc:40:34: error: 'ceil' was not declared in this scope 40 | count -= ceil((double)(w[i])/(a-b)); | ^~~~
s135299795
p03700
C++
#include <bits/stdc++.h> using namespace std; int N, A, B, h[100010]; bool check(long long S) { long long cpy = S; for (int i = 0; i < N; i++) { long long x = (h[i] - B * S + A - B - 1) / (A - B); if (x > S) return false; else cpy -= max(0, x); } if (cpy < 0) return false; ...
a.cc: In function 'bool check(long long int)': a.cc:12:24: error: no matching function for call to 'max(int, long long int&)' 12 | else cpy -= max(0, x); | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bi...
s661647144
p03700
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int n, a, b; vector<int> h; bool enough(int ii) { int an = 0; for (int i = 0; i < n; i++) { if (h[i] > b * ii) an += (h[i] - b * ii - 1) / a + 1; else break; } return an <= ii; } void main() { cin >> n >> a...
a.cc:21:1: error: '::main' must return 'int' 21 | void main() { | ^~~~
s657442579
p03700
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main (void){ ll n, a, b; cin >> n >> a >> b; cin.ignore(); vector<ll> h; ll tmp; for (int i = 0; i < n; i++){ cin >> tmp; cin.ignore(); h.push_back(tmp); } // 最初から一体だけ if(n == 1){ cout << h[0] / a + 1 << endl;...
a.cc: In function 'int main()': a.cc:39:5: error: 'cnt' was not declared in this scope; did you mean 'int'? 39 | cnt += max / a + 1; | ^~~ | int a.cc:42:11: error: 'cnt' was not declared in this scope; did you mean 'int'? 42 | cout << cnt << endl; | ^~~ | ...
s561350777
p03700
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main (void){ ll n, a, b; cin >> n >> a >> b; cin.ignore(); vector<ll> h; ll tmp; for (int i = 0; i < n; i++){ cin >> tmp; cin.ignore(); h.push_back(tmp); } // 最初から一体だけ if(n == 1){ cout << h[0] / a + 1 << endl;...
a.cc: In function 'int main()': a.cc:38:5: error: 'cnt' was not declared in this scope; did you mean 'int'? 38 | cnt += max / a + 1; | ^~~ | int a.cc:41:11: error: 'cnt' was not declared in this scope; did you mean 'int'? 41 | cout << cnt << endl; | ^~~ | ...
s952984681
p03700
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; #define reps(i,s,n) for(int (i) = (s); (i) < (n); ++(i)) #define rep(i,n) reps(i,0,n) const int sqrtN = 512; struct SqrtDecomposition { int N, K; vector<int> data; vector<int> bucketSum; vector<int> bucketAdd; SqrtDecomposition(i...
a.cc: In function 'int main()': a.cc:98:21: error: 'struct SqrtDecomposition' has no member named 'update' 98 | seg.update(max,max+1,-B); | ^~~~~~ a.cc:99:21: error: 'struct SqrtDecomposition' has no member named 'update' 99 | seg.update(max,max+1,B-A); ...
s250827850
p03700
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #define MOD 1000000007 #define ll long long ll cmpfunc(const void *a, const void *b){ return (*(ll*)b - *(ll*)a); } int max(int a,int b){ return (a>b)?a:b; } int main(void){ ll n,i,a,b; scanf("%lld %lld %l...
a.cc: In function 'int main()': a.cc:23:29: error: invalid conversion from 'long long int (*)(const void*, const void*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive] 23 | qsort(h+1,n,sizeof(int),cmpfunc); | ^~~~~~~ | ...
s816758632
p03700
C++
// ConsoleApplication2.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include "stdafx.h" #include"stdio.h" #include <string.h> #include <stdlib.h> int cmp(const void *a, const void *b) { if (*(long long*)a < *(long long*)b){ return -1; } else if (*(long long*)a == *(long long*)b) { return 0; } return 1; } int mai...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s142479957
p03700
C++
#include <iostream> #include <set> #include <vector> #include <algorithm> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; int hits = 0; vector<int> healths; while(N--) { int num; cin >> num; healths.push_back(num); } sort(healths.begin(), healths.end(...
a.cc: In function 'int main()': a.cc:22:17: error: 'ceil' was not declared in this scope 22 | hits += ceil((healths[i]-healths[i-1])/(A-B)); | ^~~~
s577934062
p03700
C++
#include <iostream> #include <set> #include <vector> #include <algorithm> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; int hits = 0; vector<int> healths; while(N--) { int num; cin >> num; healths.push_back(num); } sort(healths.begin(), healths.end(...
a.cc: In function 'int main()': a.cc:22:17: error: 'ceil' was not declared in this scope 22 | hits += ceil((healths[i]-healths[i-1])/(A-B)); | ^~~~
s883063065
p03700
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ new Main.start(); } int a,b; int[] hp; void start(){ Scanner in = new Scanner(System.in); int n = in.nextInt(); a = in.nextInt(); b = in.nextInt(); hp = new int[n]; ...
Main.java:9: error: cannot find symbol new Main.start(); ^ symbol: class start location: class Main 1 error
s575162362
p03700
C++
using namespace std; int main() { int n, a, b; scanf("%d", &n); scanf("%d", &a); scanf("%d", &b); vector<int> v(20,0); int sum = 0; for (int i = 0; i < n; i++) { scanf("%d", &v[i]); sum += v[i]; } printf("%d\n", (sum) / (a + (n - 1)*b)); }
a.cc: In function 'int main()': a.cc:6:9: error: 'scanf' was not declared in this scope 6 | scanf("%d", &n); | ^~~~~ a.cc:9:9: error: 'vector' was not declared in this scope 9 | vector<int> v(20,0); | ^~~~~~ a.cc:1:1: note: 'std::vector' is defined in header '<vector>...
s450840624
p03700
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ new ABC_4().start(); } int a,b; int[] hp; void start(){ Scanner in = new Scanner(System.in); int n = in.nextInt(); a = in.nextInt(); b = in.nextInt(); hp = new int[n]; ...
Main.java:9: error: cannot find symbol new ABC_4().start(); ^ symbol: class ABC_4 location: class Main 1 error
s125314944
p03700
C++
#include <cstdio> #include <vector> #include <stdlib.h> #include <algorithm> #include <functional> using namespace std; int main() { int n, a, b; scanf_s("%d", &n); scanf_s("%d", &a); scanf_s("%d", &b); vector<int> v(20,0); int sum = 0; for (int i = 0; i < n; i++) { scanf_s("%d", &v[i]); sum += v[i]; } p...
a.cc: In function 'int main()': a.cc:11:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s383756780
p03700
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); int N,A,B; cin >> N >> A >> B; vector<int> h(N); for(int i = 0; i < N; i++){ cin >> h[i]; } sort(h.begin(),h.end()); long...
a.cc: In function 'int main()': a.cc:28:15: error: no matching function for call to 'remove(std::vector<int>&, int&)' 28 | remove(h,i); | ~~~~~~^~~~~ In file included from /usr/include/c++/14/algorithm:86, from a.cc:3: /usr/include/c++/14/pstl/glue_algorithm_defs.h:224:1: note:...
s632072609
p03700
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; using lli = long long int; using ulli = unsigned long long int; //#define EVEL 1 #ifndef EVEL #define dbug(X) std::cout << #X << ":" <<X<<" " ; #define dbugf(s) std::cout << s << " "; #define dbugln std::cout<<"\n"; #else #define dbug(X) {...
a.cc: In function 'int main()': a.cc:37:25: error: 'cnt' was not declared in this scope; did you mean 'int'? 37 | cnt= (H[i] - H[i-1]) / A; | ^~~ | int
s714485880
p03700
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; using lli = long long int; using ulli = unsigned long long int; //#define EVEL 1 #ifndef EVEL #define dbug(X) std::cout << #X << ":" <<X<<" " ; #define dbugf(s) std::cout << s << " "; #define dbugln std::cout<<"\n"; #else #define dbug(X) {...
a.cc: In function 'int main()': a.cc:43:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 43 | ans = sum / (A + B * (N-1)); | ^~~ | abs
s079816046
p03700
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <cstring> #include <cmath> #include <vector> using namespace std; #define FOR(i,a,b) for (ll i = (a); i < (b); i++) #define REP(i,n) FOR(i,0,n) long gcd(long a, long b){ if (a%b==0){ return b; } else{ return gcd(b,a%b); ...
a.cc: In function 'int main()': a.cc:72:28: error: expected ';' before 'return' 72 | cout << cnt << endl | ^ | ; 73 | 74 | return 0; | ~~~~~~
s675555408
p03700
C++
#include <cstdio> #include <vector> #include <functional> using namespace std; int main() { int N,A,B; std::vector<int> h; scanf("%d %d %d", &N, &A, &B); h.resize(N); for (int i = 0; i < N; i++) { scanf("%d", h.data() + i); } sort(h.begin(), h.end(), std::greater<int>()); int ans = 0; while(h...
a.cc: In function 'int main()': a.cc:19:3: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(h.begin(), h.end(), std::greater<int>()); | ^~~~ | short
s544960209
p03701
C++
#include <bits/stdc++.h> int main() { int N; cin >> N; vector < int>t; int suma = 0; for (int i = 0; i < N; i++) { int a; cin >> a; suma += a; if (a % 10 != 0) { t.push_back(a); } } int minElement = *std::min_element(t.begin(), t.end()); if (suma % 10 == 0 && !t.empty()) { su...
a.cc: In function 'int main()': a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> N; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr...
s919395583
p03701
C++
#include <bits/stdC++.h> int main() { int N; cin >> N; vector < int>t; int suma = 0; for (int i = 0; i < N; i++) { int a; cin >> a; suma += a; if (a % 10 != 0) { t.push_back(a); } } int minElement = *std::min_element(t.begin(), t.end()); if (suma % 10 == 0 && !t.empty()) { su...
a.cc:1:10: fatal error: bits/stdC++.h: No such file or directory 1 | #include <bits/stdC++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s859384279
p03701
C++
#include <bits/stdC++. H> int main() { int N; cin >> N; vector < int>t; int suma = 0; for (int i = 0; i < N; i++) { int a; cin >> a; suma += a; if (a % 10 != 0) { t.push_back(a); } } int minElement = *std::min_element(t.begin(), t.end()); if (suma % 10 == 0 && !t.empty()) { s...
a.cc:1:10: fatal error: bits/stdC++. H: No such file or directory 1 | #include <bits/stdC++. H> | ^~~~~~~~~~~~~~~~ compilation terminated.
s564739203
p03701
C++
using namespace std; int main() { vector<int>s; bool x = true; int n; int aux; int total = 0; int rest = 105; cin >> n; for (int i = 0; i < n; i++) { cin >> aux; s.push_back(aux); total += aux; } if (total % 10 != 0){ cout << total << endl; x = false; } else if (total % 10 == 0) { for (int i = 0;...
a.cc: In function 'int main()': a.cc:3:9: error: 'vector' was not declared in this scope 3 | vector<int>s; | ^~~~~~ a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' +++ |+#include <vector> 1 | using namespace std; a.cc:...
s562220615
p03701
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; int main() { ll n; cin>>n; ll a[n]={}; ll counter=0; ll f=0; for(ll i=0;i<n;i++){ cin>>a[i]; counter+=a[i];} sort(a,a+n); if(counter%10!=0){ cout<<counter<<endl;} else{ for(ll i=0;i<n;i++){ if(a[i]%10!=0){ cout<<cou...
a.cc: In function 'int main()': a.cc:25:17: error: expected '}' at end of input 25 | cout<<0<<endl;}} | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s385635877
p03701
C++
#include<iostream> #include<vector> using namespace std; int main() { vector<int>s; int n; int aux; int total = 0; int cont = 0; int menor = 101; int indice; cin >> n; for (int i = 0; i < n; i++) { cin >> aux; if (aux % 10 == 0) cont++; s.push_back(aux); total += aux; } if (cont == n) cout << "0"...
a.cc: In function 'int main()': a.cc:35:6: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?) 35 | if(s.size!=0) | ~~^~~~ | ...
s146432552
p03701
C++
#include <bits/stdc++.h> using namespace std; int main (){ int n,s,contador, min; int sum=0; multiset <int> notas; cin >>n; for (int i=0;i<n;i++){ cin >> s; notas.insert(s); } for (int i=0;i<n;i++){a for (auto &it:notas){ sum += it; } if (sum % 10 == 0){ min = 101; for (auto &it:notas)...
a.cc: In function 'int main()': a.cc:15:31: error: 'a' was not declared in this scope 15 | for (int i=0;i<n;i++){a | ^
s028948191
p03701
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<int, pii> pipii; typedef pair<pii, pii> piipii; #define all(a) (a).begin(), (a).end() #define sz(a) (int)(a).size() #define eb emplace_back int dp[105][10], a[105]; int main(){ memset(dp, -1, sizeof(dp));...
a.cc: In function 'int main()': a.cc:29:47: error: expected primary-expression before ']' token 29 | for(int j=1;j<10;j++) ans = max(ans, dp[n/][j]); | ^
s497560229
p03701
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll INF = 1e9+7; ll MOD = 998244353; typedef pair<ll,ll> ii; #define iii pair<ii,ll> #define f(i,a,b) for(long long i = a;i < b;i++) #define rf(i,a,b) for(long long i=a;i>=b;i--) #define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #defin...
a.cc: In function 'void dfs(ll)': a.cc:45:16: error: reference to 'visit' is ambiguous 45 | void dfs(ll v){visit[v] = 1;for(auto x:adj[v]){if(!visit[x])dfs(x);}} | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80, from a.cc:1: /usr/include/c++/14...
s632892901
p03701
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int main() { ll t,n,i,j,k,x,sum=0; cin>>n; vector<ll> vi; for( i = 0 ;i< n;i++){ cin>>x; vi.push_back(x); sum+=x; } sort(vi.begin(),vi.end()); ll flag =0; if(sum%10 == 0){ for(i = 0 ;i< n ;i++) ...
a.cc: In function 'int main()': a.cc:19:15: error: cannot convert 'std::vector<long long int>' to 'long long int' in initialization 19 | ll x= vi; | ^~ | | | std::vector<long long int>
s817104619
p03701
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int main() { ll t,n,i,j,k,x,sum=0; cin>>n; vector<ll> vi; for( i = 0 ;i< n;i++){ cin>>x; vi.push_back(x); sum+=x; } sort(vi.begin(),vi.end()); ll flag =0; for(i = 0 ;i< n ;i++) { ll x= ...
a.cc: In function 'int main()': a.cc:18:15: error: cannot convert 'std::vector<long long int>' to 'long long int' in initialization 18 | ll x= vi; | ^~ | | | std::vector<long long int>
s611597328
p03701
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <cctype> #include <cassert> #include <climits> #include <string> #include <bitset> #include <cfloat> #include <unordered_set> #include <...
a.cc: In function 'int main()': a.cc:89:10: error: 'd' was not declared in this scope 89 | if(d[N][j]){ | ^
s066877317
p03701
C++
#include <bits/stdc++.h> /* #include <iostream> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #include <list> #include <set> #include <cmath> #include <cstring> #include <stdio.h> #include <string.h> #include <sstream> #include <stdlib.h> #include <vector> #include <iomanip> #...
a.cc: In function 'int main()': a.cc:95:65: error: no matching function for call to 'max(int64_t&, long long int)' 95 | if(dp[i][j] % 10 == 0) ans = max(ans, 0ll); | ~~~^~~~~~~~~~ In file included from /usr/include/c++...
s381989593
p03701
C++
asdwefwefw
a.cc:1:1: error: 'asdwefwefw' does not name a type 1 | asdwefwefw | ^~~~~~~~~~
s557321667
p03701
Java
import java.util.*; public class ABC075_D { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); int Bombc = scan.nextInt(); int Bombs = scan.nextInt(); int exdmg = Bombc - Bombs; int mnstrhp[] = new int[num]; ...
Main.java:2: error: class ABC075_D is public, should be declared in a file named ABC075_D.java public class ABC075_D { ^ 1 error
s216886031
p03701
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } int[] total =new int[n]; int total = 0; for(int j=1;j...
Main.java:14: error: variable total is already defined in method main(String[]) int total = 0; ^ 1 error
s962339149
p03701
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } int[] total =new int[n]; for(int j=0;j<n;j++){ if(j...
Main.java:15: error: illegal character: '\' if(j = 0 \){ ^ Main.java:17: error: 'else' without 'if' }else{ ^ 2 errors
s723905645
p03701
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } int[] total =new int[n]; for(int j=0;j<...
Main.java:28: error: class, interface, enum, or record expected import java.io.*; ^ Main.java:29: error: class, interface, enum, or record expected import java.util.*; ^ 2 errors
s328692449
p03701
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } int[] total =new int[n]; for(int j=0;j<...
Main.java:20: error: incompatible types: int cannot be converted to boolean for (int k = n-1; k =0; k--) { ^ 1 error
s408050505
p03701
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } long[] total =new long[n]; for(int j=0;...
Main.java:18: error: no suitable method found for sort(long[],Comparator<Object>) Arrays.sort(total, Collections.reverseOrder()); ^ method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable (inference variable T#1 has incompatible bounds equality constraints: long ...
s467912175
p03701
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } long[] total =new long[n]; for(int j=0;...
Main.java:18: error: no suitable method found for sort(long[],Comparator<Object>) Arrays.sort(total, Collections.reverseOrder()); ^ method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable (inference variable T#1 has incompatible bounds equality constraints: long ...
s049001089
p03701
Java
import java.io.*; import java.until.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } long[] total =new long[n]; for(int j=0;...
Main.java:2: error: package java.until does not exist import java.until.*; ^ Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ sym...
s237797255
p03701
Java
import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] a1=new int[n]; int ans = 0; for(int i=0;i<n;i++){ a1[i]=sc.nextInt(); } long[] total =new long[n]; for(int j=0;j<n;j++){ total ...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:14: error: bad operand ...
s185946493
p03701
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,s[1005],sum=0,flag=0; cin>>n; for(int i=0;i<n;i++){ cin>>s[i]; sum+=s[i]; } sort(s,s+n); if(ans%10!=0){ cout<<sum<<'\n'; flag=1; } else{ for(int i=0;i<n;i++){ if(sum-s[i]%10!=0){ cout<<sum-s[i]<<'\n'; flag=1; ...
a.cc: In function 'int main()': a.cc:11:6: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | if(ans%10!=0){ | ^~~ | abs
s540431583
p03701
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,s[1005],sum=0,flag=0; cin>>n; for(int i=0;i<n;i++){ cin>>s[i]; sum+=s[i]; } sort(s,s+n); if(ans%10!=0){ cout<<sum<<'\n'; flag=1; } else{ for(int i=0;i<n;i++){ if(ans-s[i]%10!=0){ cout<<ans-s[i]<<'\n'; flag=1; ...
a.cc: In function 'int main()': a.cc:11:6: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | if(ans%10!=0){ | ^~~ | abs
s290557730
p03701
C++
#include<bits/stdc++.h> #include<iomanip> #include<numeric> using namespace std; int main(){ int n; cin>>n; vector<int> v(n); for(auto &a : v) cin>>a; vector<int> s; s.push_back(0); for(int i=0;i<n;++i){ int m = (int)s.size(); for(int j=0;j<m;++j){ s.push_back(s[...
a.cc:37:5: error: redefinition of 'int main()' 37 | int main(){ | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | int main(){ | ^~~~
s806419640
p03701
C++
#include<bits/stdc++.h> #include<iomanip> #include<numeric> using namespace std; using ll = long long; constexpr int mo = 1e9+7; constexpr int mod = mo; constexpr int inf = 1<<30; int main(){ int n; cin>>n; vector<int> v(n); for(auto &a : v) cin>>a; vector<int> s; s.push_back(0); for(int i...
a.cc:38:15: error: redefinition of 'constexpr const int mo' 38 | constexpr int mo = 1e9+7; | ^~ a.cc:7:15: note: 'constexpr const int mo' previously defined here 7 | constexpr int mo = 1e9+7; | ^~ a.cc:39:16: error: redefinition of 'constexpr const int mod' 39 | constex...
s528565547
p03701
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <stdbool.h> // 与えられた大きさ n の int 型配列 array[]を comp で与えられたオプションでソートする // qsort(array, size, sizeof(int),comp); // 昇順オプション int ASC(const int *a,const int *b){ return (*a - *b); } // 降順オプション int DESC(const int *a,const int *b){ return (*...
main.c: In function 'main': main.c:28:25: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types] 28 | qsort(a,n,sizeof(int),ASC); | ^~~ | | | int (*)(const int *, const int *) In fi...
s836865009
p03701
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <stdbool.h> // 与えられた大きさ n の int 型配列 array[]を comp で与えられたオプションでソートする // qsort(array, size, sizeof(int),comp); // 昇順オプション int ASC(const int *a,const int *b){ return (*a - *b); } // 降順オプション int DESC(const int *a,const int *b){ return (*...
main.c: In function 'main': main.c:25:7: error: 'i' undeclared (first use in this function) 25 | for(i=0;i<n;i++){ | ^ main.c:25:7: note: each undeclared identifier is reported only once for each function it appears in main.c:28:25: error: passing argument 4 of 'qsort' from incompatible pointer type [-...
s007807993
p03701
C++
#include <bits/stdc++.h> #define REP(i, a, b) for(int i = a; i < b; i++) #define REP_(i, a, b) for(int i = a; i <= b; i++) #define sl(n) scanf("%lld", &n); #define si(n) scanf("%d", &n); #define RepAll(a) for(auto x: a) #define cout(ans) cout << ans << endl; typedef long long ll; //分数不为10的倍数的最大情况 using namespace std; ...
a.cc:25:5: error: unterminated comment 25 | /* | ^ a.cc: In function 'int main()': a.cc:24:6: error: expected '}' at end of input 24 | } | ^ a.cc:13:1: note: to match this '{' 13 | { | ^
s395490292
p03701
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define ins(a,b,c) a.insert(a.begin()+b,c) #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int ...
a.cc: In function 'int main()': a.cc:79:15: error: request for member 'first' in 'b.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} 79 | cin>...
s352725154
p03701
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int n; cin >> n; ll sum = 0; vector<int> v(n); for(int i = 0 ; i <n ; i++){ cin >> v[i]; sum += v[i]; } sort(v.begin(),v.end()); int i = 0; while(sum % 10 == 0){ sum -= v[i] i++; } }
a.cc: In function 'int main()': a.cc:19:16: error: expected ';' before 'i' 19 | sum -= v[i] | ^ | ; 20 | i++; | ~
s740742267
p03701
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #define _CRT_SECURE_NO_WARNINGS #define TLong long long #define TBMod 1000000007 int ASC(const int *a,const int *b){ return (*a - *b); } int main(int argc, char const *argv[]) { int n,s[100]; int max = 0,min = 0x7F,pat...
main.c: In function 'main': main.c:19:21: error: 'N' undeclared (first use in this function) 19 | scanf("%d",&N); | ^ main.c:19:21: note: each undeclared identifier is reported only once for each function it appears in main.c:29:39: error: passing argument 4 of 'qsort' from incompat...
s520963720
p03701
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace st...
a.cc: In function 'int main()': a.cc:112:14: error: expected primary-expression before '=' token 112 | if(a%10!==0){ | ^
s181061946
p03701
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace st...
a.cc: In function 'int main()': a.cc:95:7: error: redeclaration of 'int n' 95 | int n=0; | ^ a.cc:90:7: note: 'int n' previously declared here 90 | int n; | ^ a.cc:112:9: error: invalid operands of types 'int [n]' and 'int' to binary 'operator%' 112 | if(s%10!==0){ | ...
s062945615
p03701
C
/* * @Author Silviase(@silviasetitech) * For ProCon */ import java.util.*; import java.lang.*; import java.math.*; public class Main{ static int MOD = (int)1e9+7; // for dfs static int n; static int ansi; static int[] w; static int[] ww; static boolean[] isvis...
main.c:6:1: error: unknown type name 'import' 6 | import java.util.*; | ^~~~~~ main.c:6:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 6 | import java.util.*; | ^ main.c:7:1: error: unknown type name 'import' 7 | import java.lang.*; | ^~~~~~ main.c:...
s914745227
p03701
C
#include<stdio.h> int main(){ int N,i,j,a=0,b=0; scanf("%d",&N); int s[100]; for(i=0;i<N;i++){ scanf("%d",&s[i]); a+=s[i]; } for(i=0;i<N;i++){ for(j=i+1;j<N;j++){ if(s[i]>s[j]){ b=s[i]; s[i]=s[j]; s[j]=b; } } } if(a%10!=0){ break; }else{ for(i=0;i<N;i++){ if((a-s[i])%10 !=0){ ...
main.c: In function 'main': main.c:20:17: error: break statement not within loop or switch 20 | break; | ^~~~~
s218528315
p03701
Java
import java.util.*; public class Main { public static void main(String[] args) Scanner scanner = new Scanner(System.in); int count = scanner.nextInt(); int[] scores = new int[count]; int sum = 0; for (int ix = 0; ix < scores.length; ix++) { scores[ix] = scanner.nextInt(); sum += s...
Main.java:4: error: ';' expected public static void main(String[] args) ^ Main.java:10: error: illegal start of type for (int ix = 0; ix < scores.length; ix++) { ^ Main.java:10: error: > or ',' expected for (int ix = 0; ix < scores.length; ix++) { ...
s395445750
p03701
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> int compar(const int *val1, const int *val2) { if (*val1 < *val2) return -1; else if(*val1 == * val2) return 0; else return 1; } void showScoreList(int s[],int n){ printf("s = [ "); for (int i = 0; i < n; ++i) printf...
main.c: In function 'main': main.c:49:1: error: expected declaration or statement at end of input 49 | } | ^
s676138132
p03701
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int N,sum = 0; cin >> N; std::vector<int> s(N); for (int i = 0; i < N; ++i){ cin >> s.at(i); sum += s.at(i); } if(sum % 10 != 0){ cout << sum << endl; return 0; } else{ sort(s.begin(), s.end()); for (int i = 0; i...
a.cc: In function 'int main(int, const char**)': a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s424887766
p03701
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >>N; int sum=0; vector<int> s(N); for(int i=0;i<N;i++){ cin >>s.at(i); } sort(s.begin(),s.end()); int x=10; int flag=0; for(int i=0;i<N;i++){ s += s.at(i); if(s.at(i)%10 != 0 && flag != 1){ x=s.at(i); flag...
a.cc: In function 'int main()': a.cc:16:7: error: no match for 'operator+=' (operand types are 'std::vector<int>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 16 | s += s.at(i); | ~~^~~~~~~~~~ a.cc:23:12: error: no match for 'operator%' (operand types are 'std::vec...
s294632420
p03701
C++
#include <cstdio> #define min(a, b) (a < b ? a : b) int main() { int no_of_elements; scanf("%d", &no_of_elements); const int oo = 1e9 + 9; int sum = 0, min_non_multiple_10 = oo; while(no_of_elements--) { int element; scanf("%d", &element); sum += element; if...
a.cc: In function 'int main()': a.cc:25:24: error: 'max_non_multiple_10' was not declared in this scope; did you mean 'min_non_multiple_10'? 25 | printf("%d\n", max_non_multiple_10 == oo ? 0 : sum - min_non_multiple_10); | ^~~~~~~~~~~~~~~~~~~ | min_no...
s943554560
p03701
C++
#include<cstdlib> #include<iostream> #include<algorithm> #include<vector> #include<string> using namespace std; typedef long long lng; #define UP(i,a,b) for(int i=(a); i<=(b); ++i) #define DOWN(i,b,a) for(int i=(b); i>=(a); --i) #define REP(i,n) UP(i,0,n-1) #define ALL(a) (a).begin(), (a).end() #define UNIQUE(a) a.eras...
a.cc:38:16: error: macro "UP" requires 3 arguments, but only 2 given 38 | UP(i, 10000) { | ^ a.cc:8:9: note: macro "UP" defined here 8 | #define UP(i,a,b) for(int i=(a); i<=(b); ++i) | ^~ a.cc: In function 'void dpSol()': a.cc:29:10: error: invalid types 'int[int]' for arra...
s624718178
p03701
C++
#include<algorithm> #include<iostream> using namespace std; int main() { int n; int a[n]; cin>>n>>a[n]; sort(a[1],a[1]+n); int cnt; for(int i=1;i<=n;i++) { cnt=cnt+a[i]; } if(cnt%10==0) { for(int j=1;j<=n;j++) { cnt=cnt-a[j]; if(cnt%10!=0) { cout<<cnt; return 0; } else { ...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/inclu...
s697436614
p03701
C++
#include <iostream> #include <algorithm> #include <cstdio> using namespace std; typedef long long ll; int n,ans; bool dp[10105]; int main(void){ scanf("%d",&n); dp[0]=true; while(n--){ int s; scanf("%d",&s); for(int i=10000;i>=0;i--)if(dp[i])dp[i+s]=true; } for(int i=10000;i>...
a.cc: In function 'int main()': a.cc:18:18: error: expected ',' before ';' token 18 | ans=i; | ^ | , a.cc:18:18: error: expected identifier before ';' token a.cc:18:18: error: expected ']' before ';' token 18 | ans=i; | ^...
s616685963
p03701
C++
int main(){ int n; cin >> n; int s[n+1]; for(int i = 0;i < n; i++){ cin >> s[i]; } bool dp[110][110 * 100]; memset( dp, 0 ,sizeof(dp)); dp[0][0] = true; for(int i = 0;i < n; i++){ for(int j=0; j <= 100 * n;j++){ if(j<s[i]) dp[i+1][j] = dp[i][j]; ...
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin >> n; | ^~~ a.cc:13:5: error: 'memset' was not declared in this scope 13 | memset( dp, 0 ,sizeof(dp)); | ^~~~~~ a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fix...
s747765875
p03701
C++
int main(){ int n; cin >> n; int s[n+1]; for(int i = 0;i < n; i++){ cin >> s[i]; } bool dp[110][110 * 100]; memset( dp, 0 ,sizeof(dp)); dp[0][0] = true; for(int i = 0;i < n; i++){ for(int j=0; j <= 100 * n;j++){ if(j<s[i]) dp[i+1][j] = dp[i][j]; ...
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin >> n; | ^~~ a.cc:13:5: error: 'memset' was not declared in this scope 13 | memset( dp, 0 ,sizeof(dp)); | ^~~~~~ a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fix...