submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s810517577 | p03778 | C++ | 3 1 3 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 1 3
| ^
|
s884291073 | p03778 | C++ | #include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <set>
#include <queue>
#define mod 1000000007
#define ten5 100005
#define PI 3.1415926
using namespace std;
int main()
{
//int m,n,o=0,i,j,k;
long long int sum=0,sum2=0,n1=0,n2=0,n3;
... | a.cc: In function 'int main()':
a.cc:28:14: error: 'w' was not declared in this scope
28 | if(a+w<b) cout<<b-a-w;
| ^
a.cc:34:14: error: 'w' was not declared in this scope
34 | if(b+w<a) cout<<a-b-w;
| ^
|
s318072171 | p03778 | C++ | #include<bits/stdc++.h>
using namesapce std;
main(){
int h ,a ,b;
cin >> h >> a >> b;
int ans = h - abs((a - b));
if(ans <= 0){cout << 0;}else{cout << ans;}
} | a.cc:4:7: error: expected nested-name-specifier before 'namesapce'
4 | using namesapce std;
| ^~~~~~~~~
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope... |
s303732957 | p03778 | C++ | #include<bits/stdc++.h>
using namesapce std;
main(){
int h ,a ,b;
cin >> h >> a >> b;
int ans = h - abs(a - b);
if(ans <= 0){cout << 0;}else{cout << ans}
} | a.cc:4:7: error: expected nested-name-specifier before 'namesapce'
4 | using namesapce std;
| ^~~~~~~~~
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope... |
s059763286 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w, a, b;
cin >> w >> a >> b;
//The lower rectangle goes before
int dif;
if(a+w<=b)dif = b-(a+w);
else if(b+w<=a)if = a-(b+w);
cout << dif << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:27: error: expected '(' before '=' token
10 | else if(b+w<=a)if = a-(b+w);
| ^
| (
|
s258816226 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;
int main() {
int W, a, b;
cin >> W >> a >> b;
cout << max({0, b - a - W, a - b - W) << endl;
} | a.cc: In function 'int main()':
a.cc:11:41: error: expected '}' before ')' token
11 | cout << max({0, b - a - W, a - b - W) << endl;
| ~ ^
|
s950916722 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 40;
#define FOR(i,k,n) for(int i=(k);i<(n);++i)
int main(){
int a.b.W;cin >> W >> a >> b;
if(b>=a+W) cout << b-a-W << endl;
else if(b+W<=a) cout << a-b-W << endl;
else cout << 0 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:10: error: expected initializer before '.' token
8 | int a.b.W;cin >> W >> a >> b;
| ^
a.cc:8:22: error: 'W' was not declared in this scope
8 | int a.b.W;cin >> W >> a >> b;
| ^
a.cc:8:27: error: 'a' was not declared in thi... |
s033196020 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std ;
int main(){
int w , a . b ;
cout << max(0,max(a,b)-min(a,b)-w) << endl ;
} | a.cc: In function 'int main()':
a.cc:5:13: error: expected initializer before '.' token
5 | int w , a . b ;
| ^
a.cc:6:21: error: 'a' was not declared in this scope
6 | cout << max(0,max(a,b)-min(a,b)-w) << endl ;
| ^
a.cc:6:23: error: 'b' was not declared in this... |
s060939389 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main() {
long long a,b,w,
int result,first,secod;
scanf("%ld %ld %ld",&w,&a,&b);
first=a+w;
secod=b+w;
if(a<b)
{
result=b-(first);
printf("%d\n",result);
}
else if(b<a)
{
result=a-(secod);
printf("%d\n",result);
}
else if(a<secod)
{
resu... | a.cc: In function 'int main()':
a.cc:7:1: error: expected unqualified-id before 'int'
7 | int result,first,secod;
| ^~~
a.cc:10:1: error: 'first' was not declared in this scope
10 | first=a+w;
| ^~~~~
a.cc:11:1: error: 'secod' was not declared in this scope
11 | secod=b+w;
| ^~~~~
a.cc:15:7:... |
s762356606 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main() {
int a,b,w,result,first,secod;
scanf("%d %d %d",&w,&a,&b);
first=a+w;
secod=b+w;
if(a<b)
{
result=b-(first);
printf("%d\n",result);
}
else if(b<a)
{
result=a-(secod);
printf("%d\n",result);
}
else if(first<=secod || b<=first))
{
... | a.cc: In function 'int main()':
a.cc:24:34: error: expected primary-expression before ')' token
24 | else if(first<=secod || b<=first))
| ^
|
s775962857 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main() {
int a,b,w,result,first,secod;
scanf("%d %d %d",&w,&a,&b);
first=a+w;
secod=b+w;
if(a<b)
{
result=b-(first);
printf("%d\n",result);
}
else if(b<a)
{
result=a-(secod);
printf("%d\n",result);
}
else if(first<=secod && b<=first))
{
... | a.cc: In function 'int main()':
a.cc:24:34: error: expected primary-expression before ')' token
24 | else if(first<=secod && b<=first))
| ^
|
s192340989 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main()
{
int a,b,w,result,first,secod;
scanf("%d %d %d",&w,&a,&b);
first=a+w;
secod=b+w;
if(a>b);
a=a+b;
b=a-b;
a=a-b;
else if(b<=first && first<=secod)
{
result=0;
printf("%d\n",result);
}
else
printf("%d\n",b-(first));
return 0;
}
| a.cc: In function 'int main()':
a.cc:21:1: error: 'else' without a previous 'if'
21 | else if(b<=first && first<=secod)
| ^~~~
|
s930354109 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main() {
int a,b,w,result,first,secod;
scanf("%d %d %d",&w,&a,&b);
first=a+w;
secod=b+w;
if(a>b)
a=a+b;
b=a-b;
a=a-b;
else if(b<=first && first<=secod)
{
result=0;
printf("%d\n",result);
}
else
printf("%d\n",b-(first));
return 0;
}
| a.cc: In function 'int main()':
a.cc:20:1: error: 'else' without a previous 'if'
20 | else if(b<=first && first<=secod)
| ^~~~
|
s171906527 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main() {
int a,b,w,result,first,secod;
scanf("%d %d %d",&w,&a,&b);
first=a+w;
secod=b+w;
if(a>b)
a=a+b;
b=a-b;
a=a-b;
else if(b<=first && first<=secod)
{
result=0;
printf("%d\n",result);
}
else
result=b-(first);
printf("%d\n",result);
return... | a.cc: In function 'int main()':
a.cc:20:1: error: 'else' without a previous 'if'
20 | else if(b<=first && first<=secod)
| ^~~~
|
s208854082 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main() {
int a,b,w,result,first,secod;
scanf("%d %d %d",&w,&a,&b);
first=a+w;
secod=b+w;
if(a>b)
a=a+b;
b=a-b;
a=a-b;
else if(secod<=first && first<=secod)
{
result=0;
printf("%d\n",result);
}
else
result=b-(first);
printf("%d\n",result);
re... | a.cc: In function 'int main()':
a.cc:20:1: error: 'else' without a previous 'if'
20 | else if(secod<=first && first<=secod)
| ^~~~
|
s525669979 | p03778 | C++ | #include <stdio.h>
using namespace std;
int main() {
int a,b,w,result,first,secod;
scanf("%d %d %d",&w,&a,&b);
first=a+w;
secod=b+w;
if(a<b)
a=a+b;
b=a-b;
a=a-b;
else if(secod<=first
&&
first<=secod)
{
result=0;
printf("%d\n",result);
}
else
result=b-first;
printf("%d\n",result);
return ... | a.cc: In function 'int main()':
a.cc:17:1: error: 'else' without a previous 'if'
17 | else if(secod<=first
| ^~~~
|
s958395934 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w, a, b, temp;
cin>>w>>a>>b;
if(b<a){
temp=a;
a=b;
b=temp;
}
temp=b-(a+w);
if(temp<0){
temp=0;
}
cout<<temp<<endl; | a.cc: In function 'int main()':
a.cc:16:26: error: expected '}' at end of input
16 | cout<<temp<<endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s555234133 | p03778 | C++ | #include <iostream>
using namespace std;
int main()
{
int w{};
int a{};
int b{};
cin >> w >> a >> b;
int ans{max(a,b)-(min(a,b)+w)}
if (ans<=0)
cout << 0<< endl;
else
cout << ans;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'if'
12 | if (ans<=0)
| ^~
a.cc:14:5: error: 'else' without a previous 'if'
14 | else
| ^~~~
|
s319259205 | p03778 | C++ | ////////////////////////////////////////////////////////////////
//
// YatCoder Library
// https://github.com/Reputeless/YatCoder
//
# define YAT_WITH_FEATURE(X) YAT_WITH_FEATURE_PRIVATE_DEFINITION_##X()
# define YAT_WITH_FEATURE_PRIVATE_DEFINITION_INT128() 0
# if defined(__SIZEOF_INT128__) // 組み込み 128-bit 整数型の有... | a.cc: In function 'int main()':
a.cc:2212:17: error: 'B' was not declared in this scope
2212 | if (abs(a - B) <= W)
| ^
|
s986650069 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int w,a,b,aww;
int main () {
cin >> w >> a >> b;
if (a > b) {
aww= a - (b+w);
}
else {
aww= b - (a+w);
}
if (dis <= 0) {
cout << 0 << endl;
}
else {
cout << aww << endl;
} | a.cc: In function 'int main()':
a.cc:12:13: error: 'dis' was not declared in this scope; did you mean 'div'?
12 | if (dis <= 0) {
| ^~~
| div
a.cc:17:10: error: expected '}' at end of input
17 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int... |
s830168556 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int w,a,b,aww;
int main () {
cin >> w >> a >> b;
if (a > b) {
aww= a - (b+w);
}
else {
aww= b - (a+w);
}
if (dis <= 0) {
cout << 0 << endl;
}
else {
cout << dis << endl;
}
} | a.cc: In function 'int main()':
a.cc:12:13: error: 'dis' was not declared in this scope; did you mean 'div'?
12 | if (dis <= 0) {
| ^~~
| div
|
s217903295 | p03778 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int a,b,c,d,gede;
int main () {
cin>>a>>b>>c;
d=c-(a+b)<<endl;
if(d<=0){
cout<<0<<endl;
}else{
cout<<c-(a+b)<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:10: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | d=c-(a+b)<<endl;
| ~~~~~~~^~~~~~
|
s789708728 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, a, b;
cin >> W >> a >> b;
if (a > b)
swap(a, b);
int ans = b - (a + W);
if (ans > 0)
cout << ans << endl;
else
} | a.cc: In function 'int main()':
a.cc:16:1: error: expected primary-expression before '}' token
16 | }
| ^
|
s489713736 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, a, b;
cin >> W >> a >> b;
if (a > b)
swap(a, b);
int ans = b - (a + W);
if (ans > 0)
cout << ans << endl;
else | a.cc: In function 'int main()':
a.cc:15:7: error: expected statement at end of input
15 | else
| ^
a.cc:15:7: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s305993182 | p03778 | Java | import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner ss=new Scanner(System.in);
long p,x,xx,c;
p=ss.nextLong(); x=ss.nextLong(); xx=ss.nextLong();
if(x>xx){
c=xx;
xx=x;
x=c;
}
... | Main.java:4: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
1 error
|
s017833691 | p03778 | C++ | #include<bits/stdc++.h>
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
int w,a,b;
cin>>w>>a>>b;
if ((a<=b&&b<=a+w)||(b<=a&&a<=b+w)) cout<<0<<endl;
e... | a.cc: In function 'int main()':
a.cc:10:18: error: no matching function for call to 'abs(int&, int&)'
10 | else cout<<abs(a, b)-w<<endl;
| ~~~^~~~~~
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
... |
s469317098 | p03778 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(){
int w,a,b;
cin >> w>>a>>b;
if(b + a < w) cout << 0 << endl;
else cout << abs(a - b) - w
}
| a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before '}' token
8 | else cout << abs(a - b) - w
| ^
| ;
9 | }
| ~
|
s561206061 | p03778 | C++ | #include<iostream>
using namespace std;
int main(){
long int W;
long int a,b;
cin >> W >> a >>b;
int x;
if(a<=b && b<=a+W || a<=b+W && b+W>=a+W)
{x=0;
break;
}
if(a<b){
for(int i=0;i<W; ++i){
if(a+W==b-i){
x =i;
break;
}
}
}
if(a>b){
... | a.cc: In function 'int main()':
a.cc:12:7: error: break statement not within loop or switch
12 | break;
| ^~~~~
|
s655442427 | p03778 | C++ | #include<iostream>
using namespace std;
int main(){
long int W;
long int a,b;
cin >> W >> a >>b;
int x;
if(a<=b && b<=a+W || a<=b+W && b+W>=a+W)
{x=0;
break;
}
if(a<b){
for(int i=0;i<W; ++i){
if(a+W==b-i){
x =i;
break;
}
}
}
if(a>b){
... | a.cc: In function 'int main()':
a.cc:12:7: error: break statement not within loop or switch
12 | break;
| ^~~~~
a.cc: At global scope:
a.cc:31:4: error: 'cout' does not name a type
31 | cout << x <<endl;
| ^~~~
a.cc:32:1: error: expected declaration before '}' token
32 | }
|... |
s669666808 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
#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++)
typedef long long ll;
int main() {
int W, a, b;
cin >> W >> a >> b;
cout << max(max(a,b) - (min(a,b) + W)), 0) << endl;
}
| a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'max(int)'
10 | cout << max(max(a,b) - (min(a,b) + W)), 0) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c+... |
s799673049 | p03778 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int W = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
System.out.println(Math.max(Math.abs(a-b)-W, 0));
}
}
| Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s484753302 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=0;(i)<(n);i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define MOD 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b... | a.cc: In function 'int main()':
a.cc:21:17: error: expected ';' before 'cout'
21 | else(a==b+w)cout << 0 << endl;
| ^~~~
| ;
a.cc:27:17: error: expected ';' before 'cout'
27 | else(a==b+w)cout << 0 << endl;
| ^~~~
| ;
|
s530427295 | p03778 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstring>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;
int main() {
int W, a, b... | a.cc: In function 'int main()':
a.cc:15:28: error: 'A' was not declared in this scope
15 | int W, a, b; cin >> W >> A >> B;
| ^
a.cc:15:33: error: 'B' was not declared in this scope
15 | int W, a, b; cin >> W >> A >> B;
| ^
|
s595478442 | p03778 | C++ | #include <isotream>
using namespace std;
int main(){
int W, a, b;
cin >> W >> a >> b;
int ans;
if(a+W < b){
ans = b - (a+W);
}else if( b + W < a ){
ans = a - (b+W);
}else{
ans = 0;
}
cout << ans;
} | a.cc:1:10: fatal error: isotream: No such file or directory
1 | #include <isotream>
| ^~~~~~~~~~
compilation terminated.
|
s645078573 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,a,b;
cin >> x >> a >> b;
cout << max(abs(b - a) - w,0) << endl;
} | a.cc: In function 'int main()':
a.cc:6:28: error: 'w' was not declared in this scope
6 | cout << max(abs(b - a) - w,0) << endl;
| ^
|
s540802156 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int w, a, b;
cin >> w >> a >> b;
int ans = 0;
if (a + w < b) {
ans = b - (a + w)
} else if (b + w < a) {
ans = a - (b + w);
} else {
ans = 0;
}
cout << ans;
} | a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before '}' token
10 | ans = b - (a + w)
| ^
| ;
11 | } else if (b + w < a) {
| ~
|
s234743188 | p03778 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int W = sc.nextInt();
int b = sc.nextInt();
int b = sc.nextInt();
int ans = 0;
if (a+W < b) {
ans = b - (a+W);
} else if (b+W < a) {
ans = a - (b+W);
}
... | Main.java:8: error: variable b is already defined in method main(String[])
int b = sc.nextInt();
^
Main.java:11: error: cannot find symbol
if (a+W < b) {
^
symbol: variable a
location: class Main
Main.java:12: error: cannot find symbol
ans = b - (a+W);
^
symbol: ... |
s994978499 | p03778 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <iomanip>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll... | a.cc: In function 'int main()':
a.cc:54:16: error: no matching function for call to 'max(int, ll)'
54 | cout << max(0,a+W-b)<<endl;
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s857025627 | p03778 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cassert>
#include <functional>
#include <string>
#include <sstream>
#include <cctype>
using namespace std;
int main(){
int W, a, b; cin >> W >> a >> b:
if(a + W < b) cout << b - (a + W) << end... | a.cc: In function 'int main()':
a.cc:15:34: error: expected ';' before ':' token
15 | int W, a, b; cin >> W >> a >> b:
| ^
| ;
a.cc:17:3: error: 'else' without a previous 'if'
17 | else if(b + W < a) cout << a - (b + W) << endl;
... |
s663223398 | p03778 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cassert>
#include <functional>
#include <string>
#include <sstream>
#include <cctype>
using namespace std;
int main(){
int W, a, b; cin >> W >> a >> b:
if(a + W <= b) cout << b + 1 - (a + W) <... | a.cc: In function 'int main()':
a.cc:15:34: error: expected ';' before ':' token
15 | int W, a, b; cin >> W >> a >> b:
| ^
| ;
a.cc:17:3: error: 'else' without a previous 'if'
17 | else if(b + W <= a) cout << a + 1 - (b + W) << endl... |
s928856416 | p03778 | C++ | #include <iostream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#define REP(i, n) for (long long i = 0; i < (n); i++)
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;
int main(){
int W,a,b;
cin >> W >> a >> b;
... | a.cc: In function 'int main()':
a.cc:20:7: error: 'res' was not declared in this scope
20 | res = b - (a + W);
| ^~~
a.cc:24:7: error: 'res' was not declared in this scope
24 | res = a - (b + W);
| ^~~
a.cc:27:8: error: 'res' was not declared in this scope
27 | if(res < ... |
s815970204 | p03778 | C++ | #include <iostream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#define REP(i, n) for (long long i = 0; i < (n); i++)
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;
int main(){
int W,a,b;
cin >> W >> a > b;
... | a.cc: In function 'int main()':
a.cc:14:19: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
14 | cin >> W >> a > b;
| ~~~~~~~~~~~~~ ^ ~
| | |
| | int
| ... |
s789537214 | p03778 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
int w, a, b;
scanf("%d%d%d", &w, &a, &b);
printf("%d\n", max(0, max(a, b)-min(a, b)-w));
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:25: error: 'max' was not declared in this scope; did you mean 'std::max'?
8 | printf("%d\n", max(0, max(a, b)-min(a, b)-w));
| ^~~
| std::max
In file included from /usr/include/c++/14/bits/specfun.h:43,
... |
s721983430 | p03778 | C++ | k#include <bits/stdc++.h>
using namespace std;
int main()
{
int W, a, b;
cin >> W >> a >> b;
if (a < b)
{
if (b - (a + W) <= 0)
cout << 0 << endl;
else
cout << b - (a + W) << endl;
}
else
{
if (a - (b + W) <= 0)
cout << 0 << endl;
else
cout << a - (b + W) << endl;
... | a.cc:1:2: error: stray '#' in program
1 | k#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'k' does not name a type
1 | k#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >> W >> a >> b;
| ^~~
a.cc:11:7: error: 'co... |
s449918950 | p03778 | C++ | #include <bits/stdc++.h>
int main(void){
int w, a, b;
cin >> w >> a >> b;
cout << a + w - b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> w >> a >> b;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: n... |
s693273623 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,a,b,d;
cin>>w>>a>>b;
if(w<b&&w<a){
d=b-(a+w);
cout<<d;
}
else if(w>b&&w>a){
d=a-(b+w);
cout<<d;
else if(w==b)
cout<<"0";
}
else
cout<<"0";
}
| a.cc: In function 'int main()':
a.cc:13:9: error: expected '}' before 'else'
13 | else if(w==b)
| ^~~~
a.cc:10:26: note: to match this '{'
10 | else if(w>b&&w>a){
| ^
a.cc: At global scope:
a.cc:16:1: error: expected unqualified-id before 'else'
16 |... |
s931004638 | p03778 | C++ | #include<iostream>
using namespace std;
int main(){
int w,a,b;
cin>>w>>a>>b;
if(b>a){
if(w>=b||w==a)
cout<<"0";
else
cout<<b-(a+w);
}
else if(a>b){
if(w>=a||W==b)
cout<<"0";
else
cout<<a-(b+w);
}
} | a.cc: In function 'int main()':
a.cc:13:42: error: 'W' was not declared in this scope
13 | if(w>=a||W==b)
| ^
|
s877784881 | p03778 | C++ | #include<iostram>
using namespace std;
int main(){
int w,a,b;
cin>>w>>a>>b;
if(b>a+w)
cout<<b-(a+w);
else if(a+w>b)
cout<<a-(b+w);
else if (a=b)
cout<<"0";
} | a.cc:1:9: fatal error: iostram: No such file or directory
1 | #include<iostram>
| ^~~~~~~~~
compilation terminated.
|
s323044374 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,m,w;
scanf("%d%d%d",&m,&a,&b);
if(b>(a+m)){
w=b-(a+m);
}
else if(a>(b+m)){
w=a-(b+m);
}
else
w=0;
printf("%d",w) | a.cc: In function 'int main()':
a.cc:14:22: error: expected ';' at end of input
14 | printf("%d",w)
| ^
| ;
a.cc:14:22: error: expected '}' at end of input
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s362828296 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,w,c=0;
scanf("%d%d%d",&a,&w,&b);
if(b>a+w)){
c=b-(a+w);
printf("%d",c);
}
else if(a>(w+b)){
c=a-(w+b);
printf("%D",c);
}
else
printf("%d",c);
}
| a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before ')' token
7 | if(b>a+w)){
| ^
|
s835561377 | p03778 | C++ | #include <iostream>
using namespace std;
int main(){
int a,w,b;
cin>>a>>w>>b;
if((a>=0)&&(W>=0)&&(b>=0)){
if(b>(a+w)){
cout<<b-(a+w);
}
if((b<=(a+w))&&(b>=a)){
cout<<"0";
}
if((b+w)<a)
{
cout<<a-(b+w);
}}} | a.cc: In function 'int main()':
a.cc:6:13: error: 'W' was not declared in this scope
6 | if((a>=0)&&(W>=0)&&(b>=0)){
| ^
|
s168694903 | p03778 | C++ | #include <iostream>
using namespace std;
int main(){
int a,W,b;
cin>>a>>W>>b;
if((a>=0)&&(b>=0)&&(W>=0){
if(b>(a+w)){
cout<<b-(a+W);
}
if((b<=(a+W))&&(b>=a)){
cout<<"0";
}
if((b+W)<a)
{
cout<<a-(b+W);
}}} | a.cc: In function 'int main()':
a.cc:6:26: error: expected ')' before '{' token
6 | if((a>=0)&&(b>=0)&&(W>=0){
| ~ ^
| )
a.cc:16:3: error: expected primary-expression before '}' token
16 | }}}
| ^
|
s231459289 | p03778 | C++ | #include <iostream>
using namespace std;
int main(){
int a,w,b;
cin>>a>>w>>b;
if((a<b)&&(b<(a+w))){
cout<<"0";
}
if((b<a)&&((b<(a+w)))
{cout<<a-b;
}
if(b>(a+w))
{
cout<<b-(a+w);
}
} | a.cc: In function 'int main()':
a.cc:10:22: error: expected ')' before '{' token
10 | if((b<a)&&((b<(a+w)))
| ~ ^
| )
11 | {cout<<a-b;
| ~
a.cc:17:1: error: expected primary-expression before '}' token
17 | }
| ^
|
s152314980 | p03778 | C++ | #include <iostream>
using namespace std;
int main(){
int a,w,b;
cin>>a>>w>>b;
if((a<b)&&((b<(a+w))){
cout<<"0";
}
if((b<a)&&((b<(a+w)))
{cout<<a-b;
}
if(b>(a+w))
{
cout<<b-(a+w);
}
} | a.cc: In function 'int main()':
a.cc:6:22: error: expected ')' before '{' token
6 | if((a<b)&&((b<(a+w))){
| ~ ^
| )
a.cc:17:1: error: expected primary-expression before '}' token
17 | }
| ^
|
s848561107 | p03778 | C++ |
#include <iostream>
using namespace std;
int main(){
int a,w,b;
cin>>a>>w>>b;
if(a==b){
cout<<"0";
}
if(b<a)
{cout<<a-b;
}
if(a<b)
{
cout<<b-(a+w);
}
}
} | a.cc:21:2: error: expected declaration before '}' token
21 | }
| ^
|
s966246324 | p03778 | C++ | // o
#include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } } | a.cc:2:21: warning: extra tokens at end of #include directive
2 | #include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } }
| ^~~~~
/us... |
s601215683 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a;
int b, , w ,d ;
scanf("%d%d%d",&w,&a,&b);
if(b>(a+w))
d=b-(a+w);
else if(a>b+w)
d=a-(b+w);
else
d=0;
printf("%d",d);
} | a.cc: In function 'int main()':
a.cc:5:16: error: expected unqualified-id before ',' token
5 | int b, , w ,d ;
| ^
|
s828888360 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a;
int b; , w ,d ;
scanf("%d%d%d",&w,&a,&b);
if(b>(a+w))
d=b-(a+w);
else if(a>b+w)
d=a-(b+w);
else
d=0;
printf("%d",d);
} | a.cc: In function 'int main()':
a.cc:5:16: error: expected primary-expression before ',' token
5 | int b; , w ,d ;
| ^
a.cc:5:18: error: 'w' was not declared in this scope
5 | int b; , w ,d ;
| ^
a.cc:5:21: error: 'd' was not declared in this scope
... |
s848144480 | p03778 | C++ | #include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
int main (){
int a,b,w;
cin>>w>>a>>b;
if (b>a)
cout<<abs(b-(a+w))<<endl;
else if (a==b)
cout<<0<<endl;
else if(a+w>=b&&b>a))
cout<<0<<endl;
else if(b+w>=a&&b+w<a+w))
cout<<0<<endl;
else
cout<<abs(a-(b+w))<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:25: error: expected primary-expression before ')' token
11 | else if(a+w>=b&&b>a))
| ^
a.cc:13:29: error: expected primary-expression before ')' token
13 | else if(b+w>=a&&b+w<a+w))
| ^
|
s886228425 | p03778 | C++ | AtCoDeer the deer found two rectangles lying on the table, each with height 1 and width W. If we consider the surface of the desk as a two-dimensional plane, the first rectangle covers the vertical range of [0,1] and the horizontal range of [a,a+W], and the second rectangle covers the vertical range of [1,2] and the ho... | a.cc:1:1: error: 'AtCoDeer' does not name a type
1 | AtCoDeer the deer found two rectangles lying on the table, each with height 1 and width W. If we consider the surface of the desk as a two-dimensional plane, the first rectangle covers the vertical range of [0,1] and the horizontal range of [a,a+W], and the secon... |
s445717006 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int w,l,a,b,d;
scanf("%d %d %d",&w,&a,&b);
if(a<b){
l=a+w;
d=b-l;
if(d>0)
printf("%d",d);
else
printf("0");
}
if(a>b){
b=b+w;
d=a-b;
if(d>0)
printf("%d",d);
else
... | a.cc:28:1: error: expected declaration before '}' token
28 | }
| ^
|
s369056756 | p03778 | C++ | #include <iostream>
#include <algorithm>
int main(){
int n,a,b;
cin >> n >> a >> b;
cout << max(min(b-a-n,a-b-n),0) << endl;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> n >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Lin... |
s658624159 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,a,b;cin>>w>>a>>b;
if(a>b)swap(a,b);
cout <<min(b-a-w,0)<<endl;
}. | a.cc:8:2: error: expected unqualified-id before '.' token
8 | }.
| ^
|
s943202030 | p03778 | C++ | #include<bits/stdc++.h>
using namespaced std;
int main(){
int w,a,b;cin>>w>>a>>b;
if(a>b)swap(a,b);
cout <<min(b-a-w,0)<<endl;
}. | a.cc:2:7: error: expected nested-name-specifier before 'namespaced'
2 | using namespaced std;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:19: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | int w,a,b;cin>>w>>a>>b;
| ^~~
| ... |
s941355819 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
ll w, a, b;
cin >> w >> a >> b;
cout << min(0, b-(a+w)) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:20: error: no matching function for call to 'min(int, long long int)'
11 | cout << min(0, b-(a+w)) << endl;
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/s... |
s698909297 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int W,a,b;
cin>>w>>a>>b; int t=0;
if(b>a+w) t=b-a-w;
if(a-W<=b<=a+W) t=0;
if(b<a-w) t=a-b-w;
cout<<t<<endl;
} | a.cc: In function 'int main()':
a.cc:5:8: error: 'w' was not declared in this scope
5 | cin>>w>>a>>b; int t=0;
| ^
|
s395540017 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int W,a,b;
cin>>W>>a>>b; int t;
if(b>=a+W) t=b-a-W;
if(a-W<=b<a+W) t=0;
if(b<a-W) t=a-b-W;
cout<<t<<endl; | a.cc: In function 'int main()':
a.cc:9:17: error: expected '}' at end of input
9 | cout<<t<<endl;
| ^
a.cc:3:13: note: to match this '{'
3 | int main () {
| ^
|
s622895746 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int W,a,b;
cin>>W>>a>>b; int t;
if(b>=a+W) t=b-a-W;
if(a-W<=b<a+W) t=0;
if(b<a-W) t=a-b-W;
cout<<t<<endl; | a.cc: In function 'int main()':
a.cc:9:17: error: expected '}' at end of input
9 | cout<<t<<endl;
| ^
a.cc:3:13: note: to match this '{'
3 | int main () {
| ^
|
s246268281 | p03778 | C++ | #include<iostream>
using namespace::std;
int main(){
int w,a,b;
cin>>w>>a>>b;
if(a>b) swap(a,b);
cout<<min(b-a-w,0)<<;
} | a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before ';' token
9 | cout<<min(b-a-w,0)<<;
| ^
|
s209705968 | p03778 | C++ | #include<iostream>
using namespace::std;
int main(){
int w,a,b;
cin>>w>>a>>b;
if(a>b) swap(a,b);
cout<<min(b+1-a-w,0)<<;
} | a.cc: In function 'int main()':
a.cc:9:25: error: expected primary-expression before ';' token
9 | cout<<min(b+1-a-w,0)<<;
| ^
|
s309162434 | p03778 | C++ | #include<iostream>
#include<algortihm>
using namespace std;
int main(){
int W,A,B;
cin>>W>>A>>B;
int a=min(A,B);
int b=max(A,B);
if(a+W>=b){
cout<<0<<endl;
}
else{
cout<<b-a-W<<endl;
}
return 0;
} | a.cc:2:9: fatal error: algortihm: No such file or directory
2 | #include<algortihm>
| ^~~~~~~~~~~
compilation terminated.
|
s114586125 | p03778 | C++ | #include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
template <class T> using V = vector<T>;
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
#define ... | a.cc: In function 'int main()':
a.cc:78:9: error: no matching function for call to 'max(int, long long int)'
78 | co(max(0,abs(a-b)-n))
| ~~~^~~~~~~~~~~~~~
a.cc:32:21: note: in definition of macro 'co'
32 | #define co(a) cout<<a<<endl;
| ^
In file included from /usr/include/... |
s929216356 | p03778 | C++ | #include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
template <class T> using V = vector<T>;
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
#define ... | a.cc: In function 'int main()':
a.cc:26:19: error: no matching function for call to 'max(int, long long int)'
26 | #define M(a,b) max(a,b)
| ~~~^~~~~
a.cc:32:21: note: in definition of macro 'co'
32 | #define co(a) cout<<a<<endl;
| ^
a.cc:78:6: note: in expansion of ... |
s229026682 | p03778 | C++ | #include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
template <class T> using V = vector<T>;
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
#define ... | a.cc:79:7: error: unterminated argument list invoking macro "co"
79 | }
| ^
a.cc: In function 'int main()':
a.cc:78:3: error: 'co' was not declared in this scope
78 | co(M(0,abs(a-b)-n)
| ^~
a.cc:78:5: error: expected '}' at end of input
78 | co(M(0,abs(a-b)-n)
| ^
a.cc:7... |
s954417171 | p03778 | C++ | #include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
template <class T> using V = vector<T>;
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
#define ... | a.cc: In function 'int main()':
a.cc:26:19: error: no matching function for call to 'max(int, long long int)'
26 | #define M(a,b) max(a,b)
| ~~~^~~~~
a.cc:32:21: note: in definition of macro 'co'
32 | #define co(a) cout<<a<<endl;
| ^
a.cc:78:6: note: in expansion of ... |
s721667855 | p03778 | C++ | #include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
template <class T> using V = vector<T>;
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
#define ... | a.cc:79:7: error: unterminated argument list invoking macro "co"
79 | }
| ^
a.cc: In function 'int main()':
a.cc:78:3: error: 'co' was not declared in this scope
78 | co(M(0,M(a,b)-rM(a,b)+n)
| ^~
a.cc:78:5: error: expected '}' at end of input
78 | co(M(0,M(a,b)-rM(a,b)+n)
| ... |
s157527862 | p03778 | C++ | #include <iostrem>
using namespace std;
int main(void){
int w,a,b;
cin >> w >> a >> b;
if(a + w < b)
cout << b - a - w << endl;
else if(b + w < a)
cout << a - b - w << endl;
else
cout << 0 << endl;
return 0;
}
| a.cc:1:10: fatal error: iostrem: No such file or directory
1 | #include <iostrem>
| ^~~~~~~~~
compilation terminated.
|
s767334384 | p03778 | C | #include<stdio.h>
int main(){
int w,a,b;
scanf("%d %d %d",&w,&a,&b);
if(a+w<b){
printf("%d",b-(a+w));
}
else if(a+w>=b&&a=<b){
printf("%d",0);
}
else{
printf("%d",a-(b+w));
}
return 0;
} | main.c: In function 'main':
main.c:8:21: error: expected expression before '<' token
8 | else if(a+w>=b&&a=<b){
| ^
|
s297237198 | p03778 | C | #include<stdio.h>
int main(){
int d,a,b;
scanf("%d %d %d",&w,&a,&b);
if(a+w<b){
printf("%d",b-(a+w));
}
else if(a+w>b&&a<b){
printf("%d",0);
}
else{
printf("%d",a-(b+w));
}
printf("%d ");
} | main.c: In function 'main':
main.c:4:23: error: 'w' undeclared (first use in this function)
4 | scanf("%d %d %d",&w,&a,&b);
| ^
main.c:4:23: note: each undeclared identifier is reported only once for each function it appears in
|
s435356797 | p03778 | C | #include<stdio.h>
int main(){
int d,a,b;
scanf("%d %d %d",w,a,b);
if(a+w<b){
printf("%d",b-(a+w));
}
else if(a+w>b&&a<b){
printf("%d",0);
}
else{
printf("%d",a-(b+w));
}
printf("%d ");
} | main.c: In function 'main':
main.c:4:22: error: 'w' undeclared (first use in this function)
4 | scanf("%d %d %d",w,a,b);
| ^
main.c:4:22: note: each undeclared identifier is reported only once for each function it appears in
|
s620180130 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w=0;
int a=0;
int b=0;
scanf("%d %d %d", &w,&a,&b);
int min=min(a, b);
int max=max(a+w,b+w);
if (max-min>2*w){
printf("%d", max-min-2*w);
}
else{
printf("0");
}
} | a.cc: In function 'int main()':
a.cc:8:16: error: 'min' cannot be used as a function
8 | int min=min(a, b);
| ~~~^~~~~~
a.cc:9:16: error: 'max' cannot be used as a function
9 | int max=max(a+w,b+w);
| ~~~^~~~~~~~~
|
s202862393 | p03778 | C++ | #include<iostream>
using namespace std;
int main() {
int W,A,B;
cin << W << A << B;
if(A < B) {
cout << B - A <<endl;
}
else {
cout << A - B << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin << W << A << B;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:7: note: candidat... |
s310726106 | p03778 | C++ | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>... | In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/includ... |
s372105885 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
using llong = long long;
using P = pair<llong, llong>;
#define BE(x) x.begin(), x.end()
const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;
int main(){
int w,a,b;
cin >> w >> a >> b;
cout << min(max(inf, b-a-w), max(inf,a-b-w)) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:24: error: no matching function for call to 'max(const llong&, int)'
16 | cout << min(max(inf, b-a-w), max(inf,a-b-w)) << endl;
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64... |
s271896213 | p03778 | C++ | #include<iostream>
using namespace std;
//const int mod = 1e9 + 7;
int main(){
long long w a,b;
cin>>w>>a>>b;
if(b>a+w)
cout<<b-(a+w)<<endl;
else if(b+w<a)
cout<<a-(b+w)<<endl;
else
cout<<"0"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:14: error: expected initializer before 'a'
6 | long long w a,b;
| ^
a.cc:7:7: error: 'w' was not declared in this scope
7 | cin>>w>>a>>b;
| ^
a.cc:7:10: error: 'a' was not declared in this scope
7 | cin>>w>>a>>b;
| ^
a.c... |
s876856448 | p03778 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<map>
using namespace std;
#define ll long long
int main(){
ll w,a,b;
cin >> w >> a >> b;
ll t;
if(b<a){
t=a;
a=b;
b=t;
}
cout << max(b-a-w,0);
... | a.cc: In function 'int main()':
a.cc:20:16: error: no matching function for call to 'max(long long int, int)'
20 | cout << max(b-a-w,0);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from ... |
s972940898 | p03778 | C | #include <stdio.h>
int main(){
int w,a,b;
scanf("%d %d %d",&w,&a,&b);
if(b-(a+w)<=0&&a<=b){{
printf("0");
}else if(a>b){
printf("%d",a-(b+w));
}else{
printf("%d",b-(a+w));
}
return 0;
} | main.c: In function 'main':
main.c:7:6: error: expected '}' before 'else'
7 | }else if(a>b){
| ^~~~
|
s448476438 | p03778 | C++ | //============================================================================
#include<bits/stdc++.h>
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (n); i++)
using namespace std;
int main(){
int w,a,b;
cout << a < b ? max(0,b - a - w) : max(0,a - b - w) << endl;
}
| a.cc: In function 'int main()':
a.cc:9:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
9 | cout << a < b ? max(0,b - a - w) : max(0,a - b - w) << endl;
| ~~~~~~~~~ ^ ~
| | |
| | int
| ... |
s802325987 | p03778 | C++ | //============================================================================
#include<bits/stdc++.h>
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (n); i++)
using namespace std;
int main(){
int w,a,b;
cout << a < b ? max(0,b - a + w) : max(0,a - b - w) << endl;
}
| a.cc: In function 'int main()':
a.cc:9:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
9 | cout << a < b ? max(0,b - a + w) : max(0,a - b - w) << endl;
| ~~~~~~~~~ ^ ~
| | |
| | int
| ... |
s530406797 | p03778 | C | #include <stdio.h>
#include <stdlib.h>
int main (){
int a,b,c;
scanf ("%d%d%d",&a,&b,&c);
k= abs( b-c );
if (a>k){
printf ("%d",a-k);
}
else{
printf ("0");
}
return 0;
} | main.c: In function 'main':
main.c:6:1: error: 'k' undeclared (first use in this function)
6 | k= abs( b-c );
| ^
main.c:6:1: note: each undeclared identifier is reported only once for each function it appears in
|
s663594539 | p03778 | C | #include <stdio.h>
#include <stdlib.h>
int main (){
int a,b,c;
scanf ("%d%d%d",&a,&b,&c);
k= abs(b-c);
if (a>k){
printf ("%d",a-k);
}
else{
printf ("0");
}
return 0;
} | main.c: In function 'main':
main.c:6:1: error: 'k' undeclared (first use in this function)
6 | k= abs(b-c);
| ^
main.c:6:1: note: each undeclared identifier is reported only once for each function it appears in
|
s407954163 | p03778 | C++ | #inlude <bits/stdc++.h>
using namespace std;
int main(){
int w,a,b;
cin >> w >> a >> b;
if(a > b){
int temp = a;
a = b;
b = temp;
}
int answer = b -(a + w);
if(answer < 0) answer = 0;
cout << answer << endl;
}
| a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
1 | #inlude <bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> w >> a >> b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in hea... |
s932156179 | p03778 | C++ | #ifdef LOCAL
#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstring>
#else
#include <bits/stdc++.h>
#endif
using namespace std ;
typedef long long ll ;
#define rep(i , n ) for ( int i =0; i < n ; i++)
#define _sort(arg) sort(begin(arg), end(arg))
#define MOD 1000000007
#define p... | a.cc: In function 'int main()':
a.cc:41:22: error: 'w' was not declared in this scope
41 | else if (a + w <= b)
| ^
|
s429369993 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define otp(n) cout << n;
#define ct(n) cout << n << endl;
#define cts(n) cout << n << " ";
#define cte cout << endl;
#define ctv(v) rep(i,(v).size()) otp(v[i]) cte
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define ... | a.cc:24:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
24 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:27:19: error: expected ';' before '}' token
27 | ct(a-w-b)1
| ^
| ;
28 | } else {
| ~ ... |
s679317777 | p03778 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define debug(x) cerr << x << "\n"
#define all(x) (x).begin(),(x).end()
#define exist(s, e)((s).find(e) != (s).end())
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int w, a, b;
cin >> w >> a >> b;
if (a+W < b... | a.cc: In function 'int main()':
a.cc:17:11: error: 'W' was not declared in this scope
17 | if (a+W < b) cout << b - (a+W) << '\n';
| ^
a.cc:18:49: error: expected primary-expression before ')' token
18 | else if (b+W < a) cout << a - (b+W) << '\n';)
| ... |
s920964788 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,a,b;
cin>>w>>a>>b;
if(abs(b-a)<=w){
cout<<0;
return 0;
}
cout<<abs(b-a)-w;
return 0;
| a.cc: In function 'int main()':
a.cc:12:18: error: expected '}' at end of input
12 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s457989027 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,a,b;
cin>>w>>a>>b;
if(abs(b-a)<=w){
cout<<0;
return 0;
}
cout<<abs(b-a)-w;
return 0;
| a.cc: In function 'int main()':
a.cc:12:18: error: expected '}' at end of input
12 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s760272431 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,w;
cin>>a>>b;
if(abs(a-b)<=w) cout<<0<<endl;
else cout<<abs(a-b)<=w<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:31: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | else cout<<abs(a-b)<=w<<endl;
| ~^~~~~~
|
s941890782 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,w;
cin>>a>>b;
if(abs(a-b)<=w) cout<<0<<endl;
else cout<<abs(a-b)<=w<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:31: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | else cout<<abs(a-b)<=w<<endl;
| ~^~~~~~
|
s407429444 | p03778 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,w;
cin>>a>>b;
if(abs(b-a)<=w) cout<<0<<endl;
else cout<<abs(b-a)<=w<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:31: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | else cout<<abs(b-a)<=w<<endl;
| ~^~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.