submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s132131047
p03701
C
#include <stdio.h> void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } void bubbleSort(int arr[], int n) { int i, j; for (i = 0;i < n - 1; i++) for (j = 0; j < n - i - 1; j++) if (arr[j] > arr[j + 1]) swap(&arr[j], &arr[j + 1]); } int main(vo...
main.c: In function 'main': main.c:42:17: error: 'j' undeclared (first use in this function) 42 | j = s[i]; | ^ main.c:42:17: note: each undeclared identifier is reported only once for each function it appears in
s786110982
p03701
C++
#include <iostream> #include <string> #include <algorithm> #include <string> using namespace std; int main() { int n, ans = 0; cin >> n; int s[n]; for (int i = 0; i < n; i++) { cin >> s[i]; ans += s[i]; } sort(s, s + n); if (ans % 10 == 0){ for (i = 0; i < n; i++){ if (s[i] % 10 != 0){ ...
a.cc: In function 'int main()': a.cc:16:14: error: 'i' was not declared in this scope 16 | for (i = 0; i < n; i++){ | ^
s782762242
p03701
C++
#include<iostream> #include<algorithm> using namespace std; int n; int a[101]; long long sum; int main() { cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; sum+=a[i]; } sort(a+1,a+n+1); int k=1; while(sum%10==0&&k<=nd) { sum-=a[k]; k++; } cout<<sum; return 0; }
a.cc: In function 'int main()': a.cc:17:29: error: 'nd' was not declared in this scope; did you mean 'n'? 17 | while(sum%10==0&&k<=nd) | ^~ | n
s718747890
p03701
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int n,sum=0; int s[100]={}; cin>>n; for(int i=0;i<n;i++){ cin>>s[i]; sum+=s[i]; } sort(s,s+n); if(sum%10==0){ for(int i=0;i<n;i++){ if(s[i]%10!=0){ sum-=s[i]; break; }}} if(sum%10==0)sum=0; cout<<sum<endl; return 0; }
a.cc: In function 'int main()': a.cc:20:10: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 20 | cout<<sum<endl; | ~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale...
s463786201
p03701
C
// // Created by Akifumi Ohata on 2017/09/29. // #include<iostream> #include <vector> #include <numeric> using namespace std; int main(){ int N; cin >> N ; std::vector<int> scores; for(int n=0;n<N ;n++) { int tmp; cin >>tmp; scores.push_back(tmp); } std::sort(s...
main.c:6:9: fatal error: iostream: No such file or directory 6 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s892938679
p03701
C++
#include "IntMod.h" typedef IntMod<1000000007> MInt; //#include "Union_Find.h" #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <vector> #include <utility> #include <algorithm> #include <functional> #include <cmath> #include <stack> #include <queue> #include <set>...
a.cc:1:10: fatal error: IntMod.h: No such file or directory 1 | #include "IntMod.h" | ^~~~~~~~~~ compilation terminated.
s036315383
p03701
C++
import sys N = int(input()) s = list() for i in range(N): s.append(int(input())) s.sort(reverse=True) print(s) point = sum(s) l = len(s) i = 0 while i < 1: if point % 10 != 0: print(point) sys.exit() if not s == []: point -= s.pop() i += 1 print("0")
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s135819098
p03701
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main(void){ int n; cin >> n; int m = INT_MAX, sum = 0; int s[n]; for(int i=0;i<n;i++){ cin >> s[i]; if (s[i] < m && s[i]%10) m = s[i]; sum += s[i]; } if (m == INT_MAX) ans = 0; else ans = sum - m; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:20: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | if (m == INT_MAX) ans = 0; else ans = sum - m; | ^~~ | abs a.cc:11:34: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | if (m =...
s495646366
p03701
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int i,n,a,b,low=0,high=2000000000,ans=2000000000,s[100009],mid,z; cin>>n>>a>>b; for(i=0;i<n;i++) cin>>s[i]; while(low<=high) { z=0; mid=(low+high)/2; for(i=0;i<n;i++) { if(a[i]>mid*b) { z=z+ceil((1.0*(s[i]-mid*b))/(s-b)); }...
a.cc: In function 'int main()': a.cc:15:9: error: invalid types 'long long int[long long int]' for array subscript 15 | if(a[i]>mid*b) | ^ a.cc:17:35: error: invalid operands of types 'double' and 'long long int*' to binary 'operator/' 17 | z=z+ceil((1.0*(s[i]-mid*b))/(s-b)); | ...
s634434318
p03701
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int i,n,a,b,low=0,high=2000000000,ans=2000000000,s[100009],mid; cin>>n>>a>>b; for(i=0;i<n;i++) cin>>s[i]; while(low<=high) { z=0; mid=(low+high)/2; for(i=0;i<n;i++) { if(a[i]>mid*b) { z=z+ceil((1.0*(a[i]-mid*b))/(a-b)); } ...
a.cc: In function 'int main()': a.cc:12:3: error: 'z' was not declared in this scope 12 | z=0; | ^ a.cc:16:9: error: invalid types 'long long int[long long int]' for array subscript 16 | if(a[i]>mid*b) | ^ a.cc:18:24: error: invalid types 'long long int[long long int]' for array subscr...
s475926563
p03701
C++
#include<bits/stdc++.h> using namespace std; { long long int i,n,a,b,low=0,high=2000000000,ans=2000000000,s[100009],mid; cin>>n>>a>>b; for(i=0;i<n;i++) cin>>s[i]; while(low<=high) { z=0; mid=(low+high)/2; for(i=0;i<n;i++) { if(a[i]>mid*b) { z=z+ceil((1.0*(a[i]-mid*b))/(a-b)); } } if(z<...
a.cc:3:1: error: expected unqualified-id before '{' token 3 | { | ^
s317359195
p03701
C++
import std.algorithm; import std.array; import std.ascii; import std.bigint; import std.complex; import std.container; import std.conv; import std.functional; import std.math; import std.range; import std.stdio; import std.string; import std.typecons; auto readInts() { return array(map!(to!int)(readln().strip().split...
a.cc:33:15: error: too many decimal points in number 33 | s = s[1..$]; | ^~~~ a.cc:1:1: error: 'import' does not name a type 1 | import std.algorithm; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 ...
s869696072
p03701
C++
#include <bits/stdc++.h> using namespace std; //{{{ /********************************************************************/ struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<vector<int> > vii; typedef queue<...
a.cc: In function 'int main()': a.cc:66:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 66 | if (cnt == n) ans = 0; | ^~~ | abs
s865676258
p03701
C++
using System; using System.Linq; class Program { public static void Main(string[] args) { int N = int.Parse(System.Console.ReadLine()); int total = 0, oddMin = int.MaxValue; for (int i = 0; i < N; i++) { int score = int.Parse(System.Console.ReadLine()); ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:6:11: error: expected ':' before 'static' 6 | public static void Main(string[] args) ...
s791276196
p03701
C++
using System; using System.Linq; class Program { public static void Main(string[] args) { int N = int.Parse(System.Console.ReadLine()); int total = 0, oddMin = int.MaxValue; for (int i = 0; i < N; i++) { int score = int.Parse(System.Console.ReadLine()); ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:6:11: error: expected ':' before 'static' 6 | public static void Main(string[] args) ...
s191122872
p03701
C++
#include <iostream> #include <algorithm> #include <map> #include <cmath> #include <climits> using namespace std; #define ll long long int bool bin (ll mid , vector<ll>arr , ll a ,ll b) { vector<ll>arr1(arr) ; for(ll i = 0 ; i < arr1.size() ; ++i) { arr1[i] -= ((mid) * b ) ; } ll c = 0...
a.cc:9:20: error: 'vector' has not been declared 9 | bool bin (ll mid , vector<ll>arr , ll a ,ll b) | ^~~~~~ a.cc:9:26: error: expected ',' or '...' before '<' token 9 | bool bin (ll mid , vector<ll>arr , ll a ,ll b) | ^ a.cc: In function 'bool bin(long ...
s487989871
p03701
C++
#include<iostream> using namespace std; int main() { int n=0,k=0,r=0; int a[2*10^50]; cin >> n; cin >> k; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; ++i) { int z = 0; for (int j = i; j < n; ++j) { z += a[j]; r++ } } cout << r << endl; }
a.cc: In function 'int main()': a.cc:19:28: error: expected ';' before '}' token 19 | r++ | ^ | ; 20 | 21 | } | ~
s030569730
p03701
C++
#include<iostream> using namespace std; int main() { int n=0,k=0,r=0; int a[2*10^50]; cin >> n; cin >> k; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; ++i) { int z = 0; for (int j = i; j < n; ++j) { z += a[j]; r++ } } cout << r << endl; }
a.cc: In function 'int main()': a.cc:19:28: error: expected ';' before '}' token 19 | r++ | ^ | ; 20 | 21 | } | ~
s195802225
p03701
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int n=0; vector<int> s; int inputS; int sum; bool tf=false; int search=0; cin>>n; for(int i=0;i<n;i++){ cin>>inputS; s.push_back(inputS); } for(int i=0;i<n;i++{ i...
a.cc: In function 'int main()': a.cc:22:24: error: expected ')' before '{' token 22 | for(int i=0;i<n;i++{ | ~ ^ | )
s614933425
p03701
Java
import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[]; int s = 0; Arrays.sort(S); for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); s += S[i]; } ...
Main.java:11: error: variable S might not have been initialized Arrays.sort(S); ^ 1 error
s390528102
p03701
Java
import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[] = new int[N]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i...
Main.java:28: error: incompatible types: unexpected return value return 0; ^ 1 error
s272147190
p03701
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[] = new int[N]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i < N; i++) { s += S[...
Main.java:17: error: '.class' expected Arrays.sort(S[]); ^ 1 error
s616079564
p03701
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[] = new int[N]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i < N; i++) { s += S[...
Main.java:17: error: cannot find symbol Arrays.sort(S); ^ symbol: variable Arrays location: class Main 1 error
s542600500
p03701
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i < N; i++) { s += S[i]; } ...
Main.java:17: error: '.class' expected Arrays.sort(S[]); ^ 1 error
s883396353
p03701
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i < N; i++) { s += S[i]; } ...
Main.java:17: error: '.class' expected Arrays.sort(S[]); ^ 1 error
s453627810
p03701
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i < N; i++) { s += S[i]; } ...
Main.java:17: error: cannot find symbol Arrays.sort(S); ^ symbol: variable Arrays location: class Main 1 error
s958959965
p03701
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i < N; i++) { s += S[i]; } ...
Main.java:26: error: reached end of file while parsing } ^ 1 error
s279612669
p03701
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int S[]; for(int i = 0; i < N; i++) { S[i] = sc.nextInt(); } int s = 0; for(int i = 0; i < N; i++) { s += S[i]; } ...
Main.java:25: error: reached end of file while parsing } ^ 1 error
s945288205
p03701
Java
import java.util.Arrays; import java.util.Scanner;   public class Main{   public static void main(String[] args) { Scanner sc = new Scanner(System.in);   int n = sc.nextInt();   int[] arr = new int[n]; int sum = 0; for (int i = 0; i < n; i++) { arr[i] = sc.nextInt...
Main.java:3: error: illegal character: '\u00a0' ? ^ Main.java:5: error: illegal character: '\u00a0' ? ^ Main.java:8: error: illegal character: '\u00a0' ? ^ Main.java:10: error: illegal character: '\u00a0' ? ^ Main.java:17: error: illegal character: '\u00a0' ? ^ Main.java:27: error: illegal character: '\u00a0' ? ^ Main....
s308531814
p03701
C
#include<stdio.h> int main(void){ int N,i,min=101; int s[100]; int point; scanf("%d",&N); i=0; while(i<N){ scanf("%d",&s[i]); if(s[i]%10!=0 && min>s[i]){ min=s[i]; } i++; } for(i=0;i<N;i++){ sum+=s[i]; } if(point%10!=0){ printf("%d\n",point); }else if(min!=101){ printf("%d\...
main.c: In function 'main': main.c:21:17: error: 'sum' undeclared (first use in this function) 21 | sum+=s[i]; | ^~~ main.c:21:17: note: each undeclared identifier is reported only once for each function it appears in
s398529933
p03701
C++
///#pragma GCC optimize ("O2") ///G++Ó㬠///#pragma comment(linker, "/STACK:36777216")///C++Óà ///#pragma comment(linker, "/STACK:102400000,102400000")///C++Ó㬷ÀÖ¹Õ»Òç³ö #include <bits/stdc++.h> //#include <unordered_map> //#include <unordered_set> using namespace std; #define debug cout << "****************...
a.cc: In function 'int main()': a.cc:70:29: error: expected ';' before '{' token 70 | if(v[i] && (i % 10 != 0){ | ^ | ; a.cc:74:5: error: expected primary-expression before 'if' 74 | if(res % 10 == 0)cout << 0 << endl; | ^~ a.cc...
s658856391
p03701
C++
#include <iostream> #include <vector> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector<int> ss(n); for (int i = 0; i < n; i++) { cin >> ss[i]; } int sum = 0; int minNot10 = 1000]; for (int i = 0; i < n; i++) { sum += ss[i]; if (ss[i]...
a.cc: In function 'int main()': a.cc:19:22: error: expected ',' or ';' before ']' token 19 | int minNot10 = 1000]; | ^
s281596744
p03701
C++
#include<bits/stdc++.h> #define maxn 100010 using namespace std; LL seg[maxn],a,b,d,n; bool ok(int k){ int ans=0; for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){ ans+=((seg[i]-k*b-1)/d+1); if(ans>k) return false; } if(ans<=k) return true; return false; } int main(){ cin>>n>>a>>b; d=a-b; for(int i=1;i<=n;i++) scanf(...
a.cc:4:1: error: 'LL' does not name a type 4 | LL seg[maxn],a,b,d,n; | ^~ a.cc: In function 'bool ok(int)': a.cc:7:19: error: 'n' was not declared in this scope 7 | for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){ | ^ a.cc:7:27: error: 'seg' was not declared in this scope 7 | ...
s626079908
p03701
Java
import java.util.Arrays; import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] arr = new int[n]; int sum = 0; for (int i = 0; i < n; i++) { arr[i] = sc.nextIn...
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java public class Solution { ^ 1 error
s126538908
p03701
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(ut i=(a);i<(ut)(b);i++) #define REP(i,b) FOR(i,0,b) #define ALL(c) c.begin(),c.end() #define PB push_back #define cat //cout << __LINE__ << endl; using namespace std; typedef long long LL; typedef double ld; typedef LL ut; typedef vector<ut> VI; typedef pair<ut,ut> pr; ty...
a.cc: In function 'LL solve(LL, LL, LL)': a.cc:44:53: error: expected ';' before ')' token 44 | if(t>=11) ans+=(dia-abs(0))*solve(D,s+1,t-1)); | ^ | ;
s551096056
p03701
C++
#include <bits/stdc++.h> using namespace std; int main() { int m,n,i; while(cin>>m) { int s=0; n=0; for(i=0;i<m;i++) { cin>>x; s+=x; if(x%10!=0) { n+=x; } } cout<<max(s,n)<<endl; ...
a.cc: In function 'int main()': a.cc:13:18: error: 'x' was not declared in this scope 13 | cin>>x; | ^
s562668556
p03701
C++
#include <bits/stdc++.h> #define ALL(a) (a).begin(),(a).end() #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define rep(i,n) FOR(i,0,n) #define RFOR(i,a,b) for(int i=(a)-1;i>=(b);i--) #define rrep(i,n) RFOR(i,n,0) #define DEBUG(x) cout<<#x<<": "<<x<<endl #define vint vector<int> #define vdbl vector<double> #define vstr ...
a.cc: In function 'int main()': a.cc:58:27: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 58 | cout << 1 << end; | ~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/istream:41, ...
s478071337
p03701
C
#include <bits/stdc++.h> using namespace std; #define INF 1001000100010001000 #define MOD 1000000007 #define EPS 1e-10 #define int long long #define rep(i, N) for (int i = 0; i < N; i++) #define Rep(i, N) for (int i = 1; i < N; i++) #define For(i, a, b) for (int i = (a); i < (b); i++) #define pb push_back #define eb ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s004393330
p03701
C++
///#pragma GCC optimize ("O2") ///G++Ó㬠///#pragma comment(linker, "/STACK:36777216")///C++Óà ///#pragma comment(linker, "/STACK:102400000,102400000")///C++Ó㬷ÀÖ¹Õ»Òç³ö #include <bits/stdc++.h> //#include <unordered_map> //#include <unordered_set> using namespace std; #define debug cout << "****************...
a.cc: In function 'int main()': a.cc:65:26: error: expected primary-expression before ')' token 65 | if(res % 10 != 0))break; | ^
s953259611
p03701
C++
/* _oo0oo_ 088888880 88" . "88 (| -_- |) 0\ = /0 ___/'---'\___ .' \\\\| |// '. ...
a.cc: In function 'int main()': a.cc:71:31: error: expected ';' before 'ans' 71 | if((ans-i)%10==0) continue | ^ | ; 72 | ans-=i; | ~~~
s876684133
p03701
Java
public class Main { public static void main(String[] args) { Scanner sn = new Scanner(System.in); List<Integer> inputList = new ArrayList<Integer>(); while (sn.hasNextLine()) { String str = sn.nextLine(); inputList.add(Integer.parseInt(str)); } int num = inputList.get(0); List<Integer> point...
Main.java:36: error: cannot find symbol private static int calcMinNumber(List<Integer> list){ ^ symbol: class List location: class Main Main.java:3: error: cannot find symbol Scanner sn = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3:...
s521579639
p03701
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class main { public static void main(String[] args) { Scanner sn = new Scanner(System.in); List<Integer> inputList = new ArrayList<Integer>(); while (sn.hasNextLine()) { String str = sn.nextLine(); inputList.add(In...
Main.java:5: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s656869452
p03701
Java
public class C_Bugged { public static void main(String[] args) { Scanner sn = new Scanner(System.in); List<Integer> inputList = new ArrayList<Integer>(); while (sn.hasNextLine()) { String str = sn.nextLine(); inputList.add(Integer.parseInt(str)); } int num = inputList.get(0); List<Integer> p...
Main.java:1: error: class C_Bugged is public, should be declared in a file named C_Bugged.java public class C_Bugged { ^ Main.java:36: error: cannot find symbol private static int calcMinNumber(List<Integer> list){ ^ symbol: class List location: class C_Bugged Main.java:3...
s639794568
p03701
C++
#include <iostream> #include<cstdio> #include<cstring> #include<cmath> #define N 300000 #define maxn 1000000000 using namespace std; int tt; int a[N]; struct ss{int i,x;}sum[N]; bool cmp(ss s1,ss s2){if(s1.x!=s2.x)return s1.x<s2.x;return s1.i<s2.i;} int lbt(int x){return x &(-x);} int s[N]; int n,k; long long ask(int x...
a.cc: In function 'int main()': a.cc:39:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 39 | sort(sum+1,sum+n+1,cmp); | ^~~~ | sqrt
s411980218
p03701
C++
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class C_Bugged { public static void main(String[] args) { Scanner sn = new Scanner(System.in); List<Integer> inputList = new ArrayList<Integer>(); while (sn.hasNextLine()) { String str = sn.nextLine(); inputList.ad...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.ArrayList; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.List; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s141385118
p03701
C++
#include<iostream> #include<vector> #include<string> #include<map> #include<algorithm> using namespace std; int dp[105][15]; int n; vector<int> s; int dfs(int now, int keta); int main() { int input; memset(dp, -1, sizeof(dp)); cin >> n; for (int i = 0; i < n; i++) { cin >> input; s.push_back(input); } cout <<...
a.cc: In function 'int main()': a.cc:13:9: error: 'memset' was not declared in this scope 13 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<algorithm> +++ |+#include <cs...
s829052581
p03701
C++
#include <iostream> #include <vector> #include <cstdio> #include <cstdlib> #include <climits> #include <cassert> using namespace std; typedef unsigned int index; int main() { #ifdef ONPC : assert(freopen("a.in", "r", stdin)); : assert(freopen("a.out", "w", stdout)); #else #endif : size_t n; : cin >> n; : v...
a.cc: In function 'int main()': a.cc:19:1: error: expected primary-expression before ':' token 19 | : size_t n; | ^ a.cc:20:1: error: expected primary-expression before ':' token 20 | : cin >> n; | ^ a.cc:21:1: error: expected primary-expression before ':' token 21 | : vector<int> a(n); ...
s197198250
p03701
C++
3 10 20 30
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s108075525
p03701
C++
#include<iostream> #include<iomanip> #include<map> #include<unordered_map> #include<set> #include<unordered_set> #include<vector> #include<array> #include<string> #include<stack> #include<queue> #include<algorithm> #include<cassert> #include<functional> #include<random> #include<complex> #include<bitset> #include<chron...
a.cc:20:13: error: '::main' must return 'int' 20 | #define int int64_t | ^~~~~~~ a.cc:39:1: note: in expansion of macro 'int' 39 | int main() { | ^~~
s830776856
p03702
C++
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
a.cc: In function 'int main()': a.cc:85:23: error: no matching function for call to 'max(long long int, int)' 85 | REP(i,N) cnt+=(max(H[i]-B*mid,0)+A-1)/A; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:1: /usr/include/c++/14/bits/s...
s671008684
p03702
C++
/** * * Author : MeGa * */ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <...
a.cc:47:1: error: expected initializer before 'long' 47 | long long a,b; | ^~~~ a.cc: In function 'long long int solve(long long int)': a.cc:51:21: error: 'a' was not declared in this scope; did you mean 'aa'? 51 | long long dif = a-b; | ^ | aa a.cc:51...
s072080809
p03702
C++
#include<cstdio> int n,use[100005]; long long a,b,f[100005]; int check(long long x) { long long k=a-b,t=0; for (int i=1;i<=n;i++) use[i]=b*x; for (int i=1;i<=n;i++) if (use[i]<f[i]) t=t+(f[i]-use[i])/k+!!((f[i]-use[i])%k); return x>=t; } long long bs(long long l,long long r) { if (l==r) return l;a long long mid=(...
a.cc: In function 'long long int bs(long long int, long long int)': a.cc:13:29: error: expected ';' before 'long' 13 | if (l==r) return l;a | ^ | ; 14 | long long mid=(l+r)/2; | ~~~~ a.cc:15:19: erro...
s795216190
p03702
C++
#include<iostream> #include<vector> #include<algorithm> #include<queue> #include<deque> #include<cmath> #include<map> #include<cstring> using namespace std; typedef long long ll; const int INF = 1e9; const int MOD = 1e9 + 7; const ll LLINF = 1LL<<60; #define P pair<int, int> #define rep(i, n) for (int i = 0; i < (int)...
a.cc: In function 'int main()': a.cc:93:30: error: 'n' was not declared in this scope 93 | cnt += (h[i]-n*B+A-B-1)/(A - B); | ^
s235213855
p03702
C++
# include <bits/stdc++.h> using namespace std; typedef long long LL; #define 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 = (LL)m[i]-x*b; if(t>0) { sum += (int)ceil(t*1.0/(a-b)); if(sum > x || sum < 0) ...
a.cc:6:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression 6 | int n, a, b, m[maxn+3]; | ^ a.cc:6:20: error: could not convert '(1.0e+5 + (double)3)' from 'double' to 'long unsigned int' 6 | int n, a, b, m[maxn+3]; | ^ ...
s566842855
p03702
C++
#include<iostream> using namespace std; typedef long long LL; #define 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 = (LL)m[i]-x*b; if(t>0) { sum += (int)ceil(t*1.0/(a-b)); if(sum > x || sum < 0) ...
a.cc:6:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression 6 | int n, a, b, m[maxn+3]; | ^ a.cc:6:20: error: could not convert '(1.0e+5 + (double)3)' from 'double' to 'long unsigned int' 6 | int n, a, b, m[maxn+3]; | ^ ...
s865244255
p03702
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<cstring> #include<cmath> #include<ctime> #include<algorithm> #include<utility> #include<stack> #include<queue> #include<vector> #include<set> #include<map> #include<bitset> #define EPS 1e-9 #define PI acos(-1.0) #define INF 0x3f3f3f3f #defi...
a.cc: In function 'bool check(long long int)': a.cc:30:12: error: 'a' was not declared in this scope 30 | if(a[i]>temp){ | ^
s155167183
p03702
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<cstring> #include<cmath> #include<ctime> #include<algorithm> #include<utility> #include<stack> #include<queue> #include<vector> #include<set> #include<map> #include<bitset> #define EPS 1e-9 #define PI acos(-1.0) #define INF 0x3f3f3f3f #defi...
a.cc: In function 'bool check(long long int)': a.cc:31:17: error: 'h' was not declared in this scope 31 | if((h[i]-temp)%sub) | ^ a.cc: In function 'int main()': a.cc:46:23: error: 'h' was not declared in this scope 46 | scanf("%lld",&h[i]); | ...
s356733026
p03702
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<ll> arr; ll n, a, b; int bul(ll x){ int ans = x; for (int i = 0; i < n; i++){ ll kes = arr[i] - b*x; kes = max(kes, 0); ans -= kes/a + (kes%a == 0); } if (ans < 0) return 0; return 1; } int main(){ cin >> n >> a >> ...
a.cc: In function 'int bul(ll)': a.cc:12:14: error: no matching function for call to 'max(ll&, int)' 12 | kes = max(kes, 0); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.c...
s872200629
p03702
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<ll> arr; ll n, a, b; int bul(ll x){ int ans = x; for (int i = 0; i < n; i++){ ll kes = arr[i] - b*x; kes = max(kes, 0); ans -= kes/a + (kes%a == 0); } if (ans < 0) return 0; return 1; } int main(){ cin >> n >> a >> ...
a.cc: In function 'int bul(ll)': a.cc:12:14: error: no matching function for call to 'max(ll&, int)' 12 | kes = max(kes, 0); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.c...
s295274780
p03702
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll vector<ll> arr; ll n, a, b; int bul(ll x){ int ans = x; for (int i = 0; i < n; i++){ ll kes = arr[i] - b*x; kes = max(kes, 0); ans -= kes/a + (kes%a == 0); } if (ans < 0) return 0; return 1; } int main(){ cin >> n >> a >> ...
a.cc:6:1: error: expected initializer before 'vector' 6 | vector<ll> arr; | ^~~~~~ a.cc:7:1: error: 'll' does not name a type 7 | ll n, a, b; | ^~ a.cc:9:9: error: 'll' was not declared in this scope 9 | int bul(ll x){ | ^~ a.cc: In function 'int main()': a.cc:22:10: error: 'n' was...
s426340828
p03702
C++
#include <bits/stdc++.h> using namespace std; vector<ll> arr; ll n, a, b; int bul(ll x){ int ans = x; for (int i = 0; i < n; i++){ ll kes = arr[i] - b*x; kes = max(kes, 0); ans -= kes/a + (kes%a == 0); } if (ans < 0) return 0; return 1; } int main(){ cin >> n >> a >> b; arr.resize(n); ...
a.cc:4:8: error: 'll' was not declared in this scope 4 | vector<ll> arr; | ^~ a.cc:4:10: error: template argument 1 is invalid 4 | vector<ll> arr; | ^ a.cc:4:10: error: template argument 2 is invalid a.cc:5:1: error: 'll' does not name a type 5 | ll n, a, b; | ^~ a.cc:7:9: ...
s372350982
p03702
C++
#include <bits/stdc++.h> using namespace std; vector<ll> arr; ll n, a, b; int bul(ll x){ int ans = x; for (int i = 0; i < n; i++){ ll kes = arr[i] - b*x; kes = max(kes, 0); ans -= kes/a + (kes%a == 0); } if (ans < 0) return 0; return 1; } int main(){ cin >> n >> a >> b; arr.resize(n); ...
a.cc:4:8: error: 'll' was not declared in this scope 4 | vector<ll> arr; | ^~ a.cc:4:10: error: template argument 1 is invalid 4 | vector<ll> arr; | ^ a.cc:4:10: error: template argument 2 is invalid a.cc:5:1: error: 'll' does not name a type 5 | ll n, a, b; | ^~ a.cc:7:9: ...
s014145062
p03702
C++
#include <iostream> #include <bits/stdc++.h> using namespace std; int N; long long A, B; long long H[210000]; int main() { cin >> N >> A >> B; for (int i = 0; i < N; ++i) cin >> H[i]; sort(H, H+N); long long lo = 0, hi = 1e16; while (hi - lo > 1) { long long mid = (lo + hi) / 2; lon...
a.cc:36:1: error: expected declaration before '}' token 36 | } | ^
s102919772
p03702
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N=sc.nextInt(); int A=sc.nextInt(); int B=sc.nextInt(); int[] h=new int[n]; int ans =0; for(int i=0;i<N;i++){ h[i]=sc.nextInt(); } while(h[N-1] < ...
Main.java:9: error: cannot find symbol int[] h=new int[n]; ^ symbol: variable n location: class Main 1 error
s331645175
p03702
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N=sc.nextInt(); int A=sc.nextInt(); int B=sc.nextInt(); int[] h=new int[n]; int ans =0; for(int i=0;i<N;i++){ h[i]=sc.nextInt(); } while(h[N-1] < ...
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 { | ^~~~~~
s410747660
p03702
C++
#include <iostream> using namespace std; int main() { long long n, a, b; cin >> n >> a >> b; long long h[n], begin = 1, end = 0; for (int i = 0; cin >> h[i]; i++) { end = max(end, h[i]); } end = max(1, end / b); while (begin < end) { long long mid = (begin + end) / 2, count ...
a.cc: In function 'int main()': a.cc:11:14: error: no matching function for call to 'max(int, long long int)' 11 | end = max(1, end / b); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, fro...
s466942610
p03702
C++
#include<iostream> using namespace std; int main() { int N,A,B; cin >> N >> A >> B; int H[100010]; for(int i=0;i<N;i++){ cin >> H[i]; } sort(H,H+N-1); int isNG = 0; int isOK = (H[N-1]+B-1)/B; while(isOK-isNG>1){ int mid = (isOK+isNG)/2; int need = 0; for(int i=0;i<N;i++){ if(H[i...
a.cc: In function 'int main()': a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(H,H+N-1); | ^~~~ | short
s094741324
p03702
C++
#include<iostream> using namespace std; int main() { int N,A,B; cin >> N >> A >> B; int H[100010]; for(int i=0;i<N;i++){ cin >> H[i]; } int isNG = 0; int isOK = (max(H)+B-1)/B; while(isOK-isNG>1){ int mid = (isOK+isNG)/2; int need = 0; for(int i=0;i<N;i++){ if(H[i]-B*mid>0){ ...
a.cc: In function 'int main()': a.cc:13:18: error: no matching function for call to 'max(int [100010])' 13 | int isOK = (max(H)+B-1)/B; | ~~~^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/in...
s871392218
p03702
C++
#include <bits/stdc++.h> #define int long long using namespace std; const int MAXN = 100 * 1000 + 123; int n, A, B, a[MAXN]; int32_t main() { cin >> n >> A >> B; A -= B; for (int i = 0; i < n; i++) cin >> a[i]; int dw = -1, up = 1000 * 1000 * 1000 + 123; while (up - dw > 1) { ...
a.cc: In function 'int32_t main()': a.cc:28:23: error: no matching function for call to 'max(long long int, int)' 28 | use += max((a[i] - m * B + A - 1) / A, 0); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /us...
s823826423
p03702
C++
#include <bits/stdc++.h> using namespace std; const int N = 100 * 1000 + 10; long long h[N], n, a, b; bool is_val(long long t) { long long cnt = 0; for (int i = 0; i < n; i++) { long long x = h[i]; x -= t * b; if(x <= 0) continue; cnt += (x / (a - b)) + min(1, x % (a - b)); } return cnt <= t; } long ...
a.cc: In function 'bool is_val(long long int)': a.cc:16:43: error: no matching function for call to 'min(int, long long int)' 16 | cnt += (x / (a - b)) + min(1, x % (a - b)); | ~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s472175370
p03702
C++
#include <stdio.h> #include <algorithm> using namespace std; #define ll long long ll n,a,b,c[100000+10]; bool f(ll x) { ll i,j,sum=0; for(i=1;i<=n;i++) { if(c[i]>b*x) sum+=(c[i]-b*x+a-1)/a; } return sum<=x; } int main() { ll m,i,j,k,s,t,r; scanf("%lld%lld%lld",&n,&a,&b) { a-=b;r=0; for(i=1;i<=...
a.cc: In function 'int main()': a.cc:18:37: error: expected ';' before '{' token 18 | scanf("%lld%lld%lld",&n,&a,&b) | ^ | ; 19 | { | ~
s225113094
p03702
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<utility> #include<map> #include<set> #include<queue> #include<math.h> using namespace std; #define N (1000000000+7) #define INF 1e16 typedef long long ll; typedef pair<ll,ll> P; ll n,A,B; ll h[100010]; bool check(ll x){ ll res=0; ...
a.cc: In function 'int main()': a.cc:39:14: error: 'okl' was not declared in this scope; did you mean 'ok'? 39 | else okl=mid; | ^~~ | ok
s326065205
p03702
C++
#include<bits/stdc++.h> using namespace std; bool et(vector<long long> &v,long long A,long long B,long long T) { long long bt=0; for(int i=0;i<v.size();i++) { long long tmp=max(0,(v[i]-B*T)); bt+=(tmp+(A-B)-1)/(A-B); } if(bt<=T) { return true; } else { return false; } } main() { long...
a.cc: In function 'bool et(std::vector<long long int>&, long long int, long long int, long long int)': a.cc:8:34: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)' 8 | long long tmp=max(0,(v[i]-B*T)); | ...
s184371274
p03702
C++
// ConsoleApplication2.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。 // #include <iostream> #include <stdlib.h> #include <algorithm> int main() { int amount, maxdamage, damage; int monsters[100001]; std::cin >> amount >> maxdamage >> damage; for (int i = 0; i < amount; i++) { std::cin >> monsters[i]...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:6: /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...
s979687074
p03702
Java
import java.util.function.IntPredicate; import java.util.*; public class Main { static Scanner scanner = new Scanner(System.in); public static void main(String[]$) { int n = scanner.nextInt(); long a = scanner.nextInt(); long b = scanner.nextInt(); int[] h = new int[n]; ...
Main.java:25: error: cannot find symbol Utils.println(t, count, count <= t); ^ symbol: variable Utils location: class Main 1 error
s471691161
p03702
C++
from math import * s=raw_input().split(' ') n=int(s[0]) a=int(s[1]) b=int(s[2]) h=[] s=0 for i in range(n): k=raw_input() h.append(int(k)) s+=int(k) l=1; r=s; an=-1 while r>=l: m=(l+r)//2 c=0 for i in range(n): if (h[i]-b*m)%(a-b)==0: c=c+(h[i]-b*m)//(a-b) else: c=c+((h[i]-b*m)//(a-b)+1) if c<=m: ...
a.cc:29:2: error: invalid preprocessing directive #print 29 | #print(r,l) | ^~~~~ a.cc:1:1: error: 'from' does not name a type 1 | from math import * | ^~~~ a.cc:14:6: error: 'r' does not name a type 14 | l=1; r=s; | ^ a.cc:15:1: error: 'an' does not name a type 15 | an=-1 | ^...
s015346102
p03702
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int N, A, B, h[100000]; int search(void){ int Min = -1, Max = 1000000000; while(Max > Min+1){ ll m = (Min + Max)/2, flag = 0, cnt = 0; for(int i=0; i<N; i++){ ll t = (h[i] - m*B + A - B - 1)/(A-B); t = max(0, t); cnt += t; ...
a.cc: In function 'int search()': a.cc:12:28: error: no matching function for call to 'max(int, ll&)' 12 | t = max(0, t); | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s757246654
p03702
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int N, A, B, h[100000]; int search(void){ int Min = -1, Max = 1000000000; while(Max > Min+1){ ll m = (Min + Max)/2, flag = 0, cnt = 0; for(int i=0; i<N; i++){ ll t = (h[i] - m*B + A - B - 1)/(A-B); t = max(0, t); cnt += t; ...
a.cc: In function 'int search()': a.cc:12:28: error: no matching function for call to 'max(int, ll&)' 12 | t = max(0, t); | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s212882235
p03702
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second #define FOR(i, a, b) for(int i=(a);i<(b);i++) #define REP(i, n) FOR(i, 0, n) #define RFOR(i, a, b) for(int i=(a);i>=(b);i--) #define RREP(i, n) RFOR(i, n, 0) #define MFOR(i, m) for(auto i=(m).beg...
a.cc: In function 'int main()': a.cc:56:3: error: 'su' was not declared in this scope; did you mean 'se'? 56 | su = 0; | ^~ | se
s162020467
p03702
C++
#include "bits/stdc++.h" #define fcout(d) cout << fixed << setprecision(d) #define repU(i,s,t) for(int i = (int)(s); i <= (int)(t); ++i) #define repD(i,t,s) for(int i = (int)(t); i >= (int)(s); --i) #define rep(i,n) repU(i,0,n - 1) #define rep1(i,n) repU(i,1,n) #define all(v) begin(v),end(v) #define vct vector #define ...
a.cc: In function 'bool judge(ll)': a.cc:39:25: error: no matching function for call to 'max(int, ll)' 39 | s += max(0,q_ceil(h[i] - n * B,A - B)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include...
s584892391
p03702
C
#include <bits/stdc++.h> using namespace std; int N; int h[100010]; int A,B; int ans; int main() { cin>>N>>A>>B; for(int i=1;i<=N;++i) { cin>>h[i]; } while(true) { int f=0; sort(h,h+N+1); for(int i=1;i<=N;i++) { if( i == N) h[...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s800031824
p03702
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc: In function 'int main()': a.cc:96:5: error: a function-definition is not allowed here before '{' token 96 | { | ^ a.cc:112:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 112 | int main() | ^~ a.cc:112:13: note: remove parenthes...
s864365713
p03702
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
In file included from /usr/include/c++/14/cassert:43, from a.cc:2: /usr/include/c++/14/any: In function 'int main()': /usr/include/c++/14/any:45:15: error: expected '=' before '__attribute__' 45 | namespace std _GLIBCXX_VISIBILITY(default) | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/1...
s566857321
p03702
C++
#include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namespace std; int A,B,N; int a[100005]; bool judge(long long x) { long long sum=0; for(int i=0;i<N;i++) { long long t=a[i]-B*x; if(t>0) sum+=(int)ceil(t*1.0/(A-B)); if(sum>x||sum<0) ...
a.cc: In function 'bool judge(long long int)': a.cc:18:19: error: 'ceil' was not declared in this scope 18 | sum+=(int)ceil(t*1.0/(A-B)); | ^~~~
s243007368
p03702
C++
#include<iostream> #include<algorithm> #define ll long long using namespace std; int n, a, b, h[120000]; int main() { cin >> n >> a >> b ; for(int i = 1; i <= n; i ++ ) cin >> h[i]; sort(h+1, h+n+1); ll L = 0, R = 1e15; while(R-L > 1) { ll M = (L+F) >> 1; ll D = b*M; ll cnt = 0; for(int i = 0; i < n; i ++ ...
a.cc: In function 'int main()': a.cc:12:27: error: 'F' was not declared in this scope 12 | ll M = (L+F) >> 1; | ^
s849681993
p03702
C++
####################################### ####################################### v ####################################### ####################################### ####################################### ####################################### ####################################### #####################################...
a.cc:2:1: error: stray '##' in program 2 | ####################################### | ^~ a.cc:2:3: error: stray '##' in program 2 | ####################################### | ^~ a.cc:2:5: error: stray '##' in program 2 | ####################################### | ^~ a.cc:2:7: error: str...
s494755630
p03702
C++
#include<bits/stdc++.h> #define N 100009 using namespace std; typedef long long ll; const ll INF=1e18; ll h[100005]; ll n,a,b; bool judge(ll mid) { ll answ=mid; for(int i=1;i<=n;i++) { ll tm=h[i]-b*mid; if(tm>0) { ll cnt=tm/(a-b); if(tm%(a-b)!=0) ...
a.cc:48:2: error: stray '#' in program 48 | }#include<bits/stdc++.h> | ^ a.cc:48:3: error: 'include' does not name a type 48 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:52:10: error: redefinition of 'const ll INF' 52 | const ll INF=1e18; | ^~~ a.cc:5:10: note: 'const ll INF' previou...
s046388869
p03702
C++
#include<bits/stdc++.h> #define N 100009 using namespace std; typedef __int64 ll; const ll INF=1e18; ll h[100005]; ll n,a,b; bool judge(ll mid) { ll ans=mid; for(int i=1;i<=n;i++) { ll tm=h[i]-b*mid; if(tm>0) { ll cnt=tm/(a-b); if(tm%(a-b)!=0) cnt...
a.cc:4:9: error: '__int64' does not name a type; did you mean '__int64_t'? 4 | typedef __int64 ll; | ^~~~~~~ | __int64_t a.cc:5:7: error: 'll' does not name a type 5 | const ll INF=1e18; | ^~ a.cc:6:1: error: 'll' does not name a type 6 | ll h[100005]; | ^~ a.cc...
s418618025
p03702
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <sstream> #include <stack> #include <time.h> #include <vector> #include <complex> #include <map> #include <set> #include <iomanip> #include <ma...
a.cc: In function 'int main()': a.cc:37:58: error: request for member 'pop_back' in 'monst', which is of non-class type 'long long int [100003]' 37 | for (long long i=n-2;i>=0;i--){monst[i]<=0;monst.pop_back(monst[i]); | ^~~~~~~~ a.cc:42:2: error...
s977005745
p03702
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <sstream> #include <stack> #include <time.h> #include <vector> #include <complex> #include <map> #include <set> #include <iomanip> #include <ma...
a.cc: In function 'int main()': a.cc:37:58: error: request for member 'pop_back' in 'monst', which is of non-class type 'long long int [100003]' 37 | for (long long i=n-2;i>=0;i--){monst[i]<=0;monst.pop_back(monst[i]); | ^~~~~~~~ a.cc:42:2: error...
s693705944
p03702
C++
#include <bits/stdc++.h> #define FI first #define SE second #define VE vector<int> #define PB push_back #define PA pair<int,int> #define MA make_pair #define LLI long long int #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 YES(i) cout<<(i?"YES":"NO")<<endl #define Yes(i) cout...
a.cc: In function 'bool solve(long long int)': a.cc:33:17: error: no matching function for call to 'max(long long int, int)' 33 | sum+=max(om(h[i]-b*k,a-b),0); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-...
s528992094
p03702
C++
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <cstring> #include <map> #include <queue> #include <cmath> #include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3 using namespace std; #define MOD 1000000007 #define ll long long #define ld long double #define ...
a.cc: In function 'bool solve(long long int)': a.cc:37:15: error: expected primary-expression before '=' token 37 | cnt + = ((h[i]- n*B)/ (A-B)); | ^
s050380055
p03702
C++
#include<iostream> #include<cstdlib> #include<cmath> #define N 100100 using namespace std; long long n,a,b,c[N],l,r; bool check(int x) { long long ans=0; for(int i=1;i<=n;i++) ans+=((c[i]-x*b)>0)*ceil(1.0*(c[i]-x*b)/(a-b)); if (ans<=x) return true; else return false; } int main() { ios::syn...
a.cc:32:2: error: stray '#' in program 32 | }#include<iostream> | ^ a.cc:32:3: error: 'include' does not name a type 32 | }#include<iostream> | ^~~~~~~ a.cc:37:12: error: redefinition of 'long long int n' 37 | long long n,a,b,c[N],l,r; | ^ a.cc:6:12: note: 'long long int n' pre...
s418096543
p03702
C++
#include <cstdio> using namespace std; typedef long long ll; ll n, a, b, l, r=1e9, m, ans, h[100005];   bool f(ll p) { ll i, c=0; for(i=0; i<n; i++) c += h[i]>p*b ? (h[i]-p*b+a-1)/a : 0; return c<=p; }   int main() { scanf("%lld%lld%lld", &n, &a, &b); a -= b; for(ll i=0; i<n; i++) scanf("%lld", &h[i]); while(l...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |   | ^ a.cc:12:1: error: extended character   is not valid in an identifier 12 |   | ^ a.cc:5:1: error: '\U000000a0' does not name a type 5 |   | ^ a.cc:12:1: error: '\U000000a0' does not name a type 12 |   | ^
s574362318
p03702
C++
#include <cstdio> using namespace std; typedef long long ll; ll n, a, b, l, r=1e9, m, ans, h[100005];   bool f(ll p) { ll i, c=0; for(i=0; i<n; i++) c += h[i]>p*b ? (h[i]-p*b+a-1)/a : 0; return c<=p; }   int main() { scanf("%lld%lld%lld", &n, &a, &b); a -= b; for(ll i=0; i<n; i++) scanf("%lld", &h[i]); while(l...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |   | ^ a.cc:12:1: error: extended character   is not valid in an identifier 12 |   | ^ a.cc:5:1: error: '\U000000a0' does not name a type 5 |   | ^ a.cc:12:1: error: '\U000000a0' does not name a type 12 |   | ^
s127829797
p03702
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int #define rep(i,n) for( int i = 0; i < n; i++ ) #define dump(x) cerr << #x << " = " << (x) << endl; #define INF 2000000000 #define mod 1000000007 #define INF2 1000000000000000000 #define int long long int int N, A, B; int h[100000]; bool isOk(int a...
a.cc:9:23: error: '::main' must return 'int' 9 | #define int long long int | ^~~ a.cc:25:1: note: in expansion of macro 'int' 25 | int main(void) | ^~~
s479542151
p03702
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #include <cstdlib> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #def...
a.cc: In function 'int main()': a.cc:49:14: error: 'greter' was not declared in this scope 49 | sort(H,H+N,greter<int>()); | ^~~~~~ a.cc:49:21: error: expected primary-expression before 'int' 49 | sort(H,H+N,greter<int>()); | ^~~
s402579362
p03702
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #include <cstdlib> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #def...
cc1plus: error: '::main' must return 'int'
s495778815
p03702
C++
#include<iostream> #include<cstdio> #include<vector> #include<string> #include<functional> #include<queue> #include <iomanip> #include<map> #include<limits> #include<cmath> #include<algorithm> #include<bitset> #include<utility> #include<complex> #include<cstdlib> #include<set> #include<cctype> #define DBG cerr << '!' ...
a.cc: In function 'int main()': a.cc:73:25: error: 'mid' was not declared in this scope 73 | cout << mid << endl; | ^~~
s552936847
p03702
C
n,a,b,h[100000],i,l,r,x,m;main(){for(scanf("%d%d%d",&n,&a,&b),a-=b;i<n;l=1,r=1e9)scanf("%d",h+i++);while(l<r){m=(l+r)/2;for(x=i=0;i<n;++i)h[i]>m*b?x+=(h[i]-m*b+a-1)/a:0;x<=m?r=m:l=m+1;}printf("%d",l);}
main.c:1:1: warning: data definition has no type or storage class 1 | n,a,b,h[100000],i,l,r,x,m;main(){for(scanf("%d%d%d",&n,&a,&b),a-=b;i<n;l=1,r=1e9)scanf("%d",h+i++);while(l<r){m=(l+r)/2;for(x=i=0;i<n;++i)h[i]>m*b?x+=(h[i]-m*b+a-1)/a:0;x<=m?r=m:l=m+1;}printf("%d",l);} | ^ main.c:1:1: error: type defaults t...