submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s218648162
p03703
C++
#include "bits/stdc++.h" #include <sys/timeb.h> #include <fstream> using namespace std; #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define replrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--) #define reprev(i,n) replrev(i,0,n) #define repi(itr,ds) for(auto itr=ds.begin();itr!=...
a.cc:63:55: error: macro "all" passed 2 arguments, but takes just 1 63 | pre.insert(lower_bound(all(pre, sum[i]), sum[i]), sum[i]); | ^ a.cc:12:9: note: macro "all" defined here 12 | #define all(a) a.begin(),a.end() | ^~~ a....
s028894615
p03704
C++
#include<bits/stdc++.h> using namespace std; long long d,ans,p[20]={1},dx1[20],dx2[20]; vector<long long> v; void dfs(int nw,int num,vector<pair<long long,long long> >&w,long long val,long long cnt) { if(nw==num) { w.push_back(make_pair(val,cnt)); return; } for(int i=-9;i<10;++i) if(nw==0) dfs(nw+1,...
a.cc: In function 'int main()': a.cc:89:32: error: expected ']' at end of input 89 | if(i) ++dx2[i-j | ^ | ] a.cc:89:32: error: expected ';' at end of input 89 | if(i) ++dx2[i-j | ...
s906207172
p03704
C++
#include <iostream> #include <cstring> using namespace std; const int INF=0x3f3f3f3f; //vector<int>v[maxn]; //map<int,string>mp[maxn]; //queue<int>q[maxn]; long long a[11][11],n,m,an[12],c[11][13],ans; long long in; long long abs(int x) { if(x<0) return -x; return x; } long long pow(int x,int y) { int sum=1; for(...
a.cc:10:11: error: ambiguating new declaration of 'long long int abs(int)' 10 | long long abs(int x) | ^~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, from /usr/include/c++/14/bits/basic_string.h:4154, ...
s543178685
p03704
C++
#include<bits/stdc++.h> #define int long long using namespace std; int d,ans; int main() { cin>>d; if(d%9) { cout<<0; return 0; } d/=9; return 0; }
cc1plus: error: '::main' must return 'int'
s957499836
p03704
C++
def solve(NUM): s = str(NUM) sz = len(str(NUM)) if s=='9': return '12' if s=='99': return '102' if(s[0]=='9'): if(s[-1]=='9'): for i in range(2,sz-1): if(s[i]!=s[i-1]): return -1 ans = '1' for i in range(...
a.cc:5:16: warning: multi-character character constant [-Wmultichar] 5 | return '12' | ^~~~ a.cc:6:11: warning: multi-character character constant [-Wmultichar] 6 | if s=='99': | ^~~~ a.cc:7:16: warning: multi-character character constant [-Wmultichar] 7 | ...
s384591795
p03704
C++
ce #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #pragma GCC optimize("unroll-loops") //#pragma warning(disable : 4996) #ifdef _MSC_VER #include <intrin.h> #define __builtin_popcount __popcnt #define __builtin_popcountll __popcnt64 #endif #include <limits.h> #include ...
a.cc:1:1: error: 'ce' does not name a type; did you mean 'pe'? 1 | ce | ^~ | pe
s413788111
p03704
C++
#include<iostream> #include<cstring> #include<vector> using namespace std; typedef long long LL; const LL LEN = 6; LL memo[LEN+1][2][2]; LL d[2*LEN+1]; vector<LL> valid[LEN+1][2][2]; LL s; int dp(LL i, LL e, LL c) { if(!(0 <= e && e <= 1)) return 0; if(i==s-i-1) return memo[i][e][c] = c+d[i]==10*e ? 10 : 0; if(m...
a.cc:81:1: error: '::main' must return 'int' 81 | LL main() | ^~
s324966596
p03704
C++
#include<iostream> #include<cstring> #include<vector> using namespace std; typedef long long LL; const LL LEN = 6; LL memo[LEN+1][2][2]; LL d[2*LEN+1]; vector<LL> valid[LEN+1][2][2]; LL s; LL dp(LL i, LL e, LL c) { if(!(0 <= e && e <= 1)) return 0; if(i==s-i-1) return memo[i][e][c] = c+d[i]==10*e ? 10 : 0; if(me...
a.cc:81:1: error: '::main' must return 'int' 81 | LL main() | ^~
s252388000
p03704
C++
#include<iostream> #include<vector> #include<set> #include<queue> #include<map> #include<algorithm> #include<cstring> #include<string> #include<cassert> #include<cmath> #include<climits> #include<iomanip> #include<stack> #include<unordered_map> #include<bitset> #include<limits> #include<complex> #include<array> #includ...
a.cc: In function 'int main()': a.cc:551:65: error: invalid operands of types 'long long int' and 'const char [2]' to binary 'operator<<' 551 | ans+= dfs(dfs, d, x, 1) * (i % 2 == 0 ? 1 : 10) << "\n"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~ | ...
s750468572
p03704
C++
#include <iostream> #include <algorithm> #include <utility> #include <vector> #include <numeric> template <class T, class U> inline bool chmin(T &lhs, const U &rhs) { if (lhs > rhs) { lhs = rhs; return true; } return false; } template <class T, class U> inline bool chmax(T &lhs, const U &rhs) { if (l...
a.cc:70:48: error: return type 'struct std::array<long long int, 19>' is incomplete 70 | constexpr std::array<long long, 19> calc_pow10() { | ^ a.cc: In function 'constexpr void calc_pow10()': a.cc:71:29: error: variable 'std::array<long long int, 19> res' has ini...
s558418143
p03704
C++
#include <cstdio> #include <algorithm> #define R register #define ll long long #define int long long using namespace std; ll base[40]; ll D; ll ans=0; ll st[40]; inline void dfs(int now,int len,ll sum){ if(now==len/2+1){ if(sum!=D) return; ll tans=st[1]>=0?(9-st[1]):(9+st[1]); for(R int i=2;i<now;i++) tans=tans*...
a.cc: In function 'void dfs(long long int, long long int, long long int)': a.cc:15:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | for(R int i=2;i<now;i++) tans=tans*(st[i]>=0?(10-st[i]):(10+st[i])); | ^ a.cc:21:19: warning: I...
s763072553
p03704
C++
#include<bits/stdc++.h> using namespace std; #define f1(a,b,c) for(int c=a;c<=b;c++) #define f2(a,b,c) for(int c=a;c>=b;c--) #define f3(a,b,c) for(int c=a;c;c=b) #define so1(a,n) sort(a+1,a+n+1,mycmp); #define so2(a,n) sort(a+1,a+n+1); #define re(a,n) reverse(a+1,a+n+1); #define ll long long #define itn int #define ubt...
a.cc: In function 'long long int dfs(long long int, long long int, long long int)': a.cc:62:41: error: no matching function for call to 'abs(<unresolved overloaded function type>)' 62 | return(9+differ)*dfs(l+1,r-1,abs(next)/10); | ~~~^~~~~~ In file included from /u...
s625699293
p03704
C++
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ALL(V) (V).begin(), (V).end() #define ALLR(V) (V).rbegin(), (V).rend() template <typename T> using V = vector<T>; template <typename T> using VV = V<V<T>>; template <typename T, typename U> using P = pair<T, U>; using ll = __int128_t; // using ll ...
a.cc:53:10: fatal error: ../debug.cpp: No such file or directory 53 | #include "../debug.cpp" | ^~~~~~~~~~~~~~ compilation terminated.
s591323335
p03704
C++
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ALL(V) (V).begin(), (V).end() #define ALLR(V) (V).rbegin(), (V).rend() template <typename T> using V = vector<T>; template <typename T> using VV = V<V<T>>; template <typename T, typename U> using P = pair<T, U>; using ll = int64_t; using PLL = P<l...
a.cc:28:10: fatal error: ../debug.cpp: No such file or directory 28 | #include "../debug.cpp" | ^~~~~~~~~~~~~~ compilation terminated.
s066659247
p03704
C++
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> using namespace std; ...
a.cc: In function 'int main()': a.cc:62:33: error: expected '}' before 'else' 62 | else sum *= cnt[t]; | ^~~~ a.cc:59:50: note: to match this '{' 59 | if (abs(c) >= dif&&t!=0) { | ...
s235705854
p03704
C++
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int d[30],len,dp[30][30][30]; int DP(int n){ int ret=0; memset(dp,0,sizeof(dp)); dp[0][0][0]=1; for(int i=0;i<(n>>1);i++) for(int j=0;j<10;j++) for(int k=0;k<10;k++) if(dp[i][j][k]) for(int x=0;x<10;x++){ int l1=x+d[i+1]...
a.cc: In function 'void Input()': a.cc:46:16: error: 'isdigit' was not declared in this scope 46 | while(!isdigit(c)); | ^~~~~~~
s505865847
p03704
C++
#include<bits/stdc++.h> using namespace std; using Int = long long; Int d; Int ans=0; auto getK=[&](Int x,Int k){ while(--k) x/=10; return x%10; } void dfs(Int k,Int p,Int q,Int x,Int y){ if(p>q){ ans+=(x+d==y); return; } if(p==q){ ans+=(x+d==y)*10; return; } Int nk=k+1,np=p*10,nq=q/10...
a.cc:8:12: error: non-local lambda expression cannot have a capture-default 8 | auto getK=[&](Int x,Int k){ | ^ a.cc:13:1: error: expected ',' or ';' before 'void' 13 | void dfs(Int k,Int p,Int q,Int x,Int y){ | ^~~~ a.cc: In function 'int main()': a.cc:40:25: error: 'dfs' was not declared...
s267367531
p03704
C++
#include<bits/stdc++.h> using namespace std; using Int = long long; Int d; Int ans=0; auto getK=[&](Int x,Int k){ while(--k) x/=10; return x%10; }; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} void d...
a.cc:8:12: error: non-local lambda expression cannot have a capture-default 8 | auto getK=[&](Int x,Int k){ | ^ a.cc: In function 'void dfs(Int, Int, Int, Int, Int)': a.cc:28:16: error: expected ',' or ';' before ':' token 28 | int a=-1,b=-1: | ^ a.cc:29:15: error: 'i' was...
s155977561
p03704
C++
#include<bits\stdc++.h> #define fo(i,j,l) for(int i=j;i<=l;++i) #define fd(i,j,l) for(int i=j;i>=l;--i) using namespace std; typedef long long ll; ll D; int y[100],x[100]; inline ll rev(ll o) { ll ans=0; for(;o;o/=10)ans=ans*10+o%10; return ans; } int main() { cin>>D; ll cs=1,K=D,ans=0; int n=0; for(;K%10==...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s741366050
p03704
C++
#include<stdio.h> #include<stdlib.h> #define ll long long const int Inf=1e9+10; int gi(){ int sum=0,f=1;char ch=getchar(); while(ch>'9' || ch<'0'){if(ch=='-')f=-1;ch=getchar();} while(ch<='9' && ch>='0'){sum=sum*10+ch-'0';ch=getchar();} return sum*f; } int d; ll ans; int main(){ freopen("terr.in","r",stdin); freo...
a.cc: In function 'int main()': a.cc:25:17: error: 'sm' was not declared in this scope; did you mean 'm'? 25 | sm[i]=sm[i-1]*10; | ^~ | m
s093352149
p03704
C++
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #define fo(i,a,b) for(int i=a;i<=b;i++) typedef long long LL; using namespace std; LL mi10[20]={1,10,1e+2,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13,1e14,1e15,1e16,1e17}; LL a[10]; int l; int cnt; void dfs(int x,LL d,int c){ if (x>l){...
a.cc:12:19: error: narrowing conversion of '1.0e+2' from 'double' to 'LL' {aka 'long long int'} [-Wnarrowing] 12 | LL mi10[20]={1,10,1e+2,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13,1e14,1e15,1e16,1e17}; | ^~~~ a.cc:12:24: error: narrowing conversion of '1.0e+3' from 'double' to 'LL' {aka...
s377465497
p03704
C++
#include <iostream> #include <cstdio> #define my_abs(x) ((x) < 0 ? -(x) : (x)) using namespace std; typedef long long ll; ll ans, fact[25]; int arr[25]; inline void chk(int len) { // cout << len << " "; // for (int i = 0; i <= len - 1 >> 1; i++) // printf("%d", arr[i]); // printf("\n"); ll res = 9 - my_abs(a...
a.cc: In function 'int main()': a.cc:60:17: error: 'memset' was not declared in this scope 60 | memset(arr, 0, sizeof(arr)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> ++...
s162692222
p03704
C++
ll D; ll hoge(ll A,ll t,int first) { if(t==0) return A==0; int v=(A%10+10)%10; ll ret=0; ret+=(10-v-first)*hoge((A-t*v)/10,t/100,0); ret+=(v-first)*hoge((A+(10-v)*t)/10,t/100,0); return ret; } void solve() { int i,j,k,l,r,x,y; string s; cin>>D; if(D%9) return _P("0\n"); D/=9; ll ret=0; ll p10=10; for(i...
a.cc:1:1: error: 'll' does not name a type 1 | ll D; | ^~ a.cc:3:1: error: 'll' does not name a type 3 | ll hoge(ll A,ll t,int first) { | ^~ a.cc: In function 'void solve()': a.cc:13:28: error: 'string' was not declared in this scope 13 | int i,j,k,l,r,x,y; string s; | ...
s299867378
p03704
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; typedef long long ll; ll ppow[15]; int main() { ppow[0] = 1; for (int i = 1; i < 15; i++)ppow[i] = ppow[i - 1] * 10; ll D; scanf("%lld", &D); ll ans = 0; rep(a, 10)rep(b, 10) { if ((ppow[9] - ppow[8])*(a - b) == D)ans += 9 * p...
a.cc: In function 'int main()': a.cc:29:70: error: expected ';' before 'if' 29 | if ((ppow[9] - ppow[3])*(a-b) | ^ | ; 30 | ...
s019212088
p03704
C++
#include<iostream> #include<queue> #include<cstdint> using namespace std; int rev(int x, int y); // x桁におけるy番目の倍数を求める int main() { int D, digit = 0, num, num2, pai; int64_t count = 0; queue<pair<int, int64_t> > paturn; pair<int, int64_t> pat; cin >> D; for (int i = D;i > 0;i /= 10) digit ++; // cout << "digit:" <...
a.cc: In function 'int main()': a.cc:19:44: error: 'pow' was not declared in this scope 19 | for (int k = 0;k < pow(2, j);k ++) { // queueの中身 | ^~~
s053269018
p03704
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; map<ll,ll>loe,ano,ple; set<ll>s; ll d,n=1,o,ans; ll iabs(ll x) { return x<0?-x:x; } ll dfs(ll use,ll rest) { ll k=ple[(rest%10+10)%10]; if(use<=0) { if(rest) return 0; else return 1+(o&1)*9; } if(abs(rest)/abs(use)>9) return 0; if(k)...
a.cc: In function 'll dfs(ll, ll)': a.cc:26:67: error: expected ';' before 'else' 26 | return ano[k]*dfs(use/100,(rest-k*use)/10) | ^ | ; 27 | ...
s715245181
p03704
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; map<ll,ll>loe,ano,ple; set<ll>s; ll d,n=1,o,ans; ll iabs(ll x) { return x<0?-x:x; } ll dfs(ll use,ll rest) { ll k=ple[(rest%10+10)%10]; if(use<=0) { if(rest) return 0; else return 1+(o&1)*9; } if(abs(rest)/abs(use)>9) return 0; if(k)...
a.cc: In function 'll dfs(ll, ll)': a.cc:24:78: error: expected ';' before 'ano' 24 | return (k<10-k)*ano[k]*dfs(use/100,(rest-k*use)/10)+(k>=10-k)ano[k-10]*dfs(use/100,(rest+(10-k)*use)/10); | ^~~ | ...
s692186097
p03704
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; map<ll,ll>loe,ano,ple; set<ll>s; ll d,n=1,o; ll iabs(ll x) { return x<0?-x:x; } ll dfs(ll use,ll rest) { ll k=ple[rest%10]; if(use<=0) { if(rest) return 0; else return 1+(o&1&&o!=1)*9; } if(k) return ano[k]*dfs((use+1)/100-1,(rest-k*us...
a.cc:55:2: error: 'v' does not name a type 55 | }v | ^
s825590653
p03704
C++
#include <cmath> #include <algorithm> #include <numeric> #include <string> using u8t = std::uint64_t; using i8t = std::int64_t; #define F(I,N) for(i8t I=0,_N=N;I<_N;I++) #define R(V) i8t V;std::cin>>V; #define RV(V,N) std::vector<i8t> V;F(i,N){R(x)V.push_back(x);} #define RL1(line) std::getline(std::cin,line); #define ...
a.cc:5:18: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'? 5 | using u8t = std::uint64_t; | ^~~~~~~~ | wint_t a.cc:6:18: error: 'int64_t' in namespace 'std' does not name a type 6 | using i8t = std::int64_t; | ...
s567199694
p03704
C++
#include <bits/stdc++.h> using namespace std; ll bs[20]; ll D,calc0[20], calc[20]; ll a[20],an,ans; void dfs(int x,ll v,ll c) { if(x == an) { ans += (v == D) * c; return; } if(abs(v - D) > a[x] * 20)return; for(int i = 0;i<20;i++) { int cnt; if(!x) cnt = calc0[i]; else cnt = calc[i]; if(!a[x])cnt = i ...
a.cc:3:1: error: 'll' does not name a type 3 | ll bs[20]; | ^~ a.cc:4:1: error: 'll' does not name a type 4 | ll D,calc0[20], calc[20]; | ^~ a.cc:5:1: error: 'll' does not name a type 5 | ll a[20],an,ans; | ^~ a.cc:6:16: error: 'll' has not been declared 6 | void dfs(int x,ll v,ll c) ...
s349727106
p03704
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) #define reps(i,x,n) for(int i=x; i<(n); i++) #define rrep(i,n) for(int i=(n)-1; i>=0; i--) #define all(X) (X).begin(),(X).end() #define X first #define Y second #define pb push_back #define eb emplace_back using namespace std; typedef long long int ll...
a.cc: In function 'int main()': a.cc:57:38: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 57 | n = n*pow(10,k) + (i % pow(10,k)); | ~ ^ ~~~~~~~~~ | ...
s944951677
p03704
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:29: error: too few arguments to function 'LL solve(LL, LL, LL)' 44 | if(t>=11) ans+=solve(dia-abs(0))*solve(D),s+1,t-1); | ~~~~~^~~~~~~~~~~~ a.cc:38:4: note: declared here 38 | LL solve(LL D,LL s,LL t){ | ^~~~~ a.cc:44...
s626674311
p03704
C++
#define rep(i,n) for(int i=0; i<(n); i++) #define reps(i,x,n) for(int i=x; i<(n); i++) #define rrep(i,n) for(int i=(n)-1; i>=0; i--) #define all(X) (X).begin(),(X).end() #define X first #define Y second #define pb push_back #define eb emplace_back using namespace std; typedef long long int ll; typedef pair<int,int> p...
a.cc:13:9: error: 'pair' does not name a type 13 | typedef pair<int,int> pii; | ^~~~ a.cc:14:9: error: 'pair' does not name a type 14 | typedef pair<ll,ll> pll; | ^~~~ a.cc:19:19: error: 'size_t' has not been declared 19 | template<class A, size_t N, class T> void Fill(A (&a)[N], co...
s045044167
p03705
C++
#include <bits/stdc++.h> #include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { ll N, A, B; cin >> N >> A >> B; if(A > B) { cout << 0 << endl; } else if(N == 2) { c...
a.cc: In function 'int main()': a.cc:23:3: error: expected '}' before 'else' 23 | else { | ^~~~ a.cc:16:19: note: to match this '{' 16 | else if(N == 1) { | ^
s130299312
p03705
C++
#include <bits/stdc++.h> #include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { ll N, A, B; cin >> N >> A >> B; if(A > B) { cout << 0 << endl; } else if(N = 2) { co...
a.cc: In function 'int main()': a.cc:23:3: error: expected '}' before 'else' 23 | else { | ^~~~ a.cc:16:18: note: to match this '{' 16 | else if(N = 1) { | ^
s412812119
p03705
C++
#include <bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; #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(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define SORT(s) sort(s.begin(), s.end()) #define P pair<int, int> #define mp make_pai...
a.cc: In function 'int main()': a.cc:87:15: error: no matching function for call to 'max(ll, int)' 87 | ll ans = max(mxv-miv+1, 0); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s353135137
p03705
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long n,a,b; cin>>n>>a>>b; cout<<max((n-2)*(b-a)+1,0)<<endl; return(0); }
a.cc: In function 'int main()': a.cc:6:14: error: no matching function for call to 'max(long long int, int)' 6 | cout<<max((n-2)*(b-a)+1,0)<<endl; | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++...
s109213004
p03705
C++
#include<bits/stdc++.h> using namespace std; #define int long long int main(){ int a,b,c; cin >> a >> b >> c; long long mx=c*(a-1)+b; long long mn=b*(a-1)+c; cout << mx-mn+1 << endl; }
cc1plus: error: '::main' must return 'int'
s055183437
p03705
C++
#include<bits/stdc++.h> using namespace std; #define int long long int main(){ int a,b,c; cin >> a >> b >> c; int mx=c*(a-1)+b; int mn=b*(a-1)+c; cout << mx-mn+1 << endl; }
cc1plus: error: '::main' must return 'int'
s980024835
p03705
C++
n, a, b = map(int, input().split()) print(b + b - a - a + 1)
a.cc:1:1: error: 'n' does not name a type 1 | n, a, b = map(int, input().split()) | ^
s338919762
p03705
C++
n, a, b = map(int, input().split()) if a > b: print(0) else: print((n - 2) * (b - a) + 1)
a.cc:1:1: error: 'n' does not name a type 1 | n, a, b = map(int, input().split()) | ^
s711505795
p03705
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N, A, B; cin >> N >> A >> B; if (N == 1 && A == B) cout << 1 << endl; else if (N == 1) cout << 0 << endl; else cout << max(0, (N - 2) * (B - A) + 1) << endl; }
a.cc: In function 'int main()': a.cc:9:19: error: no matching function for call to 'max(int, long long int)' 9 | else cout << max(0, (N - 2) * (B - A) + 1) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_6...
s137986616
p03705
C++
#include <bits/stdc++.h> #define rep(i,n); for(int i = 0;i < (n);i++) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef tuple<int,int,int> state; long double pi = acos(-1); const int INF = 1001001001; // 最小公倍数を求める int euqlid (int a, int b){ int temp; temp = a % b; if(temp == 0)return b...
a.cc: In function 'int main()': a.cc:54:16: error: lvalue required as left operand of assignment 54 | if(b - a < 0 or n = 0)ans = 0; | ~~~~~~~~~~^~~~
s325225538
p03705
C++
#include <bits/stdc++.h> #define REP(i,n) for (int i=0; i<(n); ++i) #define REPR(i,n,m) for (int i=(n); i>=(m); --i) using namespace std; using LL = long long; using LD = long double; using PLL = pair<long long, long long>; using PLD = pair<long double, long double>; using VLL = vector<long long>; using VLD = vector<lo...
a.cc: In function 'int main()': a.cc:28:22: error: expression cannot be used as a function 28 | cout << (b-a)(n-2) + 1 << endl; | ~~~~~^~~~~
s456790911
p03705
C++
#include <bits/stdc++.h> #define ll long long #define pb push_back #define vi vector<int> #define nl endl #define tc \ ll t; \ cin >> t; \ while (t--) #define fastio \ ios_base::sync_with_stdio(NULL); \ cin.tie(NULL); \ cout.tie(NULL); using namespa...
a.cc: In function 'int main()': a.cc:20:20: error: expected ';' before 'cout' 20 | if((n==1&&a==b) | ^ | ; 21 | cout<<"1"; | ~~~~ a.cc:22:5: error: expected primary-expression before 'else' 22 | else if(n!=1&&n!=2&&a<=b) ...
s021576131
p03705
C
#include<stdio.h> int main() { long long int n, a, b; scanf("%lld %lld %lld", &n, &a, &b); if(a>b || (n==1 && a!=b)) { printf("0"); } else { printf("%lld", (b-a)(n-2)+1); } return 0; }
main.c: In function 'main': main.c:12:26: error: called object is not a function or function pointer 12 | printf("%lld", (b-a)(n-2)+1); | ~~^~~
s385270782
p03705
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ll n, a, b; cin >> n >> a >> b; if(n == 1 and a == b) cout << 1; else if(n == 1) cout << 0; else if(a > b) cotu << 0; else cout ...
a.cc: In function 'int main()': a.cc:15:24: error: 'cotu' was not declared in this scope 15 | else if(a > b) cotu << 0; | ^~~~
s064707675
p03705
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ll n, a, b; cin >> n >> a >> b; if(n == 1 and a == b) cout << 1; else if(n == 1) cout << 0; else if(a > b) cotu << 0; else cout ...
a.cc: In function 'int main()': a.cc:15:24: error: 'cotu' was not declared in this scope 15 | else if(a > b) cotu << 0; | ^~~~
s163459988
p03705
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ll n, a, b; cin >> n >> a >> b; if(a > b) cout << 0; if(n == 1) { if(a == b) { cout << 1; } else cout << 0; return 0; ...
a.cc: In function 'int main()': a.cc:23:23: error: expression cannot be used as a function 23 | ll ans = (b-2)(b-a); | ~~~~~^~~~~
s023230467
p03705
C++
n,a,b = map(int,input().split()) if a > b: print(0) exit() if n == 1: if a == b: print(1) else: print(0) exit() print((b-a)*(n-2)+1)
a.cc:1:1: error: 'n' does not name a type 1 | n,a,b = map(int,input().split()) | ^
s892472839
p03705
C++
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (A > B) { printf("0\n"); return 0; } if (N == 1) { printf("%d\n", A == B); } else if (N == 2) { printf("1\n"); } else { printf("%lld\n",...
a.cc: In function 'int main()': a.cc:20:23: error: 'll' was not declared in this scope 20 | printf("%lld\n", (ll)(B - A) * (N - 2) + 1); | ^~
s579688479
p03705
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i=0; i<(int)(n); i++) #define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, a, b; cin >> n >> a >> b; ll ans; if (a > b) { ans = 0; } else { if (n == 1) { if (a...
a.cc: In function 'int main()': a.cc:18:5: error: 'else' without a previous 'if' 18 | } else { | ^~~~
s063454836
p03705
C++
#include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstd...
a.cc: In function 'int main()': a.cc:35:5: error: expected '}' before 'else' 35 | else { | ^~~~ a.cc:33:21: note: to match this '{' 33 | else if(C-D+1 < N){ | ^
s945433252
p03705
C++
#include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstd...
a.cc: In function 'int main()': a.cc:25:16: error: lvalue required as left operand of assignment 25 | if (N == 1 && A = B) { | ~~~~~~~^~~~
s144652251
p03705
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,A,B; cin>>N>>A>>B; if(A==B)cout<<1<<endl; else if(N==1)cout<<0<<endl; else if(A>B)cout<<0<<endl; else{ unsigned long long int C=(N-2)*(B-A)+1; cout<<C<<endl; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s467650568
p03705
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,A,B; cin>>N>>A>>B; if(A==B)cout<<1<<endl; else if(N==1)cout<<0<<endl; else if(A>B)cout<<0<<endl; else{ unsigned long long intC=(N-2)*(B-A)+1; cout<<C<<endl; }
a.cc: In function 'int main()': a.cc:11:11: error: 'C' was not declared in this scope 11 | cout<<C<<endl; | ^ a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s586232937
p03705
C++
int main(){ ll N,A,B,rs=0,Nans,min,max; cin >> N >> A >> B; if(N == 1){ if(A == B) cout << 1 << endl; else cout << 0 << endl; }else if(A > B){ cout << 0 << endl; }else{ Nans = N - 2; max = B * (Nans+1) + A; min = A * (Nans+1) +...
a.cc: In function 'int main()': a.cc:2:5: error: 'll' was not declared in this scope 2 | ll N,A,B,rs=0,Nans,min,max; | ^~ a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> N >> A >> B; | ^~~ a.cc:3:12: error: 'N' was not declared in this scope 3 | cin >> N >> A...
s132195658
p03705
Java
import java.io.*; import java.math.*; import java.util.*; public class AGC015APlusB { public static void main(String[] args) { FastScanner I = new FastScanner(); //Input OutPut O = new OutPut(); //Output long ans = 0; long N = I.nextLong(); long A = I.nextLong(); long B = I.nextLong(); if (A<=B&&N>=2...
Main.java:4: error: class AGC015APlusB is public, should be declared in a file named AGC015APlusB.java public class AGC015APlusB { ^ 1 error
s596918470
p03705
C++
#include <bits/stdc++.h> using namespace std; int main() { ll n,a,b; cin >> n >> a >> b; if((n==1 && a!=b) || a>b){ cout << 0 << endl; return 0; } cout << (b-a)*(n-2)+1 << endl; }
a.cc: In function 'int main()': a.cc:5:2: error: 'll' was not declared in this scope 5 | ll n,a,b; | ^~ a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'? 6 | cin >> n >> a >> b; | ^ | yn a.cc:6:15: error: 'a' was not declared in this scope 6 | ...
s320479564
p03705
C++
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define vec_input(v) for(auto it=v.begin();it!=v.end();it++){cin>>*it;} #define vec_output(v) for(auto it=v.begin();it!=v.end();it++){if(it!=v.begin())cout<<" ";cout<<*it;...
/usr/bin/ld: /tmp/cc2MMzEO.o: in function `main': a.cc:(.text+0xeb): undefined reference to `arith_sum1(long long, long long, long long)' collect2: error: ld returned 1 exit status
s359700936
p03705
C++
#include <bits/stdc+.h> using namespace std; int main() { long long N, A, B, ans; cin >> N >> A >> B; if(A>B) cout << 0; else if(A==B) cout << 1; else { if(N==1) cout << 0; else if(N==2) cout << 1; else { ans = B*(N-1)+A - A*(N-1) -B + 1; ...
a.cc:1:10: fatal error: bits/stdc+.h: No such file or directory 1 | #include <bits/stdc+.h> | ^~~~~~~~~~~~~~ compilation terminated.
s675614239
p03705
C++
n,a,b=map(int,input().split()) if a>b: print(0) elif n==1 and a!=b: print(0) else: print(b*(n-1)+a-(b+a*(n-1))+1)
a.cc:1:1: error: 'n' does not name a type 1 | n,a,b=map(int,input().split()) | ^
s550521917
p03705
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> PL; #define int ll const ll MOD = 1000000007; const ll INF_LL = (ll)1000000007 * 1000000007; const int INF_INT = (int)1000000007; const double PI = 3.14159265358979323846; const int dx[4] = {1, 0, -1, 0...
a.cc: In function 'int main()': a.cc:86:6: error: 'N' was not declared in this scope 86 | if(N <= 2 || A >= B){ | ^
s894431843
p03705
C++
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int N,A,B; cin >> N >> A >> B; cout << max((B*(N-1)+A)-(A*(N-1)+B)+1,0) << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: no matching function for call to 'max(long long int, int)' 7 | cout << max((B*(N-1)+A)-(A*(N-1)+B)+1,0) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_6...
s150754675
p03705
C++
#include <bits/stdc++.h> using namespace std; int main(){ int64_t N,A,B; cin>>N>>A>>B; if(A>B) cout<<0<<endl; else cout<<max((B-A)*(N-2)+1,0)<<endl; }
a.cc: In function 'int main()': a.cc:10:14: error: no matching function for call to 'max(int64_t, int)' 10 | cout<<max((B-A)*(N-2)+1,0)<<endl; | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51...
s783830647
p03705
C++
#include<algorithm>//sort(all(変数),greater<型名>())で降順に、*max_element(all(変数))で最大値を獲得 #include<bits/stdc++.h> #include<cmath>//切り上げceil(値) #include<deque> #include<iomanip>//setprecision(数字) #include<iostream> #include<list> #include<map> #include<numeric> // xとyのgcdは__gcd(x,y),xとyのlcmは(x*y)/__gcd、accumulate(all(変数),0)で要素の...
a.cc: In function 'int main()': a.cc:28:31: error: 'c' was not declared in this scope 28 | int n,a,b; cin >> a >> b >> c; | ^
s562292233
p03705
C++
#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> // #include<ext/pb_ds/assoc_container.hpp> // #include<ext/pb_ds/tree_policy.hpp> // #include<ext/pb_ds/tag_and_trait.hpp> // using namespace __gnu_pbds; // #include<boost/multiprecision/cpp_int.hpp> // nam...
a.cc:157:2: error: stray '#' in program 157 | }#pragma GCC target("avx") | ^ a.cc:157:3: error: 'pragma' does not name a type; did you mean '_Pragma'? 157 | }#pragma GCC target("avx") | ^~~~~~ | _Pragma a.cc:198:10: error: redefinition of 'const ll mod' 198 | const ll mod=1000000007; ...
s453545361
p03705
C++
#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> #include <ctime> #include <algorithm> #include <bitset> #in...
a.cc: In function 'int main()': a.cc:74:14: error: no matching function for call to 'max(int, int64_t)' 74 | cout << max(0, (maxi-mini+1)) << endl; | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, ...
s849994501
p03705
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vi2 = vector<vector<int>>; #define MP(a,b) make_pair((a),(b)) #define MT(...) make_tuple(__VA_ARGS__) #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,x) for(int i=0;i<(int)(x);i++) #define REPS(i,x) for(int i=1...
a.cc: In function 'int main()': a.cc:32:5: error: 'ill' was not declared in this scope; did you mean 'll'? 32 | ill N, A, B; | ^~~ | ll a.cc:33:12: error: 'N' was not declared in this scope 33 | cin >> N >> A >> B; | ^ a.cc:33:17: error: 'A' was not declared in this sc...
s360182066
p03705
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #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()) #define fi first #define se second #define bgn begin() #define sz size() #define en end() #define pb push_b...
a.cc: In function 'int main()': a.cc:451:11: error: expected initializer before '.' token 451 | int n, a. b; | ^ a.cc:452:15: error: 'a' was not declared in this scope 452 | cin >> n >> a >> b; | ^ a.cc:452:20: error: 'b' was not declared in this scope 452 | cin >> n >> a...
s221590017
p03705
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; typedef pair<int, int> P; ll Mod = 1000000007; int main() { ll N,A,B; cin >> N >> A >> B; cout << max(0,(B * (N - 1) + A) - (A * (N - 1) + B) + 1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:14: error: no matching function for call to 'max(int, ll)' 9 | cout << max(0,(B * (N - 1) + A) - (A * (N - 1) + B) + 1) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /...
s048714542
p03705
C++
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); long long int n,a,b; cin >> n >> a >> b; long long int hi = (n-1)*b + a; long long int lo = (n-1)*a + b; cout << max(0,hi-lo+1) << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:16:20: error: no matching function for call to 'max(int, long long int)' 16 | cout << max(0,hi-lo+1) << '\n'; | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/std...
s207882898
p03705
C++
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; const int MOD = 1e9 + 7; set<ll> st; void func(int n, int a, int b, ll acc) { if (n <= 0) { st.insert(acc); return; } for (int i = a; i <= b; i++) { func(n - 1, a, b, acc + i); } } int main()...
a.cc: In function 'int main()': a.cc:24:5: error: return-statement with no value, in function returning 'int' [-fpermissive] 24 | return; | ^~~~~~ a.cc:27:5: error: return-statement with no value, in function returning 'int' [-fpermissive] 27 | return; | ^~~~~~
s021700775
p03705
C++
#include<iostream> #include<algorithm> using namespace std; int main(void) { long long n,a,b; cin >> n >> a >> b; cout << max(0,b*(n-1)+a-(a*(n-1)+b)+1); return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: no matching function for call to 'max(int, long long int)' 8 | cout << max(0,b*(n-1)+a-(a*(n-1)+b)+1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_c...
s769968620
p03705
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> PLL; typedef vector<int> VI; typedef vector<double> VL; typedef vector<string> VS; typedef vector<PLL> VP; typedef vector<ll> VLL; #define rep(i,n) for (ll i=0; i<(ll)(n); i++) #define repd(i,n) for (ll i=n-1; i>=0; i--) #define rep...
a.cc: In function 'int main()': a.cc:28:5: error: 'else' without a previous 'if' 28 | else if(N==1){ | ^~~~
s050763380
p03705
C++
#include<iostream> using namespace std; int n,a,b; int main() { cin>>n>>a>>b; if(n==1) { if(a==b) cout<<1; else cout<<0; } else if { if(a==b||a>b)cout<<0; else { cout<<(n-1)*b+a-(n-1)*a-b+1; } } }
a.cc: In function 'int main()': a.cc:16:9: error: expected '(' before '{' token 16 | { | ^ | (
s118393017
p03705
C++
#include<bits/stdc++.h> using namespace std; int main(){ int64_t N,A,B; cin>>N>>A>>B; if(N==1){if(A==B) cout<<1<<endl; else cout<<0<<endl;} ele if(A<=B){ int64_t ans=(N-2)*(B-A)+1; cout<<ans<<endl;} else cout<<0<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:2: error: 'ele' was not declared in this scope 10 | ele if(A<=B){ int64_t ans=(N-2)*(B-A)+1; | ^~~ a.cc:12:3: error: 'else' without a previous 'if' 12 | else | ^~~~
s865441730
p03705
C++
#include <iostream> #include <algorithm> #include <string> #include <queue> #include <cmath> #include <map> #include <iomanip> using namespace std; using ll = long long; int main() { ll n, a, b; cin >> n >> a >> b; cout << max(0, b * (n - 1) + a - a * (n - 1) - b + 1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:20: error: no matching function for call to 'max(int, ll)' 15 | cout << max(0, b * (n - 1) + a - a * (n - 1) - b + 1) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, fr...
s005647614
p03705
C++
v#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i)) #define REP(i, n) FOR(i,n,0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll) 1e15; int main() { cin.tie(0); ios::sync_with_...
a.cc:1:2: error: stray '#' in program 1 | v#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include <bits/stdc++.h> | ^ a.cc:6:9: error: 'pair' does not name a type 6 | typedef pair<ll, ll> pll; | ^~~~ a.cc: In function 'int main()': a.cc:16:5: error: '...
s754111469
p03705
C++
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.math.BigInteger; import java.nio.file.Files; import java.nio.file.Paths; import java.util.*; import java.util.stream.IntStream; import java.util.stream.LongStream; /** * https://kenkoooo.com/atcoder/#/contest/show/9b08f47...
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStream; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodu...
s420324380
p03705
C++
#include <bits/stdc++.h> using namespace std; //def #define debug(x) cout << #x << ": " << x << '\n' #define out(x) cout << x << '\n' #define repeat(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define revrepeat(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--) #define rep(i, n) for (int i = 0; i < (int)(n);...
a.cc:203:2: error: unterminated argument list invoking macro "out" 203 | } | ^ a.cc: In function 'int main()': a.cc:202:5: error: 'out' was not declared in this scope 202 | out(max(0LL, ans); | ^~~ a.cc:202:8: error: expected '}' at end of input 202 | out(max(0LL, ans); | ^ a...
s582361178
p03705
C++
N,A,B=map(int,input().split()) m=A*(N-1)+B M=A+B*(N-1) ans=M-m+1 ans=max(ans,0) print(ans)
a.cc:1:1: error: 'N' does not name a type 1 | N,A,B=map(int,input().split()) | ^
s991293984
p03705
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<cmath> #include<map> #include<iomanip> #define rip(i,n) for(int i=0;i<n;i++) #define ll long long #define lb long double #define vec vector<int> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (a > b)cout << "0" <...
a.cc: In function 'int main()': a.cc:27:32: error: expression cannot be used as a function 27 | cout << (n - 2)(b - a) + 1 << endl; | ~~~~~~~^~~~~~~
s348408484
p03705
C++
#include<iostream> #include<stdio.h> //#include <bits/stdc++.h> #include<vector> #include<float.h> #include<iomanip> #include<algorithm> #include<string> #include<cstring> #include<math.h> #include<cmath> #include<sstream> #include<set> #include<map> #include<queue> #include <cassert> #include <cmath> #include<cstdint>...
a.cc: In function 'int main()': a.cc:49:16: error: no matching function for call to 'min(int, ll)' 49 | cout << min(0 , r - l + 1) << endl; | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s660043344
p03705
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll MOD=1000000007; const double PI=3.14159265358979; const ll INF= pow(10,18); typedef pair<ll,ll> P; typedef vector<ll> vl; typedef vector<vl> vvl; #define FOR(i,a,b) for(ll i=a;i<b;i++) #define rep(i,n) FOR(i,0,n) string abc="abcdefghijklmnopqrst...
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:15:12: note: to match this '{' 15 | int main() { | ^
s408726055
p03705
C++
#include <bits/stdc++.h> using namespace std; int main() { long long N, A, B; cin >> N >> A >> B; if(N == 1 && B != A){ print(0); return 0; }else if(N == 1 && A == B){ print(1); return 0; }else if(N > 1 && A > B){ print(0); return 0; }else{ print((B - A) * (N - 2) + 1); return 0; } }
a.cc: In function 'int main()': a.cc:9:3: error: 'print' was not declared in this scope; did you mean 'rint'? 9 | print(0); | ^~~~~ | rint a.cc:12:3: error: 'print' was not declared in this scope; did you mean 'rint'? 12 | print(1); | ^~~~~ | rint a.cc:15:3: error: 'print' was...
s741922532
p03705
C++
#include <bits/stdc++.h> using namespace std; int main() { ll N, A, B; cin >> N >> A >> B; if(N == 1 && B != A){ print(0); return 0; }else if(N == 1 && A == B){ print(1); return 0; }else if(N > 1 && A > B){ print(0); return 0; }else{ print((B - A) * (N - 2) + 1); return 0; } }
a.cc: In function 'int main()': a.cc:5:1: error: 'll' was not declared in this scope 5 | ll N, A, B; | ^~ a.cc:6:8: error: 'N' was not declared in this scope 6 | cin >> N >> A >> B; | ^ a.cc:6:13: error: 'A' was not declared in this scope 6 | cin >> N >> A >> B; | ^ a.cc...
s507942012
p03705
C++
#include<bits/stdc++.h> #include <iostream> #include <vector> using namespace std; int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); long long int a,b,n; cin>>n>>a>>b; if(a>b || (n==1 a<b)){ printf("0\n"); }else if(a==b || n==1 || n==2){ printf("1\n"); }else{ ...
a.cc: In function 'int main()': a.cc:10:20: error: expected ')' before 'a' 10 | if(a>b || (n==1 a<b)){ | ~ ^~ | ) a.cc:12:6: error: expected ')' before 'else' 12 | }else if(a==b || n==1 || n==2){ | ^~~~ | ) a.cc:10:7: note: to match thi...
s285275824
p03705
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,a,b; cin >> n >> a >> b; if(n==1){ if(a==b) cout << 1 << endl; else cout << 0 << endl; } else cout << max(0LL,(b-a)*(n-2)+1) << endl; }
a.cc: In function 'int main()': a.cc:11:21: error: no matching function for call to 'max(long long int, int)' 11 | else cout << max(0LL,(b-a)*(n-2)+1) << endl; | ~~~^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-g...
s066060856
p03705
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,a,b; cin >> n >> a >> b; if(a>b){ cout << 0 << endl; return 0; } if(n==1&&a==b){ cout << 1 << endl; return 0; } if(n==1&&b!=a){ cout << 0 << endl; return 0; } else{ ...
a.cc: In function 'int main()': a.cc:20:22: error: expression cannot be used as a function 20 | cout << (b-a)(n-2)+1 << endl; | ~~~~~^~~~~
s826802265
p03705
C++
ト時間: 2017-05-27(土) 21:00 ~ 2017-05-27(土) 22:50 (110分)AtCoderホームへ戻る トップ 問題 質問 提出 提出結果 順位表 バーチャル順位表 コードテスト 解説 提出 #10808752 ソースコード Copy Copy #include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <functional> #include <cstdlib> #include <list> #include <numeric> #include <map> #...
a.cc:11:6: error: stray '#' in program 11 | 提出 #10808752 | ^ a.cc:1:1: error: '\U000030c8\U00006642\U00009593' does not name a type 1 | ト時間: 2017-05-27(土) 21:00 ~ 2017-05-27(土) 22:50 (110分)AtCoderホームへ戻る | ^~~~~~ In file included from /usr/include/wchar.h:53, from /usr/include/c+...
s913321738
p03705
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,a,b) for (ll i = (a); i < (b); i++) #define REP(i,n) rep(i,0,n) int solve() { ll n,a,b;cin>>n>>a>>b; if(a>b)return 0; if(a!=b&&n==1)return 0; if(a==b&&n==1)return 1; return max(0,(n-2)*(b-a)+1); } int main() { c...
a.cc: In function 'int solve()': a.cc:13:15: error: no matching function for call to 'max(int, ll)' 13 | return max(0,(n-2)*(b-a)+1); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s269484886
p03705
C++
#include<iostream> using namespace std; int n,a,b; int rs; bool v[1000000010]; void cdt(int ll,int t) { if(t<n) for(int i=a;i<=b;i++) cdt(ll+i,t+1); else { if(v[ll]=!=1) {v[ll]=1;rs++;} } } int main() { rs=0; cin>>n>>a>>b; if(n==1){if(a==b)rs=1;} else if(n==2){if(a<b)rs=1;} else if(n>=3&&a<=b) { cdt...
a.cc: In function 'void cdt(int, int)': a.cc:14:26: error: expected primary-expression before '!=' token 14 | if(v[ll]=!=1) | ^~
s021161082
p03705
C++
// 015 AGC A - A+...+B Problem 2017/05/27 #include <bits/stdc++.h> #define rep(i ,n) for(int i=0;i<(int)(n);++i) using namespace std; typedef long long int int64; typedef unsigned long long uint64; int main(){ int n; cin >> n; int a , b; cin >> a >> b; cout << ( b - a)( n - 2 ) + 1 << endl; }
a.cc: In function 'int main()': a.cc:11:21: error: expression cannot be used as a function 11 | cout << ( b - a)( n - 2 ) + 1 << endl; | ~~~~~~~~^~~~~~~~~
s338377120
p03705
C++
//#include<bits/stdc++.h> #include<cstdio> #include<cmath> #include<iostream> using namespace std; const int maxn = 1000; int a[maxn]; int main(){ int n, a, b; cin >> n >> a >> b; longlong ans =0; if(a <= b && n > 1){ ans = (long long )(b-a)*(n-2)+1; }if(n == 1 && a == b) ans =1; c...
a.cc: In function 'int main()': a.cc:13:5: error: 'longlong' was not declared in this scope 13 | longlong ans =0; | ^~~~~~~~ a.cc:16:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | ans = (long long )(b-a)*(n-2)+1; | ^~~ | abs a.cc:18:27: ...
s923764026
p03705
C++
//#include<bits/stdc++.h> #include<cstdio> #include<cmath> #include<iostream> using namespace std; const int maxn = 1000; int a[maxn]; int main(){ int n, a, b; cin >> n >> a >> b; longlong ans =0; if(a <= b && n > 1){ ans = (long long )(b-a)*(n-2)+1 }if(n == 1 && a == b) ans =1; co...
a.cc: In function 'int main()': a.cc:13:5: error: 'longlong' was not declared in this scope 13 | longlong ans =0; | ^~~~~~~~ a.cc:16:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | ans = (long long )(b-a)*(n-2)+1 | ^~~ | abs a.cc:18:27: e...
s676917487
p03705
C++
#include<bits/stdc++.h> #define sr register short #define su unsigned short #define r register int #define u unsigned int #define ll long long #define llr register long long #define llu unsigned long long #define lf double #define Lf long double using namespace std; int main() { /*#ifndef ONLINE_JUDGE freopen("cpp...
a.cc: In function 'int main()': a.cc:21:22: error: no matching function for call to 'max(int, long long int)' 21 | printf("%lld",max(0,(n-2)*(b-a)+1)); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14...
s533832537
p03705
C++
#include <bits/stdc++.h> using namespace std int main(){ int N,A,B;cin>>N>>A>>B; if(A>B)cout<<"0"<<endl; else if(N==1){ if(A==B)cout<<"1"<<endl; else cout<<"0"<<endl; } else cout<<(N-2)*(B-A)+1<<endl; }
a.cc:2:20: error: expected ';' before 'int' 2 | using namespace std | ^ | ; 3 | int main(){ | ~~~
s573760258
p03705
C++
#include <iostream> #include <algorithm> #include <vector> #include <math.h> #include <cstring> #include <map> #include <set> #include <iomanip> #include <queue> #include <stack> #include<bits/stdc++.h> using namespace std; int main(){ int N,A,B; scanf("%d%d%d",&N,&A,&B); if(B-A<0){ printf("0\n"); return 0; } ...
a.cc: In function 'int main()': a.cc:24:15: error: 'a' was not declared in this scope 24 | B=B-A;a | ^
s577813952
p03705
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <tuple> #include <cstdint> #include <cstdio> #include <map> #include <queue> #include <stack> #include <deque> #include <unordered_map> #include <unordered_set> #include <bitset> #include <cctype> #include <numeric>...
a.cc: In function 'int main()': a.cc:31:20: error: no matching function for call to 'max(int, ll)' 31 | cout << max(0,(n-2)*(b-a)+1) << endl; | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...